Daily Archives

Articles indexed Thursday April 1 2010

Page 16/126 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Would Mercurial help me work from 2 PCs?

    - by rikh
    I currently use Perforce for source control, but want to start working on the code from 2 different PCs at the same time (desktop and laptop). The laptop would not be able to access the perforce server very often, which makes Perforce a poor choice in this setup. Distributed source control tools like Mercurial seem better suited to the task, but I am still not clear if this would work or not. Does anyone have any experience of using Mercurial to work on 2 machines at once (eg desktop in the week, laptop in evening and weekends). Does it help, or is it still a pain the butt keeping everything in sync and knowing what is going on.

    Read the article

  • Inline editing of ManyToMany relation in Django

    - by vorpyg
    After working through the Django tutorial I'm now trying to build a very simple invoicing application. I want to add several Products to an Invoice, and to specify the quantity of each product in the Invoice form in the Django admin. Now I've to create a new Product object if I've got different quantites of the same Product. Right now my models look like this (Company and Customer models left out): class Product(models.Model): description = models.TextField() quantity = models.IntegerField() price = models.DecimalField(max_digits=10,decimal_places=2) tax = models.ForeignKey(Tax) class Invoice(models.Model): company = models.ForeignKey(Company) customer = models.ForeignKey(Customer) products = models.ManyToManyField(Product) invoice_no = models.IntegerField() invoice_date = models.DateField(auto_now=True) due_date = models.DateField(default=datetime.date.today() + datetime.timedelta(days=14)) I guess the quantity should be left out of the Product model, but how can I make a field for it in the Invoice model?

    Read the article

  • ASP.Net MVC - how can I easily serialize query results to a database?

    - by Mortanis
    I've been working on a little property search engine while I learn ASP.Net MVC. I've gotten the results from various property database tables and sorted them into a master generic property response. The search form is passed via Model Binding and works great. Now, I'd like to add pagination. I'm returning the chunk of properties for the current page with .Skip() and .Take(), and that's working great. I have a SearchResults model that has the paged result set and various other data like nextPage and prevPage. Except, I no longer have the original form of course to pass to /Results/2. Previously I'd have just hidden a copy of the form and done a POST each time, but it seems inelegant. I'd like to serialize the results to my MS SQL database and return a unique key for that results set - this also helps with a "Send this query to a friend!" link. Killing two birds with one stone. Is there an easy way to take an IQueryable result set that I have, serialize it, stick it into the DB, return a unique key and then reverse the process with said key? I'm using Linq to SQL currently on a MS SQL Express install, though in production it'll be on MS SQL 2008.

    Read the article

  • heroku using git branch is confusing!

    - by Stacia
    Ok, so I have a big github project that i'm not supposed to merge my little Stacia branch into. However, it seems like Heroku only takes pushing MASTER seriously. It looks like I pushed my branch, but for example if I only have my branch, it even acts like there's no code on the server. I can't even get my gems installed since the .gems file is on my branch. Basically I don't even want Heroku to know there's a master. I just want to use my test Stacia branch. But it keeps ignoring my local branch. Is there a way to do this? And again, I don't want to overwrite anything on the main Github repository (eeek!) but it would be ok probably if I had both master and my branch on heroku and merged them there. I am a total git novice (on windows no less) so please bear with me.

    Read the article

  • Problems with repositories on CentOS 3.9

    - by rodnower
    Hello, I have CentOS 3.9 for i386. When I try to instal some thing with yum, i.e: yum install firefox or yum install firefox* or yum list firefox and so on, I get: +++++++++++++++++++ yum info firefox Gathering header information file(s) from server(s) Server: CentOS-3 - Addons Server: CentOS-3 - Base Server: CentOS-3 - Extras Server: CentOS-3 - Updates Server: Jason's Utter Ramblings Repo Finding updated packages Downloading needed headers Looking in Available Packages: Looking in Installed Packages: +++++++++++++++++++ Some time ago I had CentOS 5, and I had the similar problem (exept of firefox all other packages were not installed) and I spent very much time to find different repositories and so on. Now I have CentOS 3, and there is nothing I can install with yum. This is yum.conf content: +++++++++++++++++++ [main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=redhat-release installonlypkgs=kernel kernel-smp kernel-hugemem kernel-enterprise kernel-debug kernel-unsupported kernel-smp-unsupported kernel-hugemem-unsupported tolerant=1 exactarch=1 [utterramblings] name=Jason's Utter Ramblings Repo baseurl=http://www.jasonlitka.com/media/EL4/i386/ [base] name=CentOS-$releasever - Base baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ #released updates [update] name=CentOS-$releasever - Updates baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ #packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/ #additional packages that may be useful [extras] name=CentOS-$releasever - Extras baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ #[centosplus] #name=CentOS-$releasever - Plus #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ #[testing] #name=CentOS-$releasever - Testing #baseurl=http://mirror.centos.org/centos/$releasever/testing/$basearch/ #[fasttrack] #name=CentOS-$releasever - Fasttrack #baseurl=http://mirror.centos.org/centos/$releasever/fasttrack/$basearch/ +++++++++++++++++++ The file is too long, so I littely edited it. So my question is: is there some "normal" one repository that have all basic thing like firefox and so that I will insert to this file and all will work fine? Thank you very much for ahead.

    Read the article

  • writing 'remove' function in prolog

    - by Adrian
    I am desperately trying to create a remove function, that will simply remove all items that equal to X from a list. After many changes, this is my code so far: remove([], X, L1). /* when the source list is empty, stop*/ remove([X|T], X, L1) :- remove(T, X, L1). /* when first element in the list equals X, don't append it to L1 */ remove([H|T], X, L1) :- remove(T, X, [H|L1]). /*when first element in the list doesn't equal X, append it to L1 */ when running on remove([1,2,3,4,5], 3, R). it returns two trues and nothing else. Anyone has any idea what I'm doing wrong?

    Read the article

  • Game Maker Mac Release Date

    - by mtwisterr
    Does anyone know when game maker mac is coming out? Game maker got me interested in programing because I thought it was fun but I eventually wanted to make games and programs game maker could do so I want to see if it is any different when the new version comes out. I looked at www.yoyogames.com but found no new info and was wondering if I just not finding it. If you don't know what game maker is its fun to play around in but you probably won't be able to make something as good as you could program it because you are limited.

    Read the article

  • How does Select statement works in a Dynamic Linq Query?

    - by Richard77
    Hello, 1) I've a Product table with 4 columns: ProductID, Name, Category, and Price. Here's the regular linq to query this table. public ActionResult Index() { private ProductDataContext db = new ProductDataContext(); var products = from p in db.Products where p.Category == "Soccer" select new ProductInfo { Name = p.Name, Price = p.Price} return View(products); } Where ProductInfo is just a class that contains 2 properties (Name and Price). The Index page Inherits ViewPage - IEnumerable - ProductInfo. Everything works fine. 2) To dynamicaly execute the above query, I do this: Public ActionResult Index() { var products = db.Products .Where("Category = \"Soccer\"") .Select(/* WHAT SOULD I WRITE HERE TO SELECT NAME & PRICE?*/) return View(products); } I'm using both 'System.Lind.Dynamic' namespace and the DynamicLibrary.cs (downloaded from ScottGu blog). Here are my questions: What expression do I use to select only Name and Price? (Most importantly) How do I retrieve the data in my view? (i.e. What type the ViewPage inherits? ProductInfo?)

    Read the article

  • Setting a custom XOM EntityResolver

    - by Stefan Kendall
    I need to not validate against a doctype, so I'd like to set a custom EntityResolver that accepts everything. I'm getting data back from tagsoup, so I know my data is well-formed and correct. Furthermore, I need to rapidly hit a number of documents, so when I do this with the default EntityResolver, I get 503 from w3.org. How, then, can I use a XOM builder with a custom entity resolver?

    Read the article

  • Strange TFS Source Repository Problem

    - by Brian
    We have a web project we are working on using TFS and we are kind of new to it (TFS). One of my teammates is unable to see a particular page (three associated files) in the IDE. To the rest of us, it looks as though it is checked out to her. When she ran the unlock command through the console, it returned that the files for the page were not locked. Yet we are unable to check it out due to her apparently having a lock. Any thoughts, ideas, or suggestions would be greatly appreciated!

    Read the article

  • What do you do in your source control repository when you start a rewrite of a program?

    - by Max Schmeling
    I wrote an application a while back and have been maintaining it for a while now, but it's gotten to the point where there's several major new features to be added, a ton of changes that need made, and I know quite a few things I could do better, so I'm starting a rewrite of the entire program (using bits and pieces from original). My question is, what do you do with SVN at this point? Should I put the new version somewhere else, or should I delete the files I no longer need, add the new files, and just treat it like normal development in SVN? How have you handled this in the past?

    Read the article

  • svn says conflicted but it's really merged (TortoiseSVN)

    - by JoelFan
    Lately I've been seeing behavior where after an update svn shows certain files as "conflicted" but when I try to edit the conflicts, there are none (The "next conflict" and "previous conflict" buttons are disabled and if I scroll through the file, none of the lines are marked red). This seems to have started after I started working from a different repository than I had been working with, but I'm not sure if that's related.

    Read the article

  • silverlight vs ASP.NET MVC

    - by magellings
    I'm debating whether to use Silverlight 2.0 vs ASP.NET MVC for a web application. The web application will be a subscription free service marketing all age groups. It's important the source is highly testable, but also with the Web 2.0 movement a graphical web application is important as well for competitive reasons. I'm assuming silverlight is better than the ajax helpers/MVC graphically, but foundation-wise testing is better/easier with MVC. Possibly an MVP pattern with Silverlight could increase the testability of the source. Could anyone elaborate on the pros/cons of each technology and recommend one or the other based on the above? (addition 9/22/08) In regards to allowing search engines to index the site, using either technology it will utilize a backend database whereas a lot of the content will be dynamically generated. Based on some of the comments, when we talk of the searchable content would the home page of the application if written in silverlight be searchable? Would I be able to get the site to appear in a google search?

    Read the article

  • Release objects before returning a value based on those object?

    - by Moshe
    Consider the following method, where I build a string and return it. I would like to release the building blocks of the sting, but then the string is based on values that no longer exists. Now what? Am I leaking memory and if so, how can I correct it? - (NSString) getMiddahInEnglish:(int)day{ NSArray *middah = [[NSArray alloc] initWithObjects:@"Chesed", @"Gevurah", @"Tiferes", @"Netzach", @"Hod", @"Yesod", @"Malchus"]; NSString *firstPartOfMiddah = [NSString stringWithFormat: @"%@", [middah objectAtIndex: ((int)day% 7)-1]]; NSString *secondPartOfMiddah = [NSString stringWithFormat: @"%@", [middah objectAtIndex: ((int)day / 7)]]; NSString *middahStr = [NSString string@"%@ She'bi@%", firstPartOfMiddah, secondPartOfMiddah]; [middah release]; [firstPartOfMiddah release]; [secondPartOfMiddah release]; return middahStr; }

    Read the article

  • How do I create a new project in TFS from an existing project (breaking history)?

    - by Lindsay
    My team is taking over a project from a previous team. We use a different TFS server than the original team, and we are also not interested in keeping the history of the project because we are accepting the latest version of the code as the beginning of our history with the project. Branching is not an option since we want to start our history from the current version of the code. We just want a fresh project with the existing code. I have not been able to create the new project from the old code successfully. I keep getting an error: "Source control cannot add the solution: Solution would span multiple workspaces" My process for attempting the new project creation: Create a workspace for the previous team's version of the code. Get latest version of that code into local mapped workspace directory Open the solution. Unbind all projects and solution. Close solution. Create a workspace for the new version of the code on our TFS server. Copy the unbound code on my local box to the new local workspace mapped folder. Open the solution from the new directory. "Add to source control" from the new solution. Then I get the error. I have tried removing the TFS security files out of the code directories in the unbound version and tried changing source control instead of adding to source control (but it just binds back to the original instead of letting me bind to the new). Is there any other way to do this besides recreating the solution/projects and adding back all the files and references? It doesn't seem like it should be this difficult... Any advice much appreciated!

    Read the article

  • Where should I store shared resources between LocalSystem and regular user with UAC?

    - by rwired
    My application consists of two parts: A Windows Service running under the LocalSystem account and a client process running under the currently logged in regular user. I need to deploy the application across Windows versions from XP up to Win7. The client will retrieve files from the web and collect user data from the user. The service will construct files and data of it's own which the client needs to read. I'm trying to figure out the best place (registry or filesystem, or mix) to store all this. One file the client or service needs to be able to retrieve from the net is an update_patch executable which needs to run whenever an upgrade is available. I need to be sure the initial installer SETUP.EXE, and also the update_patch can figure out this ideal location and set a RegKey to be read later by both client and server telling them the magic location (The SETUP.EXE will run with elevated privileges since it needs to install the service) On my Win7 test system the service %APPDATA% points to: C:\Windows\system32\config\systemprofile\AppData\Roaming and the %APPDATA% of the client points to: C:\Users\(username)\AppData\Roaming Interestingly Google Chrome stores everything (App and Data) in C:\Users\(username)\AppData\Local\Google\Chrome Chrome runs pretty much in exactly the way I want my suite to run (able to silently update itself in the background) What I'm trying to avoid is nasty popups warning the user that the app wants to modify the system, and I want to avoid problems when VirtualStore doesn't exist because the user is running XP/2000/2003 or has UAC turned off. My target audience are non-tech-savvy general Windows users.

    Read the article

  • UIWebView leak? Can someone confirm?

    - by Shaggy Frog
    I was leak-testing my current project and I'm stumped. I've been browsing like crazy and tried everything except chicken sacrifice. I just created a tiny toy project app from scratch and I can duplicate the leak in there. So either UIWebView has a leak or I'm doing something really silly. Essentially, it boils down to a loadRequest: call to a UIWebView object, given an URLRequest built from an NSURL which references a file URL, for a file in the app bundle, which lives inside a folder that Xcode is including by reference. Phew. The leak is intermittent but still happens ~75% of the time (in about 20 tests it happened about 15 times). It only happens on the device -- this does not leak in the simulator. I am testing targeting both iPhone OS 3.1.2 and 3.1.3, on an original (1st Gen) iPod Touch that is using iPhone OS 3.1.3. To reproduce, just create a project from scratch. Add a UIWebView to the RootViewController's .xib, hook it up via IBOutlet. In the Finder, create a folder named "html" inside your project's folder. Inside that folder, create a file named "dummy.html" that has the word "Test" in it. (Does not need to be valid HTML.) Then add the html folder to your project in Xcode by choosing "Create Folder References for any added folders" Add the following to viewDidLoad NSString* resourcePath = [[NSBundle mainBundle] resourcePath]; NSString* filePath = [[resourcePath stringByAppendingPathComponent:@"html"] stringByAppendingPathComponent:@"dummy.html"]; NSURL* url = [[NSURL alloc] initFileURLWithPath:filePath]; NSURLRequest* request = [NSURLRequest requestWithURL:url]; // <-- this creates the leak! [browserView loadRequest:request]; [url release]; I've tried everything from setting delegate for the UIWebView and implementing UIWebViewDelegate, to not setting a delegate in IB, to not setting a delegate in IB and explicitly setting the web view's delegate property to nil, to using alloc/init instead of getting autoreleased NSURLRequests (and/or NSURLs)... I tried the answer to a similar question (setting the shared URL cache to empty) and that did not help. Can anyone help?

    Read the article

  • Why does adding a reference to project targeting .NET Framework 4.0 fail?

    - by Malcolm Post
    We have two projects that are both class libraries. Project 1 is a VS 2008 project and targets the .NET Framework 3.5. Project 2 is a VS 2010 (release candidate) project that targets the .NET Framework 4.0. When I try to add a reference to Project 2 in Project 1, it fails with a less than informative error message. I know that if I change the target Framework for Project 2 to 3.5, then adding the reference will work. My question is, if I don't change the target frameworks, but convert Project 1 to VS 2010, will the referencing work? Stated another way, is there some inherent incompatiblity between class libraries targeting different framework versions, or is it failing for me because VS 2008 doesn't know about the 4.0 framework?

    Read the article

  • Jquery Accordion Close then Open

    - by Jon
    Hi Everyone, I've set up a number of accordions on a page using the jquery accordion plugin so I can implement expand all and collapse all functionality. Each ID element is it's own accordion and the code below works to close them all no matter which ones are already open: $("#contact, #address, #email, #sales, #equipment, #notes, #marketingdata") .accordion("activate", -1) ; My problem is with the expand all. When I have them all expand with this code: $("#contact, #address, #email, #sales, #equipment, #notes, #marketingdata") .accordion("activate", 0) ; Some will contract and some will expand based on whether or not they are previously open. My idea to correct this was to collapse them all and then expand them all when the expand all was clicked. This code however won't execute properly: $("#contact, #address, #email, #sales, #equipment, #notes, #marketingdata") .accordion("activate", -1) ; $("#contact, #address, #email, #sales, #equipment, #notes, #marketingdata") .accordion("activate", 0) ; It will only hit the second command and not close them all first. Any suggestions?

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >