Search Results

Search found 4244 results on 170 pages for 'mark milford'.

Page 61/170 | < Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >

  • SQLAlchemy - select for update example

    - by Mark
    I'm looking for a complete example of using select for update in SQLAlchemy, but haven't found one googling. I need to lock a single row and update a column, the following code doesn't work (blocks forever): s = table.select(table.c.user=="test",for_update=True) u = table.update().where(table.c.user=="test") u.execute(email="foo") Do I need a commit? How do I do that? As far as I know you need to: begin transaction select ... for update update commit

    Read the article

  • Storing year/make/model in a database?

    - by Mark
    Here's what I'm thinking (excuse the Django format): class VehicleMake(Model): name = CharField(max_length=50) class VehicleModel(Model): make = ForeignKey(VehicleMake) name = CharField(max_length=50) class VehicleYear(Model): model = ForeignKey(VehicleModel) year = PositiveIntegerField() This is going to be used in those contingent drop-down select boxes, which would visually be laid out like [- Year -][- Make -][- Model -]. So, to query the data I need I would first have to select all distinct years from the years table, sorted descending. Then I'd find all the vehicle makes that have produced a model in that year. And then all the models by that make in that year. Is this a good way to do it, or should I re-arrange the foreign keys somehow? Or use a many-to-many table for the years/models so that no year is repeated?

    Read the article

  • Netbeans 7.2 won't open on OS X

    - by Mark van Wyk
    I installed Netbeans on OSX Mountain Lion running JDK 7. Everything was working fine. Then my machine for no reason crashed. After this I could no longer open Netbeans anymore. If I try to start Netbeans from the commandline: /Applications/NetBeans/NetBeans 7.2.app/Contents/MacOS/netbeans Then it works fine. From there I can select Netbeans About and confirm that my userdir and cachedir is: User directory: /Users/<user>/Library/Application Support/NetBeans/7.2 Cache directory: /Users/<user>/Library/Caches/NetBeans/7.2 So, I deleted these directories and tried again, but alas, I can only start netbeans via the commandline. Ideas appreciated...

    Read the article

  • Smart Client Guidance = Prism? Vs 2010

    - by mark smith
    Hi there, I have found this link http://smartclient.codeplex.com/ which has some updates for vs 2010 .... I don't know but i always seem to get confused i.e. lack of documentation etc..... but is this the same as Prism?? If not can anyone tell me where the differences are... It appears to be a link for designing smartclient so i presume its composite Or am i wrong? If i am indeed wrong, where is the link to prism and the vs 2010 templates? Any help would be really appreciated

    Read the article

  • dealloc on Background Thread

    - by Mark Brackett
    Is it an error to call dealloc on a UIViewController from a background thread? It seems that UITextView (can?) eventually call _WebTryThreadLock which results in: bool _WebTryThreadLock(bool): Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Background: I have a subclassed NSOperation that takes a selector and a target object to notify. -(id)initWithTarget:(id)target { if (self = [super init]) { _target = [target retain]; } return self; } -(void)dealloc { [_target release]; [super dealloc]; } If the UIViewController has already been dismissed when the NSOperation gets around to running, then the call to release triggers it's dealloc on a background thread.

    Read the article

  • opening transaction validation in vb.net

    - by Mark
    Can anyone help me on how can I validate transaction example: transaction = mySqlConn.BeginTransaction(IsolationLevel.ReadCommitted) If there's still an opened transaction, then the code above will ignore.. How do I know if there was a transaction not yet committed before opening new transaction to avoid Nested Transaction?

    Read the article

  • Output Parameter Not Returned

    - by Mark Plumpton
    Why does this script return a pair of nulls? I'm using SQL Server 2008, script run in MSSMS. CREATE PROCEDURE proc_Test ( @Input int, @Out1 int OUTPUT, @Out2 varchar(10) OUTPUT ) AS BEGIN SET NOCOUNT OFF SET @Out1 = 100 + @Input SET @Out2 = 'result=' + CONVERT(varchar,@Out1) RETURN END GO DECLARE @Out1 int, @Out2 varchar(10) exec proc_Test @Input=1, @Out1=@Out1, @Out2=@Out2 select @Out1, @Out2

    Read the article

  • Python - store output of subprocess() call in a string

    - by Mark
    Hey all, I'm trying to make a system call in Python and store the output to a string that I can manipulate in the Python program. #!/usr/bin/python import subprocess p = subprocess.Popen("pwd") # edit - actual command I want to store output of p2 = subprocess.Popen("ntpq -p") I've tried a few things including some of the suggestions here: http://stackoverflow.com/questions/1996518/retrieving-the-output-of-subprocess-call but without any luck. Many thanks!

    Read the article

  • Embedded Windows Media Player background image

    - by Mark
    Hi all, I'm loading an external video stream in my embedded player. Since it takes a little while to connect and preload you see a black background for +- 7 secs untill video plays . I would like to know if its possible to have a background image saying 'Stand by loading video' with my logo on it before the video starts to play. Only thing i could find was bgcolor parameter but that's not what I want. I hope someone can help me thanks!!

    Read the article

  • Python: Get items at depth? (set library?)

    - by Mark
    I have a nested list something like this: PLACES = ( ('CA', 'Canada', ( ('AB', 'Alberta'), ('BC', 'British Columbia' ( ('van', 'Vancouver'), ), ... )), ('US', 'United States', ( ('AL', 'Alabama'), ('AK', 'Alaska'), ... I need to retrieve some data out of it. If depth is 0 I need to retrieve all the countries (and their codes), if depth == 1, I need to retrieve all the states/provinces, if depth == 2 I need to retrieve all the cities... and so forth. Is there some set library for doing stuff like this? Or can someone point me in the right direction? I started coding up a solution only to realize it wouldn't work for levels deeper than 1 because you have to go in and out of each list...

    Read the article

  • How do people handle working with Code Names for their projects?

    - by Mark
    Hi All, Recently we started using some code names for several different types of prototype applications all following a theme. This made things a little more fun and was a great idea. The problem is that Im not too sure how people deal with migrating a codebase from "codename" state into version 1.0 state which may have a proper name... not something that a client really shouldnt see :) We are using Visual Studio at the moment, and I can see that you can change the assembly name, but there are references to the namespaces, etc... that would really be a large change to make. Do people both changing things like namespaces before the v1.0 release?

    Read the article

  • EOF of excel in vb6

    - by Mark
    how do i write the code in vb6 in finding the EOF of excel file can anyone help me? i try to code this and it works.. --- Dim excelApp as Excel.Application Dim excelWB as Excel.Workbook Set excelApp = New Excel.Application Set excelWB = excelApp.Workbooks.Open("D:\Book1.xls") Dim xlsRow as Long Dim EOF as Boolean xlsRow = 1 Do While (EOF = False) If (excelWB.Sheets("Sheet1").Cells(xlsRow, 1).Value = "") Then EOF = True Else xlsRow = xlsRow + 1 End If Loop <--- this code is working, but the only problem is only the column 1 will be checked and the others is not. Can anyone help me on how to improve this code to check all rows and column of excel cells.

    Read the article

  • postgresql syntax while exists loop

    - by veilig
    I'm working at function from Joe Celkos book - Trees and Hierarchies in SQL for Smarties I'm trying to delete a subtree from an adjacency list but part my function is not working yet. WHILE EXISTS –– mark leaf nodes (SELECT * FROM OrgChart WHERE boss_emp_nbr = -99999 AND emp_nbr > -99999) LOOP –– get list of next level subordinates DELETE FROM WorkingTable; INSERT INTO WorkingTable SELECT emp_nbr FROM OrgChart WHERE boss_emp_nbr = -99999; –– mark next level of subordinates UPDATE OrgChart SET emp_nbr = -99999 WHERE boss_emp_nbr IN (SELECT emp_nbr FROM WorkingTable); END LOOP; my question: is the WHILE EXISTS correct for use w/ postgresql? I appear to be stumbling and getting caught in an infinite loop in this part. Perhaps there is a more correct syntax I am unaware of.

    Read the article

  • Question about Linux Device Drivers.

    - by smwikipedia
    I have just installed the Xubuntu. My box runs quite slower than before when installed with a Win7. I am wondering if I am missing some device drivers. I can use gnome-device-manager to list my devices. In the device list view, I saw several blue question mark on the left side of devices. Based on my windows experience, the question mark should indicate the device is not properly configured. Is it the same with gnome-device-manager? And most importantly, how could I know for sure whether or not the corresponding device drivers have been installed? Many thanks.

    Read the article

  • Print a JavaScript array to HTML, square brackets and quotation marks intact

    - by Mark Gia Bao Nguyen
    I'd like to set the attribute of an input form with an array of values (to use for autocomplete search). I have a JS array that looks a little something like this: var suggestions = ["value1", "value2", "value3"]; Using jQuery, I did this: $("#search-input").attr("data-source", suggestions); Desired output: <input type='search' data-source='["value1", "value2", "value3"]' /> Actual output: <input type='search' data-source='value1, value2, value3' /> This breaks the autocomplete as it requires an array (or at least something that looks like a JavaScript array).

    Read the article

  • ASP.NET and Winforms: What PDF reporting tools are out there and recommended?

    - by Mark Redman
    I have ActiveReports for .Net which is a great tool, however the version I have is not going to support Visual Studio 2010. Active Reports quite pricey, so just wondering if there are any better alternatives out there at a competitive price or even open source, before I consider upgrading. I am looking for a reporting tool specifically, that has a designer and is programmable etc, not looking for something that can just produce PDF, eg iTextSharp etc. Output will primarily be PDF for web and windows applications. Using various databases, SQL Server, SQL Server Express, Azure and SQLite, so not sure SQL Server reporting services will work for all these cases. All coments appreciated.

    Read the article

  • REST API for driving distance?

    - by Mark
    Is there a service that will give me the driving distance between two addresses? Apparently Google Maps API requires you to display a map, which I don't want to do (on that particular page), and I'd like to just snag the data and save it to my DB after a user submits a form, rather than waiting for JS to do it's thing. If it's relevant, this is going into a Django app. I discovered that CloudMade offers a Python API, which is nice, except their latest dev release has a bug in it (can't use the API object), but more importantly, it's support for Canada is awful/worthless (couldn't find directions from any major city around here!).

    Read the article

  • Combining multiple jQuery functions

    - by Mark
    Is there any way to combine all of this to reduce the amount of js? This is just an example of some of the jquery dialogs I have in my site, there are a few more too. Thanks. //initiate Search refinement dialog here $("#chooseMoreCnt, #chooseMoreCat, #chooseMorePr").dialog({ bgiframe: true, autoOpen: false, width: 500, modal: true, open: function(type, data) { $(this).parent().appendTo(jQuery("form:first")); } }); //trigger country dialog $('a.chooseMoreCnt').click(function() { $('#chooseMoreCnt').dialog('open'); return false; }); //trigger category dialog $('a.chooseMoreCat').click(function() { $('#chooseMoreCat').dialog('open'); return false; }); //trigger price dialog $('a.chooseMorePr').click(function() { $('#chooseMorePr').dialog('open'); return false; });

    Read the article

  • jquery nextUntil has element

    - by Mark
    jquery nextUntil has element I have a bunch of elements like this: <div></div> <span></span> <table></table> <div></div> <span></span> <div></div> I need to check whether or not there's a table element in between the divs, and if so do something. $('div').each(function () { if ($(this).nextUntil('div').include('table')) { $(this).addClass('got-a-table'); } } Something like this? I know that there's no include method, is there something that can get me what I need? Thanks. Result should be like this: <div class='got-a-table'></div> <span></span> <table></table> <div></div> <span></span> <div></div>

    Read the article

  • What is the best algorithm to locate a point in an image file?

    - by suugaku
    Hi all, I want to create a mark sheet recognizer. Here is the description: My system uses black and white color scheme. The mark sheet paper has a small black rectangle on each corner and an additional small black rectangle, to determine orientation, near one of the previous rectangles. The paper is scanned to yield an image (in bmp format for example). The first step is to locate these five references in image as eficient as possible. My rough idea is to trace row by row and from left to right for each row. It sounds very slow I think. Is there any better way to do that? Thank you in advance. regards, Suugaku

    Read the article

  • jquery: Writing a method

    - by Mark
    This is the same question as this: http://stackoverflow.com/questions/2890620/jquery-running-a-function-in-a-context-and-adding-to-a-variable But that question was poorly posed. Trying again, I'm trying to do something like this: I have a bunch of elements I want to grab data from, the data is in the form of classes of the element children. <div id='container'> <span class='a'></span> <span class='b'></span> <span class='c'></span> </div> <div id='container2'> <span class='1'></span> <span class='2'></span> <span class='3'></span> </div> I have a method like this: jQuery.fn.grabData = function(expr) { return this.each(function() { var self = $(this); self.find("span").each(function (){ var info = $(this).attr('class'); collection += info; }); }); }; I to run the method like this: var collection = ''; $('#container').grabData(); $('#container2').grabData(); The collection should be adding to each other so that in the end I get this console.log(collection); : abc123 But collection is undefined in the method. How can I let the method know which collection it should be adding to? Thanks.

    Read the article

< Previous Page | 57 58 59 60 61 62 63 64 65 66 67 68  | Next Page >