Search Results

Search found 1237 results on 50 pages for 'sam halicke'.

Page 23/50 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • Getting XQuery [modify()]: Top-level attribute nodes are not supported error while modifying xml

    - by sam
    DECLARE @mycur CURSOR DECLARE @id int DECLARE @ParentNodeName varchar(max) DECLARE @NodeName varchar(max) DECLARE @NodeText varchar(max) SET @mycur = CURSOR FOR SELECT * FROM @temp OPEN @mycur FETCH NEXT FROM @mycur INTO @id,@ParentNodeName,@NodeName,@NodeText WHILE @@FETCH_STATUS = 0 BEGIN PRINT @id -- sample statements PRINT @ParentNodeName PRINT @NodeName SET @x.modify (' insert attribute status {sql:variable("@status")} as first into (/@ParentNodeName/@NodeName/child::*[position()=sql:variable("@status")])[1] ') FETCH NEXT FROM @mycur INTO @id,@ParentNodeName,@NodeName,@NodeText END DEALLOCATE @mycur Any idea why I am getting this error as query works fine if I manually insert path

    Read the article

  • Passing events in JMS

    - by sam
    I'm new in JMS. In my program, My Problem is that , I want to pass 4 events(classes) (callEvent, agentEvent, featureEvent, eventListenerExit) from the JMSQueue Program , who i m mention below. How can I do this? // (JmsSender.java) package com.apac.control.helper; import java.util.Calendar; import javax.jms.Queue; import javax.jms.QueueConnection; import javax.jms.QueueConnectionFactory; import javax.jms.QueueSender; import javax.jms.QueueSession; import javax.jms.Session; import javax.jms.TextMessage; import javax.naming.InitialContext; import com.apac.control.api.CallData; import com.apac.control.exception.CtiException; import library.cti.CtiEventDocument; import library.cti.impl.CtiEventDocumentImpl; public final class JmsSender { private QueueConnectionFactory factory; private Queue queue; private QueueConnection connection; private QueueSession session; private QueueSender sender; private String sessionId; private String deviceId; private String centerId; private String switchId; public JmsSender(String queueJndiName, String sessionId, String deviceId, String centerId, String switchId) throws CtiException { this.sessionId = sessionId; this.deviceId = deviceId; this.centerId = centerId; this.switchId = switchId; try { InitialContext ic = new InitialContext(); factory = (QueueConnectionFactory) ic.lookup("javax/jms/QueueConnectionFactory"); queue = (Queue) ic.lookup(queueJndiName); } catch (Exception e) { throw new CtiException("CTI. Error creating JmsSender.", e); } } public String getCenterId() { return centerId; } public String getDeviceId() { return deviceId; } public String getSwitchId() { return switchId; } public void connect() throws CtiException { try { connection = factory.createQueueConnection(); } catch (Exception e) { throw new CtiException("CTI000. Error connecting to cti queue."); } } public void close() throws CtiException { try { connection.close(); } catch (Exception e) { throw new CtiException("CTI000. Error closing queue."); } } public void send(String eventType, CallData call, long seqId) throws CtiException { // prepare the message CtiEventDocument ced = this.createBaseCtiDocument(); CtiEventDocument ce = ced.getCtiEvent(); ce.setSequenceId(seqId); ce.setCallId("" + call.getCallId()); ce.setUcid(call.getUCID()); ce.setEventType(eventType); ce.setDnisNumber(call.getDnisNumber()); ce.setAniNumber(call.getAniNumber()); ce.setApplicationData(call.getApplicationData()); ce.setQueueNumber(call.getQueueNumber()); ce.setCallingNumber(call.getCallingNumber()); if (call instanceof ManualCall) { ce.setManual("yes"); } try { sendMessage(ced.toString()); } catch (Exception e) { throw new CtiException("CTI051. Error sending message.", e); } } public void send(String eventType, String agentId, String agentMode, long seqId) throws CtiException { CtiEventDocument ced = this.createBaseCtiDocument(); CtiEventDocument ce = ced.getCtiEvent(); ce.setSequenceId(seqId); ce.setEventType(eventType); ce.setAgentId(agentId); ce.setAgentMode(agentMode); try { sendMessage(ced.toString()); } catch (Exception e) { throw new CtiException("CTI051. Error sending message.", e); } } public void sendError(String errCode, String errMsg) throws CtiException { CtiEventDocument ced = this.createBaseCtiDocument(); CtiEventDocument ce = ced.getCtiEvent(); ce.setEventType("Error"); ce.setErrorCode(errCode); ce.setErrorMessage(errMsg); try { sendMessage(ced.toString()); } catch (Exception e) { throw new CtiException("CTI051. Error sending message.", e); } } private CtiEventDocument createBaseCtiDocument() { CtiEventDocument ced = CtiEventDocument.Factory.newInstance(); CtiEventDocument ce = ced.addNewCtiEvent(); ce.setSessionId(sessionId); ce.setSwitchId(switchId); ce.setCenterId(centerId); ce.setDeviceId(deviceId); ce.setTime(Calendar.getInstance()); return ced; } // Synchronization protects session, which cannot be // accessed by more than one thread. We may more than // one thread here from Cti in some cases (for example // when customer is being transfered out and hangs the call // at the same time. synchronized void sendMessage(String msg) throws Exception { session = connection.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); sender = session.createSender(queue); TextMessage txtMsg = session.createTextMessage(msg); sender.send(txtMsg); sender.close(); session.commit(); } }

    Read the article

  • Convert.ToDateTime causes FormatException on afternoon date/time values

    - by Sam
    We have an application parsing date/time values in the following format: 2009-10-10 09:19:12.124 2009-10-10 12:13:14.852 2009-10-10 13:00:00 2009-10-10 15:23:32.022 One particular server all of the sudden (today) started failing to parse any times 13:00:00 or later. This particular client has five servers and only one has the problem. We have dozens of other clients with a total of hundreds of servers without the problem. System.FormatException: String was not recognized as a valid DateTime. at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) at System.DateTime.Parse(String s, IFormatProvider provider) at System.Convert.ToDateTime(String value, IFormatProvider provider) at System.String.System.IConvertible.ToDateTime(IFormatProvider provider) at System.Convert.ToDateTime(Object value) I ran a test using DateTime.Parse(s, CultureInfo.CurrentCulture) comapred to DateTime.Parse(s, CultureInfo.InvariantCulture) and the problem only shows up with CurrentCulture. However, CurrentCulture is "en-US" just like all the other servers and there's nothing different that I can find in regional or language settings. Has anyone seen this before? Suggestions related to what I can look into? EDIT: Thank you for the answers so far. However, I'm looking for suggestions on what configuration to look into that could have caused this to suddenly change behavior and stop working when it's worked for years and works on hundreds of other servers. I've already changed it for the next version, but I'm looking for a configuration change to fix this in the interim for the current installation.

    Read the article

  • Looking for an elegant appwidget skin solution

    - by sam-henwood
    I have an appwidget application and would like to enable users to create skins which can be applied at runtime. My preferred solution is to use apk files with nine patch png images that stretch to fit the ImageView's of widget, however its starting to look like I might have to use another packaging technique (e.g. zip files). What I've tried: Importing nine patch resources as Drawable with context.getResourcesForApplication(my.app).getResources..., converting them to bitmaps using a canvas and setting the bitmap to the RemoteView using setImageViewBitap. This didn't work because I needed to specify the size of the resulting view (myBitmap.setBounds(..,..)) during conversion and some of the widths/heights in my appwidget aren't fixed. Perhaps there is a way to get the heights etc that I missed. Importing resources directly to the RemoteView using setImageViewUri() This doesn't work because the function doesn't seem to read android.resource:// Uri's anymore (I poked around in the ImageView source and it only seems to read files paths and content:// Uri's) Importing resources directly to the RemoteView using setImageViewResource() which didn't work because the id retrieved from the external package obviously doesn't include a package reference. What I'm trying to avoid is hard coding all my appwidget width's and height's, or using a separate packaging scheme. Has anyone implemented appwidget skins nicely and want to share the knowledge? Alternately there might be a hole in my logic somewhere that can be pointed out. I can provide code if required though I don't have any here right now.

    Read the article

  • Can continuations be used as a replacement for recursion?

    - by Sam
    The following function generates a 'stack level too deep (SystemStackError)' for n = 5,000 def factorial(n) n == 0 ? 1 : factorial(n -1) * n end Is there a way to avoid this error using continuations/callcc? Note: I know this can be implemented without recursion. e.g. def factorial2(n) (1..n).inject(1) {|result, n| result * n } end

    Read the article

  • Could not load file or assembly 'GMap.NET.Core' or one of its dependencies. An attempt was made to load a program with an incorrect format.

    - by Sam M
    I have a wcf Service application in VS2010.My local machine is a 32 bit OS where as the server is a 64 bit. There are around 6 services in my solution. Im successfully able to host the application on IIS on my local machine.And it works fine. But when i try host that service application on Server i gets the below error Could not load file or assembly 'GMap.NET.Core' or one of its dependencies. An attempt was made to load a program with an incorrect format. I do have reference added in my solution for GMap.NET.Core . I have tried to set the properties in my solution to Any CPU . Also in the application pool i have set the Enable 32-Bit Application to True. i have also set the Copy Local to TRUE in my solution before publishing. When i run the source on through my solution i dont get any error and the solution is built successfully. What else can i try to get my services successfully hosted on the Server and should be accessed through my application.

    Read the article

  • what is programmer job or task?

    - by sam
    Hi, what is programmer job or tasks? is it only programming, or it includes software testing,windows installer, network management, helpdesk, documentation??? AS I am a graduate developer, I feel like I am doing everything, from upgrading hardware, installing antivirus, ...everything.... and of course coding... thanks

    Read the article

  • Using Haml & Sass with Eclipse

    - by Sam Hasler
    Are there any plugins for eclipse that add syntax highlighting and other niceties for editing Haml and Sass? Google searches only seem to point to a dead project on lucky-dip.net. Note: it's Sass I'm most interested in. A solution for using just Sass (or something similar to it like less) in Eclipse would suit my needs. Also, I'm developing for Google App Engine (Java), using the App Engine plugin for Eclipse. So switching to another IDE isn't an option. Update: So I've got syntax highlighting now using Pascal's answer and I've installed Ruby and Compass to compile sass into css. However I'm aware that the syntax of sass will be changing with 2.4 so I'd still like to get the Haml and Sass Editors that come with Aptana to work. When I tried to use them they threw an exception and wouldn't display the files. I'd be interested to know if that's because I misconfigured Aptana or is an actual bug in the editors. I'd also be very interested in any way of compiling Sass that integrated with Ecplise so that I didn't have to run something separate from it. (or a way of putting Sass/Compass in the Ecplise build process.)

    Read the article

  • How to draw onto a PictureBox image when control resizes?

    - by Sam Mackrill
    I am using the pictureBox_Paint event to try and draw an overlay onto the image in a PictureBox. This is working fine until I resize the PictureBox (set to use SizeMode.Zoom), when I do this the overlay graphic is drawn off position by the margin between the image and the edge of the PictureBox. I guess I need to use the ImageRectangle somehow but this is not public.

    Read the article

  • Populate a list from xml using python

    - by Sam
    I have an xml file in the following format: <food> <desert> cake <desert> </food> <history> currently in my belly </history> I want to create two list, food and text populated with cake and history in string format. Is there an easy way to do it in python?

    Read the article

  • Xcode raises exception when refactoring

    - by Sam Gwydir
    When I run a refactor on my code in xcode, all the files are correctly refactored except one, and when I click to check the changes made in that file, the following 'Internal Error Occurs': Uncaught Exception: Invalid parameter not satisfying: fileName Stack Backtrace: The stack backtrace has been logged to the console. Here is what it spat out in the console: 4/7/10 06:47:30 Xcode[35355] [MT] Uncaught Exception: Invalid parameter not satisfying: fileName Backtrace: 0 0x92842bbd __raiseError (in CoreFoundation) 1 0x914b9509 objc_exception_throw (in libobjc.A.dylib) 2 0x92842908 +[NSException raise:format:arguments:] (in CoreFoundation) 3 0x98801dc3 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] (in Foundation) 4 0x98db0f8e -[NSDocument(NSDeprecated) initWithContentsOfFile:ofType:] (in AppKit) 5 0x0075c07e -[PBXTextFileDocument initWithContentsOfFile:ofType:] (in DevToolsInterface) 6 0x007dc5be -[PBXFileDocument initWithFileReference:usingType:] (in DevToolsInterface) 7 0x00b1c0f8 -[XCRefactoringFileChangeSet(XCRefactoringModule_HelperMethods) referencedTextFileDocument] (in DevToolsInterface) 8 0x00b1d1f4 -[XCRefactoringEditableExistingTextFileChangeSet populateComparator:] (in DevToolsInterface) 9 0x00ab19b7 -[XCRefactoringModuleFileItem populateComparator:previewFinished:] (in DevToolsInterface) 10 0x00aa4606 -[XCRefactoringModule(MasterListDelegate) outlineViewSelectionDidChange:] (in DevToolsInterface) 11 0x987381cb _nsnote_callback (in Foundation) 12 0x927ca3f9 __CFXNotificationPost (in CoreFoundation) 13 0x927c9e2a _CFXNotificationPostNotification (in CoreFoundation) 14 0x9872d098 -[NSNotificationCenter postNotificationName:object:userInfo:] (in Foundation) 15 0x9873a475 -[NSNotificationCenter postNotificationName:object:] (in Foundation) 16 0x98af1de2 -[NSTableView _enableSelectionPostingAndPost] (in AppKit) 17 0x98bd11d0 -[NSTableView mouseDown:] (in AppKit) 18 0x98bcfeea -[NSOutlineView mouseDown:] (in AppKit) 19 0x007596c3 -[PBXExtendedOutlineView mouseDown:] (in DevToolsInterface) 20 0x98b6e548 -[NSWindow sendEvent:] (in AppKit) 21 0x00757a06 -[XCWindow sendEvent:] (in DevToolsInterface) 22 0x98a871af -[NSApplication sendEvent:] (in AppKit) 23 0x006f6dec -[PBXExtendedApplication sendEvent:] (in DevToolsInterface) 24 0x98a1ac4f -[NSApplication run] (in AppKit) 25 0x98a12c85 NSApplicationMain (in AppKit) 26 0x0000eee1 27 0x000021a5 If you would like to take a look at the project I'm working on, here is a link to download my xcodeproject: Tea Timer.zip To recreate my problem, open Timer.h, attempt to refactor timeField to minuteField, use the preview function of refactor and then select Timer.m, to look at the changes supposedly made within. It will then raise this error without editing the file.

    Read the article

  • Read and write from a byte stream if the endianess of the data is different from that of the current

    - by Sam Holder
    I have a stream of bytes which contains a flag which identifies the endianness of the data in the header. I want to read the doubles from the stream, which will presumably need to be different if the endianness of the data in the header is different? I am currently using a BinaryReader and calling ReadDouble to read the data from the stream, but if the endianness flag indicates that the data stream has a different endianness than the machine architecture then presumably this will not work? How should this be handled? Should I check the endianness of my data against that of the current machine then when I want to read a double instead read the bytes raw into a byte array and do array.Reverse to reverse the data before using BitConverter.ToDouble () with the reversed data and a zero offset? I could just test this but I do not have a source of data for both endianness so am a bit concerned about creating test data to test the parsing and this being different from what 'real' data might look like.

    Read the article

  • Can't use FAXCOMEXLib in VS 2010 anymore?

    - by Sam
    I'm just in the process of moving from Visual Studio 2008 to Visual Studio 2010. One of my projects use the Microsoft Fax Service Extended COM Type Library. After converting the project to VS 2010 I get the following compiler error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1558,9): error MSB3648: The Keycontainer-path "VS_KEY_812A0248FF872DEC" ist invalid. KeyContainer must point to an existing file. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.Targets(1558,9): warning MSB3283: Wrapperassembly for type library "FAXCOMEXLib" not found. I tried to remove FAXCOMEXLib from the project and adding it again, but it did not help. I got a similar problem with other COM references. How do I resolve this?

    Read the article

  • Payapl sandbox a/c in Dotnet..IPN Response Invaild

    - by Sam
    Hi, I am Integrating paypal to mysite.. i use sandbox account,One Buyer a/c and one more for seller a/c...and downloaded the below code from paypal site string strSandbox = "https://www.sandbox.paypal.com/cgi-bin/webscr"; HttpWebRequest req = (HttpWebRequest)WebRequest.Create(strSandbox); //Set values for the request back req.Method = "POST"; req.ContentType = "application/x-www-form-urlencoded"; byte[] param = Request.BinaryRead(HttpContext.Current.Request.ContentLength); string strRequest = Encoding.ASCII.GetString(param); strRequest += "&cmd=_notify-validate"; req.ContentLength = strRequest.Length; //for proxy //WebProxy proxy = new WebProxy(new Uri("http://url:port#")); //req.Proxy = proxy; //Send the request to PayPal and get the response StreamWriter streamOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII); streamOut.Write(strRequest); streamOut.Close(); StreamReader streamIn = new StreamReader(req.GetResponse().GetResponseStream()); string strResponse = streamIn.ReadToEnd(); streamIn.Close(); if (strResponse == "VERIFIED") { //check the payment_status is Completed //check that txn_id has not been previously processed //check that receiver_email is your Primary PayPal email //check that payment_amount/payment_currency are correct //process payment } else if (strResponse == "INVALID") { //log for manual investigation } else { //log response/ipn data for manual investigation } and when add this snippets in pageload event of success page i get the ipn response as INVALID but amount paid successfully but i am getting invalid..any help..Paypal Docs in not Clear. thanks in advance

    Read the article

  • Getting a RichTextCtrl's default font size in wxPython

    - by Sam
    I have a RichTextCtrl, which I've modified to accept HTML input. The HTML parsing code needs to be able to increase and decrease the font size as it gets tags like <font size="-1">, but I can't work out how to get the control's default font size to adjust. I tried the following (where self is my RichTextCtrl): fred = wx.richtext.RichTextAttr() self.GetStyle(0,fred) print fred.GetFontSize() However, the final instruction fails, because GetStyle turns fred into a TextAttrEx and so I get AttributeError: 'TextAttrEx' object has no attribute 'GetFontSize'. Am I missing a vastly easier way of getting the default font size?

    Read the article

  • How to include a PHP generated XML file into flash vars, while ALSO passing through the current php functions into it?

    - by Sam
    Hello Given situation: In webpage.php the flashscript is calling a flash script with a flashvar: the playlist file which is a PHP generated XML file: playlist.php, it does that well so long as there are no extra functions in there. Now, in that XML-format playlistfile there needs to be a special function, besides the usual echo("");, namely the very special echo __(""); function that is already declared in webpage.php which needs to do something with the paragraphs residing within that xml file. However, currently the retrieved file misses the function echo __();and says "no such function declared in that xml-format [playlist.php] file". The php functions that are currently included at the very top of webpage.php somehow do not pass-through-the necessary functions into the playlist file for it to recognise how to handle it, in order for that playlist to get those necessary functions working. Apparently these are not passed through automatically/properly when residing in the flashvars?? Cause the echo __(""); works fine when called within webpage.php or via a normal php include(""); if those functions are in a different php file. But not working from the playlist.php file. Any ideas why/what is going on here? I appreciate your clues for this prob +1. Thanks very much. WEBPAGE.PHP the webpage, has at the top an include with functions: <?php include (functions.php); ?> // function that know what to do with echo __("paragraph") <script language="JavaScript" type="text/javascript"> run( 'play', 'true', 'loop', 'true', 'flashvars', 'xmlFile=/incl/playlist.php', // <<<< !! 'wmode', 'transparent', 'allowScriptAccess','sameDomain', ); </script> <noscript> <object classid="blabla"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="/movies/movie.swf" /> <param name="flashvars" value="xmlFile=/incl/playlist.php" /> // <<< !! <embed src="/movies/movies.swf" type="application/x-shockwave-flash"/> </object> </noscript> PLAYLIST.PHP The PHP generated XML file which is retrieved into the webpage as flash variable (see above) <?php echo ('<?xml version="1.0" encoding="UTF-8"?>'); echo ('<songs>'); echo ('<song version="1. "') . __("boom blue blow bell bowl") . ('/>'); echo ('<song version="2. "') . __("ball bail beam bike base") . ('/>'); echo ('</songs>'); ?>

    Read the article

  • Copy data from different worksheet to a master worksheet but no duplicates

    - by sam
    hi all, i want to clarify my initial question for a possible solutions from any savior out there. Say i have 3 excel sheets one for each user for data entry located in separate workbooks to avoid excel share workbook problems. I also have a master sheet in another workbook where i want individual data enter on those sheets precisely sheets 1 should copy to the next available row of sheet 1 in the master sheet as the users enter them. i need a vba code that can copy each record without copying a duplicate row in the master sheet but highlight the duplicate row and lookup the initial record in a master sheet and return the name of the Imputer looking up the row say column ( I) where each user sign there initials after every row of entry like below. All 4 worksheets are formatted as below: lastname account cardno. type tran amount date location comments initials JAME 65478923 1975 cash 500 4/10/2010 miles st. this acct is resolve MLK BEN 52436745 1880 CHECK 400 4/12/2010 CAREY ST Ongoing investigation MLK JAME 65478923 1975 cash 500 4/10/2010 miles st. this acct is resolve MLK I need the vba to recognize duplicates only if the account number and the card number matches the initial records. So if the duplicates exist a pop up message should be display that a duplicates exist and return the initial Imputer say MLK in COLUMN( I) to any user inputting in the individual worksheets other than warehouse sheets (master). So please any idea will be appreciated.

    Read the article

  • [IOS SDK] retrieving scores from game center

    - by Sam
    I got this code from apple's developer site. How do i process the score information to be viewed in a like a UITableView or something? (void) retrieveTopTenScores { GKLeaderboard *leaderboardRequest = [[GKLeaderboard alloc] init]; if (leaderboardRequest != nil) { leaderboardRequest.playerScope = GKLeaderboardPlayerScopeGlobal; leaderboardRequest.timeScope = GKLeaderboardTimeScopeAllTime; leaderboardRequest.range = NSMakeRange(1,10); [leaderboardRequest loadScoresWithCompletionHandler: ^(NSArray *scores, NSError *error) { if (error != nil) { // handle the error. } if (scores != nil) { // process the score information. } }]; } }

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >