Search Results

Search found 3786 results on 152 pages for 'life'.

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

  • How to give new life into a five years old, simple but reliable PHP form?

    - by Sam
    Hi all. I have a script in php 5.2. I want to use a simple form. I found something a programmer made for me about 5 years ago. When I use it, PHP outputs an error now unless I set register_long_arrays = On, then it works fine. On the PHP website, however, it says: Warning This feature has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged. It's recommended to turn them off, for performance reasons. Instead, use the superglobal arrays, like $_GET. Should I listen to PHP's warning, or just enable the option and keep using my old form happily? If the former, then how/where do I change this simple form, so it does not rely on the deprecated setting? Your answer is much appreciated. form.htm <html><body> <form method="POST" action="form_sent.php"> ... </form> </body></html> form_sent.php <html><body> <?php $email = $HTTP_POST_VARS[email]; $mailto = "[email protected]"; $mailsubj = "A Form was Sent from Website!"; $mailhead = "From: $email\n"; reset ($HTTP_POST_VARS); $mailbody = "Values submitted from web site form:\n"; while (list($key, $val) = each ($HTTP_POST_VARS)){$mailbody .= "$key : $val\n";} if (!eregi("\n",$HTTP_POST_VARS[email])) { mail($mailto, $mailsubj, $mailbody, $mailhead); } ?> <b>Form Sent. Thank you.</b> </body></html>

    Read the article

  • What's the reason why core data takes care of the life-cycle of modeled properties?

    - by mystify
    The docs say that I should not release any modeled property in -dealloc. For me, that feels like violating the big memory management rules. I see a big retain in the header and no -release, because Core Data seems to do it at any other time. Is it because Core Data may drop the value of a property dynamically, at any time when needed? And what's Core Data doing when dropping an managed object? If there's no -dealloc, then how and when are the properties getting freed up?

    Read the article

  • Why does my int, booleans, doubles does not work?

    - by SystemNetworks
    As you see, my code does not work. When armor1 is true, it would add my life. goldA is another class. public void goldenArmor(GameContainer gc, StateBasedGame sbg, Graphics g) { if(armor1==true) { goldA.life = life; goldA.intelligence = intelligence; goldA.power = power; goldA.lifeLeft = lifeLeft; goldA.head(); goldA.body(); goldA.legs(); } } My other class: package javagame; import org.newdawn.slick.GameContainer; import org.newdawn.slick.Graphics; import org.newdawn.slick.Image; import org.newdawn.slick.Input; import org.newdawn.slick.SlickException; /* Note: Copyright(C)2012 System Networks | Square NET | Julius Bryan Gambe. You cannot copy the style, story of the game and gameplay! To programmers: The int,doubles,strings,booleans are properly sorted out. Please don't mess it up. */ /* NOTE: We have loops but not for programming. The loop is: 1.show the world to user 2.Obtain input from the user 3.Shows the update, repeat step 1 */ import org.newdawn.slick.*; import org.newdawn.slick.state.*; import org.lwjgl.input.Mouse; //contents: // public class GoldenArmor{ //get it from play public int life; public double intelligence; public int lifeLeft; public double power; public GoldenArmor() { // TODO Auto-generated constructor stub } //start here public void head() { life += 10; intelligence +=0.5; } public void body() { lifeLeft += 100; } public void legs() { power += 100; } } /* SYSTEM NETWORKS(C) 2012 NET FRONT */ The life, intelligence, power, lifeLeft are nothing but to use it as just reference to prevent stack overflow. And at my main class, it becomes my real booleans, int, doubles. How do I fix this? It does not add it to my normal int.

    Read the article

  • Is text-only mode a saving or a problem for battery savings?

    - by Robottinosino
    A friend is flying to the US from Europe and asked me a very thought-provoking question, which I am not remotely able to answer with substance so I am asking it here: How to absolutely maximise battery life on an Ubuntu (laptop) install? do not rush to mark this as duplicate, there is an important point here: does -GNOME- help or worsen battery life? Let me provide some context: The only task he needs to perform is: edit text files in Vim. He is unsure whether running GNOME will drain his battery life more or actually save him some battery life given the smarts of GNOME's power management features like "switch this peripheral to -power save- after X minutes..." (GNOME might just be a configuration front-end for settings that are governed by command-line utils for all I know?) He could perfectly well boot the system in text-only mode and use the automatic 6 virtual consoles for his needs, if that's a saving at all over running tmux (I think so because of all the smart buffering/history/etc the latter does by default?) Exactly how would you advise him to run his laptop during his flight? What I told him already: power off WiFi in the BIOS, not from the "GUI" power off Bluetooth switch off the courtesy light and use low monitor brightness play music off of his phone, not mp3blaster do not use his tiny portable mouse (and do not attach any other USB gimmicks like "screen light", etc) stop development services he will not be using, especially apache2, tomcat, dovecot, postgresql, etc. Potentially: - switch off his cron jobs? (he does an rsync + tar + 7za of his "work in progress" every so often) I think the above is standard stuff one could get off StackExchange, and with many duplicates... the core of this question is, I think: __ will running Ubuntu in text-only mode be a saving in terms of battery life or a problem? why? (provide some technical arguments) __ I think it will be a saving but I am also scared about "other things" detecting and enabling advanced chipset power management features only when some services are started.. and fear these "services" may be off in text-only mode?

    Read the article

  • Unity, Unrealistic Sphere On Inclined Plane

    - by user1086516
    So I am trying to model a ball rolling down an inclined surface in Unity based on what I am observing in real life but it is still quite off. In Unity it takes the ball about 3 seconds to travel from a place to another specified place where in real life it only takes 1 second. The ball isn't as fast to react to the incline as in real life (even though I have tried giving the ball and surface low or zero friction values) The ball does not accelerate as nearly as fast as it does in real life What do I do to give the ball more realistic behavior ? I have tried messing around with mass, physics materials, drag, and angular drag on the ball and surface but it doesn't seem to be helping.

    Read the article

  • How to add LDAP user to existing local group in RHEL?

    - by Highway of Life
    I'm attempting to add some of our LDAP users to a locally defined group on our RHEL server, however I get an error stating that the LDAP user is not found in /etc/passwd. What would be the best way to allow LDAP users to be added to local groups? My feeling is that this must be done manually. I could edit: /etc/group and add the LDAP group to the list. Would that be ideal? [server]# id apache uid=409(apache) gid=409(apache) groups=409(apache) context=user_u:system_r:unconfined_t:s0 [server]# id john.doe uid=11389(john.doe) gid=6097(ABC_Corporate_US) groups=6097(ABC_Corporate_US) context=user_u:system_r:unconfined_t:s0 [server]# /usr/sbin/usermod -a -G apache john.doe usermod: john.doe not found in /etc/passwd OS: RHEL (Red Hat Enterprise Linux Server release 5.3 (Tikanga)) Note: Updating the OS on this machine is not an option.

    Read the article

  • nagios wrongly reports packet loss

    - by Alien Life Form
    Lately, on my nagios 3.2.3 install (CentOS5, monitoring ~ 300 hosts, 1150 services) has sdtarted to occasionally report high packet loss on 50-60 hosts at a time. Problem is it's bogus. Manual runs of ping (or its own check_ping binary) finds no fault with any of the affected hosts. The only possible cures I found so far are: run all the checks manually (they will succeed but it may act up again on next check) acknowledge and wait for the problem to go away (may take several ours) I suspect (but have no particular reason other than single rescheduled checks succeeding) that the problem may lay with all the checks being mass scheduled together - in which case introducing some jitter in the scheduling (how?) might help. Or it may be something completely different. Ideas, anyone?

    Read the article

  • Best shortcut in Total Commander

    - by life-warrior
    So, what's your favourite TC shortcut or shortcut combination ? Which one do you use and for what purpose ? Among my most often used: Ctrl-Left ( or Ctrl-Right ) - open archive or folder under cursor in opposite tab. Ctrl-Shift-Enter, Alt-F8, Ctrl-X - copy full file path to clipboard. Shift-F6, Shift-End(if needed), Ctrl-C - copy only file name w/o path. Select files, Ctrl-M - multi-rename, for example remove "DVDrip" from file names. Ctrl-\ - go to root directory. Ctrl-D, - go to directory with highlighted letter specified. For example, name a downloads directory "&Downloads" in favourites, and the letter after ampersand will be highlighted. Alt-F7, feed to listbox, Ctrl-A, Mark(menu)-Save selection to file - creates a file with all files and directories inside current, with full path. Ctrl-[3-6] - sort files by name(3), extension(4), date(5), size(6). For example, Sort by name, when you need movies and soundracks with the same name and different extension to group them together. Sort by extension, when you need to find EXEs in Windows directory. Sort by Date, when you need to find the latest file downloaded in your dir. Sort by size, when you need to delete the largest files for free space.

    Read the article

  • Nagios: turn off service checks/display on down hosts

    - by Alien Life Form
    I want to to tweak nagios in such a way that all checking stops (with services not displayed, or displayed as unknown) for any down node. Said differently I only want to see one alert for a down host instead of 1 (down) + n (1 for every service). Note that I am interested in service display/status, not only in turning off notifications. Rationale: we use the nagios firefox/chrome plugin to monitor status and nagios' behavior is too noisy giving readings like these (because every node has 20 services): 3 down, 1 unreachable, 4 warnings, 87 critical This means that the 7 critical services on up node (the problem is on the service) are swamped in a slab of red services which are critical only because they sit on a node that's down/unreachable. What I'd rather like to see is: 3 down, 1 unreachable, 80 unknown, 4 warnings, 7 critical Or even 3 down, 1 unreachable, 4 warnings, 7 critical I have looked in service dependencies but I did not fine a way to describe: "make all services on a alive-host dependen on the status of the host check". I found the problem discussed here, where one of the participants thought it was a nagios bug, and here where one of the participants thought it was "as designed". As things are, I am just interested in the effect, much less in the design philosophy. Note that this nagios is checking hundreds of nodes, so the maintainablilty of the solution is also important. TIA and cheers.

    Read the article

  • WebCenter Innovation Award Winners

    - by Michael Snow
    Of course, here on our WebCenter blog – we’d like to highlight and brag about our great WebCenter winners. The 2012 WebCenter Innovation Award Winners University of Louisville Location: Louisville, KY, USA Industry: Higher Education Fusion Middleware Products: WebCenter Portal, WebCenter Content, JDeveloper, WebLogic, Oracle BI, Oracle IdM University of Louisville is a state supported research university Statewide Informatics Network to improve public health The University of Louisville has implemented WebCenter as part of the LOUI (Louisville Informatics Institute) Initiative, a Statewide Informatics Network, which will improve public healthcare and lower cost through the use of novel technology and next generation analytics, decision support and innovative outcomes-based payment systems. ---------- News Limited Country/Region: Australia Industry: News/Media FMW Products: WebCenter Sites Single platform running websites for 50% of Australia's newspapers News Corp is running half of Australia's newspaper websites on this shared platform powered by Oracle WebCenter Sites and have overtaken their nearest competitors and are now leading in terms of monthly page impressions. At peak they have over 250 editors on the system publishing in real-time.Sites include: www.newsspace.com.au, www.news.com.au, www.theaustralian.com.au and many others ------ Life Technologies Corp. Country/Region: Carlsbad, CA, USAIndustry: Life SciencesFMW Products: WebCenter Portal, SOA Suite Life Technologies Corp. is a global biotechnology tools company dedicated to improving the human condition with innovative life science products. They were awarded an innovation award for their solution utilizing WebCenter Portal for remotely monitoring & repairing biotech instruments. They deployed WebCenter as a portal that accesses Life Technologies cloud based service monitoring system where all customer deployed instruments can be remotely monitored and proactively repaired.  The portal provides alerts from these cloud based monitoring services directly to the customer and to Life Technologies Field Engineers.  The Portal provides insight into the instruments and services customers purchased for the purpose of analyzing and anticipating future customer needs and creating targeted sales and service programs. ----- China Mobile Jiangsu China Mobile Jiangsu is one of the biggest subsidiaries of China Mobile. It has over 25,000 employees and 40 million mobile subscribers. Country/Region: Jiangsu, China Industry: Telecommunications FMW Products: WebCenter Portal, WebCenter Content, JDeveloper, SOA Suite, IdM They were awarded an Innovation Award for their new employee platform powered by WebCenter Portal is designed to serve their 25,000+ employees and help them drive collaboration & productivity. JSMCC (Chian Mobile Jiangsu) Employee Enterprise Portal and Collaboration Platform. It is one of the China Mobile’s most important IT innovation projects. The new platform is designed to serve for JSMCC’s 25000+ employees and to help them improve the working efficiency, changing their traditional working mode to social ways, encouraging employees on business collaboration and innovation. The solution is built on top of Oracle WebCenter Portal Framework and WebCenter Spaces while also leveraging Weblogic Server, UCM, OID, OAM, SES, IRM and Oracle Database 11g. By providing rich collaboration services, knowledge management services, sensitive document protection services, unified user identity management services, unified information search services and personalized information integration capabilities, the working efficiency of JSMCC employees has been greatly improved. Main Functionality : Information portal, office automation integration, personal space, group space, team collaboration with web2.0 services, unified search engine for multiple data sources, document management and protection. SSO for multiple platforms. -------- LADWP – Los Angeles Department for Water and Power Los Angeles Department of Water and Power (LADWP) is the largest public utility company in United States with over 1.6 Million customers. LADWP provides water and power for millions of residential & commercial customers in Southern California. LADWP also bills most of these customers for sanitation services provided by another city department. Country/Region: US – Los Angeles, CA Industry: Public Utility FMW Products: WebCenter Portal, WebCenter Content, JDeveloper, SOA Suite, IdM The new infrastructure consists of: Oracle WebCenter Portal including mobile portal Oracle WebCenter Content for Content Management and Digital Asset Management (DAM) Oracle OAM (IDM, OVD, OAM) integrated with AD for enterprise identity management Oracle Siebel for CRM Oracle DB Oracle SOA Suite for integration of various subsystems and back end systems  The new portal's features include: Complete Graphical redesign based on best practices in UI Design for high usability Customer Self Service implemented through MyAccount (Bill Pay, Payment History, Bill History, Usage Analysis, Service Request Management) Financial Assistance Programs (CRM, WebCenter) Customer Rebate Programs (CRM, WebCenter) Turn On/Off/Transfer of services (Commercial & Residential) Outage Reporting eNotification (SMS, email) Multilingual (English & Spanish) – using WebCenter multi-language support Section 508 (ADA) Compliant Search – Using WebCenter SES (Secured Enterprise Search) Distributed Authorship in WebCenter Content Mobile Access (any Mobile Browser)

    Read the article

  • How do you formulate the Domain Model in Domain Driven Design properly (Bounded Contexts, Domains)?

    - by lko
    Say you have a few applications which deal with a few different Core Domains. The examples are made up and it's hard to put a real example with meaningful data together (concisely). In Domain Driven Design (DDD) when you start looking at Bounded Contexts and Domains/Sub Domains, it says that a Bounded Context is a "phase" in a lifecycle. An example of Context here would be within an ecommerce system. Although you could model this as a single system, it would also warrant splitting into separate Contexts. Each of these areas within the application have their own Ubiquitous Language, their own Model, and a way to talk to other Bounded Contexts to obtain the information they need. The Core, Sub, and Generic Domains are the area of expertise and can be numerous in complex applications. Say there is a long process dealing with an Entity for example a Book in a core domain. Now looking at the Bounded Contexts there can be a number of phases in the books life-cycle. Say outline, creation, correction, publish, sale phases. Now imagine a second core domain, perhaps a store domain. The publisher has its own branch of stores to sell books. The store can have a number of Bounded Contexts (life-cycle phases) for example a "Stock" or "Inventory" context. In the first domain there is probably a Book database table with basically just an ID to track the different book Entities in the different life-cycles. Now suppose you have 10+ supporting domains e.g. Users, Catalogs, Inventory, .. (hard to think of relevant examples). For example a DomainModel for the Book Outline phase, the Creation phase, Correction phase, Publish phase, Sale phase. Then for the Store core domain it probably has a number of life-cycle phases. public class BookId : Entity { public long Id { get; set; } } In the creation phase (Bounded Context) the book could be a simple class. public class Book : BookId { public string Title { get; set; } public List<string> Chapters { get; set; } //... } Whereas in the publish phase (Bounded Context) it would have all the text, release date etc. public class Book : BookId { public DateTime ReleaseDate { get; set; } //... } The immediate benefit I can see in separating by "life-cycle phase" is that it's a great way to separate business logic so there aren't mammoth all-encompassing Entities nor Domain Services. A problem I have is figuring out how to concretely define the rules to the physical layout of the Domain Model. A. Does the Domain Model get "modeled" so there are as many bounded contexts (separate projects etc.) as there are life-cycle phases across the core domains in a complex application? Edit: Answer to A. Yes, according to the answer by Alexey Zimarev there should be an entire "Domain" for each bounded context. B. Is the Domain Model typically arranged by Bounded Contexts (or Domains, or both)? Edit: Answer to B. Each Bounded Context should have its own complete "Domain" (Service/Entities/VO's/Repositories) C. Does it mean there can easily be 10's of "segregated" Domain Models and multiple projects can use it (the Entities/Value Objects)? Edit: Answer to C. There is a complete "Domain" for each Bounded Context and the Domain Model (Entity/VO layer/project) isn't "used" by the other Bounded Contexts directly, only via chosen paths (i.e. via Domain Events). The part that I am trying to figure out is how the Domain Model is actually implemented once you start to figure out your Bounded Contexts and Core/Sub Domains, particularly in complex applications. The goal is to establish the definitions which can help to separate Entities between the Bounded Contexts and Domains.

    Read the article

  • How to safely purge in Varnish if backend is sick without losing content

    - by Highway of Life
    If the backend is sick, what is the preferable way to ensure that stale content can be retrieved from the backend when a PURGE request is made? When a PURGE request is made, whether or not the backend is sick, by default the content will be eliminated from the Varnish cache and if the backend is down, a 503 page would be served to the user until the backend comes back online to serve a new version of the content. I'd like to be able to at least serve up a stale version of the content if a new version could not be retrieved from the backend. Is this possible without installing the Softpurge Varnish Mod?

    Read the article

  • Can you reverse order a string in one line with LINQ or a LAMBDA expression

    - by Student for Life
    Not that I would want to use this practically (for many reasons) but out of strict curiousity I would like to know if there is a way to reverse order a string using LINQ and/or LAMBDA expressions in one line of code, without utilising any framework "Reverse" methods. e.g. string value = "reverse me"; string reversedValue = (....); and reversedValue will result in "em esrever" EDIT Clearly an impractical problem/solution I know this, so don't worry it's strictly a curiosity question around the LINQ/LAMBDA construct.

    Read the article

  • How to get spacing between characters printed using TextOut ?

    - by life-warrior
    I'm trying to calcuate size of each cell (containing text like "ff" or "a0"), so that 32 cells will fit into window by width. However, charWidth*2 doesn' represent the width of a cell, since it doesn't take spacing between characters in the account. How can I obtain size of a font so that 32 cells each is two chars like "ff" fit exactly into window's client area ? Curier is fixed-width font. RECT rect; ::GetClientRect( hWnd, &rect ); LONG charWidth = (rect.right-rect.left)/BLOCK_SIZE/2-2; int oldMapMode = ::SetMapMode( hdc, MM_TEXT ); HFONT font = CreateFont( charWidth*2, charWidth, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_OUTLINE_PRECIS, CLIP_DEFAULT_PRECIS, CLEARTYPE_QUALITY, FF_ROMAN, _T("Courier") ); HGDIOBJ oldFont = ::SelectObject( hdc, font ); for( int i = 0; i < BLOCK_SIZE; ++i ) { CString str; str.Format( _T("%.2x"), (unsigned char)*(g_memAddr+i) ); SIZE size; ::TextOut( hdc, (size.cx+2)*i+1, 1, str, _tcslen((LPCTSTR)str) ); }

    Read the article

  • How to run shell script with live feedback from PHP?

    - by Highway of Life
    How would I execute a shell script from PHP while giving constant/live feedback to the browser? I understand from the system function documentation: The system() call also tries to automatically flush the web server's output buffer after each line of output if PHP is running as a server module. I'm not clear on what they mean by running it as a 'server module'. I attempted to run the script in the cgi-bin, but either I'm doing it wrong, or that's not what they mean. Example PHP code: <?php system('/var/lib/script_test.sh'); Example shell code: #!/bin/bash echo "Start..." for i in {1..10} do echo "$i..." sleep 1 done echo "Done."

    Read the article

  • NASA Finds Evidence Of Aliens

    - by Gopinath
    OMG! All those Aliens stuff we saw in movies is not baseless. NASA scientists discovered that we are not all alone in this universe. Many other forms of life is distributed on the planets other than Earth. Aliens are real!! This astonishing claim comes from Dr. Richard Hoover, an astrobiologist at NASA, who says that he found solid evidence of alien life in the form of fossils of bacteria in an extremely rare class of meteorite. In an exclusive interview to FoxNews, the scientist said I interpret it as indicating that life is more broadly distributed than restricted strictly to the planet earth. This field of study has just barely been touched — because quite frankly, a great many scientist would say that this is impossible. The exciting thing is that they are in many cases recognizable and can be associated very closely with the generic species here on earth. There are some that are just very strange and don’t look like anything that I’ve been able to identify, and I’ve shown them to many other experts that have also come up stumped. Read more at  FoxNew: NASA Scientist Claims Evidence of Alien Life on Meteorite cc image flickr/earlg This article titled,NASA Finds Evidence Of Aliens, was originally published at Tech Dreams. Grab our rss feed or fan us on Facebook to get updates from us.

    Read the article

  • Why does my program crash when given negative values?

    - by Wayfarer
    Alright, I am very confused, so I hope you friends can help me out. I'm working on a project using Cocos2D, the most recent version (.99 RC 1). I make some player objects and some buttons to change the object's life. But the weird thing is, the code crashes when I try to change their life by -5. Or any negative value for that matter, besides -1. NSMutableArray *lifeButtons = [[NSMutableArray alloc] init]; CCTexture2D *buttonTexture = [[CCTextureCache sharedTextureCache] addImage:@"Button.png"]; LifeChangeButtons *button = nil; //top left button = [LifeChangeButtons lifeButton:buttonTexture ]; button.position = CGPointMake(50 , size.height - 30); [button buttonText:-5]; [lifeButtons addObject:button]; //top right button = [LifeChangeButtons lifeButton:buttonTexture ]; button.position = CGPointMake(size.width - 50 , size.height - 30); [button buttonText:1]; [lifeButtons addObject:button]; //bottom left button = [LifeChangeButtons lifeButton:buttonTexture ]; button.position = CGPointMake(50 , 30); [button buttonText:5]; [lifeButtons addObject:button]; //bottom right button = [LifeChangeButtons lifeButton:buttonTexture ]; button.position = CGPointMake(size.width - 50 , 30); [button buttonText:-1]; [lifeButtons addObject:button]; for (LifeChangeButtons *theButton in lifeButtons) { [self addChild:theButton]; } This is the code that makes the buttons. It simply makes 4 buttons, puts them in each corner of the screen (size is the screen) and adds their life change ability, 1,-1,5, or -5. It adds them to the array and then goes through the array at the end and adds all of them to the screen. This works fine. Here is my code for the button class: (header file) // // LifeChangeButtons.h // Coco2dTest2 // // Created by Ethan Mick on 3/14/10. // Copyright 2010 Wayfarer. All rights reserved. // #import "cocos2d.h" @interface LifeChangeButtons : CCSprite <CCTargetedTouchDelegate> { NSNumber *lifeChange; } @property (nonatomic, readonly) CGRect rect; @property (nonatomic, retain) NSNumber *lifeChange; + (id)lifeButton:(CCTexture2D *)texture; - (void)buttonText:(int)number; @end Implementation file: // // LifeChangeButtons.m // Coco2dTest2 // // Created by Ethan Mick on 3/14/10. // Copyright 2010 Wayfarer. All rights reserved. // #import "LifeChangeButtons.h" #import "cocos2d.h" #import "CustomCCNode.h" @implementation LifeChangeButtons @synthesize lifeChange; //Create the button +(id)lifeButton:(CCTexture2D *)texture { return [[[self alloc] initWithTexture:texture] autorelease]; } - (id)initWithTexture:(CCTexture2D *)atexture { if ((self = [super initWithTexture:atexture])) { //NSLog(@"wtf"); } return self; } //Set the text on the button - (void)buttonText:(int)number { lifeChange = [NSNumber numberWithInt:number]; NSString *text = [[NSString alloc] initWithFormat:@"%d", number]; CCLabel *label = [CCLabel labelWithString:text fontName:@"Times New Roman" fontSize:20]; label.position = CGPointMake(35, 20); [self addChild:label]; } - (CGRect)rect { CGSize s = [self.texture contentSize]; return CGRectMake(-s.width / 2, -s.height / 2, s.width, s.height); } - (BOOL)containsTouchLocation:(UITouch *)touch { return CGRectContainsPoint(self.rect, [self convertTouchToNodeSpaceAR:touch]); } - (void)onEnter { [[CCTouchDispatcher sharedDispatcher] addTargetedDelegate:self priority:0 swallowsTouches:YES]; [super onEnter]; } - (void)onExit { [[CCTouchDispatcher sharedDispatcher] removeDelegate:self]; [super onExit]; } - (BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event { CGPoint touchPoint = [touch locationInView:[touch view]]; touchPoint = [[CCDirector sharedDirector] convertToGL:touchPoint]; if ( ![self containsTouchLocation:touch] ) return NO; NSLog(@"Button touch event was called returning yes. "); //this is where we change the life to each selected player NSLog(@"Test1"); NSMutableArray *tempArray = [[[UIApplication sharedApplication] delegate] selectedPlayerObjects]; NSLog(@"Test2"); for (CustomCCNode *aPlayer in tempArray) { NSLog(@"we change the life by %d.", [lifeChange intValue]); [aPlayer changeLife:[lifeChange intValue]]; } NSLog(@"Test3"); return YES; } - (void)ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event { CGPoint touchPoint = [touch locationInView:[touch view]]; touchPoint = [[CCDirector sharedDirector] convertToGL:touchPoint]; NSLog(@"You moved in a button!"); } - (void)ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event { NSLog(@"You touched up in a button"); } @end Now, This function: - (BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event Is where all the shit goes down. It works for all of the buttons except the -5 one. And then, it gets to: NSLog(@"we change the life by %d.", [lifeChange integerValue]); And it crashes at that statement. It only crashes when given anything less than -1. -1 works, but nothing smaller does. Here is the code in the CustomCCNode Class, "changeLife" that is being called. - (void)changeLife:(int)lifeChange { NSLog(@"change life in Custom Class was called"); NSLog(@"wtf is lifechange: %d", lifeChange); life += lifeChange; lifeString = [[NSString alloc] initWithFormat:@"%d",life]; [text setString:lifeString]; } Straight forward, but when the NSnumber is -5, it doesn't even get called, it crashes at the NSlog statement. So... what's up with that?

    Read the article

  • Even EA's Have Bad Days - it's Time to Reset

    - by Pat Shepherd
    I saw this article and thought I'd share it because, even we EA's have bad days and the 7 points listed are a great way for you to hit the "reset" button. From Geoffrey James on INC.COM, here are 7 ways to change your view of things when, say, you are hitting a frustration point coordinating stakeholders to agree on an approach (never happens, right?) Positive Thinking: 7 Easy Ways to Improve a Bad Day http://www.inc.com/geoffrey-james/positive-thinking-7-easy-ways-to-improve-a-bad-day.html To paraphrase:          You can decide (in an instant) to change patterns of the past          Believe in (or even visualize) good things happening, and they will          Keep a healthy perspective on the work-life / life-life continuum (what things REALLY matter in the big scheme of things)                  Focus on the good (the laws of positive-attraction apply)

    Read the article

  • LIBGDX "parsing error emitter" with 2 or more emitters [on hold]

    - by flow969
    I have a problem with the use of particle effect of LIBGDX with 2 or more emitters. After using ParticleEditor to create my .p file, I use it in my code BUT...when I use only 1 emitter it's fine but with more than 1, not fine ! :( Here is my error code in java console : Exception in thread "LWJGL Application" java.lang.RuntimeException: Error parsing emitter: - Delay - at com.badlogic.gdx.graphics.g2d.ParticleEmitter.load(ParticleEmitter.java:910) at com.badlogic.gdx.graphics.g2d.ParticleEmitter.<init>(ParticleEmitter.java:95) at com.badlogic.gdx.graphics.g2d.ParticleEffect.loadEmitters(ParticleEffect.java:154) at com.badlogic.gdx.graphics.g2d.ParticleEffect.load(ParticleEffect.java:138) at com.fasgame.fishtrip.android.screens.GameScreen.show(GameScreen.java:313) at com.badlogic.gdx.Game.setScreen(Game.java:61) at com.fasgame.fishtrip.android.screens.MainMenuScreen.render(MainMenuScreen.java:71) at com.badlogic.gdx.Game.render(Game.java:46) at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:206) at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:114) Caused by: java.lang.NumberFormatException: For input string: "- Count -" at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source) at sun.misc.FloatingDecimal.parseFloat(Unknown Source) at java.lang.Float.parseFloat(Unknown Source) at com.badlogic.gdx.graphics.g2d.ParticleEmitter.readFloat(ParticleEmitter.java:929) at com.badlogic.gdx.graphics.g2d.ParticleEmitter$RangedNumericValue.load(ParticleEmitter.java:1062) at com.badlogic.gdx.graphics.g2d.ParticleEmitter.load(ParticleEmitter.java:866) ... 9 more And here is my particle effect .p file : Blanc - Delay - active: false - Duration - lowMin: 3000.0 lowMax: 3000.0 - Count - min: 0 max: 200 - Emission - lowMin: 0.0 lowMax: 0.0 highMin: 250.0 highMax: 250.0 relative: false scalingCount: 1 scaling0: 1.0 timelineCount: 1 timeline0: 0.0 - Life - lowMin: 500.0 lowMax: 500.0 highMin: 500.0 highMax: 500.0 relative: false scalingCount: 3 scaling0: 1.0 scaling1: 0.47058824 scaling2: 0.0 timelineCount: 3 timeline0: 0.0 timeline1: 0.51369864 timeline2: 1.0 - Life Offset - active: false - X Offset - active: false - Y Offset - active: false - Spawn Shape - shape: point - Spawn Width - lowMin: 0.0 lowMax: 0.0 highMin: 0.0 highMax: 0.0 relative: false scalingCount: 1 scaling0: 1.0 timelineCount: 1 timeline0: 0.0 - Spawn Height - lowMin: 0.0 lowMax: 0.0 highMin: 0.0 highMax: 0.0 relative: false scalingCount: 1 scaling0: 1.0 timelineCount: 1 timeline0: 0.0 - Scale - lowMin: 0.0 lowMax: 0.0 highMin: 70.0 highMax: 70.0 relative: true scalingCount: 2 scaling0: 1.0 scaling1: 0.0 timelineCount: 2 timeline0: 0.0 timeline1: 1.0 - Velocity - active: true lowMin: 0.0 lowMax: 0.0 highMin: 30.0 highMax: 300.0 relative: false scalingCount: 1 scaling0: 1.0 timelineCount: 1 timeline0: 0.0 - Angle - active: true lowMin: 220.0 lowMax: 320.0 highMin: 220.0 highMax: 320.0 relative: false scalingCount: 2 scaling0: 0.0 scaling1: 0.98039216 timelineCount: 2 timeline0: 0.0 timeline1: 1.0 - Rotation - active: false - Wind - active: false - Gravity - active: true lowMin: 0.0 lowMax: 0.0 highMin: 0.0 highMax: 0.0 relative: false scalingCount: 1 scaling0: 1.0 timelineCount: 1 timeline0: 0.0 - Tint - colorsCount: 3 colors0: 0.50980395 colors1: 0.7647059 colors2: 0.7921569 timelineCount: 1 timeline0: 0.0 - Transparency - lowMin: 0.0 lowMax: 0.0 highMin: 1.0 highMax: 1.0 relative: false scalingCount: 4 scaling0: 1.0 scaling1: 1.0 scaling2: 1.0 scaling3: 1.0 timelineCount: 4 timeline0: 0.0 timeline1: 0.36301368 timeline2: 0.6164383 timeline3: 1.0 - Options - attached: false continuous: true aligned: false additive: true behind: false premultipliedAlpha: false pre_particle.png Bleu - Delay - active: false - Duration - lowMin: 3000.0 lowMax: 3000.0 - Count - min: 0 max: 200 - Emission - lowMin: 0.0 lowMax: 0.0 highMin: 250.0 highMax: 250.0 relative: false scalingCount: 1 scaling0: 1.0 timelineCount: 1 timeline0: 0.0 - Life - lowMin: 500.0 lowMax: 500.0 highMin: 500.0 highMax: 500.0 relative: false scalingCount: 3 scaling0: 1.0 scaling1: 0.47058824 scaling2: 0.0 timelineCount: 3 timeline0: 0.0 timeline1: 0.51369864 timeline2: 1.0 - Life Offset - active: false - X Offset - active: false - Y Offset - active: false - Spawn Shape - shape: point - Spawn Width - lowMin: 0.0 lowMax: 0.0 highMin: 0.0 highMax: 0.0 relative: false scalingCount: 1 scaling0: 1.0 timelineCount: 1 timeline0: 0.0 - Spawn Height - lowMin: 0.0 lowMax: 0.0 highMin: 0.0 highMax: 0.0 relative: false scalingCount: 1 scaling0: 1.0 timelineCount: 1 timeline0: 0.0 - Scale - lowMin: 0.0 lowMax: 0.0 highMin: 70.0 highMax: 70.0 relative: true scalingCount: 2 scaling0: 1.0 scaling1: 0.0 timelineCount: 2 timeline0: 0.0 timeline1: 1.0 - Velocity - active: true lowMin: 0.0 lowMax: 0.0 highMin: 30.0 highMax: 300.0 relative: false scalingCount: 1 scaling0: 1.0 timelineCount: 1 timeline0: 0.0 - Angle - active: true lowMin: 220.0 lowMax: 320.0 highMin: 220.0 highMax: 320.0 relative: false scalingCount: 2 scaling0: 0.0 scaling1: 0.98039216 timelineCount: 2 timeline0: 0.0 timeline1: 1.0 - Rotation - active: false - Wind - active: false - Gravity - active: true lowMin: 0.0 lowMax: 0.0 highMin: 0.0 highMax: 0.0 relative: false scalingCount: 1 scaling0: 1.0 timelineCount: 1 timeline0: 0.0 - Tint - colorsCount: 3 colors0: 0.0 colors1: 0.7254902 colors2: 0.7921569 timelineCount: 1 timeline0: 0.0 - Transparency - lowMin: 0.0 lowMax: 0.0 highMin: 1.0 highMax: 1.0 relative: false scalingCount: 6 scaling0: 0.0 scaling1: 1.0 scaling2: 1.0 scaling3: 1.0 scaling4: 1.0 scaling5: 0.0 timelineCount: 6 timeline0: 0.0 timeline1: 0.047945205 timeline2: 0.34246576 timeline3: 0.6712329 timeline4: 0.94520545 timeline5: 1.0 - Options - attached: false continuous: true aligned: false additive: true behind: false premultipliedAlpha: false pre_particle.png BleuFonce - Delay - active: false - Duration - lowMin: 3000.0 lowMax: 3000.0 - Count - min: 0 max: 200 - Emission - lowMin: 0.0 lowMax: 0.0 highMin: 250.0 highMax: 250.0 relative: false scalingCount: 1 scaling0: 1.0 timelineCount: 1 timeline0: 0.0 - Life - lowMin: 500.0 lowMax: 500.0 highMin: 500.0 highMax: 500.0 relative: false scalingCount: 3 scaling0: 1.0 scaling1: 0.47058824 scaling2: 0.0 timelineCount: 3 timeline0: 0.0 timeline1: 0.51369864 timeline2: 1.0 - Life Offset - active: false - X Offset - active: false - Y Offset - active: false - Spawn Shape - shape: point - Spawn Width - lowMin: 0.0 lowMax: 0.0 highMin: 0.0 highMax: 0.0 relative: false scalingCount: 1 scaling0: 1.0 timelineCount: 1 timeline0: 0.0 - Spawn Height - lowMin: 0.0 lowMax: 0.0 highMin: 0.0 highMax: 0.0 relative: false scalingCount: 1 scaling0: 1.0 timelineCount: 1 timeline0: 0.0 - Scale - lowMin: 0.0 lowMax: 0.0 highMin: 70.0 highMax: 70.0 relative: true scalingCount: 2 scaling0: 1.0 scaling1: 0.0 timelineCount: 2 timeline0: 0.0 timeline1: 1.0 - Velocity - active: true lowMin: 0.0 lowMax: 0.0 highMin: 30.0 highMax: 300.0 relative: false scalingCount: 1 scaling0: 1.0 timelineCount: 1 timeline0: 0.0 - Angle - active: true lowMin: 220.0 lowMax: 320.0 highMin: 220.0 highMax: 320.0 relative: false scalingCount: 2 scaling0: 0.0 scaling1: 0.98039216 timelineCount: 2 timeline0: 0.0 timeline1: 1.0 - Rotation - active: false - Wind - active: false - Gravity - active: true lowMin: 0.0 lowMax: 0.0 highMin: 0.0 highMax: 0.0 relative: false scalingCount: 1 scaling0: 1.0 timelineCount: 1 timeline0: 0.0 - Tint - colorsCount: 3 colors0: 0.0 colors1: 0.7294118 colors2: 1.0 timelineCount: 1 timeline0: 0.0 - Transparency - lowMin: 0.0 lowMax: 0.0 highMin: 1.0 highMax: 1.0 relative: false scalingCount: 4 scaling0: 1.0 scaling1: 0.0 scaling2: 0.0 scaling3: 1.0 timelineCount: 4 timeline0: 0.0 timeline1: 0.001 timeline2: 0.5753425 timeline3: 0.79452056 - Options - attached: false continuous: true aligned: false additive: true behind: false premultipliedAlpha: false pre_particle.png For the "- Image Path -" missing it's normal if I let them in it doesn't work even with only 1 emitter PS : I've already updated my lib to the last release

    Read the article

  • Dependant care account, is it working for you?

    - by heshamelsaghir
    Well, NO.  my little three years old boys are very sick so I need to get them out of the day care.  they keep getting ear infection so bad even the ear tube is not working.  so, now do I give my $5000.00 to the government as a donation or keep my kids in the day care and loose the hearing?  what is going on? I was told I can change this Dependant care account ONLY in the case of a life change!  well, is not this a life change?  when a member of the family is very sick and has to go through an operation "Ear Tube", the operation does not work and keeps getting sick.  Would not this be a life change?

    Read the article

  • What is realism?

    - by eversor
    Beyond the obvious something that seams real, realism in games is a hard feature to hit. In some cases, things that are completely impossible in real life are seen as realistic by gamers. For instance, in some FPS you can survive being hit by a fair amount of bullets when in real life one is enough, Newton-defying car drifts, etc. So, in some cases, reductions of life-like actions or consequences implies a bigger sense of realism. The root of this pseudo-philosophical question lies in: I am going to create a engine for battles in an online (browser-based) strategic game. Browser-based means that the battle would not be seen. And i do not know how to approach this realism issue.

    Read the article

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