Posts

cocoa - Using "Tab" key to move from NSTextField to NSMatrix -

i have cocoa form (xib) contains nstextfield s , nsmatrix of nsbuttoncell s. can use "tab" key tab though nstextfield s, nsmatrix gets skipped over. i want able tab nsmatrix , , tab 1 button next within matrix. i have put in following line of code, having no effect: [mtxmymatrix settabkeytraversescells:yes]; can problem or point me example? have searched hours no success. i had similar problem , solution found fiddling "first responder" setting. specifically, making sure entire form didn't refuse, , each individual field likewise accepted first responder status. again, whole form, , each field well. searched while... :( i'm noob.

How to elegantly implement the pipeline pattern using Scala -

i'm looking build pipeline pattern scala. wish after write pipeline objects, connected this: pipeline1 :: pipeline2 :: pipeline3 ... i have experimented few ideas far. work , don't. none of them seems rid of boilerplate code. following closest i've got. first define pipeline , source abstract class: // input type , o output type of pipeline abstract class pipeline[i, +o](p: pipeline[_, _ <: i]) { val source = p val name: string def produce(): o def stats():string } abstract class source[+t] extends pipeline[anyref, t](null) next, created 2 pipelines , try link them together // creates random integer class randominteger extends source[int] { override val name = "randint" def produce() = { scala.math.round(scala.math.random.asinstanceof[float] * 10) } def stats()="this pipeline stateless" } // multiply ten class timesten(p: pipeline[_, int]) extends pipeline[int, int](p) { private var count = 0 // simple state o...

r - roxygen2 + cygwin + default parameter = truncated `\usage` section -

i have package r i've been developing under linux, , horrible time has come i'm testing under windows. the documentation done using roxygen, , using cygwin build package. the thing is, when roxygenise('test-package') , roxygen truncates \usage section of documentation 1 character. not of functions, , can't figure out pattern. this not occur when run same command (i.e. roxygenise('test-package') r prompt) under linux or windows - cygwin under windows (using r devtools + command prompt windows isn't option me - it's part of big project makefiles etc). in cases, using roxygen v2.2.2. update: this appears occur function default parameter. i've boiled down 1 reproducible example, trimmed down as possible isolate problem: from r: # function used trim strings, i've stripped right down # eliminate cause of problem trim <- function(x='asdf') { return( x ) } package.skeleton('test') modify trim.r (i...

android - How to get the current latitude and longitude in my mobile -

i have developed application uses google's api level 8, when run app in device supporting android version 2.2 , working properly, can current latitude , longitude.but when run same application on device has android version 2.3.4 works ok except 1 thing not able current latitude , longitude, returns null value. how make app compatible version of android , there way or bug in android api level , have stucked here highy obliged. other option can use phonegap in android application..please follow link phonegap

javascript - What is the purpose of passing-in undefined? -

i have noticed jquery , related keynote plugins jquery.ui pass undefined parameter anonymous functions used in module definitions, so: (function($, undefined) { ... })(jquery); alternatively, have noticed other plugins recommended jquery and/or others not pass undefined in parameter. this silly question, but... shouldn't available anyway? why pass in? there sort of other purpose or trick going on here? there 2 reasons that: 1) if undefined variable in function scope rather global object property, minifiers can reduce single letter achieving better compression rate. 2) before es5*, undefined property of global object without write-protection. overwritten, resulting in strange , unexpected behavior. this: var test = 123; undefined = 123; if (test === undefined){ // true, since undefined equals 123 } by having function argument undefined (the name not matter) don't pass parameter to, make sure have variable undefined can test "undefine...

iphone - MapKit : Add custom callout -

i want add custom annotationview callout contains 1. title 2. subtitles 3. button the button can display on right ( rightcalloutaccessoryview ) or left leftcalloutaccessoryview sides of callout. want add button in middle of callout , under title->subtitle. how can do? there no api this. try not using standard callout (canshowcallout = no), catch taps , drags on annotationview manually , show own ui adding custom views based on position of annotationview. seems fragile, though.

Additional sections in ASP.NET web.config file error -

i have legacy asp.net web site, upgraded asp.net 2.0 asp.net 4.0 target framework. it's pity, old web.config file uses many custom sections, positioned on same level appsettings. web site compiles error "unrecognized configuration section mycustomsection" . possible not refactor code , keep custom config sections in web.config file? have added mycustomsection configsections? <configsections> <section name="mycustomsection"... /> </configsections>