Questions

How can I delete the current Git branch?

I have a branch called `Test_Branch`. When I try to delete it using the recommend method, I get the following error: > Cannot delete branch 'Test_Branch' checked out at '[directory location]'. I get n...

21 Feb at 19:7

Error message "No exports were found that match the constraint contract name"

This morning I faced a problem while opening my Visual Studio solution, and when I tried to run it, it said: > No exports were found that match the constraint contract name How can I fix this proble...

7 Oct at 08:8

C++ cout hex values?

I want to do: ``` int a = 255; cout << a; ``` and have it show FF in the output, how would I do this?

1 Feb at 07:17

How to check whether mod_rewrite is enable on server?

Currently I am using the hosting with server. Hosting says `mod_rewrite` is enabled but I can't get my script working there. Whenever I try to access the URL, it returns page. I put the same codes ...

How to use format() on a moment.js duration?

Is there any way I can use the [moment.js](http://momentjs.com/) `format` method on duration objects? I can't find it anywhere in the docs and it doesn't seen to be an attribute on duration objects. ...

28 Dec at 13:43

How to use BigInteger?

I have this piece of code, which is not working: ``` BigInteger sum = BigInteger.valueOf(0); for(int i = 2; i < 5000; i++) { if (isPrim(i)) { sum.add(BigInteger.valueOf(i)); } } ``` ...

28 Aug at 09:36

Rails 4: List of available datatypes

Where can I find a list of data types that can be used in Ruby on Rails 4? Such as - `text`- `string`- `integer`- `float`- `date` I keep learning about new ones and I'd love to have a list I could...

Can "git pull --all" update all my local branches?

I often have at least 3 remote branches: master, staging and production. I have 3 local branches that track those remote branches. Updating all my local branches is tedious: ``` git fetch --all git ...

15 Jun at 23:39

How can I combine two HashMap objects containing the same types?

I have two `HashMap` objects defined like so: ``` HashMap<String, Integer> map1 = new HashMap<String, Integer>(); HashMap<String, Integer> map2 = new HashMap<String, Integer>(); ``` I also have a t...

31 Jul at 16:32

How to install multiple python packages at once using pip

I know it's an easy way of doing it but i didn't find it neither here nor on google. So i was curious if there is a way to install multiple packages using pip. Something like: ``` pip install pro...

31 Mar at 14:31

OrderBy descending in Lambda expression?

I know in normal Linq grammar, `orderby xxx descending` is very easy, but how do I do this in Lambda expression?

26 Jun at 15:17

How can I percent-encode URL parameters in Python?

If I do ``` url = "http://example.com?p=" + urllib.quote(query) ``` 1. It doesn't encode / to %2F (breaks OAuth normalization) 2. It doesn't handle Unicode (it throws an exception) Is there a bett...

19 Nov at 15:44

Check if a string contains an element from a list (of strings)

For the following block of code: ``` For I = 0 To listOfStrings.Count - 1 If myString.Contains(lstOfStrings.Item(I)) Then Return True End If Next Return False ``` The output is: ...

When should I use a struct rather than a class in C#?

When should you use struct and not class in C#? My conceptual model is that structs are used in times when the item is . A way to logically hold them all together into a cohesive whole. I came acros...

4 Jun at 09:17

What is the best data type to use for money in C#?

What is the best data type to use for money in C#?

14 Oct at 21:17

Failed to load resource: net::ERR_INSECURE_RESPONSE

IS there a way to trick the server so I don't get this error: Content was blocked because it was not signed by a valid security certificate. I'm pulling an iframe of an html website into another w...

How to stop docker under Linux

My version of OS `Ubuntu 16.04`. I want to stop docker, so I run in the terminal: ``` sudo systemctl stop docker ``` But this commands doesn't help me: ``` gridsim1103 ~: ps ax | grep docker 1134...

24 Apr at 01:41

How to access mysql result set data with a foreach loop

I'm developing a php app that uses a database class to query MySQL. The class is here: [http://net.tutsplus.com/tutorials/php/real-world-oop-with-php-and-mysql/](http://net.tutsplus.com/tutorials/php/...

30 May at 23:8

RegExp in TypeScript

How can I implement RegExp in TypeScript? My example: ``` var trigger = "2" var regex = new RegExp('^[1-9]\d{0,2}$', trigger); // where I have exception in Chrome console ```

4 Aug at 02:10

How to make the script wait/sleep in a simple way in unity

How can I put a sleep function between the `TextUI.text = ....`, to wait 3 seconds between each phrase? ``` public Text GuessUI; public Text TextUI; [...truncated...] TextUI.text = "Welcome to Num...

10 Sep at 08:44

Is there a max array length limit in C++?

Is there a max length for an array in C++? Is it a C++ limit or does it depend on my machine? Is it tweakable? Does it depend on the type the array is made of? Can I break that limit somehow or do I...

18 Dec at 22:26

HTML/CSS font color vs span style

What should I use? ``` <span style="color:red">test</span> ``` or ``` <font color="red">test</font> ``` and why?

15 Nov at 08:27

Test if a command outputs an empty string

How can I test if a command outputs an empty string?

10 Sep at 18:1

What is the difference between __init__ and __call__?

I want to know the difference between `__init__` and `__call__` methods. For example: ``` class test: def __init__(self): self.a = 10 def __call__(self): b = 20 ```

Difference between .keystore file and .jks file

I have tried to find the difference between `.keystore` files and `.jks` files, yet I could not find it. I know `jks` is for "Java keystore" and both are a way to store key/value pairs. Is there any ...

22 Jun at 16:4