I want to send 'hello world' to a script in python already running in ubuntu. The script that's always running is this one (part of it): print("$ echo 'foobar' > {0}".format(get_ttyname())) print("$ echo 'foobar' > /proc/{0}/fd/0"
I am developing a Twitter application which references to the images directly from Twitter. How can I prevent animated gifs from being played? Using window.stop() at the end of the page does not work for me in Firefox. Is there a better JavaScript ha
I'm trying to get the data from my Rest API controller using anuglarjs http GET request. However, the params that I need to send include "." symbol which caused the URL failed. I tried to encode it but it does not work. Here is what I did: funct
I'm using Revive Ad Server, and I moved the Invocation Code for my ads in divs below my footer, and then used jQuery to append them to where they're supposed to load. How can I delay the loading of the ads so they rest of my scripts can load? For exa
The Postgres Plus Cloud Database was announced early this year. As I do not have a lot of experience on database clustering, I am wondering which one I should use. Can anyone give me a compare between Postgres Plus Cloud Database and Amazon RDS in te
Do you know any jquery plugin or something to implement dual list-boxes? I searched and found this project http://kgaddy.com/jqueryMoverBoxes/ but the it is very simple.Have a look at http://www.billsternberger.net/jquery/how-to-create-a-dual-listbox
I want to do something a bit awkward and my pseudo code isn't working, but should explain what I'm trying to do. I have groups of 4 radio buttons, in 6 separate divs, so 24 radios in total. Each div is a particular background colour. When a radio but
I need to find users that have been inserted twice in a table, but with their first name & last name swapped. e.g. Bob Smith is in the database as firstname:Bob lastname:Smith & firstname:Smith lastname:Bob What's the best query to find those user
I have a website on a local wamp server (I have used a virtual host setup). However when I try to link to another controller on the site, I just get a 404 page (not codeigniters 404). I'm sure I'm missing something simple, but what I'm not quite sure
I am interested in generating a chisquare value (X-squared and pvalue) on each row and appending the test results in separate columns. The data I have is a gene for each row and counts of mutations or normal (wild-type) for two separate groups. Here
#define "/local/home/..." FILE *fp; short *originalUnPacked; short *unPacked; int fileSize; fp = fopen(FILENAME, "r"); fseek (fp , 0 , SEEK_END); fileSize = ftell (fp); rewind (fp); originalUnPacked = (short*) malloc (sizeof(char)*file
Hi I am trying to show startimage before my swf video starts playing, I am using flashVars to do this but for some reasons its not working, below is my code: <object id="M97012085" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
Microsoft ASP.NET MVC's JSON serializer converts date time values to something like "\/Date(1239018869048)\/". I have a component on the client side that uses this format to show a date-time picker. However, create date time values from differen
(format t "~C ~D ???" var1) Who can give a tip, How/Where in the all power Hyperspec can we find a list of the control string? Things like this, when it's going to find some hints about the Lisp control string of the format, the Hyperspec always
I have googled and searched all over but I am still having trouble getting connected to a site using the ftpzilla I am getting this read out when I try to connect to the server using the network connection wizard Connecting to probe.filezilla-project
I have a ASP .NET application that we give to our clients for them to deploy it in their web server and use it. My concern is that all of my ASPX pages source code is open and our clients can open the ASPX/CS file and see the code in it. I want to pr
UPDATE: I found that the semaphore they are releasing is not the semaphore the monitor thread is waiting! I used cout<<ready to find the semaphore the threads are releasing is 00000394, which is not the handle of the semaphore the monitor thread is
I got this dataset ID fruit price 1 apple 10 2 apple 50 3 apple 100 4 banana 10 5 banana 20 6 banana 50 and would like a (set of) forumla(s) that go through the rows and output the row for each fruit that has the highest price. In e.g. PHP I would do
This question already has an answer here: Why do I get math domain error? 2 answers I've received a maths domain error in Python and i have no idea what happened? Help would be appreciated from math import * def factors(A, B): a = 1 b = B/A c = B x =
Requirement: Alphabets in a row Using swipe gesture, user can swipe alphabets left to right & vice versa A circle/magnifying glass in center, which will enlarge the character in center In iOS, I want to show alphabets in a row that can be scrolled fr
I have a product that has multiple variations. I would like, in an RSS feed, to show this as a nested items option, but I don't know if this is valid or not: <?xml version="1.0" encoding="US-ASCII" ?> <rss version="2.0&qu
As far as i know according to mathematics rounding should work as below when rounding number is 5. 2.435 => 2.44 (Round Up, if rounding to digit(3) is odd number) 2.445 => 2.44 (Round Down, if rounding to digit(4) is even number) if we do summation
I am currently working on a little browser game and I am using the HTML localStorage to save some data. The problem: I have an empty array that i will later .push() some data into. I am storing this array in the localStorage but when i try to read fr
Let's say the height of the div is 34px and the width is 480px. The div should look like this: and I don't want it to actually use an image, just CSS. Is it possible?It is with CSS3. There's even a handy gradient generator which takes the guesswork o
I wrote the following code, including a div and a span. I want the span inside the div to have a different colour, but it doesnt seem to work.. This is the html code: <div class="menu"> <p class="menuHeader">Menu</p>
I'm using RoboMongo to delete a number of documents that match a query. However, it is saying no documents have been delete with the following: db.getCollection('assets').remove( { "source": "red" } ); However, this works perfectly: db
I am working on a task where I get a set of classes( ActiveRecord classes to be more precise) and I want to get their names. I do this by iterating over this set and applying methods like #name to the elements of the set. Something like this: array_o
I have a table with a logical deleted field - CREATE TABLE DOCUMENT ( ID VARCHAR2(255 BYTE) NOT NULL, DOCUMENT_NAME VARCHAR2(255 BYTE), DELETED NUMBER ) And I create the JPA object - @Entity(name = "DOCUMENT") public class Document { @Column(nam
I seem to get an error when querying an object that has a child POCO property object: could not resolve property: PreferredLanguage.Name of: AcademyData.Entities.StudentsInformation My query: Session.QueryOver<StudentsInformation>().Where(x => x.
I'm looking for a free library for python that can calculate your direction and your speed from GPS coordinates and maybe can calculate if you are in some boundaries or things like this. Are there Libraries that you know and that worked well for you?