Questions

Email Address Validation in Android on EditText

How can we perform `Email Validation` on `edittext` in `android` ? I have gone through google & SO but I didn't find out a simple way to validate it.

Git Push error: refusing to update checked out branch

I have solved some merge conflicts, committed then tried to Push my changes and received the following error: ``` c:\Program Files (x86)\Git\bin\git.exe push --recurse-submodules=check "origin" maste...

26 Mar at 04:27

Illegal string offset Warning PHP

I get a strange PHP error after updating my php version to 5.4.0-3. I have this array: ``` Array ( [host] => 127.0.0.1 [port] => 11211 ) ``` When I try to access it like this I get strange...

23 Aug at 14:44

rvm installation not working: "RVM is not a function"

I just installed RVM, but can't make it work. I have such line at the end of my `.profile` file: ``` [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" ``` I tried to run `source .prof...

17 Feb at 22:59

How can I get a side-by-side diff when I do "git diff"?

When I type `git diff`, I'd like to see a side-by-side diff, like with `diff -y`, or like to display the diff in an interactive diff tool like `kdiff3`. How can this be done?

6 May at 08:23

How to reset Jenkins security settings from the command line?

Is there a way to reset all (or just disable the security settings) from the command line without a user/password as I have managed to completely lock myself out of `Jenkins`?

23 Feb at 16:17

How to add spacing between UITableViewCell

Is there any way to add spacing between `UITableViewCell`? I have created a table and each cell only contain an image. The image is assigned to the cell like this: ``` cell.imageView.image = [myImag...

6 Nov at 04:58

How to add a string in a certain position?

Is there any function in Python that I can use to insert a value in a certain position of a string? Something like this: `"3655879ACB6"` then in position 4 add `"-"` to become `"3655-879ACB6"`

17 Sep at 15:55

XML Schema minOccurs / maxOccurs default values

I'm wondering how the XML Schema specification handles these cases: ``` <xsd:element minOccurs="1" name="asdf"/> ``` No maxOccurs given -> Is this the cardinality [1..1]? ``` <xsd:element minOccur...

28 Jan at 07:22

How to store printStackTrace into a string

How can I get the `e.printStackTrace()` and store it into a `String` variable? I want to use the string generated by `e.printStackTrace()` later in my program. I'm still new to Java so I'm not too fa...

27 Jan at 04:3

INSERT ... ON DUPLICATE KEY (do nothing)

I have a table with a unique key for two columns: ``` CREATE TABLE `xpo`.`user_permanent_gift` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , `fb_user_id` INT UNSIGNED NOT NULL , `gift_id` INT UNSIGN...

27 Dec at 15:48

How do I view the list of functions a Linux shared library is exporting?

I want to view the exported functions of a shared library on Linux. What command allows me to do this? (On Windows I use the program depends)

22 Dec at 23:44

Getting assembly name

C#'s exception class has a source property which is set to the name of the assembly by default. Is there another way to get this exact string (without parsing a different string)? I have tried the ...

20 Apr at 19:21

A valid provisioning profile for this executable was not found for debug mode

I am getting this error while I am trying to debug my app on device. I created development provisioning profile as it is mentioned at the developer portal. My development device is selected in the pr...

How to get a reversed list view on a list in Java?

I want to have a reversed list view on a list (in a similar way than `List#sublist` provides a sublist view on a list). Is there some function which provides this functionality? I don't want to make ...

22 Sep at 10:17

Are string.Equals() and == operator really same?

Are they really same? Today, I ran into this problem. Here is the dump from the Immediate Window: ``` ?s "Category" ?tvi.Header "Category" ?s == tvi.Header false ?s.Equals(tvi.Header) true ?s...

18 Jan at 15:16

What are some good ways to manage a changelog using Git?

I've been using Git for a while now, and I recently started using it to tag my releases so that I could more easily keep track of changes and be able to see which version each of our clients is runnin...

17 Apr at 04:25

Convert String to Uri

How can I convert a String to a Uri in Java (Android)? i.e.: ``` String myUrl = "http://stackoverflow.com"; ```

30 Jul at 12:41

How to write URLs in Latex?

How do you write a URL in Latex? The subscripts and everything else make the font look very strange when it compiles.

3 May at 18:31

Can the Unix list command 'ls' output numerical chmod permissions?

Is it possible when listing a directory to view numerical Unix permissions such as `644`, rather than the symbolic output `-rw-rw-r--` ? Thanks.

29 Dec at 06:44

Linq style "For Each"

Is there any Linq style syntax for "For each" operations? For instance, add values based on one collection to another, already existing one: ``` IEnumerable<int> someValues = new List<int>() { 1, 2,...

31 Jan at 07:11

In log4j, does checking isDebugEnabled before logging improve performance?

I am using in my application for logging. Previously I was using debug call like: ``` logger.debug("some debug text"); ``` but some links suggest that it is better to check `isDebugEnabled()` fi...

8 Jun at 16:3

C#: Printing all properties of an object

Is there a method built into .NET that can write all the properties and such of an object to the console? One could make use of reflection of course, but I'm curious if this already exists...especiall...

3 Aug at 18:12

Check a collection size with JSTL

How can I check the size of a collection with JSTL? Something like: ``` <c:if test="${companies.size() > 0}"> </c:if> ```

20 Mar at 11:59

Using Html.ActionLink to call action on different controller

I am trying to navigate between controllers using `ActionLink`. I will tell my problem with an example. I am on Index view of Hat controller, and I am trying to use below code to create a link to Det...

7 Oct at 13:38