Search Results

Search found 578 results on 24 pages for 'nathan campos'.

Page 15/24 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • Using scroll on one memo edit to scroll on another as well

    - by Nathan Koop
    I've got two memoedits which are similar (in order to compare two records) I would like to keep the scrolling in synch to ease comparison. I had originally thought there would be an OnScroll event, but didn't see one, nor anything similar, the closest I saw was Spin, this handles some possibilities, but not all. I also didn't see a way to navigate the rows. I did see the ScrollToCaret method, but this doesn't do what I want. Any ideas?

    Read the article

  • reading dbase file without standard .dbf extension.

    - by Nathan W
    I am trying to read a file which is just a dbase file but without the standard extension the file is something like: Test.Dat I am using this block of code to try and read the file: string ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Temp;Extended Properties=dBase III"; OleDbConnection dBaseConnection = new OleDbConnection(ConnectionString); dBaseConnection.Open(); OleDbDataAdapter oDataAdapter = new OleDbDataAdapter("SELECT * FROM Test", ConnectionString); DataSet oDataSet = new DataSet(); oDataAdapter.Fill(oDataSet);//I get the error right here... DataTable oDataTable = oDataSet.Tables[0]; foreach (DataRow dr in oDataTable.Rows) { Console.WriteLine(dr["Name"]); } Of course this crashes because it can't find the dbase file called test, but if I rename the file to Test.dbf it works fine. I can't really rename the file all the time because a third party application uses it as its file format. Does anyone know a way to read a dbase file without a standard extension in C#. Thanks.

    Read the article

  • VC7.1 C1204 internal compiler error

    - by Nathan Ernst
    I'm working on modifying Firaxis' Civilization 4 core game DLL. The host application is built using VC7, hence the constraint (source not provided for the host EXE). I've been working on rewriting a large chunk of the code (focusing on low-hanging performance issues & memory leaks). I recently ran into an internal compiler error when trying to mod the code to use an array class instead of dynamically allocated 2-d arrays, I was going to use matrices from the boost lib (Civ4 is already using boost, so why not?). Basically, the issue comes down to: if I include "boost/numeric/ublas/matrix.hpp", I run into an internal compiler error C1204. MSDN has this to say: MSDN C1204 KB has this to say: KB 883655 So, I'm curious, is it possible to solve this error without a KB/SP being applied and dramatically reducing the complexity of the code? Additionally, as VC7 is no longer "supported", does anyone have a valid (supported) link for a VC7 service pack?

    Read the article

  • Getting started with silverlight 4

    - by nathan gonzalez
    i'm interested in picking up silverlight as another tool to use when appropriate, and i'm looking to get some suggestions on the best way to get started. i have visual studio 2010, and can purchase expression blend if necessary (is it out of beta?), though i haven't quite been able to grasp the relationship between them. are there any good books, tutorials, blogs etc that i should use to familiarize myself with silverlight 4?

    Read the article

  • PNGException "crc corruption" when attempting to create ImageIcon objects from ZIP archive

    - by Nathan Strong
    I've got a ZIP file containing a number of PNG images that I am trying to load into my Java application as ImageIcon resources directly from the archive. Here's my code: import java.io.*; import java.util.Enumeration; import java.util.zip.*; import javax.swing.ImageIcon; public class Test { public static void main( String[] args ) { if( args.length == 0 ) { System.out.println("usage: java Test.java file.zip"); return; } File archive = new File( args[0] ); if( !archive.exists() || !archive.canRead() ) { System.err.printf("Unable to find/access %s.\n", archive); return; } try { ZipFile zip = new ZipFile(archive); Enumeration <? extends ZipEntry>e = zip.entries(); while( e.hasMoreElements() ) { ZipEntry entry = (ZipEntry) e.nextElement(); int size = (int) entry.getSize(); int count = (size % 1024 == 0) ? size / 1024 : (size / 1024)+1; int offset = 0; int nread, toRead; byte[] buffer = new byte[size]; for( int i = 0; i < count; i++ ) { offset = 1024*i; toRead = (size-offset > 1024) ? 1024 : size-offset; nread = zip.getInputStream(entry).read(buffer, offset, toRead); } ImageIcon icon = new ImageIcon(buffer); // boom -- why? } zip.close(); } catch( IOException ex ) { System.err.println(ex.getMessage()); } } } The sizes reported by entry.getSize() match the uncompressed size of the PNG files, and I am able to read the data out of the archive without any exceptions, but the creation of the ImageIcon blows up. The stacktrace: sun.awt.image.PNGImageDecoder$PNGException: crc corruption at sun.awt.image.PNGImageDecoder.getChunk(PNGImageDecoder.java:699) at sun.awt.image.PNGImageDecoder.getData(PNGImageDecoder.java:707) at sun.awt.image.PNGImageDecoder.produceImage(PNGImageDecoder.java:234) at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246) at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172) at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136) sun.awt.image.PNGImageDecoder$PNGException: crc corruption at sun.awt.image.PNGImageDecoder.getChunk(PNGImageDecoder.java:699) at sun.awt.image.PNGImageDecoder.getData(PNGImageDecoder.java:707) at sun.awt.image.PNGImageDecoder.produceImage(PNGImageDecoder.java:234) at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246) at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172) at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136) Can anyone shed some light on it? Google hasn't turned up any useful information.

    Read the article

  • How to Deserialize Missing Fields To Nulls

    - by Nathan
    I am working on a .NET project where several versions of the same type of object have been created over the life of the project - most new versions add a field or two. However, now I am looking to mitigate problems for users with an old version. My goal is that when a user tries to open an old version of the serialized object with the new program, the program will automatically assign default values to the fields that are missing from the depreciated version of the file. For example, say I had a class with two boolean fields - RepeatSound and RepeatForever. The first version of the program doesn't know how to repeat forever, so it only saved RepeatSound: <anyType xsi:type="Sound"> <RepeatSound>true</RepeatSound> </anyType> but the new files look like this: <anyType xsi:type="Sound"> <RepeatSound>true</RepeatSound> <RepeatForever>true</RepeatForever> </anyType> My goal is that when I deserialize the first file in the new program that it will create the Sound object but simply default the value of RepeatForever to false. Right now trying to deserialize the first object would throw an exception. Thank you in advance for any responses

    Read the article

  • Infopath 2007 and WCF Data Connection

    - by Nathan Fisher
    I am having trouble trying to connect an Infopath 2007 form to an WCF web service. I appears that the Infopath only wants to communicate via a SOAP 1.0 message. To get around the issue for the moment I have created an .asmx web service. Should I consider continuing down this workaround or figure out a way to get WCF to dish out SOAP 1.0 1.1 messages?

    Read the article

  • SQLite Modify Column

    - by Nathan
    I need to modify a column in a SQLite database but I have to do it programatically due to the database already being in production. From my research I have found that in order to do this I must do the following. Create a new table with new schema Copy data from old table to new table Drop old table Rename new table to old tables name That seems like a ridiculous amount of work for something that should be relatively easy. Is there not an easier way? All I need to do is change a constraint on a existing column and give it a default value.

    Read the article

  • A hónap könyve: "Achieving Extreme Performance with Oracle Exadata"

    - by Lajos Sárecz
    Luis Moreno Campos ocpdba oracle weblog blogjában találtam a fenti fotót és a hírt, hogy megjelent az elso Oracle Exadata-ról szóló könyv! Már a tartalomjegyzék alapján nagyon ígéretes a könyv. Azt gondolom kötelezo olvasmány mindazoknak, akik használják, használni fogják az Oracle Exadata Database Machine-t, vagy egyszeruen csak érdeklodnek azon Oracle technológiák iránt, melyek annyira kimagasló képességuvé teszik ezt a korszakváltó adatbázis szervert. A könyv az alábbi forrásból érheto el: Achieving Extreme Performance with Oracle Exadata (Osborne ORACLE Press Series) Rick Greenwald Apropó, épp félóra múlva lesz egy érdekes webcast arról, hogyan lehet biztonsággal vegyes terhelést futtatni egy Exadata szerveren. Még lehet regisztrálni!

    Read the article

  • sqlite with Perl for Windows; suitable for relocation

    - by Paul Nathan
    I need to set up sqllite for Perl on a Windows box. However - Perl is probably being run over the network from a central server, and I do not know what modules will be available on initial running of my script. I can guarantee Perl 5.8+ (activestate) or Perl 5.10+ (strawberry). Therefore, I need to package sqlite & the associated Perl module(s) in the project directory itself. Having Goggled around, I don't see any immediate zipfile to do this.

    Read the article

  • Video Synthesis - Making waves, pattern, gradients...

    - by Nathan
    I'm writing a program to generate some trippy visuals. My code paints each pixel with a random blue value which loops at 0.04 second intervals. for (y = 0; y < 5.5; y += 0.2) { for (x = 0; x < 7.5; x += 0.2) { b = rand() / ((double) RAND_MAX); setPixelColor(x,y,r,g,b); } } I'd like to do more than just make blue noise... but my maths is a bit rusty, and Google isn't helping me much today, so it would be great if you could share anything you know about making waves, patterns, gradient animations, etc or links to such material.

    Read the article

  • running shell commands with gnu clisp

    - by Paul Nathan
    I'm trying to create a "system" command for clisp that works like this (setq result (system "pwd")) ;;now result is equal to /my/path/here I have something like this: (defun system (cmd) (ext:run-program :output :stream)) But, I am not sure how to transform a stream into a string. I've reviewed the hyperspec and google more than a few times.

    Read the article

  • How can I force asp.net webapi to always decode POST data as JSON

    - by Nathan Reed
    I getting some json data posted to my asp.net webapi, but the post parameter is always coming up null - the data is not being serialized correctly. The method looks something like this: public HttpResponseMessage Post(string id, RegistrationData registerData) It seems the problem is that the client (which I have no control over) is always sending the content-type as x-www-form-urlencoded, even though the content is actually json. This causes mvc to try to deserialize as form data, which fails. Is there anyway to get webapi to always deserialize as json, and to ignore the content-type header?

    Read the article

  • How to make a custom NSFormatter work correctly on Snow Leopard?

    - by Nathan
    I have a custom NSFormatter attached to several NSTextFields who's only purpose is to uppercase the characters as they are typed into field. The entire code for my formatter is included below. The stringForObjectValue() and getObjectValue() implementations are no-ops and taken pretty much directly out of Apple's documentation. I'm using the isPartialStringValid() method to return an uppercase version of the string. This code works correctly in 10.4 and 10.5. When I run it on 10.6, I get "strange" behaviour where text fields aren't always render the characters that are typed and sometimes are just displaying garbage. I've tried enabling NSZombie detection and running under Instruments but nothing was reported. I see errors like the following in "Console": HIToolbox: ignoring exception '*** -[NSCFString replaceCharactersInRange:withString:]: Range or index out of bounds' that raised inside Carbon event dispatch ( 0 CoreFoundation 0x917ca58a __raiseError + 410 1 libobjc.A.dylib 0x94581f49 objc_exception_throw + 56 2 CoreFoundation 0x917ca2b8 +[NSException raise:format:arguments:] + 136 3 CoreFoundation 0x917ca22a +[NSException raise:format:] + 58 4 Foundation 0x9140f528 mutateError + 218 5 AppKit 0x9563803a -[NSCell textView:shouldChangeTextInRange:replacementString:] + 852 6 AppKit 0x95636cf1 -[NSTextView(NSSharing) shouldChangeTextInRanges:replacementStrings:] + 1276 7 AppKit 0x95635704 -[NSTextView insertText:replacementRange:] + 667 8 AppKit 0x956333bb -[NSTextInputContext handleTSMEvent:] + 2657 9 AppKit 0x95632949 _NSTSMEventHandler + 209 10 HIToolbox 0x93379129 _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1567 11 HIToolbox 0x933783f0 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 411 12 HIToolbox 0x9339aa81 SendEventToEventTarget + 52 13 HIToolbox 0x933fc952 SendTSMEvent + 82 14 HIToolbox 0x933fc2cf SendUnicodeTextAEToUnicodeDoc + 700 15 HIToolbox 0x933fbed9 TSMKeyEvent + 998 16 HIToolbox 0x933ecede TSMProcessRawKeyEvent + 2515 17 AppKit 0x95632228 -[NSTextInputContext handleEvent:] + 1453 18 AppKit 0x9562e088 -[NSView interpretKeyEvents:] + 209 19 AppKit 0x95631b45 -[NSTextView keyDown:] + 751 20 AppKit 0x95563194 -[NSWindow sendEvent:] + 5757 21 AppKit 0x9547bceb -[NSApplication sendEvent:] + 6431 22 AppKit 0x9540f6fb -[NSApplication run] + 917 23 AppKit 0x95407735 NSApplicationMain + 574 24 macsetup 0x00001f9f main + 24 25 macsetup 0x00001b75 start + 53 ) Can anybody shed some light on what is happening? Am I just using NSFormatter incorrectly? -(NSString*) stringForObjectValue:(id)object { if( ![object isKindOfClass: [ NSString class ] ] ) { return nil; } return [ NSString stringWithString: object ]; } -(BOOL)getObjectValue: (id*)object forString: string errorDescription:(NSString**)error { if( object ) { *object = [ NSString stringWithString: string ]; return YES; } return NO; } -(BOOL) isPartialStringValid: (NSString*) cStr newEditingString: (NSString**) nStr errorDescription: (NSString**) error { *nStr = [NSString stringWithString: [cStr uppercaseString]]; return NO; }

    Read the article

  • Grep and Awk in Windows Invalid Char in Expression Error

    - by Nathan
    I am new to grep and awk - using Windows 7 (I downloaded grep and awk for windows from GnuWin). I am have having trouble running this script: grep -Fwf dictionary.txt frequency.txt | awk '{print $2 "," $1}' I get the error: awk: '{print awk: ^ invalid char ''' in expression I believe it might have something to do with having to use double quotes in Windows, but I tried all the combinations I can think of and still it doesn't work. Can anyone help? Thanks

    Read the article

  • Using TortoiseHg to push to a authenticated git repository

    - by Nathan Palmer
    I'm trying to push a changeset from a local Mercurial repository created with TortoiseHg to a remote Git repository. I have hg-git installed and configured and it will pull just fine. But when I run the push it gives me this Command hg push git+ssh://git@dummyrepo:username/repo.git Result pushing to git+ssh://git@dummyrepo:username/repo.git importing Hg objects into Git creating and sending data abort: the remote end hung up unexpectedly There are several things I've done to get to this point. But I'm hoping to resolve this last thing because I find TortoiseHg to be much easier to work with than any of the Git tools out there (for windows.) Installed TortoiseHg Pulled down the hg-git from http://bitbucket.org/durin42/hg-git/ Configured mercurial.ini to point to the hg-git library Pulled down dulwich source from git://git.samba.org/jelmer/dulwich.git Compiled dulwich and put it into library.zip for TortoiseHg Configured TortoiseHg to use TortoisePlink.exe for ssh Added my private key to Pageant Any ideas what I could be missing?

    Read the article

  • Using TortoiseHg to push to an authenticated git repository

    - by Nathan Palmer
    I'm trying to push a changeset from a local Mercurial repository created with TortoiseHg to a remote Git repository. I have hg-git installed and configured and it will pull just fine. But when I run the push it gives me this Command hg push git+ssh://git@dummyrepo:username/repo.git Result pushing to git+ssh://git@dummyrepo:username/repo.git importing Hg objects into Git creating and sending data abort: the remote end hung up unexpectedly There are several things I've done to get to this point. But I'm hoping to resolve this last thing because I find TortoiseHg to be much easier to work with than any of the Git tools out there (for windows.) Installed TortoiseHg Pulled down the hg-git from http://bitbucket.org/durin42/hg-git/ Configured mercurial.ini to point to the hg-git library Pulled down dulwich source from git://git.samba.org/jelmer/dulwich.git Compiled dulwich and put it into library.zip for TortoiseHg Configured TortoiseHg to use TortoisePlink.exe for ssh Added my private key to Pageant Any ideas what I could be missing?

    Read the article

  • DDD and MVC: Difference between 'Model' and 'Entity'

    - by Nathan Loding
    I'm seriously confused about the concept of the 'Model' in MVC. Most frameworks that exist today put the Model between the Controller and the database, and the Model almost acts like a database abstraction layer. The concept of 'Fat Model Skinny Controller' is lost as the Controller starts doing more and more logic. In DDD, there is also the concept of a Domain Entity, which has a unique identity to it. As I understand it, a user is a good example of an Entity (unique userid, for instance). The Entity has a life-cycle -- it's values can change throughout the course of the action -- and then it's saved or discarded. The Entity I describe above is what I thought Model was supposed to be in MVC? How off-base am I? To clutter things more, you throw in other patterns, such as the Repository pattern (maybe putting a Service in there). It's pretty clear how the Repository would interact with an Entity -- how does it with a Model? Controllers can have multiple Models, which makes it seem like a Model is less a "database table" than it is a unique Entity. So, in very rough terms, which is better? No "Model" really ... class MyController { public function index() { $repo = new PostRepository(); $posts = $repo->findAllByDateRange('within 30 days'); foreach($posts as $post) { echo $post->Author; } } } Or this, which has a Model as the DAO? class MyController { public function index() { $model = new PostModel(); // maybe this returns a PostRepository? $posts = $model->findAllByDateRange('within 30 days'); while($posts->getNext()) { echo $posts->Post->Author; } } } Both those examples didn't even do what I was describing above. I'm clearly lost. Any input?

    Read the article

  • NHibernate Query

    - by Nathan Roe
    Is it possible to get NHibernate to generate a query similar to the following with HQL or Criteria API? select * from ( select row_number() over ( partition by Column1 order by Column2 ) as RowNumber, T.* from MyTable T ) where RowNumber = 1 I can get it to execute the inner select using the formula attribute, but I can't figure out a way to write a HQL or Criteria query that lets me wrap the inner select in the outer one.

    Read the article

  • Precompile Lambda Expression Tree conversions as constants?

    - by Nathan
    It is fairly common to take an Expression tree, and convert it to some other form, such as a string representation (for example this question and this question, and I suspect Linq2Sql does something similar). In many cases, perhaps even most cases, the Expression tree conversion will always be the same, i.e. if I have a function public string GenerateSomeSql(Expression<Func<TResult, TProperty>> expression) then any call with the same argument will always return the same result for example: GenerateSomeSql(x => x.Age) //suppose this will always return "select Age from Person" GenerateSomeSql(x => x.Ssn) //suppose this will always return "select Ssn from Person" So, in essence, the function call with a particular argument is really just a constant, except time is wasted at runtime re-computing it continuously. Assuming, for the sake of argument, that the conversion was sufficiently complex to cause a noticeable performance hit, is there any way to pre-compile the function call into an actual constant?

    Read the article

  • How can I test caching and cache busting?

    - by Nathan Long
    In PHP, I'm trying to steal a page from the Rails playbook (see 'Using Asset Timestamps' here): By default, Rails appends assets' timestamps to all asset paths. This allows you to set a cache-expiration date for the asset far into the future, but still be able to instantly invalidate it by simply updating the file (and hence updating the timestamp, which then updates the URL as the timestamp is part of that, which in turn busts the cache). It‘s the responsibility of the web server you use to set the far-future expiration date on cache assets that you need to take advantage of this feature. Here‘s an example for Apache: # Asset Expiration ExpiresActive On <FilesMatch "\.(ico|gif|jpe?g|png|js|css)$"> ExpiresDefault "access plus 1 year" </FilesMatch> If you look at a the source for a Rails page, you'll see what they mean: the path to a stylesheet might be "/stylesheets/scaffold.css?1268228124", where the numbers at the end are the timestamp when the file was last updated. So it should work like this: The browser says 'give me this page' The server says 'here, and by the way, this stylesheet called scaffold.css?1268228124 can be cached for a year - it's not gonna change.' On reloads, the browser says 'I'm not asking for that css file, because my local copy is still good.' A month later, you edit and save the file, which changes the timestamp, which means that the file is no longer called scaffold.css?1268228124 because the numbers change. When the browser sees that, it says 'I've never seen that file! Give me a copy, please.' The cache is 'busted.' I think that's brilliant. So I wrote a function that spits out stylesheet and javascript tags with timestamps appended to the file names, and I configured Apache with the statement above. Now: how do I tell if the caching and cache busting are working? I'm checking my pages with two plugins for Firebug: Yslow and Google Page Speed. Both seem to say that my files are caching: "Add expires headers" in Yslow and "leverage browser caching" in Page Speed are both checked. But when I look at the Page Speed Activity, I see a lot of requests and waiting and no 'cache hits'. If I change my stylesheet and reload, I do see the change immediately. But I don't know if that's because the browser never cached in the first place or because the cache is busted. How can I tell?

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >