How do I fix "for loop initial declaration used outside C99 mode" GCC error?
I'm trying to solve [the 3n+1 problem](http://uva.onlinejudge.org/external/1/100.pdf) and I have a `for` loop that looks like this: ``` for(int i = low; i <= high; ++i) { res...
TypeError: 'float' object is not callable
I am trying to use values from an array in the following equation: ``` for x in range(len(prof)): PB = 2.25 * (1 - math.pow(math.e, (-3.7(prof[x])/2.25))) * (math.e, (0/2.25))) ``` When I run I r...
How to mark a method as obsolete or deprecated?
How do I mark a method as obsolete or deprecated using C#?
- Modified
- 16 Jul at 22:38
Why an inline "background-image" style doesn't work in Chrome 10 and Internet Explorer 8?
Why the [following example](http://jsfiddle.net/dvqU8/13/) shows the image in Firefox 4, but not in Chrome 10 and Internet Explorer 8? HTML: ``` <div style="background-image: url('http://www.mypicx....
- Modified
- 20 Jun at 14:46
CSS: image link, change on hover
I have an image that is a link. I want to show a different image when the user hovers over the link. Currently I'm using this code: ``` <a href="http://twitter.com/me" title="Twitter link"> <div id...
exception in thread 'main' java.lang.NoClassDefFoundError:
The following program is throwing error: ``` public class HelloWorld { public static void main(String args[]) { System.out.println("Hello World!"); } } CLASSPATH C:\Program Files\Ja...
- Modified
- 3 Oct at 18:20
How to log cron jobs?
I want to know how I can see exactly what the cron jobs are doing on each execution. Where are the log files located? Or can I send the output to my email? I have set the email address to send the log...
Clear git local cache
I have a Webstorm project that I was about to commit, but before pressing the commit button in the Git Windows GUI, I remembered that I don't want to commit my `.idea` folder content. So I used the ...
- Modified
- 25 Jan at 23:35
Set proxy through windows command line including login parameters
I want to set a proxy throught the command line, first thing I found out is that you have to - then the basic proxy set would be: ``` netsh winhttp set proxy SERVER:PORT ``` This works nice, but I...
write() versus writelines() and concatenated strings
So I'm learning Python. I am going through the lessons and ran into a problem where I had to condense a great many `target.write()` into a single `write()`, while having a `"\n"` between each user inp...
- Modified
- 22 Feb at 20:35
AWS CLI S3 A client error (403) occurred when calling the HeadObject operation: Forbidden
I'm trying to setup a Amazon Linux AMI(ami-f0091d91) and have a script that runs a copy command to copy from a S3 bucket. ``` aws --debug s3 cp s3://aws-codedeploy-us-west-2/latest/codedeploy-agent.no...
- Modified
- 25 Jan at 11:24
SQL Server convert string to datetime
This is not asking how to convert an arbitrary string to datetime in MSSQL such as [this question](https://stackoverflow.com/questions/207190/sql-server-string-to-date-conversion). I can control the ...
- Modified
- 23 May at 10:31
How to make the HTML link activated by clicking on the <li>?
I have the following markup, ``` <ul id="menu"> <li><a href="#">Something1</a></li> <li><a href="#">Something2</a></li> <li><a href="#">Something3</a></li> <li><a href="...
- Modified
- 9 Apr at 15:45
memory error in python
``` Traceback (most recent call last): File "/run-1341144766-1067082874/solution.py", line 27, in main() File "/run-1341144766-1067082874/solution.py", line 11, in main if len(s[i:j+1]) > 0: MemoryEr...
How to convert Blob to File in JavaScript
I need to upload an image to NodeJS server to some directory. I am using `connect-busboy` node module for that. I had the `dataURL` of the image that I converted to blob using the following code: ``...
- Modified
- 15 Nov at 18:13
Javascript - How to extract filename from a file input control
When a user selects a file in a web page I want to be able to extract just the filename. I did try str.search function but it seems to fail when the file name is something like this: . How can we ex...
- Modified
- 14 May at 12:55
how to check the dtype of a column in python pandas
I need to use different functions to treat numeric columns and string columns. What I am doing now is really dumb: ``` allc = list((agg.loc[:, (agg.dtypes==np.float64)|(agg.dtypes==np.int)]).columns)...
How do I "break" out of an if statement?
I have a if statement that I want to "break" out of. I understand that break is only really for loops. Can anyone help? For those that require an example of what I'm trying to do: ``` if( color ==...
- Modified
- 1 Jul at 14:0
how to convert object into string in php
> [PHP ToString() equivalent](https://stackoverflow.com/questions/28098/php-tostring-equivalent) how to convert object into string in php Actually i am dealing with web service APIs.i want to...
- Modified
- 30 Jun at 13:57
Char Comparison in C
I'm trying to compare two chars to see if one is greater than the other. To see if they were equal, I used `strcmp`. Is there anything similar to `strcmp` that I can use?
- Modified
- 29 Mar at 20:57
Check if string begins with something?
I know that I can do like `^=` to see if an id starts with something, and I tried using that for this, but it didn't work. Basically, I'm retrieving a URL and I want to set a class for an element for ...
- Modified
- 10 Oct at 00:21
How can I remove an element from a list, with lodash?
I have an object that looks like this: ``` var obj = { "objectiveDetailId": 285, "objectiveId": 29, "number": 1, "text": "x", "subTopics": [{ "subTopicId": 1, "num...
- Modified
- 16 Oct at 00:55
VBA check if file exists
I have this code. It is supposed to check if a file exists and open it if it does. It does work if the file exists, and if it doesn't, however, whenever I leave the textbox blank and click the submit ...
- Modified
- 27 Jul at 10:32
How can I make a button have a rounded border in Swift?
I'm building an app using swift in the latest version of Xcode 6, and would like to know how I can modify my button so that it can have a rounded border that I could adjust myself if needed. Once that...
JQuery Event for user pressing enter in a textbox?
Is there any event in Jquery that's triggered only if the user hits the enter button in a textbox? Or any plugin that can be added to include this? If not, how would I write a quick plugin that would ...
- Modified
- 19 Aug at 09:49