Hello all! I am making a site for a club on campus and we need to show the presidents quotes on the site. He has some lengthy ones so I want to save space (can't tell him to KISS) so I'm using a little code I learned to do so. This code retrieves text (or xml but im sticking to text) elements and allows me to display them in the area. when someone is done reading that quote they can click on another question (link) and the answer text will appear there. here is the HTML: [code] <div id="presQs"> <p> …

Member Avatar
+0 forum 0

[CODE]if(num/100>=1) { x=num/100; switch(x) { case 1: cout<<"one hundred "; break; case 2: cout<<"two hundred "; break; case 3: cout<<"three hundred "; break; case 4: cout<<"four hundred "; break; case 5: cout<<"five hundred "; break; case 6: cout<<"six hundred "; break; case 7: cout<<"seven hundred "; break; case 8: cout<<"eight hundred "; break; case 9: cout<<"nine hundred "; break; } num=num%100; } if(num/10>=1) { x=num/10; switch(x) { case 2: cout<<"twenty "; break; case 3: cout<<"thirty "; break; case 4: cout<<"fourty "; break; case 5: cout<<"fifty "; break; case 6: cout<<"sixty "; break; case 7: cout<<"seventy "; break; case 8: cout<<"eighty …

Member Avatar
Member Avatar
+0 forum 2

Hey am trying to read contents of a text file into memory and will be read later by a different function. This is how i am considering doing it I was thinking of reading the whole file into an array but thought it might be too big seeing as file has alot of lines of text in it [CODE] Channel :: Channel(char* channelName, char* channelNumber, char* fileName) { this->channelName = channelName; this->channelNumber = channelNumber; this->fielName = fileName; fstream* file = new fstream (FileName, fstream :: in); char aSingleCharacter; aSingleCharacter = (char) file->get(); while(aSingleCharacter != EOF) { aSingleCharacter = (char)file -> …

Member Avatar
Member Avatar
+0 forum 7

I have a website that i have uploaded an applet to. In the same dir as the applet, I have uploaded three textfiles that the program uses. The applet works perfectly in the appletviewer runing off of my computer, but when i upload the class online it seems that the program cannot acess the text files. The functions of the program work fine, except for the part where it reads the text file. I have heard of policy files, but I havent been able to find out how to implement them into my applet or webpage. Any help would be …

Member Avatar
Member Avatar
+0 forum 1

It seem that PIL was built without FreeType support. how do I Install the FreeType dev files and rebuild PIL again.

Member Avatar
+0 forum 0

Hi I'm new to computer programming. 'Im just needing to learn some basic c++ for a larger project. So if someone wouldn't mind guiding me through some basics on i/o streams. I need to able to open a .txt file saved on my c drive and be able to count certain words in the file. So far Im just trying to figure out how to open a text file. This is what I have: [code] // reading a text file #include <iostream> #include <fstream> #include <string> using namespace std; int main () { string line; ifstream myfile ("example.txt"); if (myfile.is_open()) …

Member Avatar
Member Avatar
+0 forum 10

Hi I need to insert a flat text file into a SQL Server table using C#. The text file lines are 500 characters long and I will need to break it up into columns. Column 1 – 6chars, Column 2 – 1chars, Column 3 – 8chars I’ve managed to read the lines, but I can’t get it into the database. Please help

Member Avatar
Member Avatar
+0 forum 8

Hi, I need to write a program to send data from a particular excel sheet in a workbook to a notepad. Say,I've an xl sheet with the following columns: "Name,Age,Salary" with values "john,24,1000" respectievely,Now I need a C# program to read the xl sheet and write the values onto the Notepad (in Tab separated format) as follows: John 24 1000. I need to write all the columns in the xl sheet into the notepad as follows. Before I ask any help,let me make it clear that I'm a beginner to this stuff,and while I have done some programs dealing with …

Member Avatar
Member Avatar
-1 forum 1

Hi, i am new at shell scripting and i need your help. i have a very big txt file that contains articles,authors,etc. Each article has this form: .I <article's serial number> <article information(in new line)>. What I need is a script tha will split this file into smaller ones.The script should find the character '.I' and put the characters after '.I' into a new .txt file named after the article's serial number. Please help me...:S

Member Avatar
Member Avatar
+0 forum 5

Im currently working on a project where i need to read a text file containing a list of users and let it be stored in a database. Here is my text file: headers(ID number, LastName, FirstName, MiddleInitial,Course and Year): 2070939 Carter, Billy Joe K. BSIT 4 2070123 Daniel, Michael Ericson P. BSIT 4 2070432 Jones, Gail D. BSIT 4 2070635 Jones, Julia Marie L. BSIT 4 2072782 Tarver, Sonny J. BSIT 4 I need to extract them per column and insert them into different arrays. In my code below i extracted the id numbers and the last names. My problem …

Member Avatar
Member Avatar
+0 forum 1

Hi all, I'm new to Java and going through a steep learning curve. Every now and then I'm getting dead stuck, so your help is immensely appreciated. So, here's the problem: (with Java NetBeans IDE) I have a JFrame form, and in it 4 JComboBox'es. Also a JButton titled "Enter". So when I click on the "Enter" button I want to read the selected ComboBox Text for all the ComboBoxes. e.g. if ComboBox 1 = "Ford" ComboBox 2 = "Focus" ComboBox 3 = "Red" ComboBox 4 = "2005" then upon clicking the "Enter" button I would like to have something …

Member Avatar
Member Avatar
+0 forum 6

In VS 2008, for example I have sql command like SELECT * FROM STUDENTS WHERE STUDENTID = @STUDENTID Then I append value into it, for example 15 How to I catch this sql command SELECT * FROM STUDENTS WHERE STUDENTID = 15 Thx in advance

Member Avatar
Member Avatar
+0 forum 1

i was going through many ruby books and found this amazing text editing code (its just 17 lines ) provided u use Shoes toolkit. The code is working fine with no errors . but its only able to read (open) and input file but not save the text u wrote in the text box into a file. [CODE] Shoes.app(:width => 600, :height => 500) do stack do flow do @open_button = button "Open" @save_button = button "Save" end @t = edit_box :width => 0.9, :height => 400 end @open_button.click do @t.text = File.read(ask_open_file) end @save_button.click do File.new(ask_save_file, 'w') do |f| …

Member Avatar
+0 forum 0

Exactly as the title says. [URL="http://www.kammerl.de/ascii/AsciiStereoMovie.php"]ASCII 3D Magic Eye movie[/URL] You can customise the image, colours, and its' movement any way you like further down the page. Also, as an added bonus, Star Wars [URL="http://www.asciimation.co.nz/#"]HAND DRAWN STAR WARS: ASCII MOVIE.[/URL] This deserves credit purely because of the skill and time this guy has put into this project... Comment! Add your own Ascii links here!

Member Avatar
+0 forum 0

hi there got a couple of probs, say in my text file i have: abase abased abasement abasements abases -------- This coding below is meant to find a word in a file and print all the lines to the end of the file. But it doesnt, it only prints out my search term and not the rest of the file. [CODE] search_term = r'\b%s\b' % search_term for line in open(f, 'r'): if re.match(search_term, line): if search_term in line: print line, [/CODE] Say i searched for abasement, i would like the output to be: abasement abasements abases ---------- My final problem …

Member Avatar
Member Avatar
+0 forum 2

Hey everyone, I'm new to posting in these forums so sorry if I didn't post my code correctly? I think i did it...hopefully. Anyways, I've been working on this all day but I can't figure it out. (i think i will be having problems with the rest of my assignments in this chapter =( ...sigh) What I need to do: - Ask user what file to open - Display contents of file ----display 24 lines, user will strike any key to continue with the next 24 lines So my code compiles, but it shows me character by character Please help …

Member Avatar
Member Avatar
+0 forum 5

Completely frustrating - I have been googling for a solution for this for a couple of hours now. I have this little bit of code that I wish to read a text file into a Python Dictionary. I used this dictionary format internally within the another piece of code I am writing and had no problems. But trying to import it from an external text file I get a syntax error It doesn't like : or < > I suspect it is to do with the unicode. I have even removed all the illegal characters but it didn't like that …

Member Avatar
Member Avatar
+0 forum 3

I need to read from a file and be able to split it into columns and ignore a line if it starts with ' . '. the text file is made of 3 columns but at some lines there are no words in the first column here is an example of the text file BANANAS ARE YELLOW CHEESE IS YELLOW IS BLUE IS WHITE JENNY LIKES PERL . Line WITH a dot Also i want to be able to ignore the line that starts with the " . " thats just a close example of what the file looks like …

Member Avatar
Member Avatar
+0 forum 2

Hey im new here to excuse the nubneess i wanted to make a family tree thingy and wanted to do it in python i wanted to make a way so that it could read a text file and auto add a new entry called summary which would include the initials,yr of birth and the childnum could any one help me out? at the moment ive gotten it to add the summary field but i cant figure out how to do the rest [exampletxt] Fname,LName,DOB,childnum bob,smith,17/08/99/1

Member Avatar
Member Avatar
+0 forum 1

[CODE] def doKey(e): print(e.widget.get("1.0","end")) root= Tk() root.title('yada') txta = Text(root, width=40, height=10) txta.bind("<Key>", doKey) txta.pack(side=LEFT) root.mainloop() [/CODE] Pressing a key in this text area will always output the string prior to your pressing the key. Am I missing something?

Member Avatar
Member Avatar
+0 forum 4

I am currently having a problem with my BB-code editor, like most things it works great in FF, but i have an issue with IE: whenever i select a word that has already been previously typed, it selects that word instead of the one i selected. Here is the selection part of my editor: [code] if (window.getSelection){ selection = window.getSelection(); }else if (document.getSelection){ selection = document.getSelection(); }else if (document.selection){ selection = document.selection.createRange().text; } [/code] Example: The text: the [COLOR="Red"]cats[/COLOR] attack the other [COLOR="Green"]cats[/COLOR] I selected the second "[COLOR="Green"]cats[/COLOR]", but the script keeps returning the first "[COLOR="Red"]cats[/COLOR]" Does anyone have a …

Member Avatar
Member Avatar
+0 forum 9

Hello, The application I'm using prints to a COM port. I cannot get around this. I've been trying to send this data (text) to a virtual printer or a txt file and have not been successful. Is there any software that will allow data to COM ports to be redirected to a virtual printer port? Is there a way I can save the text printed to the COM port as a text file instead of actually printing it out? Any help/ ideas would be appreciated.

Member Avatar
+0 forum 0

Hi all, Left of a TextBox I have a Label and the text changes during a run so I want the text to be right aligned. So I used the TextAlign property of a Label and set it to MiddleRight. It does not work. Looked for an answer, could not find one. Don't no what I am overlooking here:-/ Any reply is more than welcome.

Member Avatar
Member Avatar
+0 forum 7

I'm fairly new to coding VB 2008 I need help converting a text document with a type of code in it. One line looks like this: 52.000000, 400.000000, 1.3107711, 0 I need to convert that to an xml file that looks like this: - <CuePoint> <Time>11619</Time> <Type>event</Type> <Name>Marker 01</Name> - <Parameters> - <Parameter> <Name /> <Value>0</Value> </Parameter> </Parameters> </CuePoint> The time in the text is 1.310771 value in text is 52.000000 I have hundreds of lines like that that need converting so I need something that will make the process automated. I looked at other posts and was unable to …

Member Avatar
Member Avatar
+0 forum 18

Hi guys, I wrote a simple text editor using C#. It can maintain the text format like font color, and font size when text pasted to it, and I able to save it to .doc, or .rtf. When I open the saved file with appropriate application like MS Word, it read it good, but here's the problem. When I try to open the saved file into my application it can't read well due to the saved format, but when I open any file saved as normal text file it works goods. So, how to overcome this??? Thanks in advance

Member Avatar
Member Avatar
+0 forum 5

So I get this call. Would I like an exclusive briefing on a new technology that's going to turn text into speech - the first one to do this 'native'. Forgive me, but no I don't. This typifies, in my view, the all-too-common view that a technical advance ought to be done for the sake of it. Let's examine a few facts: 1. There are numerous text to voice facilities on the Web. OK, they don't do texting but they do a lot else. 2. I'm really quite good at reading. 3. If I'm in a position in which I …

Member Avatar
Member Avatar
+0 forum 3

I've heard rumors of this coming for awhile, but I finally saw it while browsing DaniWeb just a couple of minutes ago. A box ad that I run with a white background, which usually displays four ads, now displays three. The extra room is reserved for some text links with a bunch of keywords, similar to the link units. However, instead of opening a new window, clicking on one of the keywords dynamically refreshes the IFRAME to present the user with new ads, in addition to making room for a search field built into part of the ad box (Many …

Member Avatar
+0 forum 0

The End.