Search Results

Search found 547 results on 22 pages for 'nathan fellman'.

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

  • 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

  • Distributed development systems

    - by Nathan Adams
    I am interested in a system that allows for distributed development with an authentication piece. What do I mean by that? Ok so lets take SVN, SVN keeps track of revisions and doesn't care who submits, as long as you have the right to submit you can submit, really, to any part in the repository. Where does my system come into play? Being able to granulate access control and give a stackoverflow like feel to the environment. In the system I am describing we have 4 users Bob, Alice, Dan, Joe. Bob is a project managed, Alice and Dan are programmers under Bob and Joe is a random programmer on the internet who wants to help. Ideally in this system, Bob can commit any changes and won't require approval. Alice and Dan can commit to their branches, or a branch, but a commit to the trunk would need approval by Bob. This is where Joe comes in, wants to help, however, you just don't want to give him the keys to the kingdom just yet so to speak, so in my system you would setup a "low user" account. Any commits that Joe makes would need to be approved by Dan, Alice or both. However, in the system, Joe can build up "Karma" where after so many approved commits it would only need approval by one of the programmers, and then eventually no approval would be necessary. Does that make sense and do you know if a system like that exists? Or am I just crazy to even think such a system/environment would be possible?

    Read the article

  • Using Hibernate to do a query involving two tables

    - by Nathan Spears
    I'm inexperienced with sql in general, so using Hibernate is like looking for an answer before I know exactly what the question is. Please feel free to correct any misunderstandings I have. I am on a project where I have to use Hibernate. Most of what I am doing is pretty basic and I could copy and modify. Now I would like to do something different and I'm not sure how configuration and syntax need to come together. Let's say I have two tables. Table A has two (relevant) columns, user GUID and manager GUID. Obviously managers can have more than one user under them, so queries on manager can return more than one row. Additionally, a manager can be managing the same user on multiple projects, so the same user can be returned multiple times for the same manager query. Table B has two columns, user GUID and user full name. One-to-one mapping there. I want to do a query on manager GUID from Table A, group them by unique User GUID (so the same User isn't in the results twice), then return those users' full names from Table B. I could do this in sql without too much trouble but I want to use Hibernate so I don't have to parse the sql results by hand. That's one of the points of using Hibernate, isn't it? Right now I have Hibernate mappings that map each column in Table A to a field (well the get/set methods I guess) in a DAO object that I wrote just to hold that Table's data. I could also use the Hibernate DAOs I have to access each table separately and do each of the things I mentioned above in separate steps, but that would be less efficient (I assume) that doing one query. I wrote a Service object to hold the data that gets returned from the query (my example is simplified - I'm going to keep some other data from Table A and get multiple columns from Table B) but I'm at a loss for how to write a DAO that can do the join, or use the DAOs I have to do the join. FYI, here is a sample of my hibernate config file (simplified to match my example): <hibernate-mapping package="com.my.dao"> <class name="TableA" table="table_a"> <id name="pkIndex" column="pk_index" /> <property name="userGuid" column="user_guid" /> <property name="managerGuid" column="manager_guid" /> </class> </hibernate-mapping> So then I have a DAOImplementation class that does queries and returns lists like public List<TableA> findByHQL(String hql, Map<String, String> params) etc. I'm not sure how "best practice" that is either.

    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

  • Arguments On a Console eMbedded Visual C++ Application

    - by Nathan Campos
    I'm trying to develop a simple application that will read some files, targeted for Windows CE. For this I'm using Microsoft eMbedded Visual C++ 3. This program(that is for console) will be called like this: /Storage Card/Test coms file.cmss As you can see, file.cmss is the first argument, but on my main I have a condition to show the help(the normal, how to use the program) if the arguments are smaller than 2: if(argc < 2) { showhelp(); return 0; } But when I execute the program on the command-line of Windows CE(using all the necessary arguments) I got the showHelp() content. Then I've checked all the code, but it's entirelly correct. But I think that eVC++ don't use argc and argv[] for arguments, then I want some help on how to determine the arguments on it.

    Read the article

  • No Binary File Generation

    - by Nathan Campos
    I've just bought a new laptop for me on the travel, then on my free time, I've started to test MinGW on it by trying to compile my own OS that is written in C++, then I've created all the files needed and the kernel.cpp: extern "C" void _main(struct multiboot_data* mbd, unsigned int magic); void _main( struct multiboot_data* mbd, unsigned int magic ) { char * boot_loader_name =(char*) ((long*)mbd)[16]; /* Print a letter to screen to see everything is working: */ unsigned char *videoram = (unsigned char *) 0xb8000; videoram[0] = 65; /* character 'A' */ videoram[1] = 0x07; /* forground, background color. */ } And tried to compile it with g++ G: g++ -o C:\kernel.o -c kernel.cpp -Wall -Wextra -Werror -nostdlib -nostartfiles -nodefaultlibs kernel.cpp: In function `void _main(multiboot_data*, unsigned int)': kernel.cpp:8: warning: unused variable 'boot_loader_name' kernel.cpp: At global scope: kernel.cpp:4: warning: unused parameter 'magic' G: But it don't create any binary file at C:/, what can I do?

    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

  • 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

  • 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

  • Populate a jTable Using MySQL

    - by Nathan Campos
    I have a project with a jTable called AchTable, that is like this: +-------+------+ | File | Type | +-------+------+ | | | | | | | | | +--------------+ And I have a mySQL table that is like the same, then I want to know how could I populate the jTable.

    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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • EDIT Control Showing Squares Instead Of Returns

    - by Nathan Campos
    I'm playing a little bit with PocketC by doing a simple text editor. But with this code to read and to display the contents of the file on the EDIT control: int filehandle; int file_len; string file_mode; initComponents() { createctrl("EDIT", "test", 2, 1, 0, 24, 70, 25, TEXTBOX); wndshow(TEXTBOX, SW_SHOW); guigetfocus(); } main() { filehandle = fileopen(OpenFileDlg("Plain Text Files (*.txt)|*.txt; All Files (*.*)|*.*"), 0, FILE_READWRITE); file_len = filegetlen(filehandle); if(filehandle == -1) { MessageBox("File Could Not Be Found!", "Error", 3, 1); } initComponents(); editset(TEXTBOX, fileread(filehandle, file_len)); } It's all ok, but my test file, now have returns: Hello, World! PocketC Test Of My Editor Then when I open this file on the editor, instead of returns, I just see two squares(that means that it's a unknown character for that control), but if I change the control to a STATIC, it does he returns ok, but I can't edit the text if I use a STATIC. Then I want to know what I need to do to do the returns instead of showing those squares.

    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

  • Can I redirect/alias one web service call to another?

    - by Nathan Pitman
    I've written a simple PHP nusoap web service for an application and wish to change the name of one of the actions so that it makes more sense. However there is a CD-ROM based application in the wild using this web service and this action and so I need to redirect or alias any incoming requests to the new action... any idea how I might go about doing this?

    Read the article

  • Getting Error When Opening Files

    - by Nathan Campos
    I'm developing a simple Text Editor to understand better PocketC language, then I've done this: #include "\\Storage Card\\My Documents\\PocketC\\Parrot\\defines.pc" int filehandle; int file_len; string file_mode; initComponents() { createctrl("EDIT", "test", 2, 1, 0, 24, 70, 25, TEXTBOX); wndshow(TEXTBOX, SW_SHOW); guigetfocus(); } main() { filehandle = fileopen(OpenFileDlg("Plain Text Files (*.txt)|*.txt; All Files (*.*)|*.*"), 0, FILE_READWRITE); file_len = filegetlen(filehandle); if(filehandle = -1) { MessageBox("File Could Not Be Found!", "Error", 3, 1); } initComponents(); editset(TEXTBOX, fileread(filehandle, file_len)); } Then I tried to run the application, it opens the Open File Dialog, I select a file(that is at \test.txt) that I've created with notepad, then I got my MessageBox saying that the file wans't found. Then I want to know why I'm getting this if the file is all correct? *PS: When I click to exit the MessageBox, I saw that the TextBox is displaying where the file is(I've tested with many other files, and with all I got the error and this).

    Read the article

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