Posts

osx - Can a Cocoa app's executable steal focus from caller? -

say have standard cocoa application call foo.app (like 1 choosing new project > cocoa application in xcode), if open app via terminal using: open foo.app/ then see foo's name on status bar top , window in focus, in front of other apps. if instead directly call terminal executable buried in .app folder, like: foo.app/contents/macos/foo nothing appears happen. on inspection app has indeed opened not in focus (the terminal still is), have find on dock or find window. is there way foo application make sure in focus when run? if run via executable described above? your app can "steal focus" calling [[nsapplication sharedapplication] activateignoringotherapps:yes]; see nsapplication docs more info.

objective c - Table Border for an Iphone app -

i new iphone app development. have been trying draw border table in iphone app. of posts see how remove seperation lines between cells or change colors or add background. i tried following - (void)viewdidload { [super viewdidload]; self.tableview.layer.border = 1; } however, says border not attribute. it great if me out in this. perhaps mean you'd display table in 'grouped' style, adds border? [table setstyle:uitableviewstylegrouped]; http://developer.apple.com/library/ios/#documentation/uikit/reference/uitableview_class/reference/reference.html

security - How safe is to use an online SVN repository? -

how safe use online svn repository? i want develop collaboratively friends. know can create non-public accounts in of services, can't fell confortable send of our intelectual products company manage. after all, if idea works, companies can find source code! do think care important ? if so, best solution? my question isn't "how is" or "which better", want know if trust them , why (or why not). below give svn repositories examples: xp-dev unfuddle assembla thank all! it important concerned source code in cloud. @ end of day have weigh cost of installing, securing, maintaining, backing vs $10/month plan hosted svn service. there going sector never upload code hosted repo, i.e. banks, military, etc, majority of risk low , minor compared benefits of not doing yourself. make sure provider choose enforces ssl, has regular backups (at least hourly granularity), datacenter provider sas70, , policy allowing download full svn repo dump if...

Why GNU Make canned recipe doesn't work? -

i'm expecting see files foo1 , foo3 created makefile below. file foo3 created. me seems canned recipe make-foo ignored make. debug outcome of targets foo1 , foo2 (empty recipe) identical. # why canned recipe doesn't work ? # http://www.gnu.org/software/make/manual/make.html#canned-recipes define make-foo = echo making $@ touch $@ endef .phony: all: foo1 foo2 foo3 # foo1 not created, why ? .phony: foo1 foo1: $(make-foo) # debug output similar foo1 .phony: foo2 foo2: # works .phony: foo3 foo3: echo making $@ touch $@ running make: xxxx@xxxx:/dev/shm$ make -drr gnu make 3.81 copyright (c) 2006 free software foundation, inc. free software; see source copying conditions. there no warranty; not merchantability or fitness particular purpose. program built i686-pc-linux-gnu reading makefiles... reading makefile `makefile'... updating makefiles.... considering target file `makefile'. looking implicit rule `makefile'. no implicit rule fo...

In Typo3, what is the difference between setup, constants, and TSConfig -

it seems there 3 different places can write typoscript: in templates, there constants field , setup field, , in each page, there tsconfig field. however, seems each typoscript command need go in specific field. of time, have try before finding if given configuration goes template setup, or in root page tsconfig . why there 3 different places write typoscript? use of each of them? tsconfig backend configuration. can add/alter/remove values forms, change behavior kind of records users can add, default usergroups etc. see here more details. typoscript in template used change frontend behavior, template parsing, extension configuration, navigation etc. typoscript in template has called cobjects provide useful functionality image manipulation (image), getting records database (records), creating menus (hmenu), see reference . typoscript constants variables, can used within template typoscript. e.g. have email address occurs in many different places within typoscript temp...

Can't find git plugin in Netbeans 7.0 beta 2 -

although it's written in several pages of netbeans beta 2 release notes (there's a tutorial ), downloaded linux version , can't find how install promised git plugin add git support netbeans. have tried beta , found same problem me? i'm on netbeans beta 2 linux. i have done: 1) go tools>plugins , must click on available plugins find: git . check it. install it. 2) then, right click on project properties, choose: versioning > initialise git repository the tutorial mention, all: http://netbeans.org/kb/docs/ide/git.html perhaps temporary issue?

Static variable inside of a function in C -

void foo() { static int x = 5; x++; printf("%d", x); } int main() { foo(); foo(); return 0; } what printed out? 6 6 or 6 7 and why? there 2 issues here, lifetime , scope. the scope of variable variable name can seen. here, x visible inside function foo(). the lifetime of variable period on exists. if x defined without keyword static, lifetime entry foo() return foo(); re-initialized 5 on every call. the keyword static acts extend lifetime of variable lifetime of programme; e.g. initialization occurs once , once , variable retains value - whatever has come - on future calls foo().