After submitting a POST form open a new window showing the result
[JavaScript post request like a form submit](https://stackoverflow.com/q/133925) shows you how to submit a form that you create via POST in JavaScript. Below is my modified code. ``` var form = docum...
- Modified
- 17 Aug at 21:46
Spring Boot default H2 jdbc connection (and H2 console)
I am simply trying to see the H2 database content for an embedded H2 database which spring-boot creates when I don't specify anything in my `application.properties` and start with mvn spring:run. I ca...
- Modified
- 30 Oct at 08:51
ERROR 1049 (42000): Unknown database 'mydatabasename'
I am trying to restore database from .sql file , i have created the database in phpmyadmin and also using the create if not exist command in the .sql file which i am restoring to the database and both...
- Modified
- 31 Jan at 15:40
Apache Proxy: No protocol handler was valid
I am trying to proxy a subdirectory to another server. My httpd.conf: ``` RewriteEngine On ProxyPreserveHost On RewriteRule .*subdir/ https://anotherserver/subdir/ [P] ``` The problem is that Apach...
- Modified
- 25 Jan at 09:5
printf format specifiers for uint32_t and size_t
I have the following ``` size_t i = 0; uint32_t k = 0; printf("i [ %lu ] k [ %u ]\n", i, k); ``` I get the following warning when compiling: ``` format ‘%lu’ expects type ‘long unsigned int’, b...
On design patterns: When should I use the singleton?
The glorified global variable - becomes a gloried global class. Some say breaking object-oriented design. Give me scenarios, other than the good old logger where it makes sense to use the singleton. ...
- Modified
- 25 Feb at 14:5
How do I set and access attributes of a class?
Suppose I have this code: ``` class Example(object): def the_example(self): itsProblem = "problem" theExample = Example() print(theExample.itsProblem) ``` When I try it, I get an error t...
- Modified
- 13 Feb at 18:15
How to check if C string is empty
I'm writing a very small program in C that needs to check if a certain string is empty. For the sake of this question, I've simplified my code: ``` #include <stdio.h> #include <string> int main() { ...
Timestamp to human readable format
Well I have a strange problem while convert from unix timestamp to human representation using javascript Here is timestamp ``` 1301090400 ``` This is my javascript ``` var date = new Date(timesta...
- Modified
- 24 Mar at 09:12
Renaming a branch in GitHub
I just renamed my local branch using ``` git branch -m oldname newname ``` but this only renames the local version of the branch. How can I rename the one on GitHub?
Allow docker container to connect to a local/host postgres database
I've recently been playing around with Docker and QGIS and have installed a container following the instructions in [this tutorial](http://kartoza.com/qgis-desktop-in-docker/). Everything works great...
- Modified
- 26 Jun at 14:52
Nullable type as a generic parameter possible?
I want to do something like this : ``` myYear = record.GetValueOrNull<int?>("myYear"), ``` Notice the nullable type as the generic parameter. Since the `GetValueOrNull` function could return null...
Css transition from display none to display block, navigation with subnav
This is what I have [jsFiddle link](https://jsfiddle.net/vour8ad9/) ``` nav.main ul ul { position: absolute; list-style: none; display: none; opacity: 0; visibility: hidden; p...
Java Delegates?
Does the Java language have delegate features, similar to how C# has support for delegates?
Java JTable setting Column Width
I have a JTable in which I set the column size as follows: ``` table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); table.getColumnModel().getColumn(0).setPreferredWidth(27); table.getColumnModel().getCo...
How do I convert between ISO-8859-1 and UTF-8 in Java?
Does anyone know how to convert a string from ISO-8859-1 to UTF-8 and back in Java? I'm getting a string from the web and saving it in the RMS (J2ME), but I want to preserve the special chars and get...
- Modified
- 16 Mar at 21:47
Replace spaces with dashes and make all letters lower-case
I need to reformat a string using jQuery or vanilla JavaScript Let’s say we have `"Sonic Free Games"`. I want to convert it to `"sonic-free-games"`. So whitespaces should be replaced by dashes and ...
- Modified
- 2 Mar at 13:35
Checking for the correct number of arguments
How do i check for the correct number of arguments (one argument). If somebody tries to invoke the script without passing in the correct number of arguments, and checking to make sure the command line...
How to switch between hide and view password
Is there a clever way to let the user switch between hide and view password in an android EditText? A number of PC based apps let the user do this.
Call php function from JavaScript
Is there a way I can run a php function through a JS function? something like this: ``` <script type="text/javascript"> function test(){ document.getElementById("php_code").innerHTML="<?php query("...
- Modified
- 23 Jul at 15:9
Visual Studio Code PHP Intelephense Keep Showing Not Necessary Error
After the latest update of PHP Intelephense that I get today, the intelephense keep showing an error for an undefined symbol for my route (and other class too), there is no error like this before and ...
- Modified
- 3 Dec at 03:42
Tracing XML request/responses with JAX-WS
Is there an easy way (aka: not using a proxy) to get access to the raw request/response XML for a webservice published with JAX-WS reference implementation (the one included in JDK 1.5 and better) ? B...
- Modified
- 22 Dec at 11:33
How to remove "onclick" with JQuery?
PHP code: ``` <a id="a$id" onclick="check($id,1)" href="javascript:void(0)" class="black">Qualify</a> ``` I want to remove the `onclick="check($id,1)` so the link cannot be clicked or "`check($id,...
- Modified
- 11 Apr at 21:44
/** and /* in Java Comments
What's the difference between ``` /** * comment * * */ ``` and ``` /* * * comment * */ ``` in Java? When should I use them?
Error 1053 the service did not respond to the start or control request in a timely fashion
I have created and installed a service a couple of times. Initially it was working fine, but after some changes in the service Code it start giving the error when I restart the service in Services.msc...
- Modified
- 10 Nov at 20:22