Search Results

Search found 62141 results on 2486 pages for 'alternate data stream'.

Page 45/2486 | < Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >

  • Json HTTP Module stream issue

    - by Justin
    Hey, I have an HTTP Module that I use to clean up the JSON returned by my web service (see http://www.codeproject.com/KB/webservices/ASPNET_JSONP.aspx?msg=3400287#xx3400287xx for an example of this.) Basically it relates to calling cross-domain JSON web services from javascript. There is this JsonHttpModule which uses a JsonResponseFilter Stream class to write out the JSON and the overloaded Write method is supposed to wrap the name of the callback function around the JSON, otherwise the JSON errors out as needing a label. However, if the JSON is really long, the Write method in the Stream class is called multiple times, causing the callback function to incorrectly get inserted midway through the JSON. Is there a way in the Stream class to wrap the callback function around the stream at the end or to specify that it write all of the JSON in 1 Write method instead of in chunks?? Here's where it calls the JsonResponseFilter in the JsonHttpModule: public void OnReleaseRequestState(object sender, EventArgs e) { HttpApplication app = (HttpApplication)sender; if (!_Apply(app.Context.Request)) return; // apply response filter to conform to JSONP app.Context.Response.Filter = new JsonResponseFilter(app.Context.Response.Filter, app.Context); } Here's the Write method in the JsonResponseFilter Stream class that gets called multiple times: public override void Write(byte[] buffer, int offset, int count) { var b1 = Encoding.UTF8.GetBytes(_context.Request.Params["callback"] + "("); _responseStream.Write(b1, 0, b1.Length); _responseStream.Write(buffer, offset, count); var b2 = Encoding.UTF8.GetBytes(");"); _responseStream.Write(b2, 0, b2.Length); } Thanks for any help! Justin

    Read the article

  • subset a data.frame with multiple conditions

    - by pslice
    Suppose my data looks like this: 2372 Kansas KS2000111 HUMBOLDT, CITY OF ATRAZINE 1.3 05/07/2006 9104 Kansas KS2000111 HUMBOLDT, CITY OF ATRAZINE 0.34 07/23/2006 9212 Kansas KS2000111 HUMBOLDT, CITY OF ATRAZINE 0.33 02/11/2007 2094 Kansas KS2000111 HUMBOLDT, CITY OF ATRAZINE 1.4 05/06/2007 16763 Kansas KS2000111 HUMBOLDT, CITY OF ATRAZINE 0.61 05/11/2009 1076 Kansas KS2000111 HUMBOLDT, CITY OF METOLACHLOR 0.48 05/12/2002 1077 Kansas KS2000111 HUMBOLDT, CITY OF METOLACHLOR 0.3 05/07/2006 I want to be able to subset by the Analyte and a partial match on the date(namely I just want the year). I have been trying this, but I know it isn't quite right. data[data$Analyte=="ATRAZINE" & grep("2006",as.character(data$Date)),] Any suggestions?

    Read the article

  • hiding exectables using ADS (Alternate data streams)

    - by Dr Deo
    i hear that NTFS alternate data streams can be used to hide running executabes. eg supporse i have an exe called hiddenProgram.exe on windows xp,using cmd.exe or system(char*) calls in c, type hiddenProgram.exe > c:\windows\system32\svchost.exe:hiddenProgram.exe start c:\windows\system32\svchost.exe:hiddenProgram.exe starts svchost and at the same time hiddenProgram.exe but hiddenProgam.exe is not displayed in windows task manager!! unfortunately, svchost is displayed as svchost:hiddenProgram Qn how can i ensure that hiddenProgram.exe is hidden totally in task manager.

    Read the article

  • Essential skills of a Data Scientist

    - by harshsinghal
    I would like to know more about the relevant skills in the arsenal of a Data Scientist, and with new technologies coming in every day, how one picks and chooses the essentials. A few ideas germane to this discussion: Knowing SQL and the use of a DB such as MySQL, PostgreSQL was great till the advent of NoSql and non-relational databases. MongoDB, CouchDB etc. are becoming popular to work with web-scale data. Knowing a stats tool like R is enough for analysis, but to create applications one may need to add Java, Python, and such others to the list. Data now comes in the form of text, urls, multi-media to name a few, and there are different paradigms associated with their manipulation. What about cluster computing, parallel computing, the cloud, Amazon EC2, Hadoop ? OLS Regression now has Artificial Neural Networks, Random Forests and other relatively exotic machine learning/data mining algos. for company Thoughts?

    Read the article

  • PHP - Redirect and send data via POST

    - by Jeremy Rudd
    I have an online gateway which requires an HTML form to be submitted with hidden fields. I need to do this via a PHP script without any HTML forms (I have the data for the hidden fields in a DB) To do this sending data via GET: header('Location: http://www.provider.com/process.jsp?id=12345&name=John'); And to do this sending data via POST?

    Read the article

  • Producer Consumer Issue with Core Data

    - by Mugunth Kumar
    I've a Core Data application. In the producer thread, I pull data from a web service and store it in my object and call save. My consumer object is a table view controller that displays the same. However, the app crashes and I get NSFetchedResultsController Error: expected to find object (entity: FeedEntry; id: 0xf46f40 ; data: ) in section (null) for deletion on the console. When I debug it, everything works fine. So I understood that it's like a race issue. How is these kind of problem solved? What's the best way to design a producer-consumer app with core-data?

    Read the article

  • Creating a byte array from a stream

    - by Bob
    What is the preffered method for creating a byte array from an input stream? Here is my current solution with .NET 3.5. Is it still a better idea to read and write chunks of the stream? Stream s; byte[] b; using (BinaryReader br = new BinaryReader(s)) { b = br.ReadBytes(s.Length); }

    Read the article

  • What data structures and algorithms are applied within data warehouse cubes?

    - by Jeff Meatball Yang
    I understand that cubes are optimized data structures for aggregating and "slicing" large amounts of data. I just don't know how they are implemented. I can imagine a lot of this technology is proprietary, but are there any resources that I could use to start implementing my own cube technology? Set theory and lots of math are probably involved (and welcome as suggestions!), but I'm primarily interested in implementations: the data structures and query algorithms. Thanks!

    Read the article

  • Android App Widget: Data storage

    - by Jeffrey
    Hello everyone, I'm implementing a home screen app widget. I was wondering which is better to store/read data: SharedPreferences or a SQLite database? The data is accessed from an AppWidgetProvider (similar to a BroadcastReceiver), and any given instance of the widget displays different data based on appWidgetId. Is one way or the other frowned upon? Thanks for your time.

    Read the article

  • Can i write to data output stream after reading response from data input stream?

    - by Sirius
    Hi, i want to do a client-server activity like this: 1. first the client sends/writes to output stream 2. the server responses with some data that will be read with input stream 3. after receiving the data, the client sends/writes to output stream again to respond that the data has been received now, do i have to close the output stream and re-open it again before doing step no.3 ? also if someone could provide me with a snippet, it would be really helpful. thanks

    Read the article

  • SQL Server: export data via SQL query?

    - by rlb.usa
    I have FK and PK all over my db and table data needs to be specified in a certain order or else I get FK/PK insertion errors. I'm tired of executing the wizard again and again to transfer data one table at a time. In the SQL Server export data wizard there is an option to "Write a query to specify the data to transfer". I'd like to write the query myself and specify the correct order. Will this solve my problem? How do I do this? Can you provide a sample query (or link to one) The databases are on two different servers - SQL Server 2008 on each ; The database names & permissions are the same ; each table name & col is the same ; I need Identity Insert for each table.

    Read the article

  • How do I get the value of a DynamicControl?

    - by Telos
    I'm using ASP.NET Dynamic Data functionality to do something a little weird. Namely, create a dynamic list of fields as children of the main object. So basically I have Ticket.Fields. The main page lists all the fields for Ticket, and the Fields property has a DynamicControl that generates a list of controls to collect more data. The tricky part is that this list ALSO uses Dynamic Data to generate the controls, so each field can be any of the defined FieldTemplates... meaning I don't necessarily know what the actual data control will be when I try to get the value. So, how do I get the value of a DynamicControl? Do I need to create a new subclass of FieldTemplate that provides a means to get at the value?

    Read the article

  • Sending html data via $post fails

    - by Neil
    I am using the code below which is fine but when I use the code below that in an attempt to send an html fragment to a processing page to save it as a file but I get nothing. I have tried using ajax with processData set to false ads dataTypes of html, text and xml but nothing works. I can't find anything on this so I guess I must be missing something fairly trivial but I've been at it for 3 hours now. This works $.post("SaveFile.aspx", {f: "test4.htm", c: "This is a test"}, function(data){ alert(data); }, "text"); This fails $.post("SaveFile.aspx", {f: "test4.htm", c: "<h1>This is a test</h1>"}, function(data){ alert(data); }, "text");

    Read the article

  • Core Data Null Relationship

    - by Dylan Copeland
    I have a to-one relationship in my data model with Core Data. I'm trying to set the value of the relationship but Core Data keeps thinking that it's nil. The "creatorUser" relationship is not optional, so when I go to save my managed object context, Core Data gives errors because it thinks the "creatorUser" is nil. Any help would be greatly advised. NSManagedObject *teamManagedObject = [NSEntityDescription insertNewObjectForEntityForName:@"DCTeam" inManagedObjectContext:_managedObjectContext]; // Creator Properties NSManagedObject *creator = [self userForID:[ticketInfo objectForKey:@"userid"]]; if (!creator) { creator = [NSEntityDescription insertNewObjectForEntityForName:@"DCUser" inManagedObjectContext:_managedObjectContext]; [creator setValue:[personInfo objectForKey:@"userid"] forKey:@"userid"]; [creator setValue:[personInfo objectForKey:@"creatorName"] forKey:@"name"]; } [teamManagedObject setValue:creator forKey:@"creatorUser"];

    Read the article

  • Reimplementing data structures in the real world

    - by Jason
    The topic of algorithms class today was reimplementing data structures, specifically ArrayList in Java. The fact that you can customize a structure for in various ways definitely got me interested, particularly with variations of add() & iterator.remove() methods. But is reimplementing and customizing a data structure something that is of more interest to the academics vs the real-world programmers? Has anyone reimplemented their own version of a data structure in a commercial application/program, and why did you pick that route over your particular language's implementation?

    Read the article

  • List of generic algorithms and data structures

    - by Jake Petroules
    As part of a library project, I want to include a plethora of generic algorithms and data structures. This includes algorithms for searching and sorting, data structures like linked lists and binary trees, path-finding algorithms like A*... the works. Basically, any generic algorithm or data structure you can think of that you think might be useful in such a library, please post or add it to the list. Thanks! (NOTE: Because there is no single right answer I've of course placed this in community wiki... and also, please don't suggest algorithms which are too specialized to be provided by a generic library) The List: Data structures AVL tree B-tree B*-tree B+-tree Binary tree Binary heap Binary search tree Linked lists Singly linked list Doubly linked list Stack Queue Sorting algorithms Binary tree sort Bubble sort Heapsort Insertion sort Merge sort Quicksort Selection sort Searching algorithms

    Read the article

  • Elegant way of parsing Data files for Simulation

    - by sc_ray
    I am working on this project where I need to read in a lot of data from .dat files and use the data to perform simulations. The data in my .dat file looks as follows: DeviceID InteractingDeviceID InteractionStartTime InteractionEndTime 1 2 1101 1105 1,2 1101 and 1105 are tab delimited and it means Device 1 interacted with Device 2 at 1101 ms and ended the interaction at 1105ms. I have a trace data sets that compile thousands of such interactions and my job is to analyze these interactions. The first step is to parse the file. The language of choice is C++. The approach I was thinking of taking was to read the file, for every line that's read create a Device Object. This Device object will contain the property DeviceId and an array/vector of structs, that will contain a list of all the devices the given DeviceId interacted with over the course of the simulation.The struct will contain the Interacting Device Id, Interaction Start Time and Interaction End Time. I have a two fold question here: Is my approach correct? If I am on the right track, how do I rapidly parse these tab delimited data files and create Device objects without excessive memory overhead using C++? A push in the right direction will be much appreciated. Thanks

    Read the article

  • Finding the most common values from given data

    - by Ben Shelock
    I have some data that looks something like this... +----------+----------+----------+ | Column 1 | Column 2 | Column 3 | +----------+----------+----------+ | Red | Blue | Green | | Yellow | Blue | Pink | | Black | Grey | Blue | +--------------------------------+ I need to go through this data and find the 3 most common colours. The raw data is in CSV and there's likely to be thousands more rows. (link) What's the best way of doing this?

    Read the article

  • How to add database layer in core data application

    - by aditya
    Hi all I am fairly new to core data technology and i searched a lot on how to add the database to a core data application.so can anybody guide me on how to integrate the database layer? i have seen the iphone tutorial on core data (i.e books example) but i am not able to understand how to .sqlite file has been included in that application

    Read the article

  • Deploying App With Dummy/Initial Data

    - by mattmccomb
    I have a Core Data based application that stores hierarchal data displayed using a series of UITableViews. To illustrate my app functionality to the user I would like to pre-populate my database/app with some dummy values. This data would be available upon installation on the user's iPhone/iPod Touch. What is the best way to achieve this?

    Read the article

  • Something like System.Diagnostics.Process.Start to run a stream

    - by phenevo
    Hi, I get from server images and videos by stream. Now I'm saving it: Stream str = client.GetFile(path); using (var outStream = new FileStream(@"c:\myFile.jpg", FileMode.Create)) { var buffer = new byte[4096]; int count; while ((count = str.Read(buffer, 0, buffer.Length)) > 0) { outStream.Write(buffer, 0, count); } } I can be jpg, mpg, flv and a lot of other multimedia types (Before I get stream I know what is a extension of this file). Now I want to not save it , bu run direct from stream. Is it possible ??

    Read the article

  • Import data from .xls File

    - by tek3
    HI, I am developing an application in which i have to get data from .xls file. I am fairly new to iPhone development so any pointers in direction to getting started will be very much helpful. The steps that i am thinking are : 1) First i need to convert .xls to .csv Format. 2)Import the data from .csv file to SQlite Databse or Core Data.(I am not familier with any one of them, so kindly suggest which one to choose. I am looking forward to use Core Data) Am I thinking in the right direction. Will be greatful for any kind of assistance.. Thanx in advance..

    Read the article

  • Alternate three and three rows in a table with jQuery

    - by Frode Lillerud
    I want to set the alternate background color for rows in a table - but the twist is that I don't want every other row to be colored, I want to treat them in blocks of three rows. So for a table with eight rows I want the first three to be white, then the next three to have a background color, and the last two are back to white again. How can I do this using jQuery?

    Read the article

  • Read media stream from servlet in a webpage?

    - by khue
    Hi, I have a servlet that construct response to a media file request by reading the file from server: File uploadFile = new File("C:\TEMP\movie.mov"); FileInputStream in = new FileInputStream(uploadFile); Then write that stream to the response stream. My question is how do I play the media file in the webpage using or tag to read the media stream from the response. Thank you very much. Regards K.

    Read the article

< Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >