Search Results

Search found 842 results on 34 pages for 'greg bray'.

Page 19/34 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • iPhone: NSOperationQueue running operations serially

    - by Greg Maletic
    I have a singleton NSOperationQueue that handles all of my network requests. I'm noticing, however, that when I have one particularly long operation running (this particular operation takes at least 25 seconds), my other operations don't run until it completes. maxConcurrentOperationCount is set to NSOperationQueueDefaultMaxConcurrentOperationCount, so I don't believe that's the issue. Any reason why this would be happening? Besides spawning multiple NSOperationQueues (a solution that I'm not sure would work, nor am I sure it's a good idea), what's the best way to fix this problem? Thanks.

    Read the article

  • how can I future-proof migration of a ADO.net local data layer to a future web based interface (web-

    - by Greg
    Hi, BACKGROUND: I am working on a .NET WinForms application now (C#) with an ADO.net database for the data layer. QUESTION: How an I develop this now such that it would be easy to migrate to a model where the data layer is abstracted via a HTTP web-service or REST interface? For example would just use of a standard C# interface with a Factory to obtain a concrete implementation of the interface where this uses ADO.net be the best? thanks

    Read the article

  • error CS0133: Assigning the result of a function to a const in C#.net

    - by Greg
    Trying to tidy up scope and avoid possible multiple calls to RegisterWindowMessage. Currently have a class used once with the following member [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] static extern int RegisterWindowMessage(string lpString); private int m_message = RegisterWindowMessage("MY_MSG"); As we only have one instance this seems ok, but think it would be more tidy to use. With my basic C# understanding this should call RegisterWindowMessage and assign the result to int and not allow it to change. private const int message = RegisterWindowMessage("MY_MSG"); however attempting to do so leads to a error CS0133: The expression being assigned to 'someclass.messageEvent' must be constant so now I'm confused, does this mean the function was being assigned and called each time m_message was used previously, is there something else missing?

    Read the article

  • Is there a compact or express SQL Server version that I can package with my WinForms app & is free?

    - by Greg
    Hi, Is there a light weight version of SQL Server I could use that has the characteristics of: Free (assuming my winforms app is semi-commercial) Can be seemlessly packaged for deployment as part of the winforms click-once application? (i.e. ease in installation for the user). Light weight for the user (ideally something that just runs when the winforms application that uses it is running - but better than using XML sererialization for persistance). Thanks

    Read the article

  • WinForms - How do I access/call methods in UI thread from a separate thread without passing a delega

    - by Greg
    Hi, QUESTION: In .NET 3.5 WinForms apps, how do I access/call methods in UI thread from a separate thread, without passing a delegate? EXAMPLE: Say I have some code I want to run both (a) manually when the user clicks a button, and (b) periodically called by a process which is running in a separate non-mainUI thread but without passing a delegate. [Simplistically I'm thinking that the class that has this method is already been constructed, and the main UI thread has a handle to it, therefore if the process running in the separate thread could just get a handle to it from the main-UI thread it could call it. Hopefully this is not a flawed concept] BACKGROUND: I'm actually after a way to do the above for the case where my separate process thread is actually a job I schedule using quartz.net. The way the scheduler works I can't seem to actually pass in a delegate. There is a way to pass JobDetails, however it only seems to caters for things like string, int, etc. Hence what I'm after is a way to access the MainForm class for example, to call a method on it, from within the quartz.net job which runs in a separate thread. Thanks

    Read the article

  • add animation to layer's path in cocos2d

    - by greg rock
    so i'm on cocos2d but before I was on a normal ios app and I had this code : -(void)viewDidLoad{ rootLayer = [[CALayer alloc] init]; [imageView.layer addSublayer:rootLayer]; roundPath = CGPathCreateMutable(); CGPathMoveToPoint(roundPath, nil, center.x , center.y - 35); CGPathAddArcToPoint(roundPath, nil, center.x + 35, center.y - 35, center.x + 35, center.y + 35, 35); CGPathAddArcToPoint(roundPath, nil, center.x + 35, center.y + 35, center.x - 35, center.y + 35, 35); CGPathAddArcToPoint(roundPath, nil, center.x - 35, center.y + 35, center.x - 35, center.y, 35); CGPathAddArcToPoint(roundPath, nil, center.x - 35, center.y - 35, center.x, center.y - 35, 35); CGPathCloseSubpath(roundPath); //Box Path boxPath = CGPathCreateMutable(); CGPathMoveToPoint(boxPath, nil, center.x , center.y - 35); CGPathAddArcToPoint(boxPath, nil, center.x + 35, center.y - 35, center.x + 35, center.y + 35, 4.7); CGPathAddArcToPoint(boxPath, nil, center.x + 35, center.y + 35, center.x - 35, center.y + 35, 4.7); CGPathAddArcToPoint(boxPath, nil, center.x - 35, center.y + 35, center.x - 35, center.y, 4.7); CGPathAddArcToPoint(boxPath, nil, center.x - 35, center.y - 35, center.x, center.y - 35, 4.7); CGPathCloseSubpath(boxPath); shapeLayer = [CAShapeLayer layer]; shapeLayer.path = boxPath; [rootLayer addSublayer:shapeLayer]; } -(void)startAnimation { CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"path"]; animation.duration = 2.0; animation.repeatCount = HUGE_VALF; animation.autoreverses = YES; animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; animation.fromValue = (id)boxPath; animation.toValue = (id)roundPath; [shapeLayer addAnimation:animation forKey:@"animatePath"]; } But I didn't found a way to do the animation fromboxpath toroundpath on cocos2d, I don't know what CCAction use . Can anybody help me ? sorry for my english I'm french :/

    Read the article

  • How do I specify table data only for the current user's ID (VWD asp.net 3.5) ?

    - by Greg McNulty
    I'm using the Details View control of VWD asp.net 2008 I have a users database table and one of the columns contain the "unique" user's profile ID, created by VWD from the automatic profiles table. From my table, I would like to select only the data pertaining to the logged in user. How do I get the current unique user profileID and then have that used for the query? What I have so far: In the configure data source option of the control I select the columns I would like to display, select the check box for "Return Only Unique IDs" and the WHERE option. In this new window I select the Column to the profile userID ... "=" and then assumed I should select Source: "Profile". Now what should the parameter properties or value be to select only the logged userID specific data of the table? Any help is appreciated. Thank You!

    Read the article

  • Issues with dynamically loading modules in code with Silverlight/Prism

    - by Greg Bailey
    In my Bootstrapper.cs in GetModuleCatalog, I need to specify the Module types using the typeof(ModuleType). In the example below I'm trying to load the Contact module on demand, but in order to get it into my module catalog, I need to have a reference to it in the project that holds my Bootstrapper. When I add a reference to Contact, then the Contact.dll gets added to the initial xap file, which defeats the purpose of loading the module dynamically. Am I missing something? Do you have to load the module catalog from a file to make this work? var catalog = new ModuleCatalog(); catalog.AddModule(typeof(Core)); catalog.AddModule(typeof(Contact), InitializationMode.OnDemand);

    Read the article

  • Should primitive types or non-primitive types be preferred in Java interfaces?

    - by Greg Mattes
    (I thought I once read something about this in a book, but now I'm not sure where to find it. If this question reminds you of some material that you've read, please post a reference!) What are the pros and the cons of primitives in interfaces? In other words, is one of these preferable to the other and why? Perhaps one is preferable to the other in certain contexts? public interface Foo { int getBar(); } or public interface Foo { Integer getBar(); } Similarly: public interface Boz { void someOperation(int parameter); } or public interface Boz { void someOperation(Integer parameter); } Obviously there's the issue of having to deal with nulls in the non-primitive case, but are there deeper concerns?

    Read the article

  • how can I add a custom non-DataTable column to my DataView, in a winforms ADO.net application?

    - by Greg
    Hi, How could I (/is it possible) to add a custom column to my DataView, and in this column display the result of a specific calculation. That is, I currently have a dataGridView which has a binding to a DataView, based on the DataTable from my database. I'd like to add an additional column to the dataGridView to display a number which is calculated by looking at this current row plus it's children row. In other words the info for the column isn't just derivable from the row data itself. Specific questions might be: a) where to add the column itself? to the DataView I assume? b) which method / event to trigger the re-calculation of the value of this custom column from ( / how do I control this) Thanks PS. I've also noted if I use the following code/approach I get a infinite loop... // Custom Items DataColumn dc = new DataColumn("OverallSize", typeof(long)); DT_Webfiles.Columns.Add(dc); DT_Webfiles.RowChanged += new DataRowChangeEventHandler(DT_Row_Changed); private static void DT_Row_Changed(object sender, DataRowChangeEventArgs e) { e.Row["OverallSize"] = e.Row["OverallSize"] ?? 0; e.Row["OverallSize"] = (long)e.Row["OverallSize"] + 1; } What other approach could avoid this looping. i.e. currently I'm saying update the value of the custom column when the row changes, however after then changing the row it triggers antoher 'row has changed' event...

    Read the article

  • T-SQL - Left Outer Joins - Filters in the where clause versus the on clause.

    - by Greg Potter
    I am trying to compare two tables to find rows in each table that is not in the other. Table 1 has a groupby column to create 2 sets of data within table one. groupby number ----------- ----------- 1 1 1 2 2 1 2 2 2 4 Table 2 has only one column. number ----------- 1 3 4 So Table 1 has the values 1,2,4 in group 2 and Table 2 has the values 1,3,4. I expect the following result when joining for Group 2: `Table 1 LEFT OUTER Join Table 2` T1_Groupby T1_Number T2_Number ----------- ----------- ----------- 2 2 NULL `Table 2 LEFT OUTER Join Table 1` T1_Groupby T1_Number T2_Number ----------- ----------- ----------- NULL NULL 3 The only way I can get this to work is if I put a where clause for the first join: PRINT 'Table 1 LEFT OUTER Join Table 2, with WHERE clause' select table1.groupby as [T1_Groupby], table1.number as [T1_Number], table2.number as [T2_Number] from table1 LEFT OUTER join table2 --****************************** on table1.number = table2.number --****************************** WHERE table1.groupby = 2 AND table2.number IS NULL and a filter in the ON for the second: PRINT 'Table 2 LEFT OUTER Join Table 1, with ON clause' select table1.groupby as [T1_Groupby], table1.number as [T1_Number], table2.number as [T2_Number] from table2 LEFT OUTER join table1 --****************************** on table2.number = table1.number AND table1.groupby = 2 --****************************** WHERE table1.number IS NULL Can anyone come up with a way of not using the filter in the on clause but in the where clause? The context of this is I have a staging area in a database and I want to identify new records and records that have been deleted. The groupby field is the equivalent of a batchid for an extract and I am comparing the latest extract in a temp table to a the batch from yesterday stored in a partioneds table, which also has all the previously extracted batches as well. Code to create table 1 and 2: create table table1 (number int, groupby int) create table table2 (number int) insert into table1 (number, groupby) values (1, 1) insert into table1 (number, groupby) values (2, 1) insert into table1 (number, groupby) values (1, 2) insert into table2 (number) values (1) insert into table1 (number, groupby) values (2, 2) insert into table2 (number) values (3) insert into table1 (number, groupby) values (4, 2) insert into table2 (number) values (4) EDIT: A bit more context - depending on where I put the filter I different results. As stated above the where clause gives me the correct result in one state and the ON in the other. I am looking for a consistent way of doing this. Where - select table1.groupby as [T1_Groupby], table1.number as [T1_Number], table2.number as [T2_Number] from table1 LEFT OUTER join table2 --****************************** on table1.number = table2.number --****************************** WHERE table1.groupby = 2 AND table2.number IS NULL Result: T1_Groupby T1_Number T2_Number ----------- ----------- ----------- 2 2 NULL On - select table1.groupby as [T1_Groupby], table1.number as [T1_Number], table2.number as [T2_Number] from table1 LEFT OUTER join table2 --****************************** on table1.number = table2.number AND table1.groupby = 2 --****************************** WHERE table2.number IS NULL Result: T1_Groupby T1_Number T2_Number ----------- ----------- ----------- 1 1 NULL 2 2 NULL 1 2 NULL Where (table 2 this time) - select table1.groupby as [T1_Groupby], table1.number as [T1_Number], table2.number as [T2_Number] from table2 LEFT OUTER join table1 --****************************** on table2.number = table1.number AND table1.groupby = 2 --****************************** WHERE table1.number IS NULL Result: T1_Groupby T1_Number T2_Number ----------- ----------- ----------- NULL NULL 3 On - select table1.groupby as [T1_Groupby], table1.number as [T1_Number], table2.number as [T2_Number] from table2 LEFT OUTER join table1 --****************************** on table2.number = table1.number --****************************** WHERE table1.number IS NULL AND table1.groupby = 2 Result: T1_Groupby T1_Number T2_Number ----------- ----------- ----------- (0) rows returned

    Read the article

  • 'abstract class' versus 'normal class' for a reusable library

    - by Greg
    I'm developing a reusable library and have been creating abstract classes, so the client can then extend from these. QUESTION: Is there any reason in fact I should use an abstract class here as opposed to just a normal class? Note - Have already decided I do not want to use interfaces as I want to include actual default methods in my library so the client using it doesn't have to write the code.

    Read the article

  • My iPhone app needs a persistent network connection...how to specify UIRequiredDeviceCapabilities?

    - by Greg Maletic
    I'm trying to set the UIRequiredDeviceCapabilities properties in my Info.plist file. My app requires a persistent network connection. If I look at the definition for the "wifi" key, it says: Include this key if your application requires access to the networking features of the device. So: does the "wifi" key indicate that I need WiFi, as the key name would suggest? Or does it mean that I simply need network access, as the key definition would suggest?

    Read the article

  • How do I setup NInject? (I'm getting can't resolve "Bind", in the line "Bind<IWeapon>().To<Sword>()

    - by Greg
    Hi, I'm getting confused in the doco how I should be setting up Ninject. I'm seeing different ways of doing it, some v2 versus v1 confusion probably included... Question - What is the best way in my WinForms application to set things up for NInject (i.e. what are the few lines of code required). I'm assuming this would go into the MainForm Load method. In other words what code do I have to have prior to getting to: Bind<IWeapon>().To<Sword>(); I have the following code, so effectively I just want to get clarification on the setup and bind code that would be required in my MainForm.Load() to end up with a concrete Samurai instance? internal interface IWeapon { void Hit(string target); } class Sword : IWeapon { public void Hit(string target) { Console.WriteLine("Chopped {0} clean in half", target); } } class Samurai { private IWeapon _weapon; [Inject] public Samurai(IWeapon weapon) { _weapon = weapon; } public void Attack(string target) { _weapon.Hit(target); } } thanks PS. I've tried the following code, however I can't resolve the "Bind". Where does this come from? what DLL or "using" statement would I be missing? private void MainForm_Load(object sender, EventArgs e) { Bind<IWeapon>().To<Sword>(); // <== *** CAN NOT RESOLVE Bind *** IKernel kernel = new StandardKernel(); var samurai = kernel.Get<Samurai>();

    Read the article

  • Create a bitonal image for OCR using Image Magick

    - by Greg
    nice /usr/local/bin/convert -colors 2 -colorspace gray -compress group4 /var/www/html/uploads/pokemon.jpg /var/www/html/uploads/pokemontest.jpg This command worked with a really OLD version of Image Magick. With the newest version this method produces a completely black image. nice /usr/local/bin/convert -colorspace gray -compress group4 /var/www/html/uploads/pokemon.jpg /var/www/html/uploads/pokemontest.jpg nice /usr/local/bin/convert -colors 2 /var/www/html/uploads/pokemontest.jpg /var/www/html/uploads/pokemontestfinal.jpg This results in a bitonal gray and black image, but it's really rough. NOT clean at all.

    Read the article

  • SQL Agent Command Line Not Saved

    - by Greg
    I have a SSIS package I am trying to schedule. I create a new job under SQL Server Agent. On the Command line tab of the jobstep, I choose "Edit the command-line manually". The changes are retained as I switch from tab to tab within the job step but whenever I exit and save the job, the changes are lost. Any ideas what's going on? I'm on SQL Server 2008.

    Read the article

  • Is it possible to implement X-HTTP-Method-Override in ASP.NET MVC?

    - by Greg Beech
    I'm implementing a prototype of a RESTful API using ASP.NET MVC and apart from the odd bug here and there I've achieve all the requirements I set out at the start, apart from callers being able to use the X-HTTP-Method-Override custom header to override the HTTP method. What I'd like is that the following request... GET /someresource/123 HTTP/1.1 X-HTTP-Method-Override: DELETE ...would be dispatched to my controller method that implements the DELETE functionality rather than the GET functionality for that action (assuming that there are multiple methods implementing the action, and that they are marked with different [AcceptVerbs] attributes). So, given the following two methods, I would like the above request to be dispatched to the second one: [ActionName("someresource")] [AcceptVerbs(HttpVerbs.Get)] public ActionResult GetSomeResource(int id) { /* ... */ } [ActionName("someresource")] [AcceptVerbs(HttpVerbs.Delete)] public ActionResult DeleteSomeResource(int id) { /* ... */ } Does anybody know if this is possible? And how much work would it be to do so...?

    Read the article

  • How can I scale an OSMF player in ActionScript 3/Flex

    - by Greg Hinch
    I am trying to create a simple video player SWF using the open source media framework in Flex 4. I want to make it dynamically scale based on the dimensions of the video, input by the user. I am following the directions on the Adobe help site, but the video does not seem to scale properly. Depending on the size, sometimes videos play larger than the space allotted on the webpage, and sometimes smaller. The only way I have been able to get it to work properly is by including a SWF metadata tag hardcoding the width and height, but I can't use that if I want to make the player dynamically sized. My code is : package { import flash.display.Sprite; import flash.events.Event; import org.osmf.media.MediaElement; import org.osmf.media.MediaPlayer; import org.osmf.media.URLResource; import org.osmf.containers.MediaContainer; import org.osmf.elements.VideoElement; import org.osmf.layout.LayoutMetadata; public class GalleryVideoPlayer extends Sprite { private var videoElement:VideoElement; private var mediaPlayer:MediaPlayer; private var mediaContainer:MediaContainer; private var flashVars:Object; public function GalleryVideoPlayer() { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); flashVars = loaderInfo.parameters; mediaPlayer = new MediaPlayer(); videoElement = new VideoElement(new URLResource(flashVars.file)); mediaContainer = new MediaContainer(); var layoutMetadata:LayoutMetadata = new LayoutMetadata(); layoutMetadata.width = Number(flashVars.width); layoutMetadata.height = Number(flashVars.height); videoElement.addMetadata(LayoutMetadata.LAYOUT_NAMESPACE, layoutMetadata); mediaPlayer.media = videoElement; mediaContainer.addMediaElement(videoElement); addChild(mediaContainer); } }}

    Read the article

  • My first .net web app - should I go straight to MVC framework (c.f. ASP.net)

    - by Greg
    Hi, I'm done some WinForms work in C# but now moving to have to develop a web application front end in .NET (C#). I have experience developing web apps in Ruby on Rails (& a little with Java with JSP pages & struts mvc). Should I jump straight to MVC framework? (as opposed to going ASP.net) That is from the point of view of future direction for Microsoft & as well ease in ramping up from myself. Or if you like, given my experience to date, what would the pros/cons for me re MVC versus ASP.net? thanks

    Read the article

  • In App Purchase - can get product info but can't connect to itunes for purchase

    - by Greg
    I'm trying to make "In App Purchase " works in my iphone app. I created some products and a few test accounts in itunes connect. I have no problem to retreive the products data (prices etc..) but when I try to make a payment - I am asked to log in - I use a test account - the transaction always fail with the following error : failedTransaction with error : Error Domain=SKErrorDomain Code=2 "Connexion à l’iTunes Store impossible" UserInfo=0x65d02a0 {NSLocalizedDescription=Connexion à l’iTunes Store impossible} I tried with several products and test account (even in other stores like us) but I still get the same error... NB : I think it worked fine the first time I tried but never still Any idea will be welcome ! Thanks

    Read the article

  • Specify Windows Service Name on install with Setup Project

    - by sympatric greg
    Objective: In support of a Windows Service that may have multiple instances on a single machine, use a Setup Project to create an MSI capable of: Receiving user input for Service Name Installing service Serializing Service Name from 1 (so that the proper name can be used in logging and uninstall) My initial hope was to set Service Name in App.config (and then retrieve it during uninstall upon instantiation of the ServiceInstaller. This seems to have been naive, because it is not accessible during the install. If MyInstaller extends Installer, it can call base.Install(); however, my attempts to write to app.config (within MyInstaller.Install() and after base.Install()) are inneffective. So while the service can be installed with a custom Service Name, that name is not serialized and the installer is most displeased upon uninstall. How should this be done?

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >