I'm writing a command-line flash card program in Python. I've tried many existing applications, but none fit my specialized needs.
All of the words I'd like to study are manually added to a text file (study.txt). Each time the software is loaded, it checks for new words in that file and also compares them to a dictionary (a tab-separated file, dictionary.txt), and adds that to a matrix. The flash cards are thus automatically generated from study.txt and dictionary.txt.
Now, the software must manage lots of information about each word I'd like to study and add new information made while interacting with the program (such as when that word should be studied next).
That seems easy to put into a matrix. But what is the best way to put that information in a place where I can pull it back when I run the software tomorrow? Do I need to save the matrix to a CSV file, then convert the CSV file back to a matrix the next time the application is run?
This is one of the strangest problems I've run into while programming. Maybe there's just something wrong with my version of gcc or something.
The main problem comes at this point in the code:
Code: po = makePoFromScorbotXYZPR(X, Y, Z, P, R); h = makeHB2GFromPo(po); printf("%le", *h[1][0]); //##################################### Here it has the right value printf("%s", "
The first two rows of the second column are being replaced into the last two rows of the first column, now I even checked in visual studio and it works fine there. A friend tried my code and he gets it even worse: column 1:
0,0,0,0,1,1,1,1,1,1 column 2: 1,1,1,1,1,1,1,1,1,1
As far as I've seen it must be a problem with GCC, unfortunately I need to have this up and running in GCC no matter what.
I am learning network programming via a book of Richard Stevens.The sample source codes are given here http://www.unpbook.com/unpv13e.tar.gz I downloaded and unzipped the file in /usr/src folder.As per the instructions given in README of downloaded archive I did.
How do I generate sql result into xml ? Tried this way (shown below), but it generates all data into single column.
Code: Select allgenerate_xml() { Â Â Â Â f1=_tmp1 Â Â Â Â f2=_tmp2 Â Â Â Â cat $SQL_QUERY_OUT |sed -e 's/^"//g;s/"$//g;s/","/|/g'|tr '|' ' ' > $f1 Â Â Â Â [ -e $SQL_QUERY_OUT ] && rm $SQL_QUERY_OUT
I wanted to get the ORACLE_HOME of the listener's running on the server.I have been using the following to get the reult. /opt/oracle/admin/PHYPE/bdump> ps -ef|grep /bin/tnslsnr|grep -v grep|awk '{print $9}'
I have a variable (call it $valAS) that gets calculated . Also, i have a files Bassu3. if $valAS= 45368 (2nd part of 2nd line in Bassu3) after calculation, then $result=45368, but if $valAS != 45368 then $result= $valAS
Bassu3:
Quote:
name.srv name 45368 (value always changing) name 99999 name 88888
I'm using the following awk command to find out the users home directory from /etc/passwd file.#grep jeesun /etc/passwd |awk 'BEGIN {FS=":"};{print $6}'But problem is when there are two name like "jeesun" and "jeesunadm" exist the script shows both result not specific one.
It is under PHP/MySQL $queryresult = $conn->query("INSERT INTO normalrequests VALUES($finalkey, 1234, 5678, FALSE)"); It is connected to the database successfully but I feel there is something wrong with the statement up there.
I'm trying to create a program that would locate the oldest file of a certain type on a server. Here's the commands:
OLDEST_PATH=`find -L / -depth -maxdepth 6 -mindepth 6 -type d | sort -f | head -1` OLDEST_FILE=`find -L $OLDEST_PATH | grep .mp3 | sort -f | head -1` ls -al $OLDEST_FILE
I'm writing this all in expect but I'm having problems. The main problem I have is whenever I try to run the first command, I can't seem to isolate the result of the OLDEST_PATH so that the 2nd command will work. There always seems to be a newline in the variable and the result is only "find -L" command running and it bypasses the variable. If I can just figure out how to get the 1st and 2nd command to work, then I can figure out the 3rd. Here's some code:
I know there is a better way to write this. I've tried multiple ways and this just happens to be the last way I've tried it. If you try running this, you'll notice that there is still carriage returns after the result of OLDEST_PATH and it prevents the 2nd "find" command from working properly.
I am using the script below but need to make it to show the result in a html popup window. The script is Free and I don't think Kristina will complaint by making it more versatile.
The problem I have is that the script moves to a standalone window to show the results. I am interested in making it "popup' a window with the results.
Code: #!/usr/bin/perl # NOTE: You must change the line above to point to the path to Perl # on your system. ######################################################################### ##### AffordaBilly v1.0# ##### Copyright 2001, Kristina L. Pfaff-Harris, scripts@tesol.net#
I am new to perl and am having trouble adding some strings together.
My full code is below:
The problem is $NewCommandB is always split into two lines, where the second line contains the "/atlas2/<blah>/<etc>/..." string. Since I am generating a .sh file to execute a lot of similar commands I need the string to all be on one line. Any idea why I get this behaviour and any suggestion on how to tell perl to make $NewCommandB a one line string?
Btw for completeness finalFileList.txt contains just file names one line after another:
I am not new to PC programming. I have been able to write C++ console programs. They are not too hard to write.Now, I want to move up to the Linux C++ Graphical User Interface (GUI) programming.Can an experienced member of the Linux community recommend a good reference book for programming the GUI windows?
I am not sure if this is possible. I have IP's stored in a mysql database. When I query the database, it returns the IP. I would like to replace the IP with something else prior to displaying the results. Is it possible even though I have not stored it in the database?
I have the following in a while loop (mysql_fetch_array).
Code: <td align="left">' . $row[IP] . '</td>
Instead of displaying $row[IP] from the database, I would like it to display something else which I define in the PHP code but based on the IP.
What i am trying to do is i want to add numbers from 1 to 100. but that too using multiprocessing. So i made a c programme and using fork() command made two child processes. Now in one child process i am adding from 1 to 50. and in another i am adding 51 to 100. and then in the parent process adding the two results to get the final one. Now the result from the two function i am getting correctly. But after the wait() call the value returned is lost : See the programme below for reference
I'm looking for javascript tutorials or books that meets the following criteria:
1. Very thorough: Starts with the most fundamental concepts and progresses logically from basic to advanced concepts, without skipping over important ideas for the sake of expediency.
2. Lots of small practice exercises that parallel the concepts and syntax being learned.
I've looked at a lot of tutorials, but they all tend to be lacking in one of these areas or the other.
In the following code, I am trying to define a matrix in CCS (which is equivalent to CSR for a symmetric matrix, right ?) in ARPACK++. I have installed and patched ARPACK++. (The matrix is not sparse, but still it should not give an error)
[code]...
Why is this so ? I have checked the values of ia and ja by running intel MKl on the matrix to find the CSR (again, CSR=CCS for symmetric matrix, right ?--I am asking this because ARPACK++ uses CCS, not CSR), and the values are the same. Is this some problem of 0 and 1 indexing ? Does ARPACK++ use 1 indexing?
The issue which I am having is that, when it does the search for the correct row to be inputted into valuecheck, it will input the value as written in the database, which is in Uppercase. For this case, if I type in stupid for $Title and jerlyn for $Author, it searches the correct row, but the awk will print "STUPID" into the variable as that is what is written in the database. So how can I make my if statement case insensitive? Currently it reads like this:
Code: if [ $Title = $valuecheck ] ; then which means if [stupid = StUPiD ] ; then
How can I make the if statement it case insensitive to allow it to display "HOHOHO"
I would like to unzip a simple PHP code files, to have a online PHP contact / phone book. Simply, slow, and not database oriented over complicated setups into settings. I have a PHP / web provider (free), not apache. WITHOUT SQL (like before it may exists) something like this [URL]