text stringlengths 181 35.5k | meta dict |
|---|---|
Q:
gets (variable)
can anyone tell me why gets(abc) works with char[] but not with int?
int abc;
char name[] = "lolrofl";
printf("Hello %s.\n",name);
printf("\n >> ");
fflush(stdin);
gets (abc);
printf("\n die zahl ist %i.\n",abc);
system("Pause");
return(0);
A:
The prototype for gets() is:
char* gets(cha... | {
"pile_set_name": "StackExchange"
} |
Q:
programmer is not responding with stacked shields
I keep getting the following error when trying to upload my code with the Arduino IDE:
avrdude: stk500_recv(): programmer is not responding
I stacked the following shields:
Sparkfun ColorLCD shield (shieldlist reference)
Libelium XBee shield (shieldlist reference... | {
"pile_set_name": "StackExchange"
} |
Q:
How to synchronously find instance and create in LoopBack
I am quite new with NodeJS and it is obviously causing some problems as things have a very asynchronously nature.
I am trying to find to instances which has to be used to create a new one (relation): countryId and clientId.
Obviously things are happening as... | {
"pile_set_name": "StackExchange"
} |
Q:
Authorship allocation - is it common to grant equal credit to two last authors?
I am working on a project in which I have a direct supervisor in addition to the head professor of the lab. The direct supervisor only agrees to being written first or last on the article we are writing. Needless to say, my professor w... | {
"pile_set_name": "StackExchange"
} |
Q:
Why does math.stackexchange use single transferable vote?
Isn't the Schulze method superior to single transferable vote? It takes preferences, and it's Condorcet (i.e., if everyone prefers A to B for all B in hypothetical two person elections, then A wins.) STV is not Condorcet.
I can understand national electio... | {
"pile_set_name": "StackExchange"
} |
Q:
AWS SageMaker notebook list tables using boto3 and PySpark
Having some difficulty executing the following code in AWS SageMaker. It is supposed to just list all of the tables in DynamoDB.
import boto3
resource = boto3.resource('dynamodb', region_name='xxxx')
response = resource.tables.all()
for r in response:
... | {
"pile_set_name": "StackExchange"
} |
Q:
Tensorflow rnn: name 'seq2seq' is not defined
I am trying this notebook:
https://github.com/sjchoi86/Tensorflow-101/blob/master/notebooks/char_rnn_sample_tutorial.ipynb
I have a problem with this line In[6]:
outputs, final_state = seq2seq.rnn_decoder(inputs, istate, cell, loop_function=None, scope='rnnlm')
I get ... | {
"pile_set_name": "StackExchange"
} |
Q:
State not updating immediately
I'm building a web app that calculates BMR by asking the user for age, weight, gender, feet, inches. After the user submits the form, there should be an alert box with the state of all objects. The only problem is, BMR is the only one that stays at 0; it doesn't update until I click ... | {
"pile_set_name": "StackExchange"
} |
Q:
Specifying Notepad as OLE object
For word application, we have Word.Application as program identifier. What is the program identifier for Notepad and Calculator?
A:
Word.Application is the name of the a COM object which forms part of the Word API.
Notepad is a simple application which does not have a COM API. If... | {
"pile_set_name": "StackExchange"
} |
Q:
Application Created with Processing.org Won't Launch on Linux
I have created an application using Processing.org. Everything works fine when I "Export Application" and run it on my Mac. When I "Export Application" and move the application.linux folder to my computer that is running Linux Mint, I click the Shell Sc... | {
"pile_set_name": "StackExchange"
} |
Q:
How to retrieve Parse.com User details in php
I am using parse php sdk to handle data in my web page. I have a User class in my database. I am trying to display all user details into my web page. The server connection is correct and working, since it displays all other class details. But it is not working for the ... | {
"pile_set_name": "StackExchange"
} |
Q:
Deserialize JSON Root Array
I'm having so trouble deserializing a JSON stream that contains an array as the root:
[
{
"object": {
"property1":"000000",
"property2":"000000"
}
},
{
"object": {
"property1":"0... | {
"pile_set_name": "StackExchange"
} |
Q:
C# Prevent Hotkeys while TextBox focus
I have a program containing multiple C# Forms TextBoxes. I've set up Hotkeys for the entire form activating certain functions. My problem is that my Hotkeys have been set onto the Form KeyDown event and they activate if I write something on a TextBox.
Example: One Hotkey mig... | {
"pile_set_name": "StackExchange"
} |
Q:
Observable fromEvenet mouseup is not accurate
With this code you can drag blue line to right and left, splitting two contents.
The problem is if I hold down my mouse and quickly move to one of the sides and let go my mouse, it still is active.
So the take until doesn't execute I guess, or there an other problem wi... | {
"pile_set_name": "StackExchange"
} |
Q:
How to Detect Special Key Presses in a Notebook?
We can use:
SetOptions[EvaluationNotebook[], NotebookEventActions -> {{"KeyDown","s"} :> Print["triggered"]}]
to make the current notebook respond to s button press, also we can do the same to Modifier Keys like Ctrl, Shift, Alt or so.
Can we do the same with Backs... | {
"pile_set_name": "StackExchange"
} |
Q:
window.location.href not working in form onsubmit
So i have a form, and onsubmit="return reg_check(this)" where reg_check() is a javascript function in the header which is supposed to check the form data, and since one of its tasks is to check if the username is in the database which requires php, i want to redire... | {
"pile_set_name": "StackExchange"
} |
Q:
How to analyze a large core dump generated when JVM crashes
My web application using Java one day crashed and generated a large core dump (5.5GB). I tried to use IBM Thread and Monitor Dump Analyzer for Java to analyze this core dump, but while reading the core dump, the console said:
Exception in thread "Thread-... | {
"pile_set_name": "StackExchange"
} |
Q:
How to Interpret This Response to a LOR Request
As I mentioned in my last post, I experienced a lot of stress during my last undergraduate semester as well as an episode of depression due to my professor's upcoming retirement. (I deeply admired her and wanted her to be my graduate advisor.) Honestly, I think the d... | {
"pile_set_name": "StackExchange"
} |
Q:
What is the difference between 'ls --color' and 'ls --color=tty'?
I am making an alias for ls in my .zshrc profile so that it always has a colored output. As it turns out, I stumbled across either
alias ls="ls --color=tty"
or, without the tty value
alias ls="ls --color"
Is there any particular situation where ei... | {
"pile_set_name": "StackExchange"
} |
Q:
How to use Turkish characters in xml?
I am using xml and have a problem with Turkish characters. Just like this
<Ürün></Ürün>...
I use str_replace for solution but it's not giving desired results.
What do I have to do?
A:
The above XML snippet is perfectly valid, as long as you've saved the XML with the correct... | {
"pile_set_name": "StackExchange"
} |
Q:
Pyspark remove columns with 10 null values
I am new to PySpark.
I have read a parquet file. I only want to keep columns that have atleast 10 values
I have used describe to get the count of not-null records for each column
How do I now extract the column names that have less than 10 values and then drop those colum... | {
"pile_set_name": "StackExchange"
} |
Q:
splitting string as per regex in typescript is not working as expected for multiple space
In typescript I want to divide a name as per space. So, I used something like this
const splitted = name.split(' ');
It is working as expected, but if wrongly someone gave more than one space. So, i tried to handle multiple ... | {
"pile_set_name": "StackExchange"
} |
Q:
back img button position on resize window or rotate mobile device
Starting here tag img position on resize window or rotate mobile device , now I need to add another image (like a back button), before "Search..." (the magnifying glass is now ok).
Default, this second image (back button) is hidden, and when I press... | {
"pile_set_name": "StackExchange"
} |
Q:
Tkinter - bug that shows forgotten labels on corner of screen?
Screenshot: http://puu.sh/wiuP7/957bca09ea.png
My code is attached and roughly does the following:
Grabs data from SQL server
For each product it lists all printed products and all scanned products. There could be multiple prints (see P039 on the botto... | {
"pile_set_name": "StackExchange"
} |
Q:
Joomla form field required even though required attribute changed to false
I have a form with a field that is required in some instances and not in others so I have changed the required attribute on the fly in the edit view file with the setFieldAttribute function:
if (_condition_) {
$this->form->setFieldAttri... | {
"pile_set_name": "StackExchange"
} |
Q:
Can I make a HTML5 updateable database to search locally?
I'm making a site with huge focus on index searching inside the site. The problem lies with the querys, as the production server is very cheap. I thought that could be a good idea to start with node.js instead of PHP for developing. But the problem lies far... | {
"pile_set_name": "StackExchange"
} |
Q:
Onchange input event isn't fired on jquery
I'm working with jquery.
And i have text input in a form, i would like to process the change event.
$("#my_input").change(function(){alert('123');});
the event is fired normally when i edit the field manually, but when i change the field's value with a script (sometimes ... | {
"pile_set_name": "StackExchange"
} |
Q:
Javascript convert canvas to img
I am using cropper js to crop images.
more info at: https://github.com/fengyuanchen/cropperjs
so this is my javascript code to get cropped picture as canvas
var result = document.getElementById('result');
result.innerHTML = '';
result.appendChild(cropper.getCroppedCanvas());
Resu... | {
"pile_set_name": "StackExchange"
} |
Q:
Using SSH Keys in Transmit to connect via SFTP
I'm using Transmit to connect via SFTP to a server. I know that the public key is properly uploaded etc. because I can connect via SSH on the command line.
For some reason I can't connect with SFTP in Transmit. My keys are in the default location (~/.ssh) so I can't i... | {
"pile_set_name": "StackExchange"
} |
Q:
Do I need an Ubuntu compatible router?
Im' thinking about formatting my HD and reinstalling with Ubuntu instead. However I'm concerned about losing internet access. I currently use XP and connect to the net via a router which I can access by typing its IP address into my browser. Will there be any compatibility is... | {
"pile_set_name": "StackExchange"
} |
Q:
Cascading - cascading.tuple.TupleException: failed to set a value
I am trying to apply ScrubFunction on each tuple and return the tuple with updated values.
But i am getting the Exception like..
Caused by: cascading.tuple.TupleException: failed to set a value, tuple may not be initialized with values, is zero leng... | {
"pile_set_name": "StackExchange"
} |
Q:
f and g are bounded . if 1/g is bounded, then f/g is bounded.
I would like some help understanding how to go about this question. I think that f/g is not bounded, but I cannot figure how to show that f/g is not bounded.
A:
We have $|f| < P$, $|g| < Q$, and $|1/g| < R$ for some $P$, $Q$, and $R$, so
$$\left|\frac... | {
"pile_set_name": "StackExchange"
} |
Q:
Implicit conversion to Runnable?
As an exercise, I tried to create an implicit conversion that would accept a function and produce a Runnable. That way you could call Java methods that accept Runnable objects and use them like closures.
The implicit conversion is easy enough:
implicit def funToRunnable(fun : U... | {
"pile_set_name": "StackExchange"
} |
Q:
Is it possible to create proxy type of integer?
That was just a test I tried. I want to make a type which behaves exactly like int. I tried to make a proxy type like this:
class myint : int { }
but then myint won't be value type. Is there a way to create a proxy type of int?
P.S. I know about extension methods.
... | {
"pile_set_name": "StackExchange"
} |
Q:
QML: passing JS object to C++ member function
I'm trying to pass a JS object (map) to a C++ member function with a signature
Q_INVOKABLE virtual bool generate(QObject* context);
by using
a.generate({foo: "bar"});
The method is called (detected via breakpoint), but the passed context parameter is NULL. Since the... | {
"pile_set_name": "StackExchange"
} |
Q:
Prolog list adding
--the question has been edited--
Using this data, I need to create a list:
team(milan,1).
team(napoli,2).
team(lazio,3).
team(roma,4).
team(inter,4).
team(juventus,5).
So, given a query like:
check([milan,lazio,roma,inter]).
make a new list with their respective team number.
X=[1,3,4,4]
What ... | {
"pile_set_name": "StackExchange"
} |
Q:
Outlook email alerts every hour? (not immediate)
I'm starting to use MS Outlook 2010 for work and I would like email alerts only to show up every hour or so, instead of showing up right when the message is received. Is there a way to make Outlook do this?
After having gone through the Options menu and after some r... | {
"pile_set_name": "StackExchange"
} |
Q:
jCarousel Image gallery with thumbnails
I currently have an image gallery with 30 - 40 images. Upon page load the user can visually see the images loading for a pretty significant amount of time (less than pretty). The gallery is using jcarousel prev / next buttons to navigate to images as well as thumbnails. I... | {
"pile_set_name": "StackExchange"
} |
Q:
How to return JSONObject from doInBackground() method to onPostExecute() method on AsyncTask?
In Android app i want to return JSONObject from doInBackground() method to onPostExecute() method.
Here is the code:
private class AddAsyncTask extends AsyncTask<String, Void, String>
{
JSONObject jsonObjRec... | {
"pile_set_name": "StackExchange"
} |
Q:
Place arithmetic signs in correct order to get the number
Given a list of numbers, place signs + or - in order to get the
required number.
If it's possible then return true, otherwise return false
[1, 2, 3, 4, 5, 7]; 12 -> true, because 1 + 2 + 3 + 4 - 5 + 7 = 12
[5, 3]; 7 -> false, because 5 + 3 != 7 and 5 - ... | {
"pile_set_name": "StackExchange"
} |
Q:
Swap Characters Using Command Prompt
Trying to write a program called SwapChars.java using command line arguments that allows any two characters to be swapped. For example if the program was called SwapChars then to swap all ‘a’s and ‘b’s in a file test.txt we would type
java SwapChars test.txt ab
I typed the fo... | {
"pile_set_name": "StackExchange"
} |
Q:
Expo build:ios fails with "Error while gathering & validating credentials"
I'm trying to run exp build:ios and it returns the following error:
Running: bash.exe -c PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /mnt/c/Users/MyName/AppData/Roaming/npm/node_m
odules/exp/node_modules/@expo/travel... | {
"pile_set_name": "StackExchange"
} |
Q:
Is this a right and effcient way of checking AND in a for loop
Just saw this at work in a code review and was wondering if this style of coding - for loop, doing && like that, seems fine to you or is there a better way of doing the same?
for (int j = 1; j <= ETtop; j++)
{
// Check everything.
int k = ET[j... | {
"pile_set_name": "StackExchange"
} |
Q:
When performing a Core Data migration, how can I carry over old values from the source store from a different entity?
I'm performing a migration using Core Data's standard mapping model approach, and it seems to be working fine, except for one thing: I've moved an attribute from one entity to another, and I want t... | {
"pile_set_name": "StackExchange"
} |
Q:
Vue.js transition to appear/occur on element entering viewport
Firstly please no jQuery. I could do this in jQuery etc., the point of the question is to do it without unnecessary dependencies.
The scenario here is I'm creating a single page website with several sections to scroll through. I want to use Vue.js's tr... | {
"pile_set_name": "StackExchange"
} |
Q:
Question on using or equals (||=) in application controller
I have seen the or equals ||= often used in application controller methods to set a variable if it doesn't exist. The most recent in Railscasts 270. But I have a question.. take for example this helper method
def current_user
@current_user ||= User.find... | {
"pile_set_name": "StackExchange"
} |
Q:
Why not write the solutions of a cubic this way?
For the solution of the cubic equation $x^3 + px + q = 0$ Cardano wrote it as:
$$\sqrt[3]{-\frac{q}{2} + \sqrt{\frac{q^2}{4} + \frac{p^3}{27}}}+\sqrt[3]{-\frac{q}{2} - \sqrt{\frac{q^2}{4} + \frac{p^3}{27}}}.$$
but this is ambiguous because it does not tell you which... | {
"pile_set_name": "StackExchange"
} |
Q:
Getting indices of list based on a second list
I have a list a which contains all the possible values in list b
a = ['foo', 'bar', 'baz']
and
b = ['baz', 'baz', 'foo', 'foo', 'foo', 'bar', 'foo', 'baz']
I'd like to return a list c which has the number of elements found in b where each element is the index of a ... | {
"pile_set_name": "StackExchange"
} |
Q:
Adding media support to a timeline plugin (Wordpress)
I have installed this plugin -> http://wordpress.org/plugins/wordpress-posts-timeline/ .
With this plugin you can create a post and it displays in a timeline. My problem is that images don't show when inserted in the post box.
I tried modifying the plugin code... | {
"pile_set_name": "StackExchange"
} |
Q:
Laravel filesystem sftp cached adapter
I am struggling with this issue for some time.
I am using the sftp adapter to connect to another server where i read/write files a lot.
For thumbnail creation i use background jobs with laravel horizon to retrieve pdf contents from the remote sftp server and then generate a ... | {
"pile_set_name": "StackExchange"
} |
Q:
Web App. Vs. Desktop App (Java Swing App)
I want to develop an application where server pushes a lot of data to client. (20 kb every 20 milliseconds) 500kbps. All of the data are double/float values.
I am trying to answer the question, if there is something inherent to desktop apps (Java Swing app) which will mak... | {
"pile_set_name": "StackExchange"
} |
Q:
"InstallTrigger" is not defined
In my html page i have code something like this, where i have installed an extension only if the browser is Firefox:
if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent))
{
//relevant code
InstallTrigger.install(InstallXPI);
}
It works fine in every browser. But when the sam... | {
"pile_set_name": "StackExchange"
} |
Q:
What is the axiomatic (set theory) context of the P vs NP and NP=EXPTIME conjectures?
When the conjecture $\mathbf{P} = \mathbf{NP}$ or $\mathbf{P} \neq \mathbf{NP}$ is set (e.g. by the Clay Mathematical Institute by S. Cook, see here) what mathematical axiomatic system is assumed?
In order to prove or disprove su... | {
"pile_set_name": "StackExchange"
} |
Q:
How to select recent errors that were raised in an SQL-Server database?
is there a way to do something like:
select top 100 * from sys.recent_raised_errors order by date
My scenario was that I had an application that executed a stored procedure in the database, and after installing a new trigger on a table, that ... | {
"pile_set_name": "StackExchange"
} |
Q:
Moiré patterns in viewport but not in render?
When rendering overlapping meshes (I know this is bad practice, but in this case it is done purely out of curiosity) You get strange artifacts.
However, these differ from the viewport render and the F12 render:
Here is a screenshot of the viewport render in camera view... | {
"pile_set_name": "StackExchange"
} |
Q:
Inputs for jedis.incr(byte[] key)
I'm currently using Jedis version 2.9.0, and according to the Redis Jedis documentation, the method long jedis.incr(byte[] key) accepts a byte array as its key.
The thing is, I'm using hash values (MessageDigest.getInstance("MD5")) as keys, but I'm not sure about the types/sizes ... | {
"pile_set_name": "StackExchange"
} |
Q:
Software "Robots" - Processes or work automation
I have being toying with the idea of creating software “Robots” to help on different areas of the development process, repetitive task, automatable task, etc.
I have quite a few ideas where to begin.
My problem is that I work mostly alone, as a freelancer, and work ... | {
"pile_set_name": "StackExchange"
} |
Q:
Adb error: device not found while device is connected
I'm compiling and installing Android apps using command line and this is what happens when I'm trying to install it on a device:
$> adb devices
List of devices attached
8c092420 device
$> adb install TestApp.apk
error: device not found
- waiting fo... | {
"pile_set_name": "StackExchange"
} |
Q:
ASP.NET MVC Validation Groups?
I have a form in which I would like to require different fields depending on which submit button is pressed. Example: Field A is required if you press Submit Button 1, but only Field B is required if you press Submit Button 2. If I was still using web forms, I would assign differen... | {
"pile_set_name": "StackExchange"
} |
Q:
Define table name Ruby on Rails 3.2.1
I've got a legacy database that I'm connecting to via the sqlserver adapter. One of the databases is called "SiteIndex_Players". I've generated the following model:
class SiteIndexPlayer < ActiveRecord::Base
set_table_name = "SiteIndex_Players"
end
I've also tried:
class ... | {
"pile_set_name": "StackExchange"
} |
Q:
How to write a simple JQuery integer division function
My webpage displays realtime data that is updated every 10 seconds from our PI server(historian server). I was recently tasked to take two peices of data that are allready displayed on my page and divide them, displaying the new result on a graph. I have very... | {
"pile_set_name": "StackExchange"
} |
Q:
Widest tyre you can safely fit on 700c wheel (17mm rim width)
I am riding a no-suspension hybrid with rigid reinforced fork and 700c wheels.
I go on touring trips with very flexible itinerary. I stay on gravel/tarmac/trail 80% of the time but occasionally I like to link parts of the tour by going off-road or on ro... | {
"pile_set_name": "StackExchange"
} |
Q:
Screen orientation landscape change activity
I'm making an app that change the colors depending of the color you select this change the background, but when I make the screen orientation to landscape this automatically change the color to the predefined and if I'm not wrong this happen because it's being destroy a... | {
"pile_set_name": "StackExchange"
} |
Q:
Android actionbar background image не работает
Не могу установить картинку на задний фон ActionBar. Содержимое файла styles.xml:
<resources>
<style name="BlackSkyBaseTheme" parent="Theme.AppCompat.Light">
</style>
<style name="BlackSkyTheme" parent="BlackSkyBaseTheme">
<item name="actionBarSt... | {
"pile_set_name": "StackExchange"
} |
Q:
Qt Testing QMessageBoxes (or a general QDialog) with exec() loop
I want to test a custom QMessageBox that I created. In particular, my API will execute automatically the exec() loop of the QMessageBox, and I want to check the result when the user clicks a button or closes the widget.
The problem is that I am block... | {
"pile_set_name": "StackExchange"
} |
Q:
"Closed" message with Community User is over-encoded
Spotted at this question
The HTML source looks like this:
<h2>
<b>marked</b> as duplicate by
<a href="/users/140890/martijn-pieters">Martijn Pieters</a>,
<span class="voter-history" title="This question's author approved a pendi... | {
"pile_set_name": "StackExchange"
} |
Q:
Retrofit. POST with request body without response body
I try to POST these login and password
{
"userLogin": "Mark",
"userPassword": "Pencil"
}
According to POSTMAN, where I put above JSON as a raw code, I got an empty response body and response code: 200 (Logging is succesful). But I can't achieve it in ... | {
"pile_set_name": "StackExchange"
} |
Q:
Also select parents up to the root when selecting child in TreeTableView
We try to achieve the following:
When a node gets selected in a JavaFX TreeTableView, also "the path to the root", i.e., the parent, the grandparent, and so on should get selected. Selected in this case means highlighted with a different bac... | {
"pile_set_name": "StackExchange"
} |
Q:
How many solutions to $z^{6!}-z^{5!}\in \mathbb{R}$ and $|z|=1$
How many solutions $\Im(z^{720}-z^{120})=0$ where $|z|=1$? (AIME I $2018$ #$6$)
The following is my interpretation of the first solution.
The next step is to see how many solutions to $\sin(720\theta)-\sin(120\theta)=0$. (1)
One way to do this is c... | {
"pile_set_name": "StackExchange"
} |
Q:
Convert table to hierarchical vs linear
I'm looking if exists for any standard functions in PHP to change a tabular array into a deeper grouped array as below:
$table = [
[1, "group1", "Name 1", "Value 1"]
, [2, "group1", "Name 2", "Value 2"]
, [3, "group1", "Name 3", "Value 3"]
, [4, "group1", "N... | {
"pile_set_name": "StackExchange"
} |
Q:
To burnate, or not to burnate?
I have found a couple of tags that look too much like meta-tags:
computer: has been used once, where the question is also tagged zx-spectrum. (Retagged)
color: both times used with display: maybe color-display would be better? (Retagged)
There are probably more of these on the site... | {
"pile_set_name": "StackExchange"
} |
Q:
Why do the horsemen bother passing the item from one to another while being searched?
In Now You See Me 2, the main characters need to steal a card from a secured vault. At some point, each of them is searched for the stolen item and each performs a nifty collection of tricks to keep holding on to it without the s... | {
"pile_set_name": "StackExchange"
} |
Q:
How can I deserialize Array inside of Array google-gson
I have JSON like that:
{
"Answers":
[
[
{"Locale":"Ru","Name":"Name1"},
{"Locale":"En","Name":"Name2"}
],
[
{"Locale":"Ru","Name":"Name3"},
{"Locale":"En","Name":"Name4"}
]
]
}
As you can see, I have array inside of array. How can I de... | {
"pile_set_name": "StackExchange"
} |
Q:
Best practice for null-checking in Scala
I understand that null is frowned upon in Scala, and that one should always wrap optional values within an Option (or a "null type" if one is available).
The advantages are clear, there should never be a need to check against null values, and the resulting code is both safe... | {
"pile_set_name": "StackExchange"
} |
Q:
Odd behavior with division in Python
I'm completely stumped dealing with something quite simple. The following lines are a part of a much much larger program. Thing and stuff are two objects on a grid, and I need to find the angle between them, in relation to the y-axis. math.atan takes in a floating point number,... | {
"pile_set_name": "StackExchange"
} |
Q:
Turning my desk's smile upside down
I have a largely jerryrigged desk - its a particleboard table top that's sitting on a pair of metal A frame trestle legs. I recently got a 27 inch monitor and the weight of it is causing the desk to sag. Its an inch thick particleboard that used to have a pair of I frame and a b... | {
"pile_set_name": "StackExchange"
} |
Q:
Definition of e, how to relate that to other interest rates
I understand that one way of understanding the meaning of the number $e$ is to form a compound interest formula, $A = \left(1+\frac{1}{n}\right)^{nx}$ and then let $n\rightarrow \infty$ for which this converges to $e$. However, this occurs by setting the... | {
"pile_set_name": "StackExchange"
} |
Q:
How to change the time format of timedelta
Hi I hv a timedelta in the following format
0days 01:25:53.0000000
I want to change this time delta to equivalent
minutes(I.e. 85.88)
Thanks
A:
Using total_seconds
pd.Series(pd.Timedelta('0days 01:25:53.0000000')).dt.total_seconds()/60
Out[334]:
0 85.883333
dtype:... | {
"pile_set_name": "StackExchange"
} |
Q:
Does Lazy Writer spend resources on flushing out pages from the buffer pool?
In MS SQL Server, does Lazy Writer spend resources to make pages out of the buffer pool after periodically checking free buffer list and marking some clean pages as free? Or free marked clean pages continue to stay in the buffer pool unti... | {
"pile_set_name": "StackExchange"
} |
Q:
How do I combine lenses which contain context?
I'm starting from authorityL via authorityHostL to hostBSL - I know you can combine lenses via
(authorityL . authorityHostL . hostBSL)
but that fails with Couldn't match type ‘Authority’ with ‘Maybe Authority’. How do I properly deal with the Maybe here?
A:
You can... | {
"pile_set_name": "StackExchange"
} |
Q:
Recovering a conic from a pole-polar pair
Consider a conic section $C$ in $\mathbb{R}^2$. Every point $P$ in the plane has a "dual" (pole-polar duality) line $L$ with respect to $C$ such that lines $PA$ and $PB$ are tangent to $C$, where $L \cap C = \{A, B\}$. However, given $P, A, B$, is it possible to recover $C... | {
"pile_set_name": "StackExchange"
} |
Q:
Virtual PC Performance Issue on 64-bit Vista
I am running 64-bit Vista with 8 GB ram and 4 cores. It supports hardware-assited virtualization.
Using Virtual PC 2007, my newly built 32-bit Windows XP Pro VM is running incredibly poorly. Even the simplest actions like showing the start menu will cause the CPU usage ... | {
"pile_set_name": "StackExchange"
} |
Q:
How to represent X and Y axis data in an SQL table
I have a table of data in excel that looks like this:
I need to get this data imported into an SQL table.
Eventually I need to be able to query the table by saying something like:
Select the value where x-axis equals 762 and y-axis equals 889 - this should return... | {
"pile_set_name": "StackExchange"
} |
Q:
Reading from files passed as command line arguements
I am trying to parse a given textfile, but so far, my program does not seem to be reading properly.
#include <stdio.h>
int main(int argc, char *argv[])
{
FILE *fr; //file pointer
int buildingFloors = 1;
printf("sanity check\n");
fr = fopen (... | {
"pile_set_name": "StackExchange"
} |
Q:
Property of subgroups
Is the following property correct?
Property: let $(G;f_G)$ group, $B \subseteq G$ and $B \neq \emptyset $, then $(B;f_G|_B)$ is group iff $\forall a,b \in B$ we have that $a f_G|_B b'\in B $ and $ b $ is symmetry element of $b'$.
Thanks in advance!!
A:
That statement is true. To show tha... | {
"pile_set_name": "StackExchange"
} |
Q:
In AngularJS tutorial select only one instance, or the first instance in an array
I want to select only the first instance of an array in angular instead of using ng-repeat. I was thinking something like ng-instance, or ng-specificinstance but they don't exist. Also how should I define my javascript variable and ... | {
"pile_set_name": "StackExchange"
} |
Q:
Get/store Facebook access token from REQUEST in PHP SDK 3.0
Let's say I get a valid access token from an external application that does Facebook Connect and sends me the token on GET.
Is it normal/good for me to get that token and save it in the $facebook = new Facebook(...); object? Something like:
$facebook = ne... | {
"pile_set_name": "StackExchange"
} |
Q:
list attachment on wordpress
i have this code:
<?php
$valid_ext = array("pdf", "doc");
$args = array(
'post_type' => 'attachment',
'post_mime_type' => 'application/pdf',
'numberposts' => 40,
'post_statu... | {
"pile_set_name": "StackExchange"
} |
Q:
node-canvas: output PNG file as interlaced/progressive
node-canvas is a Node.js version of the HTML5 canvas library that depends on Cairo. My app creates a bunch of PNG files depending on that data that is sent to the app.
node-canvas offers two functions toBuffer() and toDataURL() which outputs raw PNG or Base64 ... | {
"pile_set_name": "StackExchange"
} |
Q:
3D printer simulation
i am trying to build something like a primitive 3D printer in blender using fluid dynamics . I am having real problems to control the fluid dynamics .
i was looking for something like this as a start but better if the fluid is a little less viscous when reaching the print bed ...
https://ww... | {
"pile_set_name": "StackExchange"
} |
Q:
Python read Linux memory process error (/proc/$pid/mem)
I have the following code tested on some Linux distros (Debian, Linux Mint...) and working, but under CentOS I get an error even I run it as root:
#!/usr/bin/env python
import re
maps_file = open("/proc/18396/maps", 'r')
mem_file = open("/proc/18396/mem", 'r'... | {
"pile_set_name": "StackExchange"
} |
Q:
Ploting matrix in matplotlib, while taking indexed data for positive and negative values, returns wrong plot axis or data
Having a list of variables representing some geographical data plus one variable expressed as possitive or negative, I try while plotting two variables in a scatterplot, plot their negative val... | {
"pile_set_name": "StackExchange"
} |
Q:
SharePoint Document or Item Download/View Event Handler?
Is there any way to capture document download or item view actions in SharePoint 2010/2007?
Thanks.
A:
I had a similar requirement in that I had to send an email when a document was downloaded. In WSS 3.0, I wrote an Http Module that looked at the request ... | {
"pile_set_name": "StackExchange"
} |
Q:
Member function with multi-level list in Common Lisp
I'm trying to understand how it works member function with list and list of lists.
Here an example.
(member '(A 6) '((A 7) (B 6) (E 6) (D 5)) :test #'string-equal :key #'second)
I want to check with the member function if the second argument of the list '(... | {
"pile_set_name": "StackExchange"
} |
Q:
How to "source" ~/.bashrc automatically once it has been edited?
I would like to create an alias that does the following:
Opens TextMate with ~/.bashrc and allows me to edit it
Once I close TextMate, "sources" ~/.bashrc (so if I add a new alias, for example, it will be available immediately)
I tried the followin... | {
"pile_set_name": "StackExchange"
} |
Q:
Textbox Shows before Label Text
Not sure why the textbox shows first an then my text which I'm not using a real label tag shows up AFTER the textbox
<p>Token: <input type="text" id="txt_Token" /></p>
[ textbox ] Token:
A:
May be you are floating your input element left:
#txt_Token{
float:left;
}
Check this... | {
"pile_set_name": "StackExchange"
} |
Q:
CSS z-Index with position: relative
I am using css to create a "gantt-chart" style progress bar.
It consists of an empty progress bar, inside which is a green bar which represents expected progress. On top of this should be another (thinner) black bar which represents actual progress.
The "actual" and "expected" b... | {
"pile_set_name": "StackExchange"
} |
Q:
convert a node object to a JSON object in groovy
With this code, it returns a node object of a xml document
def rootNode = new XmlParser().parseText(text)
How can you parse this object into a JSON object (perhaps using JsonBuilder) ?
I did try to pass by a String object (XmlUtil.serialize(rootNode)) but it didn't... | {
"pile_set_name": "StackExchange"
} |
Q:
Parallel for and Progressbar
I have this code:
Parallel.For(0, img.Count(), i =>
{
img[i].Scale = escala_axial;
Bitmap tmp_b = new Bitmap((System.Drawing.Image)img[i].RenderImage(0));
tmp_b = filtro.Apply(tmp_b);
imagenes[i] = tmp_b;
Progr... | {
"pile_set_name": "StackExchange"
} |
Q:
What is the implication of Perron Frobenius Theorem?
The Perron Frobenius theorem states:
Any square matrix $A$ with positive entries has a unique eigenvector with
positive entries (up to a multiplication by a positive scalar), and
the corresponding eigenvalue has multiplicity one and is strictly
greater th... | {
"pile_set_name": "StackExchange"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.