Search Results

Search found 2672 results on 107 pages for 'michael cereda'.

Page 64/107 | < Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >

  • Cross-database transactions from one SP

    - by Michael Bray
    I need to update multiple databases with a few simple SQL statement. The databases are configurared in SQL using 'Linked Servers', and the SQL versions are mixed (SQL 2008, SQL 2005, and SQL 2000). I intend to write a stored procedure in one of the databases, but I would like to do so using a transaction to make sure that each database gets updated consistently. Which of the following is the most accurate: Will a single BEGIN/COMMIT TRANSACTION work to guarantee that all statements across all databases are successful? Will I need multiple BEGIN TRANSACTIONS for each individual set of commands on a database? Are transactions even supported when updating remote databases? I would need to execute a remote SP with embedded transaction support. Note that I don't care about any kind of cross-database referential integrity; I'm just trying to update multiple databases at the same time from a single stored procedure if possible. Any other suggestions are welcome as well. Thanks!

    Read the article

  • Lack of IsNumeric function in C#

    - by Michael Kniskern
    One thing that has bothered me about C# since its release was the lack of a generic IsNumeric function. I know it is difficult to generate a one-stop solution to detrmine if a value is numeric. I have used the following solution in the past, but it is not the best practice because I am generating an exception to determine if the value is IsNumeric: public bool IsNumeric(string input) { try { int.Parse(input); return true; } catch { return false; } } Is this still the best way to approach this problem or is there a more efficient way to determine if a value is numeric in C#?

    Read the article

  • Save PyML.classifiers.multi.OneAgainstRest(SVM()) object?

    - by Michael Aaron Safyan
    I'm using PYML to construct a multiclass linear support vector machine (SVM). After training the SVM, I would like to be able to save the classifier, so that on subsequent runs I can use the classifier right away without retraining. Unfortunately, the .save() function is not implemented for that classifier, and attempting to pickle it (both with standard pickle and cPickle) yield the following error message: pickle.PicklingError: Can't pickle : it's not found as __builtin__.PySwigObject Does anyone know of a way around this or of an alternative library without this problem? Thanks. Edit/Update I am now training and attempting to save the classifier with the following code: mc = multi.OneAgainstRest(SVM()); mc.train(dataset_pyml,saveSpace=False); for i, classifier in enumerate(mc.classifiers): filename=os.path.join(prefix,labels[i]+".svm"); classifier.save(filename); Notice that I am now saving with the PyML save mechanism rather than with pickling, and that I have passed "saveSpace=False" to the training function. However, I am still gettting an error: ValueError: in order to save a dataset you need to train as: s.train(data, saveSpace = False) However, I am passing saveSpace=False... so, how do I save the classifier(s)? P.S. The project I am using this in is pyimgattr, in case you would like a complete testable example... the program is run with "./pyimgattr.py train"... that will get you this error. Also, a note on version information: [michaelsafyan@codemage /Volumes/Storage/classes/cse559/pyimgattr]$ python Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. import PyML print PyML.__version__ 0.7.0

    Read the article

  • NSTableViewCell uses value from other cells

    - by Michael Z
    Hi Guys: I have problem with using dequeueReusableCellWithIdentifier method. Whenever I use this one, one cell would display its own value and value that does not belong to it. This first and second images show the problem, while the third image shows the proper data.The problem seems to be caused by old value not being wiped off and the new value being added on top if it. Which seems very strange.

    Read the article

  • Better Reporting for CruiseControl.NET

    - by Michael Sync
    Hello, Is there any way to generate the good error report from Cruise Control? I like to get the following things in that report. The line number of File that break the build The name of developer who commited that file. (It should not be related to last person who committed because the build might be broken earlier before last person check-in. ) Thanks.

    Read the article

  • How do I test database-related code with NUnit?

    - by Michael Haren
    I want to write unit tests with NUnit that hit the database. I'd like to have the database in a consistent state for each test. I thought transactions would allow me to "undo" each test so I searched around and found several articles from 2004-05 on the topic: http://weblogs.asp.net/rosherove/archive/2004/07/12/180189.aspx http://weblogs.asp.net/rosherove/archive/2004/10/05/238201.aspx http://davidhayden.com/blog/dave/archive/2004/07/12/365.aspx http://haacked.com/archive/2005/12/28/11377.aspx These seem to resolve around implementing a custom attribute for NUnit which builds in the ability to rollback DB operations after each test executes. That's great but... Does this functionality exists somewhere in NUnit natively? Has this technique been improved upon in the last 4 years? Is this still the best way to test database-related code? Edit: it's not that I want to test my DAL specifically, it's more that I want to test pieces of my code that interact with the database. For these tests to be "no-touch" and repeatable, it'd be awesome if I could reset the database after each one. Further, I want to ease this into an existing project that has no testing place at the moment. For that reason, I can't practically script up a database and data from scratch for each test.

    Read the article

  • How to fit a custom graph to the boost graph library template?

    - by Michael
    I'm rusty on C++ templates and I'm using the boost graph library (a fatal combination). I've searched the web and can't find any direct instructions on how to take a custom graph structure and fit enough of it to BGL (boost graph library) that I can use boosts graph traversing algorithms. Anyone familiar enough with the library to help me out?

    Read the article

  • Problem to generate nested ul lists using PHP

    - by Michael Mao
    Hi all: I am working on a front-end web app where a nested unordered list would be used for the jQuery plugin mcdropdown. Here is the data structure from PHP: a nested array of arrays : Array ( [0] => Array ( [fullpath] => ../foil/alphanumeric/ [depth] => 0 ) [1] => Array ( [fullpath] => ../foil/alphanumeric/letters/ [depth] => 1 ) [2] => Array ( [fullpath] => ../foil/alphanumeric/numbers/ [depth] => 1 ) [3] => Array ( [fullpath] => ../foil/alphanumeric/numbers/symbols/ [depth] => 2 ) ) Basically, I took the excellent answer from this question on SO, modified it a bit : global $fullpaths; // $fullpaths contains the above data structure in print_r $result = ''; $currentDepth = -1; while(!empty($fullpaths)) { $currentNode = array_shift($fullpaths); if($currentNode['depth'] > $currentDepth) { $result .='<ul>'; } if($currentNode['depth'] < $currentDepth) { $result .=str_repeat('</ul>', $currentDepth - $currentNode['depth']); } $result .= '<li>'. $currentNode['fullpath'] .'</li>'; $currentDepth = $currentNode['depth']; if(empty($fullpaths)) { $result .= str_repeat('</ul>', 1 + $currentDepth); } } print $result; and got the following output: <ul> <li>../foil/alphanumeric/</li> <ul> <li>../foil/alphanumeric/letters/</li> <li>../foil/alphanumeric/numbers/</li> <ul> <li>../foil/alphanumeric/numbers/symbols/</li> </ul> </ul> </ul> Which cannot be accepted by the mcdropdown jQuery plugin, it expects something like this: <li rel="1"> 'Alphanumeric' <ul> <li rel="2">'Letters'</li> <li rel="3">'Numbers' <ul> <li rel="4">'Symbols'</li> </ul> </li> </ul> </li> To be frank, I don't quite understand how the answer from that question works, I have been trying to modify that solution to cope with my situation, but still failed. Any help and suggestion is much appropriated in advance.

    Read the article

  • Writing a Compiler for .net - IL or Bytecode?

    - by Michael Stum
    I'm currently diving into the inner workings of .net, which means IL. As an exercise, I want to build a brainf..k compiler for .net (yes, they already exist, but as said it's for learning purposes). For the moment I'm just writing some text files that contain .il and compile them with ilasm, which works. But I wonder if I could/should go one level deeper and write bytecode directly? My "concern" is the Windows PE Stuff when compiling an EXE - instead of ilasm I would need some sort of Bytecode linker that would take my MSIL/CIL bytecode and generate the PE Stuff for it? Or do compilers "only" compile their language to IL and execute ilasm? Is there a managed version of it that I can call/embed from my compiler?

    Read the article

  • Animate the enabling of a UIBarButtonItem?

    - by Michael Brewer
    Is there a way to animate enabling or disabling a button? I've tried the following with no success. I'm guessing at this point that the enabled property cannot be animated like opacity can – but I hope I'm wrong. [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1.0f]; theButton.enabled = YES; [UIView setAnimationDelegate:self]; [UIView commitAnimations]; I can't believe there isn't a setEnabled:(BOOL)enabled animated:(BOOL)animated method.

    Read the article

  • HTML wrapper div over embedded flash object cannot be "clickable" by jQuery

    - by Michael Mao
    Hi all: I've been trying to do as the client requested : redirect to campaign page then to destination page once a customer clicks on the top banner in swf format. You can check what's been done at :http://ausdcf.org If you are using Firefox, Chrome or Safari, I suspect you can reach the destination page. However, if you are using IE or Opera, I doubt it. I think to cause of such a weird problem is: The swf ojbects don't have a link to url, SO I have to hack the theme template file like this : <div id="header">'; /* * A quick and dirty way to put some swf into PHP, and rotate among them ... */ //available banners $banners = array( 'http://localhost/smf/flash/banner_fertalign_1.swf', 'http://localhost/smf/flash/banner_fertalign_2.swf', 'http://localhost/smf/flash/banner_fertalign_3.swf' ); //get random banner srand((double) microtime() * 1000000); $rand = rand(0,count($banners)-1); echo '<div id="top_banner_clickable">'; echo '<div id="top_banner_wrapper">'; echo '<object width="400" height="60">'; echo '<param name="wmode" value="transparent">'; echo '<embed wmode="transparent" src="'.$banners[$rand].'" '; echo 'width="400" height="60" type="application/x-shockwave-flash"'; echo 'pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" />'; echo '</object>'; echo '</div>'; echo '</div>'; And the related jQuery code is like this: /* master.js */ $(document).ready(function() { $("#top_banner_clickable").click(function() { window.location ="http://ausdcf.org/campaign/"; }); }); I absolutely know nothing about Flash or embedded objects. I guess that's the cause of this problem. Plus, I don't know why it works with some browsers but not all... I even tried to add a z-index to the wrapper div in css like this: #top_banner_clickable { z-index : 100; } No this wouldn't do, either... Is there a way to go around this issue? Many thanks in advance.

    Read the article

  • C# WPF: Combobox isn't jumping down the list as I type when I use a multiconvert on it.

    - by michael paul
    Basically, I have a combobox that is built by doing multibinding (multiconverter) for the memberdisplaypath. The problem is if the combobox is selected and I start typing, it doesn't jump down the list. Doesn't it go by what's displayed in the combobox for typing? That is, if the combobox is setup like so: //value/display (please disregard how weird the numbering is...) //ref - the value is built upon an observablecollection of a class. ref / "" ref / "10 - Very much agree." ref / "15 - Somewhat agree." ref / "19 - No weight." ref / "23 - Somwhat disagree." ref / "33 - Very much disagree." If the user presses the "1" key it should jump to "10 - Very much agree." But, instead it just sits there...

    Read the article

  • How to skip "Loose Object" popup when running 'git gui'

    - by Michael Donohue
    When I run 'git gui' I get a popup that says This repository currently has approximately 1500 loose objects. It then suggests compressing the database. I've done this before, and it reduces the loose objects to about 250, but that doesn't suppress the popup. Compressing again doesn't change the number of loose objects. Our current workflow requires significant use of 'rebase' as we are transitioning from Perforce, and Perforce is still the canonical SCM. Once Git is the canonical SCM, we will do regular merges, and the loose objects problem should be greatly mitigated. In the mean time, I'd really like to make this 'helpful' popup go away.

    Read the article

  • Algorithm for Source Control System?

    - by Michael Stum
    I need to write a simple source control system and wonder what algorithm I would use for file differences? I don't want to look into existing source code due to license concerns. I need to have it licensed under MPL so I can't look at any of the existing systems like CVS or Mercurial as they are all GPL licensed. Just to give some background, I just need some really simple functions - binary files in a folder. no subfolders and every file behaves like it's own repository. No Metadata except for some permissions. Overall really simple stuff, my single concern really is how to store only the differences of a file from revision to revision without wasting too much space but also without being too inefficient (Maybe store a full version every X changes, a bit like Keyframes in Videos?)

    Read the article

  • I am getting the erorr when I try to debug.

    - by Michael
    I am receiving the error noted below. I have built/rebuilt the files sevaral time. I have alson renamed the file the file in the *.exe The NetworkAssociation.exe file is in the debug folder. Any help would be wonderful Visual Studio cannot start debugging because the debub target 'c:\NetworkAssociation\NetworkAssociation\Bin\Debug\NetworkAssociation.exe' is missing. Please build the project and retry, or set the OutputPath and AssemblyName properties appropriately to point at the correct location.

    Read the article

  • How do I protect the trunk from hapless newbies?

    - by Michael Haren
    A coworker relayed the following problem, let's say it's fictional to protect the guilty: A team of 5-10 works on a project which is issue-driven. That is, the typical flow goes like this: a chunk of work (bug, enhancement, etc.) is created as an issue in the issue tracker The issue is assigned to a developer The developer resolves the issue and commits their code changes to the trunk At release time, the frozen, and heavily tested trunk or release branch or whatever is built in release mode and released The problem he's having is that a couple newbies made several bad commits that weren't caught due to an unfortunate chain of events. This was followed by a bad release with a rollback or flurry of hot fixes. One idea we're toying with: Revoke commit access to the trunk for newbies and make them develop on a per-developer branch (we're using SVN): Good: newbies are isolated and can't hurt others Good: committers merge newbie branches with the trunk frequently Good: this enforces rigid code reviews Bad: this is burdensome on the committers (but there's probably no way around it since the code needs reviewed!) Bad: it might make traceability of trunk changes a little tougher since the reviewer would be doing the commit--not too sure on this. Update: Thank you, everyone, for your valuable input. I have concluded that this is far less a code/coder problem than I first presented. The root of the issue is that the release procedure failed to capture and test some poor quality changes to the trunk. Plugging that hole is most important. Relying on the false assumption that code in the trunk is "good" is not the solution. Once that hole--testing--is plugged, mistakes by everyone--newbie or senior--will be caught properly and dealt with accordingly. Next, a greater emphasis on code reviews and mentorship (probably driven by some systematic changes to encourage it) will go a long way toward improving code quality. With those two fixes in place, I don't think something as rigid or draconian as what I proposed above is necessary. Thanks!

    Read the article

  • jQuery Validation: Validating Checkboxes with Different Names

    - by Michael
    I have a set of 4 checkboxes, all with different names, and require that at least 1 is checked. I know there are a few posts on here already trying to answer this question. The solution that seems to be most logical to me is the answer posted on Question 1734840, but I can't seem to get it working! What's wrong with my code? Or any other new coding ideas to get this working? I have set the class on all of them to 'require-one'. My jQuery code is $(document).ready(function(){ $("#itemForm").validate({ highlight: function(element, errorClass, validClass) { $(element).addClass(errorClass).removeClass(validClass); $(element.form).find("label[for=" + element.name + "]") .addClass("radioerror"); }, unhighlight: function(element, errorClass, validClass) { $(element).removeClass(errorClass).addClass(validClass); $(element.form).find("label[for=" + element.name + "]") .removeClass("radioerror"); }, rules: { 'require-one': { required : { depends: function(element) { var allBoxes = $('.require-one'); if (allBoxes.filter(':checked').length == 0) { if (allBoxes.eq(element).length != 0) { return true; } } return false; } } } , }, errorPlacement: function(error, element) { if ( element.is("#other_descrip") ) error.appendTo("#othererror" ); if ( element.is("#itemlist") ) error.appendTo("#itemerror" ); } }); });

    Read the article

  • Mocking a Wcf ServiceContract

    - by Michael
    I want to mock a ServiceContract. The problem is that Moq (and Castle Dynamic-Proxy) copies the attributes from the interface to the dynamic proxy which Wcf don't like. Wcf sais: The ServiceContractAttribute should only be define on either the interface or the implementation, not both.

    Read the article

  • Efficient Method for Preventing Hotlinking via .htaccess

    - by Michael Robinson
    I need to confirm something before I go accuse someone of ... well I'd rather not say. The problem: We allow users to upload images and embed them within text on our site. In the past we allowed users to hotlink to our images as well, but due to server load we unfortunately had to stop this. Current "solution": The method the programmer used to solve our "too many connections" issue was to rename the file that receives and processes image requests (image_request.php) to image_request2.php, and replace the contents of the original with <?php header("HTTP/1.1 500 Internal Server Error") ; ?> Obviously this has caused all images with their src attribute pointing to the original image_request.php to be broken, and is also the wrong code to be sending in this case. Proposed solution: I feel a more elegant solution would be: In .htaccess If the request is for image_request.php Check referrer If referrer is not our site, send the appropriate header If referrer is our site, proceed to image_request.php and process image request What I would like to know is: Compared to simply returning a 500 for each request to image_request.php: How much more load would be incurred if we were to use my proposed alternative solution outlined above? Is there a better way to do this? Our main concern is that the site stays up. I am not willing to agree that breaking all internally linked images is the best / only way to solve this. I refuse to tell our users that because of something WE changed they must now manually change the embed code in all their previously uploaded content.

    Read the article

  • iPad: CoreData FetchedRequest Ignores Changes in Predicate

    - by Michael
    Hi there, While programming an iPad-app, I'm just running into trouble using a fetchedResultsController with a "dynamic" predicate. it seems the changes to the predicate get ignored. No matter how the predicate changes, I always get the result of the first fetch ... same code runs without no problems on iphone-env (3.1.x) !! sample : - (void)performSearch:(NSString *)searchText { self.displaySearchResults = TRUE; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"searchWords contains[cd] %@", searchText]; [self.fetchedSearchResultsController.fetchRequest setPredicate:predicate]; NSError *error = nil; if (![self.fetchedSearchResultsController performFetch:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } if(deviceIsIPad) { [self showSearchResults]; } else { [cookBookOverview reloadData]; } } can anyone help plz ? btw.: excuse my painful english ;-)

    Read the article

  • Mockito verify no more interactions but omit getters

    - by michael lucas
    Mockito api provides method: Mockito.verifyNoMoreInteractions(someMock); but is it possible in Mockito to declare that I don't want more interactions with a given mock with the exceptions of interactions with its getter methods? The simple scenario is the one in which I test that sut changes only certain properties of a given mock and lefts other properties untapped. In example I want to test that UserActivationService changes property Active on an instance of class User but does't do anything to properties like Role, Password, AccountBalance, etc. I'm open to criticism regarding my approach to the problem.

    Read the article

< Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >