Daily Archives

Articles indexed Thursday June 3 2010

Page 2/111 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Does Windows 7 Home Premium support Dual Core Processors?

    - by nicon
    I'm looking to buy a new laptop (the new studio 14 from Dell). The processor for this laptop is an Intel Core i5-520M. Think link http://reviews.cnet.com/8301-31012_7-10379487-10355804.html says that it supports only 1 CPU. Also Dell recommend the Professionnal version even tough Home Premium is the default choice. So I'm a little confuse as does Windows 7 Home Premium support Dual Core Processors ?

    Read the article

  • What do I name this class whose sole purpose is to report failure?

    - by Blair Holloway
    In our system, we have a number of classes whose construction must happen asynchronously. We wrap the construction process in another class that derives from an IConstructor class: class IConstructor { public: virtual void Update() = 0; virtual Status GetStatus() = 0; virtual int GetLastError() = 0; }; There's an issue with the design of the current system - the functions that create the IConstructor-derived classes are often doing additional work which can also fail. At that point, instead of getting a constructor which can be queried for an error, a NULL pointer is returned. Restructuring the code to avoid this is possible, but time-consuming. In the meantime, I decided to create a constructor class which we create and return in case of error, instead of a NULL pointer: class FailedConstructor : public IConstructor public: virtual void Update() {} virtual Status GetStatus() { return STATUS_ERROR; } virtual int GetLastError() { return m_errorCode; } private: int m_errorCode; }; All of the above this the setup for a mundane question: what do I name the FailedConstructor class? In our current system, FailedConstructor would indicate "a class which constructs an instance of Failed", not "a class which represents a failed attempt to construct another class". I feel like it should be named for one of the design patterns, like Proxy or Adapter, but I'm not sure which.

    Read the article

  • Deserialize unnamed json array into an object in c#

    - by rksprst
    Wondering how to deserialize the following string in c#: "[{\"access_token\":\"thisistheaccesstoken\"}]" I know how to do it if the json was: "{array=[{\"access_token\":\"thisistheaccesstoken\"}]}" I'd do it like this: public class AccessToken { public string access_token {get;set;} public DateTime expires { get; set; } } public class TokenReturn { public List<AccessToken> tokens { get; set; } } JavaScriptSerializer ser = new JavaScriptSerializer(); TokenReturn result = ser.Deserialize<TokenReturn>(responseFromServer); But without that array name, I'm not sure. Any suggestions? Thanks!

    Read the article

  • Why might my Xcode be crashing (or at least displaying an error on launch)?

    - by dsobol
    I am getting an error thrown when I launch my Xcode 3.2 all of a sudden: Uncaught Exception: * -[NSCFArray initWithObjects:count:]: attempt to insert nil object at objects[0] I can click through the error and Xcode seems to launch properly. I removed and reinstalled Xcode to no avail, and yet cannot find a config or perference that might be the culprit. I am running on 10.6.3 fwiw.... Has anyone else run into this problkem? TIA! Regards, Steve O'Sullivan

    Read the article

  • A hooked DirectX 9 program crashes on window resize, texture related.

    - by Ben
    I'm using EasyHook and SlimDX to overlay some graphics using SlimDX's Sprite and Texture classes. When I resize windows some programs fine, but others will crash - Winamp's MilkDrop 2 gives me an ambiguous memory error for example. I expect this is due to the after market Texture I created. The question is what VTable function should I hook and/or how/when do I dispose and recreate the Texture? Reset perhaps? If it isn't obvious I don't know much about DirectX.

    Read the article

  • Is there an easy way of obtaining the total page response time in ASP.Net?

    - by Earlz
    Hello, commonly on say PHP or other web frameworks getting the total response time is easy, just start the timer at the top of the file and stop it at the end. In ASP.Net there is the whole Page Lifecycle bit though so I'm not sure how to do this. I would like for this response time recording to take place in a master page and the response time show up in the footer of pages. What would be the best way of doing this? Is there something built in to ASP.Net for it? Is it even possible to include the OnRender time?

    Read the article

  • Any way to separate unit tests from integration tests in VS2008?

    - by AngryHacker
    I have a project full of tests, unit and integration alike. Integration tests require that a pretty large database be present, so it's difficult to make it a part of the build process simply because of the time that it takes to re-initialize the database. Is there a way to somehow separate unit tests from integration tests and have the build server just run the unit tests? I see that there is an Ordered Unit test in VS2008, which allows you to pick and choose tests, but I can't make it just execute alone, without all the others. Is there a trick that I am missing? Or perhaps I could adorn the unit tests with an attribute? What are some of the approaches people are using? P.S. I know I could use mocking for integration tests (just to make them go faster) but then it wouldn't be a true integration test.

    Read the article

  • getline() sets failbit and skips last line

    - by Thanatos
    I'm using std::getline() to enumerate through the lines in a file, and it's mostly working. It's left me curious however - std::getline() is skipping the very last line in my file, but only if it's blank. Using this minimal example: #include <iostream> #include <string> int main() { std::string line; while(std::getline(std::cin, line)) std::cout << "Line: “" << line << "”\n"; return 0; } If I feed it this: Line A Line B Line C I get those lines back at me. But this: Line A Line B Line C [* line is present but blank, ie, the file end is: "...B\nLine C\n" *] (I unfortunately can't have a blank line in SO's little code box thing...) So, first file has three lines ( ["Line A", "Line B", "Line C"] ), second file has four ( ["Line A", "Line B", "Line C", ""] ) This to me seems wrong - I have a four line file, and enumerating it with getline() leaves me with 3. What's really got me scratching my head is that this is exactly what the standard says it should do. (21.3.7.9) Even Python has similar behaviour (but it gives me the newlines too - C++ chops them off.) Is this some weird thing where C++ is expected lines to be terminated, and not separated by '\n', and I'm feeding it differently? Edit Clearly, I need to expand a bit here. I've met up with two philosophies of determining what a "line" in a file is: Lines are terminated by newlines - Dominant in systems such as Linux, and editors like vim. Possible to have a slightly "odd" file by not having a final '\n' (a "noeol" in vim). Impossible to have a blank line at the end of a file. Lines are separated by newlines - Dominant in just about every Windows editor I've ever come across. Every file is valid, and it's possible to have the last line be blank. Of course, YMMV as to what a newline is. I've always treated these as two completely different schools of thought. One earlier point I tried to make was to ask if the C++ standard was explicitly or merely implicitly following the first. (Curiously, where is Mac? terminated or separated?)

    Read the article

  • Which language YELP is built in?

    - by klm9971
    Hello, I want to know that which language YELP or similar websites are built in? I am developer which is working in an early stage startup which requires most content like YELP or CitySearch or YEXT. Any help is appreciated. Coder123

    Read the article

  • Browser Cache API for non IE browsers

    - by MaxK
    IE has WinInet API, such as GetUrlCacheEntryInfo, to read and manipulate IE browser cache. Is there a similar API for non IE browsers such as Firefox or Chrome? If so where can I get more info? Thanks Update: According to following (http://stackoverflow.com/questions/61453/accessing-firefox-cache-from-an-xpcom-component) the WinInet function GetUrlCacheEntryInfo() can be accomplished by nsICacheSession.openCacheEntry() to get nsICacheEntryDescriptor. Is there an equivalent WinInet function CreateUrlCacheEntry() which will create a cache entry?

    Read the article

  • Java multiple Images Uploader

    - by Padur
    Hello Folks I have this new requirement to develop a software which is a large scale image up loader in a web application. I was able to do the same using swing contains several feature like drag and drop, progress bar, remove file / files , modify, limit file size, verify file information, timer, verify at run time ..and its a very powerful tool which uploads images. I would like to do the same in web based app, like user selects 200 images process it and click upload and it should start uploading, like to know any feasible frameworks or any API's which help me do this faster and achieve the same kind of functionality. Please point me in correct direction. -PD

    Read the article

  • PHP mysql select results

    - by Jordan Pagaduan
    <?php $sql = " SELECT e.*, l.counts AS l_counts, l.date AS l_date, lo.counts AS lo_counts, lo.date AS lo_date FROM employee e LEFT JOIN logs l ON l.employee_id = e.employee_id LEFT JOIN logout lo ON lo.employee_id = e.employee_id WHERE e.employee_id =" .(int)$_GET['salary']; $query = mysql_query($sql); $rows = mysql_fetch_array($query); while($countlog = $rows['l_counts']) { echo $countlog; } echo $rows['first_name']; echo $rows['last_name_name']; ?> I got what I want to my first_name and last_name(get only 1 results). The l_counts I wanted to loop that thing but the result is not stop counting until my pc needs to restart. LoL. How can I get the exact result of that? I only need to get the exact results of l_counts. Thank you Jordan Pagaduan

    Read the article

  • Parsing NSXMLNode Attributes in Cocoa

    - by Jeffrey Kern
    Hello everyone, Given the following XML file: <?xml version="1.0" encoding="UTF-8"?> <application name="foo"> <movie name="tc" english="tce.swf" chinese="tcc.swf" a="1" b="10" c="20" /> <movie name="tl" english="tle.swf" chinese="tlc.swf" d="30" e="40" f="50" /> </application> How can I access the attributes ("english", "chinese", "name", "a", "b", etc.) and their associated values of the MOVIE nodes? I currently have in Cocoa the ability to traverse these nodes, but I'm at a loss at how I can access the data in the MOVIE NSXMLNodes. Is there a way I can dump all of the values from each NSXMLNode into a Hashtable and retrieve values that way? Am using NSXMLDocument and NSXMLNodes.

    Read the article

  • iPhone SDK - Display more information about a selected CustomCell (custom UITableViewCell)

    - by Pittor
    If got a CustomCell loaded using: NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:@"CustomCell" owner:nil options:nil]; I have no problems with the tableview but when I select a row I want display more information on that row(like facebook app)... using the typical "show more". At the beginning the row show "title" and "description". When I select that row i want to show "title", "description" and a webview... and, of course, make the row bigger to accommodate that objects. Maybe changing this CustomCell by another bigger CustomCell? I have no idea where to start. Thanks. Sorry for my english :S

    Read the article

  • Is PyOpenGL a good place to start learning opengl programing?

    - by Isaiah
    I want to start learning OpenGL but I don't really want to have to learn another language to do it. I already am pretty proficient in python and enjoy the language. I just want to know how close it is to the regular api? Will I be able to pretty easily follow tutorials and books without too much trouble? I know C++ gives better performance, but for just learning can I go wrong with PyOpenGL? Thanks alot

    Read the article

  • Using pointers in PHP.

    - by Babiker
    I ask this question because i learned that in programming and designing, you must have a good reason for decisions. I am php learner and i am at a crossroad here, i am using simple incrementation to try to get what im askin across. I am certainly not here to start a debate about the pros/cons of pointers but when it comes to php, which is the better programming practice: function increment(&$param) { $param++; } Or function increment($param){ return $param++; } $param = increment($param);

    Read the article

  • How to send a message to a service?

    - by Howard
    Hello every body: We are trying to develop an application that send messages to a service, but we only have send message between two applications. We are developing in Delphi 7, Windows XP. We need the service send back a message to the application, depending on the result of the action that the application sent to do to the service. I am sorry about my english... Thanks.

    Read the article

  • Ditching Django's models for Ajax/Web Services

    - by Igor Ganapolsky
    Recently I came across a problem at work that made me rethink Django's models. The app I am developing resides on a Linux server. Its a simple model/view/controller app that involves user interaction and updating data in the database. The problem is that this data resides in a MS SQL database on a Windows machine. So in order to use Django's models, I would have to leverage an ODBC driver on linux, and the use a python add-on like pyodbc. Well, let me tell you, setting up a reliable and functional ODBC connection on linux is no easy feat! So much so, that I spent several hours maneuvering this on my CentOS with no luck, and was left with frustration and lots of dumb system errors. In the meantime I have a deadline to meet, and suddenly the very agile and rapid Django application is a roadblock rather than a pleasure to work with. Someone on my team suggested writing this app in .NET. But there are a few problems with that: it won't be deployable on a linux machine, and I won't be able to work on it since I don't know ASP.net. Then a much better suggestion was made: keep the app in django, but instead of using models, do straight up ajax/web services calls in the template. And then it dawned on me - what a great idea. Django's models seem like a nuissance and hindrance in this case, and I can just have someone else write .Net services on their side, that I can call from my template. As a result my app will be leaner and more compact. So, I was wondering if you guys ever came across a similar dillema and what you decided to do about it.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >