Search Results

Search found 3334 results on 134 pages for 'david e anderson'.

Page 82/134 | < Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >

  • Reading Metadata property of GifBitmapDecoder...why is it null?

    - by David
    How can I read the delay, left and top offset data for each frame of a gif? I've gotten this far. Load the Gif var myGif = new GifBitmapDecoder(uri, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.OnLoad); Get a frame var frame = myGif.Frames[i]; From MSDN: Native Image Format Metadata Queries read (ushort)Metadata.GetQuery("/grctlext/Delay"), (ushort)Metadata.GetQuery("/imgdesc/Left"), (ushort)Metadata.GetQuery("/imgdesc/Top") But two things don't work. First the Metadata property of both the gif and the frame are always null, even if I try different animated gif files. Second, the Metadata property of the frame doesn't seem to have a GetQuery method. How do I run these queries, what did I miss? Edit: Here is sample code that gives me null metadata. Using a fresh install of VS2010 Premium, on a fresh WPF application. The image file is the one in the comments. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace WpfApplication1 { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); var uri = new Uri(@"c:\b-414328-animated_gif_.gif"); var myGif = new GifBitmapDecoder(uri, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.OnLoad); var frame = myGif.Frames[0]; Title = ""; Title += "Global Metadata is null: " + (myGif.Metadata == null).ToString(); Title += "; Frame Metadata is null: " + (frame.Metadata == null).ToString(); // Crash due to null metadata //var frameData = (BitmapMetadata)frame.Metadata; //var rate = (ushort)frameData.GetQuery("/grctlext/Delay"); } } }

    Read the article

  • Writing a Virtual Printer in .NET

    - by David Osborn
    I'm looking to create a virtual printer that passes data to my .NET application. I want to then create an installer that installs both the printer and the .NET application. It would we really nice to be able to write it all in C#, but I have a feeling that this will require a printer driver to be written is unmanaged code. Does anyone know of a fairly clean tutorial or example of how to do this?

    Read the article

  • What are the "cool" use cases for SharePoint?

    - by David
    I went to the Microsoft Visual Studio 2010 launch event in Minneapolis yesterday and was slightly surprised by how much they were trotting out SharePoint and improved SharePoint development in Visual Studio 2010. SharePoint is something I've largely ignored over the years as a web developer and solution architect on a small development team. I was always under the impression that SharePoint was used mostly for intranets in large corporations, and that if you were developing for SharePoint, it meant that a corporate decision had been made to use it and you as a developer probably had few (if any) options. I realize this assumption is probably incorrect. So, what are the "cool" uses for SharePoint? What unique business problems have you solved using it? What could make a developer excited to be working on something for SharePoint?

    Read the article

  • DataGridView: how to make scrollbar in sync with current cell selection?

    - by David.Chu.ca
    I have a windows application with DataGridView as data presentation. Every 2 minutes, the grid will be refreshed with new data. In order to keep the scroll bar in sync with the new data added, I have to reset its ScrollBars: dbv.Rows.Clear(); // clear rows SCrollBars sc = dbv.ScrollBars; dbv.ScrollBars = ScrollBars.None; // continue to populate rows such as dbv.Rows.Add(obj); dbv.ScrollBars = sc; // restore the scroll bar setting back With above codes, the scroll bar reappears fine after data refresh. The problem is that the application requires to set certain cell as selected after the refresh: dbv.CurrentCell = dbv[0, selectedRowIndex]; With above code, the cell is selected; however, the scroll bar's position does not reflect the position of the selected cell's row position. When I try to move the scroll bar after the refresh, the grid will jump to the first row. It seems that the scroll bar position is set back to 0 after the reset. The code to set grid's CurrentCell does not cause the scroll bar to reposition to the correct place. There is no property or method to get or set scroll bar's value in DataGriadView, as far as I know. I also tried to set the selected row to the top: dbv.CurrentCell = dbv[0, selectedRowIndex]; dbv.FirstDisplayedScrollingRowIndex = selectedRowIndex; The row will be set to the top, but the scroll bar's position is still out of sync. Not sure if there is any way to make scroll bar's position in sync with the selected row which is set in code?

    Read the article

  • JQuery never reaches success or fail on aspx returning json.

    - by David
    Basicaly I have my aspx page doing <% Response.Clear(); Response.Write("{\"Success\": \"true\" }"); Response.End(); %> My JQuery code is function DoSubmit(r) { if (r == null || r.length == 0 || formdata == null || formdata.length == 0) return; for (i = 0; i < formdata.length; i++) { var fd = formdata[i]; r[fd.Name] = fd.Value; } r["ModSeq"] = tblDef.ModSeq; jQuery.ajax({ url: "NashcoUpdate.aspx" , succsess: doRow , error: DoSubmitError , complete: DoSubmitComplete , dataType: "json" , cache: false , data: r , type: "post" }) } When I call the DoSubmit() function every thing works but the doRow or DoSubmitError functions never get called only the DoSubmitComplete function. When I look at the response text in teh DoSubmitComple function it is {"Success": "true" } Every JSON tester I have tried says that this is valied JSON. What am I doing wrong here?

    Read the article

  • Is there a way to automatically update the documentation in an R package?

    - by David
    I used 'package.skeleton()' to generate .Rd help files a few months ago. I have edited these files, and I have also changed the functions, removed some functions, added others. Is there a function that automates updating the Rd files? update A nice package was just released called Rd2roxygen, it is described by the author Yihui Xie on his blog. As the name implies, this package allows one to retroactively insert documentation currently contained in .Rd into .R files. Sounds like a promising approach for both learning roxygen and for converting packages currently in development to R packages. Woo hoo. Thanks Yihui!

    Read the article

  • Good book on Castle Project?

    - by David
    Does anyone know of a good book on the Castle Project? I'm interested in learning more about any of the Castle projects (ActiveRecord, MonoRail, Windsor, anything!) and searches for Castle on Amazon are a little frustrating with the need to weed out all the fiction and nonsense.

    Read the article

  • Java - How to avoid loss of precision during divide and cast to int?

    - by David Buckley
    I have a situation where I need to find out how many times an int goes into a decimal, but in certain cases, I'm losing precision. Here is the method: public int test(double decimalAmount, int divisor) { return (int) (decimalAmount/ (1d / divisor)); } The problem with this is if I pass in 1.2 as the decimal amount and 5 as the divisor, I get 5 instead of 6. How can I restrusture this so I know how many times 5 goes into the decimal amount as an int?

    Read the article

  • Clojure / HBase: How to Import HBaseTestingUtility in v0.94.6.1

    - by David Williams
    In Clojure, if I want to start a test cluster using the hbase testing utility, I have to annotate my dependencies with: [org.apache.hbase/hbase "0.92.2" :classifier "tests" :scope "test"] First of all, I have no idea what this means. According to leiningens sample project.clj ;; Dependencies are listed as [group-id/name version]; in addition ;; to keywords supported by Pomegranate, you can use :native-prefix ;; to specify a prefix. This prefix is used to extract natives in ;; jars that don't adhere to the default "<os>/<arch>/" layout that ;; Leiningen expects. Question 1: What does that mean? Question 2: If I upgrade the version: [org.apache.hbase/hbase "0.94.6.1" :classifier "tests" :scope "test"] Then I receive a ClassNotFoundException Exception in thread "main" java.lang.ClassNotFoundException: org.apache.hadoop.hbase.HBaseConfiguration Whats going on here and how do I fix it?

    Read the article

  • Jquery Event onChange for Div

    - by David
    I have a page with the following two divs: <div id="searchResults"> </div> <div class="postSearchOptions" style="display: none;"> </div> Is there any way that I can make the "postSearchOptions" div appear when the "searchResults" div is updated by an AJAX call? I don't control the AJAX calls and I want to detect any change in the "searchResults" div. I tried writing the following JQuery code, but then realized that it requires Jquery 1.4 and I only have 1.3: $("#searchResults").live("change", function() { $(".postSearchOptions").css("display", "inline"); }); Is there any way to catch the event of the searchResults div changing using either standard JavaScript or Jquery 1.3? Thanks!

    Read the article

  • Most hazardous performance bottleneck misconceptions

    - by David Murdoch
    The guys who wrote Bespin (cloud-based canvas-based code editor [and more]) recently spoke about how they re-factored and optimize a portion of the Bespin code because of a misconception that JavaScript was slow. It turned out that when all was said and done, their optimization produced no significant improvements. I'm sure many of us go out of our way to write "optimized" code based on misconceptions similar to that of the Bespin team. What are some common performance bottleneck misconceptions developers commonly subscribe to?

    Read the article

  • "Priming" a whole database in MSSQL for first-hit speed

    - by David Spillett
    For a particular apps I have a set of queries that I run each time the database has been restarted for any reason (server reboot usually). These "prime" SQL Server's page cache with the common core working set of the data so that the app is not unusually slow the first time a user logs in afterwards. One instance of the app is running on an over-specced arrangement where the SQL box has more RAM than the size of the database (4Gb in the machine, the DB is under 1.5Gb currently and unlikely to grow too much relative to that in the near future). Is there a neat/easy way of telling SQL Server to go away and load everything into RAM? It could be done the hard way by having a script scan sysobjects & sysindexes and running SELECT * FROM <table> WITH(INDEX(<index_name>)) ORDER BY <index_fields> for every key and index found, which should cause every used page to be read at least once and so be in RAM, but is there a cleaner or more efficient way? All planned instances where the database server is stopped are out-of-normal-working-hours (all the users are at most one timezone away and unlike me none of them work at silly hours) so such a process (until complete) slowing down users more than the working set not being primed at all would is not an issue.

    Read the article

  • How does memory management in Java and C# differ?

    - by David Johnstone
    I was reading through 2010 CWE/SANS Top 25 Most Dangerous Programming Errors and one of the entries is for Buffer Copy without Checking Size of Input. It suggests using a language with features to prevent or mitigate this problem, and says: For example, many languages that perform their own memory management, such as Java and Perl, are not subject to buffer overflows. Other languages, such as Ada and C#, typically provide overflow protection, but the protection can be disabled by the programmer. I was not aware that Java and C# differed in any meaningful way with regard to memory management. How is it that Java is not subject to buffer overflows, while C# only protects against overflows? And how is it possible to disable this protection in C#?

    Read the article

  • Select from table and function

    - by David Oneill
    I have a function that returns a table. The returned table contains (among other things) a store_id. I can get the store_id for a particular transaction_id and city_id as follows: select store_id from table(f_get_store(city_id, transaction_id)); I have another table that contains a list of transactions (which includes transaction_id and city_id). I want a query that returns store_id, city_id, transaction_id for every entry in the transaction table. My first guess was: select f_get_store(city_id, transaction_id), city_id, transaction_id from table; (simplified away the unimportant details) However, this yields an "ORA-00932: inconsistent datatypes" error. How do I need to structure this query? (I'm using Oracle)

    Read the article

  • Voting software with remote units - architectural questions

    - by David Neale
    I'm looking at designing some software that registers live votes (let's say A,B,C or D). The vote needs to be picked up and processed by a .NET engine. The remote voting units should be as small as possible. What form of data transmission should be used for the voting? The data is obviously very simple but there is a need to make sure each unit can only vote once per question. How would the data be received by the computer running the software?

    Read the article

  • Complete failure to compile when include CSS Friendly Adapters

    - by david
    Background - I am trying to use the friendly adapters to override the default styling for the standard asp.net menu control that is used by an existing project. The existing project functions normally and compiles when requested without incident. Adding in the code for the for the CSS Friendly adapter and not only does it not compile, but it never even really starts. The Problem in Detail - I am using the sample code from Scott on this page: http://weblogs.asp.net/scottgu/archive/2006/09/08/CSS-Control-Adapter-Toolkit-Update.aspx. The sample project compiles fine, just within the existing project does it fail. Fails without a line number or any other traceable info. It definately appears to be related to the CSSMenuAdapter.browser file, which has been referenced by others online as the cause of similar error. I have tried addind and readding, using as a dll, using as a code file in app code, etc. I am working with aspdotnetstorefront in this case, although it is not unique to them as I have found other references in software packages online. Only thing is, no one ever says what solved the issue. I am using Windows 7, VS2008 Express and SQL Express 2008 R2. The full error msg is: Error 10 Exception of type 'System.OutOfMemoryException' was thrown. Notice that there is no file, line, or column info. Really need some help here. I have been working on this a long time. This really should have tag: cssfriendlyadapter but I could not create that.

    Read the article

  • SQL Comparison Tools

    - by David Ward
    Which SQL comparison tool would you recommend for SQL server database comparisons. I've been looking at SQL Compare and SQL Delta. I'd like the ability to compare and sync database schema and data.

    Read the article

  • Flex: Run scripts before/after build?

    - by David Wolever
    Currently I'm building my Flex projects using Flex Builder's "built in" build system (ie, "clicking the run button"), but I'd like to start running scripts before/after the build. What's the easiest way to do that? Or, even, where should I start looking?

    Read the article

  • Android - Audio recorder FileNotFound

    - by david
    Hi, I'm trying to record audio this.recorder = new android.media.MediaRecorder(); this.recorder.setAudioSource(android.media.MediaRecorder.AudioSource.MIC); this.recorder.setOutputFormat(android.media.MediaRecorder.OutputFormat.DEFAULT); this.recorder.setAudioEncoder(android.media.MediaRecorder.AudioEncoder.DEFAULT); this.recorder.setOutputFile("pruebaAudioRecorder.mp4"); this.recorder.prepare(); this.recorder.start(); but when i call prepare method throws the FileNotFound exception. Should I create the file before prepare method? something like new File(...) If so, which should be the file path? thx a lot.

    Read the article

  • Closing an EDM ObjectContext?

    - by David Veeneman
    I am getting started with the ADO.NET Entity Framework 4.0. I have created an EDM and data store for the app, and it successfully retrieves entities. The application holds the EDM's ObjectContext as a member-level variable, which it uses to call ObjectContext.SaveChanges(). So far, so good. I am going to refactor to repositories later. Right now, my question is a bit more basic: When I am finished with the EDM, what do I need to do to release it? Is it as simple as calling Dispose() on the ObjectContext? Thanks for your help.

    Read the article

  • Trouble getting $.ajax() to work in PhoneGap against a locally hosted server

    - by David Gutierrez
    Currently trying to make an ajax post request to an IIS Express hosted MVC 4 Web API end point from an android VM (Bluestacks) on my machine. Here are the snippets of code that I am trying, and cannot get to work: $.ajax({ type: "POST", url: "http://10.0.2.2:28434/api/devices", data: {'EncryptedPassword':'1234','UserName':'test','DeviceToken':'d234'} }).always(function( data, textStatus, jqXHR ) { alert( textStatus ); }); Whenever I run this request I always get back a textStatus of 'error'. After hours of trying different things, I pushed my End Point to an actual server, and was able to actually get responses back in PhoneGap if I built up an XMLHttpRequest by hand, like so: var request = new XMLHttpRequest(); request.open("POST", "http://172.16.100.42/MobileRewards/api/devices", true); request.onreadystatechange = function(){//Call a function when the state changes. console.log("state = " + request.readyState); console.log("status = " + request.status); if (request.readyState == 4) { if (request.status == 200 || request.status == 0) { console.log("*" + request.responseText + "*"); } } } request.send("{EncryptedPassword:1234,UserName:test,DeviceToken:d234}"); Unfortunately, if I try to use $.ajax() against the same end point in the snippet above I still get a status text that says 'error', here is that snippet for reference: $.ajax({ type: "POST", url: "http://172.16.100.42/MobileRewards/api/devices", data: {'EncryptedPassword':'1234','UserName':'test','DeviceToken':'d234'} }).always(function( data, textStatus, jqXHR ) { alert( textStatus ); }); So really, there are a couple of questions here. 1) Why can't I get any ajax calls (post or get) to successfully hit my End Point when it's hosted via IIS Express on the same machine that the Android VM is running? 2) When my end point is hosted on an actual server, through IIS and served through port 80, why can't I get post requests to be successful when I use jquery's ajax calls? (Even though I can get it to work by manually creating an XMLHttpRequest) Thanks

    Read the article

  • Why is the software world full of status codes?

    - by David V McKay
    Why did programmers ever start using status codes? I mean, I guess I could imagine this might be useful back in the days when a text string was an expensive resource. WAYYY back then. But even after we had megabytes of memory to work with, we continued to use them. What possible advantage could there be for obfuscating the meaning of an error message or status message behind a status code?

    Read the article

  • Creating an SQL Compact file: Template or script?

    - by David Veeneman
    I am writing an application that writes to SQL Compact files that have a specific schema, and I am now implementing the New File use case. The simplest approach seems to be to use a Template pattern: first, create a template file that lives in the application directory. Then, when the user selects New File, the template is copied to the name and destination specified by the user in a New File dialog. The alternative is a scripted approach: Use the same New File dialog, but dispense with the template file. Instead, create an empty SQL Compact file using the name/destination specified by the user, and then execute a T-SQL script on it from managed code. At this point, I am leaning toward the Template approach, because it is simpler. Is there any reason I should not use that approach? Thanks for your help.

    Read the article

  • Flex: Unexpected leakage with RemoteObject + IExternalizable?

    - by David Wolever
    I've been tinkering with IExternalizable, but I've noticed some unexpected behavior. I've got this class: public function readExternal(input:IDataInput):void { input.readObject(); input.readObject(); input.readObject(); } public function writeExternal(output:IDataOutput):void { output.writeObject("first string"); output.writeObject(424242); output.writeObject("second string"); } But when I try to serialize this class using AMF and send it to a remote server (via RemoteObject), Charles shows me that the request looks like this: But it seems wrong that my serialized object is leaking out into the rest of the request. So, what am I doing wrong? Is there some part of the documentation I've missed?

    Read the article

< Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >