How to send POST request?
I found this script online: ``` import httplib, urllib params = urllib.urlencode({'number': 12524, 'type': 'issue', 'action': 'show'}) headers = {"Content-type": "application/x-www-form-urlencoded", ...
- Modified
- 8 Jul at 08:3
Create code first, many to many, with additional fields in association table
I have this scenario: ``` public class Member { public int MemberID { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public virtual ICollecti...
- Modified
- 12 Feb at 22:33
Looking to understand the iOS UIViewController lifecycle
Could you explain me the correct manner to manage the `UIViewController` lifecycle? In particular, I would like to know how to use `Initialize`, `ViewDidLoad`, `ViewWillAppear`, `ViewDidAppear`, `Vie...
- Modified
- 21 Feb at 16:29
Difference between getAttribute() and getParameter()
What is the difference between `getAttribute()` and `getParameter()` methods within `HttpServletRequest` class?
How do I update a Python package?
I'm running Ubuntu 9:10 and a package called M2Crypto is installed (version is 0.19.1). I need to download, build and install the latest version of the M2Crypto package (0.20.2). The 0.19.1 package ...
- Modified
- 22 May at 09:17
Not class selector in jQuery
Is there a simple selector expression to not select elements with a specific class? ``` <div class="first-foo" /> <div class="first-moo" /> <div class="first-koo" /> <div class="first-bar second-foo"...
- Modified
- 6 Jan at 10:51
Explode PHP string by new line
Simple, right? Well, this isn't working :-\ ``` $skuList = explode('\n\r', $_POST['skuList']); ```
- Modified
- 22 Oct at 13:46
Add leading zeroes/0's to existing Excel values to certain length
There are many, many questions and quality answers on SO regarding how to prevent leading zeroes from getting stripped when importing to or exporting from Excel. However, I already have a spreadsheet...
Is there any boolean type in Oracle databases?
Is there any Boolean type in Oracle databases, similar to the `BIT` datatype in Ms SQL Server?
- Modified
- 4 Sep at 04:5
Retrieve version from maven pom.xml in code
What is the simplest way to retrieve version number from maven's pom.xml in code, i.e., programatically?
How to get the previous URL in JavaScript?
Is there any way to get the previous URL in JavaScript? Something like this: ``` alert("previous url is: " + window.history.previous.href); ``` Is there something like that? Or should I just stor...
- Modified
- 13 Nov at 12:25
Difference between Java SE/EE/ME?
Which one should I install when I want to start learning Java? I'm going to start with some basics, so I will write simple programs that create files, directories, edit XML files and so on, nothing to...
- Modified
- 17 Oct at 11:8
The provided URI scheme 'https' is invalid; expected 'http'. Parameter name: via
I am trying to make a WCF service over basicHttpBinding to be used over https. Here's my web.config: ``` <!-- language: xml --> <service behaviorConfiguration="MyServices.PingResultServiceBehavior" ...
Retrieving the output of subprocess.call()
How can I get the output of a process run using `subprocess.call()`? Passing a `StringIO.StringIO` object to `stdout` gives this error: ``` Traceback (most recent call last): File "<stdin>", line ...
- Modified
- 16 Jan at 19:31
Increase heap size in Java
I am working on a Windows 2003 server (64-bit) with 8 GB RAM. How can I increase the heap memory maximum? I am using the `-Xmx1500m` flag to increase the heap size to 1500 Mb. Can I increase the heap ...
- Modified
- 22 Mar at 15:10
What is a unix command for deleting the first N characters of a line?
For example, I might want to: ``` tail -f logfile | grep org.springframework | <command to remove first N characters> ``` I was thinking that `tr` might have the ability to do this but I'm not sure...
How to hide 'Back' button on navigation bar on iPhone?
I added a navigation control to switch between views in my app. But some of the views shouldn't have 'Back' (the previous title) button. Any ideas about how to hide the back button?
- Modified
- 9 May at 15:45
Is there a way to access an iteration-counter in Java's for-each loop?
Is there a way in Java's for-each loop ``` for(String s : stringArray) { doSomethingWith(s); } ``` to find out how often the loop has already been processed? Aside from using the old and well-kn...
Should I use SVN or Git?
I am starting a new distributed project. Should I use SVN or Git, and why?
- Modified
- 10 Apr at 23:34
Does C++ support 'finally' blocks? (And what's this 'RAII' I keep hearing about?)
Does C++ support '[finally](http://java.sun.com/docs/books/tutorial/essential/exceptions/finally.html)' blocks? What is the [RAII idiom](http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initializ...
Xcode error: Failed to prepare device for development
I have updated to Xcode 12.3 beta. device version is 14.2, but Xcode complaining: > Errors were encountered while preparing your device for development. Please check the Devices and Simulators Window....
Unable to merge dex
I have Android Studio Beta. I created a new project with compile my old modules but when I tried launching the app it did not launch with the message: ``` Error:Execution failed for task ':app:transf...
- Modified
- 13 Nov at 22:36
Difference between using gradlew and gradle
What is the difference between using `gradlew` and `gradle` or are they the same?
ReactNative: how to center text?
How to center Text in ReactNative both in horizontal and vertical? I have an example application in rnplay.org where and is not working: [https://rnplay.org/apps/AoxNKQ](https://rnplay.org/apps/Ao...
- Modified
- 7 May at 11:55
Changing EditText bottom line color with appcompat v7
I am using appcompat v7 to get the look consistent on Android 5 and less. It works rather well. However I cannot figure out how to change the bottom line color and the accent color for EditTexts. Is i...
- Modified
- 4 Jun at 21:34