How to secure database passwords in PHP?
When a PHP application makes a database connection it of course generally needs to pass a login and password. If I'm using a single, minimum-permission login for my application, then the PHP needs to ...
Trying to use fetch and pass in mode: no-cors
I can hit this endpoint, `http://catfacts-api.appspot.com/api/facts?number=99` via Postman and it returns `JSON` Additionally I am using create-react-app and would like to avoid setting up any server...
- Modified
- 22 Jun at 08:59
How to watch and reload ts-node when TypeScript files change
I'm trying to run a dev server with TypeScript and an Angular application without transpiling ts files every time. What I found is that I run `.ts` files with `ts-node` but I want also to watch `.ts`...
- Modified
- 5 Jan at 21:28
Select objects based on value of variable in object using jq
I have the following json file: ``` { "FOO": { "name": "Donald", "location": "Stockholm" }, "BAR": { "name": "Walt", "location": "Stockholm" }, "BAZ...
Class type check in TypeScript
In ActionScript, it is possible to check the type at run-time using the [is operator](http://help.adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7f8a.html): ``` ...
- Modified
- 30 Dec at 09:41
Converting a JS object to an array using jQuery
My application creates a JavaScript object, like the following: ``` myObj= {1:[Array-Data], 2:[Array-Data]} ``` But I need this object as an array. ``` array[1]:[Array-Data] array[2]:[Array-Data]...
- Modified
- 12 Sep at 14:9
Java Security: Illegal key size or default parameters?
I had asked a question about this earlier, but it didn't get answered right and led nowhere. So I've clarified few details on the problem and I would really like to hear your ideas on how could I fix...
- Modified
- 8 Jun at 16:50
UnicodeDecodeError, invalid continuation byte
Why is the below item failing? Why does it succeed with "latin-1" codec? ``` o = "a test of \xe9 char" #I want this to remain a string as this is what I am receiving v = o.decode("utf-8") ``` Which r...
How can I specify a local gem in my Gemfile?
I'd like Bundler to load a local gem. Is there an option for that? Or do I have to move the gem folder into the .bundle directory?
- Modified
- 6 Nov at 18:46
Web colors in an Android color XML resource file
What do all of the X11/w3c color codes look like in the format of an Android XML resource file? > I know this looks a tad ridiculous as a question, but given the votes apparently it's useful and sinc...
android:drawableLeft margin and/or padding
Is it possible to set the margin or padding for the image which we added with the `android:drawableLeft`?
- Modified
- 10 Aug at 13:5
Is there an easy way to add a border to the top and bottom of an Android View?
I have a TextView and I'd like to add a black border along its top and bottom borders. I tried adding `android:drawableTop` and `android:drawableBottom` to the TextView, but that only caused the enti...
- Modified
- 23 Oct at 13:8
What is stability in sorting algorithms and why is it important?
I'm very curious, why stability is or is not important in sorting algorithms?
- Modified
- 27 Dec at 22:10
How do I show the schema of a table in a MySQL database?
From the [MySQL](https://www.mysql.com/) console, what command displays the schema of any given table?
- Modified
- 27 May at 18:35
Side-by-side plots with ggplot2
I would like to place two plots side by side using the [ggplot2 package](http://crantastic.org/packages/ggplot2), i.e. do the equivalent of `par(mfrow=c(1,2))`. For example, I would like to have the ...
- Modified
- 20 Dec at 16:48
How do I find the caller of a method using stacktrace or reflection?
I need to find the caller of a method. Is it possible using stacktrace or reflection?
- Modified
- 8 Feb at 17:55
ASP.NET MVC controller actions that return JSON or partial html
I am trying to create controller actions which will return either JSON or partial html depending upon a parameter. What is the best way to get the result returned to an MVC page asynchronously?
- Modified
- 18 Jun at 17:20
Iterate all files in a directory using a 'for' loop
How can I iterate over each file in a directory using a `for` loop? And how could I tell if a certain entry is a directory or if it's just a file?
- Modified
- 23 Oct at 11:2
How to fix 'Unchecked runtime.lastError: The message port closed before a response was received' chrome issue?
I'm using VueJS and Laravel for my project. This issue started to show lately and it shows even in the old git branches. This error only shows in the Chrome browser.
- Modified
- 6 Apr at 07:42
How can I display full (non-truncated) dataframe information in HTML when converting from Pandas dataframe to HTML?
I converted a Pandas dataframe to an HTML output using the `DataFrame.to_html` function. When I save this to a separate HTML file, the file shows truncated output. For example, in my TEXT column, `df....
python .replace() regex
I am trying to do a grab everything after the `'</html>'` tag and delete it, but my code doesn't seem to be doing anything. Does `.replace()` not support regex? ``` z.write(article.replace('</html>.+'...
Passing a 2D array to a C++ function
I have a function which I want to take, as a parameter, a 2D array of variable size. So far I have this: ``` void myFunction(double** myArray){ myArray[x][y] = 5; etc... } ``` And I ha...
- Modified
- 25 Feb at 18:36
How can I set max-length in an HTML5 "input type=number" element?
For `<input type="number">` element, `maxlength` is not working. How can I restrict the `maxlength` for that number element?
How to convert string to boolean php
How can I convert string to `boolean`? ``` $string = 'false'; $test_mode_mail = settype($string, 'boolean'); var_dump($test_mode_mail); if($test_mode_mail) echo 'test mode is on.'; ``` it return...