Daily Archives

Articles indexed Sunday April 11 2010

Page 11/79 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Webpage data scraping using Java

    - by Gemma
    I am now trying to implement a simple HTML webpage scraper using Java.Now I have a small problem. Suppose I have the following HTML fragment. <div id="sr-h-left" class="sr-comp"> <a class="link-gray-underline" id="compare_header" rel="nofollow" href="javascript:i18nCompareProd('/serv/main/buyer/ProductCompare.jsp?nxtg=41980a1c051f-0942A6ADCF43B802');"> <span style="cursor: pointer;" class="sr-h-o">Compare</span> </a> </div> <div id="sr-h-right" class="sr-summary"> <div id="sr-num-results"> <div class="sr-h-o-r">Showing 1 - 30 of 1,439 matches, The data I am interested is the integer 1.439 shown at the bottom.I am just wondering how can I get that integer out of the HTML. I am now considering using a regular expression,and then use the java.util.Pattern to help get the data out,but still not very clear about the process. I would be grateful if you guys could give me some hint or idea on this data scraping. Thanks a lot.

    Read the article

  • Easy way to parse a url in C++ cross platform?

    - by Andrew Bucknell
    I need to parse a url to get the protocol host path and query in an application I am writing in c++. The application is intended to be cross platform. Im surprised I cant find anything that does this in boost or poco libraries. Is it somewhere obvious Im not looking? Any suggestions on appropriate open source libs? Or is this something I just have to do my self? Its not super complicated but it seems such a common task I am surprised there isnt a common solution.

    Read the article

  • Problems finding classes in namespace

    - by Matt
    I am trying to find all of the types in the Models namespace within an ASP.NET MVC assembly from within a testing assembly. I was trying to use LINQ to find the relevant set for me but it is returning an empty set on me. I am sure it is some simple mistake, I am still relatively new to LINQ admittedly. var abstractViewModelType = typeof (AbstractViewModel); var baseAssembly = Assembly.GetAssembly(abstractViewModelType); var modelTypes = baseAssembly.GetTypes() .Where(assemblyType => (assemblyType.Namespace.EndsWith("Models") && assemblyType.Name != "AbstractViewModel")) .Select(assemblyType => assemblyType); foreach(var modelType in modelTypes) { //Assert some things } When I reach the foreach I receive a Null reference exception.

    Read the article

  • File Upload in GWT in a Special Case

    - by Maksud
    I am doing a software for a document system. In this system when a user completes a document and want to save it, the document will be uploaded directly to server without the user action. This system uses COM/ActiveX to facilitate user using native editors. Ok, my problem is: suppose I have a file say d:/notepad.txt. Using classical method a user can browse the file and upload it. I can do that with apache commonio and GWT FormPanel and FileUpload. But if I know the filename (d:/notepad.txt), is there any way to upload the file directly to server without the user having to browse the file. I am currently doing this by the ActiveX componenet calling some HttpUpload methods with POST. But that does not maintain session. Thanks

    Read the article

  • Windows 7: Creating a password-protected task (NOT a programming question)

    - by Matthias
    Hello, I would like to configure a task like "child control software", so it would hibernate the pc at certain times. Is it possible to prevent modification (here: pausing) of a task through requiring the entering of the admin password to modify, EVEN THOUGH the currently-logged-in (and only) user is the admin account itself? (Do you know of any child control software that does NOT require an additional account yet is able to hibernate the system at certain times?) Thanks a lot! Matthias

    Read the article

  • My EEEPc 900HA won't turn on/boot. Can it be fixed or does it need to be sent in?

    - by th3dude19
    My EEEPc 900HA stopped booting up out of nowhere. It went to sleep and when I went to wake it up, it wouldn't wake up. I powered down and went to power back up, but no go. The power light comes on solid and the battery/corded power light blinks consistently. There is no HDD activity or light activity. No BIOS. Just the lights described. I've troubleshooted the RAM, HDD, and internal power connections and everything checked out both on battery power and corded power. I've also reset the CMOS to no avail. What else can I do?

    Read the article

  • view handler design pattern

    - by Mark Roberts
    I'm trying to figure out the origin of the view handler design pattern in software engineering. Many of the design patterns in software engineering were inspired by things which pre-date computers, and I was wondering if anybody had any insights on the origin of this particular pattern.

    Read the article

  • Xcode Error: "Buildfile: build.xml does not exist! Build failed"

    - by user313574
    I am trying to use Xcode 3.2 for java tool development. My project has no problem building and shows it built the file build.xml fine and also shows up in file folder fine. When I try to run the .java file, I get the error: "Buildfile: build.xml does not exist! Build failed". Running "ant -find build.xml" in Terminal produces "not found". I believe the problem is that I need to point to my own build.xml location, but I have no idea how to change which directory it looks for this file. Any help is greatly appreciated. -nick Mac OS 10.6, Xcode 3.2.1 - method to create app: OrganizerNew from templateJava Tool

    Read the article

  • Eclipse Ganymede for OS X contains no HTML formatter. Alternatives?

    - by thebossman
    In Eclipse 3.4 for Windows, the Source - Format option for formatting Java code was extended to format HTML code. However, for OS X, this option is disabled. Additionally, there are no formatting options in the Preferences. I've downloaded all the Web Tools for Eclipse and the option is still unavailable. Which plugin/feature allows for HTML formatting on Eclipse OS X, if there is one? Otherwise, what is a good Web-based alternative? Thanks, Adam

    Read the article

  • How divide a string into array

    - by Ricky
    If I have the following plain string, how do I divide it into an array of three elements? {["a","English"],["b","US"],["c","Chinese"]} ["a","English"],["b","US"],["c","Chinese"] This problem is related to JSON string parsing, so I wonder if there is any API to facilitate the conversion.

    Read the article

  • Is it possible to make an OS in python?

    - by None
    I was just wondering if it was possible to make an operating system in python. Nothing fancy. Maybe not even a "real" operating system with a kernel and all. Just a python program that is run when someone inserts the disc containing it that will make a fullscreen display on top of the installed os.

    Read the article

  • How can i take only integer input from keyboard and if input is invalid how do i ask user agaian

    - by fari
    This is what i have written so far but when exception is raised it does not again ask teh user for input. do{ System.out.println("Enter the number of stones to play with: "); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String temp=br.readLine(); }while (key<0 && key>9); if(key<0 || key>10) throw new InvalidStartingStonesException(key); player1=new KeyBoardPlayer(); player2 = new KeyBoardPlayer(); this.player1=player1; this.player2=player2; state=new KalaGameState(key); } catch(NumberFormatException nFE) { System.out.println("Not an Integer");} catch(IOException e) { System.out.println(e); }

    Read the article

  • useful Java books?

    - by Peter
    Hi all, I am looking for a Java book that gives you some useful Java tips and best practices. Seems like "Effective Java" is a good candidate? Do you have any other recommendations?

    Read the article

  • textbox supplied route values with javaScript

    - by Maslow
    I've tried the bare method and the T4MVC method but so far both are routing me to the current URL instead of the default path with no arguments for the following action: public virtual ActionResult Index(byte? location, int? sublocation) { } So when I try Url.Action("Index","Locations", new {location="", system=""}) if I'm at a location already this method returns the path to where I'm already at instead of the default path with no arguments. As does the following method with T4MVC. <input type="button" value="Go" style="display:none" onclick="window.location='<%= Url.Action(MVC.Controller.Index()) %>/'+$('input#location').val()+'/'+$('input#sublocation').val()+'/';" /> How can I get the default route with no arguments?

    Read the article

  • How to display custom view in UIActionSheet?

    - by 4thSpace
    I have a UIView with a date picker that I'd like to display in an action sheet. I'm using the following code: -(IBAction) button_click:(id)sender{ //UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"the title" delegate:nil cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Destructive" otherButtonTitles:@"other", nil]; UIActionSheet *sheet = [[UIActionSheet alloc] init]; ActionSheetController *actionSheet = [[ActionSheetController alloc] initWithNibName:@"ActionSheetView" bundle:nil]; [sheet addSubview:actionSheet.view]; [sheet showInView:self.view]; } What I get is a little bit of the top part of the new view coming up from the bottom and that's it. If I comment the two middle lines of code and uncomment the top part to display a regular action sheet, it works fine. Any ideas what I might be doing wrong?

    Read the article

  • Having ObservableCollection Trigger an update

    - by user275561
    So i have something along the lines of private ObservableCollection<ViewModel> _internal; public ObservableCollection<ViewModel> BoundInternal{get;set}; //this is Binded in the Itemssource like ItemSource={Binding BoundInternal} Now In my code i do something like BoundInternal=_internal, However the problem is the BoundInternal isn't trigger any collectionChanged event. I have to use the Add method. So I am wondering if there is a solution to this.

    Read the article

  • Rating mechanisms

    - by Jasie
    Is there any place that showcases a bunch of different types of rating systems (like using multiple sliders, star ratings, up/down votes)? I'm trying to get ideas for a better rating system than just up/down (more criteria). (I'm not interested in the backend, but the human/computer interaction part of it).

    Read the article

  • how to evaluate query by DMBS?

    - by Kevinniceguy
    How do we evaluate the below database query by DBMS? the query is something like : SELECT SUM(price) FROM Room r, Hotel h WHERE r.hotelNo = h.hotelNo and hotelName = 'Paris Hilton' and roomNo NOT IN (SELECT roomNo FROM Booking b, Hotel h WHERE (dateFrom <= CURRENT_DATE AND dateTo = CURRENT_DATE) AND b.hotelNo = h.hotelNo AND hotelName = 'Paris Hilton');

    Read the article

  • Error in VBScript http request

    - by Nate
    I asked this question here, but it turns out the issue is in our server configuration. The .vbs script has been reduced to the following: Dim http Set http = CreateObject("MSXML2.ServerXMLHTTP") http.Open "GET" , "http://google.com", False http.Send This triggers the same error message every time: msxml3.dll: A security problem occurred. The permissions on the .dll are set correctly, and nothing else should be preventing access to that file, so what could be causing the problem?

    Read the article

  • How to find polarity of a power supply that's lacking the customary markings

    - by Nosredna
    If I have a power supply (not a computer power supply, just a battery-replacing wall wart) and it doesn't have the usual polarity marking, how to I know if the tip is positive or negative? Update: I couldn't find my multimeter. I did find a model number on the power supply and typed it into Google. Some guy selling a bunch of power supplies on eBay had checked it and found that it was tip positive, which is what I needed!

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >