Is there a printf converter to print in binary format?
I can print with `printf` as a hex or octal number. Is there a format tag to print as binary, or arbitrary base? I am running gcc. ``` printf("%d %x %o\n", 10, 10, 10); //prints "10 A 12\n" printf("%...
How do I display a text file content in CMD?
I want to display the content of a text file in a CMD window. In addition, I want to see the new lines that added to file, like `tail -f` command in Unix.
- Modified
- 4 Nov at 08:49
Global variables in Java
How do you define Global variables in Java ?
- Modified
- 6 Jun at 14:3
How to append text to a div element?
I’m using AJAX to append data to a `<div>` element, where I fill the `<div>` from JavaScript. How can I append new data to the `<div>` without losing the previous data found in it?
- Modified
- 20 Jan at 21:7
How can I generate an MD5 hash in Java?
Is there any method to generate MD5 hash of a string in Java?
How to set HTTP header to UTF-8 using PHP which is valid in W3C validator
I have several [PHP](http://en.wikipedia.org/wiki/PHP) pages echoing out various things into [HTML](http://en.wikipedia.org/wiki/HTML) pages with the following code. ``` <meta http-equiv="Content-typ...
- Modified
- 15 Aug at 11:5
How do I convert a datetime to date?
How do I convert a `datetime.datetime` object (e.g., the return value of `datetime.datetime.now())` to a `datetime.date` object in Python?
What does the explicit keyword mean?
What does the `explicit` keyword mean in C++?
- Modified
- 24 Jan at 22:44
How to extract the substring between two markers?
Let's say I have a string `'gfgfdAAA1234ZZZuijjk'` and I want to extract just the `'1234'` part. I only know what will be the few characters directly before `AAA`, and after `ZZZ` the part I am inter...
How can I increment a date by one day in Java?
I'm working with a date in this format: `yyyy-mm-dd`. How can I increment this date by one day?
How to run a hello.js file in Node.js on windows?
I am trying to run a hello world program written in javascript in a separate file named hello.js Currently running windows version of node.js. The code runs perfectly in console window but . ``` C:...
Are multi-line strings allowed in JSON?
Is it possible to have multi-line strings in JSON? It's mostly for visual comfort so I suppose I can just turn word wrap on in my editor, but I'm just kinda curious. I'm writing some data files in JSO...
How to use radio on change event?
I have two radio button on change event i want change button How it is possible? My Code ``` <input type="radio" name="bedStatus" id="allot" checked="checked" value="allot">Allot <input type="radio...
Check whether a String is not Null and not Empty
How can I check whether a string is not `null` and not empty? ``` public void doStuff(String str) { if (str != null && str != "**here I want to check the 'str' is empty or not**") { /*...
- Modified
- 2 Dec at 12:21
Replace a character at a specific index in a string?
I'm trying to replace a character at a specific index in a string. What I'm doing is: ``` String myName = "domanokz"; myName.charAt(4) = 'x'; ``` This gives an error. Is there any method to do t...
How to change legend title in ggplot
I have the following plot like below. It was created with this command: ``` library(ggplot2) df <- data.frame(cond = factor(rep(c("A", "B"), each = 200)), rating = c(rnorm(200), rno...
How to copy Docker images from one host to another without using a repository
How do I transfer a Docker image from one machine to another one without using a repository, no matter private or public? I create my own image in VirtualBox, and when it is finished I try to deploy ...
- Modified
- 13 Mar at 11:3
api-ms-win-crt-runtime-l1-1-0.dll is missing when opening Microsoft Office file
I am facing this .dll library missing error: > This programme can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing. Try to reinstall this. When I try to open an Microsoft Office file. ...
- Modified
- 3 Nov at 20:23
Converting string to Date and DateTime
If I have a PHP string in the format of `mm-dd-YYYY` (for example, 10-16-2003), how do I properly convert that to a `Date` and then a `DateTime` in the format of `YYYY-mm-dd`? The only reason I ask fo...
A potentially dangerous Request.Form value was detected from the client
Every time a user posts something containing `<` or `>` in a page in my web application, I get this exception thrown. I don't want to go into the discussion about the smartness of throwing an excepti...
- Modified
- 16 Jun at 22:24
Authenticate with GitHub using a token
I am trying to authenticate with GitHub using a personal access token. In the help files at GitHub, it states to use the cURL method to authenticate ([Creating a personal access token](https://help.gi...
- Modified
- 31 Aug at 12:19
How can I use threading in Python?
I am trying to understand threading in Python. I've looked at the documentation and examples, but quite frankly, many examples are overly sophisticated and I'm having trouble understanding them. How d...
- Modified
- 29 Nov at 00:30
pg_config executable not found
I am having trouble installing psycopg2. I get the following error when I try to `pip install psycopg2`: ``` Error: pg_config executable not found. Please add the directory containing pg_config to t...
Return multiple values in JavaScript?
I am trying to return two values in . Is this possible? ``` var newCodes = function() { var dCodes = fg.codecsCodes.rs; var dCodes2 = fg.codecsCodes2.rs; return dCodes, dCodes2; }; ``...
- Modified
- 17 Apr at 18:9
Run a Docker image as a container
After building a Docker image from a `dockerfile`, I see the image was built successfully, but what do I do with it? Shouldn't i be able to run it as a container?
- Modified
- 26 Aug at 08:50