233 Topics

Member Avatar for
Member Avatar for udigold1

Hi, I'm trying to parse a csv fiel using a code i've found on line: [CODE] private DataTable ParseCSV(string path) { if (!File.Exists(path)) return null; string full = Path.GetFullPath(path); string file = Path.GetFileName(full); string dir = Path.GetDirectoryName(full); //create the "database" connection string string connString = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=\"" + …

Member Avatar for alc6379
0
199
Member Avatar for naffan

Good morning all, Hopefully a quick solution, I've done some reading up on taking command line arguments and I almost have it licked, but I'm running into some trouble trying to send into a method.. I'll give you an example of what I mean Let's say I want to send …

Member Avatar for naffan
0
387
Member Avatar for MaYouSHka

hi all, i have been working for two months on a project and i have come up with an algorithm that is a mix of R. Mitkov's algorithm on anaphora resolution (robust, knowledge-poor algorithm) and several filters that are applied first to the xml file (a POS tagged text) to …

Member Avatar for TrustyTony
0
332
Member Avatar for The Road To Voi

So I've made a Task Scheduling application (for learning purposes). The program currently saves all the data in simple text form. I use Regex to split the data up and assign it to the appropriate variables. I don't really like this way of doing things as it seems messy and …

Member Avatar for williamrojas78
0
263
Member Avatar for SMITA6076

I wrote the following method to get the current date for an invoice: [CODE] public String getDate() { DateFormat dateFormat = new SimpleDateFormat("MMMMMMMMM d, yyyy"); Date orderDate = new Date(); return dateFormat.format(orderDate); }[/CODE] but now I have to add two weeks (14 days) to that date (to get the expected …

Member Avatar for SMITA6076
0
920
Member Avatar for kunal_28parikh

Hi, i am new here and complete amateur to PHP. I get the above error on line 2. but i don't get it? Can someone help please? [CODE] <?php function bp_dtheme_add_custom_header_support() { $get_current_scheme = get_option('dev_buddydaily_custom_style'); if(($get_current_scheme == '') || ($get_current_scheme == 'default.css')) { $headerpath = "%s/library/styles/images/default_header.jpg"; } else{ $headerpath = …

Member Avatar for tiggsy
0
293
Member Avatar for ChaosCoder

What I'm trying to do is parse a CSV file that has column headers, and map those headers - ideally to a class. The tricky part is that I need to be able to support various mappings because it will be interacting with different systems that give the headers different …

Member Avatar for ChaosCoder
0
1K
Member Avatar for JordanHam

[CODE]#define _LL_BUFFSIZE_ 2048 string lastLine; lastLine.clear(); // regardless, zero out our return string char buff[_LL_BUFFSIZE_]; // our temporary input buffer data_filet.seekg (0, ios::end); // go to end of file int length = data_filet.tellg(); // find out how large it is data_filet.seekg(length-min(length,_LL_BUFFSIZE_),ios::beg); // seek back from end a short ways // …

Member Avatar for JordanHam
0
4K
Member Avatar for insanely_sane

Here's an easy one for you experts :P What is casting and parsing? How exactly are they different? After explaining, could anyone possibly tell me how to cast/parse the various types from and to each other? (the types being: int, double, char and String) Also, in which situations would I …

Member Avatar for Mattox
0
248
Member Avatar for madval88

I have a Mysql database and I am trying to import multiple records with multiple columns into Flash AS3 using PHP. My problem is I am able to make it work with a single column and multiple records but for multiple columns I am not being able to format it …

0
87
Member Avatar for JordanHam

I am using getline to read a CSV file. The line it reads looks something like "1/24/2010 6:19 1/24/2010 6:59 Merrill - Valley Farms yhy 69 Vegetation 55" The getline works but, I need to be able to calculate time days between a date the user inputs and the date …

Member Avatar for JordanHam
0
220
Member Avatar for rjbrjb777

i have a program in c language that reads csv file.. now i want to read data column wise.. i want the whole program..which will take file name as command line argument and will fetch second column from the file.. lets assume file is like below.. aggromat,"1","abc","8903" aggromat,"2","abc","ddds" reply as …

Member Avatar for rjbrjb777
0
2K
Member Avatar for ayoitzrimz

Hello everyone, I'm really struggling with this problem: Suppose we have the following grammar fragment for a language that allows an assignment to appear in any context in which an expression is expected: the value of the expression is the right-hand side of the assignment, which is placed into the …

Member Avatar for sloan31
0
133
Member Avatar for Srinivasrajan

How to find errors in a given xml file, for e.g., in the following xml file.... <?xml version="1.0" encoding="ISO-8859-1"?> <bookstore> <book category="cooking"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="children"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="web"> <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> …

Member Avatar for mrame
1
158
Member Avatar for PKW

I'm looking for a tool that can read text on a web page, or within a web-based document viewer, and insert a polling plugin of sorts at the end of each paragraph. More specifically, I would like my website to display documents inside some kind of reader. Then, I'd like …

Member Avatar for PKW
0
121
Member Avatar for eman neercs

What I want to do is to take the previous day's logfile, strip out the search phrases and insert these into a mysql db. Currently using Deep Log Analyser to manually lift the search terms, but I's appreciate some pointers as to how the parsing could be done by a …

Member Avatar for nonshatter
0
137
Member Avatar for toadzky

I am trying to modify and recompile a dll file. I disassembled it so I have the C# code. I also have the .resources file that is a Pack URI. I want my version to have it's own resources file, but I need parts from the original. How can I …

Member Avatar for toadzky
0
211
Member Avatar for jrhitokiri

I am trying to get Domain names/URLs from the title and description in ebay, but the text varies a lot. Note that the url/domain names are limited to *.com, *.net, *.info, etc. For instance, I'd have to parse through text such as: IPAD SCREEN LENS.COM 3 4 5 Letter LLLL …

Member Avatar for jrhitokiri
0
119
Member Avatar for Emzielou90

I have a site hosted by zymic and everying has been running fine until the file manager went down so i've bin trying the FTP and i edited my site and when i re uploaded it i found this message Parse error: syntax error, unexpected ',' in /www/zzl.org/a/b/s/absolutelydoctorwho/htdocs/index.php on line …

Member Avatar for Emzielou90
0
456
Member Avatar for messengerman

i want to parse a file,my problem is in lines 2,3,4 of each person(every 4line make a person from my class person)numbers of my variables in lines 2,3,4 changed.i want to push_back each of variable in line 2 in a vector until it comes to "\n",i want to continue this …

Member Avatar for jonsca
0
272
Member Avatar for Nitin Daphale

I take value from textbox as, [CODE] var perOfEasyQues = parseInt(document.getElementById("<%=txb_EasyQuesPerc.ClientID%>").value); [/CODE] but as I put 012 it takes 10. Can anybody suggest solution over it?

Member Avatar for Nitin Daphale
0
79
Member Avatar for valdrian_miran

How will I parse this XML using jQuery? <item> <station></station> <headline><![CDATA[]]></headline> <showDate>12/28/2010</showDate> <showTime></showTime> <doorsOpen></doorsOpen> <buylink></buylink> <description><![CDATA[]]></description> <pubDate>Mon, 27 Dec 2010 10:48:28 PST</pubDate> </item> I have to display month and date separately..

Member Avatar for parry_kulk
0
123
Member Avatar for Safia Abdalla

I was curious about the workings of extracting URLs fro webpages. I did several searches for this subject online, and discovered that some people preferred using regular expression while others preferred using parsers. I would like to ask the Daniweb community what they prefer. If you prefer a regular expression …

0
84
Member Avatar for nosehat

I am working on a project where I need to parse a bunch of user text that comes in different fields. The problem is that the user input doesn't always come in on the same fields. One user might have a name in field 3 and a date in field …

Member Avatar for richieking
0
123
Member Avatar for killerpopiller

Problem with storing extracted values in SQLite - How to adress or index list of values for proper insertion into table. The Regex works fine: input logging data looks like: 0.0.0(06026104) 1.6.1(0.1501)(1011111000) 1.6.1*32(0.1446)(1010190800) 1.8.1(02484.825) 1.8.1*32(02449.574) correct regex output: 06026104 0.1501 02484.796 [CODE] with open("usage.log") as fp: for line in fp: …

Member Avatar for killerpopiller
0
239
Member Avatar for zlloyd1

I have recently been getting a parse error that reads : Parse error: parse error in C:\wamp\www\Jumble.php on line 20 Anytime I run an HTML program on my wamp server and it is regarding a php file called Jumble.php which is supposed to arrange the data entered into the HTML …

Member Avatar for Dragonbaki
0
171
Member Avatar for Sunshineserene

Hi all, I want to parse the elements in my arraylist to double. May I know how to implement that? [CODE]import java.io.*; import java.util.*; public class Array2 { static ArrayList myDouble = new ArrayList(); static String[] temp; static String[][] finalTemp; static String[] arr; static int rows; public static void main(String …

Member Avatar for BestJewSinceJC
0
6K
Member Avatar for Sunshineserene

Hi all, this is my codes. [CODE]import java.io.*; public class Testing3 { static double[][] mydouble; static int a, b; static double d; static String[] temp; public static void main(String args[]) throws Exception { try { BufferedReader in = new BufferedReader(new FileReader("C:\\Users\\Serene\\Documents\\Major Project\\Alignment Algorithms\\Testing2.txt")); //reading files in specified directory String str, …

Member Avatar for Sunshineserene
0
2K
Member Avatar for Setvir

Anyone have an idea what the regex would be for preg_split to split a string at a semicolon ([icode];[/icode]), but ignore any quoted (single or double) parts as well as ignore escaped ([icode]\;[/icode]) semicolons? I have tried to decipher this one and could not (regex not my strongpoint - YET) …

Member Avatar for Setvir
0
160
Member Avatar for Sunshineserene

Hi, I have a text file that I'm going to read, and then parse it. After parsing it, how do I return it into it's original position or layout as before? Because now after parsing it, my output is printed out individually, instead of printing it out how it looks …

Member Avatar for Sunshineserene
0
205

The End.