Daily Archives

Articles indexed Saturday May 22 2010

Page 12/81 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Setting the ASP.NET version via MSBUILD

    - by dovholuk
    I am trying to create a new website on a remote server via msbuild (I like to call it "msdeploy"). I've downloaded and used the SDC tasks, the MSBuildExtension tasks and the MSBuildCommunity tasks but I simply can't get it right. I figure that WebDirectorySetting (from MSBuild.Community.Tasks.IIS) is my best bet but I can't find the right SettingName to pass. I'd like to use some sort of MSBuild task to accomplish this but maybe it just doesn't exist. Custom VBS or WMI are my last resort... Thanks

    Read the article

  • What is the best way to manage Time in a Java application?

    - by DanielHonig
    So I'm using hibernate and working with an application that manages time. What is the best way to deal with times in a 24 hour clock? I do not need to worry about TimeZone issues at the beginning of this application but it would be best to ensure that this functionality is built in at the beginning. I'm using hibernate as well, just as an fyi

    Read the article

  • Dynamic Variables Within Functions

    - by Ryan
    Why does this work: function myfunction($v) { $query = $v['host'] == '1'; return ( $query ); } $output = array_filter($recordset,myfunction); print_r($output); Whereas this script, which tries to accomplish the same thing with variables, does not? $column1 = 'host'; $value1 = 1; $query1 = '$v[\''.$column1.'\'] == '.$value1; function myfunction($v) { $query = $GLOBALS['query1']; return ( $query ); } $output = array_filter($recordset,myfunction); print_r($output); Any help would be great. Thanks!

    Read the article

  • iPad app crashes when Youtube player clicked in UIWebView

    - by choonkeat
    I have a iPhone/iPad app (universal binary) with a regular UIWebView that displays webpages on the Internet. When the user presses on a Youtube embed, the iPhone app performs normally -- opening up the video player, when you close it, it returns to the app. However, on the iPad it crashes with Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[UIWindow addEventMonitor:]: unrecognized selector sent to instance 0x1219c0' #0 0x30c8e0a0 in __kill () #1 0x30c8e096 in kill () #2 0x30c8e088 in raise () #3 0x30ca2210 in abort () #4 0x32944a22 in __gnu_cxx::__verbose_terminate_handler () #5 0x335657ca in _objc_terminate () #6 0x32942df4 in __cxxabiv1::__terminate () #7 0x32942e48 in std::terminate () #8 0x32942f18 in __cxa_throw () #9 0x335646aa in objc_exception_throw () #10 0x32c9517a in -[NSObject doesNotRecognizeSelector:] () #11 0x32c94b00 in ___forwarding___ () #12 0x32c316d0 in __forwarding_prep_0___ () #13 0x32810492 in -[MPInactivityMonitor initForWindow:inactivityDuration:delegate:] () #14 0x32831dfe in -[MPFullScreenVideoViewController _createInactivityMonitor] () #15 0x328324bc in -[MPFullScreenVideoViewController showOverlayAnimated:] () #16 0x32833612 in -[MPAbstractFullScreenVideoViewController setControlsOverlayVisible:animate:] () #17 0x3281fca4 in -[UIMoviePlayerController setControlsOverlayVisible:disableAutohide:animate:] () #18 0x330bb444 in -[YTMovieView _switchToVideo:] () #19 0x330bb028 in -[YTMovieView willShowForVideo:inList:orVideoID:] () #20 0x04b8d142 in dyld_stub_time () #21 0x04b8b82e in dyld_stub_time () #22 0x32c2616c in -[NSObject performSelector:withObject:withObject:] () #23 0x3152716c in -[UIApplication sendAction:to:from:forEvent:] () #24 0x3152710c in -[UIApplication sendAction:toTarget:fromSender:forEvent:] () #25 0x315270de in -[UIControl sendAction:to:forEvent:] () #26 0x31526e30 in -[UIControl(Internal) _sendActionsForEvents:withEvent:] () #27 0x3152747e in -[UIControl touchesEnded:withEvent:] () #28 0x31525e54 in -[UIWindow _sendTouchesForEvent:] () #29 0x3152579c in -[UIWindow sendEvent:] () #30 0x315213be in -[UIApplication sendEvent:] () #31 0x31520d2a in _UIApplicationHandleEvent () #32 0x30d62b32 in PurpleEventCallback () #33 0x32c23d9c in CFRunLoopRunSpecific () #34 0x32c234e0 in CFRunLoopRunInMode () #35 0x30d620da in GSEventRunModal () #36 0x30d62186 in GSEventRun () #37 0x314d54c8 in -[UIApplication _run] () #38 0x314d39f2 in UIApplicationMain () (I don't even see my app in the stack trace (except for the top level main.m) In iPad Mobile Safari, on the same webpage, the video will play in-place on the webpage. Is there anything I have to do to enable that? Or did I forget to enable something?

    Read the article

  • NonStop ODBC: how the connections (ODBC servers) are assigned to CPUs?

    - by Vladimir Dyuzhev
    We have an ODBC pool running on a NonStop server. The pool is connected to SQL/MX. This pool is used by a few external Java applications, each of which has an JDBC pool connected to ODBC pool (e.g. 14 connections per application). With time (after a few application recycles) we see an imbalance between CPUs -- some have 8 ODBC processes running, some only 5. That leads to CPU time imbalance too. Up to this point we assumed that a CPU is assigned to ODBC process in round-robin fashion. That would maintain the number of ODBC processes more or less equally distributed. It's not the case though. Is there any information on how ODBC pool decided which CPU to choose for every new allocated process? Does it look at CPU load? Available memory? Something else? Sadly, even HP's own people (available to us, that is) couldn't answer those questions with certainty. :-(

    Read the article

  • View Security Server and Direct Connection

    - by Poort443
    I have a Security Server for my connections from the Internet. This works fine, accept when I enable "Direct Connection to the desktop". I found the following statement on this: If you bypass the secure connection, the client must establish a direct RDP communication to the desktop virtual machine over RDP (port 3389). Does this mean I have to open 3389 (RDP) to the Internet if I want to use Direct Connections? If I disable Direct Connections to get my Security Server working, I have to disable it on my Connection Server. It's my understanding that this means that if I reboot my Connection Server, all the View clients get disconnected. Is there a way I can disable "Direct Connections" for the Security Server, while enabling it for access from the LAN? Tia.

    Read the article

  • P/Invoke a Function Passed a StringBuilder

    - by andrew
    in a C# file i have a class Archiver { [DllImport("Archiver.dll")] public static extern void archive(string data, StringBuilder response); } string data is an input, and StringBuilder response is where the function writes something the archive function prototype (written in C) looks like this: void archive(char * dataChr, char * outChr); and it receives a string in dataChr, and then does a strcpy(outChr,"some big text"); from C# i call it something like this: string message = "some text here"; StringBuilder response = new StringBuilder(10000); Archiver.archive(message,response); this works, but the problem, as you might see is that i give a value to the StringBuilder size, but the archive function might give back a (way) larger text than the size i've given to my StringBuilder. any way to fix this?

    Read the article

  • .Net ListView and System's Icon Size

    - by WhoaNow
    I have a ListView using the LargeIcon View mode with some 64x64 thumbnails. The problem is that the padding between ListViewItems is somehow based on the system's Icon size value (Display Properties Appearance Advanced Icon). The default for XP seems to be 32 and the ListView and its thumbnails look fine, but with higher Icon sizes, the items are spaced out horrendously. Is there any way to override this behavior and force it to use the same spacing?

    Read the article

  • How to handle iPad Modal View rotation

    - by Farha Ansari
    Hi, I have 2 views, each for portrait and landscape. I start by displaying the portrait view. On both the views, I have a button, which presents a modal view on clicking it. When the modal view comes up and then I rotate the iPad, the portrait view is replaced by the landscape view, but the modal view goes behind this view. Any idea how to bring the modal view again to the front after the rotation? Thanks for the help Farha

    Read the article

  • PERL newbie : get a proper minimal debug_mode solution

    - by Michael Mao
    Hi all: I am learning PERL in a "head-first" manner. I am absolutely a newbie in this language: I am trying to have a debug_mode switch from CLI which can be used to control how my script works, by switching certain subroutines "on and off". And below is what I've got so far: #!/usr/bin/perl -s -w # purpose : make subroutine execution optional, # which is depending on a CLI switch flag use strict; use warnings; use constant DEBUG_VERBOSE => "v"; use constant DEBUG_SUPPRESS_ERROR_MSGS => "s"; use constant DEBUG_IGNORE_VALIDATION => "i"; use constant DEBUG_SETPPING_COMPUTATION => "c"; our ($debug_mode); mainMethod(); sub mainMethod # () { if(!$debug_mode) { print "debug_mode is OFF\n"; } elsif($debug_mode) { print "debug_mode is ON\n"; } else { print "OMG!\n"; exit -1; } checkArgv(); printErrorMsg("Error_Code_123", "Parsing Error at..."); verbose(); } sub checkArgv #() { print ("Number of ARGV : ".(1 + $#ARGV)."\n"); } sub printErrorMsg # ($error_code, $error_msg, ..) { if(defined($debug_mode) && !($debug_mode =~ DEBUG_SUPPRESS_ERROR_MSGS)) { print "You can only see me if -debug_mode is NOT set". " to DEBUG_SUPPRESS_ERROR_MSGS\n"; die("terminated prematurely...\n") and exit -1; } } sub verbose # () { if(defined($debug_mode) && ($debug_mode =~ DEBUG_VERBOSE)) { print "Blah blah blah...\n"; } } So far as I can tell, at least it works...: the -debug_mode switch doesn't interfere with normal ARGV the following commandlines work: ./optional.pl ./optional.pl -debug_mode ./optional.pl -debug_mode=v ./optional.pl -debug_mode=s However, I am puzzled when multiple debug_modes are "mixed", such as: ./optional.pl -debug_mode=sv ./optional.pl -debug_mode=vs I don't understand why the above lines of code "magically works". I see both of the "DEBUG_VERBOS" and "DEBUG_SUPPRESS_ERROR_MSGS" apply to the script, which is fine in this case. However, if there are some "conflicting" debug modes, I am not sure how to set the "precedence of debue_modes"? Also, I am not certain if my approach is good enough to Perlists and I hope I am getting my feet in the right direction. One biggest problem is that I now put if statements inside most of my subroutines for controlling their behavior under different modes. Is this okay? Is there a more elegant way? I know there must be a debug module from CPAN or elsewhere, but I wanna a real minimal solution that doesn't depend on any other module than the "default" And I cannot have any control on the environment where this script will be executed... Many thanks to the suggestions in advance.

    Read the article

  • datagrid height issue in nested datagrid( when using three data grid)

    - by prince23
    hi, i have a nested datagrid(which is of three data grid). here i am able to show data with no issue. the first datagrid has 5 rows the main problem that comes here is when you click any row in first datagrid i show 2 datagrid( which has 10 rows) lets say i click 3 row in 2 data grid. it show further records in third datagrid. again when i click 5 row in 2 data grid it show further records in third datagrid. now all the recods are shown fine when u try to collpase the 3 row in 2 data grid it collpase but the issue is the height what the third datagrid which took space for showing the records( we can see a blank space showing between the main 2 datagrid and third data grid) in every grid first column i have an button where i am writing this code for expand and collpase this is the functionality i am implementing in all the datagrid button where i do expand collpase. hope my question is clear . any help would great private void btn1_Click(object sender, RoutedEventArgs e) { try { Button btnExpandCollapse = sender as Button; Image imgScore = (Image)btnExpandCollapse.FindName("img"); DependencyObject dep = (DependencyObject)e.OriginalSource; while ((dep != null) && !(dep is DataGridRow)) { dep = VisualTreeHelper.GetParent(dep); } // if we found the clicked row if (dep != null && dep is DataGridRow) { DataGridRow row = (DataGridRow)dep; // change the details visibility if (row.DetailsVisibility == Visibility.Collapsed) { imgScore.Source = new BitmapImage(new Uri("/Images/a1.JPG", UriKind.Relative)); row.DetailsVisibility = Visibility.Visible; } else { imgScore.Source = new BitmapImage(new Uri("/Images/a2JPG", UriKind.Relative)); row.DetailsVisibility = Visibility.Collapsed; } } } catch (System.Exception) { } } --------------------------------------- 2 datagrid private void btn2_Click(object sender, RoutedEventArgs e) { try { Button btnExpandCollapse = sender as Button; Image imgScore = (Image)btnExpandCollapse.FindName("img"); DependencyObject dep = (DependencyObject)e.OriginalSource; while ((dep != null) && !(dep is DataGridRow)) { dep = VisualTreeHelper.GetParent(dep); } // if we found the clicked row if (dep != null && dep is DataGridRow) { DataGridRow row = (DataGridRow)dep; // change the details visibility if (row.DetailsVisibility == Visibility.Collapsed) { imgScore.Source = new BitmapImage(new Uri("/Images/a1.JPG", UriKind.Relative)); row.DetailsVisibility = Visibility.Visible; } else { imgScore.Source = new BitmapImage(new Uri("/Images/a2JPG", UriKind.Relative)); row.DetailsVisibility = Visibility.Collapsed; } } } catch (System.Exception) { } } ----------------- 3 datagrid private void btn1_Click(object sender, RoutedEventArgs e) { try { Button btnExpandCollapse = sender as Button; Image imgScore = (Image)btnExpandCollapse.FindName("img"); DependencyObject dep = (DependencyObject)e.OriginalSource; while ((dep != null) && !(dep is DataGridRow)) { dep = VisualTreeHelper.GetParent(dep); } // if we found the clicked row if (dep != null && dep is DataGridRow) { DataGridRow row = (DataGridRow)dep; // change the details visibility if (row.DetailsVisibility == Visibility.Collapsed) { imgScore.Source = new BitmapImage(new Uri("/Images/a1.JPG", UriKind.Relative)); row.DetailsVisibility = Visibility.Visible; } else { imgScore.Source = new BitmapImage(new Uri("/Images/a2JPG", UriKind.Relative)); row.DetailsVisibility = Visibility.Collapsed; } } } catch (System.Exception) { } }**

    Read the article

  • preg_match , regexp , php , extract text from html

    - by Michael
    I'm trying to extract "Florida (FL)" from http://www.auctionarms.com/search/displayitem.cfm?itemnum=9736364&oh=216543. My code is //get location $pattern = "/(State)<\/i\:<\/td(.*)<\/td/"; preg_match_all($pattern, $htmlContent, $matches); print_r($matches); any idea why is not working ?

    Read the article

  • Zend Framework: Zend_translate and routing related issue

    - by Dan
    I have implemented Zend_Navigation, Zend_Translate in my application. The routing is setup in Bootstrap.php like below. $fc = Zend_Controller_Front::getInstance(); $zl=new Zend_Locale(); Zend_Registry::set('Zend_Locale',$zl); $lang=$zl->getLanguage().'_'.$zl->getRegion(); $router = $fc->getRouter(); $route = new Zend_Controller_Router_Route(':lang/:module/:controller/:action/*', array( 'lang'=>$lang, 'module'=>'default', 'controller'=>'index', 'action'=>'index' )); $router->addRoute('default', $route); $fc->setRouter($router); $fc->registerPlugin( new Plugin_LanguageSetup()); in LaunguageSetup Plugin i have defined the dispatchLoopStartup method to do the checking of the language param public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request) { $this->createLangUrl($request); $this->_language = $request->getParam('lang'); if ((!isset($this->_language)) || !in_array($this->_language, $this->_languagesArray)) { $this->_language = 'en_US'; $request->setParam('lang', 'en_US'); } $file = APPLICATION_PATH.$this->_directory.$this->_language.'.csv'; $translate = new Zend_Translate('csv', $file, $this->_language); Zend_Registry::set('Zend_Translate', $translate); $zl = Zend_Registry::get('Zend_Locale'); $zl->setLocale($this->_language); Zend_Registry::set('Zend_Locale', $zl); // $fc = Zend_Controller_Front::getInstance(); // $router = $fc->getRouter(); // $route = new Zend_Controller_Router_Route(':lang/:module/:controller/:action/*', array( // 'lang'=>$this->_language, 'module'=>'default', 'controller'=>'index', 'action'=>'index' // )); // $router->addRoute('default', $route); // $fc->setRouter($router); } What happen is the language always have the default value, the 'lang' param never default lang value in route, even if i type it in the address bar manually i.e /en_US/module/controller/action/ It always get revert back to the default Zend_locale(); Only way i can fix it is to setup the route again in the plugin and inject a correct language value as default. Any Idea why?

    Read the article

  • What can I do about ambigous wildcard patterns in Struts?

    - by Hanno Fietz
    I have a problem finding the right wildcard pattern to extract parts of my URL into action parameters in Struts. This is how I set up the action. The intent of the pattern is to capture the last two path elements and then everything that might precede them. <action name="**/*/*" class="com.example.ObjectAction"> <param name="filter">{1}</param> <param name="type">{2}</param> <param name="id">{3}</param> </action> Calling it with the URL channels/123/transmissions/456 I get the following result (the action just sets the input parameters on a POJO and returns that as XML): <result> <filter>channels/123/transmissions</filter> <id/> <type>456</type> </result> It should be: <result> <filter>channels/123</filter> <id>456</id> <type>transmissions</type> </result> Now, because ** matches all characters including the slash, I guess my pattern allows more than one way to match the URL, and Struts happens to pick one that leaves the id empty. Is the behaviour for multiple possible matches defined somewhere? Can I make the pattern less ambigous? Are there alternative ways of doing this? I'm running Struts 2.0.8. Upgrading to 2.1.9 would give me regex matching, but I got into trouble with Struts' dependencies and my OSGi environment when I went past 2.0.8, so I'd like to stick to that version for now.

    Read the article

  • jquery-Ajax call on tornado handlers waits for pervious ajax call to return

    - by harshh
    Hey All. I recently started testing TornadoWeb for a home-project, which uses jquery getJSON function to call my tornado handlers. And found something strange, which i seek an explanation for. I fire an ajax request for Handler1 on tornado, and in some cases request for Handler2 is initiated before Handler1 returns. It appears from development-server logs, and firebug console-debugging, that Handler2 request waits for Handler1 request to finish, and then return. So basically, XHR call is waiting for earlier XHRs. They are supposed to be asynchronous/non-blocking right?? Or am i missing something. You can check the test-case environment called testtornado at http://github.com/harshh/Harsh-Projects/ with main.py as server triggering file. I would appreciate help from anyone who can throw some light on this.

    Read the article

  • Test iPhone In App Purchase without uploading binary (i.e. without bundle ID)

    - by psychotik
    I've created a new app but not uploaded a binary (not ready for review yet). However, I want to test in-app purchases. The documentation seems to state that a bundle ID is required to create an in-app purchase product. Is there any way to specify this bundle ID for creating the in-app purchase product on iTunes Connect without uploading the app binary in a way that won't cause problems when the actual binary is uploaded? What if the eventually uploaded binary has a different bundleID than the use created for testing - does it effectively invalidate the in-app purchase product?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >