Search Results

Search found 37274 results on 1491 pages for 'text parsing'.

Page 7/1491 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Make My Own Made Java Based Text editor as default Text Editor in Windows

    - by Rohan Sharma
    I have Made a Text Editor in Java and i want to make it default text editor ,That is like in windows we have notepad as default text whose icon shows on all text files and double clicking those file(s) opens the file(s) in notepad window.. I Want to achieve same Task of Making my texte editor as default one...but only right clicking a text file and selecting my text editor as default app for opening text files do not servers the purpose,Because my text editor will not accept the file input that way,its made to accept the file input only by FileChooser...so Is There any library in java to achieve that task Of Accepting The File Input That way???

    Read the article

  • Parsing String to Time and insert in mysqldatabase

    - by kawtousse
    Goal: Parse a string from an input type text into TIME type to be inserted in MYSQL Database. String start= request.getParameter("startp"); System.out.println("start:" +start); SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); long ms=0; try { ms = sdf.parse(start).getTime(); System.out.println(" the value of ms is:" +ms); } catch (ParseException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } Time ts = new Time(ms); System.out.println("the value of ts is:" +ts); start:14:12 (value witch i entered actually in the form at the start field named startp) the value of ts is :01:00:00 java.text.ParseException: Unparseable date: "14:12" at java.text.DateFormat.parse(Unknown Source) ms not displayed I ensure that database type of the following parameter is TIME. Thanks.

    Read the article

  • XML Parsing in Groovy strips attribute new lines

    - by Bill James
    I'm writing code where I retrieve XML from a web api, then parse that XML using Groovy. Unfortunately, it seems that both XmlParser and XmlSlurper for Groovy strip newline characters from the attributes of nodes when .text() is called. How can I get at the text of the attribute including the newlines? Sample code: def xmltest = ''' <snippet> <preSnippet att1="testatt1" code="This is line 1 This is line 2 This is line 3" > <lines count="10" /> </preSnippet> </snippet>''' def parsed = new XmlParser().parseText( xmltest ) println "Parsed" parsed.preSnippet.each { pre -> println pre.attribute('code'); } def slurped = new XmlSlurper().parseText( xmltest ) println "Slurped" slurped.children().each { preSnip -> println [email protected]() } the output of which is: Parsed This is line 1 This is line 2 This is line 3 Slurped This is line 1 This is line 2 This is line 3

    Read the article

  • Parsing HTML "Visually"

    - by Midhat
    OKay I am at loss how to name this question. I have some HTML files, probably written by lord Lucifier himself, that I need to parse. It consists of many segments like this, among other html tags <p>HeadingNumber</p> <p style="text-indent:number;margin-top:neg_num ">Heading Text</p> <p>Body</p> Notice that the heading number and text are in seperate p tags, aligned in a horizontal line by css. the css may be whatever Lucifier fancies, a mixture of indents, paddings, margins and positions. However that line is a single object in my business model and should be kept as such. So How do I detect whether two p elements are visually in a single line and process them accordingly. I believe the HTML files are well formed if it helps.

    Read the article

  • Exceptions with DateTime parsing in RSS feed in C#

    - by hIpPy
    I'm trying to parse Rss2, Atom feeds using SyndicationFeedFormatter and SyndicationFeed objects. But I'm getting XmlExceptions while parsing DateTime field like pubDate and/or lastBuildDate. Wed, 24 Feb 2010 18:56:04 GMT+00:00 does not work Wed, 24 Feb 2010 18:56:04 GMT works So, it's throwing due to the timezone field. As a workaround, for familiar feeds I would manually fix those DateTime nodes - by catching the XmlException, loading the Rss into an XmlDocument, fixing those nodes' value, creating a new XmlReader and then returning the formatter from this new XmlReader object (code not shown). But for this approach to work, I need to know beforehand which nodes cause exception. SyndicationFeedFormatter syndicationFeedFormatter = null; XmlReaderSettings settings = new XmlReaderSettings(); using (XmlReader reader = XmlReader.Create(url, settings)) { try { syndicationFeedFormatter = SyndicationFormatterFactory.CreateFeedFormatter(reader); syndicationFeedFormatter.ReadFrom(reader); } catch (XmlException xexp) { // fix those datetime nodes with exceptions and read again. } return syndicationFeedFormatter; } rss feed: http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&q=test&cf=all&output=rss exception detials: XmlException Error in line 1 position 376. An error was encountered when parsing a DateTime value in the XML. at System.ServiceModel.Syndication.Rss20FeedFormatter.DateFromString(String dateTimeString, XmlReader reader) at System.ServiceModel.Syndication.Rss20FeedFormatter.ReadXml(XmlReader reader, SyndicationFeed result) at System.ServiceModel.Syndication.Rss20FeedFormatter.ReadFrom(XmlReader reader) at ... cs:line 171 <rss version="2.0"> <channel> ... <pubDate>Wed, 24 Feb 2010 18:56:04 GMT+00:00</pubDate> <lastBuildDate>Wed, 24 Feb 2010 18:56:04 GMT+00:00</lastBuildDate> <-----exception ... <item> ... <pubDate>Wed, 24 Feb 2010 16:17:50 GMT+00:00</pubDate> <lastBuildDate>Wed, 24 Feb 2010 18:56:04 GMT+00:00</lastBuildDate> </item> ... </channel> </rss> Is there a better way to achieve this? Please help. Thanks.

    Read the article

  • Ruby libraries for parsing .doc files?

    - by Platinum Azure
    Hi all, I was just wondering if anyone knew of any good libraries for parsing .doc files (and similar formats, like .odt) to extract text, yet also keep formatting information where possible for display on a website. Capability of doing similarly for PDFs would be a bonus, but I'm not looking as much for that. This is for a Rails project, if that helps at all. Thanks in advance!

    Read the article

  • Sending and Parsing JSON in Android

    - by primal
    Hi, In the application I am developing, I would like to send messages in the form of JSON objects to a Django Server and parse the JSON response from the server and populate a custom listview. From the little JSON knowledge I have, I thought this format for the response from server { "post": { "username": "someusername", "message": "this is a sweet message", "image": "http://localhost/someimage.jpg", "time": "present time" }, } How much knowledge of JSON should I have to accomplish this purpose? Also it would be great if someone could provide me links of some tutorials for sending and parsing JSON Objects.

    Read the article

  • parsing HTML on the iPhone

    - by Ben Alpert
    Can anyone recommend a C or Objective-C library for HTML parsing? It needs to handle messy HTML code that won't quite validate. Does such a library exist, or am I better off just trying to use regular expressions?

    Read the article

  • Looking for a good text parsing library for C#

    - by Chris Stewart
    Has anyone run across a quality library that will parse, line by line, CSV, tab-delimited, and Excel files? I've started to do it manually but have noticed some of the intricacies in parsing a comma-delimited file. Such as situations where a cell has a comma in it as part of the data (blah,\"LastName, Jr.\",blah,blah).

    Read the article

  • XML Parsing need help iphone sdk

    - by neha
    Hi all, How do you get "MayurS123" from following xml tag by parsing? <eletitle lnk="http://192.168.10.2/justmeans/trunk/newsfeed/mayurs">MayurS123 Sharma</eletitle> My file is getting parsed properly. Here I'm able to retrieve the lnk component by doing: if([elementName isEqualToString:@"eletitle"]) { aGoodwork.lnk = [attributeDict objectForKey:@"lnk"]; } But I'm not getting how to get in actual title. Thanx in advance.

    Read the article

  • Parsing text file in python

    - by Ockonal
    Hello, I have html-file. I have to replace all text between this: [%anytext%]. As I understand, it's very easy to do with BeautifulSoup for parsing hmtl. But what is regular expression and how to remove&write back text data?

    Read the article

  • MSBuild 4.0 Regex parsing

    - by Chandam
    I have heard that MSBuild 4.0 has increased Regex parsing support. However, I am unable to find any detailed documentation/links/material on this. Can anyone give a brief description of the new features and/or possibly give pointers to more material? Thanks in advance.

    Read the article

  • Path parsing in rails

    - by fl00r
    Hi! I am looking for method for parsing route path like this: ActionController::Routing.new("post_path").parse #=> {:controller => "posts", :action => "index"} It should be opposite to url_for Upd I've found out: http://stackoverflow.com/questions/2222522/what-is-the-opposite-of-url-for-in-rails-a-function-that-takes-a-path-and-genera ActionController::Routing::Routes.recognize_path("/posts") So now I need to convert posts_path into "/posts"

    Read the article

  • Changing the highlight color of text in Flash with ActionScript 2.

    - by Zachary Lewis
    I've got several input text fields, and my design requirement is to have gold text on a black background that, when highlighted, is black text on a gold background; however, Flash's default selected text highlight color scheme is white text on a black background and there is no way to change this. Does anyone have any workarounds that are easy to implement and don't require additional classes (the design requests minimal outside classes).

    Read the article

  • Customized command line parsing in Python

    - by Moshe
    I'm writing a shell for a project of mine, which by design parses commands that looks like this: COMMAND_NAME ARG1="Long Value" ARG2=123 [email protected] My problem is that Python's command line parsing libraries (getopt and optparse) forces me to use '-' or '--' in front of the arguments. This behavior doesn't match my requirements. Any ideas how can this be solved? Any existing library for this?

    Read the article

  • Clarification needed about Python CSV file format parsing

    - by HH
    Format is like: CHINA;2002-06-25 00:00:00.000;5,60 CHINA;2002-06-26 00:00:00.000;5,32 CHINA;2002-06-27 00:00:00.000;5,31 and I try to use Python's CSV tools to parse it but cannot understand the paragraph, source: And while the module doesn’t directly support parsing strings, it can easily be done: import csv for row in csv.reader(['one,two,three']): print row Could someone clarify the line ['one,two,three']? How would you use it with format A;B;C?

    Read the article

  • Python PLY zero or more occurrences of a parsing item

    - by None
    I am using Python with PLY to parse LISP-like S-Expressions and when parsing a function call there can be zero or more arguments. How can I put this into the yacc code. This is my function so far: def p_EXPR(p): '''EXPR : NUMBER | STRING | LPAREN funcname [EXPR] RPAREN''' if len(p) == 2: p[0] = p[1] else: p[0] = ("Call", p[2], p[3:-1]) I need to replace "[EXPR]" with something that allows zero or more EXPR's. How can I do this?

    Read the article

  • Haskell -> After parsing how to work with strings

    - by bito08
    Hello after doing the parsing with a script in Haskell I got a file with the 'appearance' of lists of strings. However when I call the file content with the function getContents or hGetContents, ie, reading the contents I get something like: String with lines (schematically what I want is: "[" aaa "," bbb "" ccc "]" - ["aaa", "bbb" "ccc"]). I have tried with the read function but without results. I need to work with these lists of strings to concatenating them all in a single list. Thanks.

    Read the article

  • Parsing Huge XML Files in PHP

    - by Ian
    I'm trying to parse the dmoz content/structures xml files into mysql, but all existing scripts to do this are very old and don't work well. How can I go about opening a large (+1GB) xml file in php for parsing?

    Read the article

  • sublime text 2 review !

    - by Anirudha
    Few months ago I am looking for a editor to doing simply edit on html,css,javascript.  Before it I tried notepad++ which is quite awesome to do all works I want to get done with him.  I choose 2 editor on my list. first is sublime text and second is phpstorm. both are cross-plateform. I tried both and both is working fine. I finally go with sublime text 2.   Here is the reason why sublime text 2 is awesome. phpstorm and sublime text 2 both is licensed  software. In sublime text 2 you can use it for unlimited time when phpstorm is available for 30 days only. Sublime text 2 is very memory efficient and lightweight software this is first thing people found best in sublime text 2. in phpstorm problem for me is sometime it’s goes unresponsive when I tried html5 boilerplate. sublime text 2 is never hang depend on memory size of project compare to phpstorm. in Sublime text 2 you can got better speed at coding after learning some shortcut and basic thing applied specially sublime text 2. Sublime text 2 come with distraction free mode when phpstorm have nothing with full-screen. Sublime text 2 support almost every language. I have seen many people in community who has move from their PHP IDE to sublime text 2. You can use LESS and coffeescript in it. There are many kind of customization out in github regarding sublime text 2.   In past I also have also tried webmatrix. the latest version of webmatrix have nothing good as sublime text 2. Sublime text 2 is best fit for my requirement.   So cheers, people should tried once Sublime text 2 if they are look for a solid tool for learning new things. sublime text 2 can be downloaded from http://www.sublimetext.com/.   Thanks for reading my post.

    Read the article

  • JSON parsing problem in BlackBerry

    - by anta40
    I'm working on how to parse Twitter's JSON response using JSON-ME. For example: [code] http://apiwiki.twitter.com/Twitter-Search-API-Method:-search foo({"results":[{"profile_image_url":"http://a3.twimg.com/profile_images/762620209/drama_queen-6989_normal.gif","created_at":"Thu, 01 Apr 2010 02:35:10 +0000","from_user":"TWEETSDRAMA","to_user_id":null,"text":"NEW Twitter Lists Widget - How to put it on your blog or site http://bit.ly/47NCi6","id":11401539152,"from_user_id":95081097,"geo":null,"iso_language_code":"en","source":"<a href="http://ping.fm/" rel="nofollow">Ping.fm</a>"}... (content truncated)[/code] Here's my method:[code] public void parseDataFromJSON(String strjson) throws JSONException { JSONTokener jtoken = new JSONTokener(strjson); JSONArray jsoarray = new JSONArray(jtoken); JSONObject jsobj = jsoarray.getJSONObject(0); tweeter_profile_image_url = jsobj.optString("profile_image_url"); tweeter_created_at = jsobj.optString("created_at"); tweeter_from_user = jsobj.optString("from_user"); tweeter_to_user_id = jsobj.optString("to_user_id"); tweeter_text = jsobj.optString("text"); tweeter_id = jsobj.optInt("id"); tweeter_from_user_id = jsobj.optInt("from_user_id"); tweeter_geo = jsobj.optString("geo"); tweeter_iso_language_code = jsobj.optString("iso_language_code"); tweeter_source = jsobj.optString("source") }[/code] When I ran it on the emulator, nothing was shown, so I inspected the debugger, and the output was: status: 200 content: {"results":[{"profile_image_url":"http://a1.twimg.com/profile_images/746683548/Photo_on_2010-..... --- OK, I got the JSON content org.json.me.JSONException: A JSONArray text must start with '[' at character 1 of {"results":[{"profile_image_url.... --- but somehow unable to processed it properly. So how to parse this correctly?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >