Is there a standardized method to swap two variables in Python?
In Python, I've seen two variable values swapped using this syntax: ``` left, right = right, left ``` Is this considered the standard way to swap two variable values or is there some other means by...
- Modified
- 19 Sep at 12:14
Access HTTP response as string in Go
I'd like to parse the response of a web request, but I'm getting trouble accessing it as string. ``` func main() { resp, err := http.Get("http://google.hu/") if err != nil { // handl...
- Modified
- 30 Jul at 11:58
Why am I getting tree conflicts in Subversion?
I had a feature branch of my trunk and was merging changes from my trunk into my branch periodically and everything was working fine. Today I went to merge the branch back down into the trunk and any ...
- Modified
- 3 Dec at 08:49
Location of sqlite database on the device
I've created a sqlite database programmatically with the default way of extending `SQLiteOpenHelper` and overriding `onCreate()`. This way the db gets created on the fly when needed. I'd like to chec...
Play multiple CSS animations at the same time
How can I have two CSS animations playing ? - - - Example Code: ``` .image { position: absolute; top: 50%; left: 50%; width: 120px; height: 120px; margin:-60px 0 0 -60px; ...
- Modified
- 18 Nov at 04:0
Change color and appearance of drop down arrow
I want to change the default appearance of the arrow of a dropdown list so that looks the same across browsers. Is there a way to override the default look and feel of the drop down arrow using CSS or...
- Modified
- 4 Mar at 16:57
Plotting with ggplot2: "Error: Discrete value supplied to continuous scale" on categorical y-axis
The plotting code below gives `Error: Discrete value supplied to continuous scale` What's wrong with this code? It works fine until I try to change the scale so the error is there... I tried to figur...
- Modified
- 20 May at 02:20
How to remove multiple items from a list in just one statement?
In python, I know how to remove items from a list: ``` item_list = ['item', 5, 'foo', 3.14, True] item_list.remove('item') item_list.remove(5) ``` The above code removes the values 5 and 'item' from ...
- Modified
- 15 Jun at 23:21
Hiding a password in a python script (insecure obfuscation only)
I have got a python script which is creating an ODBC connection. The ODBC connection is generated with a connection string. In this connection string I have to include the username and password for th...
did you register the component correctly? For recursive components, make sure to provide the "name" option
I configured `'i-tab-pane': Tabpane` but report error,the code is bellow: ``` <template> <div class="page-common"> <i-tabs> <i-tab-pane label="wx"> content </i-tab-pane> ...
- Modified
- 3 Oct at 01:18
Python: Making a beep noise
I'm trying to get the program to give me a beeping noise. I'm on a windows machine. I've looked at [http://docs.python.org/library/winsound.html](http://docs.python.org/library/winsound.html) But not...
- Modified
- 24 Jul at 13:52
Android selector & text color
I want a simple `TextView` to behave the way `simple_list_item_1` in a `ListView` does. Here's the XML: ``` <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_hei...
- Modified
- 15 Oct at 12:16
Does MS SQL Server's "between" include the range boundaries?
For instance can ``` SELECT foo FROM bar WHERE foo BETWEEN 5 AND 10 ``` select 5 and 10 or they are excluded from the range?
- Modified
- 8 Aug at 11:57
JavaScript Chart Library
Would anyone recommend a particular JavaScript charting library - specifically one that doesn't use flash at all?
- Modified
- 23 Sep at 09:4
Storing data into list with class
I have the following class: ``` public class EmailData { public string FirstName{ set; get; } public string LastName { set; get; } public string Location{ set; get; } } ``` I then did t...
Best way to check if mysql_query returned any results?
I'm looking for the best way to check and see if any results were returned in a query. I feel like I write this part of code a lot and sometimes I get errors, and sometimes I don't. For example, I run...
Convert string[] to int[] in one line of code using LINQ
I have an array of integers in string form: ``` var arr = new string[] { "1", "2", "3", "4" }; ``` I need to an array of 'real' integers to push it further: ``` void Foo(int[] arr) { .. } ``` I ...
- Modified
- 17 Nov at 21:54
Uint8Array to string in Javascript
I have some UTF-8 encoded data living in a range of Uint8Array elements in Javascript. Is there an efficient way to decode these out to a regular javascript string (I believe Javascript uses 16 bit Un...
- Modified
- 20 Jan at 10:13
Setting selection to Nothing when programming Excel
When I create a graph after using range.copy and range.paste it leaves the paste range selected, and then when I create a graph a few lines later, it uses the selection as the first series in the plot...
OrderBy pipe issue
I'm not able to translate this code from Angualr 1 to Angular 2: ``` ng-repeat="todo in todos | orderBy: 'completed'" ``` This is what i've done following the Thierry Templier's answer: ``` ...
- Modified
- 21 Jun at 22:10
Visual Studio 2017 - Git failed with a fatal error
I am using Visual Studio 2017 Community Edition (CE), and I have signed into my Microsoft account and I am connected to VSTS. I can see all my projects and repositories, but when I attempt to pull/fet...
- Modified
- 12 Jun at 05:0
NPM install fails with node-gyp
We are having problems running on our project. A certain file cannot be found : ``` fatal error C1083: Cannot open include file: 'windows.h' ``` It appears to be coming from the module : > c:\Progr...
- Modified
- 12 Dec at 15:42
What generates the "text file busy" message in Unix?
What operation generates the error "text file busy"? I am unable to tell exactly. I think it is related to the fact that I'm creating a temporary python script (using tempfile) and using execl from i...
- Modified
- 27 May at 02:25
Split string in JavaScript and detect line break
I have a small function I found that takes a string from a `textarea` and then puts it into a `canvas` element and wraps the text when the line gets too long. But it doesn't detect line breaks. This i...
- Modified
- 14 May at 19:42