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...
- Modified
- 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...
- Modified
- 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?
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 ...
- Modified
- 12 Feb at 04:0
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. ...
- Modified
- 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)); } } ``` ...
- Modified
- 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...
- Modified
- 24 Feb at 08:48
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 ...
- Modified
- 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...
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...
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?
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...
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: ...
- Modified
- 14 Sep at 15:32
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...
What is the best data type to use for money in C#?
What is the best data type to use for money in C#?
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...
- Modified
- 8 Jun at 17:48
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...
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/...
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 ```
- Modified
- 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...
- Modified
- 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...
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?
Test if a command outputs an empty string
How can I test if a command outputs an empty string?
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 ```
- Modified
- 29 Nov at 00:0
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 ...