Search Results

Search found 3176 results on 128 pages for 'parsing'.

Page 93/128 | < Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >

  • MPXJ in .NET converting java Date to .NET DateTime

    - by Jeff
    I'm using the MPXJ library in .NET for parsing MS Project (MPP) files, and it's working great. The one issue I'm having is trying to translate the task Start and Finish date into .NET DateTime to use with my data models. I am going through all the tasks and calling task.getFinish() and task.getStart() that both return javva.util.Date objects. When I use task.getFinish().getYear(), task.getFinish().getMonth(), etc. to build up a new DateTime object it warns me that they are obsolete. What is the best way to get the start and finish dates from MPXJ into a .NET DateTime object? Thanks.

    Read the article

  • NHibernate Named Query Parameter Numbering @p1 @p2 etc

    - by IanT8
    A colleague recently ran into a problem where he was passing in a single date parameter to a named query. In the query, the parameter was being used twice, once in an expression and once in a GROUP BY clause. Much to our surprise, we discovered that NHibernate used two variables and sent the single named parameter in twice, as @p1 and @p2. This behaviour caused SQL to fail the query, with the usual "a column in the select clause is not in the group by clause" (I paraphrase ofcourse). Is this behaviour normal? Can it be changed? Seems to me that if you have a parameter name like :startDate, NHibernate only needs to pass in @p1 no matter how many times you might refer to :startDate in the query. Any comments? The problem was worked around by using another sub-query to overcome the SQL parsing error.

    Read the article

  • How to Store data without using Database and how to retrieve them ?

    - by Harikrishna
    I am parsing the html file to extract tabular information through column names. And I want like let user give the input for column name. And according to that column names tabular information will be extracted. Now that column names which user will input,based on that column names I want to find the tabular information from the html file. But where I should store this column names input by user ? And how to retrieve them ? I dont want to use database.

    Read the article

  • Good XMPP Java Libraries for server side?

    - by Taylor Gautier
    I was hoping to implement a simple XMPP server in Java. What I need is a library which can parse and understand xmpp requests from a client. I have looked at Smack (mentioned below) and JSO. Smack appears to be client only so while it might help parsing packets it doesn't know how to respond to clients. Is JSO maintained it looks very old. The only promising avenue is to pull apart Openfire which is an entire commercial (OSS) XMPP server. I was just hoping for a few lines of code on top of Netty or Mina, so I could get started processing some messages off the wire.

    Read the article

  • Create SOAP message from WSDL using axiom

    - by code-gijoe
    Hi, I'm a starting a project which consist in sending a request to a web-service (which is already available) and parsing the response. I have the WSDL and URL endpoints. Does anyone have a startup tutorial on how to build something from there? I would like to use Axis2 + Axiom to send the service request and receive and process the response. I'm using eclipse as dev env. I've been search for a tut on how to do this but with no success. Any suggestion would be greatly appreciated!

    Read the article

  • Accessing a control in asp.net content page through Javascript

    - by rocksolid
    Hi, I have a form in my content page for which I am doing some client side validations via Javascript. The Javascript behaves as expected if I place the JS code directly in the content page. But if I place the JS code in it's own file and try accessing that from the content/master page (through the script tag's src attribute), I get a run time error when the validation function in JS being called. To be specific, I get the below error. Microsoft JScript runtime error: Objected expected/required at this line - document.getElementById('<%=txtemailId.ClientID %').value txtemailId is in the content page. Javascript code is placed in validation.js and accessed via master page. The reason I guess is that when .net is parsing the files, it is unable to substitute txtemailId.ClientID with the client side value that would be generated later on. So, how should one go about it? Thanks!

    Read the article

  • Browser Not Reading Entire XML File

    - by Chris
    I have an XML file that is written by a PHP script. The data for the XML file is gathered from several different RSS feeds. The PHP script is invoked every 5 minutes by a Cron Job. The PHP Script takes maybe 5-10 seconds to write the XML File. Here's the problem: After the XML file is written, I can open it through DreamWeaver and read everything just fine - but when I enter the XML File's URL into my Web Browser (IE or Firefox), I get a "XML Parsing Error: not well-formed" Error in the Browser. When I do View Source in the Browser, the XML file appears incomplete - but when I open the file directly off the server, it is complete. Anyone know what's going on here?

    Read the article

  • How to get current byte position of the parser in Antlr with c# target?

    - by Aftershock
    Hi, I am interested in the current byte position in the stream when parsing something using Antlr 3. I have seen there is a similar question but there was no real answer there. That is why I am trying again. I am not interested in token index, byte position in a line etc... Could you someone tell me that? It is obvious that some code has to be written/overridden. Does someone have specific code to write? I use C#.

    Read the article

  • how to translate Haskell into Scalaz?

    - by TOB
    One of my high school students and I are going to try to do a port of Haskell's Parsec parser combinator library into Scala. (It has the advantage over Scala's built-in parsing library that you can pass state around fairly easily because all the parsers are monads.) The first hitch I've come across is trying to figure out how Functor works in scalaz. Can someone explain how to convert this Haskell code: data Reply s u a = Ok a !(State s u) ParseError | Error ParseError instance Functor (Reply s u) where fmap f (Ok x s e) = Ok (f x) s e fmap _ (Error e) = Error e -- XXX into Scala (using Scalaz, I assume). I got as far as sealed abstract class Reply[S, U, A] case class Ok[S, U, A](a: A, state: State[S, U], error: ParseError) extends Reply[S, U, A] case class Error[S, U, A](error: ParseError) extends Reply[S, U, A] and know that I should make Reply extend the scalaz.Functor trait, but I can't figure out how to do that. (Mostly I'm having trouble figuring out what the F[_] parameter does.) Any help appreciated! Thanks, Todd

    Read the article

  • Long running, polling, queueing process for Python. What's the best stuff to use?

    - by Bialecki
    Feel free to close and/or redirect if this has been asked, but here's my situation: I've got an application that will require doing a bunch of small units of work (polling a web service until something is done, then parsing about 1MB worth of XML and putting it in a database). I want to have a simple async queueing mechanism that'll poll for work to do in a queue, execute the units of work that need to be done, and have the flexibility to allow for spawning multiple worker processes so these units of work can be done in parallel. (Bonus if there's some kind of event framework that would also me to listen for when work is complete.) I'm sure there is stuff to do this. Am I describing Twisted? I poked through the documentation, I'm just not sure exactly how my problems maps onto their framework, but I haven't spent much time with it. Should I just look at the multiprocess libraries in Python? Something else?

    Read the article

  • Is it bad practice to use python's getattr extensively?

    - by Wilduck
    I'm creating a shell-like environment. My original method of handleing user input was to use a dictionary mapping commands (strings) to methods of various classes, making use of the fact that functions are first class objects in python. For flexibility's sake (mostly for parsing commands), I'm thinking of changing my setup such that I'm using getattr(command), to grab the method I need and then passing arguments to it at the end of my parser. Another advantage of this approach is not having to update my (currently statically implemented) command dictionary every time I add a new method/command. My question is, will I be taking a hit to the efficiency of my shell? Does it matter how many methods/commands I have? I'm currently looking at 30 some commands, which could eventually double.

    Read the article

  • parse JSON . I have server response

    - by GauravBOSS
    i am new in JSON Parsing . i have a server response how i can fetch the "Device Name and Id" of 0 index. thanks in Advance { Successfully = ( { 0 = { DeviceName = Tommy; DeviceTypeId = 1; EMEI = xxxxxx; GId = xxxxx; Id = 105; Pet = "<null>"; PetImage = "352022008228784.jpg"; ProtocolId = xxxx; SimNo = xxxxx; }; } ); }

    Read the article

  • google spreadsheet api from android: google-api-java-client or handmade?

    - by yetanothercoderu
    For working with google spreadsheet api from android (2.2) - google suggests using google-api-java-client for android. For that you have to include 5 jars to your android application: guava-r09.jar google-http-client-extensions-android2-1.6.0-beta.jar google-api-client-extensions-android2-1.6.0-beta.jar google-http-client-1.6.0-beta.jar google-api-client-1.6.0-beta.jar and digging into google-api-java-client javadocs for fast-changing api. Does it worth the effort? in term of android specifics and device fragmentation? Isn't it reasonable to write your own simple http response parser or take small existing library like google-spreadsheet-lib-android ? Thanks! UPD: choosed google-api-java-client finally as it has all routine stuff (like parsing http, xml) out of box

    Read the article

  • Parse a string containing percent sign into decimal

    - by Sebastian Seifert
    I have a simple string containing VAT-percantage value that needs to be stored in a decimal. The string looks like this: "19.00%". When I use the decimal.Parse() methode I always get an FormatException. Code looks like this NumberFormatInfo nfi = new NumberFormatInfo() { PercentDecimalSeparator = ".", PercentSymbol = "%" }; decimal.Parse("19.00%",NumberStyles.Any, nfi); I know, that it would be possible (in the excample above) to simply remove the %-char from the string and then parse. But isn't there a solution to use built in parsing, which can be used without testing the string for the type of number the user typed in.

    Read the article

  • How to retrieve MYSQL records as an INSERT statement.

    - by Aglystas
    I'm trying come up with the best method of synchronizing particular rows of 2 different database tables. So, for example there's 2 product tables in different databases as such... Origin Database product{ merchant_id, product_id, ... additional fields } Destination Database product{ merchant_id product_id ... additional fields } So, the database schema is the same for both. However I'm looking to select records with a particular merchant_id, remove all records from the destination table that have that merchant_id and replace those records with records from the origin database of the same merchant_id. My first thought was using mysqldump, parsing out the create table statements, and only running the Insert Statements. Seems like a pain though. So I was wondering if there is a better technique to do this. I would think mysql has some method of creating INSERT statements as output from a SELECT statement, so you can define how to insert specific record information into a new db. Any help would be appreciated, thank you much.

    Read the article

  • finding an adjacent node in xml through xpath

    - by kolosy
    i have a deeply nested structure (actually parsing out xhtml, so lots of nasty), like so: <tr> <td> <font id="blah"> stuff </font> </td> </tr> <tr> <td> more stuff </td> </tr> and this repeats in a long table. i need an xpath expression that will select the second font tag (or rather it's text()). i was looking at the preceding-sibling axis, but something isn't quite working right. something along the lines of (and pardon me if this is ridiculous, my xpath is rusty) //tr[preceding-sibling::tr/td/font/b]/td/text()

    Read the article

  • XML jQuery Problem

    - by Llamabomber
    This code for parsing my xml and appending via jquery seems to work great in every browser but Chrome (Mac only, the windows version of chrome works fine) and explorer. I'm not aware of any glaring issues in the code so I thought some fresh eyes might help. Anyone know what could be causing IE and Chrome on the mac to not append? <script type="text/javascript" charset="utf-8"> $(document).ready(function() { $.ajax({ type: "GET", url: "sitenav.xml", dataType: "xml", success: parseXml }); function parseXml(xml) { $(xml).find("GoogleAnalytics").each(function() { $("li#google_analytics").append('<ul><li>' + $(this).find("NavHeader").text() + '</li></ul>'); }); } }); </script>

    Read the article

  • Check if Rhythmbox is running via Python

    - by cschol
    I am trying to extract information from Rhythmbox via dbus, but I only want to do so, if Rhythmbox is running. Is there a way to check if Rhythmbox is running via Python without starting it if it is not running? Whenever I invoke the dbus code like this: bus = dbus.Bus() obj = bus.get_object("org.gnome.Rhythmbox", "/org/gnome/Rhythmbox/Shell") iface = dbus.Interface(obj, "org.gnome.Rhythmbox.Shell) and Rhythmbox is not running, it then starts it. Can I check via dbus if Rhythmbox is running without actually starting it? Or is there any other way, other than parsing the list of currently running processes, to do so?

    Read the article

  • Why bother to limit the types imported from a python package?

    - by Fast Fish
    When using many IDEs that support autocompletion with Python, things like this will show warnings, which I find annoying: from eventlet.green.httplib import BadStatusLine When switching to: rom eventlet.green.httplib * The warnings go away. What's the benefit to limiting imports to a specific set of types you'll use? Is the parsing faster? Reduces collisions? What other point is there? It seems the state of python IDEs and the nature of the typing system makes it hard for many IDEs to fully get right when a type import works and when it doesn't.

    Read the article

  • What does this JavaScript error mean?

    - by Tommy
    Using the “Venkman” JavaScript debugger for Mozilla and getting the following error: XML Parsing Error: not well-formed Location: x-jsd:source?location=http%3A%2F%2F192.168.1.150%2Fscript.js&instance=337 Line Number 557, Column 50:<line><margin x='t'> - </margin><num> 554</num> ?? valid = false;</line> Functions works but I don't understand the error. Any help is appreciated. Thanks. function ValidateCheckBoxes() { var valid; $(document).ready(function(){ if($('input[@name=boxesA]:checked').size() == 0) {     valid = false; } else { valid = true; } }); return valid; }

    Read the article

  • How to implement arrays in an interpreter?

    - by Ray
    I have managed to write several interpreters including Tokenizing Parsing, including more complicated expressions such as ((x+y)*z)/2 Building bytecode from syntax trees Actual bytecode execution What I didn't manage: Implementation of dictionaries/lists/arrays. I always got stuck with getting multiple values into one variable. My value structure (used for all values passed around, including variables) looks like this, for example: class Value { public: ValueType type; int integerValue; string stringValue; } Works fine with integers and strings, but how could I implement arrays? (From now on with array I mean arrays in my experimental language, not in C++) How can I fit the array concept into the Value class above? Is it possible? How should I make arrays able to be passed around just as you could pass around integers and strings in my language, using the class above? Accessing array elements or memory allocation wouldn't be the problem, I just don't know how to store them.

    Read the article

  • How can I search for an email using the zend framework?

    - by Ali
    Hi guys I need to build a functionality that involves searching through emails in an inbox for emails whose subjects match a certain user inputted keyword. SInce I'm using the zend framework I would like a solution that uses the zend framework libraries. Aside this I have noticed that the zend libraries are a bit limited with respect to my requirements for email handling. Is there any open library available in php which can be used for handling emails - when I mean handling emails I mean like: Ease to mark and flag emails Moving of emails from folder to folder. Parsing emails searching through emails SOrting emails etc - the stuff you would require if you wished to build a web client. EDIT ========= I'm looking for a generic solution here. The emails are in a regular email inbox on an IMAP server. I need a way to be able to read through and search for emails in the inbox using any specialized library to make it easier.

    Read the article

  • Removing the Default Wrap Character From all records

    - by aceinthehole
    I am using BizTalk 2009 and I have a flat file that is similar to the following "0162892172","TIM ","LastName ","760 "," ","COMANCHE ","LN " "0143248282","GEORGE ","LastName ","625 "," ","ENID ","AVE " When I parse it and start mapping it I need to get rid of the quotation marks. I have marked the Wrap Character attribute for the schema as a quotation mark but it doesn't remove it when BizTalk is parsing the file. Is there an easy way to specify the removal of a wrap character or am I going to have to run it through a script functiod every time? Also I would like to be able to remove the trailing spaces as well, if at all possible.

    Read the article

  • Which is more efficient regular expression?

    - by Vagnerr
    I'm parsing some big log files and have some very simple string matches for example if(m/Some String Pattern/o){ #Do something } It seems simple enough but in fact most of the matches I have could be against the start of the line, but the match would be "longer" for example if(m/^Initial static string that matches Some String Pattern/o){ #Do something } Obviously this is a longer regular expression and so more work to match. However I can use the start of line anchor which would allow an expression to be discarded as a failed match sooner. It is my hunch that the latter would be more efficient. Can any one back me up/shoot me down :-)

    Read the article

  • Unknown attribute xsi:type in XmlSerializer

    - by vanccoon
    I am learning XML Serialization and meet an issue, I have two claess [System.Xml.Serialization.XmlInclude(typeof(SubClass))] public class BaseClass { } public class SubClass : BaseClass { } I am trying to serialize a SubClass object into XML file, I use blow code XmlSerializer xs = new XmlSerializer(typeof(Base)); xs.Serialize(fs, SubClassObject); I noticed Serialization succeed, but the XML file is kind of like ... If I use XmlSerializer xs = new XmlSerializer(typeof(Base)); SubClassObject = xs.Deserialize(fs) as SubClass; I noticed it will complain xsi:type is unknown attribute(I registered an event), although all information embedded in the XML was parsed successfully and members in SubClassObject was restored correctly. Anyone has any idea why there is error in parsing xsi:type and anything I did wrong? Thanks

    Read the article

< Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >