Friday, 6 September 2013

does graph like replace the old like?

does graph like replace the old like?

I'm migrating my app (https://apps.facebook.com/ibidgames) to graph, I'm
trying to set up the like button (in the top left) and when I try to
submit the "like" story in Open Graph configuration I find that I can add
things as "like an object" or "like a product" etc, and in the example it
says "User likes an object on ibidgames" but I want the user to actually
"like" THE application, not something inside the app.
How can I achieve this using graph?

iOS add image to window in right orientation

iOS add image to window in right orientation

I am trying to add an image view to my application window which consists
of a splitviewcontroller. The reason I am doing this is so that I can fade
it out like a splash screen. The application is for iPad and only works in
the landscape mode. The launch image is the same as the splash image so it
is a seamless transition between the two, then I can manually fade out the
splash. However I am having trouble adding the splash to the window's
subview in the same orientation as the launch image so that the transition
from the launchimage to the splash is seamless and cannot be noticed. Here
is what I have so far:
- (void)viewDidLoad
{
[super viewDidLoad];
UIWindow *window = [[UIApplication sharedApplication] delegate].window;
UIImageView *splash = [[UIImageView alloc] initWithFrame:[[UIScreen
mainScreen] bounds]];
splash.image = [UIImage imageNamed:@"Default-Landscape~ipad.png"];
[splash rotateToInterfaceOrientation:[[UIApplication
sharedApplication] statusBarOrientation]];
[window addSubview:splash];
}
@interface UIView (Orientation)
- (void)rotateToInterfaceOrientation:(UIInterfaceOrientation)orientation;
@end
@implementation UIView (Orientation)
- (void)rotateToInterfaceOrientation:(UIInterfaceOrientation)orientation
{
CGFloat angle = 0.0;
switch (orientation) {
case UIInterfaceOrientationPortraitUpsideDown:
angle = M_PI;
break;
case UIInterfaceOrientationLandscapeLeft:
angle = - M_PI / 2.0f;
break;
case UIInterfaceOrientationLandscapeRight:
angle = M_PI / 2.0f;
break;
default: // As portrait
angle = 0.0;
break;
}
self.transform = CGAffineTransformMakeRotation(angle);
}
@end

Rutube API - Events on embeded videos

Rutube API - Events on embeded videos

I'm currently working on a little web app.
Each page shows an embeded rutube video. When a video is finished, i
simply want to redirect to another randomly choosen page with another
video.. etc.. It would be a kind of playlist, but on the page.
My problem is that i can't understand how i can know when the video is
finished ? I tried with youtube and it's youtube API, it is quite easy...
but i can't understand anything to the Rutube one (maybe russian doesnt
help me that much).
Have you got any ideas to make it possible ?
Thank you for your help !

Facebook share not recognizing image thumbnail

Facebook share not recognizing image thumbnail

I have created an facebook share button using the url below:
http://www.facebook.com/sharer/sharer.php?s=100&p[url]=http://www.elementalworks.nl/KPJH/Homepage&p[images][0]=http://www.elementalworks.nl/KPJH/images/logo.jpg&p[title]=KPJ
Halsteren voor jouw schuurfeesten en trekkertrek
activiteiten&p[summary]=Schuurfeesten, Trekkertrek en allerlei andere
gezellige bijeenkomsten vindje bij KPJ Halsteren
In addition to this i placed the open graph image tag as follows:
<meta property="og:image"
content="http://www.elementalworks.nl/KPJH/images/logo.jpg" />
BUT.. the facebook debugger (https://developers.facebook.com/tools/debug)
sais that the image is'nt big enough, it has to be 200x200. The image
itself is 365x250 50kb.
Strange thing is that in the small preview window below the debugger the
image does show.
So why doesnt it show at the moment of sharing? You cna find the page in
question here: www.elementalworks.nl/KPJH

Animation works in Chrome but not Firefox

Animation works in Chrome but not Firefox

I have an animation that slides in li elements at the side of an options
panel. In Chrome this works fine but it just doesnt animate in firefox. I
have setup both W3C CSS declarations as well as some -moz specific ones
but to no avail
I have set up a fiddle here to demonstate

Using Amazon s3 how to upload photos from iphone to server

Using Amazon s3 how to upload photos from iphone to server

I am creating an iPhone app to allow users upload & share photos. Part of
the functionality involves uploading pictures from the iPhone to the
server.I want to uploaded the photos from iphone to server Using Amazon
s3.Using Amazon s3 how to upload images from iphone to server. Please give
me any idea.Thanks in advance.

Thursday, 5 September 2013

Is the description written for thread.yield is correct?

Is the description written for thread.yield is correct?

I have a little doubt regarding Yield's definition:
In the java docs. Yield is described as :
public static void [yield][1]()
A hint to the scheduler that the current thread is willing to yield its
current use of a processor. The scheduler is free to ignore this hint.
And it means that current thread is not pausing temporarily. It is just
indicating to scheduler. Now it is upto the scheduler to decide if he want
to stop the execution of thread or not.Right?
And here at this link, it is written that on yield, thread will be
definitely suspended.
http://www.tutorialspoint.com/java/lang/thread_yield.htm
Can someone explain it?