Search Results

Search found 9 results on 1 pages for 'jawonlee'.

Page 1/1 | 1 

  • Windows service - COM class factory error 80070583

    - by jawonlee
    I have a Windows service that periodically scrapes some web pages, using mshtml and HtmlAgilityPack. For this particular C# code snippet: HTMLDocumentClass doc = new HTMLDocumentClass(); doc.write(new object[] { responseFromServer }); doc.close(); I get this error: Retrieving the COM class factory for component with CLSID {25336920-03F9-11CF-8FD0-00AA00686F13} failed due to the following error: 80070583. I tracked down the CLSID in the registry, and it turned out to be mshtml.dll. I also noticed that the version I actually have is version 7.0.6000.17023, and the registry version is listed as Version=7.0.3300.0. The error code 80070583 means "Class does not exist"; interestingly, I've also gotten an error from the same program with error code 80070582, or "Class already exists". What does it all mean? Edit: Since there are no answers, I ended up working around the problem, by ditching MSHTML and using HTML Agility Pack to parse HTML. How do I close this question?

    Read the article

  • How often to run getWritableDatabase() and getReadableDatabase()?

    - by jawonlee
    I'm writing a Service, a Content Provider, and one or more apps. The Service writes new data to the Content Provider's SQLite database every 5 minutes or so plus at user input, and is intended to run pretty much forever in the background. The app, when running, will display data pulled from the Content Provider, and will be refreshed whenever the Service puts more data into the Content Provider's database. Given that the Service only inserts into the database once every five minutes, when is the right time to call SQLiteOpenHelper's getWritableDatabase() / getReadableDatabase()? Is it on the onCreate() of the Content Provider, or should I run it every time there is an insert() and close it at the end of insert()? The data being inserted every 5 minutes will contain multiple inserts.

    Read the article

  • Reading a client's header from Python CGI script?

    - by jawonlee
    I'm writing a very simple web service, written in Python and run as CGI on an Apache server. According to Python docs (somewhere... I forgot where), I can use sys.stdin to read the data POSTed by a random client, and this has been working fine. However, I would like to be able to read the HTTP header information as well - incoming IP, user agent, and so on. I'd also like to keep it very simple for now, by using only Python libraries (so no mod-python). How do I do this?

    Read the article

  • Matplotlib autodatelocator custom date formatting?

    - by jawonlee
    I'm using Matplotlib to dynamically generate .png charts from a database. The user may set as the x-axis any given range of datetimes, and I need to account for all of it. While Matplotlib has the dates.AutoDateLocator(), I want the datetime format printed on the chart to be context-specific - e.g. if the user is charting from 3 p.m. to 5 p.m., the year/month/day information doesn't need to be displayed. Right now, I'm manually creating Locator and Formatter objects thusly: def get_ticks(start, end): from datetime import timedelta as td delta = end - start if delta <= td(minutes=10): loc = mdates.MinuteLocator() fmt = mdates.DateFormatter('%I:%M %p') elif delta <= td(minutes=30): loc = mdates.MinuteLocator(byminute=range(0,60,5)) fmt = mdates.DateFormatter('%I:%M %p') elif delta <= td(hours=1): loc = mdates.MinuteLocator(byminute=range(0,60,15)) fmt = mdates.DateFormatter('%I:%M %p') elif delta <= td(hours=6): loc = mdates.HourLocator() fmt = mdates.DateFormatter('%I:%M %p') elif delta <= td(days=1): loc = mdates.HourLocator(byhour=range(0,24,3)) fmt = mdates.DateFormatter('%I:%M %p') elif delta <= td(days=3): loc = mdates.HourLocator(byhour=range(0,24,6)) fmt = mdates.DateFormatter('%I:%M %p') elif delta <= td(weeks=2): loc = mdates.DayLocator() fmt = mdates.DateFormatter('%b %d') elif delta <= td(weeks=12): loc = mdates.WeekdayLocator() fmt = mdates.DateFormatter('%b %d') elif delta <= td(weeks=52): loc = mdates.MonthLocator() fmt = mdates.DateFormatter('%b') else: loc = mdates.MonthLocator(interval=3) fmt = mdates.DateFormatter('%b %Y') return loc,fmt Is there a better way of doing this?

    Read the article

  • ASP.NET: How to assign ID to a field in DetailsView?

    - by jawonlee
    I have a master-detail page, in which I use GridView to display multiple rows of data, and DetailsView + jQuery dialog to display the details of a single records. only one DetailsView is open at a time. I need to be able to pull out a single field of the open DetailsView, for manipulation using JavaScript. Is there a way to give a unique ID to a given field in DetailsView, so I can use getElementByID? Or is there another way to accomplish what I'm trying to do? Thank you in advance.

    Read the article

  • How to show, not download, images in apache?

    - by jawonlee
    I'm dynamically generating some charts using mod_python, in .png and .pdf formats. When a user points to /some/path/some_imagefile_name.png, I want to show the image within the browser, like in this url. I also want the image to be accessible from an HTML <img src=> tag. So far, whenever I point my browser to a .png address from my server, the .png and .pdf are automatically downloaded instead of being viewed. How should I fix this? I tagged this under Apache, since I figured it would be an Apache config thing. If it's not, please point me towards the right direction.

    Read the article

  • How to manually set button input type in ASP.NET?

    - by jawonlee
    I have a jQueryUI dialog with some textboxes, plus a button. Right now, the asp:Button tag used to generate the button automatically sets its type as type="submit". The structure of the dialog is such that pressing enter at any of the textboxes should not call the button click event. It seems like the cleanest way to solve the problem, if it is doable, is to manually set the button's type to something other than submit. Is there a way to do this?

    Read the article

  • ListView: Display data divided into groups?

    - by jawonlee
    I would like to display the contents of a DataTable, divided into several groups depending on the value of one of the columns. So, if I have a DataTable (from SQL query) with: GroupID Name Description 1 foo bar 1 one two 2 some thing I would like to place all records containing GroupID 1 in one div, all records with GroupID 2 in another div, and so on. How can I do this? I'm writing in ASP.NET 4.0, with C# codebehind.

    Read the article

1