Programming :: Read And Save From A .txt - C++?
Mar 28, 2009
I need to read from a file called ranking.txt the name of the players and the respective score. The file is something like this:
Code:
24145 John Burt
12442 Kate Blair
[code]...
View 2 Replies
ADVERTISEMENT
Sep 8, 2010
I would like to make a script which reads a POP3 mailbox on another server and saves the items in the mailbox to a MySQL database. Is this possible? I have to make this script to create monitoringen scripts which has to use the messages in the mailbox.
View 2 Replies
View Related
Mar 25, 2010
I have made some plots in gnuplot that I wanted to include in a document. I have tried both OpenOffice and Kile.
In openoffice the plots are shown when they are imported, but when I save the document and open it up again the plots are gone (unable to read).
In Kile I can't even import them, It cant find the file in the folder. I tried changing the formats from jpg to png - didn't work. Tried just taking a snapshot of the original plot and saving it, didn't work either (but have used the same method earlier today without problems for a different image).
When i move the cursor across the file, it fades away as if it's not registered correctly. Does anybody have a solution for this?
View 3 Replies
View Related
Feb 26, 2010
I am running Debian (Lenny) as my file server on a Windows network. I have multiple users accessing shared excel worksheets. I am the owner of these files and have no problem but if I save a shared workbook the file properties on the Linux server change ''Groups - Read Only, Others - Read Only''. I can reset them logged in as root but they change back every time I save the file from the XP machine (XP Home SP3). All other non-shared worksheets are fine.
View 1 Replies
View Related
Mar 8, 2011
I have a server listening on incoming client connections. Once the client establishes SSL connection with the server, the server waits on read() from the client. Only Client can disconnect the connection. I want to have a timer in the server program to wait for x secs after read() and then disconnect the Client connection.
View 3 Replies
View Related
Apr 1, 2010
need a script to achieve saving multiple text files as 0001 0002 0003 etc.or moving files to a folder displayed this way..there prolly is an " if " statement involved also...if 0001 exist then %+1 and so on.
View 1 Replies
View Related
Jul 22, 2010
I am new to linux scripting, but I have programming experience. I need to save the UUID for /dev/sda1 as a variable, lets call it id. I am sure there is a way to do this with the awk and blkid commands, but I do not know any of this well enough yet to figure it out and after a couple of hours of reading I am still lost as to exactly how I would put this together. I need to save the uuid as a variable so that I can run an if statement with it
if [ -f /media/$id/file ]
then
echo "copy successful"
else
echo "oh crap!"
honestly all I need the uuid for but I cant check this by doing the same if with /dev/sda1/file so I need to be able to save the uuid into a variable
View 7 Replies
View Related
Feb 7, 2011
i'm sniffing network packets with pcap in ubuntu, i need to save these packets somewhere in the memory and after a while read ans send them. how can i do this?
View 1 Replies
View Related
Jul 18, 2011
I am an avid user of gmail. Recently I have been receiving some important e-mails, and I want to download only those e-mails from that specific person to a folder.
View 1 Replies
View Related
Aug 13, 2010
less doesn't save command history, i.e. file .lesshst isn't created. If I create it manually, nothing writes to it too.OS AIX 5.3 I think linux users can have the same issue, hardly this issue depends on OS.
View 9 Replies
View Related
Jan 31, 2011
I am creating an script with Xdialog.The checklist option is confusing me a litte. Can someone tell me how to save the checklist states so they can be used in a script? As an example:
Code:
Xdialog --checklist "Choose toppings:" 10 40 3
1 Cheese on
2 "Tomato Sauce" on
3 Anchovies off
I would then like to put these values through if/else statements to perform different things with respect to the user selection.
View 2 Replies
View Related
Apr 26, 2011
I create the file mytest.txt. Since this process is using this file. if I run this code in background and simply run "rm -rf mytest.txt" than file gets delete.Please help me how to save this file from other process.Here is my code
int main()
{
FILE *fp;
[code]...
View 9 Replies
View Related
Oct 7, 2010
Lets say I wanted to save my bash history permanently. I.e., so I could look in a log somewhere and find some command I used 6 months ago, like the one I used to get my printer drivers installed
View 1 Replies
View Related
Dec 9, 2010
Is there any simple example on how to take a screen cap and save it to a file?
View 11 Replies
View Related
Feb 20, 2010
I have created a file using open() and written data to it. Data appears as normal characters in the file. How to save these characters in a binary format in that file using C language? Here I mean that the characters should be actually stored as 0 and 1. Do I have to convert the whole data using some function or there is some standard way to do it in Linux?
View 14 Replies
View Related
Jun 26, 2009
I'll just say I am a complete Linux beginner, but I have done vbs, js, php, html web type stuff so I'm not a complete beginner to programming.However I've been trying to learn C and python but it's not making a huge amount of sense.I am wanting to make a simple low level program that copies an image from a mjpeg stream on 192.168.0.1/videostream.cgi for example to a variable then save that variable to a file on my system.I am aware that there are programs out there that would do this but I still want to make my own.
View 1 Replies
View Related
Jan 25, 2010
I wanna learn how to store data in text file and be able to modify it and save as well using C++.
Note: im using Turbo C++ 3.0
View 9 Replies
View Related
Jan 27, 2010
Browsing some websites I've found a code for online form where a user provides name, number, etc. Everything is created in html/javascript. I'm just wondering whether it's possible to collect this input and present it in a database form so that I'd be able to see who's provided data and all the details they entered.Actually, it doesn't have to be a proper database (it would probably require php/mysql). It could be a weekly/monthly report (a text file) of people who provided details. The website is hosted by a third party company.This is an html bit:
Code:
<body id="main_body" >
<img id="top" src="top.png" alt="">
[code]...
View 4 Replies
View Related
Nov 2, 2010
I am trying to store the results of my code to a separate text file.But the problem is, as my results comes from a loop, my text file shows only the last result, not all of them.Like if the loop runs 5 time the text file shows the result for the 5th step.But i need to store all of them (1 to 5).Can I use awk to print the output field and store to another file and creat a new line so that the next output field goes to a new line?(just an idea, dont know).
#!/bin/basth
for (( i=1; i<=5; i++))
do
./file.exe > output.txt
done
View 2 Replies
View Related
Sep 26, 2010
I try to use XML::Simple to read each 'feed' from following RSS from CNN. Some of the sets contains more than one feed item which has no unique identifier besides its contents.
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rssfeeds> <set id="1">
<!-- RSS feeds from feedburner.com !--> <!-- XBOX Scene !-->
<feed updateinterval="30">http://feeds.feedburner.com/XboxScene</feed>
</set> <set id="2"> <!-- RSS feeds from skynews.com !-->
<!-- World News !--> .....
View 1 Replies
View Related
Jan 13, 2010
I have Ubuntu 9.10 dual booting with Windows7.My ext3 /home is mounted as F: in windows.I share a firefox profile between them so that when i am in Windows my firefox uses the same profile as it does when in Ubuntu.It all worked great until recently. I am unable to save files by right clicking and save as. In the config i am unable to set a directory to save to. It neer asks me where to save to. Just nothing happens. some off my book marks are all messed up as well, my rss feeds have the same post on some random website every time i log on and i have to manually refresh to get the correct feeds back. I am unable to delete the random bookmark.
View 1 Replies
View Related
Aug 25, 2010
Our application uses a dynamically loaded shared object library (codec library) to compress and decompress audio streams.
There happens to be several static and global variables in this shared object library. Hence it is not possible to process two interleaved unrelated media streams using this shared object codec library because each stream corrupts/changes the contents of these static/global variables.
Is there a way through which a context save (save contents of data segment of shared object) and a context load (load previously saved contents of data segment of shared object)operation can be performed on the shared object library. This way the context for each media stream can be saved and loaded before and after processing the "other" media stream respectively.
View 3 Replies
View Related
May 14, 2011
I need a regex expression to read IP address from lines like these for my perl script:
Code:
2011.05.13-14:54:58, test@xyz.com, 180.211.51.11, pop3
2011.05.13-14:57:26, test@xyz.com, 160.234.47.12, pop3
2011.05.13-14:57:54, www@abcd.com, 166.22.22.224, imap
2011.05.13-14:57:55, www@somedomain.com, 172.58.22.154, imap
2011.05.13-15:03:08, www@example.com, 190.22.120.44, pop3
View 6 Replies
View Related
Jun 16, 2010
my mediacenter is attached to an beamer with the optimal resolution of 1280*720 ubuntu 10.04 doesnt offer me this revolution (on my intel 915 graphis controller). this means i have to add this resolution to the possible resolutions. first i used cvt
Code:
cvt 1280 720 60
and got this result:
Quote:
# 1280x720 59.86 Hz (CVT 0.92M9) hsync: 44.77 kHz; pclk: 74.50 MHz
Modeline "1280x720_60.00" 74.50 1280 1344 1472 1664 720 723 728 748 -hsync +vsync
then i added this to xrandr
Code:
xrandr --verbose --newmode "1280x720" 74.50 1280 1344 1472 1664 720 723 728 748 -hsync +vsync
and
Code:
xrandr --verbose --addmode VGA1 1280x720
now i can select and use the new resolution - until next reboot. after an reboot 1280x720 is again not available. even if i work with sudo - the resolution isnt there....
View 1 Replies
View Related
Jul 14, 2010
I am trying to write a script which can read the names of all folders within a given folder into separate variables. In effect, if a folder contains a folder "Folder1", "Folder2", "Folder3", the script would read those names into variables such as:
Variable1 = "Folder1"
Variable2 = "Folder2"
Variable3 = "Folder3"
I have tried fiddling with the find . command, but without any success.
View 3 Replies
View Related
Aug 24, 2010
I need to read data from a socket but it should be always listening because data arrives continuously .. I thought something like this would do it but it doesn't work .... I already set the socket options before
Code: char databuf[1024];
int datalen = sizeof(databuf);
if(read(sd, databuf, datalen) < 0)
{
[Code]....
View 9 Replies
View Related
May 15, 2011
I'm facing a problem in a - at least I though it would be - simple BASH script. I use 'awk' to find matching lines in a file, and then use while-read to modify each line matching the expr casted in awk. It looks like this:
Code:
function foo() {
awk '$NF~/^./{print $NF}' FILE.TXT|while read line; do
bla bla bla ...
[code]....
However, each time the execution hits the 'read choice' line, it doesn't prompt - as well as pause the excution - the user for a choice: it just passes it. This problem just happens inside the while loop.
View 4 Replies
View Related
Apr 30, 2011
Just a quick question. If I were to use PHP to read an RSS page that is online, what "browser" (user-agent) would the webserver detect my PHPs request as? If that doesn't make any sense I'm referring to information such as Code:Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17 ( .NET CLR 3.5.30729)
View 2 Replies
View Related
Apr 13, 2011
I want to read content of a file inside a gawk script.I know that by using "gawk -f filename" I can read a file, but I want to do that inside the script.
View 7 Replies
View Related
Jun 9, 2010
I want to read the line in the text file and get the string in the file and paste it in the directory column
for example i have a line like /ftp/prod/SWC1407.DOC
from this 1407 should be parsed and appended at the end of the move command
mv /ftp/prod/SWC1407.DOC /nfp/1407
View 7 Replies
View Related