|
I am trying to write data to serialport and then wait for the acknowledgement. After ack is received, I write the next set of data. Please suggest a way of doing this. I tried the below code but before receiving the ack, the writing fires and completes...
Started by subho100 on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Like
while (Flag == false) ; //wait for flag to become true after previous write ...write...
|
|
Assume i have to store few integer numbers like 1024 or 512 or 10240 or 9 in a file, but the condition is that i can consume only 4 bytes (not less nor max).but while writing a python file using write method it stored as "1024" or "512" or "10240" ie ...
Started by mukul sharma on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Use the struct module
>>> import struct >>> struct.pack("l",1024) '\x00\x04\x00\x00' >>> struct.pack("l",10240) '\x00(\x00\x00' >>> struct.pack("l",9 ) '\xa0\xbb\r\x00'
The struct module will do
>>> import... .
|
|
Hi,
I would like to create a desktop application (preferably in c#, running on .net or mono) that would read/write information (phone book, calendar, calls, text messages, etc.) from/to my connected (usb/bluetooth) symbian phone (SE p990i), but I don'...
Started by zsepi on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Will tell you how to programmatically read messages, contacts, agenda and send them over usb or bluetooth.
|
Ask your Facebook Friends
|
I need to write a bash script that will take a grepable nmap output file that displays IP addresses with port 80 open and copy the IPs that have port 80 open to another text file. The output looks similar to this:
# Nmap 4.76 scan initiated Thu Dec 3 ...
Started by Matt Pascoe on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Not being familiar with nmap invocation and output format, but still, this should work:
nmap | grep -e 'Ports:.80\/' |sed 's/Host:.... .
Use grep and sed/awk
grep -e '80/open/tcp' infile | awk '{print $2}' | sort -u > outfile
would be my first attempt .
|
|
Here's the deal, we have a big JS library that we want to compress, but YUI compressor doesn't fully compress the code if it finds an "eval" statement, out of fear that it will break something else. That's great and all, but we know exactly what is getting...
Started by Infinity on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Http://www.coderjournal.com....
Here is a couple articles on the other compression tools available .
Var e = "e"; window[e+"val"](stuff);
If possible you may want to try one of the other compression libraries since YUI isn't the only game in town anymore .
|
|
If this is possible, please provide a sample query or two so I can see how it would work. Both tables will be in the same database.
Thanks!
Started by Terry Donaghe on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
For example:
INSERT INTO names SELECT....
Pseudo code:
insert into <target-table> ( <column-list> ) select <columns> from <source-table>
INSERT...SELECT is the answer; see http://dev.mysql.com/doc/refman/5.1/en/insert-select.html .
|
|
I am having a hard time writing type checks in Clojure. Pleas help me.
How do I write/perform 'char?' in Clojure? How do I write/perform 'atom?' in Clojure?
How do I know what type an item is in Clojure?
Can I write (type? an-item) ?
Started by kunjaan on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Clojure uses java classes instead of introducing its own type system... .
Typically type questions in Clojure come down to asking "what class is this, or what primitive-wrapper-class can contain it." This comes from Clojure's first class treatment of java .
|
|
Using ASP.net, how do you write ANSI characters to a text file?
I need to write this file's text to the web browser. Do they support ANSI?
Started by balaweblog on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
StreamWriter(fs, System.Text.Encoding.ASCII);
I don't do ASP, so I can't tell you how to do.
|
|
Pretty simple question, I'm writing an XML document and i'm not sure how to write "]]>" without it being seen as the end of the section.
Started by Greg on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
CDATA doesn't provide any way to escape characters, so those characters will always represent the end of ... .
You can't.
You can do it like this:
]]>]]><![CDATA[
This ends up breaking the CDATA section in two parts, but it's what you have to do .
|
|
I am new to Netbeans, i created the web project, now i want to write javascript for one html page, how should i write,
Started by rupa on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
-> Other -> JavaScript File
Else just add <script type="text....
In the head of your html page:
<script type="text/javascript"> //your javascript code alert('Hello js'); </script>
If you wish to create a .js file: File -> New File.. .
|