So I have a Linux program that runs in a while(true) loop, which waits for user input, process it and print result to stdout.
I want to write a shell script that open this program, feed it lines from a txt file, one line at a time and save the program output for each line to a file.
So I want to know if there is any command for:
- open a program
- send text to a process
- receive output from that program
Many thanks.
Hi,
I have this rule:
body {
font-family: Arial,Helvetica,sans-serif;
font-size: 12px
}
but i have different font size for the selects and the buttons then for plain text.
What should i do if i want the same size for everything?
Regards
Javi
I would like to write an address in a text file, which can be read by fscanf and dereferenced by C after reading the pointer. How do I write the address in the file?
I want to change the text of the top address bar without reloading, I know the methods window.location.href and window.location.hash, but I want to do it without appending a "#" to the URL.
Is it possible?
Hi
I need to retrieve only selected portion of a webpage (user open a webpage in web-browser control, then he/she would select some portion of a webpage, i just need only those selected portion/text) in vb.net in visual basic language. How to do ?
i am using microsoft visual studio 2008
Language: Visual Basic
FrameWork: vb.net 3.5
I have a very simple page that's usings jquery's datepicker. I have:
<input id=datepicker type=image src='cal.png'>
When I click on the image in FF/IE, it works as expected, but does not work in Chrome (ver. 4.1.249.1064). However if I simply change to "type=text", it works within Chrome.
So my question is this: am I allowed to use Datepicker with "type=image"?
Hi,
given a plain text file, how can I do, using bash, awk, sed, etc, to, at the line number NLINE, add the string STR, just n spaces after the end of the line?
So, for instance, if this is the line NLINE:
date march 13th
for 5 spaces, we get
date march 13th STR
and one gets the modification in a new file.
Thanks
It's kind of hard to explain, but an example of what I'm wanting to accomplish is like this:
Here is some text | image |
that is printed | |
out in a view and ---------
it is wrapped around an
image that is floating and
right aligned.
I thought about generating the layout in html and using a web view, but I need to be able to perform an action when the user clicks on the image. Does anyone have any ideas?
Thanks in advance,
groomsy
I have a text file containing a number of records. Each record is stored on a single line that is 100 characters long.
Let's say I want to directly access the nth record. I could do it using a for loop, reading in n lines until I get to the record.
But how could I access it directly?
<td></td><td>foo</td>
I would like to return ['', 'foo'] but libxml's xpath //td/text() returns just ['foo']. How do I find the empty tag as '' instead of (not matched)?
Hi,
i want to save the text file without dialogue box and store the given particular path in flash actionscript 3.0 or 2.0. if anyone know above issue,let me know
I want to do this:
#define kDescriptionText @"Some text here..."
"...and more continued here."
I've also tried:
@"...and more continued here."
Is this possible? Or must it all be on one looooooong line?
i have text file which has certain values which i want to erase in C++ and python . How to do it?Do i have to assign the file pointer to a null value string?
I've got a CRichEdit that I need to get the text from. What is the best way to do that? GETTEXTEX? StreamOut? If I go the StreamOut approach, what would my callback look like?
The beta version of the jQuery Templates plugin is now hosted on the Microsoft Ajax CDN. You can start using the jQuery Templates plugin in your application by referencing both jQuery 1.4.2 and jQuery Templates from the CDN. Here are the two script tags that you will want to use when developing an application: <script type="text/javascript" src=”http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.js”></script> <script type="text/javascript" src=”http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.js”></script> In addition, minified versions of both files are available from the CDN: <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js"></script> Here’s a full code sample of using jQuery Templates from the CDN to display pictures of cats from Flickr: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Cats</title>
<style type="text/css">
html {
background-color:Orange;
}
#catBox div {
width:250px;
height:250px;
border:solid 1px black;
background-color:White;
margin:5px;
padding:5px;
float:left;
}
#catBox img {
width:200px;
height: 200px;
}
</style>
</head>
<body>
<h1>Cat Photos!</h1>
<div id="catBox"></div>
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js"></script>
<script id="catTemplate" type="text/x-jquery-tmpl">
<div>
<b>${title}</b>
<br />
<img src="${media.m}" />
</div>
</script>
<script type="text/javascript">
var url = "http://api.flickr.com/services/feeds/groups_pool.gne?id=44124373027@N01&lang=en-us&format=json&jsoncallback=?";
// Grab some flickr images of cats
$.getJSON(url, function (data) {
// Format the data using the catTemplate template
$("#catTemplate").tmpl(data.items).appendTo("#catBox");
});
</script>
</body>
</html>
This page displays a list of cats retrieved from Flickr:
Notice that the cat pictures are retrieved and rendered with just a few lines of code:
var url = "http://api.flickr.com/services/feeds/groups_pool.gne?id=44124373027@N01&lang=en-us&format=json&jsoncallback=?";
// Grab some flickr images of cats
$.getJSON(url, function (data) {
// Format the data using the catTemplate template
$("#catTemplate").tmpl(data.items).appendTo("#catBox");
});
The final line of code, the one that calls the tmpl() method, uses the Templates plugin to render the cat photos in a template named catTemplate. The catTemplate template is contained within a SCRIPT element with type="text/x-jquery-tmpl".
The jQuery Templates plugin is an “official” jQuery plugin which will be included in jQuery 1.5 (the next major release of jQuery). You can read the full documentation for the plugin at the jQuery website:
http://api.jquery.com/category/plugins/templates/
The jQuery Templates plugin is still beta so we would really appreciate your feedback on the plugin. Let us know if you use the Templates plugin in your website.