Programming :: Unread Log Entry When Reading Log In Java?
Apr 13, 2011
i want to make program that processing entry in log on real time... I have try to pass "tail -f -n 1 /var/log/messages" command from .runtime().exec and process the output,, description of the algo is like this
-passed to exec()
-read output
-if not same as previous value procces it
but sometimes it loose some entry to procces, maybe it occur when proccesing another entry is added by system...
View 6 Replies
ADVERTISEMENT
May 25, 2011
Ok, first is it possible to take a program I wrote and make it to be a entry in the right menu of a file browser program.
Also, can this happen if the program is developed in Java?
OpenSuSE 11.4
Kde 4
Dolphin(file browser)
View 8 Replies
View Related
Apr 6, 2011
how to read data from excel to java in the excel sheet chinise language is present while reading into java iam getting question marks.how to get chiniese language instead of question marks in the java file
View 1 Replies
View Related
May 2, 2011
I'm trying to make a program to simulate a parabolic movement, so i've added 2 entries, one for the initial velocity and other for the angle, anyway you probably don't care about that xD what i want is to take the number entered in the entry and put it in a variable to do the math, and then show everything in a dialog or something. how do i do that?
View 3 Replies
View Related
Dec 5, 2010
I have to add a new interrupt framework to the kernel (INT 81h). To add the interface descriptor to INT 81h I have to write to the IDT entry 81h. There are some functions of the kernel that can do this task but they can not be used in a module. So I will now do a patch to the kernel and don't know where to start.
Where is INT 80h interface descriptor written to the IDT? - So I could write it maybe the same way in the same function. Which GTD entry is used to write to the IDT (1, 2, 3 or ...) ? - So I can do some debugging.
View 1 Replies
View Related
Jun 13, 2009
I created a class which has to return an array. My problem is I need to return 3 entries per record for example:
Code:
array(
"2009-06-13", "John", "Doe";
"2009-06-13", "Paul", "Simon";
"2009-06-12", "Frank", "Herbert";
);
Can this be done? What is the syntax? Where is the documentation? If this can't be done, How would you return this to a class without using a DB?
View 3 Replies
View Related
May 1, 2011
I have a kernel module program which is used to create a entry in the proc file system. I have to read and write values in the entry. Its taken from a online tutorial stuff.how to write the value to the proc entry in the program ?
View 1 Replies
View Related
Jun 18, 2011
I've searched the web for quite a while and cannot seem to find a way to add a gtk.Entry() to a toolbar via toolbar.insert().
I currently have this:
Code:
Which in turn spits out "Gtk.Toolbar.insert() argument 1 must be gtk.ToolItem, not gtk.Entry"
How would I do this correctly?
View 2 Replies
View Related
Feb 28, 2011
I need to create and access a very large number of directories (and by large I mean millions). Each directory's name consists only of numbers, which are incremented every time a new directory is created (so there will be directory 1, 2, and so on).Of course I could just dump all these directories under the same parent directory, but I reckon I would run into filesystem limits. Moreover, I presume that entry lookup is not a O(1) operation, which means that lookup does not scale well.
One solution is to use some sort of prefix tree for storing the data. In this scheme, the data for directory "1234" would actually be stored in "/1/2/3/4".This solution has the advantage that each subtree never has more than 10 entries, but the disadvantage of requiring as many individual lookups as the length of the path.There are also intermediate solutions: using a maximum of 100 entries per directory, "1234" would become "/12/34", per example.In order to choose the best scheme, I must know more about the scalability of directory lookup under Linux. What's the maximum reasonable number of entries for a directory before lookup becomes too slow? Does someone know exactly what are the limitations of the algorithm used for directory lookup?
View 1 Replies
View Related
Apr 26, 2010
Well, I have a web application in Linux server. All my Java codes are there. FYI, whenever user entered non-ASCII characters(e.g. ∞,�,�) in a text field in my web application, and I check the log of my Java code in Linux server, it returns weird characters.
Suppose user entered ∞ in the text field. I should get ∞ in my log too. However, I got weird characters in return.
View 14 Replies
View Related
Jul 27, 2010
If we have a .so library elf in linux, will it be possible to find out the APIs supported by it. Or in other words, the functions that can be used along with the argument types and return type.? Note that we dont have any other header files or documentations related to the library.
View 5 Replies
View Related
Nov 11, 2010
I am currently writing an engine using SDL and openGL, and while I've gotten it mostly done, I've never really learned how to read configuration files. The configuration files that I'm hoping on using will be a straight forward syntax using "#" for comments and variables will be declared using "foo=hello". I don't need a lot of items in the configuration files, but enough to change needed settings. I'm not wanting to use external libraries (how are you going to learn if you can't do it yourself? :P) and I'm hoping to write it from scratch. If someone could please point me to a tutorial on how to do this or even some working code I may be able to figure it out. I am using the C programming language also(as I like it more than C++, sorry).
View 5 Replies
View Related
Jul 19, 2010
I have set up a MySQL database which has only three fields for user-name, password and index number. But there is a LOT of data (thousands of columns) which would take too long to enter manually. I'm sure MySQL must have a file format whereby a single large file containing different data types can be successfully automatically imported and the various data elements distributed to their intended fields. Does anyone know which characters MySQL uses as field seperators for this formatting of data, or is there a program already written which can take raw data and organize it into a SQL compatible file?
View 8 Replies
View Related
Jul 8, 2010
I was hoping to get some pointers on how to rename files based on database entry. I got hundreds of thousands of files that has GUID name assigned to it. only way to find out the file name is to look up the database table. Its obvious that this is not efficient. I couldn't find any tutorials on how to do this. Please point me to right direction. A starting point would be very helpful.
View 1 Replies
View Related
Sep 23, 2010
I am writing a sample nasm program via terminal.It's a basic one ,it only demonstrates the usage of the zero and sign flags and print relevant message to the output. Here are the code:
Code:
SECTION .data; data section
errMsg:db "Error !",10
errLen:equ $-errMsg
zeroMsg: db "Zero flag",10
zeroLen: equ $-zeroMsg
[Code]....
View 2 Replies
View Related
Jul 24, 2010
Code:
I'm trying to make several files: each named after the display and containing resolutions. But for some reason I get null when trying to read lines.
View 2 Replies
View Related
Mar 17, 2011
I have a folder which includes bunch of folders each having data files in them. [ Folder A has F1, F2 F3 ..... F1000 folders in it, and F1, F2, F3 ... each has about 10 different files named FILE 1, FILE2, FILE3 .... in them.
I am interested in File 1 of each Folder, because that contains the data I need in it. More specifically, that File1 s have a line "ANSWER=..." in them, and i need to get that value of the ANSWER from each file. So doing it by hand is so hard, so I need to write a script that will scan all folders and give me a list of values of eache ANSWERs.
View 4 Replies
View Related
Aug 17, 2010
I've been reading about getopt and getopts but it doesn't seem like it's possible to parse arguments like --foo or even -foo. I've started my own script trying to achieve this, but I'm still wondering if I'm losing performance and if there is a better way to do this task.
Also I'm using the [[ =~ ]] regex syntax which seems to be available only in newer bash versions, should it be a big issue? My bash version: GNU bash, version 4.1.7(2)-release (x86_64-unknown-linux-gnu)
[Code]...
View 6 Replies
View Related
Jan 9, 2011
I have a binary file, which I need to process using my C++ application. Only thing I know is first chunk of the file is long, second chunk is int, third chunk is char etc... The binary file actually contains something like below. (which is represented in hex base).
D7 07 00 00 00 00 00 00 37 18 00 00 DE 07 ............ so on.....
I need to procees the file in the following way.
* I know the first data segment in my file is long. So it takes 4 bytes.
* so I need to read the first four bytes. That is D7 07 00 00.
* Then I need to reverse this as 00 00 07 D7.
* Finally I need to get the decimal value of above hexa decimal line. ( 00 00 07 D7)
* i.e. 00 00 07 D7 (in hex) = 7D7 (in hex- after removing leading 0 s) = 2007 (in decimal)
Like wise I need to process the whole file.
View 14 Replies
View Related
Oct 20, 2010
I know that this is a really simple thing to do but I just can't figure it out. How do I read a text file into an array in C++?
View 3 Replies
View Related
Feb 10, 2011
I have two files of data with different numbers of columns and rows. I want to read this two files in two arrays and then compare for example the second column of first data file with the third column of the other text file and if the difference between of two numbers is less than a threshold then the program print the information in the rows which fulfill this condition in the third text file. I have written below program but the problem is that it does not go through all rows of second file.
declare -a a
declare -a b
r=` awk '{n++} END {print n}' second.txt `
echo $r
awk '
{
[Code]....
Actually I have two data files one of them contains 44406 and the other one has 12066 rows and I want to check whether the difference between the components of two specific columns is less than a threshod but I have simplified it here. I had written this code and then I have realized that this code just goes through the number of rows as the same as the first.txt file and ignores the rest. I could not find the problem yet.
View 2 Replies
View Related
Dec 16, 2010
I made a string key-value mapping struct in C, and functions to add and remove entries. I would also like to write a function to read in this file format:
Code:
key: value
another: another value
[code]...
View 14 Replies
View Related
Jan 1, 2011
Reading and writing text files in C?
View 9 Replies
View Related
Nov 6, 2010
I am trying to write a simple script to list all the files in a directory. The script I wrote was as below where the pdb_files is a directory and all the files which I want to list are in that folder.
Code:
files=`ls -F pdb_files/*THERMO*`
for inFiles in $files
do
echo $inFiles
[Code]....
View 5 Replies
View Related
Nov 8, 2010
I need to Read a path of a file witch is written in Text file i used this
Code:
FILENAME=$1
while read line
do
echo $line
done < $FILENAME
it worked and showed me the Line witch was written in my file but now my problem is how am gonna use that line as a path i mean for example if am gonna execute a linux command on that file like dpkg -i /path/to/the/file how am gonna export it from The $Line variable and use it after the command.
View 14 Replies
View Related
Sep 17, 2010
I plan to make a script for the console server via mail, but I find difficulties in the reading of email applications, to email me using the mail command, but how to read the incoming mail
View 1 Replies
View Related
Mar 16, 2011
I am trying to read certain lines within a file and give the output of the certain lines that dont equal my value, I think showing you would be easier. There is multiples of these inside one file...
Code:
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 300lable/syncd
[code]....
I want to read everything in the file, if the status is not available then it should display the name (directly above status). If they are all availbale then do nothing. I think I know how to do it which includes putting the info in string form and placing in hash but it is proving to be out of my skill range.
View 12 Replies
View Related
Sep 10, 2009
To save on the writing of WAY to many files with very little in them, I want to put it all in one file and read a specific few lines. There will be six variables to be read at a time. Format is as such:
//Set 1
string name
5
12
[code]....
From name to 5th number is a set. The name will be of different lengths for each set. This will be a big file of probably 40+ sets. My problem lies in reading one and only one set be it set 5 or set 34. It needs to be done in C++.
View 2 Replies
View Related
Dec 3, 2010
I would like to write a program that can read every ethernet frame arriving on a specific hardware NIC, without a TCP/IP stack otherwise doing anything on that NIC. Likewise I want to be able to write out to that NIC. So every arriving ethernet frame, of all types, would be readable (probably one at a time to preserve frame boundaries). And every write of exactly that same data would send frames out. The data read and written would be the whole ethernet frame. The kernel would do nothing else with this data, but other NICs would still operate as usual.
What I would be doing is that on 2 separate NICs, copying frames from one to the other, as in bridging. But I would also be doing modifications per what my program needs to do (not at liberty to say what that would be). What facility would I need to be looking at to do this? There is no ethernet device file. Would raw sockets be able to do this? The programming language will be C.
View 4 Replies
View Related
Jan 18, 2011
I just want to read and write some values (integer) to my driver. I used put/get user but always getting errors.
driver
Quote:
int Wert;
static int device_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsinged long arg)
int ret;
[code]...
Quote:
int WERT
ret=ioctl(fd, SETIT, WERT)
ret=ioctl(fd, GETIT, WERT)
if i say in C++ WERT is 5 the value arg of the driver becomes 5 but not WERT the returnvalue of get and put user is -1 so it failed.
View 12 Replies
View Related