Search Results

Search found 1485 results on 60 pages for 'dan heyse'.

Page 36/60 | < Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >

  • Can Qt's QWebView display programatically generated XML?

    - by Dan Ellis
    Using Qt 4.6, I can dynamically add to an HTML page like this: ui->webView->page()->mainFrame()->documentElement().findFirst("body").appendInside("<i>some text</i>\n"); However, if I QWebView::load() an XML file, it displays it with the correct CSS styling (from an processing instruction), but doesn't show any changes when I do something like: ui->webView->page()->mainFrame()->documentElement().findFirst("lines").appendInside("<line>hello</line>\n"); Why is it treating them differently, and is there a way to modify an XML document in the same way I can an HTML one?

    Read the article

  • ADO "Unspecified Error" instead of actual error when fetching server side cursor

    - by Dan
    This relates to my recent question: http://stackoverflow.com/questions/2835663/force-oracle-error-on-fetch I am now able to reproduce a scenario where using ADO with the Oracle OLEDB Provider, I can force an error such as ORA-01722: invalid number to occur on calling Recordset.MoveNext However, this is not the error that is returned to the application. Instead, the application sees Provider error '80004005' Unspecified error. How can I get the application to see the real error from the database? This is with Oracle 10g (client and server), if it matters. Sample code is roughly as follows: Dim con As New ADODB.Connection Dim cmd As New ADODB.Command Dim rs As ADODB.Recordset con.ConnectionString = "Provider=OraOLEDB.ORACLE;Data Source=xxx;User Id=yyy;Password=zzz" con.CursorLocation = adUseServer con.Open Set cmd.ActiveConnection = con cmd.CommandText = "select * from table(ret_err)" cmd.Prepared = True Set rs = cmd.Execute While Not rs.EOF rs.MoveNext Wend

    Read the article

  • Jquery post array via ajax

    - by Dan
    I have an array (for checkboxes) that I need to pass alongside the regular form in an ajax post, but can't seem to get this to work: new_data = [a,b,c,d,e]; somedata_assoc = JQuery.param({'choices[]': new_data}); $.ajax({ type: "POST", url: contract_qurl, data: $(div).find("form").serialize()+"&"+somedata_assoc, context: $(this), success: function(data) { $("#results_table").html(data); } });

    Read the article

  • Accessing ArrayBuffer from PHP $_POST after xmlHTTPrequest send()

    - by Dan
    I'm following the tuitions on XMLHttpRequest 2 from : https://developer.mozilla.org/en/DOM/XMLHttpRequest/Sending_and_Receiving_Binary_Data and http://www.html5rocks.com/en/tutorials/file/xhr2/#toc-send-arraybuffer They're great tutorials for the client side, and here is a working extract from my script: var imagebuffer = new ArrayBuffer(size); // create the readonly memory buffer var imagedata= new Uint8Array(imagebuffer); // create a view to manipulate data // do some cool stuff with imagedata var exchange=new XMLHttpRequest(); exchange.open("POST",url,true); exchange.send(arraybuffer); So far so good, and I can see from the both client and server control panels that plenty of data is being transferred. Here's my problem: how do I access the ArrayBuffer with PHP at the server? I'm used to the $_POST superglobal wanting parameters passing from a HTML form so it can be accessed as an array but I can't find any reference for how to access this binary array and stick it in my MySQL database.

    Read the article

  • backbone js or knockout js as a web framework with jquery mobile

    - by Dan
    without trying to cause a mass discussion I would like some advice from the fellow users of stack overflow. I am about to start building a mobile website that gets it data from JSON that comes from a PHP rest api. I have looked into different mobile frameworks and feel that JQM will work best for us as we have the knowledge of jQuery even though a little large. Currently at work however we are using jQuery for all our sites and realise that now we are building a mobile website I need to think about javascript frameworks to move us onto a more MV* approach, which I understand the benefits of and will bring much needed structure to this mobile site and future web applications we may bring. I have made a comparision table where I have managed to bring the selection down to 2 - backbone and knockout. I have been looking around the web and it seems that there is more support for backbone in general and maybe even more support for backbone with JQM. http://jquerymobile.com/test/docs/pages/backbone-require.html One thing I have noticed however is that backbone doesnt support view bindings (declarative approach) whereas knockout does - is this a massive bonus? one of the main reasons for using a mv* for us is to get more structure - so I would like to use the library that will intergrate best with jQuery and especially jQuery mobile. neither of them seem to have that similar syntax... Thanks

    Read the article

  • Resharper Warnings with MVVM

    - by Dan Bryant
    As I implement the MVVM pattern with WPF, I'm finding that Resharper is often warning me that certain properties are never used in my ViewModels. The problem is that they are being used, but only by the data binding system. Has anyone else encountered this annoyance and is there a way to help Resharper realize that these properties are, indeed, being used? I am glad, at least, that VS 2010 properly realizes that [Import] tagged members won't "always be null", but hopefully I can fix this issue as well.

    Read the article

  • How, exactly does HTML5's GeoLocation work?

    - by Dan
    I know the browser shares my IP address and details of nearby wireless networks to determine my location, but what sort of info does it know about nearby wifi networks? For example, where I live are no public wireless networks, and from my home I can see about 5 private networks, yet my location is determined within 20 meters. With there being no open networks nearby, how does Google determine my location? The only way I can think of is that Google mapped the locations of all wireless networks when they mapped streets for Street View. I've searched about online, but all I can't find any specific details.

    Read the article

  • Why aren't double quotes and backslashes allowed in strings in the JSON standard?

    - by Dan Herbert
    If I run this in a JavaScript console in Chrome or Firebug, it works fine. JSON.parse('"\u0027"') // Escaped single-quote But if I run either of these 2 lines in a Javascript console, it throws an error. JSON.parse('"\u0022"') // Escaped double-quote JSON.parse('"\u005C"') // Escaped backslash RFC 4627 section 2.5 seems to imply that \ and " are allowed characters as long as they're properly escaped. The 2 browsers I've tried this in don't seem to allow it, however. Is there something I'm doing wrong here or are they really not allowed in strings? I've also tried using \" and \\ in place of \u0022 and \u005C respectively. I feel like I'm just doing something very wrong, because I find it hard to believe that JSON would not allow these characters in strings, especially since the specification doesn't seem to mention anything that I could find saying they're not allowed.

    Read the article

  • Resources for finding Haskell jobs?

    - by Dan
    Where is a good place to go to find a job where I can (frequently) use Haskell? Just to be clear, I am not asking: What's the Haskell market like? Why is Haskell used so little in the industry? What is Haskell actually useful for? Nor am I asking you to tell me that Haskell jobs can't be found. That is the default conclusion if no good responses show up here. I am asking, for the 2 or 3 Haskell jobs that are out there, how can I find them?

    Read the article

  • LINQ to SQL - How to efficiently do either an AND or an OR search for multiple criteria

    - by Dan Diplo
    I have an ASP.NET MVC site (which uses Linq To Sql for the ORM) and a situation where a client wants a search facility against a bespoke database whereby they can choose to either do an 'AND' search (all criteria match) or an 'OR' search (any criteria match). The query is quite complex and long and I want to know if there is a simple way I can make it do both without having to have create and maintain two different versions of the query. For instance, the current 'AND' search looks something like this (but this is a much simplified version): private IQueryable<SampleListDto> GetSampleSearchQuery(SamplesCriteria criteria) { var results = from r in Table where (r.Id == criteria.SampleId) && (r.Status.SampleStatusId == criteria.SampleStatusId) && (r.Job.JobNumber.StartsWith(criteria.JobNumber)) && (r.Description.Contains(criteria.Description)) select r; } I could copy this and replace the && with || operators to get the 'OR' version, but feel there must be a better way of achieving this. Does anybody have any suggestions how this can be achieved in an efficient and flexible way that is easy to maintain? Thanks.

    Read the article

  • Can this MySQL subquery be optimised?

    - by Dan
    I have two tables, news and news_views. Every time an article is viewed, the news id, IP address and date is recorded in news_views. I'm using a query with a subquery to fetch the most viewed titles from news, by getting the total count of views in the last 24 hours for each one. It works fine except that it takes between 5-10 seconds to run, presumably because there's hundreds of thousands of rows in news_views and it has to go through the entire table before it can finish. The query is as follows, is there any way at all it can be improved? SELECT n.title , nv.views FROM news n LEFT JOIN ( SELECT news_id , count( DISTINCT ip ) AS views FROM news_views WHERE datetime >= SUBDATE(now(), INTERVAL 24 HOUR) GROUP BY news_id ) AS nv ON nv.news_id = n.id ORDER BY views DESC LIMIT 15

    Read the article

  • Simple 2 column CSS layout with nested divs

    - by Dan
    Hello, I have good familiarity with CSS but for some reason I am unable to achieve the result I want in this case. Here is the link to my test site http://danberinger.com/test.html Keep in mind that I want a 2 column layout and that the background wrapper color (gray) is not showing. Instead the body background color image is being put in place of where the wrapper background should be. Any suggestions would be greatly appreciated.

    Read the article

  • Linking Libraries in Xcode

    - by Dan
    Hey all, I'm using a powerbook (osx 10.5) and recently downloaded and installed FFTW 3.2 (link text). I've been able to compile and run some simple programs based on the online tutorial using the terminal: g++ main.cpp -lfftw3 -lm however, I can't get the same program to compile in Xcode. I get a linking error, "symbol(s) not found". There is a file called libfftw3.a in /usr/local/lib. How can this be linked? Furthermore, apparently the libraries have to be linked in a particular order, i.e. see: link text thanks for any help

    Read the article

  • Unable to control requests for static files on Google App Engine

    - by dan
    My simple GAE app is not redirecting to the /static directory for requests when url is multiple levels. Dir structure: /app/static/css/main.css App: I have two handlers one for /app and one for /app/new app.yaml: handlers: - url: /static static_dir: static - url: /app/static/(.*) static_dir: static\1 - url: /app/.* script: app.py login: required HTML: Description: When page is loaded from /app HTTP request for main.css is successful GET /static/css/main.css But when page is loaded from /app/new I see the following request: GET /app/static/css/main.cs That's when I tried adding the /app/static/(.*) in the app.yaml but it is not having any effect.

    Read the article

  • Oracle - Updating one column or another based on a condition

    - by z-dan
    I want to update a record in a table but based on a condition I will either update one column or another but I do not want to have 2 separate statements because the statements are very long and detailed. Here is the basic idea with over simplification to get to the point. PROCEDURE Animal_something(p_updater VARCHAR2) begin if p_updater = 'person' then -- I want to update the modified_by else -- if p_updater = 'a process' I want to update modified_by_process Update table_creatures set animal_type = 'Dog , **modified_by** = 'Bob' **or do this** **modified_by_process =** 'creature_package' where animal_legs = '4' I don't want: if p_updater = 'person' then Update table_creatures set animal_type = 'Dog , modified_by = 'Bob' where animal_legs = '4'; else Update table_creatures set animal_type = 'Dog , modified_by_process = 'creature_package' where animal_legs = '4'; end;

    Read the article

  • Delphi: Problems with TList of Frames

    - by Dan Kelly
    I'm having a problem with an interface that consists of a number of frames (normally 25) within a TScrollBox. There are 2 problems, and I am hoping that one is a consequence of the other... Background: When the application starts up, I create 25 frames, each containing approx. 20 controls, which are then populated with the default information. The user can then click on a control to limit the search to a subset of information at which point I free and recreate my frames (as the search may return < 25 records) The problem: If I quit the application after the initial search then it takes approx. 5 seconds to return to Delphi. After the 2nd search (and dispose / recreate of frames) it takes approx. 20 seconds) Whilst I could rewrite the application to only create the frames once, I would like to understand what is going on. Here is my create routine: procedure TMF.CreateFrame(i: Integer; var FrameBottom: Integer); var NewFrame: TSF; begin NewFrame := TSF.Create(Self); NewFrame.Name := 'SF' + IntToStr(i); if i = 0 then NewSF.Top := 8 else NewSF.Top := FrameBottom + 8; FrameBottom := NewFrame.Top + NewFrame.Height; NewFrame.Parent := ScrollBox1; FrameList.Add(NewFrame); end; And here is my delete routine: procedure TMF.ClearFrames; var i: Integer; SF: TSF; begin for i := 0 to MF.FrameList.Count -1 do begin SF := FrameList[i]; SF.Free; end; FrameList.Clear; end; What am I missing?

    Read the article

  • How can I specify my own Rhino context in Java?

    - by Dan Howard
    I'm trying to ensure that my Rhino scripts (running under Java 6) are strict so that if a script developer misspells an expression I want an exception to be thrown. Currently what happens is the expression simply evaluates to "undefined". Now according to Mozilla org https://developer.mozilla.org/en/New_in_Rhino_1.6R6 there are features to enable strict checking in the context. I cannot find a working example of this. What I did so far was write a class to extend ContextFactory and then override the hasFeature method. public class ScriptContextFactory extends ContextFactory { protected boolean hasFeature(Context context, int featureIndex) { switch (featureIndex) { case Context.FEATURE_STRICT_EVAL: return true; case Context.FEATURE_STRICT_VARS: return true; } return super.hasFeature(context, featureIndex); } } Then in the Main I set mine to the default. ContextFactory.initGlobal(new ScriptContextFactory()); and I get an illegal state exception. :( Any ideas or samples on how this works? TIA

    Read the article

  • How to configure log4j with a properties file

    - by Dan
    How do I get log4j to pick up a properties file. I'm writing a Java desktop app which I want to use log4j. In my main method if have this: PropertyConfigurator.configure("log4j.properties"); The log4j.properties file sits in the same directory when I open the Jar. Yet I get this error: log4j:ERROR Could not read configuration file [log4j.properties]. java.io.FileNotFoundException: log4j.properties (The system cannot find the file specified) What am I doing wrong?

    Read the article

  • C# Breakpoint Weirdness

    - by Dan
    In my program I've got two data files A and B. The data in A is static and the data in B refers back to the data in A. In order to make sure the data in B is invalidated when A is changed, I keep an identifier for each of the links which is a long byte-string identifying the data. I get this string using BitConverter on some of the important properties. My problem is that this scheme isn't working. I save the identifiers initially, and with I reload (with the exact same data in A) the identifiers don't match anymore. It seems the bit converter gives different results when I go to save. The really weird thing about it is, if I place a breakpoint in the save code, I can see the identifier it's writing to the file is fine, and the next load works. If I don't place a breakpoint and say print the identifiers to console instead, they're totally different. It's like when my program is running at full-speed the CPU messes up some instructions. This isn't the first time something like this happens to me. I've seen it in other projects. What gives? Has anyone every experienced this kind of debugging weirdness? I can't explain how stopping the program and not stopping it can change the output. Also, it's not a hardware problem because this happens on my laptop as well.

    Read the article

  • Where about should my main class be created in a project?

    - by Dan
    The problem is where a class should be created in my code. An example is I have a UI class and a main logic class that controls other objects. Should the main logic class create the UI object, or should the UI object create the instance of the main logic class? An explanation of which method is best and why would be ideal. Thanks.

    Read the article

  • Have you read any ASP.NET MVC 2.0 book?

    - by Dan Dumitru
    I'm sorry for asking yet another "best [insert-technology] book". I know a bit of MVC, I want to start a project in MVC 2 and a good book would be really helpful. Usually, after a while, people come to a consensus what are the top 2-3 books for learning a given technology. Have you read any ASP.NET MVC 2.0 book? If so, how was it?

    Read the article

  • Starting company and getting a good deal

    - by Dan
    Hi, I'm having the possibility to start a small company with someone else. I'm a software programmer and been working on a field where there isn't much competition, at least in the platform I'm developing, which is the one with highest market share. This other person comes from marketing so he would find / provide clients and be in charge of the business side. So initially it would be me, the tech guy with the knowledge to develop our product and products based on my development, and this person who would become CEO (basically a 50/50 share). The idea is getting a product on our own, but also perform projects for others in order to get some cash. The problem is that his idea is doing this without initial capital. He tells me that he could get some customers from past business (which is mostly true as he has been in the business for some time) and then with the money obtained from such development, we could hire some freelance developers and build our own platform. I've already discussed with him that I don't find this the best way, provided that we need to compete against other companies some of who are VC funded and have many developers working fulltime. But most of all, I'm thinking of whether this is a fair deal to do, provided that this person is not providing anything other than clients, and I'd be the one having to do the work and dedicate time, thus also taking most of the risks. In all fairness, I'd expect him to put some initial capital, given that initially I'm putting some of my code which in some way is money given the time I've dedicated to it. So the question here is, does this seem fair to you? Is this the way it is usually done? My only concern here is that I don't have previous experience with such deals, and I ignore whether this is the usual thing to do in other cases. Certainly having a marketing person helps a lot. As you probably know being a programmer doesn't make me the most indicated person for marketing ;-) but at the same time I'm not sure if this could be a good deal or I'd just be making a pretty inconvenient deal. Hope I made my point clear, but feel free to let me know if more details are needed. Thanks in advance

    Read the article

  • Why does this extension method throw a NullReferenceException in VB.NET?

    - by Dan
    From previous experience I had been under the impression that it's perfectly legal (though perhaps not advisable) to call extension methods on a null instance. So in C#, this code compiles and runs: // code in static class static bool IsNull(this object obj) { return obj == null; } // code elsewhere object x = null; bool exists = !x.IsNull(); However, I was just putting together a little suite of example code for the other members of my development team (we just upgraded to .NET 3.5 and I've been assigned the task of getting the team up to speed on some of the new features available to us), and I wrote what I thought was the VB.NET equivalent of the above code, only to discover that it actually throws a NullReferenceException. The code I wrote was this: ' code in module ' <Extension()> _ Function IsNull(ByVal obj As Object) As Boolean Return obj Is Nothing End Function ' code elsewhere ' Dim exampleObject As Object = Nothing Dim exists As Boolean = Not exampleObject.IsNull() The debugger stops right there, as if I'd called an instance method. Am I doing something wrong (e.g., is there some subtle difference in the way I defined the extension method between C# and VB.NET)? Is it actually not legal to call an extension method on a null instance in VB.NET, though it's legal in C#? (I would have thought this was a .NET thing as opposed to a language-specific thing, but perhaps I was wrong.) Can anybody explain this one to me?

    Read the article

< Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >