Search Results

Search found 342 results on 14 pages for 'randy aldrich paulo'.

Page 8/14 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • How can the generic method called know the type of the generic return?

    - by Paulo Guedes
    I couldn't find a duplicate for this question for Java, although there are a lot of them for C#. I have this method: public <T> T getSomething() { // } According to the type of T, I will have a different return. For example: String a = getSomething(); int b = getSomething(); For a, my method will return a specific String. For b, it will return a specific int. And so on. It seems that this can be done with typeof() in C#. How can I achieve it in Java?

    Read the article

  • How to update the following rows after the sum of the previous rows reach a threshold? MySQL

    - by Paulo Faria
    I want to update the following rows after the sum of the previous rows reach a defined threshold. I'm using MySQL, and trying to think of a way to solve this using SQL only. Here's an example. Having the threshold 100. Iterating through the rows, when the sum of the previous rows amount = 100, set the following rows to checked. Before the operation: | id | amount | checked | | 1 | 50 | false | | 2 | 50 | false | | 3 | 20 | false | | 4 | 30 | false | After the operation: | id | amount | checked | | 1 | 50 | false | | 2 | 50 | false | <- threshold reached (50 + 50 = 100) | 3 | 20 | true* | | 4 | 30 | true* | Is it possible to do it with just a SQL query? Do I need a stored procedure? How could I implement it using either solution?

    Read the article

  • form validation without reset

    - by Paulo Bueno
    Hi guys Is there a way to check the data sent by a form to a PHP page return to the form page WITHOUT resetting the data sent and show a error? The form has 20 fields and I need to check one of them on a bd. If it fails the user may be redirected to the form page with the form populated and displaying a error message on the field which is 'wrong'. I would like any advice of a technique instead of populating each field using PHP.

    Read the article

  • Crash when using Cocos2d

    - by ipodfreak0313
    Sorry about the poor question title, it's just that this seems to big for a title. So here's the dirt: I am making a game (obviously) and I want the enemies to shoot (not necessarily at the player). I want the shoot method to be in the Enemies file, so as not to clutter up my HelloWorldLayer.m file even more. Here's what I'm using right now: HelloWorldLayer.m -(void)addEnemy:(BigAndStrongEnemy *)enemy { enemy = nil; if((arc4random() % 4) == 3) { enemy = [BigAndStrongEnemy enemy]; } else { enemy = [SmallAndFastEnemy enemy]; } if(buffDude.position.y > character.position.y || buffDude.position.y < (character.position.y + 10)) { } int rand = arc4random() % 320; if((arc4random() % 2 == 1)) { [enemy setPosition:ccp(0,rand)]; }else{ [enemy setPosition:ccp(480,rand)]; } [self animateEnemy:enemy]; [self addChild:enemy]; } -(void)animateEnemy:(BigAndStrongEnemy *)enemy2 { float randX = arc4random() % 480; float randY = arc4random() % 320; int rand = arc4random() % 320; CGPoint moveToPoint = CGPointMake(randX, (randY - rand)); [enemies addObject:enemy2]; action = [CCSequence actions: [CCMoveBy actionWithDuration:1 position:ccpMult(ccpNormalize(ccpSub(moveToPoint, enemy2.position)), 75)], [CCMoveBy actionWithDuration:3 position:ccp(buffDude.position.x,buffDude.position.y)], nil]; CCCallFuncO *a = [CCCallFuncO actionWithTarget:self selector:(@selector(shoot:)) object:enemy2]; CCSequence *s = [CCSequence actions:action,a, nil]; CCRepeatForever *repeat = [CCRepeatForever actionWithAction:s]; [enemy2 runAction:repeat]; } And here's the Shoot info from the Enemies class: Enemies.m: -(void)shoot:(id)sender { self = (BigAndStrongEnemy *)sender; [self shoot]; } -(void)spriteMoveFinished:(id)sender { CCSprite *b = (CCSprite *)sender; [self removeChild:b cleanup:YES]; } -(void)shoot { self = [CCSprite spriteWithFile:@"bigAndStrongEnemy.gif"]; CCSprite *b = [CCSprite spriteWithFile:@"bullet.gif"]; b.position = ccp(self.position.x,self.position.y); b.tag = 2; [self addChild:b]; [bullets addObject:b]; CGSize winSize = [[CCDirector sharedDirector] winSize]; CGPoint point = CGPointMake((winSize.width - (winSize.width - self.position.x)),0); [b runAction:[CCSequence actions: [CCMoveBy actionWithDuration:0.5 position:point], [CCCallFuncN actionWithTarget:self selector:@selector(spriteMoveFinished:)], nil]]; } Every time the 3 seconds goes by, the app crashes, and goes to the breakpoint in the CCCallFuncO file. I haven't touched it, is the thing. I am completely confused. Any help is greatly appreciated.

    Read the article

  • AutoMapper Problem - List won't Map

    - by Randy Minder
    I have the following class: public class Account { public int AccountID { get; set; } public Enterprise Enterprise { get; set; } public List<User> UserList { get; set; } } And I have the following method fragment: Entities.Account accountDto = new Entities.Account(); DAL.Entities.Account account; Mapper.CreateMap<DAL.Entities.Account, Entities.Account>(); Mapper.CreateMap<DAL.Entities.User, Entities.User>(); account = DAL.Account.GetByPrimaryKey(this.Database, primaryKey, withChildren); Mapper.Map(account,accountDto); return accountDto; When the method is called, the Account class gets mapped correctly but the list of users in the Account class does not (it is NULL). There are four User entities in the List that should get mapped. Could someone tell me what might be wrong?

    Read the article

  • How do I share a WiX fragment in two WiX projects?

    - by Randy Eppinger
    We have a WiX fragment in a file SomeDialog.wxs that prompts the user for some information. It's referenced in another fragment in InstallerUI.wxs file that controls the dialog order. Of course, Product.wxs is our main file. Works great. Now I have a second Visual Studio 2008 Wix 3.0 Project for the .MSI of another application and it needs to ask the user for the same information. I can't seem to figure out the best way to share the file so that changing the information requested will result in both .MSIs getting the new behavior. I honestly can't tell if a merge module, an .wsi (include) or a .wixlib is the right solution. I would have hoped to find a simple example of someone doing this but I have failed thus far. Edit: Based on Rob Mensching's wixlib blog entry, a wixlib may be the answer, but I am still searching for an example of how to do this.

    Read the article

  • Django Error - AttributeError: 'Settings' object has no attribute 'LOCALE_PATHS'

    - by Randy Simon
    I am trying to learn django by following along with this tutorial. I am using django version 1.1.1 I run django-admin.py startproject mysite and it creates the files it should. Then I try to start the server by running python manage.py runserver but here is where I get the following error. Traceback (most recent call last): File "manage.py", line 11, in <module> execute_manager(settings) File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 362, in execute_manager utility.execute() File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 303, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Library/Python/2.6/site-packages/django/core/management/base.py", line 195, in run_from_argv self.execute(*args, **options.__dict__) File "/Library/Python/2.6/site-packages/django/core/management/base.py", line 213, in execute translation.activate('en-us') File "/Library/Python/2.6/site-packages/django/utils/translation/__init__.py", line 73, in activate return real_activate(language) File "/Library/Python/2.6/site-packages/django/utils/translation/__init__.py", line 43, in delayed_loader return g['real_%s' % caller](*args, **kwargs) File "/Library/Python/2.6/site-packages/django/utils/translation/trans_real.py", line 205, in activate _active[currentThread()] = translation(language) File "/Library/Python/2.6/site-packages/django/utils/translation/trans_real.py", line 194, in translation default_translation = _fetch(settings.LANGUAGE_CODE) File "/Library/Python/2.6/site-packages/django/utils/translation/trans_real.py", line 172, in _fetch for localepath in settings.LOCALE_PATHS: File "/Library/Python/2.6/site-packages/django/utils/functional.py", line 273, in __getattr__ return getattr(self._wrapped, name) AttributeError: 'Settings' object has no attribute 'LOCALE_PATHS' Now, I can add a LOCAL_PATH atribute set to an empty string to my settings.py file but then it just complains about another setting and so on. What am I missing here?

    Read the article

  • python manage.py runserver fails

    - by Randy Simon
    I am trying to learn django by following along with this tutorial. I am using django version 1.1.1 I run django-admin.py startproject mysite and it creates the files it should. Then I try to start the server by running python manage.py runserver but here is where I get the following error. Traceback (most recent call last): File "manage.py", line 11, in <module> execute_manager(settings) File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 362, in execute_manager utility.execute() File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 303, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Library/Python/2.6/site-packages/django/core/management/base.py", line 195, in run_from_argv self.execute(*args, **options.__dict__) File "/Library/Python/2.6/site-packages/django/core/management/base.py", line 213, in execute translation.activate('en-us') File "/Library/Python/2.6/site-packages/django/utils/translation/__init__.py", line 73, in activate return real_activate(language) File "/Library/Python/2.6/site-packages/django/utils/translation/__init__.py", line 43, in delayed_loader return g['real_%s' % caller](*args, **kwargs) File "/Library/Python/2.6/site-packages/django/utils/translation/trans_real.py", line 205, in activate _active[currentThread()] = translation(language) File "/Library/Python/2.6/site-packages/django/utils/translation/trans_real.py", line 194, in translation default_translation = _fetch(settings.LANGUAGE_CODE) File "/Library/Python/2.6/site-packages/django/utils/translation/trans_real.py", line 172, in _fetch for localepath in settings.LOCALE_PATHS: File "/Library/Python/2.6/site-packages/django/utils/functional.py", line 273, in __getattr__ return getattr(self._wrapped, name) AttributeError: 'Settings' object has no attribute 'LOCALE_PATHS' Now, I can add a LOCALE_PATH atribute and set to an empty tuple to my settings.py file but then it just complains about another setting and so on. What am I missing here?

    Read the article

  • Xcode: Internal error occurred while creating dependency graph

    - by Randy Simon
    I just started getting this error today, seemingly out of nowhere. Any one see this before and know what causes it. Internal error occurred while creating dependency graph: *** -[NSCFArray initWithObjects:count:]: attempt to insert nil object at objects[10] This happens when I try to build with "iPhone Device 3.x" selected. However, if I select "iPhone Simulator 3.x", everything is fine.

    Read the article

  • Long Press in JavaScript?

    - by Randy Mayer
    Hi, Is it possible to implement "long press" in JavaScript (or jQuery)? How? HTML <a href="" title="">Long press</a> JavaScript $("a").mouseup(function(){ // Clear timeout return false; }).mousedown(function(){ // Set timeout return false; }); Thank you!

    Read the article

  • JSON Beautifier

    - by Randy Mayer
    Hi, do you know any "JSON Beautifier"? Thanks! From {"name":"Steve","surname":"Jobs","company":"Apple"} To { "name" : "Steve", "surname" : "Jobs", "company" : "Apple" }

    Read the article

  • SQL Server ':setvar' Error

    - by Randy Minder
    I am trying to create some script variables in T-SQL as follows: /* Deployment script for MesProduction_Preloaded_KLM_MesSap */ GO SET ANSI_NULLS, ANSI_PADDING, ANSI_WARNINGS, ARITHABORT, CONCAT_NULL_YIELDS_NULL, QUOTED_IDENTIFIER ON; SET NUMERIC_ROUNDABORT OFF; GO :setvar DatabaseName "MesProduction_Preloaded_KLM_MesSap" However, when I run this, I get an error stating 'Incorrect syntax near ':'. What am I doing wrong?

    Read the article

  • Help with Linked Server Error

    - by Randy Minder
    In SSMS 2008, I am trying to execute a stored procedure in a database on another server. The call looks something like the following: EXEC [RemoteServer].Database.Schema.StoredProcedureName @param1, @param2 The linked server is set up correctly, and has both RPC and RPC OUT set to true. Security on the linked server is set to Be made using the login's current security context. When I attempt to execute the stored procedure, I get the following error: Msg 18483, Level 14, State 1, Line 1 Could not connect to server 'RemoteServer' because '' is not defined as a remote login at the server. Verify that you have specified the correct login name. I am connected to the local server using Windows Authentication. Anyone know why I would be getting this error?

    Read the article

  • How do I get AutoMapper to map this?

    - by Randy Minder
    Say I have this class: public class Account { public int AccountID { get; set; } public Enterprise Enterprise { get; set; } public List<User> UserList { get; set; } } When I use AutoMapper to map the Account class, I would also like it to map the Enterprise class, and the list of users (UserList) in the returned object. How can I get AutoMapper to do this? Thanks!

    Read the article

  • Is WPF the Future of Windows UI Development?

    - by Randy Minder
    We're debating whether our future Windows UI development should be WinForms or WPF. How have some of you made this decision? Most of our applications are LOB applications, and I'm not sure I see a clear and overwhelming benefit to WPF for these types of applications. However, my knowledge of WPF is limited. I'm also a little concerned that WPF will be in vogue for another couple years and then Microsoft will get tired of it and push something else on us. I guess one argument against this is the fact that Visual Studio 2010 is a WPF application. Thanks.

    Read the article

  • Is WPF a good choice for developing line of business user interfaces?

    - by Randy Minder
    We're debating whether our future Windows UI development should be WinForms or WPF. How have some of you made this decision? Most of our applications are LOB applications, and I'm not sure I see a clear and overwhelming benefit to WPF for these types of applications. However, my knowledge of WPF is limited. I'm also a little concerned that WPF will be in vogue for another couple years and then Microsoft will get tired of it and push something else on us. I guess one argument against this is the fact that Visual Studio 2010 is a WPF application. Thanks.

    Read the article

  • So do programming languages get updated regularly like everyday applications or are they just x.0 re

    - by Randy
    I was wondering if programming languages and frameworks get updated in small increments or are they just x.0 releases? And if they do how do you keep up on all the changes in every update? I am specifically interested in Objective-C and Cocoa and CocoaTouch. I'm learning from books and online PDF's etc, but often they are at best a few years old. I just would like to know if there have been any changes etc. that should concern me and even if not, inevitably there will be, so where can I look out for them?

    Read the article

  • Zend Framework And Parameters

    - by Randy Mayer
    Hi! Is there any way how to view all sent parameters if I do not know their name? For example, I sent these parameters: id = 1 (GET) name = 'John' (GET) surname = 'Smith' (GET) Example $request = $this->getRequest(); echo $request->getParam[0]; // Will output 1 echo $request->getParam[1]; // Will output 'John' echo $request->getParam[2]; // Will output 'Smith' Thank you! (I'm not a native English speaker.)

    Read the article

  • JavaScript Templating Engine

    - by Randy Gurment
    Hi, I would like to create universal templating engine in JavaScript, how to? HTML template <h1><%title1%></h1> <h2><%title2%></h2> JSON file { "title1" : "Hello World!", "title2" : "Hi World!" } Javascript Find in HTML file <%title1% Find in JSON file variable "title1" Replace <%title1% with value of variable "title1" Same for <%title2% Thanks!

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14  | Next Page >