Search Results

Search found 31717 results on 1269 pages for 'response write'.

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

  • Mirth: Transforming a response message in a separate Channel and returning it to original channel

    - by Ryan H
    I have a channel that takes HL7v2 message and converts it to HL7v3. It invokes a SOAP web service and receives a response in HL7v3. I need to convert that response back to HL7v2. Currently: I "Send Response to:" my second channel. That can convert it fine back to HL7v2, but it doesn't seem to return a response message. I want that second transformation to be the response to the initiator which is an LLP Listener.

    Read the article

  • Some questions about writing on ASP.NET response stream

    - by vtortola
    Hi, I'm making tests with ASP.NET HttpHandler for download a file writting directly on the response stream, and I'm not pretty sure about the way I'm doing it. This is a example method, in the future the file could be stored in a BLOB in the database: public void GetFile(HttpResponse response) { String fileName = "example.iso"; response.ClearHeaders(); response.ClearContent(); response.ContentType = "application/octet-stream"; response.AppendHeader("Content-Disposition", "attachment; filename=" + fileName); using (FileStream fs = new FileStream(Path.Combine(HttpContext.Current.Server.MapPath("~/App_Data"), fileName), FileMode.Open)) { Byte[] buffer = new Byte[4096]; Int32 readed = 0; while ((readed = fs.Read(buffer, 0, buffer.Length)) > 0) { response.OutputStream.Write(buffer, 0, readed); response.Flush(); } } } But, I'm not sure if this is correct or there is a better way to do it. My questions are: When I open the url with the browser, appears the "Save File" dialog... but it seems like the server has started already to push data into the stream before I click "Save", is that normal? If I remove the line"response.Flush()", when I open the url with the browser, ... I see how the web server is pushing data but the "Save File" dialog doesn't come up, (or at least not in a reasonable time fashion) why? When I open the url with a WebRequest object, I see that the HttpResponse.ContentLength is "-1", although I can read the stream and get the file. What is the meaning of -1? When is HttpResponse.ContentLength going to show the length of the response? For example, I have a method that retrieves a big xml compresed with deflate as a binary stream, but in that case... when I access it with a WebRequest, in the HttpResponse I can actually see the ContentLength with the length of the stream, why? What is the optimal length for the Byte[] array that I use as buffer for optimal performance in a web server? I've read that is between 4K and 8K... but which factors should I consider to make the correct decision. Does this method bloat the IIS or client memory usage? or is it actually buffering the transference correctly? Sorry for so many questions, I'm pretty new in web development :P Cheers.

    Read the article

  • Help create a unit test for test response header, specifically Cache-Control, in determining if cach

    - by VajNyiaj
    Scenario: I have a base controller which disables caching within the OnActionExecuting override. protected override void OnActionExecuting(ActionExecutingContext filterContext) { filterContext.HttpContext.Response.Cache.SetExpires(DateTime.UtcNow.AddDays(-1)); filterContext.HttpContext.Response.Cache.SetValidUntilExpires(false); filterContext.HttpContext.Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches); filterContext.HttpContext.Response.Cache.SetCacheability(HttpCacheability.NoCache); //IE filterContext.HttpContext.Response.Cache.SetNoStore(); //FireFox } How can I create a Unit Test to test this behavior?

    Read the article

  • Read from one large file and write to many (tens, hundreds, or thousands) files in Java?

    - by Rudiger
    I have a large-ish file (4-5 GB compressed) of small messages that I wish to parse into approximately 6,000 files by message type. Messages are small; anywhere from 5 to 50 bytes depending on the type. Each message starts with a fixed-size type field (a 6-byte key). If I read a message of type '000001', I want to write append its payload to 000001.dat, etc. The input file contains a mixture of messages; I want N homogeneous output files, where each output file contains only the messages of a given type. What's an efficient a fast way of writing these messages to so many individual files? I'd like to use as much memory and processing power to get it done as fast as possible. I can write compressed or uncompressed files to the disk. I'm thinking of using a hashmap with a message type key and an outputstream value, but I'm sure there's a better way to do it. Thanks!

    Read the article

  • Having dynamic javascript on the same page as response.BinaryWrite

    - by nilesh
    Hi All, I am display a pdf document on page using response.binarywrite i.e Response.ClearHeaders() Response.ClearContent() Response.ContentType = "application/pdf" Response.BinaryWrite(result) need to call some javascript function to open up the print dialog after the pdf is loaded. is it possible Please let me know if someone knows how to achieve this ? regards Nilesh

    Read the article

  • System response times --- A good Service Level Agreement?

    - by mpeterson
    In order to view system performance, I have been asked by management to give page response times for a few key pages. I want to make sure I am giving a good picture of the overall health of the system, and not just narrowing in on a single measurement. So my question is: When developing software, what metrics would you provide to your stakeholders to indicate a system that is healthy and running well? (if it is not running well, that should also be evident! Not trying to hide/obscure any problems.)

    Read the article

  • XNA 2D Rotated Rectangle Collision Response

    - by Kyle Uithoven
    I am using Rotated Rectangles which collide using the Separating Axis Theorem and they work perfectly fine for collision detection using Intersects and Contains. However, I am starting to use faster objects in my game now and there is the issue of the two object overlapping during collision due to their higher velocities. I would like to do a collision response where I find out how much they are overlapping in the X and Y and put position them outside of each other. I would like to use something like this: http://go.colorize.net/xna/2d_collision_response_xna/index.html. But I am having some issues trying to adapt this to handle the rotation of the bounds. Is this possible? Are there any resources out there that I can look at?

    Read the article

  • using per pixel collision for an elastic response

    - by Codejoy
    I realize this might be open ended ended but curious if I just did some over kill... I had this http://create.msdn.com/en-US/education/catalog/tutorial/collision_2d_perpixel and i reworked it to work with my animation code in XNA and what not. It works well, but now I want to use this to decide if there was a collision and to have the items (characters) bounce off eachother elastically. Was the per pixel too much and I could of just used a bounding box ? (in fact would that of been preferred for what needs to be calculated in the response for an elastic collision?) Looking for guidance really.

    Read the article

  • How to open textfile and write to it append-style with php?

    - by Chris_45
    How do you open a textfile and write to it with php appendstyle textFile.txt //caught these variables $var1 = $_POST['string1']; $var2 = $_POST['string2']; $var3 = $_POST['string3']; $handle = fopen("textFile.txt", "w"); fwrite = ("%s %s %s\n", $var1, $var2, $var3, handle);//not the way to append to textfile fclose($handle);

    Read the article

  • Cannot write to Folder mounted with SSHFS

    - by JM at Work
    I just created a folder according to SSHFS (Ubuntu Docs) sudo apt-get install sshfs sudo gpasswd -a jm fuse sshfs -o idmap=user [email protected]:/path/to/folder folder Then I found that the folder is mounted, but I cannot write to it. The permissions seems fine http://pastie.org/1969299 But I even tried with chmod -R 777 ./folder Still no go UPDATE: It seems I can't write using NetBeans only. But it works with LeafPad for example

    Read the article

  • Give write access to USB and Serial devices automatically

    - by Saeid87
    I am working with some USB and Serial micro-controllers. Everytime I plug a device I have to do the following command to give it write access, and also my password: sudo chmod 666 /dev/ttyUSB0 Can I set my Ubuntu to automatically give write access to pluged in devices? If not, how can I make a batch file that I can easily give the access to port I want for example if I run the following command it does the job: giveaccess -usb0

    Read the article

  • Motivating yourself to actually write the code after you've designed something

    - by dpb
    Does it happen only to me or is this familiar to you too? It's like this: You have to create something; a module, a feature, an entire application... whatever. It is something interesting that you have never done before, it is challenging. So you start to think how you are going to do it. You draw some sketches. You write some prototypes to test your ideas. You are putting different pieces together to get the complete view. You finally end up with a design that you like, something that is simple, clear to everybody, easy maintainable... you name it. You covered every base, you thought of everything. You know that you are going to have this class and that file and that database schema. Configure this here, adapt this other thingy there etc. But now, after everything is settled, you have to sit down and actually write the code for it. And is not challenging anymore.... Been there, done that! Writing the code now is just "formalities" and makes it look like re-iterating what you've just finished. At my previous job I sometimes got away with it because someone else did the coding based on my specifications, but at my new gig I'm in charge of the entire process so I have to do this too ('cause I get payed to do it). But I have a pet project I'm working on at home, after work and there is just me and no one is paying me to do it. I do the creative work and then when time comes to write it down I just don't feel like it (lets browse the web a little, see what's new on P.SE, on SO etc). I just want to move to the next challenging thing, and then to the next, and the next... Does this happen to you too? How do you deal with it? How do you convince yourself to go in and write the freaking code? I'll take any answer.

    Read the article

  • Write Your Own Microsoft Expression Blend 3 Addin

    Although there have been numerous articles introducing how to write a Microsoft Expression blend 2 addin, the Microsoft Expression blend 3/4 related ones are few. In this article, you will learn what a Microsoft Expression blend addin is and command the common routine to write an Addin. Finally, you will master the inner workings of the addin through a concrete sample application.

    Read the article

  • Is a 1:* write:read thread system safe?

    - by Di-0xide
    Theoretically, thread-safe code should fix race conditions. Race conditions, as I understand it, occur because two threads attempt to write to the same location at the same time. However, what about a threading model in which a single thread is designed to write to a location, and several slave/worker threads simply read from the location? Assuming the value/timing at which they read the data isn't relevant/doesn't hinder the worker thread's outcome, wouldn't this be considered 'thread safe', or am I missing something in my logic?

    Read the article

  • how to get a udp response with netcat

    - by dihlofos
    Hi, everyone I'm trying to do something like: echo "request" | nc -u 1.1.1.1 9999 > response.txt I can see that response is comming from server (with tcpdump) after executing this line. However, my response.txt stays empty. Is there a way to get it? Thanks in advance

    Read the article

  • Why doesn't the monitor output anything in Linux console mode?

    - by flypen
    I install Linux without graphics support. Previously I used a monitor with 720p support. And it can display normally. Now I change to a monitor with 1080p support. I can see BIOS and GRUB info on monitor, and kernel messages in early stages. However, the monitor says that there is no input immediately, and then I can't see anything again. It seems that it happens after something initializes. Is it related to vesafb? vesafb: mode is 1280x1024x32, linelength=5120, pages=0 vesafb: scrolling: redraw vesafb: Truecolor: size=8:8:8:8, shift=24:16:8:0 mtrr: type mismatch for 7f800000,800000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,400000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,200000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,100000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,80000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,40000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,20000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,10000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,8000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,4000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,2000 old: write-back new: write-combining mtrr: type mismatch for 7f800000,1000 old: write-back new: write-combining vesafb: framebuffer at 0x7f800000, mapped to 0xffffc90011380000, using 5120k, total 5120k Console: switching to colour frame buffer device 160x64 fb0: VESA VGA frame buffer device

    Read the article

  • Unable to Get IIS Response Times with Hyperic Monitoring Tool

    - by jwmajors81
    We have a very large .NET application (vendor) that I am trying to gather performance metrics for using Hyperic. In general I wanted to be able to report response times for each of the components within the application, which include: Web Services ASP.NET Pages MSMQ I am currently unable to successfully monitor the response times for IIS on my windows machines. I have successfully auto-discovered them and I am getting diagnostic information, but am not getting back the response times. After looking online at what other people are seeing, I found that I am missing a tab for the response times which is usually next to the metrics tab. Also, when I look at the configuration screen for IIS I do not see a field which enables me to specify where the log files are located at. Please note that my logs are located at e:\LogFiles\ instead of the usual location because our IT staff doesn't allocate much space for the C: drive. Please note that I have the MSMQ monitors up and running great. Any assistance would be greatly appreciated. Thanks, Jeremy

    Read the article

  • How can I optimize my ajax calls to deliver at 60ms.

    - by Quintin Par
    I am building an autocomplete functionality for my site and the Google instant results are my benchmark. When I look at Google, the 50-60 ms response time baffle me. They look insane. In comparison here’s how mine looks like. To give you an idea my results are cached on the load balancer and served from a machine that has httpd slowstart and initcwnd fixed. My site is also behind cloudflare From a server side perspective I don’t think I can do anything more. Can someone help me take this 500 ms response time to 60ms? What more should I be doing to achieve Google level performance? Edit: People, you seemed to be angry that I did a comparison to Google and the question is very generic. Sorry about that. To rephrase: How can I bring down response time from 500 ms to 60 ms provided my server response time is just a fraction of ms. Assume the results are served from Nginx - Varnish with a cache hit. Here are some answers I would like to answer myself assume the response sizes remained more or less the same. Ensure results are http compressed Ensure SPDY if you are on https Ensure you have initcwnd set to 10 and disable slow start on linux machines. Etc. I don’t think I’ll end up with 60 ms at Google level but your collective expertise can help easily shave off a 100 ms and that’s a big win.

    Read the article

  • adding response header to Jetty config file

    - by Sam007
    I am trying to add a response header to the Jetty configuration the following command, Access-Control-Allow-Origin: * Ok so this Jetty webserver is the base on which Geoserver is running. I asked this question in the GIS forum but no one was able to answer it so I felt I might get the answer here. I wish to add this response to the header to remove the error Unable to load XMLHttpRequest I wish to know that under which tags should I wrap this response header and where in the file should I save it.

    Read the article

  • Issues writing to serial port on MAC OSX using unistd.h in c

    - by Schuyler
    I am trying to write to a bluetooth device on MAC OSX using the unistd.h Linux functions in c. I am connecting fine and writing the first few bytes with success. When I try to write other commands to it (there are bytes added to the write buffer every 15ms), I don't see any results even though the write() function returns 1 (write success). If you start a write and it doesn't finish by the time you try to start another write (since it is non-blocking), could that possibly screw up the initial write? (If so, is there any way to check if a write has completed?) That is the only thing I can think of since the writes are occurring fairly frequently and the first two are successfully sent. qwbyte() simply adds a byte to the output array and increments its length The open port function: BAMid = -1; struct termios options; struct termios originalTTYAttrs; // Open the serial port read/write, nonblocking, with no controlling terminal, and don't wait for a connection. BAMid = open(strPath, O_RDWR | O_NOCTTY | O_NONBLOCK); if (BAMid == -1) { printf("Error opening serial port %s - %s(%d).\n", strPath, strerror(errno), errno); goto error; } // Issue TIOCEXCL ioctl to prevent additional opens except by root-owned processes. if (ioctl(BAMid, TIOCEXCL) == -1) { printf("Error setting TIOCEXCL on %s - %s(%d).\n", strPath, strerror(errno), errno); goto error; } // Get the current options and save them so we can restore the default settings later. if (tcgetattr(BAMid, &originalTTYAttrs) == -1) { printf("Error getting tty attributes %s - %s(%d).\n", strPath, strerror(errno), errno); goto error; } // The serial port attributes such as timeouts and baud rate are set by modifying the termios // structure and then calling tcsetattr() to cause the changes to take effect. Note that the // changes will not become effective without the tcsetattr() call. options = originalTTYAttrs; // Set raw input (non-canonical) mode, with reads blocking until either a single character // has been received or a one second timeout expires. [should be moot since we are leaving it as nonblocking] cfmakeraw(&options); options.c_cc[VMIN] = 1; options.c_cc[VTIME] = 10; cfsetspeed(&options, B57600); // Set 57600 baud options.c_cflag |= CS8; // Use 8 bit words // Cause the new options to take effect immediately. if (tcsetattr(BAMid, TCSANOW, &options) == -1) { printf("Error setting tty attributes %s - %s(%d).\n", strPath, strerror(errno), errno); goto error; } //flush old transmissions if (tcflush(BAMid,TCIOFLUSH) == -1) { printf("Error flushing BAM serial port - %s(%d).\n", strerror(errno), errno); } oBufLength = 0; // Ask it to start if (! qwbyte(CmdStart) ) { goto error; } if (! qwbyte(CmdFull) ) { goto error; } //this transmit works txbytes(); printf("success opening port!"); return -1; // Failure path error: if (BAMid != -1) { close(BAMid); } printf("returning an error--%d",errno); return errno; } The write function (txbytes): int i, bufSize, numBytes; if(oBufLength != 0) { //if the output array isn't empty //duplicating the output array and its size so it can //be overwritten while this write is occuring printf("about to transmit: "); for(i = 0; i < oBufLength; i++) { printf(" %u",oBuf[i]); tempBuf[i] = oBuf[i]; } printf("\n"); bufSize = oBufLength; oBufLength = 0; numBytes = write(BAMid, &tempBuf, bufSize); printf("bytes written = %d\n",numBytes); if (numBytes == -1) { printf("Error writing to port - %s(%d).\n", strerror(errno), errno); } return (numBytes 0); } else { return 0; }

    Read the article

  • How to write a file that called from a database on a page?

    - by Mehmet Kaleli
    Hi. I have a "news" page that belongs to a company. All news have a header, detail and html page and they come from database. So i have to print those html pages in a repeater on my "news.aspx". But i couldnt write dynamically. How can i do it or is there anyway else? <asp:Repeater ID="news" runat="server" OnItemDataBound="news_OnItemDataBound"> <ItemTemplate> <asp:HiddenField ID="newsid" runat="server" Value='<%#DataBinder.Eval(Container.DataItem,"newsid") %>' /> <tr> <td class="haberler-sayfasi-habermetni" style="width:580px;padding-bottom:30px;"> <h1 class="haberler-sayfasi-haberbasligi" style="background-image:url(images/haber-ikon.jpg); background-repeat:no-repeat;padding-left:25px;"> <%#DataBinder.Eval(Container.DataItem,"newsheader") %>/h1> <br /> <%#DataBinder.Eval(Container.DataItem,"newsspot") %> <br /><br /> <% **Response.WriteFile('dynamical filename with path');** %> </td> </tr> </ItemTemplate> </asp:Repeater>

    Read the article

  • Unauthorized response from Server with API upload

    - by Ethan Shafer
    I'm writing a library in C# to help me develop a Windows application. The library uses the Ubuntu One API. I am able to authenticate and can even make requests to get the Quota (access to Account Admin API) and Volumes (so I know I have access to the Files API at least) Here's what I have as my Upload code: public static void UploadFile(string filename, string filepath) { FileStream file = File.OpenRead(filepath); byte[] bytes = new byte[file.Length]; file.Read(bytes, 0, (int)file.Length); RestClient client = UbuntuOneClients.FilesClient(); RestRequest request = UbuntuOneRequests.BaseRequest(Method.PUT); request.Resource = "/content/~/Ubuntu One/" + filename; request.AddHeader("Content-Length", bytes.Length.ToString()); request.AddParameter("body", bytes, ParameterType.RequestBody); client.ExecuteAsync(request, webResponse => UploadComplete(webResponse)); } Every time I send the request I get an "Unauthorized" response from the server. For now the "/content/~/Ubuntu One/" is hardcoded, but I checked and it is the location of my root volume. Is there anything that I'm missing? UbuntuOneClients.FilesClient() starts the url with "https://files.one.ubuntu.com" UbuntuOneRequests.BaseRequest(Method.{}) is the same requests that I use to send my Quota and Volumes requests, basically just provides all of the parameters needed to authenticate. EDIT:: Here's the BaseRequest() method: public static RestRequest BaseRequest(Method method) { RestRequest request = new RestRequest(method); request.OnBeforeDeserialization = resp => { resp.ContentType = "application/json"; }; request.AddParameter("realm", ""); request.AddParameter("oauth_version", "1.0"); request.AddParameter("oauth_nonce", Guid.NewGuid().ToString()); request.AddParameter("oauth_timestamp", DateTime.Now.ToString()); request.AddParameter("oauth_consumer_key", UbuntuOneRefreshInfo.UbuntuOneInfo.ConsumerKey); request.AddParameter("oauth_token", UbuntuOneRefreshInfo.UbuntuOneInfo.Token); request.AddParameter("oauth_signature_method", "PLAINTEXT"); request.AddParameter("oauth_signature", UbuntuOneRefreshInfo.UbuntuOneInfo.Signature); //request.AddParameter("method", method.ToString()); return request; } and the FilesClient() method: public static RestClient FilesClient() { return (new RestClient("https://files.one.ubuntu.com")); }

    Read the article

  • Client-Server connection response timeout issues

    - by Srikar
    User creates a folder in client and in the client-side code I hit an API to the server to make this persistent for that user. But in some cases, my server is so busy that the request timesout. The server has executed my request but timedout before sending a response back to client. The timeout set is 10 seconds in client. At this point the client thinks that server has not executed its request (of creating a folder) and ends up sending it again. Now I have 2 folders on the server but the user has created only 1 folder in the client. How to prevent this? One of the ways to solve this is to use a unique ID with each new request. So the ID acts as a distinguisher between old and new requests from client. But this leads to storing these IDs on my server and do a lookup for each API call which I want to avoid. Other way is to increase the timeout duration. But I dont want to change this from 10 seconds. Something tells me that there are better solutions. I have posted this question in stackoverflow but I think its better suited here. UPDATE: I will make my problem even more explicit. The client is a webbrowser and the server is running nginx+django+mysql (standard stack). The user creates a folder in webbrowser. As a result I need to hit a server API. The API call responds back, thereby client knows API call was success. This is normal scenario. Sometimes though, server successfully completes the API request but the client-side (webbrowser) connection timesout before server can respond back. The client has no clue at this point. The user thinks the request was a fail & clicks again. This time it was a success but when the UI refreshes he sees 2 folders. I want to remedy this situation.

    Read the article

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