Pinging servers in Python
In Python, is there a way to ping a server through ICMP and return TRUE if the server responds, or FALSE if there is no response?
- Modified
- 1 Jun at 21:27
Overcoming "Display forbidden by X-Frame-Options"
I'm writing a tiny webpage whose purpose is to frame a few other pages, simply to consolidate them into a single browser window for ease of viewing. A few of the pages I'm trying to frame forbid bein...
- Modified
- 12 Mar at 18:1
What is the difference between Promises and Observables?
What is the difference between `Promise` and `Observable` in Angular? An example on each would be helpful in understanding both the cases. In what scenario can we use each case?
- Modified
- 11 Jan at 02:11
ReferenceError: fetch is not defined
I have this error when I compile my code in node.js, how can I fix it? RefernceError: fetch is not defined [](https://i.stack.imgur.com/3Syvz.png) This is the function I am doing, it is responsible...
- Modified
- 7 Jul at 15:43
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
How do I cast a JSON Object to a TypeScript class?
I read a JSON object from a remote REST server. This JSON object has all the properties of a typescript class (by design). How do I cast that received JSON object to a type var? I don't want to popul...
- Modified
- 5 Dec at 15:47
Simple way to transpose columns and rows in SQL?
How do I simply switch columns with rows in SQL? Is there any simple command to transpose? ie turn this result: ``` Paul | John | Tim | Eric Red 1 5 1 3 Green 8 4 ...
- Modified
- 3 May at 15:35
Send email with PHP from html form on submit with the same script
I want to send an email with PHP when a user has finished filling in an HTML form and then emailing information from the form. I want to do it from the same script that displays the web page that has ...
Unexpected character encountered while parsing value
Currently, I have some issues. I'm using C# with Json.NET. The issue is that I always get: > {"Unexpected character encountered while parsing value: e. Path '', line 0, position 0."} So the way I'm us...
- Modified
- 23 Dec at 18:4
Make Vim show ALL white spaces as a character
I can't find a way to make Vim show all white spaces as a character. All I found was about tabs, trailing spaces etc.
- Modified
- 23 Apr at 19:9
Convert timestamp to readable date/time PHP
I have a timestamp stored in a session (1299446702). How can I convert that to a readable date/time in PHP? I have tried srttotime, etc. to no avail.
- Modified
- 22 Mar at 11:42
Multi-line string with extra space (preserved indentation)
I want to write some pre-defined texts to a file with the following: ``` text="this is line one\n this is line two\n this is line three" echo -e $text > filename ``` I'm expecting something like t...
Access mysql remote database from command line
I have a server with Rackspace. I want to access the database from my local machine command line. I tried like: ``` mysql -u username -h my.application.com -ppassword ``` But it gives an error: > ERR...
- Modified
- 20 Jun at 09:12
How can I tell if a DOM element is visible in the current viewport?
Is there an efficient way to tell if a DOM element (in an HTML document) is currently visible (appears in the )? (The question refers to Firefox.)
- Modified
- 15 Dec at 04:44
How do I use OpenFileDialog to select a folder?
I was going to use the following project: [https://github.com/scottwis/OpenFileOrFolderDialog](https://github.com/scottwis/OpenFileOrFolderDialog) However, there's a problem: it uses the `GetOpenFileN...
- Modified
- 4 Apr at 18:44
Replace multiple characters in one replace call
I need to replace every instance of '_' with a space, and every instance of '#' with nothing/empty. ``` var string = '#Please send_an_information_pack_to_the_following_address:'; ``` I've tried this:...
- Modified
- 18 Feb at 19:49
How to submit a form with JavaScript by clicking a link?
Instead of a submit button I have a link: ``` <form> <a href="#"> submit </a> </form> ``` Can I make it submit the form when it is clicked?
- Modified
- 6 Nov at 22:33
in mac always getting zsh: command not found:
I am using the z Shell (`zsh`) instead of the default bash, and something wrong happen so that all commands that used to work are no longer recognized: ``` ls zsh: command not found: ls open ...
Python strings and integer concatenation
I want to create a string using an integer appended to it, in a loop. Like this: ``` for i in range(1, 11): string = "string" + i ``` But it returns an error: > TypeError: unsupported operand typ...
- Modified
- 3 Apr at 17:48
How to set Java environment path in Ubuntu
I just installed JDK in Ubuntu with `sudo apt-get install openjdk-6-jdk` command, after the installation where's the Java `bin` directory located? And how can I set the environment path for that direc...
- Modified
- 29 Oct at 13:45
MySQL SELECT only not null values
Is it possible to do a select statement that takes only NOT NULL values? Right now I am using this: ``` SELECT * FROM table ``` And then I have to filter out the null values with a php loop. Is t...
'react-scripts' is not recognized as an internal or external command
I've got a maven project, within which is JavaScript project cloned as a git sub-module. So the directory structure looks like `mavenapp/src/main/javascript/[npm project files]` Inside my package.json...
- Modified
- 27 Aug at 08:14
How do I convert a column of text URLs into active hyperlinks in Excel?
I have a column in excel, wherein I have all the website url values. My question is I want to turn the url values to active links. There are about 200 entries in that column with different urls in all...
- Modified
- 14 Dec at 10:0
Pandas conditional creation of a series/dataframe column
How do I add a `color` column to the following dataframe so that `color='green'` if `Set == 'Z'`, and `color='red'` otherwise? ``` Type Set 1 A Z 2 B Z 3 B ...