Search Results

Search found 6569 results on 263 pages for 'specification pattern'.

Page 96/263 | < Previous Page | 92 93 94 95 96 97 98 99 100 101 102 103  | Next Page >

  • Modal dialog blocks wcf callback

    - by Bjarne
    I am working on an application that relies strongly on a wcf request/callback pattern. That is, it uses a service which exposes a number of methods, and for each method there is a callback on which the result is returned. In the client, I wish to open a modal dialog, make a request on the server and then wait for the result on the callback. But I never get a callback since the UI thread is blocked by the modal dialog. Has anyone worked with a similar pattern? I would hate to have more threads in the client, and I also don't like the idea of 'simulating' a modal dialog.

    Read the article

  • Unable to create application factory of class org.apache.wicket.spring.SpringWebApplicationFactory

    - by theJava
    org.apache.wicket.protocol.http.WebApplicationFactoryCreationException: Unable to create application factory of class org.apache.wicket.spring.SpringWebApplicationFactory at org.apache.wicket.protocol.http.WicketFilter.getApplicationFactory(WicketFilter.java:228) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:271) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:252) at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713) at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499) at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:115) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130) at org.mortbay.jetty.Server.doStart(Server.java:224) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132) at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:454) at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:396) at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:210) at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:314) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168) at org.apache.maven.cli.MavenCli.main(MavenCli.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) 2010-12-28 14:51:46.213:INFO::Started [email protected]:8080 I am using Wicket 1.5 M3, Spring 3.0 and i am getting this error. Below is my Web.xml config. <?xml version="1.0" encoding="ISO-8859-1"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <display-name>mysticpaste</display-name> <!-- There are three means to configure Wickets configuration mode and they are tested in the order given. 1) A system property: -Dwicket.configuration 2) servlet specific <init-param> 3) context specific <context-param> The value might be either "development" (reloading when templates change) or "deployment". If no configuration is found, "development" is the default. --> <filter> <filter-name>wicket.mysticpaste</filter-name> <filter-class> org.apache.wicket.protocol.http.WicketFilter </filter-class> <init-param> <param-name>applicationFactoryClassName</param-name> <param-value>org.apache.wicket.spring.SpringWebApplicationFactory</param-value> </init-param> </filter> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:com/mysticcoders/mysticpaste/spring/application-context.xml</param-value> </context-param> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <filter> <filter-name>wicket.session</filter-name> <filter-class>org.apache.wicket.protocol.http.servlet.WicketSessionFilter</filter-class> <init-param> <param-name>filterName</param-name> <param-value>wicket.mysticpaste</param-value> </init-param> </filter> <filter-mapping> <filter-name>wicket.session</filter-name> <url-pattern>/servlet/*</url-pattern> </filter-mapping> <filter> <filter-name>open.hibernate.session.in.view</filter-name> <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class> </filter> <!-- Important! This filter mapping must come before Wicket's! --> <filter-mapping> <filter-name>open.hibernate.session.in.view</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> </web-app>

    Read the article

  • VB.NET 2.0 - StackOverflowException when using Thread Safe calls to Windows Forms Controls

    - by LamdaComplex
    I have a Windows Forms app that, unfortunately, must make calls to controls from a second thread. I've been using the thread-safe pattern described on the http://msdn.microsoft.com/en-us/library/ms171728.aspx. Which has worked great in the past. The specific problem I am having now: I have a WebBrowser control and I'm attempting to invoke the WebBrowser.Navigate() method using this Thread-Safe pattern and as a result I am getting StackOverflow exceptions. Here is the Thread-Safe Navigate method I've written. Private Delegate Sub NavigateControlCallback(ByRef wb As WebBrowser, ByVal url As String) Private Sub AsyncNavigate(ByRef wb As WebBrowser, ByVal URL As String) Try If wb.InvokeRequired Then Dim callback As New NavigateControlCallback(AddressOf AsyncNavigate) callback(wb, url) Else wb.Navigate(url) End If Catch ex As Exception End Try End Sub Is there a Thread-Safe way to interact with WinForms components without the side effect of these StackOverflowExceptions?

    Read the article

  • how do i supply data to my gwt tree

    - by molleman
    Hello, So i need to create a tree with tree items for my gwt project. i am using the composite pattern to store all the information i need to be placed within a tree. A User has a root Folder that extends Hierarchy, this root Folder then has a list of Hierarchy objects, that can be FileLocations or Folders. Trouble i am having is building my tree based on this pattern. this data is all stored using hibernate in a mysql database How would i be able to implement this as a tree in gwt. Also the tree item that i create would have to reference back to the object so i can rename or move it.

    Read the article

  • database vs flat file, which is a faster structure for "regex" matching with many simultaneous reque

    - by Jamex
    Hi, which structure returns faster result and/or less taxing on the host server, flat file or database (mysql)? Assume many users (100 users) are simultaneously query the file/db. Searches involve pattern matching against a static file/db. File has 50,000 unique lines (same data type). There could be many matches. There is no writing to the file/db, just read. Is it possible to have a duplicate the file/db and write a logic switch to use the backup file/db if the main file is in use? Which language is best for the type of structure? Perl for flat and PHP for db? Addition info: If I want to find all the cities have the pattern "cis" in their names. Which is better/faster, using regex or string functions? Please recommend a strategy TIA

    Read the article

  • Configuration for log4j to log ERROR level to a DB table

    - by firnnauriel
    Using the default config of a fresh Grails project, how do i change it so that ONLY error level messages will go to 'Message' table? // log4j configuration log4j = { // Example of changing the log pattern for the default console // appender: // //appenders { // console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n') //} error 'org.codehaus.groovy.grails.web.servlet', // controllers 'org.codehaus.groovy.grails.web.pages', // GSP 'org.codehaus.groovy.grails.web.sitemesh', // layouts 'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping 'org.codehaus.groovy.grails.web.mapping', // URL mapping 'org.codehaus.groovy.grails.commons', // core / classloading 'org.codehaus.groovy.grails.plugins', // plugins 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration 'org.springframework', 'org.hibernate', 'net.sf.ehcache.hibernate' warn 'org.mortbay.log' } Thanks for any leads on this.

    Read the article

  • JavaScript - checking for any lowercase letters in a string

    - by pcampbell
    Consider a JavaScript method that needs to check whether a given string is in all uppercase letters. The input strings are people's names. The current algorithm is to check for any lowercase letters. var check1 = "Jack Spratt"; var check2 = "BARBARA FOO-BAR"; var check3 = "JASON D'WIDGET"; var isUpper1 = HasLowercaseCharacters(check1); var isUpper2 = HasLowercaseCharacters(check2); var isUpper3 = HasLowercaseCharacters(check3); function HasLowercaseCharacters(string input) { //pattern for finding whether any lowercase alpha characters exist var allLowercase; return allLowercase.test(input); } Is a regex the best way to go here? What pattern would you use to determine whether a string has any lower case alpha characters?

    Read the article

  • In Javascript, by what mechanism does setting an Image src property trigger an image load?

    - by brainjam
    One of the things you learn early on when manipulating a DOM using Javascript is the following pattern: var img = new Image(); // Create new Image object img.onload = function(){ // execute drawImage statements here } img.src = 'myImage.png'; // Set source path As far as I know, in general when you set an object property there are no side effects. So what is the mechanism for triggering an image load? Is it just magic? Or can I use a similar mechanism to implement a class Foo that supports a parallel pattern? var foo = new Foo(); // Create new object foo.barchanged = function(){ // execute something after side effect has completed } foo.bar = 'whatever'; // Assign something to 'bar' property I'm vaguely aware of Javascript getters and setters. Is this how Image.src triggers a load?

    Read the article

  • Struts2 combine with domain specific servlet

    - by Dewfy
    I have struts2 web application. Right now I need embed with help of iframe some functionality from stand-alone servlet. But according to following rule, servlet is never get calling. <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> Unfortunately I cannot change it to /prefix/* So does anybody know how to resolve it? Thanks in advance!

    Read the article

  • Java regex, need help with escape characters

    - by Blankman
    My HTML looks like: <td class="price" valign="top"><font color= "blue">&nbsp;&nbsp;$&nbsp; 5.93&nbsp;</font></td> I tried: String result = ""; Pattern p = Pattern.compile("\"blue\">&nbsp;&nbsp;$&nbsp;(.*)&nbsp;</font></td>"); Matcher m = p.matcher(text); if(m.find()) result = m.group(1).trim(); Doesn't seem to be matching. Am I missing an escape character?

    Read the article

  • styles/style.css No mapping found for HTTP request

    - by sonx
    Hi, it seems my styles folder added under the web folder is not getting mapped by dispatcher servlet on my JSP's. I get WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/onlinebasket/styles/style.css] in DispatcherServlet with name 'onlinebasket' here's my dispatcher servlet <servlet-mapping> <servlet-name>onlinebasket</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> and i this is my CSS URL on JSP <link rel="stylesheet" href="<c:url value="/styles/sytle.css"/>" type="text/css"/> This folder is on the web folder.

    Read the article

  • Which is more efficient regular expression?

    - by Vagnerr
    I'm parsing some big log files and have some very simple string matches for example if(m/Some String Pattern/o){ #Do something } It seems simple enough but in fact most of the matches I have could be against the start of the line, but the match would be "longer" for example if(m/^Initial static string that matches Some String Pattern/o){ #Do something } Obviously this is a longer regular expression and so more work to match. However I can use the start of line anchor which would allow an expression to be discarded as a failed match sooner. It is my hunch that the latter would be more efficient. Can any one back me up/shoot me down :-)

    Read the article

  • wordpress servlet mapping not working

    - by Andrew
    I have the latest wordpress running in tomcat 6.0.26 virtual host with Quercus Servlet php servlet. It works, except when I try to use perm links. A url such as /index.php/my-page-name doesn't seem to ever hit the php server. It gets a browser error that request resource is not available. It's like it isn't matching the servlet urlmapping. I'm using a standard method in the web.xml <servlet-mapping> <servlet-name>Quercus Servlet</servlet-name> <url-pattern>*.php</url-pattern> </servlet-mapping> I see nothing showing up either in the tomcat logs when I use that url above. Any ideas please?

    Read the article

  • Pros and cons of Localisation of technical words ?

    - by paercebal
    This question is directed to the non-english speaking people here. It is somewhat biased because SO is an "english-speaking" web forum, so... In the other hand, most developers would know english anyway... In your locale culture, are technical words translated into locale words ? For example, how "Design Pattern", or "Factory", or whatever are written/said in german, spanish, etc. etc. when used by IT? Are the english words prefered? The local translation? Do the two version (english/locale) are evenly used? Edit Could you write with your answer the locale translation of "Design Pattern"? In french, according to Wikipedia.fr, it is "Patron de conception", which translates back as "Model of Conceptualization" (I guess).

    Read the article

  • Is this crufty?

    - by bobobobo
    I'm writing code like: class Game { int getMouseX() { return inputManager.getMouseX() ; } } ; I remember seeing code like this and hating it. One function passes off to another? What is this "pattern" (or, possibly, anti-pattern) called? I don't like it! On the other hand, it saves exposing the InputManager to the user of the class... would that be a better choice? Or should Game simply not contain InputManager? Edit What about using multiple inheritance instead? class Game : public InputManager, public Window { // by virtue of inheriting InputManager and Window, // Game now has "acquired" the capabilities of // InputManager's public functions, without requiring delegate. } ; Have I not found a reasonably good use for multiple inheritance??

    Read the article

  • How can I fill in the blanks to display just my image?

    - by Ignacio
    <h:inputText id="email" value="#{user.user.email}" title="Email" onchange="this.form.submit()" required="true" requiredMessage="_____"> <f:validator validatorId="checkvalidemail"/> </h:inputText> <h:message for="email" styleClass="error"/> validation: String enteredEmail = (String)object; Pattern p = Pattern.compile(".+@.+\\.[a-z]+"); Matcher m = p.matcher(enteredEmail); boolean matchFound = m.matches(); if (!matchFound) { FacesMessage message = new FacesMessage(); message.setSummary("____"); throw new ValidatorException(message); and css .error { background-image: url('includes/style/delete2.png'); text-align: left; font-size: 36px; } Thank you very much Best Regards Ignacio

    Read the article

  • .NET SerialPort.Read skipps bytes

    - by Lukas Rieger
    Solution Reading the data byte wise via "port.ReadByte" is too slow, the problem is inside the SerialPort class. i changed it to reading bigger chunks via "port.Read" and there are now no buffer overruns. although i found the solution myself, writing it down helped me and maybe someone else has the same problem and finds this via google... (how can i mark it as answered?) EDIT 2 by setting port.ReadBufferSize = 2000000; i can delay the problem for ~30 seconds. so it seems, .Net really is too slow... since my application is not that critical, i just set the buffer to 20MB, but i am still interested in the cause. EDIT i just tested something i had not thought of before (shame on me): port.ErrorReceived += (object self, SerialErrorReceivedEventArgs se_arg) => { Console.Write("| Error: {0} | ", System.Enum.GetName(se_arg.EventType.GetType(), se_arg.EventType)); }; and it seems that i have an overrun. Is the .Net implementation too slow for 500k or is there an error on my side? Original Question i built a very primitive oszilloscope (avr, which sends adc data over uart to an ftdi chip). On the pc side i have a WPF Programm that displays this data. The Protokoll is: two sync bytes (0xaffe) - 14 data bytes - two sync bytes - 14 data bytes - ... i use 16bit values, so inside the 14 data bytes are 7 channels (lsb first). I verified the uC Firmware with hTerm, and it does send and receive everything correct. But, if i try to read the data with C#, sometimes some bytes are lost. The oszilloscop programm is a mess, but i created a small sample application, which has the same symptoms. I added two extension methods to a) read one byte from the COM Port and ignore -1 (EOF) and b) wait for the sync pattern. The sample programm first syncs onto the data stream by waiting for (0xaffe) and then compares the received bytes with the expected values. the loop runs a few times until an assert failed message pops up. I could not find anything about lost bytes via google, any help would be appreciated. Code using System; using System.Collections.Generic; using System.Diagnostics; using System.IO.Ports; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SerialTest { public static class SerialPortExtensions { public static byte ReadByteSerial(this SerialPort port) { int i = 0; do { i = port.ReadByte(); } while (i < 0 || i > 0xff); return (byte)i; } public static void WaitForPattern_Ushort(this SerialPort port, ushort pattern) { byte hi = 0; byte lo = 0; do { lo = hi; hi = port.ReadByteSerial(); } while (!(hi == (pattern >> 8) && lo == (pattern & 0x00ff))); } } class Program { static void Main(string[] args) { //500000 8n1 SerialPort port = new SerialPort("COM3", 500000, Parity.None, 8, StopBits.One); port.Open(); port.DiscardInBuffer(); port.DiscardOutBuffer(); //Sync port.WaitForPattern_Ushort(0xaffe); byte hi = 0; byte lo = 0; int val; int n = 0; // Start Loop, the stream is already synced while (true) { //Read 7 16-bit values (=14 Bytes) for (int i = 0; i < 7; i++) { lo = port.ReadByteSerial(); hi = port.ReadByteSerial(); val = ((hi << 8) | lo); Debug.Assert(val != 0xaffe); } //Read two sync bytes lo = port.ReadByteSerial(); hi = port.ReadByteSerial(); val = ((hi << 8) | lo); Debug.Assert(val == 0xaffe); n++; } } } }

    Read the article

  • Embedded C++, any tips to avoid a local thats only used to return a value on the stack?

    - by lisarc
    I have a local that's only used for the purposes of checking the result from another function and passing it on if it meets certain criteria. Most of the time, that criteria will never be met. Is there any way I can avoid this "extra" local? I only have about 1MB of storage for my binary, and I have several thousand function calls that follow this pattern. I know it's a minor thing, but if there's a better pattern I'd love to know! SomeDataType myclass::myFunction() { SomeDataType result; // do I really need this local??? // i need to check the result and pass it on if it meets a certain condition result = doSomething(); if ( ! result ) { return result; } // do other things here ... // normal result of processing return SomeDataType(whatever); }

    Read the article

  • get entire line with java.util.scanner.hasNext(regex)

    - by Hussain
    I'm doing something in Java that requires input to be matched against the pattern ^[1-5]$. I should have a while loop looping through each line of input, checking it against the pattern, and outputting an error message if it does not. Sudo code: while (regex_match(/^[^1-5]$/,inputLine)) { print ("Please enter a number between 1 and 5! "); getNextInputLine(); } I can use java.util.Scanner.hasMatch("^[^1-5]$"), but that will only match a single token, not the entire line. Any idea on how to make hasMatch match against the entire line? (Setting the delimiter to "\n" or "\0" doesn't work.)

    Read the article

  • Servlet mapping for ajax call parameters

    - by Woho87
    Hi guys! <servlet-mapping> <servlet-name>Test</servlet-name> <url-pattern>/GetContacts*</url-pattern> </servlet-mapping> I got a simple problem where I can't find any solution on the internet. I have a ajax calls that have the url http://localhost:80/Push/GetContacts?id=23..... The above servlet mapping is not correct for the AJAX call. it issues a http 404 not found call. What is the right syntax to enable my ajax call?

    Read the article

  • PHP / Zend Framework: Which object would handle a complex table join?

    - by Thomas
    I think one of the more difficult concepts to understand in the Zend Framework is how the Table Data Gateway pattern is supposed to handle multi-table joins. Most of the suggestions I've seen claim that you simply handle the joins using a $db-select()... Zend DB Select with multiple table joins Joining Tables With Zend Framework PHP Joining tables wthin a model in Zend Php Zend Framework Db Select Join table help Zend DB Select with multiple table joins My question is: Which object is best suited to handle this kind of multi-table select statement? I feel like putting it in the model would break the 1-1 Table Data Gateway pattern between the class and the db table. Yet putting it in the controller seems wrong because why would a controller handle a SQL statement? Anyway, I feel like ZF makes handling datasets from multiple tables more difficult than it needs to be. Any help you can provide is great... Thanks!

    Read the article

  • How to use Messageboxes in MVVM?

    - by BigTiger
    It seems that the XAML in MVVM pattern has difficulty to pop-up a Messageboxes. My client insists that the validation labels and colors are not good for them. They still want a messagebox. How can do it? I know I can pop-up messageboxes in the view-model, but it violates the whole purpose for the view-model. I can also raise a error, and pop-up a messagebox in some exception handlers, but the messagebox is not an exception. It is part of the normal program flow. Is there a good way to do it in XAML? My client likes messageboxes. She does not care about the MVVM pattern, she never had any quality problem before using MVVM and unit test. But now, she can not even get her messageboxes, so she is not very happy. Your help is definitely appreciated ... I need to make her happy.

    Read the article

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