FBPermissionDialog is official Facebook iPhone lib.
But my code to triggering message
- (void)dialogDidCancel:(FBDialog*)dialog
is not working.
What can I do for this?
AppStore now rejects applications made with non-Apple like languages. (with modified contract)
However, is it allowed using declarative mark-up language formed with XML? (like XHTML, but different schema) The declarative mark-up is a code too, but not a script or logic code. Just a passive, static data, but forms some layout and part of an application logic.
Will this code:
inline int funcA(int a)
{
return a + 1;
}
inline int funcB(int b)
{
return funcA(b + 2);
}
int main()
{
return funcB(3);
}
transformed to code like this?:
int main()
{
return ((3) + 2) + 1;
}
UIImagePickerController changes statusbar style to black/opaque.
I want to keep status-bar style black/translucent.
I'm finding a way to prevent status bar style changing.
Or making it transited smoothly. Now, presenting UIImagePickerController changes status-bar style instantly, even -[presentModalViewController:picker animated:YES] specified.
Any method, welcome, including hacking or private method.
This is an app for AppStore, however I want to even try.
I'm making a custom UI element class for iPhone.
It'll cool to edit my class on Interface Builder with hierarchy.
Some of my class is management class like UINavigationController, but they're not one of them, subclasses from NSObject.
Of course, I can place a NSObject instance on IB, but it cannot have a child node.
Is there a way to enable adding child node to subclass of NSObject?
I believed any kind of asynchronous execution makes a thread in invisible area. But if so,
Async codes does not offer any performance gain than threaded codes.
But I can't understand why so many developers are making many features async form.
Could you explain about difference and cost of them?
First, I'm a Haskell beginner.
I'm planning integrating Haskell into C for realtime game.
Haskell does logic, C does rendering. To do this, I have to pass huge complexly structured data (game state) from/to each other for each tick (at least 30 times per second). So the passing data should be lightweight. This state data may laid on sequential space on memory. Both of Haskell and C parts should access every area of the states freely.
In best case, the cost of passing data can be copying a pointer to a memory. In worst case, copying whole data with conversion.
I'm reading Haskell's FFI(http://www.haskell.org/haskellwiki/FFICookBook#Working_with_structs)
The Haskell code look specifying memory layout explicitly.
I have a few questions.
Can Haskell specify memory layout explicitly? (to be matched exactly with C struct)
Is this real memory layout? Or any kind of conversion required? (performance penalty)
If Q#2 is true, Any performance penalty when the memory layout specified explicitly?
What's the syntax #{alignment foo}? Where can I find the document about this?
If I want to pass huge data with best performance, how should I do that?
*PS
Explicit memory layout feature which I said is just C#'s [StructLayout] attribute. Which is specifying in-memory position and size explicitly.
http://www.developerfusion.com/article/84519/mastering-structs-in-c/
I'm not sure Haskell has matching linguistic construct matching with fields of C struct.
I'm making a vector/matrix library. (GCC, ARM NEON, iPhone)
typedef struct{ float v[4]; } Vector;
typedef struct{ Vector v[4]; } Matrix;
I passed struct data as pointer to avoid performance degrade from data copying when calling function. So I thought designed function like this:
void makeTranslation(const Vector* factor, Matrix* restrict result);
But, if function is inline, is there any reason to pass values as pointer for performance? Do those variables copied too? How about register and caches?
inline Matrix makeTranslation(Vector factor) __attribute__ ((always_inline));
How do you think about calling costs of each cases?
This is my code.
inline void inv(Vector* target)
{
(*target).x = -(*target).x;
(*target).y = -(*target).y;
(*target).z = -(*target).z;
(*target).w = -(*target).w;
}
I'm using GCC. Can this be vectorized?
PS: I'm trying some kind of optimization. Any recommendations are welcome.
How can I localize bundle display name of an iPhone app?
The name displayed in iPhone main screen under app icon.
I wish a single binary bundle package which will be displayed multilingually.
My app takes too much time to loading.
So I put a NSLog in main() function like this to measure loading time from first:
int main(int argc, char *argv[])
{
NSLog(@"main");
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
But, the log displayed at really later time.
Default.png displayed about 5 seconds, all loading process completed in 1~2 seconds after log appeared.
What's happening before executing main() function on iPhone app?
Hi.
I have a plan to build a web-site which running CGI made with Cocoa.
My final goal is develop on Mac OS X, and run on FreeBSD.
Is this possible?
As I know, there is a free implementation of some NextStep classes, the GNUStep.
The web-site is almost built with only strings. I read GNUStep documents, classes are enough. DB connection will be made with C interfaces.
Most biggest problem which I'm concerning is linking and binary compatibility. I'm currently configuring FreeBSD on VirtualBox, but I wanna know any possibility informations about this from experts.
This is not a production server. Just a trial. Please feel free to saying anything.
I can initialize float32x4_t like this:
const float32x4x4_t = { 0.0f, 0.0f, 0.0f, 0.0f };
But this code makes an error Incompatible types in initializer:
const float32x4x4_t =
{
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
};
float32x4x4_t is 4x4 matrix built as:
typedef struct float32x4x4_t
{
float32x4_t val[4];
}
float32x4x4_t;
How can I initialize this const struct?
I'm using NSAssert macro for Objective-C assertion, and it's the regular way to do this.
But it's not work in C functions. What do I should use for this?
I'm making a new Mac OS X application. (not an iPhone app)
This is document-based application.
It shows a new "Untitled" document instance automatically when it starts up. How can I block this behavior? I wish my application show no window at start up.
I have 2 matrix structs means equal data but have different form like these:
// Matrix type 1.
typedef float Scalar;
typedef struct { Scalar e[4]; } Vector;
typedef struct { Vector e[4]; } Matrix;
// Matrix type 2 (you may know this if you're iPhone developer)
struct CATransform3D
{
CGFloat m11, m12, m13, m14;
CGFloat m21, m22, m23, m24;
CGFloat m31, m32, m33, m34;
CGFloat m41, m42, m43, m44;
};
typedef struct CATransform3D CATransform3D;
Their memory size are equal. So I believe there is a way to convert these types without any pointer operations or copy like this:
// Implemented from external lib.
CATransform3D CATransform3DMakeScale (CGFloat sx, CGFloat sy, CGFloat sz);
Matrix m = (Matrix)CATransform3DMakeScale ( 1, 2, 3 );
Is this possible? Currently compiler prints an "error: conversion to non-scalar type requested" message.
GCC manual says:
-fobjc-direct-dispatch
Allow fast jumps to the message dispatcher. On
Darwin this is accomplished via the comm page.
Can I assume this flag eliminates dynamic dispatch? How does it works?
I believe it should be fast as C function call if it linked directly.
I have C# background. Very newbie to low level language like C.
In C#, memory layout by compiler by default, and I have to specify some special attribute to override this behavior for exact layout.
As I know, C does not re-align by default. But I heard there's a little re-aligning behavior which very hard to find.
Can I know about C's memory layout behavior? (what should be re-aligned and not)
NSLog function accepts printf format specifiers.
My question is about %x specifier.
Does this print hex codes as sequence on memory? Or does it have it's own printing sequence style?
unsigned int a = 0x000000FF;
NSLog(@"%x", a);
Results of above code on little or big endian processors are equal or different?
And how about NSString's -initWithFormat method? Does it follows this rule equally?
GAE recommends using JDO/JPA.
But I have serious question about using OODB like them.
JDO based on user's class structure. And data structure should be modified continually as service advances. So,
If data(entity) class property being removed, what happened to existing data on the property?
If data(entity) class renamed for refactoring reason, how the JDO know those renaming? Or all data loss?
Major point is "How JDO/GAE/BigTable applies modification of class into existing entity structure and data?".