Posts

Do Android controls/widgets have choice of styles? -

i have column of checkboxes , associated edittexts , want 1 pair of these have distinct appearance because has distinct significance. short of writing custom controls, or using custom drawables, android have way style or alter appearance of basic controls buttons, checkboxes, etc, in xml control declared? or there 1 native style or appearance android checkboxes, buttons, edittexts, etc? thanks in advance. you can custom related style: http://developer.android.com/guide/topics/ui/themes.html in fact, android button textview different style. in source code, button extend textview no overriding.

geospatial - Problem with a column name contains a colon in PostgreSQL -

i downloaded shape data osm. have imported data shapefile postgresql without problem got error when select statement. select addr:city location; error: syntax error @ or near ":" the problem because of column name contains colon. me issue? should reject shapefile in importing process? shapefile normal? if enclose addr:city quotes should work: select "addr:city" "location"; and if want use openstreetmap data, don't have import shapefiles. instead, can import planet.osm (or regional subset) directly osm2pgsql .

flash - FlashDevelop - change default choice for autocompleted classes -

sometimes there name conflict between classes in 2 different libraries, exclusively use 1 on other. unfortunately, 1 using not showing first entry , have press down arrow pick it. how can change 1 shows first default? this not possible using flashdevelop. can see response developer in forum post similar question here: sorting types in codecompletion

Specifying relationships with YAML for Doctrine -

just trying specify tables structures , models doctrine in yaml file. i'm going through documentation on page: http://www.doctrine-project.org/projects/orm/1.2/docs/manual/yaml-schema-files/en i haven't quite got grasp on each line in relations section doing. here's sample yaml page: user: columns: username: type: string(255) password: type: string(255) contact_id: type: integer relations: contact: class: contact local: contact_id foreign: id foreignalias: user foreigntype: 1 type: 1 specifically, relations , in order: contact is.. guessing name of other corresponding table pertaining relationship? class: contact is.. exactly? name of model created yaml? local: contact_id local key, understand this. foreign: id field name of foreign key, understand this foreignalias: user line doing? foreigntype: one type: one: guessing these 2 lines specify type of relationship, eg,...

.net - Cannot find System.Runtime.Serialization.Json in MonoTouch -

i beginner in monotouch. deserialize json data using datacontractjsonserializer. cannot reference system.runtime.serialization.json(only .formatters under system.runtime.serialization) in monodevelop. have referenced system.runtime.serialization. config , installation sequences are: 1. iphone sdk 4.2 2. mono 2.8.2 (not csdk version) 3. monotouch 3.2.4 eval 4. monodevelop 2.4 what problem? monotouch not ship datacontractjsonserializer simple serializer looks, brings in large set of libraries. you can use either system.json api or can try newtonsoft's json library.

c# - Getting "IErrorInfo.GetDescription failed with E_FAIL(0x80004005)" when querying "select * from open" -

i have c# app connected jet 4.0 engine. when run query "select * open" (i think "open" keyword , why i'm getting exception, but...) exception: "ierrorinfo.getdescription failed e_fail(0x80004005)". more human readable exceptions telling me wrong query. 1 looks more bug in jet engine. tested in microsoft access 2002 run same query , treats "open" valid name. can create table named "open" , whatever want it. need know if it's bug in jet engine can go ahead , replace weired looking message human readable 1 , show user, or if there problem code. i have been through same problem, try enclosing reserved word in square brackets i.e.: "select * [open]"

Is there a math nCr function in python? -

Image
possible duplicates: statistics: combinations in python counting combinations , permutations efficiently project euler problem in python (problem 53) i'm looking see if built in math library in python ncr (n choose r) function: i understand can programmed thought i'd check see if it's built in before do. the following program calculates ncr in efficient manner (compared calculating factorials etc.) import operator op def ncr(n, r): r = min(r, n-r) if r == 0: return 1 numer = reduce(op.mul, xrange(n, n-r, -1)) denom = reduce(op.mul, xrange(1, r+1)) return numer//denom