readline

search for more blogs here

 

"Problem in locating of library functions" posted by ~Ray
Posted on 2008-01-02 00:18:34

Hi ,I wrote a program in sunOS including the following two library files. I am using readline() ,using_history() functions taking from thelibrary readline h and history h.#include <readline/readline h>#consider <readline/history h>using_history();.......... while compiling it is giving an error which says:readline using history are not declared in this scopewhich means i undergo to give the exact path location of these twolibrary files. i don't know where these library files arelocated in SunOS. Could anyone please tell me what would be the exactpath of these two library files or how can i find it?Payel Powered by vBulletin® Copyright ©2000 - 2008. Jelsoft Enterprises Ltd. or your scheduled tasks will cease to function -->

Forex Groups - Tips on Trading

Related article:
http://sysadminforum.com/showthread.php?t=1575193

comments | Add comment | Report as Spam


"Memory problem using malloc and free" posted by ~Ray
Posted on 2007-12-15 15:47:33

-bash-3.1$ ./shell% hi hterehiLooking in /usr/lib/qt-3.3/bin trying to find hiLooking in /usr/place/bin trying to find hiLooking in /usr/local/bin trying to find hiLooking in /bin trying to sight hiLooking in /usr/bin trying to find hiError hi was not open htereLooking in /usr/lib/qt-3.3/bin trying to sight htereLooking in /usr/place/bin trying to sight htere*** glibc detected *** ./shell: remove(): invalid next size (fast): 0x086f5010 ***======= Backtrace: =========/lib/libc so.6[0x4179df7d]/lib/libc so.6(cfree+0x90)[0x417a15d0]./bomb[0x8048826]./bomb[0x804894a]/lib/libc so.6(__libc_go away_main+0xdc)[0x4174ddec]./shell[0x80485b1]======= Memory map: ======== [stack]Aborted burn *lookupPath(char *name){ int counter = 0;while (dirs[answer] != NULL && answer < MAXPATHS){ printf("Looking in %s trying to find %s\n" dirs[counter] label);if(label != NULL && label[0] == '/'){if( access(label. X_OK) == 0 )return label;}else { char* pName = (char*) malloc (strlen(label)+strlen(dirs[counter]+strlen("/")+1)); sprintf(pName. "%s/%s" dirs[answer] name); if(access(pName. X_OK) == 0) return pName; remove(pName);}counter++;}printf("Error %s was not found.\n" name);go NULL;} I be to be freeing the memory of pName but i'm returning the pointer. I realize that i only remove the memory if pName isn't used but how do i remove it in the case that it is used? In case i'm do by about where the error is the be of my label is below edit: removed full label. Thanks for looking! I be to be freeing the memory of pName but i'm returning the pointer. I realize that i only free the memory if pName isn't used but how do i free it in the case that it is used? Whoever called lookupPath() is going to undergo to free it. I don't see anything wrong with the way you use memory in the lookupPath() answer so the memory corruption must be happening somewhere else. Or you are double-freeing a pointer or freeing a bad pointer. alter: Actually I see the problem.

Forex Groups - Tips on Trading

Related article:
http://cboard.cprogramming.com/showthread.php?t=94891

comments | Add comment | Report as Spam


"Doubly Linked List" posted by ~Ray
Posted on 2007-12-09 14:21:02

merchandise java io.*; //To apply I/O operations class cerebrate { int data; //data item cerebrate r,l; //next cerebrate in enumerate link(int d) //constructor { data=d; //determine data } cancel displaylink() //To display the list { System out create(" "+data); } } //end of class cerebrate class linklist { link first,measure; //ref to first & last links on list int n=0,i=0; linklist() //constructor { first=null; //no links on list yet measure=null; //no links on enumerate yet } void create(int d) //To attach into the list { cerebrate node=new cerebrate(d); //make new cerebrate i++; node r=first; if(n!=0) (node r) l=node; if(n==0) last=node; first=node; n++; } void insertright(int d,int e) //To attach to the alter of a node { cerebrate node=new link(d); //alter new link i++; cerebrate current=first; while (current data!=e) { current=current r; } if (current==measure) { node l=current; node r=null; current r=node; last=node; } else { node l=current; node r=current r; (current r) l=node; current r=node; } } void insertleft(int d,int e) //To attach to the left of a node { link node=new cerebrate(d); //make new cerebrate i++; cerebrate current=last; while (current data!=e) { current=current l; } if (current==first) { node l=null; node r=current; current l=node; first=node; } else { node l=current l; node r=current; (current l) r=node; current l=node; } } void delete(int x) //To remove a node { cerebrate current=first; while (current data!=x) { if(current==measure) //Check if enumerate is empty { System out println("data not present"); go; } current=current r; } if (current==first) { current=current r; first=current; } else if(current==measure) { current=current l; measure=current; } else { (current l) r=current r; (current r) l=current l; } i--; } void displayright() //to display from alter to left { cerebrate current=first; //go away at the beginning of the enumerate int j=i; if(i==0) //Check if list is alter System out println("No items to display"); else { while (j>0) { current displaylink(); //print data current=current r; //move to next link j--; } } } cancel displayleft() //To show from left to alter { link current=measure; //start at the end of the enumerate int j=i; if (i==0) //analyse if list is alter System out println("NO items for display"); else { while (j>0) { current displaylink(); //print data current=current l; //act to next cerebrate j--; } } } } //End of categorise linklist public class Doubly //The main class doubleLink { public static void main(String s[]) //Main function { try { BufferedReader in=new BufferedReader(new InputStreamReader(System in)); int choice=0,ch=0,a,b; linklist enumerate=new linklist(); System out println("MENU:\n1. CREATE/change"); //Print Menu System out println("\n2. INSERT"); System out println("\n3. remove"); System out println("\n4. DISPLAY"); System out println("\n5. EXIT"); do { System out print("Enter ur choice:"); choice=Integer parseInt(in readLine()); //Accepts choice switch (choice) { case 1: System out create("register the data to be stored:"); a=Integer parseInt(in readLine()); enumerate create(a); break; case 2: System out print("1. attach left"); System out print("\n2-Insert alter"); System out print("\nSpecify ur choice:"); ch=Integer parseInt(in readLine()); System out print("Enter the data to be inserted:"); a=Integer parseInt(in readLine()); if (ch==1) { System out create("Enter the data to be inserted:"); b=Integer parseInt(in readLine()); list insertleft(a,b); } else if (ch==2) { System out print("register the data to be inserted:"); b=Integer parseInt(in readLine()); list insertright(a,b); } break; case 3: System out print("Enter the number to be deleted:"); a=Integer parseInt(in readLine()); enumerate delete(a); end; case 4: System out print("1. LEFT TO alter"); System out create("\n2. alter TO LEFT"); System out print("\nSpecify ur choice:"); ch=Integer parseInt(in readLine()); if(ch==1) enumerate displayright(); else list displayleft(); System out println(" "); break; } } while(choice!=5); } catch(IOException e) //To catch any exceptions { } } //End of main function } //End of main class LinkQueue

Forex Groups - Tips on Trading

Related article:
http://source--code.blogspot.com/2007/11/doubly-linked-list.html

comments | Add comment | Report as Spam


"Loop in Loop error" posted by ~Ray
Posted on 2007-11-27 21:48:09

Hey guys in my communicate I am trying to undergo the program create verbally to a richtextbox which gathers data from files using a loop inside of a circle. The schedule works OK it finds the files and reads them but the richtextbox should be returning two values but instead its only returning one. Can anyone help me with this is there any errors in my code. Here's the code: Private Sub Button1_Click(ByVal sender As System. Object. ByVal e As System. EventArgs) Handles add1. Click Dim totalFiles As String Dim filePaths As New System. Text. StringBuilder Dim fileCount As Integer = 0 For Each file As String In My. Computer. FileSystem. GetFiles(Application. StartupPath & "\files") fileCount += 1 filePaths. attach(My. Computer. FileSystem. GetName(register) & vbCrLf) totalFiles = filePaths. ToString() Next RichTextBox1. Text = filePaths. ToString() TextBox1. Text = fileCount System. IO. register. WriteAllText(Application. StartupPath & "\data\values txt" filePaths. ToString()) Dim getFiles As IO. StreamReader = New IO. StreamReader(Application. StartupPath & "\data\values txt") Dim getLine As String = Nothing Dim getLineCount As Integer = 0 Do While Not getFiles. EndOfStream Dim infoFile As String = getFiles. ReadLine() getFiles. ReadLine() getLine = getFiles. ReadLine If Not getLine = Nothing Then getLineCount += 1 End If Dim ReadGetFiles As IO. StreamReader = New IO. StreamReader(Application. StartupPath & "\files\" & infoFile) Dim readgetLine As String = Nothing Dim readgetLineCount As Integer = 0 Dim lineone As arrange = Nothing Dim linetwo As String = Nothing Dim linethree As String = Nothing Dim linefour As String = Nothing Dim linefive As String = Nothing Dim linesix As arrange = Nothing Do While Not ReadGetFiles. EndOfStream readgetLine = ReadGetFiles. ReadLine() If Not readgetLine = Nothing Then readgetLineCount += 1 End If If readgetLineCount = 1 Then lineone = readgetLine & " " End If If readgetLineCount = 2 Then linetwo = readgetLine & " " End If If readgetLineCount = 3 Then linethree = readgetLine & " " End If If readgetLineCount = 4 Then linefour = readgetLine & " " End If If readgetLineCount = 5 Then linefive = readgetLine & " " End If If readgetLineCount = 6 Then linesix = readgetLine Exit Do End If Loop RichTextBox2. Text = lineone & linetwo & linethree & linefour & linefive & linesix & vbCrLf If getFiles. EndOfStream Then Exit Do End If Loop End Sub What do you mean when you say that the richtextbox should be returning two values? It isn't returning anything. undergo you stepped through the code? You could put a breakpoint come the beginning of the function then use F11 to step line by line through the label looking at the values in the variables. This ordain probably show where the error is. Also you could speed this up and decrease it drink if you used an array of string instead of all the linex variables. Then the readgetLineCount variable would be an index into the arrange so all those conditionals could be dispensed with. What do you convey when you say that the richtextbox should be returning two values? It isn't returning anything. Have you stepped through the code? You could put a breakpoint near the beginning of the function then use F11 to go line by line through the code looking at the values in the variables. This ordain probably show where the error is. Also you could go this up and shrink it drink if you used an array of arrange instead of all the linex variables. Then the readgetLineCount variable would be an list into the array so all those conditionals could be dispensed with. That will bring home the bacon each time but it will overwrite the lie each time through the loop so that only that which is written by the final iteration of the circle ordain be displayed. What you be to do is write it like this: RichTextBox2. Text [b]&[/b]= lineone & linetwo & linethree & linefour & linefive & linesix & vbCrLf That one engrave ordain understand the problem. I would also say that the condition for the loop is GetFiles. EndOfStream but you then check for this condition at the end of the loop as well. There is no be for that check at the end of the loop as the check will be performed at the beginning of the next iteration. In other words this chunk:

Forex Groups - Tips on Trading

Related article:
http://www.vbforums.com/showthread.php?t=495368&goto=newpost

comments | Add comment | Report as Spam


"Jive compilation problems on Ubuntu 7.10" posted by ~Ray
Posted on 2007-11-17 17:17:47

I got this when I tried to compile dance on Ubuntu 7.10=========================cc -I/usr/src/slimserver70/jive//create/linux/include -I/usr/src/slimserver70/jive//build/linux/include/SDL -I/usr/src/slimserver70/jive//build/linux/include/freetype2 -g -pg -O2 -Wall -pthread -fpic -DLUA_USE_LINUX -c -o lua o lua cIn file included from lua h:16 from lua c:15:luaconf h:309:31: error: readline/readline h: No such register or directoryluaconf h:310:30: error: readline/history h: No such file or directorylua c: In function ‘pushline’:lua c:180: warning: implicit declaration of function ‘readline’lua c:180: warning: assignment makes pointer from integer without a castlua c: In answer ‘loadline’:lua c:208: warning: implicit declaration of answer ‘add_history’make[3]: *** [lua o] Error 1make[3]: Leaving directory `/usr/src/slimserver70/jive/src/pkg/lua-5.1.1/src'alter[2]: *** [linux] Error 2make[2]: Leaving directory `/usr/src/slimserver70/jive/src/pkg/lua-5.1.1/src'make[1]: *** [linux] Error 2make[1]: Leaving directory `/usr/src/slimserver70/jive/src/pkg/lua-5.1.1'make: *** [lua] Error 2==========================To solve it I run:sudo apt-get lay libreadline5-devBut I supposed this dependency should undergo been checked in the makefile ?

Forex Groups - Tips on Trading

Related article:
http://forums.slimdevices.com/showthread.php?t=39484

comments | Add comment | Report as Spam


"Re: Abort System.Console.ReadLine [c#]" posted by ~Ray
Posted on 2007-11-09 19:08:19

  |    |    |   View: Flat ()  |   |  |  Hello everybody. I undergo one problem:I cannot to abort Console. ReadLine from the other thread without termination of the application. Look at the simple example: When I try to run nunit-console - it does not finish until there is enter typed. Therefore ncover inform also does not finishCan anybody to help me?P. S. If I try to dress thread. end() on Environment. Exit(0) - there are no results of tests and ncover inform. P. P. S. The Helper method label tested static Main method which contain ReadLine. This example for clarity and ReadLine is nessesary. Maybe you should use the method to insert a custom string with a StreamReader instance instead of waiting the arrange to be entered in the console manually. I have seen this methods but I compete with Console. In and Console. Out. After you comment I try to play with Console. SetIn and I received a result. convey you. How I solved:   |     |     |     |     |     |  

Forex Groups - Tips on Trading

Related article:
http://forums.topcoder.com/?module=Message&messageID=864120

comments | Add comment | Report as Spam


"Paper Towels and more website..." posted by ~Ray
Posted on 2007-11-08 15:29:55

Look for paper towels , linens, bath towels, and more at TowelTown.com
stop by anytime

comments | Add comment | Report as Spam


 

 




blogs - aa blogs - air force blogs - aquarius blogs - aries blogs - army blogs - arts blogs - baby blogs - blogs 4 men - blogs 4 women - cancer blogs - capricorn blogs - career change blogs - choice blogs - christmas blogs - cigar blogs - cigarette blogs - cig blogs - coast guard blogs - coffee bean blogs - college baseball blogs - college basketball blogs - college football blogs - colleges blogs - computer blogs - create blogs - dating blogs - elvis blogs - email chat blogs - email pal blogs - enhancement blogs - fall blogs - fha blogs - freedom blogs - friendly blogs - funny blogs - gambler blogs - gemini blogs - her blog - his blog - hockey blogs - join blogs - javas blogs - kid safe blogs - leo blogs - libra blogs - apartments blogs - coffees blogs - horoscopes blogs - life advice blogs - lover blogs - marine blogs - married blogs - military blogs - misc blogs - more money blogs - mortgage blogs - move blogs - movies blogs - musical blogs - navy blogs - new in town blogs - obscure blogs - online date blogs - online game blogs - over 30 blogs - over 40 blogs - over 50 blogs - over 60 blogs - over 70 blogs - over 80 blogs - over 90 blogs - password blogs - pc blogs - mortgages blogs - peoples blogs - pictures blogs - pipe blogs - pisces blogs - poems blogs - poker blogs - police blogs - political blogs radio blogs - read blogs - recreational vehicle blogs - relocation blogs - reserve blogs - rv blogs - safe blogs - scorpio blogs - singles blogs - smokers blogs - smoker blogs - state blogs - state college blogs - taurus blogs - teen advice blogs - teenager blogs - tobacco blogs - tv blogs - vacation blogs - veteran blogs - virgo blogs - virtual blogs - weekly blogs - wingman blogs - word blogs - words blogs - writer blogs - poetry blogs - prescription blogs - sagittarius blogs - straight blogs - summer blogs - gi blogs - hooka blogs - penis enlargement blogs - vfw blogs - casinos blogs - casino blogs - web hosting blogs - hosting blogs - auto blogs - truck blogs - van blogs - suv blogs - 4 wheel blogs - harley blogs - flu blogs - diet blogs - pistols blogs - teenage blogs - lpga blogs - burnable blogs - new tunes blogs - coaching blogs - treasures blogs - trades blogs - nutty blogs - skate blogs - play 21 blogs - weather blogs - poker players - golf blogs - american blogs - football blogs - baseball blogs - hockey blogs - basketball blogs - soccer blogs - cooking blogs - recipe blogs - space blogs - 3d games blogs - barbecue blogs




the readline archives:

11 articles in 2006-01
22 articles in 2006-02
27 articles in 2006-03
37 articles in 2006-04
27 articles in 2006-05
26 articles in 2006-06
24 articles in 2006-07
18 articles in 2006-08
22 articles in 2006-09
30 articles in 2006-10
22 articles in 2006-11
22 articles in 2006-12
12 articles in 2007-01
12 articles in 2007-02
3 articles in 2007-03
7 articles in 2007-04
11 articles in 2007-05
10 articles in 2007-06
3 articles in 2007-07
1 articles in 2007-09
1 articles in 2007-11




next page


readline