Hello all, I have a question. You see i have a file which contains data in this format: index 388.315813 index 311.214286 syndrome 289.708333 factor 184.246753 loss 168.578313 index 451.123455 factor 321.676544 What i want to do is to read every line and print it. However if i encounter the same word again (which is in the above case, "index") i want to print the word as well as the max number that has been read. how can i do that? So far i ve written this piece of code. [CODE]word='' cvalue='' for line in open('example.txt','r'): words=string.split(line) wordcount=len(words) if wordcount …

Member Avatar
Member Avatar
+0 forum 10

Hi All Experts, Actually I am VB.Net Windows Application Developer Now i am going an ASP.Net Application. So, the Problem is that in Windows Application i Code this Project like given Below Actually i am Using SQL Server as DataBase and Store Procedure as Query. Becuase i had tried to control the ASP.Net Data Grid with Loop and i Failed to Control it with this method so can any one Help me. [B](Can any one Help that how can i Solve this Problem in ASP.Net)[/B] [CODE] Private Sub btn_Ok_Click(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles btn_Ok.Click Fill_dataset("Sel_MovNames", "Tbl_MovNames", …

Member Avatar
Member Avatar
+0 forum 1

I work as a web developer for a small-to-medium sized company. We're not huge, but we do business throughout the entire US and internationally because our service is very niche. We repair and remanufacture gas station and car wash products. We sell to distributors, who in turn service individual gas stations and car washes. Last summer I was primarily tasked with making the website not suck (because it did). Now, it's decent in terms of layout, markup, and content, but it does not have much in the way of search engine optimization. Optimizing it is my main job this summer. …

Member Avatar
Member Avatar
+0 forum 3

I am trying to store a single random number from 0 to 99 to a variable. This is what I used in my code to do that: [code]time_t t; time(&t); srand((unsigned int)t); int rTSB(rand() % 100);[/code] I am trying to make a single random picture show up when you start the program. However, when I minimize and maximize the window, my picture changes, which is not supposed to happen. Also, when I move my window off the screen and back, part of the picture is the old one and the other part that went off the screen became the other …

Member Avatar
Member Avatar
+0 forum 1

Hello! I have more or less zero knowledge about coding in PHP. The most I've done is includes, to help me maintaining my sites more efficiently. I hope I will not offend anyone with this question. Anyhow, towards my issue. I have one table containing several fields, with information such as ID, name, brand, year, measurements, thumbnail, etc. I already have a simple-looking script that I found which pulls out the information from entries and displays it through a template, but what troubles me is this: Each entry I have comes with images. First it's the item's thumbnail, which URL …

Member Avatar
Member Avatar
+0 forum 22

[CODE] import java.util.*; import java.util.Scanner; public class InputconsoleArray2 { public static void main(String args[]) throws java.io.IOException { int[] a=new int[100]; // create an array of type interger size // Objects of type Scanner are useful for breaking down formatted input into tokens and // translating individual tokens according to their data type // By default, a scanner uses white space to separate tokens. (White space characters include blanks, tabs, // and line terminators. Scanner sc=new Scanner(System.in); System.out.println("Please enter elements..."); int j=0; //int next= sc.nextInt(); //System.out.println("Next = " + next); while ( sc.hasNextInt()) { a[j]=sc.nextInt(); System.out.println(" a[j] " + j +" …

Member Avatar
Member Avatar
+0 forum 10

I have to get three pieces of information from the files i have 1. The name of the owner of the file which appears after the pattern tag <foaf:name> 2. The ID of the owner of the file which is embedded in the filename, e.g., http%3A%2F%2Ftalk.ie%2Fvbulletin%2Ffoaf.php%3Fu%3D12 belongs to user 12. The pattern Fu%3D always appears before the ID in the filename and not anywhere else in the file name. 3. The people known by the owner of the file, this may be more than one person. The pattern foaf.php?u can be used to find these IDs Here is the dir2.txt …

Member Avatar
Member Avatar
+0 forum 3

Hi, Im new to DaniWeb and C++ and was hoping some of you more experienced tech fellas could help me out with a problem. I want to open a file, then read it by 5 characters at a time by putting it into a [CODE]char[5][/CODE] type of array, then analyze those 5 characters (like go to a function if one of the characters was a '<'). When thoes 5 characters have been read with a [CODE]for[/CODE] or [CODE]while[/CODE] loop. If someone could come up with a sample script or snippet, that would be great. Any help would be greatly appriciated! …

Member Avatar
Member Avatar
+0 forum 3

The End.