Search Results

Search found 3168 results on 127 pages for 'grand central dispatch'.

Page 94/127 | < Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >

  • trackPageView on Google Analytics for iPhone Not Working

    - by DigitalZombieKid
    I'm trying to get Google Analytics working on an iPhone application without much luck. I've followed all the instructions on their website (google/apis/analytics/docs/tracking/mobileAppsTracking.html) and studied their sample application (google/gaformobileapps/GoogleAnalyticsIphone_0.7.tar.gz). When I run my application and go to Google Analytics' website (https://www.google.com/analytics/reporting/), the only page that is recording is /app_entry_point. I'm seeing one count in my Google Analytics detailed report once every time my app fires up. However, I have added other pages to be tracked but it's not working. Here is a sample of two pages I've added to be tracked: trackPageview:@"/calculator"; trackPageview:@"/tellafriend"; I call them from various ViewControllers in the app. In each of those view controllers I import the the GANTracker header: #import "GANTracker.h" I'll admit it: I'm an objective-c newbie. Any help you can offer is greatly appreciated! Do I need to physically dispatch them to get the trackPageview working? If so, why is the /app_entry_point page the only page that is recorded by Google Analytics?

    Read the article

  • PHP unit tests for controller returns no errors and no success message.

    - by Mallika Iyer
    I'm using the zend modular director structure, i.e. application modules users controllers . . lessons reports blog I have a unit test for a controller in 'blog' that goes something like the below section of code: I'm definitely doing something very wrong, or missing something - as when i run the test, i get no error, no success message (that goes usually like ...OK (2 tests, 2 assertions)). I get all the text from layout.phtml, where i have the global site layout. This is my first endeavor writing a unittest for zend-M-V-C structure so probably I'm missing something important? Here goes.... require_once '../../../../public/index.php'; require_once '../../../../application/Bootstrap.php'; require_once '../../../../application/modules/blog/controllers/BrowseController.php'; require_once '../../../TestConfiguration.php'; class Blog_BrowseControllerTest extends Zend_Test_PHPUnit_ControllerTestCase { public function setUp() { $this->bootstrap = array($this, 'appBootstrap'); Blog_BrowseController::setUp(); } public function appBootstrap() { require_once dirname(__FILE__) . '/../../bootstrap.php'; } public function testAction() { $this->dispatch('/'); $this->assertController('browse'); $this->assertAction('index'); } public function tearDown() { $this->resetRequest(); $this->resetResponse(); Blog_BrowseController::tearDown(); } }

    Read the article

  • Java: define terms initialization, declaration and assignment

    - by HH
    I find the defs circular statements, the subjects are defined by their verbs but the verbs are undefined! So how do you define them? The question is central to understand the term final, related. The Circular Definitions itialization: to initilise a variable. It can be can be done at the time of declaration. assignment: to assign value to a variable. It can be done anywhere. declaration: to declare value to a variable.

    Read the article

  • Magento failure.phtml, get the order total

    - by Kieran
    Hello. One of the projects I work on has the failure page and success page in magento as exactly the same and requires some tracking code on both. The tracking code requires the order ID and the amount being ordered. The issue I'm having is trying to get the order total on the failure page. The methods built into the block class Mage_Checkout_Block_Onepage_Failure are getRealOrderId(), getErrorMessage() and getContinueShoppingUrl(), so no help there. I found some code to do what I want on the success page but it doesn't work for the failure page. <?php $orderId = $this->getRealOrderId(); $order = Mage::getSingleton('sales/order'); $order->load($orderId); $_totalData = $order->getData(); $_grand = $_totalData['grand_total']; ?> I dumped $order and $_totalData. $_totalData just an empty array and $order an empty Mage_Sales_Model_Order instance. Does anyone have any suggestions for where to get the grand total of what is being purchased? Regards, Kieran (I'm also having issues testing the success page as I can't get to it, even putting in the correct test card details on the dev server - but I'll find a way around this)

    Read the article

  • sqlite with Perl for Windows; suitable for relocation

    - by Paul Nathan
    I need to set up sqllite for Perl on a Windows box. However - Perl is probably being run over the network from a central server, and I do not know what modules will be available on initial running of my script. I can guarantee Perl 5.8+ (activestate) or Perl 5.10+ (strawberry). Therefore, I need to package sqlite & the associated Perl module(s) in the project directory itself. Having Goggled around, I don't see any immediate zipfile to do this.

    Read the article

  • java RMI connection to server

    - by user85116
    I have a very simple rmi client / server application. I don't use the "rmiregistry" application though, I use this to create the server: server = new RemoteServer(); registry = LocateRegistry.createRegistry(PORT); registry.bind("RemoteServer", server); The client part is: registry = LocateRegistry.getRegistry(IPADDRESS, PORT); remote = (IRemoteServer) registry.lookup("RemoteServer"); Here is the fascinating problem: The application works perfectly when both server and client are running in my (private) local network. As soon as I put the server on a public server, the application hangs for a minute, then gives me the following error: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.ConnectException: Connection refused to host: 192.168.x.y; nested exception is: java.net.ConnectException: Connection timed out: connect at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) at sun.rmi.transport.Transport$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Unknown Source) at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source ... (the rest is truncated) The key I think is that the client (running on my private network) cannot connect to myself (my address is 192.168.x.y where x.y is some other numbers, but the real error message shows my ip address listed there) If I kill the rmi server on the public internet, then I instantly get a "connection refused to host: a.b.c.d") message, so I know that something at the server end is at least working. Any suggestions? EDIT: just to make this a little more clear: 192.168.x.y is the client address, a.b.c.d is the server address. The stacktrace shows the client cannot connect to the client.

    Read the article

  • Why do i get exc bad access in cases when object is not nil?

    - by DixieFlatline
    I have an app that receives remote notifications. My view controller that is shown after push has a tableview. App crashes very randomly (1 in 20 tries) at line setting frame: if (!myTableView) { NSLog(@"self.myTableView is nil"); } myTableView.frame=CGRectMake(0, 70, 320, 376); This only happens when i open the app, then open some other apps and then receive the push notification. I guess it has something to do with memory. I use ARC (ios 5). The strange thing is that nslog is not displayed, so tableview is not nil. Crash log: Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x522d580c Crashed Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libobjc.A.dylib 0x352b1f7e objc_msgSend + 22 1 Foundation 0x37dc174c NSKVOPendingNotificationCreate + 216 2 Foundation 0x37dc1652 NSKeyValuePushPendingNotificationPerThread + 62 3 Foundation 0x37db3744 NSKeyValueWillChange + 408 4 Foundation 0x37d8a848 -[NSObject(NSKeyValueObserverNotification) willChangeValueForKey:] + 176 5 Foundation 0x37e0ca14 _NSSetPointValueAndNotify + 76 6 UIKit 0x312af25a -[UIScrollView(Static) _adjustContentOffsetIfNecessary] + 1890 7 UIKit 0x312cca54 -[UIScrollView setFrame:] + 548 8 UIKit 0x312cc802 -[UITableView setFrame:] + 182 9 POViO 0x000913cc -[FeedVC viewWillAppear:] (FeedVC.m:303) Dealloc is not called because it is not logged: - (void)dealloc { NSLog(@"dealloc"); }

    Read the article

  • Silverlight RIA Services - how to do Windows Authentication?

    - by Gustavo Cavalcanti
    I am building my first Silverlight 3 + RI Services application and need some help. It will be deployed in an controlled corporate intranet, 100% windows clients. I have started from the Silverlight Business Application template. These are my requirements: Upon launch the application needs to recognize the currently logged-in user. The application needs to have access to other properties of the user in AD, such as email, full name, and group membership. Group membership is used to grand certain features in the application. A "login as a different user" link is to be always available - Some machines are available throughout the enterprise, logged-in as a certain generic user (verified by the absence of certain membership groups). In this case one can enter credentials and log in (impersonate) to the application as a user different from the one already logged-into the machine. This user is to be used in service calls I have modified the following in the default Business Application template: App.xaml: appsvc:WindowsAuthentication instead of the default FormsAuthentication Web.config: authentication mode="Windows" With these modifications I resolve requirement #1 (get the currently logged-in user). But when I examine RiaContext.Current.User, I don't have access to other properties from AD, such as group memberships. How can I achieve my other requirements? Thanks for your help.

    Read the article

  • Crash on iOS when system purges memory and closes a UIViewController

    - by Amiramix
    My application is crashing when one of the views is purged from memory because of low-memory condition. At least this is what I understand from the crashlog. It happens on numerous screens but only when opening a Facebook dialog (using the Facebook SDK). Basically, looks like the system sometimes runs out of memory when we need to present a Facebook dialog (e.g. to let user post something on the Facebook timeline). Date/Time: 2012-03-14 19:47:33.819 +0000 OS Version: iPhone OS 5.1 (9B176) Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x30000008 Crashed Thread: 0 Thread 0 name: Dispatch queue: com.apple.main-thread Thread 0 Crashed: 0 libobjc.A.dylib 0x30f2bf78 objc_msgSend + 16 1 MyApp 0x00003c0e -LTBaseViewController viewDidUnload (LTBaseViewController.m:145) 2 MyApp 0x00004ea2 -LTBaseTableViewController viewDidUnload (LTBaseTableViewController.m:90) 3 UIKit 0x33766bd8 -[UIViewController unloadViewForced:] + 244 4 UIKit 0x338ae492 -[UIViewController purgeMemoryForReason:] + 58 5 Foundation 0x3071a4f8 __57-NSNotificationCenter addObserver:selector:name:object:_block_invoke_0 + 12 6 CoreFoundation 0x30e95540 ___CFXNotificationPost_block_invoke_0 + 64 7 CoreFoundation 0x30e21090 _CFXNotificationPost + 1400 8 Foundation 0x3068e3e4 -NSNotificationCenter postNotificationName:object:userInfo: + 60 9 Foundation 0x3068fc14 -NSNotificationCenter postNotificationName:object: + 24 10 UIKit 0x3387926a -UIApplication _performMemoryWarning + 74 11 UIKit 0x33879364 -UIApplication _receivedMemoryNotification + 168 12 libdispatch.dylib 0x36a12252 _dispatch_source_invoke + 510 13 libdispatch.dylib 0x36a0fb1e _dispatch_queue_invoke$VARIANT$up + 42 14 libdispatch.dylib 0x36a0fe64 _dispatch_main_queue_callback_4CF$VARIANT$up + 152 15 CoreFoundation 0x30e9c2a6 __CFRunLoopRun + 1262 16 CoreFoundation 0x30e1f49e CFRunLoopRunSpecific + 294 17 CoreFoundation 0x30e1f366 CFRunLoopRunInMode + 98 18 GraphicsServices 0x33fb6432 GSEventRunModal + 130 19 UIKit 0x336f5e76 UIApplicationMain + 1074 20 MyApp 0x00004818 main (main.m:16) 21 MyApp 0x000023b4 0x1000 + 5044 I checked and there are almost no memory leaks, e.g. when testing the app for an hour the total memory leaked was around 2-3Kb caused by some string-copying libraries. So I don't believe this is caused by the application. I guess that when the phone is not restarted for some time there are applications running in the background and when using Facebook SDK the memory becomes a problem and the system tries to recover the memory from random applications, including my application. My question is, how can I prevent this crash from happening? How should I handle unloadViewForced on a view controller to make the app more robust in low-memory conditions? And lastly, am I right that this crashlog suggests the crash occurred because the system tried to free memory and my application didn't handle it properly? Any help greatly appreciated.

    Read the article

  • How to make a custom NSFormatter work correctly on Snow Leopard?

    - by Nathan
    I have a custom NSFormatter attached to several NSTextFields who's only purpose is to uppercase the characters as they are typed into field. The entire code for my formatter is included below. The stringForObjectValue() and getObjectValue() implementations are no-ops and taken pretty much directly out of Apple's documentation. I'm using the isPartialStringValid() method to return an uppercase version of the string. This code works correctly in 10.4 and 10.5. When I run it on 10.6, I get "strange" behaviour where text fields aren't always render the characters that are typed and sometimes are just displaying garbage. I've tried enabling NSZombie detection and running under Instruments but nothing was reported. I see errors like the following in "Console": HIToolbox: ignoring exception '*** -[NSCFString replaceCharactersInRange:withString:]: Range or index out of bounds' that raised inside Carbon event dispatch ( 0 CoreFoundation 0x917ca58a __raiseError + 410 1 libobjc.A.dylib 0x94581f49 objc_exception_throw + 56 2 CoreFoundation 0x917ca2b8 +[NSException raise:format:arguments:] + 136 3 CoreFoundation 0x917ca22a +[NSException raise:format:] + 58 4 Foundation 0x9140f528 mutateError + 218 5 AppKit 0x9563803a -[NSCell textView:shouldChangeTextInRange:replacementString:] + 852 6 AppKit 0x95636cf1 -[NSTextView(NSSharing) shouldChangeTextInRanges:replacementStrings:] + 1276 7 AppKit 0x95635704 -[NSTextView insertText:replacementRange:] + 667 8 AppKit 0x956333bb -[NSTextInputContext handleTSMEvent:] + 2657 9 AppKit 0x95632949 _NSTSMEventHandler + 209 10 HIToolbox 0x93379129 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567 11 HIToolbox 0x933783f0 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411 12 HIToolbox 0x9339aa81 SendEventToEventTarget + 52 13 HIToolbox 0x933fc952 SendTSMEvent + 82 14 HIToolbox 0x933fc2cf SendUnicodeTextAEToUnicodeDoc + 700 15 HIToolbox 0x933fbed9 TSMKeyEvent + 998 16 HIToolbox 0x933ecede TSMProcessRawKeyEvent + 2515 17 AppKit 0x95632228 -[NSTextInputContext handleEvent:] + 1453 18 AppKit 0x9562e088 -[NSView interpretKeyEvents:] + 209 19 AppKit 0x95631b45 -[NSTextView keyDown:] + 751 20 AppKit 0x95563194 -[NSWindow sendEvent:] + 5757 21 AppKit 0x9547bceb -[NSApplication sendEvent:] + 6431 22 AppKit 0x9540f6fb -[NSApplication run] + 917 23 AppKit 0x95407735 NSApplicationMain + 574 24 macsetup 0x00001f9f main + 24 25 macsetup 0x00001b75 start + 53 ) Can anybody shed some light on what is happening? Am I just using NSFormatter incorrectly? -(NSString*) stringForObjectValue:(id)object { if( ![object isKindOfClass: [ NSString class ] ] ) { return nil; } return [ NSString stringWithString: object ]; } -(BOOL)getObjectValue: (id*)object forString: string errorDescription:(NSString**)error { if( object ) { *object = [ NSString stringWithString: string ]; return YES; } return NO; } -(BOOL) isPartialStringValid: (NSString*) cStr newEditingString: (NSString**) nStr errorDescription: (NSString**) error { *nStr = [NSString stringWithString: [cStr uppercaseString]]; return NO; }

    Read the article

  • Run java thread at specific times

    - by rmarimon
    I have a web application that synchronizes with a central database four times per hour. The process usually takes 2 minutes. I would like to run this process as a thread at X:55, X:10, X:25, and X:40 so that the users knows that at X:00, X:15, X:30, and X:45 they have a clean copy of the database. It is just about managing expectations. I have gone through the executor in java.util.concurrent but the scheduling is done with the scheduleAtFixedRate which I believe provides no guarantee about when this is actually run in terms of the hours. I could use a first delay to launch the Runnable so that the first one is close to the launch time and schedule for every 15 minutes but it seems that this would probably diverge in time. Is there an easier way to schedule the thread to run 5 minutes before every quarter hour?

    Read the article

  • Getting a "No default module defined for this application" exception while running controller unit t

    - by Doron
    I have an application with the default directory structure, for an application without custom modules (see structure figure at the end). I have written a ControllerTestCase.php file as instructed in many tutorials, and I've created the appropriate bootstrap file as well (once again, see figures at the end). I've written some model tests which run just fine, but when I started writing the index controller test file, with only one test in it, with only one line in it ("$this-dispatch('/');"), I'm getting the following exception when running phpunit (but navigating with the browser to the same location - all is good and working): 1) IndexControllerTest::test_indexAction_noParams Zend_Controller_Exception: No default module defined for this application Why is this ? What have I done wrong ? Appendixes: Directory structure: -proj/ -application/ -controllers/ -IndexController.php -ErrorController.php -config/ -layouts/ -models/ -views/ -helpers/ -scripts/ -error/ -error.phtml -index/ -index.phtml -Bootstrap.php -library/ -tests/ -application/ -controllers/ -IndexControllerTest.php -models/ -bootstrap.php -ControllerTestCase.php -library/ -phpunit.xml -public/ -index.php (Basically I have some more files in the models directory, but that's not relevant to this question.) application.ini file: [production] phpSettings.display_startup_errors = 0 phpSettings.display_errors = 0 includePaths.library = APPLICATION_PATH "/../library" bootstrap.path = APPLICATION_PATH "/Bootstrap.php" bootstrap.class = "Bootstrap" appnamespace = "My" resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers" resources.frontController.params.displayExceptions = 0 resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/" resources.view[] = phpSettings.date.timezone = "America/Los_Angeles" [staging : production] [testing : production] phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 [development : production] phpSettings.display_startup_errors = 1 phpSettings.display_errors = 1 resources.frontController.params.displayExceptions = 1 tests/application/bootstrap.php file <?php error_reporting(E_ALL); // Define path to application directory defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application')); // Define application environment defined('APPLICATION_ENV') || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'testing')); // Ensure library/ is on include_path set_include_path(implode(PATH_SEPARATOR, array( realpath(APPLICATION_PATH . '/../library'), // this project' library get_include_path(), ))); /** Zend_Application */ require_once 'Zend/Application.php'; require_once 'ControllerTestCase.php';

    Read the article

  • PHP: How to store XML data in an array?

    - by tommy
    Below is the XML I am working with - there are more items - this is the first set. How can I get these elements in to an array? I have been trying with PHP's SimpleXML etc. but I just cant do it. <response xmlns:lf="http://api.lemonfree.com/ns/1.0"> <lf:request_type>listing</lf:request_type> <lf:response_code>0</lf:response_code> <lf:result type="listing" count="10"> <lf:item id="56832429"> <lf:attr name="title">Used 2005 Ford Mustang V6 Deluxe</lf:attr> <lf:attr name="year">2005</lf:attr> <lf:attr name="make">FORD</lf:attr> <lf:attr name="model">MUSTANG</lf:attr> <lf:attr name="vin">1ZVFT80N555169501</lf:attr> <lf:attr name="price">12987</lf:attr> <lf:attr name="mileage">42242</lf:attr> <lf:attr name="auction">no</lf:attr> <lf:attr name="city">Grand Rapids</lf:attr> <lf:attr name="state">Michigan</lf:attr> <lf:attr name="image">http://www.lemonfree.com/images/stock_images/thumbnails/2005_38_557_80.jpg</lf:attr> <lf:attr name="link">http://www.lemonfree.com/56832429.html</lf:attr> </lf:item> <!-- more items --> </lf:result> </response> Thanks guys EDIT: I want the first items data in easy to access variables, I've been struggling for a couple of days to get SimpleXML to work as I am new to PHP, so I thought manipulating an array is easier to do.

    Read the article

  • Centralized Credentials Service For Various Apps

    - by Vlad
    We are researching the possibility to build a centralized credentials storage for internal applications. These apps (vb6, vb.net, web apps in asp.net, etc) are using various instances of SQL servers and iSeries. We want to implement a central credentials facility that would act as a security broker. Basically it should work like this: Client app supplies AppID (I am Sales Application) and EnvironmentID (I am running in QA environment) and in return will get either a connection object (preferred) or encrypted connection string that will allow said application to connect to resources it needs. There will be cases when application needs to connect to two (or more) database resources (i.e. to SQL and iSeries). What are looking at DP API at the moment, but I am not convinced that DP API is the solution as it tied in with machine key. In our case using machine key isn't feasible, so I want to know if there are other approaches available.

    Read the article

  • Problem with Zend Project

    - by Fincha
    Hello, i write a script and it works perfectly, on my local server. I have uploaded it on my server and now I getting this Problem Parse error: syntax error, unexpected '{' in /homepages/46/d319011794/htdocs/suche/public/index.php on line 18 an here is my index.php <?php error_reporting(E_ALL || E_STRICT); define('APPLICATION_PATH', realpath(dirname(__FILE__)) . '/../application'); set_include_path( APPLICATION_PATH . '/../library' . PATH_SEPARATOR . '../application/models' . PATH_SEPARATOR . get_include_path() ); require_once 'Zend/Loader.php'; Zend_Loader::registerAutoload(); new App_Connect(); try { //Line 18 require '../application/bootstrap.php'; } catch(Exception $exception) { echo "<html><body>Fehler beim bootstraping"; if(defined('APPLICATION_ENVIROMENT') && APPLICATION_EVIROMENT != 'production') { echo "<br><br>" . $exception->getMessage() . "<br>" . "<div align='left'>Stack Trace: " . "<pre> " . $exception->getTraceAsString() . "</pre></div>"; } echo "</body></html>"; exit(1); } Zend_Controller_Front::getInstance()->dispatch(); This is a Zend Project... so may be some one know what to do...

    Read the article

  • how to store xml data in array (php)

    - by tommy
    <?xml version="1.0" encoding="UTF-8" ?> - <response xmlns:lf="http://api.lemonfree.com/ns/1.0"> <lf:request_type>listing</lf:request_type> <lf:response_code>0</lf:response_code> - <lf:result type="listing" count="10"> - <lf:item id="56832429"> <lf:attr name="title">Used 2005 Ford Mustang V6 Deluxe</lf:attr> <lf:attr name="year">2005</lf:attr> <lf:attr name="make">FORD</lf:attr> <lf:attr name="model">MUSTANG</lf:attr> <lf:attr name="vin">1ZVFT80N555169501</lf:attr> <lf:attr name="price">12987</lf:attr> <lf:attr name="mileage">42242</lf:attr> <lf:attr name="auction">no</lf:attr> <lf:attr name="city">Grand Rapids</lf:attr> <lf:attr name="state">Michigan</lf:attr> <lf:attr name="image">http://www.lemonfree.com/images/stock_images/thumbnails/2005_38_557_80.jpg</lf:attr> <lf:attr name="link">http://www.lemonfree.com/56832429.html</lf:attr> </lf:item> Above is the xml i am working with - there are more items - this is the first set. How can i get these elements in to an array. I have been trying with php's simple xml etc but i just cant do it. Thanks guys

    Read the article

  • Fixing warning from git

    - by japancheese
    I've been doing a workflow of making a git repository on a remote central repository, cloning that repo on my local dev machine, doing some work, and then pushing the changes back to the same repo on the remote server. However, and I believe this was after an update I did to git recently, after pushing up a change, I'm getting the following warning: Counting objects: 2724, done. Delta compression using up to 2 threads. Compressing objects: 100% (2666/2666), done. Writing objects: 100% (2723/2723), 5.90 MiB | 313 KiB/s, done. Total 2723 (delta 219), reused 0 (delta 0) warning: updating the currently checked out branch; this may cause confusion, as the index and working tree do not reflect changes that are now in HEAD. Can someone explain to me exactly what this warning means, and what I'm doing wrong in my workflow to not receive this warning?

    Read the article

  • Java JSP/Servlet: controller servlet throwing the famous stack overflow

    - by NoozNooz42
    I've read several docs and I don't get it: I know I'm doing something wrong but I don't understand what. I've got a website that is entirely dynamically generated: there's hardly any static content at all. So, trying to understand JSP/Servlet, I've written my own "front controller" intercepting every single query, it looks like this: <servlet-mapping> <servlet-name>defaultservlet</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> Basically I want any user request, like: example.org example.org/bar example.org/foo.html to all go through a default servlet which I've written. The servlet then examines the URI and find to which .jsp the request must be dispatched, and then does, after having set all the attributes correctly, a: RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/WEB-INF/jsp/index.jsp"); dispatcher.forward(req, resp); When I'm using a url-pattern (in web.xml) like, say, *.html, everything works fine. But when I change it to /* (to really intercept everything), I enter an endless loop and it ends up with a... StackOverflow :) When the request is dispatched, is the URI ".../WEB-INF/jsp/index.jsp" itself matched by the web.xml filter /* that I set? How should I do if I want to intercept everything using a /* url-pattern and yet be able to dispatch/forward/? I'm not asking about specs/Javadocs here: I'm really confused about the bigger picture and I'd need some explanation as to what could be going on. Am I not supposed to intercept really everything? If I can intercept everything, what should I be aware of regarding forwarding/dispatching?

    Read the article

  • How do you handle files that can't support concurrent edits in Mercurial?

    - by Scott Whitlock
    I'm using Mercurial with TortoiseHg. Each developer has their own repositories, and there's one central repository on the server for synchronizing our changes. (This will sound lame, but we're using it to manage the source for a legacy VB6 project. Nothing we can do about that...) As has been pointed out elsewhere, there is a big problem in VB6 with merging the .frx (form resources) files. So code changes seem to merge fine, but if two developers both make changes at the same time in the form design view, we can't merge. I'm ok with disallowing concurrent edits, but of course the whole point of Mercurial is that it's distributed so there is no option to force a file to be locked before editing. I don't believe there's a Mercurial solution for this, so I'm wondering: other developers who are using Mercurial for version control, do you have some 3rd party tool that assists with locking files for editing in the cases where it's necessary? Did we make a mistake using Mercurial instead of something like SVN?

    Read the article

  • bxSlider-4 text slide pass into the next slide

    - by Martialp
    I use http://bxslider.com/ to slide some content, just simple text. But it seem to have a problem with the text, not the image. I post a simple live exemple : http://jsfiddle.net/Sbt75/324/ As you can see on the exemple, we see the previous text from the previous slide on the left of the active slide. <div class="row"> <div class="large-6 columns"> <ul class="bxslider"> <li><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium, obcaecati, laudantium, blanditiis, adipisci quod eaque porro sapiente eligendi dicta voluptates voluptatum sunt aperiam totam modi quis vitae maxime! Dolor, possimus.</p></li> <li>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odit, recusandae, delectus amet ipsa voluptate tempora architecto ad blanditiis officia perspiciatis nesciunt at ducimus quas nihil fuga. Qui optio minima accusamus?</li> <li><p class="right"> il etait une fois un grand mechant loupqui s'appelet jean et qui aimer courir dans l'herbe avec une grande harpe pour jouer dvant les enfants Lorem ipsum dolor sit amet, consectetur adipisicing elit. Odit, recusandae, delectus amet ipsa voluptate tempora architecto ad blanditiis officia perspiciatis nesciunt at ducimus quas nihil fuga. Qui optio minima accusamus? </p> </li> </ul> </div> </div> $(document).ready(function(){ $('.bxslider').bxSlider({ auto: false, autoControls: false, nextSelector: '#slider-next', prevSelector: '#slider-prev', nextText: 'Onward ?', prevText: '? Go back' }); });

    Read the article

  • Is it possible to have a global exception hook?

    - by Heinrich Ulbricht
    Hi, my code is fairly well covered with exception handling (try..except). Some exceptions are not expected to happen and some exceptions happen fairly often, which is expected and ok. Now I want to add some automated tests for this code. It would be good to know how many exceptions happened during execution, so I can later see if the expected number was raised or anything unexpected happened. I don't want to clutter every exception handling block with debug code, so my question is: Is there a way to install some kind of global exception handler which sits right before all other exception handling blocks? I am searching for a central place to log these exceptions. Thanks for any suggestions! (And if this matters: it is Delphi 2009)

    Read the article

  • SharePoint thinks new Server is offline?

    - by emalamisura
    I added an index server to the topology, and tried to switch it from the front end to the index server but for some reason I get an exception every time in Central Admin saying the server is offline. I checked everything... IIS is running and is serving out correctly The App Pool Identity is valid I restarted IIS I restarted the Indexing server I had a wierd problem when installing SP2 for SharePoint, (WSS sp2 installed fine) where it got stuck and "Upgrading SharePoint Products and Technologies" and I had to run the following command to get it to continue: psconfig -cmd upgrade -inplace b2b -wait -force After that it said it succeeded with no errors... The only thing I haven't done is reboot the Primary server cause I have to do it in off hours, but I want to make sure I have covered all my other bases first...Any ideas?

    Read the article

  • Android ANR keyDispatchingTimedOut Error while continuous tapping on screen.

    - by user519846
    Hi All, I am getting Application Not Responding (ANR) dialog while continuous tapping on the screen. There is no view on the screen where i am tapping. Frequency of this issue is less but still i am not able to remove it completely. Here i am attaching the log what i caught during this error. ERROR/ActivityManager(1322): ANR in com.test.mj.and.ui (com.test.mj.and.ui/.TermsAndCondActivity) ERROR/ActivityManager(1322): Reason: keyDispatchingTimedOut ERROR/ActivityManager(1322): Parent: com.test.mj.and.ui/.SplashActivity ERROR/ActivityManager(1322): Load: 6.59 / 6.37 / 5.21 ERROR/ActivityManager(1322): CPU usage from 11430ms to 2196ms ago: ERROR/ActivityManager(1322): rtal.mj.and.ui: 9% = 7% user + 1% kernel / faults: 649 minor ERROR/ActivityManager(1322): system_server: 4% = 2% user + 2% kernel / faults: 10 minor ERROR/ActivityManager(1322): logcat: 3% = 1% user + 1% kernel / faults: 675 minor 1 major ERROR/ActivityManager(1322): synaptics_wq: 1% = 0% user + 1% kernel ERROR/ActivityManager(1322): ami304d: 1% = 0% user + 0% kernel ERROR/ActivityManager(1322): .process.lghome: 1% = 0% user + 0% kernel / faults: 47 minor ERROR/ActivityManager(1322): sync_supers: 0% = 0% user + 0% kernel ERROR/ActivityManager(1322): droid.DunServer: 0% = 0% user + 0% kernel / faults: 6 minor ERROR/ActivityManager(1322): events/0: 0% = 0% user + 0% kernel ERROR/ActivityManager(1322): oid.inputmethod: 0% = 0% user + 0% kernel / faults: 2 minor ERROR/ActivityManager(1322): m.android.phone: 0% = 0% user + 0% kernel / faults: 2 minor ERROR/ActivityManager(1322): ndroid.settings: 0% = 0% user + 0% kernel ERROR/ActivityManager(1322): sh: 0% = 0% user + 0% kernel / faults: 110 minor ERROR/ActivityManager(1322): -flush-179:0: 0% = 0% user + 0% kernel ERROR/ActivityManager(1322): TOTAL: 19% = 13% user + 6% kernel WARN/WindowManager(1322): Continuing to wait for key to be dispatched WARN/WindowManager(1322): No window to dispatch pointer action 1 Can anyone please help me to solve this issue? Thanks in advance.

    Read the article

  • leiningen: missing super-pom

    - by Arthur Ulfeldt
    if I enable eith the clojure-couchdb or swank-clojure then lein deps fails because org.apache.maven:super-pom:jar:2.0 is missing :dependencies [[org.clojure/clojure "1.1.0-master-SNAPSHOT"] [org.clojure/clojure-contrib "1.0-SNAPSHOT"] [clojure-http-client "1.0.0-SNAPSHOT"] [org.apache.activemq/activemq-core "5.3.0"] ; [org.clojars.the-kenny/clojure-couchdb "0.1.3"] ; [org.clojure/swank-clojure "1.1.0"] ]) this error: Path to dependency: 1) org.apache.maven:super-pom:jar:2.0 2) org.clojure:swank-clojure:jar:1.1.0 ---------- 1 required artifact is missing. for artifact: org.apache.maven:super-pom:jar:2.0 from the specified remote repositories: clojars (http://clojars.org/repo/), clojure-snapshots (http://build.clojure.org/snapshots), central (http://repo1.maven.org/maven2) what is super-pom. why do these packages need it and where can I get it.

    Read the article

  • How would I structure the loop to go through inputs?

    - by dmanexe
    I am attempting to make a loop that will go through an array structured like this: $input[n][checked] $input[n][input] The 2nd input acts as a price multiplier, but doesn't have to exist (field can be blank). I don't think a foreach loop is right because I don't think it handles the inputs from the form in the correct dimensional array order to keep the information together. I have inputs on a form that look like this: <input type="checkbox" name="measure[<?php echo $item->id; ?>][checked]" value="<?php echo $item->id; ?>"> <input class="item_mult" type="text" name="measure[<?php echo $item->id; ?>][input]" /> I am attempting to make the loop go through and act as a multiplier on the input relative to its sibling field. (i.e. input[1][input] would be an integer that I want to retrieve later, grouped with input[1][checked]) <? $field = $this->input->post('measure',true); $totals = array(); foreach($field as $value): if ($value['input'] == TRUE) { $query = $this->db->get_where('items', array('id' => $value['input']))->row(); $totals[] = $query->price; ?> <p><?=$query->name?> - <?=money_format('%(#10n', $query->price)?></p> <?php } else { } endforeach; ?> And finally, the last code to array_sum and print the grand total: <? $grand_total = array_sum($totals); ?> <p><?=money_format('%(#10n', $grand_total)?></p> Eventually, I will need to store these records in a database, so I am sending complete item IDs through, etc.

    Read the article

< Previous Page | 90 91 92 93 94 95 96 97 98 99 100 101  | Next Page >