Search Results

Search found 682 results on 28 pages for 'steven a lowe'.

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

  • [.NET] Not able to use HTMLWorker or HtmlParser in iTextSharp

    - by Steven
    I'm trying to create a PDF file of a web page using iTextSharp. In order to parse the HTML, I need to use HTMLWorker or HtmlParser. But none of them "exists" in the namespaces I'm using. I'm using the following namespaces: using iTextSharp.text; using iTextSharp.text.html; using iTextSharp.text.pdf; Am I missing something obvious?

    Read the article

  • URL rewriting with mod_rewrite

    - by Steven
    The web server is Apache. I want to rewrite URL so a user won't know the actual directory. For example: The original URL: www.mydomainname.com/en/piecework/piecework.php?piecework_id=11 Expected URL: piecework.mydomainname.com/en/11 I added the following statements in .htaccess: RewriteCond %{HTTP_HOST} ^(?!www)([^.]+)\.mydomainname\.com$ [NC] RewriteRule ^(w+)/(\d+)$ /$1/%1/%1.php?%1_id=$2 [L] Of course I replaced mydomainname with my domain name. .htaccess is placed in the site root, but when I access piecework.mydomainname.com/en/11, I got "Object not found".(Of course I replaced mydomainname with my domain name.) I added the following statements in .htaccess: RewriteRule ^/(.*)/en/piecework/(.*)piecework_id=([0-9]+)(.*) piecework.mydomainname.com/en/$3 Of course I replaced mydomainname with my domain name. .htaccess is placed in the site root, but when I access piecework.mydomainname.com/en/11, I got "Object not found".(Of course I replaced mydomainname with my domain name.) What's wrong?

    Read the article

  • Automatically extracting inline XSD from WSDL into XSD file(s)

    - by Steven Geens
    I am using a third party Web Service whose definition and implementation are beyond my control. This web service will change in the future. The Web Service should be used to generate an XML file which contains some of the same data (represented by the same XSD types) as the Web Service plus some extra information generated by the program. My approach: create my own XSD referring to the XSD definitions of the WSDL of the called web service (This XSD also includes XSD types for the extra information obviously.) use a Java XML databinding framework (like ADB or JiXB) to generate the databinding classes from my own XSD file from step 1 use a Java SOAP framework (like Axis2 or CXF) with the same databinding framework to generate the databinding classes from the WSDL (This would enable me to use the objects retrieved by the web service directly in the generation of the XML.) The XSD types I am going to use in my own XSD file, but are defined in the WSDL, are subject to change. Whenever they change, I would like to automatically process the XSD and WSDL databinding again. (If the change is significant enough, this might trigger some development effort.(But usually not.)) My problem: In step 1 I need an XSD referring to the same types as used by the Web Service. The WSDL is referring to another WSDL, which is referring to another WSDL etc. Eventually there is an WSDL with the needed inline XSD types. As far as I know there is no way to directly reference the inline XSD types of a WSDL from an XSD. The approach I would think most viable, is to include an extra step in the automatic processing (before the databinding) that extracts the inline XSD from the WSDL into other XSD file(s). These other XSD file(s) can then be referred to by my own XSD file. Things I'd like to avoid: Manually copy pasting the inline XSD into an XSD file (I am looking for an automatic process.) Any manual steps.(Like the determining the WSDL that contains the inline types manually.(The location of that WSDL does change as well.)) Using xsd:any in my own XSD. I would like my own XSD file to be correct. Using a non-Java technology(like .NET) Huge amounts of implementation (but hints on how you would implement such an extraction are welcome anyway) PS: I found some similar questions, but they all had responses like: WTH would you want to do that? That is the reason for my rather large background story.

    Read the article

  • OpenGL Colorspace Conversion

    - by Steven Behnke
    Does anyone know how to create a texture with a YUV colorspace so that we can get hardware based YUV to RGB colorspace conversion without having to use a fragment shader? I'm using an NVidia 9400 and I don't see an obvious GL extension that seems to do the trick. I've found examples how to use a fragment shader, but the project I'm working on currently only supports OpenGL 1.1 and I don't have time to convert it to 2.0 and perform all the regression testing necessary. This is also targeting Linux. On other platforms I've been using a MESA extension but it doesn't function on the Nvidia card.

    Read the article

  • AbcPDF renders the same page multiple times

    - by Steven
    I need to retrieve several pages and output this in a PDF document. I have the following page structure: Page 1 Sub 1 Sub 2 Sub 3 On page one, I have a link which executes the below code. What it does, is to retrieve child pages (one level) and put them in a page collection. Then I loop trough the page collection and retrieve each sub pages URL. This works. I've tested and seen that it retrieves 3 different URL's. The problem is that my PDF gets three pages of Page 1. It does not render Sub 1 to 3. Why isn't docID = document.AddImageUrl(pageLink) retrieving the pages? Websupergoo refers to a caching problem which may occur. But their solution did not help me. Any good suggestions anyone? protected void linkBtnCreateMultipagePDF_Click(object sender, EventArgs e) { string baseURL = Request.Url.ToString(); PageDataCollection pdc = GetChildren(CurrentPageLink); //Create PDF document Doc document = new Doc(); document.Rect.Inset(10, 20); int docID; string pageLink = string.Empty; foreach (PageData pd in pdc) { //This lops goes through the different pages and retrieves that pages URL pageLink = baseURL + pd.LinkURL; document.Page = document.AddPage(); // But for some reason, the same page is added here. docID = document.AddImageUrl(pageLink); //Chain pages together while (true) { if (!document.Chainable(docID)) break; document.Page = document.AddPage(); docID = document.AddImageToChain(docID); } } //Flatten file for (int i = 1; i <= document.PageCount; i++) { document.PageNumber = i; document.Flatten(); } byte[] theData = document.GetData(); Response.Clear(); Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "inline; filename=MyPDF.PDF"); Response.AddHeader("content-length", theData.Length.ToString()); Response.BinaryWrite(theData); Response.End(); }

    Read the article

  • Get current active window's title in Java

    - by Steven
    I am trying to write a Java program that logs what application I'm using every 5 seconds (this is a time tracker app). I need some way to find out what the current active window is. I found KeyboardFocusManager.getGlobalActiveWindow() but I can't get it to work right. A cross platform solution is preferable, but if one doesn't exist, then I'm developing for linux with X.Org. Thanks.

    Read the article

  • ASP.NET User Control Value

    - by Steven
    I created a DatePicker user control (ASP code below, no code behind) which is simply a textbox, image button, and a sometimes visible calendar. <%@ Control Language="vb" AutoEventWireup="false" _ CodeBehind="myDatePicker.ascx.vb" Inherits="Website.myDate" %> <%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" _ tagprefix="asp" %> <asp:TextBox ID="Date1" runat="server"></asp:TextBox> <asp:Image ID="Image1" runat="server" ImageUrl="~/Calendar_scheduleHS.png" /> <asp:CalendarExtender ID="Date1_CalendarExtender" runat="server" Enabled="True" TargetControlID="Date1" PopupButtonID="Image1" > </asp:CalendarExtender> Can I somehow tie or pass the value of the TextBox as the value of the whole control to use in the calling code?

    Read the article

  • How do I get preg replace to work when the url contains a hashtag

    - by Steven
    I found a function online for turning a url within a string into a clickable link. However, when the url contains a hashtag it doesn't work. eg. http://www.bbc.co.uk/radio1/photos/fearnecotton/5759/1#gallery5759 Here's the part of the function concerned: $ret = preg_replace( "#(^|[\n ])([\w]+?://[\w]+[^ \"\n\r\t< ]*)#", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret ); $ret = preg_replace( "#(^|[\n ])((www|ftp)\.[^ \"\t\n\r< ]*)#", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret ); Any ideas? thanks

    Read the article

  • Get website's server from IP address

    - by Steven
    I have a function that returns a website's server when you enter the url for the site: private string GetWebServer() { string server = string.Empty; //get URL string url = txtURL.Text.Trim().ToLower(); if (!url.StartsWith("http://") && !url.StartsWith("https://")) url = "http://" + url; HttpWebRequest request = null; HttpWebResponse response = null; try { request = WebRequest.Create(url) as HttpWebRequest; response = request.GetResponse() as HttpWebResponse; server = response.Headers["Server"]; } catch (WebException wex) { server = "Unknown"; } finally { if (response != null) { response.Close(); } } return server; } I'd like to also be able to get a website's server from the IP address instead of the site's url. But if I enter an IP address, I get an error saying "Invalid URI: The format of the URI could not be determined." when calling WebRequest.Create(url). Does someone know how I can modify this to accomplish what I want?

    Read the article

  • JQuery how to resubmit form after ajax call success

    - by Steven Rosato
    I am using JQuery to perform form submission through an ajax request. I use form.submit(function() { if( success ) { return true; } validate(); //proceeds to an ajax call return false; } On request success I want to either proceed with form submission or user callback. Therefore, if the user callback is undefined, I will submit the form on form validation success (from my validate function). config = { successCallback: function() { success = true; form.submit(); //does not work } }; validate = function() { $.ajax( ... success: function(data) { //code logic config.successCallback(); } ); }; The ajax success callback will call config.successCallback() and if it was never overridden by the user, it would proceed to normal form submission. I tried using an instance variable (success) to make sure 'return true' would proceed to default form submission. Unfortunately this is not working. It seems that the 'return false' statement that prevents default form submission will neglect any further submit calls even if an instance variable was set. It only works after clicking the submit button another time (that makes it twice for it to work). Is there any workaround for this. I want to both use a user callback when provided but proceed with default form submission when not, and since I am using an ajax function to validate the form, the ajax success callback is complicating things.

    Read the article

  • Error C2451: Illegal conditional expression of type 'UnaryOp<E1, Op>' in ostream - visual studio 9

    - by Steven Hill
    I am getting a repeated error with VS 9. The code compiles under GNU C++, but I want debug with the VS IDE. Any idea what could be causing this error. Error 13 error C2451: conditional expression of type 'UnaryOp' is illegal \Microsoft Visual Studio 9.0\VC\include\ostream 512 //unary constraint template class UnaryOp : public Constraint { public: const E1& e1; UnaryOp(const E1& _e1); bool Satisfiable() const; Bool SatisfiableAux() const; void Print (std::ostream& os) const; UnaryOp* clone () const; //operator bool () const { return true; } }; template std::ostream& operator<<(std::ostream& os, const UnaryOp& unop); UnaryOp code that uses ostream: template INLINE void UnaryOp::Print (std::ostream& os) const { os << *this; } template INLINE std::ostream& operator<<(std::ostream& os, const UnaryOp& unop) { return os << Op::name << unop.e1; } ostream line with error: _Myt& __CLR_OR_THIS_CALL put(_Elem _Ch) { // insert a character ios_base::iostate _State = ios_base::goodbit; const sentry _Ok(*this); 512 if (!_Ok) _State |= ios_base::badbit; else { // state okay, insert character _TRY_IO_BEGIN

    Read the article

  • Javascript "Member not found" error in IE8

    - by Steven
    I'm trying to debug the following block of Javascript code to see what the issue is. I'm getting an error that says "Member not found" on the line constructor = function() { in the extend:function() method. I'm not very good with Javascript, and I didn't write this, so I'm kind of lost on what the issue is. The error only occurs in IE8, it works fine in IE7 and Firefox. var Class = { create: function() { return function() { if(this.destroy) Class.registerForDestruction(this); if(this.initialize) this.initialize.apply(this, arguments); } }, extend: function(baseClassName) { constructor = function() { var i; this[baseClassName] = {} for(i in window[baseClassName].prototype) { if(!this[i]) this[i] = window[baseClassName].prototype[i]; if(typeof window[baseClassName].prototype[i] == 'function') { this[baseClassName][i] = window[baseClassName].prototype[i].bind(this); } } if(window[baseClassName].getInheritedStuff) { window[baseClassName].getInheritedStuff.apply(this); } if(this.destroy) Class.registerForDestruction(this); if(this.initialize) this.initialize.apply(this, arguments); } constructor.getInheritedStuff = function() { this[baseClassName] = {} for(i in window[baseClassName].prototype) { if(!this[i]) this[i] = window[baseClassName].prototype[i]; if(typeof window[baseClassName].prototype[i] == 'function') { this[baseClassName][i] = window[baseClassName].prototype[i].bind(this); } } if(window[baseClassName].getInheritedStuff) { window[baseClassName].getInheritedStuff.apply(this); } } return constructor; }, objectsToDestroy : [], registerForDestruction: function(obj) { if(!Class.addedDestructionLoader) { Event.observe(window, 'unload', Class.destroyAllObjects); Class.addedDestructionLoader = true; } Class.objectsToDestroy.push(obj); }, destroyAllObjects: function() { var i,item; for(i=0;item=Class.objectsToDestroy[i];i++) { if(item.destroy) item.destroy(); } Class.objectsToDestroy = null; } }

    Read the article

  • Need help with creating PDF from HTML using itextsharp

    - by Steven
    I'm trying to crate a PDF out of a HTML page. The CMS I'm using is EPiServer. This is my code so far: protected void Button1_Click(object sender, EventArgs e) { naaflib.pdfDocument(CurrentPage); } public static void pdfDocument(PageData pd) { //Extract data from Page (pd). string intro = pd["MainIntro"].ToString(); // Attribute string mainBody = pd["MainBody"].ToString(); // Attribute // makae ready HttpContext HttpContext.Current.Response.Clear(); HttpContext.Current.Response.ContentType = "application/pdf"; // Create PDF document Document pdfDocument = new Document(PageSize.A4, 80, 50, 30, 65); //PdfWriter pw = PdfWriter.GetInstance(pdfDocument, HttpContext.Current.Response.OutputStream); PdfWriter.GetInstance(pdfDocument, HttpContext.Current.Response.OutputStream); pdfDocument.Open(); pdfDocument.Add(new Paragraph(pd.PageName)); pdfDocument.Add(new Paragraph(intro)); pdfDocument.Add(new Paragraph(mainBody)); pdfDocument.Close(); HttpContext.Current.Response.End(); } This outputs the content of the article name, intro-text and main body. But it does not pars HTML which is in the article text and there is no layout. I've tried having a look at http://itextsharp.sourceforge.net/tutorial/index.html without becomming any wiser. Any pointers to the right direction is greatly appreciated :)

    Read the article

  • Simple LINQ Aggregate Query

    - by Steven
    What is the vb.net equivalent of the following psuedo-code using LINQ? select min(credits) minCredits, max(credits) maxCredits, min(dollars) minDollars, max(dollars) maxDollars from players minCredits_lbl.Text = minCredits ... maxDollars_lbl.Text = maxDollars I have the following, but I can't figure out how to get any further. Dim query = From row in myDataSet.Tables("Players") _ Select credits = row("credits"), dollars = row("dollars")

    Read the article

  • Add WhereParameters to LinqDataSource in Selecting event

    - by Steven
    I have a repeater using a LinqDataSource as a data source. When a query string is entered, I'd like to filter the results, but ONLY when a query string is entered. If there is no query string, the results should not be filtered, all results should be returned. I'm trying to add a WhereParameter to my LinqDataSource in the Selecting event of the LinqDataSource, but it's not working. Here's my code: protected void ldsImages_Selecting(object sender, LinqDataSourceSelectEventArgs e) { if (Request.QueryString["id"] != null) { e.WhereParameters.Add("ImageTypeID", Request.QueryString["id"]); } }

    Read the article

  • Filtering DBNull With LINQ

    - by Steven
    Why does the following query raise the error below for a row with a NULL value for barrel when I explicitly filter out those rows in the Where clause? Dim query = From row As dbDataSet.conformalRow In dbDataSet.Tables("conformal") _ Where Not IsDBNull(row.Cal) AndAlso tiCal_drop.Text = row.Cal _ AndAlso Not IsDBNull(row.Tran) AndAlso tiTrans_drop.Text = row.Tran _ AndAlso Not IsDBNull(row.barrel) _ Select row.barrel If query.Count() > 0 Then tiBarrel_txt.Text = query(0) Run-time exception thrown : System.Data.StrongTypingException - The value for column 'barrel' in table 'conformal' is DBNull. How should my query / condition be rewritten to work as I intended?

    Read the article

  • Unable to execute a function using reflection

    - by Steven
    hi, i am developing a eclipse plugin . In this plugin i am using reflection to execute a function in a class present in another project which is a hibernate project.Whenever the invoke is used i.e mymethod.invoke(myobj); it is giving this exception java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:599) at packagesearch.DummyExecution.execution(DummyExecution.java:154) at packagesearch.HelloWorldAction.run(HelloWorldAction.java:48) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:599) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) at org.eclipse.equinox.launcher.Main.main(Main.java:1212) Caused by: java.lang.NoClassDefFoundError: org.dom4j.DocumentException at java.lang.J9VMInternals.verifyImpl(Native Method) at java.lang.J9VMInternals.verify(J9VMInternals.java:72) at java.lang.J9VMInternals.initialize(J9VMInternals.java:134) at test.Example.demo1(Example.java:38) ... 36 more Caused by: java.lang.ClassNotFoundException: org.dom4j.DocumentException at java.net.URLClassLoader.findClass(URLClassLoader.java:419) at java.lang.ClassLoader.loadClass(ClassLoader.java:643) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:345) at java.lang.ClassLoader.loadClass(ClassLoader.java:609) ... 40 more what is the exact problem . i have used loader to load the class.Help

    Read the article

  • Unable to execute a function usnig reflection

    - by Steven
    hi, i am developing a eclipse plugin . In this plugin i am using reflection to execute a function in a class present in another project which is a hibernate project.Whenever the invoke is used i.e mymethod.invoke(myobj); it is giving this exception java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:599) at packagesearch.DummyExecution.execution(DummyExecution.java:154) at packagesearch.HelloWorldAction.run(HelloWorldAction.java:48) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:599) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) at org.eclipse.equinox.launcher.Main.main(Main.java:1212) Caused by: java.lang.NoClassDefFoundError: org.dom4j.DocumentException at java.lang.J9VMInternals.verifyImpl(Native Method) at java.lang.J9VMInternals.verify(J9VMInternals.java:72) at java.lang.J9VMInternals.initialize(J9VMInternals.java:134) at test.Example.demo1(Example.java:38) ... 36 more Caused by: java.lang.ClassNotFoundException: org.dom4j.DocumentException at java.net.URLClassLoader.findClass(URLClassLoader.java:419) at java.lang.ClassLoader.loadClass(ClassLoader.java:643) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:345) at java.lang.ClassLoader.loadClass(ClassLoader.java:609) ... 40 more what is the exact problem . i have used loader to load the class.Help

    Read the article

  • Date since 1600 to NSDate?

    - by Steven Fisher
    I have a date that's stored as a number of days since January 1, 1600 that I need to deal with. This is a legacy date format that I need to read many, many times in my application. Previously, I'd been creating a calendar, empty date components and root date like this: self.gregorian = [[[NSCalendar alloc] initWithCalendarIdentifier: NSGregorianCalendar ] autorelease]; id rootComponents = [[[NSDateComponents alloc] init] autorelease]; [rootComponents setYear: 1600]; [rootComponents setMonth: 1]; [rootComponents setDay: 1]; self.rootDate = [gregorian dateFromComponents: rootComponents]; self.offset = [[[NSDateComponents alloc] init] autorelease]; Then, to convert the integer later to a date, I use this: [offset setDay: theLegacyDate]; id eventDate = [gregorian dateByAddingComponents: offset toDate: rootDate options: 0]; (I never change any values in offset anywhere else.) The problem is I'm getting a different time for rootDate on iOS vs. Mac OS X. On Mac OS X, I'm getting midnight. On iOS, I'm getting 8:12:28. (So far, it seems to be consistent about this.) When I add my number of days later, the weird time stays. OS | legacyDate | rootDate | eventDate ======== | ========== | ==========================|========================== Mac OS X | 143671 | 1600-01-01 00:00:00 -0800 | 1993-05-11 00:00:00 -0700 iOS | 143671 | 1600-01-01 08:12:28 +0000 | 1993-05-11 07:12:28 +0000 In the previous release of my product, I didn't care about the time; now I do. Why the weird time on iOS, and what should I do about it? (I'm assuming the hour difference is DST.) I've tried setting the hour, minute and second of rootComponents to 0. This has no impact. If I set them to something other than 0, it adds them to 8:12:28. I've been wondering if this has something to do with leap seconds or other cumulative clock changes. Or is this entirely the wrong approach to use on iOS?

    Read the article

  • in php how do I use preg replace to turn a url into a tinyurl

    - by Steven
    I need to convert a string of text containing a long url into the same string but with a tinyurl (using the tinyurl api). eg. convert "blah blah blah /http://example.com/news/sport blah blah blah" into "blah blah blah http://tinyurl.com/yaeocnv blah blah blah". How can it be done? PLEASE NOTE I added a slash before the long url as I'm only allowed to post one link

    Read the article

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