How do you set EditText to only accept numeric values in Android?
I have an `EditText` in which I want only integer values to be inserted. Can somebody tell me which property I have to use?
- Modified
- 17 Jul at 00:4
How to check if a string in Python is in ASCII?
I want to I check whether a string is in ASCII or not. I am aware of `ord()`, however when I try `ord('é')`, I have `TypeError: ord() expected a character, but string of length 2 found`. I understood...
Remove or uninstall library previously added : cocoapods
I added an external framework via cocoapods into my iOS application. How can i remove that library from the project?
How to import a csv file into MySQL workbench?
I have a CSV file. It contain 1.4 million rows of data, so I am not able to open that csv file in Excel because its limit is about 1 million rows. Therefore, I want to import this file in MySQL work...
How to style HTML5 range input to have different color before and after slider?
![enter image description here](https://i.stack.imgur.com/yTcfB.png) I want the left side to be green and the right side to be gray. As pictured above would be PERFECT. Preferably a pure CSS solution...
twig: IF with multiple conditions
It seem I have problem with a twig if statement. ``` {%if fields | length > 0 || trans_fields | length > 0 -%} ``` The error is: ``` Unexpected token "punctuation" of value "|" ("name" expected) i...
- Modified
- 5 Oct at 00:43
SVG Positioning
I'm having a play with SVG and am having a few problems with positioning. I have a series of shapes which are contained in the `g` group tag. I was hoping to use it like a container, so I could set it...
'dict' object has no attribute 'has_key'
While traversing a graph in Python, a I'm receiving this error: > 'dict' object has no attribute 'has_key' Here is my code: ``` def find_path(graph, start, end, path=[]): path = path + [start] ...
- Modified
- 1 Aug at 16:34
How can I create a text box for a note in markdown?
I am writing a document in markdown. I am using the wonderful pandoc to create docx and tex files from the markdown source. I would like to have a textbox for tips and notes to readers the way program...
How to convert a string Date to long millseconds
I have a date inside a string, something like "12-December-2012". How can I convert this into milliseconds (long)?
- Modified
- 22 Nov at 07:55
Convert a matrix to a 1 dimensional array
I have a matrix (32X48). How can I convert the matrix into a single dimensional array?
How does the compilation/linking process work?
How does the compilation and linking process work? [Stack Overflow's C++ FAQ](https://stackoverflow.com/questions/tagged/c++-faq)[the posting on meta that started all this](https://meta.stackexchange....
- Modified
- 26 Mar at 13:0
Convert pyQt UI to python
Is there a way to convert a ui formed with qtDesigner to a python version to use without having an extra file? I'm using Maya for this UI, and converting this UI file to a readable python version to ...
What is a semaphore?
A semaphore is a programming concept that is frequently used to solve multi-threading problems. My question to the community: What is a semaphore and how do you use it?
- Modified
- 29 Aug at 15:58
Creating folders inside a GitHub repository without using Git
I want to add a new folder to my newly created GitHub repository without installing the Git setup for (Mac, Linux, and Windows). Is it possible to do so? I can't have Git all the time with me when I ...
- Modified
- 6 Oct at 13:1
Using .NET, how can you find the mime type of a file based on the file signature not the extension
I am looking for a simple way to get a mime type where the file extension is incorrect or not given, something similar to [this question](https://stackoverflow.com/questions/51438/getting-a-files-mime...
- Modified
- 23 May at 10:31
How to create Drawable from resource
I have an image `res/drawable/test.png` (R.drawable.test). I want to pass this image to a function which accepts `Drawable`, e.g. `mButton.setCompoundDrawables()`. So how can I convert an image resou...
Android Studio - Gradle sync project failed
In Android Studio, I simply created a new project, and it says that: `Gradle project sync failed. Basic functionality will not work properly.` I have searched the web and tried everything, but not...
- Modified
- 3 Mar at 15:32
What is the difference between include and require in Ruby?
My question is similar to "[What is the difference between include and extend in Ruby?](https://stackoverflow.com/questions/156362/what-is-the-difference-between-include-and-extend-in-ruby)". What's ...
Does Java SE 8 have Pairs or Tuples?
I am playing around with lazy functional operations in Java SE 8, and I want to `map` an index `i` to a pair / tuple `(i, value[i])`, then `filter` based on the second `value[i]` element, and finally ...
- Modified
- 23 May at 11:54
Retrieve the commit log for a specific line in a file?
Is there any way to get git to give you a commit log for just commits that touched a particular in a file? Like `git blame`, but `git blame` will show you the LAST commit that touched a particular l...
- Modified
- 21 Oct at 08:26
How to find out when an Oracle table was updated the last time
Can I find out when the last INSERT, UPDATE or DELETE statement was performed on a table in an Oracle database and if so, how? A little background: The Oracle version is 10g. I have a batch applicati...
- Modified
- 5 Nov at 13:53
Extracting Path from OpenFileDialog path/filename
I'm writing a little utility that starts with selecting a file, and then I need to select a folder. I'd like to default the folder to where the selected file was. `OpenFileDialog.FileName` returns th...
How to cast List<Object> to List<MyClass>
This does not compile, any suggestion appreciated. ``` ... List<Object> list = getList(); return (List<Customer>) list; ``` Compiler says: cannot cast `List<Object>` to `List<Customer>`
How to deserialize a JObject to .NET object
I happily use the [Newtonsoft JSON library](http://james.newtonking.com/pages/json-net.aspx). For example, I would create a `JObject` from a .NET object, in this case an instance of Exception (might o...
- Modified
- 8 Jan at 14:41