Search Results

Search found 4250 results on 170 pages for 'mark underwood'.

Page 72/170 | < Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >

  • How to hold a queue of messages and have a group of working threads without polling?

    - by Mark
    I have a workflow that I want to looks something like this: / Worker 1 \ =Request Channel= - [Holding Queue|||] - Worker 2 - =Response Channel= \ Worker 3 / That is: Requests come in and they enter a FIFO queue Identical workers then pick up tasks from the queue At any given time any worker may work only one task When a worker is free and the holding queue is non-empty the worker should immediately pick up another task When tasks are complete, a worker places the result on the Response Channel I know there are QueueChannels in Spring Integration, but these channels require polling (which seems suboptimal). In particular, if a worker can be busy, I'd like the worker to be busy. Also, I've considered avoiding the queue altogether and simply letting tasks round-robin to all workers, but it's preferable to have a single waiting line as some tasks may be accomplished faster than others. Furthermore, I'd like insight into how many jobs are remaining (which I can get from the queue) and the ability to cancel all or particular jobs. How can I implement this message queuing/work distribution pattern while avoiding a polling? Edit: It appears I'm looking for the Message Dispatcher pattern -- how can I implement this using Spring/Spring Integration?

    Read the article

  • Are there any programmable barcode scanners that can call a webservice?

    - by Mark Redman
    I am looking at integrating a C# application with a barcode scanner. The last time I did this was with Delphi 1 (win 3.11) using a scanner that plugged in-line into the keyboard cable. Looking around it appears most scanners are USB based these days and assume they emulate keyboard entry. Anybody know of more sophisticated/programmable scanner that can call a webservice or even just do a basic POST/GET this would eliminate the C# application and the computer to support it?

    Read the article

  • Java/JAXB: Accessing property of object in a list

    - by Mark Lewis
    Hello Using JAXB I've created a series of classes which represent my XML schema. Validating against the schema an XML file has thus become a 'tree' of java objects representing the XML. Now I'd like to access, delete and add an object of one the created types in my tree. If I've got classes' methods arranged like this: RootType class has: public List<FQType> getFq() { // and setter return fq; } FQType class has: public RemapType getRemap() { // and setter return remap; } RemapType class has: public String getSource() { // and setter return source; } What's the most concise way to code reading and writing of the 'source' member of a RemapType instance in an FQType instance with, say, fqtypeID=1, in an array of type RootType (in which RootType instances also each have rootID)? Currently I'm using a for loop Iterator in which is an if rootID = mySelectedRootID. In the if I nest a second for loop Iterator over the contained FQType instances and in that a second if fqTypeID = mySelectedFQTypeID. IE for loop iterator/if statement pairs to recognise the object of desire. With all the bells and whistles this way is nearly 15 lines of code to access a data type - can I do this in one line? Thanks

    Read the article

  • How do I prevent JAXB from generating Java from imported schema?

    - by Mark
    I've got two Java projects, both generate Java classes based on a schema definition, I'm using xjc to create the classes. My second project depends on a class from the first project, and in particular, one of the classes I'd like to generate in my second project needs to use one of the types from the first project. To accomplish this dependency at the schema level, I'm using a simple xsd:import to map the namespace to a particular schema. JAXB works just fine with this condition, except it also generates the first project's types in the second project. So after running have something like this: Project A +-- com.foo.bar +-- TypeA Project B +-- com.foo.asdf +-- TypeB +-- com.foo.bar +-- TypeA The second "TypeA" is undesirable, and I'd like to never generate it in the first place. How do I instruct JAXB not to generate the classes for "TypeA" that it finds as a result of the import statement?

    Read the article

  • Wrap MemoryStream in a using block REST WCF

    - by Mark
    I'm learning REST to implement some Services with WCF. I implemented an example with a MemoryStream. Because MemoryStream is Disposable I wrapped it in a using. When I do this I sometimes can see the xml response in the browser (IE8) and sometimes it will just show me the following Errormessage: The download of the specified resource has failed. Error processing resource 'http://localhost:8889/SimpleGetService/'. Why does this occur? When I don't wrap it in a using, I never seem to get the error.

    Read the article

  • Detect if PCRE was built without the --enable-unicode-properties or --enable-utf8 configuration switches

    - by Mark Baker
    I've a PHP library that uses a number of regular expressions featuring the \P expressions for multibyte strings, e.g. ((((?:\P{M}\p{M}*)+?)|(\'[^\']*\')|(\"[^\"]*\"))!)?\$?([a-z]{1,3})\$?(\d+) While this works on most builds, I've had a few reports of the regexp returning an error. Depending on Operating platform, the error messages from PCRE are: Compilation failed: PCRE does not support \L, \l, \N, \P, \p, \U, \u, or \X at offset n or Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset n I know that I can probably test a regexp at the beginning of my code that uses \P, and trap for a returned error, then use that response to set a compatibility flag and provide a degraded (non UTF-8) regexp without the \P within the main body of my code based on that compatibility flag; but I was wondering if there was any simpler way to identify whether PCRE had been built without the --enable-unicode-properties or --enable-utf8 configuration switches. PHP provides access to PCRE_VERSION constant, but that won't help identify whether \P support is enabled or not.

    Read the article

  • How can I detect if a string contains punctuation marks at the end?

    - by Sheehan Alam
    Lets assume I have the string: "Hello I like your shoes #today...!" I am tokenizing the string by spaces: return [string componentsSeparatedByString:@" "]; So my array contains: Hello I like your shoes #today...! I want to focus on "#today...!" any word that has a # in the prefix I am changing the font color. How can I make sure that only "#today" has its font color changed? I would basically like to figure out if a word has a punctuation mark at the end, and change the color for characters before the punctuation mark.

    Read the article

  • Need Help with .NET OpenId HttpHandler

    - by Mark E
    I'm trying to use a single HTTPHandler to authenticate a user's open id and receive a claimresponse. The initial authentication works, but the claimresponse does not. The error I receive is "This webpage has a redirect loop." What am I doing wrong? public class OpenIdLogin : IHttpHandler { private HttpContext _context = null; public void ProcessRequest(HttpContext context) { _context = context; var openid = new OpenIdRelyingParty(); var response = openid.GetResponse(); if (response == null) { // Stage 2: user submitting Identifier openid.CreateRequest(context.Request.Form["openid_identifier"]).RedirectToProvider(); } else { // Stage 3: OpenID Provider sending assertion response switch (response.Status) { case AuthenticationStatus.Authenticated: //FormsAuthentication.RedirectFromLoginPage(response.ClaimedIdentifier, false); string identifier = response.ClaimedIdentifier; //****** TODO only proceed if we don't have the user's extended info in the database ************** ClaimsResponse claim = response.GetExtension<ClaimsResponse>(); if (claim == null) { //IAuthenticationRequest req = openid.CreateRequest(identifier); IAuthenticationRequest req = openid.CreateRequest(Identifier.Parse(identifier)); var fields = new ClaimsRequest(); fields.Email = DemandLevel.Request; req.AddExtension(fields); req.RedirectingResponse.Send(); //Is this correct? } else { context.Response.ContentType = "text/plain"; context.Response.Write(claim.Email); //claim.FullName; } break; case AuthenticationStatus.Canceled: //TODO break; case AuthenticationStatus.Failed: //TODO break; } } }

    Read the article

  • How do I UPDATE a Linked Server table where "alias" is required, in SQL Server 2000?

    - by Mark Hurd
    In SQL Server 2005 tablename can be used to distinguish which table you're referring to: UPDATE LinkedServer.database.user.tablename SET val=u.val FROM localtable u WHERE tablename.ID=u.ID In SQL Server 2000 this results in Server: Msg 107, Level 16, State 2 The column prefix 'tablename' does not match with a table name or alias name used in the query. Trying UPDATE LinkedServer.database.user.tablename SET val=u.val FROM localtable u WHERE LinkedServer.database.user.tablename.ID=u.ID results in Server: Msg 117, Level 15, State 2 The number name 'LinkedServer.database.user.tablename' contains more than the maximum number of prefixes. The maximum is 3. And, of course, UPDATE LinkedServer.database.user.tablename SET val=u.val FROM localtable u WHERE ID=u.ID results in Server: Msg 209, Level 16, State 1 Ambiguous column name 'ID'. (In fact searching on "The number name contains more than the maximum number of prefixes. The maximum is 3." I found the answer, but I've typed up this question and I'm going to post it! :-) )

    Read the article

  • Can StructureMap be configured so that one can use different .config settings based on whether the p

    - by Mark Rogers
    I know that in StructureMap I can read from my *.config files (or files referenced by them), when I want to pass specific arguments to an object's constructor. ForRequestedType<IConfiguration>() .TheDefault.Is.OfConcreteType<SqlServerConfiguration>() .WithCtorArg("db_server_address") .EqualToAppSetting("data.db_server_address") But what I would like to do is read from one config setting in debug mode and another in release mode. Sure I could surround the .EqualToAppSetting("data.db_server_address"), with #if DEBUG, but for some reason those statements make me cringe a little when I put them in. I'd like to know if there was some way to do this with the StructureMap library itself. So can I feed my objects different settings based on whether the project is built in debug or release mode?

    Read the article

  • Getting search results from Twitter in php

    - by Mark Mayo
    I'm attempting to put together a little mashup with some twitter APIs. However, the whole area is new to me (I'm more of an embedded developer dabbling). And frustratingly, every tutorial I am trying in Php is either out of date, not doing what it claims to do, it or is broken. Essentially, I just want a nice bit of example code - say, an HTML file, a connection.js for the JQuery magic, and a php file - 'getsearch' which contains the relevant Curl calls to the API to just return the results for a given search term. Followed the tutorial to the letter at http://www.reynoldsftw.com/2009/02/using-jquery-php-ajax-with-the-twitter-api/ and even downloaded the guy's code and chucked it on my webserver, but it just seems to sit there. I'm relatively competent at php and html, but it's the Curl and the JQuery side of things which is new to me, and would appreciate any thoughts, links, or code suggestions. I've attempted reading the API - but even that seems sparse - and several links are broken to their own tutorials, so that's put me off a bit for now.

    Read the article

  • scaleX scaleY increasing left, top margin, and line spacing

    - by Mark
    If you have Text with a font that is 72 point for example (and scaleX scaleY = 1) you can achieve the same size with a font size of 12 and scaleX,scaleY = 6. For reasons that would take too long to explain I am applying a large scale factor as in the latter example. The problem is, even though the text is the same size, the line spacing and left and top margins have all been increased but I want them to be the same size as well. As far as the line spacing, I discovered that TextFormat.leading was being automatically increased when scaleX, scaleY was greater than 1, so I just had to reset TextFormat.leading back to 0. That leaves the left and top margins, and I have no idea how those are being increased. I tried TextFormat.blockIndent=0 and TextFormat.leftMargin=0 (and also ignorePadding=true) and it had no effect. And have no clue how to reset the top margin either to its orginal size, in case anyone has an idea for all these.

    Read the article

  • How do I convert a simple ruby flashcard program into a ROR app?

    - by Mark Wilbur
    What I'm trying to do is make a basic flashcard app on rails. At this point, all I'm looking for is the functionality to iterate through a list of flashcards, quiz the user and let the user know if they were right or not. In ruby, it didn't take me long to write: class Card attr_accessor :answer, :question def initialize(answer = "", question="") @answer = answer @question = question end def quiz puts "What does #@question mean?" answer = gets.chomp if answer == @answer puts "Right" return true else puts "Wrong" return answer end end end class Cardlist attr_accessor :Cards def initialize(Cards = []) @Cards = Cards end def quiz Cards.each do |w| w.quiz end end end The problem I'm having with rails is figuring out where to put the logic to loop through all the cards in the list. I've made models specifying that Card belongs_to cardlist and that Cardlist has_many cards. I know application logic should go in the controller, but if I were to make a "quiz" action for my Cardlist controller, how would I make it iterate through all the cards? After each "quiz" page generated, I'd need to get an answer back from the user, respond (maybe flash) whether it was right or not and then continue onto the next question. Would any of that logic have to go into the view in order to make sure it's sending back the user inputted answers to the controller?

    Read the article

  • split with javascript

    - by Sourabh
    Hi below is something I am trying to do with JavaScript. If I have string like str = "how are you? hope you are doing good" ; now I want to split it with ? but I dont want to lose the "?". Instead I want to break the string just after the question mark such a way that question mark is with the first segment that we have after splitting str what should I get is ["how are you?","hope you are doing good"] I am not sure if it can be done with Javascript split() function ,please help.

    Read the article

  • What are the pitfalls to watch out for when upgrading MediaWiki?

    - by Mark Robinson
    We've got MediaWiki 1.13.2 and we'll soon be upgrading to the latest & greatest version (probably 1.16). We've got lots of extensions installed (for which we'll probably also need to get the latest versions) and we've done some minor configuring (e.g. adding new edit buttons). What should we watch out for during the upgrade? And what should we test? Does anyone have any experience of things that went wrong?

    Read the article

  • Android: How to periodically send location to a server

    - by Mark
    Hi, I am running a Web service that allows users to record their trips (kind of like Google's MyTracks) as part of a larger app. The thing is that it is easy to pass data, including coords and other items, to the server when a user starts a trip or ends it. Being a newbie, I am not sure how to set up a background service that sends the location updates once every (pre-determined) period (min 3 minutes, max 1 hr) until the user flags the end of the trip, or until a preset amount of time elapses. Once the trip is started from the phone, the server responds with a polling period for the phone to use as the interval between updates. This part works, in that I can display the response on the phone, and my server registers the user's action. Similarly, the trip is closed server-side upon the close trip request. However, when I tried starting a periodic tracking method from inside the StartTrack Activity, using requestLocationUpdates(String provider, long minTime, float minDistance, LocationListener listener) where minTime is the poll period from the server, it just did not work, and I'm not getting any errors. So it means I'm clueless at this point, never having used Android before. I have seen many posts here on using background services with handlers, pending intents, and other things to do similar stuff, but I really don't understand how to do it. I would like the user to do other stuff on the phone while the updates are going on, so if you guys could point me to a tutorial that shows how to actually write background services (maybe these run as separate classes?) or other ways of doing this, that would be great. Thanks!

    Read the article

  • Does anyone know of a free tool to integrate Reflector with Visual Studio, besides TestDriven.NET?

    - by mark
    Dear ladies and sirs. I love the Go to Reflector menu option installed by TD.NET. However, TD.NET is not free for commercial use and so I do not have it at work. I am wondering if there is another tool out there that does just that - allows to jump to Reflector from the source code in VS and which is totally free. I know it is possible to develop a VS add-in that does it, but, alas, I have no time for it, so if anyone has already developed something like this - feel free to share. Regards,

    Read the article

  • Creating a contact form using divs with 4 extra divs for "Corners"?

    - by mark smith
    Hi there, i have tried to create a contact form (a standard form, square in nature but with rounded corners)... I can't use the CSS3 specs so i have an image for each corner.. I have set the images on the background-image and no repeat but it seems if the div is empty then it doesn't display, is there a hack - although prefer an alternative clean method :-) So on the top level i presume i have 1 div for the Upper-Left (corner) and then the upper-middle (just has a color assigned) and then a div for the upper-right (corner) .. so i presume i need to float all these to the left??? Or am i missing something? Thanks in advance

    Read the article

  • Python: eliminating stack traces into library code?

    - by Mark Harrison
    When I get a runtime exception from the standard library, it's almost always a problem in my code and not in the library code. Is there a way to truncate the exception stack trace so that it doesn't show the guts of the library package? For example, I would like to get this: Traceback (most recent call last): File "./lmd3-mkhead.py", line 71, in <module> main() File "./lmd3-mkhead.py", line 66, in main create() File "./lmd3-mkhead.py", line 41, in create headver1[depotFile]=rev TypeError: Data values must be of type string or None. and not this: Traceback (most recent call last): File "./lmd3-mkhead.py", line 71, in <module> main() File "./lmd3-mkhead.py", line 66, in main create() File "./lmd3-mkhead.py", line 41, in create headver1[depotFile]=rev File "/usr/anim/modsquad/oses/fc11/lib/python2.6/bsddb/__init__.py", line 276, in __setitem__ _DeadlockWrap(wrapF) # self.db[key] = value File "/usr/anim/modsquad/oses/fc11/lib/python2.6/bsddb/dbutils.py", line 68, in DeadlockWrap return function(*_args, **_kwargs) File "/usr/anim/modsquad/oses/fc11/lib/python2.6/bsddb/__init__.py", line 275, in wrapF self.db[key] = value TypeError: Data values must be of type string or None.

    Read the article

  • jquery toggle+paginate+multiple instances

    - by mark
    Hi, I'm a jquery newbie - wanted to ask what might be the best strategy for achieving what I am after as I think it uses a mix of jquery functions : If list of items exceeds 5 items a 'more' link appears which when toggled will reveal the rest of the items. If items list is 5 or less no 'more' link is shown. Hide button also at bottom of long full revealed list. (perhaps this is toggle+pagination?) And then also that this can be used in multiple instances, as it is for multiple category menu's.(to be used in typical indexhibit websites structure like http://mikeyburton.com/) link 1 link 2 link 3 link 4 link 5 link 6 link 7 link 8 more Any help or links greatly appreciated.

    Read the article

  • Visual Studio Stop Debugging on IE Close - WebSite?

    - by Mark
    Hi all, Would like to know if there is a setting anywhere which causes debugging to automatically stop when IE closes, and also if there is a way for this to work the other way around and IE to close if debugging stops. I know that this works when the project type I'm working on is a 'Web Application', I'd like to know if the same functionality exists when working on a 'Web Site' Thanks all.

    Read the article

  • Using variables for colors in table cells

    - by Mark Robinson
    Using the variables extension, I want to change the background color of a cell in a table. So far I've done this: {{#vardefine:green|<span style="background:Green; color:White">text</span>}} The problem is that, when I add {{#var:green}} to the cell, only the text itself has a green background. Ideally, I want the whole cell to have a background color, like it does if I use this: | bgcolor="#ff00ff" | test or this | style="background:silver" |silver in the cell. Does anyone know how to solve this?

    Read the article

< Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >