Pages

Tuesday, September 28, 2010

Let's compete with iPad

1. Cisco Cius: 7 inch diagonal, Android, HD video camera, HD Audio, 3G/4G data and Bluetooth.
Macworld. How Cisco Cius stacks up against iPad
2. BlackBerry Playbook: 1 GHz dual-core processor, 1G RAM, QNX (it's an OS that supports symmetric multiprocessing with use of the QNX Neutrino microkernel architecture), WiFi, no 3G, 1024x600-pixel touchscreen, HD video playback, Adobe Flash Player 10.1 and HTML 5 are both supported for Web browsing
Macworld. RIM launches 7-inch PlayBook tablet
3. Acer developing Android-based tablets.
IntoMobile. Photo: Acer CEO shows off 7 inch Android powered tablet due to hit the market in Q4 2010

4. Samsung Galaxy Tab: Android 3.0 Gingerbread, Cortex A8 1.0GHz chip, 7 inches, WiFi, Bluetooth 3.0 and 3G HSUPA, support for H.263, DivX, MPEG4, XviD, MPEG4, H.264 video formats.

IntoMobile. Hands-on: Samsung Galaxy Tab Android – 7 inches of Android tablet goodness
TechPinas about it.

5. LG Android Optimus Tablet.
CrunchGear about it.

Thursday, September 23, 2010

Create Xcode project template

New article from Ohmu:
CodeProject. Creating an Xcode Project Template
shows how to make a project template in Xcode.
Tested. Works fine.
I made a template from the Simple project

cd to the folder opened in Finder

Copy the following bash script and paste it in Terminal:
function ff { osascript -e 'tell application "Finder"' \
-e "if (${1-1} <= (count Finder windows)) then" \
-e "get POSIX path of (target of window ${1-1} as alias)" \
-e 'else' -e 'get POSIX path of (desktop as alias)' \
-e 'end if' -e 'end tell'; };\
function cdff { cd "`ff $@`"; };
press Enter, then type cdff and press Enter. You will see that now the current folder in Terminal is the same as in the opened Finder.
You can save this function in .profile, re-open Terminal session and now, to switch to the folder opened in Finder, type 'cdff'.
Nice?
Don't tell me that you simply could drag an item from the Finder to the Terminal Window. :)
(If someone doesn't know, in Terminal type "cd ", then drag from the Finder Window the tiny icon near the folder name:

Open Terminal Here

OpenTerminalHere is a very useful AppleScript: http://www.entropy.ch/software/applescript/
The source code, probably, may look so:
on run
tell application "Finder"
activate

try
set this_folder to (the target of the front window) as alias
on error
set this_folder to startup disk
end try

my process_item(this_folder)

end tell
end run



-- This handler processes folders dropped onto the toolbar script icon
--
on open these_items
repeat with this_item in these_items
my process_item(this_item)
end repeat
end open



-- this subroutine does the actual work
--
on process_item(this_item)
set the_path to POSIX path of this_item
repeat until the_path ends with "/"
set the_path to text 1 thru -2 of the_path
end repeat
tell application "Terminal"
if (count of windows) is 0 then
do script with command "cd " & quoted form of the_path
else
if front window is busy then
--Can be tested by looking at a manpage or running top in terminal.app
tell application "Terminal" to activate
tell application "System Events" to tell process "Terminal" to ¬
keystroke "t" using command down
end if
do script with command "cd " & quoted form of the_path in window 1
end if
activate
end tell
end process_item
Or so:
on run
tell application "Finder"
try
activate
set frontWin to folder of front window as string
set frontWinPath to (get POSIX path of frontWin)
tell application "Terminal"
activate
close
do script with command "cd \"" & frontWinPath & "\""
end tell
on error error_message
beep
display dialog error_message buttons ¬
{"OK"} default button 1
end try
end tell
end run
An update versions are available on james david low:
OpenTerminalHere and AntHere

You can find more:
Enhanced Open Terminal Here, for Leopard

Here is an Objective-C project "cdto":
http://code.google.com/p/cdto/downloads/list

Tuesday, September 21, 2010

Funny Programming

Nice article on Cocoa with Love: Minimalist Cocoa programming
So here is the minimalistic Cocoa application:

Saturday, September 4, 2010

Simplest project for iPhone: no xib-file.

Probably, I do know the way to create "empty" iPhone project. Is it useful? I have no idea.
In the Windows world, in Visual Studio, the best way to create new project was to check "Empty project" checkbox in the Win32 application wizard.
In Xcode, for an iPhone project, the IDE generates for me a lot of files, makes folders. If I'm just learning, if I'm just testing all these files and folders just fulfill my hard disk.
So I found a way to create such "empty" project in Xcode:
1. Create new project in Xcode: Window-based template, any name,... everything's as usual.
2. In Xcode sidebar, select "Classes" and delete them. In the alert window choose "Also move to Trash".
3. Delete xib-file.
4. Modify *-info.plist file: delete the line about MainWindow - probably, the last one.
5. Open main.m file and add a simple application delegate. Then set the name of the delegate in the main() function.
Here is my main.m file:
#import <UIKit/UIKit.h>

// Application delegate
@interface Simple : NSObject <UIApplicationDelegate>
{
}

@end

@implementation Simple

- (void)applicationDidFinishLaunching: (UIApplication*)application
{
UIWindow* window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]];
[window setBackgroundColor: [UIColor yellowColor]];

[window makeKeyAndVisible];
}

@end


int main(int argc, char *argv[]) {

NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, @"Simple");
[pool release];
return retVal;
}
6. Compile and Run:

Thursday, September 2, 2010

iOS 4.1. High Dynamic Range photos

Gigaom. iOS 4.1 Update Next Week, 4.2 in November
I'm not the first to update OS on my iPhone. But this announce looks very interesting. iOS 4.1 is supposed to fix the performance problems and will bring new feature - High Dynamic Range photos:
Using High Dynamic Range (HDR), the iPhone takes three photos: one at normal exposure, one under exposed, and one over exposed. iOS 4 then combines the three photos using “advanced algorithms” to create a single high-definition photograph. Both the normal exposure picture and the HDR picture are kept in the photos app on the iPhone, making it easy to choose one or the other. The demos look amazing; the HDR photos bring out features in the background that you couldn’t see in the normal exposure

Worldwide OS Market Share

Just an information:
iOS Over Linux Today, Android Over iOS Tomorrow

Windows Phone Team is very excited to say

Windows Phone Blog. Windows Phone 7 – Released To Manufacturing
Windows Phone 7 released to manufacturing. Seems like the developers are really proud and believe that this is really a great OS.