For opening a web browser in corona, you can use the following code:
Syntax :
system.openURL( url )
Example :
system.openURL( "http://schogini.in/" )
For opening a web browser in corona, you can use the following code:
Syntax :
system.openURL( url )
Example :
system.openURL( "http://schogini.in/" )
To return the smallest integer larger than a given number in corona, you can use “math.ceil”.
Syntax :
math.ceil(Number)
Example:
print(math.ceil(0.5)) --> Returns the value 1 print(math.ceil(-0.5)) --> Returns the value -0
Let us say you have a sprite named “sprite1″ and you need to find out whether any action is running on it or not by
int actionsCount = [sprite1 numberOfRunningActions];
Each CCNode and its descendants has the ability to get a position relative to the scene:
CGPoint worldCoord = [mySprite convertToWorldSpace: mySprite.position];
This world Coordinate will be relative to the scene as opposed to the parent node!
Use ‘CCEaseIn’ action in cocos2d for obtaining acceleration in the beginning.
// acceleration at the beginning id action = [CCMoveTo actionWithDuration:2 position:ccp(100,100)]; id ease = [CCEaseIn actionWithAction:action rate:2]; [sprite runAction: ease];
CCLayer* subview = //initialize [subview setPosition:ccp(X,Y)]; [self addChild:subview];
Installing multiple anti-virus programs might do more harm than good to your computer and in certain cases might lead to a computer lock-up, from which it is difficult to restore the settings, without formatting the system files.
Anti-virus programs are designed to detect malicious and harmful programs and files on your computer. However, different anti-virus programs do this using different process, which might not be in conformity to each other.Anti-virus programs have the capability to not only detect harmful programs and files, but also remove or modify them.
In the case of multiple anti-virus programs, one program might detect the other as a potential threat which might prove harmful for the computer. Furthermore, these multiple anti-virus programs are very competitive and might modify the firewall settings of the computer, doing more harm than good.
In addition, there is the matter of the speed of your system, which is slowed down drastically, since multiple anti-virus programs will use up far more of your system’s resources compared to a single anti-virus program.
You need only one good anti-virus program to protect your computer. Installing two or more of these antivirus programs at the same time would actually weaken your computer’s defences instead of strengthening it.
Therefore, the pros of multiple antivirus programs are far less compared to the cons and will become a headache once you do install two or more of them on your system thinking you are boosting its defences.
//// thread definition
function Thread( name ) {
for ( var i = 0; i < 5; i++ ) {
Print(name+': '+i);
yield;
}
}
//// thread management
var threads = [];
// thread creation
threads.push( new Thread('foo') );
threads.push( new Thread('bar') );
// scheduler
while (threads.length) {
var thread = threads.shift();
try {
thread.next();
threads.push(thread);
} catch(ex if ex instanceof StopIteration) {}
}
program listdevices;
{$ifdef fpc}{$mode delphi}{$endif}
{$apptype console}
uses
Windows;
var
Drive: Char;
DriveLetter: string;
begin
WriteLn('The following drives were found in this computer:');
WriteLn('');
// Search all drive letters
for Drive := 'A' to 'Z' do
begin
DriveLetter := Drive + ':\';
case GetDriveType(PChar(DriveLetter)) of
DRIVE_REMOVABLE: WriteLn(DriveLetter + ' Floppy Drive');
DRIVE_FIXED: WriteLn(DriveLetter + ' Fixed Drive');
DRIVE_REMOTE: WriteLn(DriveLetter + ' Network Drive');
DRIVE_CDROM: WriteLn(DriveLetter + ' CD-ROM Drive');
DRIVE_RAMDISK: WriteLn(DriveLetter + ' RAM Disk');
end;
end;
// Also add a stop to see the result under Windows
WriteLn('');
WriteLn('Please press <ENTER> to exit the program.');
ReadLn(DriveLetter);
end