Tech Blog Updates on Software & Technology

27Aug/100

IPhone http connection

-(IBAction)btnClicked
{
NSURL *url=[NSURL URLWithString:[NSString stringWithFormat:@"http:vapssky.com/address2latlong.aspx?q=%@,%@ ",textField.text,textField1.text]];

NSMutableURLRequest *request=[[[NSMutableURLRequest alloc]initWithURL:url cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:60]autorelease];
NSHTTPURLResponse *response;

NSData *data=[NSURLConnection sendSynchronousRequest:request returningResponse:&response error:nil];
if(response)
{
NSString *responseString=[[[NSString alloc]initWithData:data encoding:NSASCIIStringEncoding]autorelease];
NSArray *chunks = [responseString componentsSeparatedByString: @"="];
label1.text=[NSString stringWithFormat:@"%@",[chunks objectAtIndex:1]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://maps.google.com/?ll=%@",label1.text]]];
NSLog(@"res",responseString);

}

}

Filed under: Uncategorized No Comments
26Aug/100

iphone code for AVAudioPlayer

#import "AVFoundation/AVFoundation.h"
#import "AVFoundation/AVAudioPlayer.h"

- (void)viewDidLoad {
[super viewDidLoad];
NSString *filep=[[NSBundle mainBundle]pathForResource:@"5" ofType:@"wav"];
NSURL *file=[[NSURL alloc]initFileURLWithPath:filep];
AVAudioPlayer *player=[[AVAudioPlayer alloc]initWithContentsOfURL:file error:nil];
[player play];

}

Filed under: Uncategorized No Comments
21Aug/100

Distribution of LTE-frequency postponed indefinitely

The news that the allocation of frequencies for building mobile networks of the fourth generation (LTE) will be held behind closed doors, will be continued. According to Vedomosti, a source close to the Ministry of Communications and Mass Media, the issue of frequencies was withdrawn from the agenda of yesterday's conciliation meeting of the State Commission for Radio Frequencies (SCRF) and the meeting held on Monday, August 23 and postponed to an indefinite term. According to this source, the reason that is not a political decision on this issue.

For more details about Window blinds visit the link.
Meanwhile, the struggle for the frequency, suitable for the construction of LTE-networks, a new level. After the letters to officials of various ranks with requests to distribute the frequencies on the basis of open competition from the operator's manual "big three", began arriving requests from shareholders cellular operators. So, the day before the owner of AFK Sistema (owns MTS), Vladimir Yevtushenkov and "Alpha groups" (owned by VimpelCom with Telenor), Mikhail Fridman met with First Deputy Prime Minister Igor Shuvalov to persuade the Government not to give up without contest the most suitable for network construction of the fourth generation communication technology LTE frequency. According to the shareholders of the big three, these frequencies - a limited resource, and therefore, by law they must be put up for competition.

Filed under: Uncategorized No Comments
19Aug/100

IPhone TextField Comparison Code

-(IBAction)btnclck
{
NSString *str=[NSString stringWithFormat:@"%@",txt.text];
NSString *str1=[NSString stringWithFormat:@"%@",txt1.text];
if([str isEqualToString:str1])
{
//UILabel *lbl=[[UILabel alloc]initWithFrame:CGRectMake(0, 0, 50, 50)];
lbl.text=@"ok";
}
else
{
lbl.text=@"not ok";
}
}

Filed under: Uncategorized No Comments
19Aug/100

Iphone BallBouncing Code

UIImageView *img;
UIImageView *img1;
CGPoint pos;

- (void)viewDidLoad {
[super viewDidLoad];
img=[[UIImageView alloc]initWithFrame:CGRectMake(0,0,30,30)];
img.image=[UIImage imageNamed:@"ball.png"];
[self.view addSubview:img];

img1=[[UIImageView alloc]initWithFrame:CGRectMake(0,450,60,10)];
img1.image=[UIImage imageNamed:@"3.png"];
[self.view addSubview:img1];

pos=CGPointMake(1,2);
[NSTimer scheduledTimerWithTimeInterval:.01 target:self selector:@selector (moving) userInfo:nil repeats:YES];

}

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event

{

NSSet *allTouches=[event allTouches];

UITouch *touch=[[allTouches allObjects]objectAtIndex:0];

CGPoint tp=[touch locationInView:self.view];

[img1 setCenter:tp];

}

-(void)moving
{
img.center=CGPointMake(img.center.x+pos.x, img.center.y+pos.y);
if(img.center.x>290||img.center.x<15)
pos.x=-pos.x;
if(/*img.center.y>450||*/img.center.y<15)
pos.y=-pos.y;
if(CGRectIntersectsRect(img.frame, img1.frame))
{
pos.y=-pos.y;

}
}

Filed under: Uncategorized No Comments
18Aug/100

IPhone BallBouncing Code

#import "ballViewController.h"

@implementation ballViewController

UIImageView *imgVw;
UIImageView *image;
//UIImageView *image2;

int x=0,y=0,xdir=2,ydir=1;
BOOL flag=TRUE;

- (void)viewDidLoad {
[super viewDidLoad];
imgVw=[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 50, 50)];
imgVw.image=[UIImage imageNamed:@"tennis.jpg"];
[self.view setBackgroundColor:[UIColor whiteColor]];
[self.view addSubview:imgVw];
image=[[UIImageView alloc]initWithFrame:CGRectMake(20, 440, 80, 20)];
image.image=[UIImage imageNamed:@"rect.png"];
[self.view addSubview:image];

[NSTimer scheduledTimerWithTimeInterval:.009 target:self selector:@selector(move) userInfo:nil repeats:YES];

}
-(void)move
{
//lab:
if(flag==TRUE)
{
imgVw.frame=CGRectMake(x+=xdir,y+=ydir, 50, 50);

if(imgVw.frame.origin.x>=270)
{
xdir=-2;
}

if(imgVw.frame.origin.x< =0)
{
xdir=2; }
if(imgVw.frame.origin.y<=0)
{

ydir=1;

}
if(imgVw.frame.origin.y>=430)
{
//ydir=-1;
UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil message:@"Game over!!!" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alertView show];
[alertView release];
flag=FALSE;

}

}}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
{//image=[[UIImageView alloc]initWithFrame:CGRectMake(0, 440, 80, 20)];
NSSet *allTouches = [event allTouches];
UITouch *touch = [[allTouches allObjects] objectAtIndex:0];
CGPoint tp=[touch locationInView:self.view];
[image setCenter:tp];

if(CGRectIntersectsRect(imgVw.frame,image.frame) )
{
ydir=-1;
NSLog(@"intersects");
}

}
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
{
NSSet *allTouches = [event allTouches];
UITouch *touch = [[allTouches allObjects] objectAtIndex:0];
CGPoint tp=[touch locationInView:self.view];
[image setCenter:tp];

}

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
}

Filed under: Uncategorized No Comments
17Aug/100

IPhone Random Number Generation Code

- (void)viewDidLoad
{
randomA = 1 + arc4random() % 6;
randomB = arc4random() % 6;
mathQuestion = [NSString stringWithFormat: @"%d + %d", randomA, randomB];

}

(OR)
int number = (arc4random() % 2) + 1;

Filed under: Uncategorized No Comments
11Aug/100

In the nearest future Apple iPad processor ARM Cortex A9 and CDMA-iPhone

The company Apple, as a true leader in many areas of production and sale of computer equipment, do not stop there. After the success of planshetnika iPad and scandal with iPhone antenna 4, which was not, however, strongly affected his magnificent sales, the company is preparing new products. Internet resource Digitimes have known some details on the plans for the next Apple. According to unconfirmed until the data to the beginning of 2011 the company is preparing two major innovations: a iPad processor ARM Cortex A9 and CDMA-iPhone.

For more details about credit cards visit the link.
Tablet PC iPad is a fairly balanced device, but the development of modern video technology may require a more serious mobile computer hardware capacity and longer battery life. Perhaps that is why the new model iPad will have 512 MB of RAM and run on the processor ARM Cortex A9, which has a great potential. Want to rumors about the 7-inch plate (sometimes even referred IPS-LCD screen with a resolution of 1024x768 pixels), but there is still no certainty.
As smartphone iPhone, then it is likely that at CES 2011 in January, the world will see him CDMA-version. It seems as already known, and operators who will get a contract for exclusive distribution of new items: an American provider Verizon Wireless and the Chinese China Telecom. According to rumors, Apple in the phone will revert to the old scheme of the internal antenna and the rear surface of the device is made of metal.
Another novelty, which the company intends to release a new year is the Apple TV. It is reported that this unit is aimed, primarily, to view live television, will have similar to the iPhone OS interface, integration with sotssetyami, the ability to start applications via the App Store and Internet access.

Filed under: Uncategorized No Comments
8Aug/100

Google counted all the books in the world

Google Inc. has estimated the total number of books available at the moment in all book stores in the world. For the conversion from Google were good reasons, because Google Books project was necessary to define more precisely the upcoming workload.

Judging by the final digit, team Google Books, dedicated to digitizing books, unemployment is not yet safe. Total as of last Saturday were counted 129,864,880 books. Every day the number of titles up to date and in connection with what ever will be recalculated and the grand total.
For more details about aptitude test visit the link.
Of course, nobody should cheat so exact figure recorded in the summary row. To calculate the algorithm, which now continue to improve. Before the recalculation, it was determined that we should take a book, and any printed materials fall into this category. Initially, there were counted about a billion books. Once removed the "twins" the final figure dropped to 600 million units. Then remove from the calculation of the book with the same content but different names, maps, data on T-shirts, audio and video recordings, and periodicals that go often - and got the final 129 million "and a little bit."
Google Books project was launched in 2004. Currently, the Google Books catalog has about 10 million titles.

Filed under: Uncategorized No Comments
8Aug/100

Applications for the iPhone sold twice as better than for Android

Developer of mobile applications Com2uS, a leader in Korea, offers many of its software on two platforms - from Apple and Google. He says that he can sell half as many copies of their applications for Android as compared with the results of the popularity of the same programs for the iPhone.
Baseball Game Home Run Battle downloaded an average of 400 to 500 times a day after the appearance of the store applications Android Market, now its sales have fallen to 200-300 per day. The game has achieved one of the first places among the applications for Android, but the final score suggests the amount of income only in the range of $ 200 thousand to $ 250 thousand.
For more details about camper parts visit the link.
Downloads paid applications via the iPhone is usually more than double those found Android. CEO Com2uS, Don Keene (Don Kim), said in an interview to Business, that if you compare sales of the most popular applications for the iPhone and Android, the first show is much more impressive results.

Google knows this statistic and do everything possible to promote his store Android applications among software developers for the iPhone. The company sent many of them free smartphones Nexus One, in order to induce them to rewrite their applications for Android. The new utility Android App Inventor will also attract new developers: it helps to create simple programs without having to learn code.
Despite the current dominance of the App Store on the market for mobile applications, Mr. Don Keene sure that Android will continue to reduce the distance.

Filed under: Uncategorized No Comments