Search Results

Search found 2399 results on 96 pages for 'alex gosselin'.

Page 55/96 | < Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >

  • Out-of-the-box Eclipse PDT (PHP Development Tool) not capable of debugging PHP, why?

    - by Alex R
    I just finished reinstalling the "All-In-One Eclipse PDT" from zend.com. It's unable to debug even the simplest "Hello World" PHP script. How can such a major open-source app be released in such a bad shape? What am I doing wrong? This is the result of doing a "Debug As...": Problem signature: Problem Event Name: APPCRASH Application Name: php.exe Application Version: 5.2.9.9 Application Timestamp: 49dda267 Fault Module Name: ntdll.dll Fault Module Version: 6.0.6002.18005 Fault Module Timestamp: 49e03824 Exception Code: c0000130 Exception Offset: 0006f04e OS Version: 6.0.6002.2.2.0.768.3 Locale ID: 1033 Additional Information 1: 9d13 Additional Information 2: 1abee00edb3fc1158f9ad6f44f0f6be8 Additional Information 3: 9d13 Additional Information 4: 1abee00edb3fc1158f9ad6f44f0f6be8 Read our privacy statement: http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x0409 I think it wants me to configure some additional stuff, but I have no clue what exactly to do.

    Read the article

  • linq: SQL performance on high loaded web applications

    - by Alex
    I started working with linq to SQL several weeks ago. I got really tired of working with SQL server directly through the SQL queries (sqldatareader, sqlcommand and all this good stuff).  After hearing about linq to SQL and mvc I quickly moved all my projects to these technologies. I expected linq to SQL work slower but it suprisongly turned out to be pretty fast, primarily because I always forgot to close my connections when using datareaders. Now I don't have to worry about it. But there's one problem that really bothers me. There's one page that's requested thousands of times a day. The system gets data in the beginning, works with it and updates it. Primarily the updates are ++ @ -- (increase and decrease values). I used to do it like this UPDATE table SET value=value+1 WHERE ID=@I'd It worked with no problems obviously. But with linq to SQL the data is taken in the beginning, moved to the class, changed and then saved. Stats.registeredusers++; Db.submitchanges(); Let's say there were 100 000 users. Linq will say "let it be 100 001" instead of "let it be increased by 1". But if there value of users has already been increased (that happens in my site all the time) then linq will be like oops, this value is already 100 001. Whatever I'll throw an exception" You can change this behavior so that it won't throw an exception but it still will not set the value to 100 002. Like I said, it happened with me all the time. The stas value was increased twice a second on average. I simply had to rewrite this chunk of code with classic ado net. So my question is how can you solve the problem with linq

    Read the article

  • Windows cmd encoding change causes Python crash.

    - by Alex
    First I chage Windows CMD encoding to utf-8 and run Python interpreter: chcp 65001 python Then I try to print a unicode sting inside it and when i do this Python crashes in a peculiar way (I just get a cmd prompt in the same window). >>> import sys >>> print u'ëèæîð'.encode(sys.stdin.encoding) Any ideas why it happens and how to make it work? UPD: sys.stdin.encoding returns 'cp65001' UPD2: It just came to me that the issue might be connected with the fact that utf-8 uses multi-byte character set (kcwu made a good point on that). I tried running the whole example with 'windows-1250' and got 'ëeaî?'. Windows-1250 uses single-character set so it worked for those characters it understands. However I still have no idea how to make 'utf-8' work here. UPD3: Oh, I found out it is a known Python bug. I guess what happens is that Python copies the cmd encoding as 'cp65001 to sys.stdin.encoding and tries to apply it to all the input. Since it fails to understand 'cp65001' it crushes on any input that contains non-ascii characters.

    Read the article

  • Turn Function or Stored Procedure Result into "live" Result for LINQ

    - by Alex
    Is it possible to turn result sets obtained in LINQ through a stored procedure or function call into a "live" set of objects of which I can retrieve Foreign Key related objects? If, for example, my stored procedure returns a set of rows (= LINQ objects) of type "Contact", then I can't seem to obtain Contact.BillingAddress (which is related by Foreign Key). Any idea how to make this work?

    Read the article

  • Adding two Set[Any]

    - by Alex Boisvert
    Adding two Set[Int] works: Welcome to Scala version 2.8.1.final (Java HotSpot(TM) Server VM, Java 1.6.0_23). Type in expressions to have them evaluated. Type :help for more information. scala> Set(1,2,3) ++ Set(4,5,6) res0: scala.collection.immutable.Set[Int] = Set(4, 5, 6, 1, 2, 3) But adding two Set[Any] doesn't: scala> Set[Any](1,2,3) ++ Set[Any](4,5,6) <console>:6: error: ambiguous reference to overloaded definition, both method ++ in trait Addable of type (xs: scala.collection.TraversableOnce[Any])scala.collection.immutable.Set[Any] and method ++ in trait TraversableLike of type [B >: Any,That](that: scala.collection.TraversableOnce[B])(implicit bf: scala.collection.generic.CanBuildFrom[scala.collection.immutable.Set[Any],B,That])That match argument types (scala.collection.immutable.Set[Any]) Set[Any](1,2,3) ++ Set[Any](4,5,6) ^ Any suggestion to work around this error?

    Read the article

  • Python C API from C++ app - know when to lock

    - by Alex
    Hi Everyone, I am trying to write a C++ class that calls Python methods of a class that does some I/O operations (file, stdout) at once. The problem I have ran into is that my class is called from different threads: sometimes main thread, sometimes different others. Obviously I tried to apply the approach for Python calls in multi-threaded native applications. Basically everything starts from PyEval_AcquireLock and PyEval_ReleaseLock or just global locks. According to the documentation here when a thread is already locked a deadlock ensues. When my class is called from the main thread or other one that blocks Python execution I have a deadlock. Python Cfunc1() - C++ func that creates threads internally which lead to calls in "my class", It stuck on PyEval_AcquireLock, obviously the Python is already locked, i.e. waiting for C++ Cfunc1 call to complete... It completes fine if I omit those locks. Also it completes fine when Python interpreter is ready for the next user command, i.e. when thread is calling funcs in the background - not inside of a native call I am looking for a workaround. I need to distinguish whether or not the global lock is allowed, i.e. Python is not locked and ready to receive the next command... I tried PyGIL_Ensure, unfortunately I see hang. Any known API or solution for this ? (Python 2.4)

    Read the article

  • Testing in Scrum

    - by alex
    In Scrum it's a good idea to test frequently when iteration is finished at customer. But the question is what kind of test should I use when some of the prototype is done with customer? In my knowledge Acceptance test is ok when all the iteration is done - but not some part of it. Examples for the test plan would be helpful

    Read the article

  • How to run setInterval() on multiple canvases simultaneously?

    - by Alex
    I have a page which has several <canvas> elements. I am passing the canvas ID and an array of data to a function which then grabs the canvas info and passes the data onto a draw() function which in turn processes the given data and draws the results onto the canvas. So far, so good. Example data arrays; $(function() { setup($("#canvas-1"), [[110,110,100], [180,180,50], [220,280,80]]); setup($("#canvas-2"), [[110,110,100], [180,180,50], [220,280,80]]); }); setup function; function setup(canvas, data) { ctx = canvas[0].getContext('2d'); var i = data.length; var dimensions = { w : canvas.innerWidth(), h : canvas.innerHeight() }; draw(dimensions, data, i); } This works perfectly. draw() runs and each canvas is populated. However - I need to animate the canvas. As soon as I replace line 8 of the above example; draw(dimensions, data, i); with setInterval( function() { draw(dimensions, data, i); }, 33 ); It stops working and only draws the last canvas (with the others remaining blank). I'm new to both javascript and canvas so sorry if this is an obvious one, still feeling my way around. Guidance in the right direction much appreciated! Thanks.

    Read the article

  • How do I use Django to insert a Geometry Field into the database?

    - by alex
    class LocationLog(models.Model): user = models.ForeignKey(User) utm = models.GeometryField(spatial_index=True) This is my database model. I would like to insert a row. I want to insert a circle at point -55, 333. With a radius of 10. How can I put this circle into the geometry field? Of course, then I would want to check which circles overlap a given circle. (my select statement)

    Read the article

  • How to detect in a Flex app if a camera is already in use by another application?

    - by Alex Fisherr
    I am making an application that plays the video stream from the user's local system (both Windows and Mac). I use the Camera.getCamera() method and in turn Camera.names to get a list of camera attached with the system. Unfortunately, if the camera is already in use by another application, say a desktop application on user's system, the browser is crashed. Is there any way that I can detect if a specific camera from the list of available camera is already in use by any other application?

    Read the article

  • How to securely pass credit card information between pages in PHP

    - by Alex
    How do you securely pass credit card information between pages in PHP? I am building an ecommerce application and I would like to have the users to go through the checkout like this: Enter Information - Review - Finalize Order Problem is that I am not sure on how to safely pass credit information from when the user inputs them to when I process it (at the Finalize Order step). I heard using sessions is insecure, even with encryption. Any help would be appreciated!

    Read the article

  • C# using the "this" keyword in this situation?

    - by Alex
    Hi, I've completed a OOP course assignment where I design and code a Complex Number class. For extra credit, I can do the following: Add two complex numbers. The function will take one complex number object as a parameter and return a complex number object. When adding two complex numbers, the real part of the calling object is added to the real part of the complex number object passed as a parameter, and the imaginary part of the calling object is added to the imaginary part of the complex number object passed as a parameter. Subtract two complex numbers. The function will take one complex number object as a parameter and return a complex number object. When subtracting two complex numbers, the real part of the complex number object passed as a parameter is subtracted from the real part of the calling object, and the imaginary part of the complex number object passed as a parameter is subtracted from the imaginary part of the calling object. I have coded this up, and I used the this keyword to denote the current instance of the class, the code for my add method is below, and my subtract method looks similar: public ComplexNumber Add(ComplexNumber c) { double realPartAdder = c.GetRealPart(); double complexPartAdder = c.GetComplexPart(); double realPartCaller = this.GetRealPart(); double complexPartCaller = this.GetComplexPart(); double finalRealPart = realPartCaller + realPartAdder; double finalComplexPart = complexPartCaller + complexPartAdder; ComplexNumber summedComplex = new ComplexNumber(finalRealPart, finalComplexPart); return summedComplex; } My question is: Did I do this correctly and with good style? (using the this keyword)?

    Read the article

  • What options exist to get text/ list items to appear in columns?

    - by alex
    I have a bunch of HTML markup coming from an external source, and it is mainly h3 elements and ul elements. I want to have the content flow in 3 columns. I know there is something coming in CSS3, but what options do I have to get this content to flow nicely into the 3 columns at the time being? I'm not that concerned about IE6 (as long as it degrades gracefully). Am I stuck using jQuery to parse the markup and chop it up into 3 divs which float? Thank you Update As per request, here is some of the HTML I am working with <h3>Tourism Industry</h3> <ul> <li><a href="">Something</a></li> <li><a href="">Something</a></li> <li><a href="">Something</a></li> <li><a href="">Something</a></li> </ul> <h3>Small Business</h3> <ul> <li><a href="">Something</a></li> <li><a href="">Something</a></li> <li><a href="">Something</a></li> <li><a href="">Something</a></li> <li><a href="">Something</a></li> </ul> And a whole lot more following the same format.

    Read the article

  • java.io.StreamCorruptedException: invalid stream header: 7371007E

    - by Alex
    Hello, this is pprobably a simple question . I got a client Server application which communicate using objects. when I send only one object from the client to server all works well. when I attempt to send several objects one after another on the same stream I get StreamCorruptedException. can some one direct me to the cause of this error . Thanks client write method private SecMessage[] send(SecMessage[] msgs) { SecMessage result[]=new SecMessage[msgs.length]; Socket s=null; ObjectOutputStream objOut =null; ObjectInputStream objIn=null; try { s=new Socket("localhost",12345); objOut=new ObjectOutputStream( s.getOutputStream()); for (SecMessage msg : msgs) { objOut.writeObject(msg); } objOut.flush(); objIn=new ObjectInputStream(s.getInputStream()); for (int i=0;i<result.length;i++) result[i]=(SecMessage)objIn.readObject(); } catch(java.io.IOException e) { alert(IO_ERROR_MSG+"\n"+e.getMessage()); } catch (ClassNotFoundException e) { alert(INTERNAL_ERROR+"\n"+e.getMessage()); } finally { try {objIn.close();} catch (IOException e) {} try {objOut.close();} catch (IOException e) {} } return result; } server read method //in is an inputStream Defined in the server SecMessage rcvdMsgObj; rcvdMsgObj=(SecMessage)new ObjectInputStream(in).readObject(); return rcvdMsgObj; and the SecMessage Class is public class SecMessage implements java.io.Serializable { private static final long serialVersionUID = 3940341617988134707L; private String cmd; //... nothing interesting here , just a bunch of fields , getter and setters }

    Read the article

  • Converting XDocument to XmlDocument and vice versa.

    - by Workshop Alex
    It's a very simple problem that I have. I use XDocument to generate an XML file. I then want to return it as a XmlDocument class. And I have an XmlDocument variable which I need to convert back to XDocument to append more nodes. So, what is the most efficient method to convert XML between XDocument and XmlDocument? (Without using any temporary storage in a file.)

    Read the article

  • Future of VB.NET? [closed]

    - by Alex Yeung
    Hi all, I worked with C# for years. Last year, I changed my job and the company use VB.NET. Of course, theoretically C# and VB.NET are very similar and I easily adapted. However, I have worked for VB.NET for 1 year. I cannot see any future of VB.NET. As a programming language, it is so foo. Here is a list of what C# can do but VB.NET cannot Case insensitive variables how to think a new variable name? If I have a property called FolderPath, i need to establish another private variable called _folderPath or m_folderPath. In C#, FolderPath and folderPath are two variables. Moreover, it gets compile error if variable name is same as a class name. For example Dim guid = Guid.NewGuid(). (What the...) Again, I need to think a new variable name. Adhoc scope In C#, we could use {...} to create a adhoc scope and all resource in {...} will not affect the code outside. However there is not such syntax in VB.NET. I could only use If True Then and End If to make a local scope which is so unclear. In-Method Region Sometime, it is unavoidable to have a long long method. VB.NET does not support in-method region. I always need to scroll down for 1000 lines. It wastes my time. No multi-line string definition In C#, we could var s = @"..." to define a multi-line string. In VB.NET there is no direct method to do that. The indirect way is use XML-literal string. Dim s = <![CDATA[...]]>.Value. However it is unclear. No block comment In C#, we have line comment // and block comment /* ... */. However in VB.NET we only have line comment which is a very big trouble for me. No statement end symbol Statements are separated by line break in VB.NET; while statements are separated by ; in C#. Underscore I think many people know underscore _ is continue statement symbol. I really disagree with that. I know MS VB.NET language team is going to remove the underscore syntax from VB.NET. However what can we do now? Although underscore is removed in the future, what's the advantage of that? I cannot see any advantage! With scope With scope is an evil scope. Although it allows shorter statement, it is hard to trace. Default Namesapce in project level It is a nightmare for me. The only advantage of VB.NET is property initialization. I think C# cannot do that (correct me if I am wrong.) Public Property ThisIsMyProperty As String = "MyValue" Remarks: I don't think optional method parameters is an advantage of OOP. By those disadvantages, I cannot see the future of VB.NET. Anyone sees the future of VB.NET?

    Read the article

  • A regex I have working in Ruby doesn't in PHP; what could the cause be?

    - by Alex R
    I do not know ruby. I am trying to use the following regex that was generated by ruby (namely by http://www.a-k-r.org/abnf/ running on the grammar given rfc1738) in php. It is failing to match in php, but it is successfully matching in ruby. Does anyone see what differences between php's and ruby's handling of regexes that might explain this discrepancy? http:\/\/(?:(?:(?:(?:[0-9a-z]|[0-9a-z](?:[\x2d0-9a-z]?)*[0-9a-z])\x2e)?)*(?:[a-z]|[a-z](?:[\x2d0-9a-z]?)*[0-9a-z])|\d+\x2e\d+\x2e\d+\x2e\d+)(?::\d+)?(?:\/(?:(?:[!\x24'-\x2e0-9_a-z]|%[0-9a-f][0-9a-f]|[&:;=@])?)*(?:(?:\/(?:(?:[!\x24'-\x2e0-9_a-z]|%[0-9a-f][0-9a-f]|[&:;=@])?)*)?)*(?:\x3f(?:(?:[!\x24'-\x2e0-9_a-z]|%[0-9a-f][0-9a-f]|[&:;=@])?)*)?)?/i Since you all love regexes so much, how about an alternate solution. Given the ABNF in an rfc, I want a way (in php) to check if an arbitrary string is in the grammar. APG fails to compile on a 64-bit system, VTC is not Free, and I have not found any other such tools. I would also prefer not to use a regex, but it's the closest I've come to success.

    Read the article

  • Are Scala "continuations" just a funky syntax for defining and using Callback Functions?

    - by Alex R
    And I mean that in the same sense that a C/Java for is just a funky syntax for a while loop. I still remember when first learning about the for loop in C, the mental effort that had to go into understanding the execution sequence of the three control expressions relative to the loop statement. Seems to me the same sort of effort has to be applied to understand Continuations (in Scala and I guess probably other languages). And then there's the obvious follow-up question... if so, then what's the point? It seems like a lot of pain (language complexity, programmer errors, unreadable programs, etc) for no gain.

    Read the article

  • Best practices for using Amazon SQS - Polling the queue

    - by alex
    I'm designing a service for sending out emails for our eCommerce site (order confirmations, alerts etc...) The plan is to have a "SendEmail" method, that generates a chunk of XML representing the email to be sent, and sticks it on an Amazon SQS queue. My web app(s) and other applications will use this to "send" emails. I then require a way of checking the queue, and physically sending out the email messages. (I know how I'm going to be dispatching emails) I'm curious as to what the best way to "poll" the queue would be? Should I create a windows service, and use something like Quartz.net to schedule it to check the queue every x number of minutes for example? Is there a better way of doing this?

    Read the article

  • LINQ to SQL: making a "double IN" query crashes

    - by Alex
    I need to do the following thing: var a = from c in DB.Customers where (from t1 in DB.Table1 where t1.Date >= DataTime.Now select t1.ID).Contains(c.ID) && (from t2 in DB.Table2 where t2.Date >= DataTime.Now select t2.ID).Contains(c.ID) select a It doesn't want to run. I get the following error: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. But when I try to run var a = from c in DB.Customers where (from t1 in DB.Table1 where t1.Date >= DataTime.Now select t1.ID).Contains(c.ID) select a OR var a = from c in DB.Customers where (from t2 in DB.Table2 where t2.Date = DataTime.Now select t2.ID).Contains(c.ID) select a It works! I'm sure that there both IN queries contain some customers ids.

    Read the article

  • Why is this HTTP request continually looping?

    - by alex
    I'm probably overlooking something really obvious here. Comments are in to help explain any library specific code. public function areCookiesEnabled() { $random = 'cx67ds'; // set cookie cookie::set('test_cookie', $random); // try and get cookie, if not set to false $testCookie = cookie::get('test_cookie', false); $cookiesAppend = '?cookies=false'; // were we able to get the cookie equal ? $cookiesEnabled = ($testCookie === $random); // if $_GET['cookies'] === false , etc try and remove $_GET portion if ($this->input->get('cookies', false) === 'false' AND $cookiesEnabled) { url::redirect(str_replace($cookiesAppend, '', url::current())); // redirect return false; } // all else fails, add a $_GET[] if ( ! $cookiesEnabled) { url::redirect(url::current().$cookiesAppend); } return $cookiesEnabled; }

    Read the article

  • Writing my own iostream utility class: Is this a good idea?

    - by Alex
    I have an application that wants to read word by word, delimited by whitespace, from a file. I am using code along these lines: std::istream in; string word; while (in.good()) { in>>word; // Processing, etc. ... } My issue is that the processing on the words themselves is actually rather light. The major time consumer is a set of mySQL queries I run. What I was thinking is writing a buffered class that reads something like a kilobyte from the file, initializes a stringstream as a buffer, and performs extraction from that transparently to avoid a great many IO operations. Thoughts and advice?

    Read the article

< Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >