Daily Archives

Articles indexed Saturday March 13 2010

Page 7/89 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How are views constructed in Josh Smith's MVVM sample?

    - by Wim Coenen
    Being new to both WPF and MVVM, I'm studying Josh Smith's article on the MVVM pattern and the accompanying sample code. I can see that the application is started in app.xaml.cs by constructing a MainWindow object, wiring it to a MainWindowViewModel object and then showing the main window. So far so good. However, I can't find any code which instantiates the AllCustomersView or CustomerView classes. Using "find all references" on the constructors of those views comes up with nothing. What am I missing here?

    Read the article

  • SQLAuthority News Download Microsoft SQL Server JDBC Driver 3.0 CTP 1

    Download the SQL Server JDBC Driver 3.0 CTP, a Type 4 JDBC driver that provides database connectivity through the standard JDBC application program interfaces (APIs) available in Java Platform, Enterprise Edition 5.In its continued commitment to interoperability, Microsoft has released a preview of the upcoming Java Database Connectivity (JDBC) driver. The SQL Server JDBC Driver [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • SQLAuthority News SQL Server 2008 R2 Update for Developers Training Kit (March 2010 Update)

    SQL Server 2008 R2 offers an impressive array of capabilities for developers that build upon key innovations introduced in SQL Server 2008. The SQL Server 2008 R2 Update for Developers Training Kit is ideal for developers who want to understand how to take advantage of the key improvements introduced in SQL [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Bash & 'su' script giving an error "standard in must be a tty".

    - by sHz
    Folks, I'm having an issue with a bash script which runs a particular command as a different user. The background: Running on a Linux box (CentOS), the script is quite simple, its starting the hudson-ci application. declare -r HOME=/home/hudson declare -r RUNAS=hudson declare -r HOME=/home/hudson declare -r LOG=hudson.log declare -r PID=hudson.pid declare -r BINARY=hudson.war su - ${RUNAS} -c "nohup java -jar ${HOME}/${BINARY} >> ${HOME}/${LOG} 2>&1; echo $! > ${HOME}/${PID}" & This is the bridged version of the script, when run, the script exists with "standard in must be a tty". Any ideas on what I could be doing wrong? I've tried Dr Google and all the advise hasn't helped thus far.

    Read the article

  • Why won't this DOM element disappear?

    - by George Edison
    I have a page that uses jQuery with a small glitch. I managed to get this down to a simple example that demonstrates the problem: <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> function hideIt() { $('#hideme').fadeOut('slow', function() { $(this).remove(); } ); } </script> </head> <body> <div id='#hideme'>Hide me!</div> <button onclick='hideIt();'>Hide</button> </body> </html> As you would expect, the problem is simple: the caption doesn't disappear. What simple thing did I overlook? (Or if it's not a simple thing, what complicated thing did I miss?)

    Read the article

  • Posting Static & Variable length data to the Server with JQUERY & Coldfusion

    - by nobosh
    I'm looking to post the following type of data to a server using JQUERY & Coldfusion: foodID - int foodDESC - text html text from a WYSIWYG (CKEDITOR) --there will always be just 1 foodID and foodDESC per POST to the server but there can be a variable number of: locationID - int LocationDesc - text --There can be 0-8+ of these. Should I send this in one post or multiple posts? If one post, what's the smartest way to do this? I'm never had to deal with this much data before. Thank you

    Read the article

  • Implementing the double-click event on Silverlight 4 Datagrid

    - by Mohammed Mudassir Azeemi
    Any good soul have an example of implementing the "Command Pattern" introduced by Prism on "Double-click event" of Silverlight 4.0 DataGrid. I did try the following: <data:DataGrid x:Name="dgUserRoles" AutoGenerateColumns="False" Margin="0" Grid.Row="0" ItemsSource="{Binding Path=SelectedUser.UserRoles}" IsReadOnly="False" > <data:DataGrid.Columns> <data:DataGridTemplateColumn Header=" "> <data:DataGridTemplateColumn.CellTemplate> <DataTemplate> <Button Width="20" Height="20" Click="Button_Click" Command="{Binding EditRoleClickedCommand}" CommandParameter="{Binding SelectedRole}" > </Button> </DataTemplate> </data:DataGridTemplateColumn.CellTemplate> </data:DataGridTemplateColumn> <data:DataGridTextColumn Header="Role Name" Binding="{Binding RoleName}" /> <data:DataGridTextColumn Header="Role Code" Binding="{Binding UserroleCode}" IsReadOnly="True"/> <data:DataGridCheckBoxColumn Header="UDFM Managed" Binding="{Binding RoleIsManaged}" IsReadOnly="True" /> <data:DataGridCheckBoxColumn Header="UDFM Role Assigned" Binding="{Binding UserroleIsUdfmRoleAssignment}" IsReadOnly="True" /> <data:DataGridTextColumn Header="Source User" Binding="{Binding SourceUser}" IsReadOnly="True" /> </data:DataGrid.Columns> </data:DataGrid> As you see I did try to hook up the Command there and it is not firing the event in my View Model. Looking for a good alternative.

    Read the article

  • Last words of a ??? programmer

    - by Peter
    What will the last words of some kind of programmer be? Like: LW of a Perl programmer: I don't have to write documentation. The source is formatted so well, I can read it anytime later... or Im just going to write a regular expression to find this, then I'm done...

    Read the article

  • Design by contract: predict methods needed, discipline yourself and deal with code that comes to min

    - by fireeyedboy
    I like the idea of designing by contract a lot (at least, as far as I understand the principal). I believe it means you define intefaces first before you start implementing actual code, right? However, from my limited experience (3 OOP years now) I usually can't resist the urge to start coding pretty early, for several reasons: because my limited experience has shown me I am unable to predict what methods I will be needing in the interface, so I might as well start coding right away. or because I am simply too impatient to write out the whole interfaces first. or when I do try it, I still wind up implementing bits of code already, because I fear I might forget this or that imporant bit of code, that springs to mind when I am designing the interfaces. As you see, especially with the last two points, this leads to a very disorderly way of doing thing. Tasks get mixed up. I should draw a clear line between designing interfaces and actual coding. If you, unlike me, are a good/disciplined planner, as intended above, how do you: ...know the majority of methods you will be needing up front so well? Especially if it's components that implement stuff you are not familiar with yet. ...keep yourself from resisting the urge to start coding right away? ...deal with code that comes to mind when you are designing the intefaces?

    Read the article

  • Calling end invoke on an asynchronous call when an exception has fired in WCF.

    - by james.ingham
    Hey, I currently have an asynchronous call with a callback, which fires this method on completion: private void TestConnectionToServerCallback(IAsyncResult iar) { bool result; try { result = testConnectionDelegate.EndInvoke(iar); Console.WriteLine("Connection made!"); } catch (EndpointNotFoundException e) { Console.WriteLine("Server Timeout. Are you connected?"); result = false; } ... } With the EndpointNotFoundException firing when the server is down or no connection can be made. My question is this, if I want to recall the testConnectionDelegate with some kind of re-try button, must I first call testConnectionDelegate.EndInvoke where the exception is caught? When I do call end invoke in the catch, I get another exception on result = testConnectionDelegate.EndInvoke(iar); whenever I call this method for the second time. This is "CommunicationObjectFaultedException". I'm assuming this is because I didn't end it properly, which is what I think I have to do. Any help would be appreciated. Thanks - James

    Read the article

  • how to learn winsock or raw sockets? (c++)

    - by blood
    i have been googleing trying to find a Winsock book or something about networking but all i can find is out of date books or nothing at all :( so does anyone know a book i can buy to learn about networking in VC++ 2008? i really would like a book i could hold because i learn better when it's in my hand.

    Read the article

  • Variable Scope Problem, iPhone

    - by Stumf
    Hello all, I need some help here so I will do my best to explain. I have worked on this all day and had no success (just learning!) I have: NSArray *getValue(NSString *iosearch) { ................................. ................................... \\ More code here } - (NSString *) serialnumber { NSArray *results = getValue(@"serial-number"); if (results) return [results objectAtIndex:0]; return nil; } - (NSString *) backlightlevel { NSArray *results = getValue(@"backlight-level"); if (results) return [results objectAtIndex:0]; return nil; } I have a tableView set up and want to display my array in it so I then have: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {............. ......................................................... cell.text = [results objectAtIndex:indexPath.row]; // error results undeclared here return cell; } The problem is I get results undeclared as indicated above. I also can't figure how I could get serialnumber and backlightlevel to display on the click of a button or even at load. My attempts have thrown back errors like error: 'serialnumber' undeclared (first use in this function) and warnings like warning: 'return' with a value, in function returning void. Sorry for the long question! Many thanks, Stuart

    Read the article

  • Git - switching between branches in the middle of work

    - by Art
    For various reasons (code review mostly) I need to switch from current development branch to other branches quite often. Currently, I use either 'git stash' to shelve the uncommitted changes, checkout other branch, then switch back and do 'git stash apply' However, sometimes I'd have some newly added files there, which are not tracked. Unfortunately, stashing does not affect them. In this case I'd have to add them to the index and stash. What I am looking here for is a workflow where I'd have to perform a minimal set of actions to switch the branches, preferably avoiding adding of files into the index.

    Read the article

  • Window 'onscreen' size puzzle

    - by Bender
    Okay, a REALLY fundamental question about window sizes here... If I create an NSWindow in IB, set its size to 216 x 144 points (exactly 3 inches by 2 inches) then print the window, it measures exactly what I set it to in IB. However, the onscreen display size measures approximately 156 x 105 points. What causes this, and is there any way to force the window to display at the required size onscreen? I ultimately want to draw to this (semi-transparent) window then use it as a full-sized overlay for comparison against a separately loaded scanned image of known size.

    Read the article

  • Database Error Handling: What if You have to Call Outside service and the Transaction Fails?

    - by Ngu Soon Hui
    We all know that we can always wrap our database call in transaction ( with or without a proper ORM), in a form like this: $con = Propel::getConnection(EventPeer::DATABASE_NAME); try { $con->begin(); // do your update, save, delete or whatever here. $con->commit(); } catch (PropelException $e) { $con->rollback(); throw $e; } This way would guarantee that if the transaction fails, the database is restored to the correct status. But the problem is that let's say when I do a transaction, in addition to that transaction, I need to update another database ( an example would be when I update an entry in a column in databaseA, another entry in a column in databaseB must be updated). How to handle this case? Let's say, this is my code, I have three databases that need to be updated ( dbA, dbB, dbc): $con = Propel::getConnection("dbA"); try { $con->begin(); // update to dbA // update to dbB //update to dbc $con->commit(); } catch (PropelException $e) { $con->rollback(); throw $e; } If dbc fails, I can rollback the dbA but I can't rollback dbb. I think this problem should be database independent. And since I am using ORM, this should be ORM independent as well. Update: Some of the database transactions are wrapped in ORM, some are using naked PDO, oledb ( or whatever bare minimum language provided database calls). So my solution has to take care this. Any idea?

    Read the article

  • Conceptually how does load-balancing on the EJB tier work in Glassfish/any ejb container

    - by Benju
    I am wondering conceptually how load-balancing works on the EJB-level (not web session replication) with Java EE containers like Glassfish. From what I have gleaned your remote interface is a proxy that delegates your call to one of many servers you may have in an environment. If things fail are they supposed to be able to "finish" on another server? I want to understand the basic theory behind this load balancing, why is it better than a bunch of servers all running a plain web application with session affinity on a load-balancer?

    Read the article

  • My Zend Framework 'quoting' mess.

    - by tharkun
    I've got a probably very simple issue to which I can't find a satisfactory (subjectively seen) answer in the Zend Framework manual or elsewhere... There are so many ways how I can hand over my php variables to my sql queries that I lost the overview and probably I lack some understanding about quoting in general. Prepared Statements $sql = "SELECT this, that FROM table WHERE id = ? AND restriction = ?"; $stmt = $this->_db->query($sql, array($myId, $myValue)); $result = $stmt->fetchAll(); I understand that with this solution I don't need to quote anything because the db handles this for me. Querying Zend_Db_Table and _Row objects over the API $users = new Users(); a) $users->fetchRow('userID = ' . $userID); b) $users->fetchRow('userID = ' . $users->getAdapter()->quote($userID, 'INTEGER')); c) $users->fetchRow('userID = ?', $userID); d) $users->fetchRow('userID = ?', $users->getAdapter()->quote($userID, 'INTEGER')); Questions I understand that a) is not ok because it's not quoted at all. But what about the other versions, what's the best? Is c) being treated like a statement and automatically quoted or do I need to use d) when I use the ? identifier?

    Read the article

  • How would you compare jQuery objects?

    - by Kyle
    So I'm trying to figure out how to compare two jQuery objects, to see if the parent element is the body of a page. here's what I got: if ( $(this).parent() === $('body') ) ... I know this is wrong, but if anybody understands what I'm getting at, could they point me towards the correct way of doing this?

    Read the article

  • sIFR and multiple requests

    - by mblaze
    Hi! I've been using sIRF for a while but it was the first time I watch the traffic between the client and the server. There is only one file for sIRF, nyala.swf. I am using replacements for some headings, at most 5 or 6 at a time on one page. I can see from firebug the a separate request is going to server for the same swf file. I think I saw a config option to change this behavior but I couldn't find it again. Any ideas?

    Read the article

  • jquery.tablesorter.js > sorting mixed-type columns

    - by JK
    Hi All, I have a table that has a column for Days Remaining. The values in this column are either a number, or 'TBD' (to be determined). The tablesorter plugin doesn't properly handle the sorting of this mixed-type column. How could I get this to work properly? Thanks, ~jk

    Read the article

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