Search Results

Search found 52962 results on 2119 pages for 'text message'.

Page 10/2119 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Different Linux message queues have the same id?

    - by Halo
    I open a mesage queue in a .c file, and upon success it says the message queue id is 3. While that program is still running, in another terminal I start another program (of another .c file), that creates a new message queue with a different mqd_t. But its id also appears as 3. Is this a problem? server file goes like this: void server(char* req_mq) { struct mq_attr attr; mqd_t mqdes; struct request* msgptr; int n; char *bufptr; int buflen; pid_t apid; //attr.mq_maxmsg = 300; //attr.mq_msgsize = 1024; mqdes = mq_open(req_mq, O_RDWR | O_CREAT, 0666, NULL); if (mqdes == -1) { perror("can not create msg queue\n"); exit(1); } printf("server mq created, mq id = %d\n", (int) mqdes); and the client goes like: void client(char* req_mq, int min, int max, char* dir_path_name, char* outfile) { pid_t pid; /* get the process id */ if ((pid = getpid()) < 0) { perror("unable to get client pid"); } mqd_t mqd, dq; char pfx[50] = DQ_PRFX; char suffix[50]; // sprintf(suffix, "%d", pid); strcat(pfx, suffix); dq = mq_open(pfx, O_RDWR | O_CREAT, 0666, NULL); if (dq == -1) { perror("can not open data queue\n"); exit(1); } printf("data queue created, mq id = %d\n", (int) dq); mqd = mq_open(req_mq, O_RDWR); if (mqd == -1) { perror("can not open msg queue\n"); exit(1); } mqdes and dq seem to share the same id 3.

    Read the article

  • Send C++ Structure to MSMQ Message

    - by Gobalakrishnan
    Hi, I am trying to send the below structure through MSMQ Message typedef struct { char cfiller[7]; short MsgCode; char cfiller1[11]; short MsgLength; char cfiller2[2]; } MESSAGECODE; typedef struct { MESSAGECODE Header; char DealerId[16]; char GroupId[16]; long Token; short Periodicity; double Deposit; double GrossExposureLimit; double NetExposureLimit; double NetSaleExposureLimit; double NetPositionLimit; double TurnoverLimit; double PendingOrdersLimit; double MTMLossLimit; double MaxSingleTransValue; long MaxSingleTransQty; double IMLimit; long NetQuantityLimit; } LIMITUPDATE; void main() { // // create queue // open queue // send message // OleInitialize(NULL); // have to init OLE // // declare some variables // IMSMQQueueInfoPtr qinfo("MSMQ.MSMQQueueInfo"); IMSMQQueuePtr qSend; IMSMQMessagePtr m("MSMQ.MSMQMessage"); LIMITUPDATE l1; l1.Header.MsgCode=26001; l1.Header.MsgLength=150; qinfo->PathName = ".\\private$\\q99"; m->Body = l1; qSend = qinfo->Open(MQ_SEND_ACCESS, MQ_DENY_NONE); m->Send(qSend); qSend->Close(); } while compiling i am getting the following error. Error 2 error C2664: 'IMSMQMessage::PutBody' : cannot convert parameter 1 from 'LIMITUPDATE' to 'const _variant_t &' c:\temp\msmq\msmq.cpp 58 msmq thank you.

    Read the article

  • MSMQ - Message Queue Abstraction and Pattern

    - by Maxim Gershkovich
    Hi All, Let me define the problem first and why a messagequeue has been chosen. I have a datalayer that will be transactional and EXTREMELY insert heavy and rather then attempt to deal with these issues when they occur I am hoping to implement my application from the ground up with this in mind. I have decided to tackle this problem by using the Microsoft Message Queue and perform inserts as time permits asynchronously. However I quickly ran into a problem. Certain inserts that I perform may need to be recalled (ie: retrieved) immediately (imagine this is for POS system and what happens if you need to recall the last transaction - one that still hasn’t been inserted). The way I decided to tackle this problem is by abstracting the MessageQueue and combining it in my data access layer thereby creating the illusion of a single set of data being returned to the user of the datalayer (I have considered the other issues that occur in such a scenario (ie: essentially dirty reads and such) and have concluded for my purposes I can control these issues). However this is where things get a little nasty... I’ve worked out how to get the messages back and such (trivial enough problem) but where I am stuck is; how do I create a generic (or at least somewhat generic) way of querying my message queue? One where I can minimize the duplication between the SQL queries and MessageQueue queries. I have considered using LINQ (but have very limited understanding of the technology) and have also attempted an implementation with Predicates which so far is pretty smelly. Are there any patterns for such a problem that I can utilize? Am I going about this the wrong way? Does anyone have an of their own ideas about how I can tackle this problem? Does anyone even understand what I am talking about? :-) Any and ALL input would be highly appreciated and seriously considered… Thanks again.

    Read the article

  • Common practice in handling bounce message

    - by foodil
    At now I mainly create a mail account separately (with different domain name [email protected]) and i add this mail as one return path. So the bounce message will only go to that mailbox and i parse the mail message one by one to check the failure receipent and the error code, then i convert the error code to the actual error message. Finally, the error message and the fail receipent's mail are post to my system and let my system user check the bounce information. Is it a common practice? Since i am worry about the mail other from bounce message have sent to my mail box, that would be a disaster if i parse them without filter them out, but how can i filter out between bounce message and normal mail? Thank you for any kind of help.

    Read the article

  • Advice on Python/Django and message queues

    - by Andy Hume
    I have an application in Django, that needs to send a large number of emails to users in various use cases. I don't want to handle this synchronously within the application for obvious reasons. Has anyone any recommendations for a message queuing server which integrates well with Python, or they have used on a Django project? The rest of my stack is Apache, mod_python, MySQL.

    Read the article

  • scala actor message definition

    - by BenZen
    Do i need to define class for message i want to retrieve on a scala actor? i trying to get this up where am i wrong def act() { loop { react { case Meet = foundMeet = true ; goHome case Feromone(qty) if (foundMeet == true) = sender ! Feromone(qty+1); goHome }}}

    Read the article

  • -[NSConcreteMutableData release]: message sent to deallocated instance

    - by kamibutt
    Dear members, I am facing a problem of -[NSConcreteMutableData release]: message sent to deallocated instance, i have attached my sample code as well. - (IBAction)uploadImage { NSString *urlString = @"http://192.168.1.108/iphoneimages/uploadfile.php?userid=1&charid=23&msgid=3"; //if(FALSE) for (int i=0; i<[imgArray count]; i++) { // setting up the request object now NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init]; [request setURL:[NSURL URLWithString:urlString]]; [request setHTTPMethod:@"POST"]; /* add some header info now we always need a boundary when we post a file also we need to set the content type You might want to generate a random boundary.. this is just the same as my output from wireshark on a valid html post */ NSString *boundary = [NSString stringWithString:@"---------------------------14737809831466499882746641449"]; NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@",boundary]; [request addValue:contentType forHTTPHeaderField: @"Content-Type"]; /* now lets create the body of the post */ NSMutableData *body = [[NSMutableData data] autorelease]; NSString *str = [NSString stringWithFormat:@"Content-Disposition: form-data; name=\"userfile\"; filename=\"ipodfile%d.jpg\"\r\n",i]; [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithString:str] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithString:@"Content-Type: application/octet-stream\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; NSData *imageData = UIImageJPEGRepresentation([imgArray objectAtIndex:i], 90); [body appendData:[NSData dataWithData:imageData]]; [body appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n",boundary] dataUsingEncoding:NSUTF8StringEncoding]]; // setting the body of the post to the reqeust [request setHTTPBody:body]; // now lets make the connection to the web [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil]; //NSString *returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding]; //NSLog(@"%@",returnString); [imageData release]; [request release]; //[body release]; } } It successfully upload the images to the folder and there is no any error in the execution but when it complete it process and try to go back it give error -[NSConcreteMutableData release]: message sent to deallocated instance Please help me out. Thanks

    Read the article

  • get Error Message

    - by pAkY88
    I have two servlet: first servlet is similar to a client and creates an HttpURLConnection to call the second servlet. I would like send a special error, formatted like a JSON object, so I call sendError method in this way: response.sendError(code, "{json-object}") But in the first servlet when I read error with getResponseMessage method I just get standard HTTP message and not my json object as a string. How I can get my json string?

    Read the article

  • jquery validator message styling error in IE08 only when customised using errorPlacement function

    - by John Slaytor
    Going back to the errorplacement solution by Nadia (http://stackoverflow.com/questions/860055/jquery-override-default-validation-error-message-display-css-popup-tooltip-like) I have tried it and it works like a charm in Safari and Firefox but causes IE08 to bypass the jqueryvalidator and go straight to the server side validator. My code is this - as soon as I insert 'error element.... it is unstable in IE08. All help much appreciated <script type="text/javascript"> $(document).ready(function() { $("#sampleform").validate({ rules: { dinername: "required", venue: "required", contact: "required", dinertelephone: "required", venuetime: "required", numberdiners: "required", dineremail: { required: true, email: true}, datepicker: { required: true,date: true} }, messages: { dinername: "Your name?", numberdiners: "How many guests?", dinertelephone: "Your mobile?", venue: "Which restaurant?", venuetime: "Your arrival time?", datepicker: "Your booking date?", dineremail: "Please enter a valid email address", }, errorElement: "div", errorPlacement: function(error, element) { element.before(error); offset = element.offset(); error.css('right', offset.right); error.css('right', offset.right - element.outerHeight()); } }); }); </script> <script type="text/javascript"> $(function() { $("#datepicker") .datepicker({minDate: 0, maxDate: '+6M +0D',dateFormat: 'DD, d M yy',onClose: function() {$(this).valid();} }); }); </script> The relevant webpage is http://www.johnslaytor.com.au/nilgiris/forms/bookingform/bookingform.html

    Read the article

  • Message Driven Bean with Java Message Queue down

    - by Rafa de Castro
    I have the following problem deploying my application. It uses JMS and a remote openMQ for communication between servers. The problem is that the connection is not fully reliable so it can be up or down. For reconnecting I set the jms reconnect glassfish property so it reconnects if at some moment the connection gets lost. The problem arises when i try to deploy the application and there is no connection. It looks like it keeps retrying the connection but the application does not finish deployment until connection is available. Is it possible to configure it in any way that the deployment continues even if there is no connection and keeps retrying until there is connection available? Thanks a lot.

    Read the article

  • Making Firefox render canvas text the same as CSS text

    - by Dan Forys
    I've been experimenting with the canvas tag and Javascript. I've made a page that takes Tweets from the Twitter public timeline and animates them into view. It works by using a canvas element in the background for the animation. When the animation is complete, it creates a div element with the same text over the top. I do this so that the tweet text is selectable and links are clickable. Now, in Safari, Chrome and even Opera, the canvas text and div text look almost exactly the same. Yet in Firefox, the size of the text is different enough to make it 'jump' at the point it changes into the div. Does anyone know how to make Firefox render the text the same on the canvas element and the div using CSS? Or is this a rendering inconsistency with the engine. I have put the page on my website if you want to see what I mean. Now for the code: The CSS I'm using for rendering the div contains: line-height: 21px; font-weight: 100; font-family: Georgia, "New Century Schoolbook", "Nimbus Roman No9 L", serif; font-size: 20px; For rendering on the canvas I'm using: this.context.font = this.scale + 'px Georgia'; this.context.fillStyle = "white"; this.context.strokeStyle = 'white'; this.context.fillText(this.text, 0, 0); this.context.strokeText(this.text, 0, 0); where this.scale is an animated scale factor that finishes at 20px exactly. So, to recap, I'm using the same font and ending up at the same px size, yet Firefox renders the text differently between Canvas and CSS. (edit) Here's a screenshot example: First line is the text animating in using canvas, second line is the resulting div.

    Read the article

  • Looking for a text editor with navigation/categorization

    - by RadGH
    I've been looking for a text editor that automatically (or at least makes it easy to-) make some sort of navigation. Adobe Reader has this functionality with its bookmark system: Right now, though, I'm using Word 2007. For each section, I go Insert Bookmark, highlight the text, copy/paste the text as the link information, and it appears at the top of the document. I've made a macro to add bookmarks easier, but it's still pretty awful, and the bookmarks are still at the top of the page (rather than in the sidebar, where it's always accessible) Honestly, I would just prefer to write it in a PDF like in that screenshot. But any text editor with this type of functionality would work. It just needs basic formatting options, bold/font size, underline, images, maybe tables.

    Read the article

  • Typing the tab character in browser text boxes

    - by Rohit
    A lot of the time, when I want to format text within a web page's text box I'll hit the Tab key. Unfortunately, that doesn't insert the tab character but instead moves the control to the next form element (like a button or a check box). For browsers like Firefox/IE, is there a way to get the formatting behavior of a tab, within a text box, by typing a key combination?

    Read the article

  • Weird characters while merging text files

    - by Mirage
    When i open the text file in windows the text looks fine. But when i use text miler merger software then it shows some weird chinese characters for that files. but i reads ok the files after. how can i make all the files to same encoding so that they appear readable thanks

    Read the article

  • MS Paint: how to enter proper text?

    - by Peter Mortensen
    How do I enter normal text in Microsoft Paint? Normally I don't have any problems adding text to an image in Paint. But I ran into this problem: The text is supposed to be "abcdefd" (entered in a text editor and pasted). The same characters appear if typed directly. So apparently it is using some other character set. How do I restore normal operation? Platform: MS Paint 5.2, Windows XP Professional x64 SP2, 8 GB RAM.

    Read the article

  • Add text to every line in text file using PowerShell

    - by Joshua
    I'd like to add characters to the end of every line of text in a .txt document. #Define Variables $a = c:\foobar.txt $b = get-content $a #Define Functions function append-text { foreach-Object { add "*" } } #Process Code $b | append-text Something like that. Essentially, load a given text file, add a "*" the the end of every single line of text in that text file, save and close.

    Read the article

  • How to columnate text with tabs (in vim or on the shell)

    - by kine
    I have a frequent need to manually manipulate tab-delimited text for data entry and other purposes, and when i do this it helps if the text is aligned properly into columns. For example (assuming 4-space tabs): # original format abcdefghijklmnop field2 abcdefgh field2 abcdefghijkl field2 # ideal format abcdefghijklmnop field2 abcdefgh field2 abcdefghijkl field2 I am very familiar with using the column utility to columnate text this way, but the problem is that it uses spaces to align the columns, and i specifically need tabs. This requirement also appears to rule out the Tabularize plug-in. Is there any way that i can columnate text with tabs specifically, either within vim or at the shell? It looks like i might be able to do it with groff/tbl, but honestly i'd rather columnate it by hand than mess with that....

    Read the article

  • Advanced text search in actionscript-return ALL nouns,adjectives and verbs..

    - by eco_bach
    Hi I know that as3 has some powerful new text search capabilities, especially when combined with regex. I don't even know if this is possible, but I would like to somehow, search any block of text, and return all nouns, adjectives and verbs. What would be the best(most efficent) way to do this? Is regex an option? or would I have to load in some sort of open sourced dictionary 9as used in spellcheckers) to compare with or?? After, I've pulled all the nouns, adjectives and verbs, I need to count and prioritize by their frequency. Any suggestions welcome...

    Read the article

  • The SVG text node disappear after change its text content

    - by sureone
    svg: <text xml:space="preserve" y="228" x="349.98" text-anchor="middle" stroke-width="0" stroke-linejoin="null" stroke-linecap="null" stroke-dasharray="null" stroke="#000000" fill="#000000" style="cursor: move; pointer-events: inherit;" font-size="24" font-family="serif" id="cur_b">cur_b</text> <text xml:space="preserve" y="222" x="103.98" text-anchor="middle" stroke-width="0" stroke-linejoin="null" stroke-linecap="null" stroke-dasharray="null" stroke="#000000" fill="#000000" style="cursor: move; pointer-events: inherit;" font-size="24" font-family="serif" id="cur_a">cur_a</text> <text xml:space="preserve" y="229" x="590.0211" text-anchor="middle" stroke-width="0" stroke-linejoin="null" stroke-linecap="null" stroke-dasharray="null" stroke="#000000" fill="#000000" style="cursor: move; pointer-events: inherit;" font-size="24" font-family="serif" id="cur_c">cur_c</text> NSString* theJS = @ "var theNode0 = document.getElementById('cur_a'); theNode0.textContent='200A'; theNode0.setAttribute('fill','#FF0000'); var theNode1 = document.getElementById('cur_c'); theNode1.textContent='200A'; theNode1.setAttribute('fill','#00FF00');" [self.webView stringByEvaluatingJavaScriptFromString:theJS]; The SVG text node value is changed but disappeared after about one second.

    Read the article

  • Rendering Text with the HTML5 Canvas

    - by dwahlin
    In a previous post I walked through the fundamentals of rendering shapes such as squares and circles using the HTML5 Canvas API. In this post I’ll provide a simple example of rendering and rotating text. To render text you can use the fillText() or strokeText() functions which take the text to render as well as the x and y coordinates of where to render it. To rotate text you can use the transform functions available with the HTML5 Canvas such as save(), rotate(), and restore(). To run the live demos that follow click the Result tab in the blue bar of each demo.   Rendering Text This example provides a simple look at how text can be rendered using the HTML5 Canvas. It iterates through a loop, updates the text and font size dynamically, measures the width of the text using the measureText() function, and then calls fillText() to render the text with the desired font size to the screen.   Here’s what the code above renders:   Rotating Text This example shows how text can be rendered and even rotated by using transform functions built into the HTML5 Canvas. The code starts by rendering text the standard way using fillText(). It then saves the state of the canvas performs an x,y coordinate transform (moves to 100, 300 respectively) and then rotates the canvas –90 degrees using the rotate() function. After the text is rendered, the canvas is reverted back to it’s existing state (saved by calling the save() function) by calling the restore() function. An additional line of text is then rendered.   Here’s what the code above renders:   If you’re interested in learning more about the HTML5 Canvas and how it can be used in your Web or Windows 8 applications, check out my HTML5 Canvas Fundamentals course from Pluralsight.

    Read the article

  • SharePoint SPListItem.ContentType.Name - "Message" vs "Discussion" ?

    - by Christopher
    I am writing a C# code to find all of our SharePoint Sites that have emails contained in the Email List page. It appears that some of our email messages are SPListItem.ContentType.Name = "Message" and some of our email messages are SPListItem.ContentType.Name = "Discussion" Aside from the confusion, this is forcing my to cycle through mylist.Folders and mylist.Items in two separate loops, so that I don't miss any of the emails. Is this normal? Any idea why this could be happening? There are threads that contains messages of both types.

    Read the article

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