text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
want to load it until it's needed. So for most employees the property would never get accessed, but when it does, it self-loads with a call to the BL, which calls the DA.
Does the question make sense?
If so, does my solution?
Thanks so much in advance!
Create the objects with the new operator. ie
```
void foo( myO... | [
0.16503384709358215,
0.028652820736169815,
0.4754694700241089,
-0.2405233234167099,
0.3568730354309082,
-0.025805294513702393,
0.24689960479736328,
-0.2087550163269043,
-0.1511438935995102,
-0.5214671492576599,
-0.4515402615070343,
0.610712468624115,
-0.262780100107193,
0.10807037353515625... | |
thing1;
delete thing2;
return 0;
}
``` | [
-0.05655042827129364,
-0.12892018258571625,
0.15322428941726685,
-0.2164916694164276,
0.1553308069705963,
-0.131803959608078,
0.4340149760246277,
-0.1634962111711502,
-0.024893276393413544,
-0.1231246218085289,
-0.5792739391326904,
0.48621419072151184,
-0.4368022680282593,
0.23616850376129... | |
What is the best way to get the reverse behavior of the YesNo Boolean type in NHibernate mapping?
I want 'Y' to mean false and 'N' to mean true.
Is there a NoYes type? Do you write a custom type? something really easy?
This issue of needing to reverse the Boolean exists on at least one field on over 40 tables.
Tryin... | [
0.11739219725131989,
0.13899247348308563,
0.10660430043935776,
0.06328894942998886,
-0.25292277336120605,
0.18139511346817017,
-0.03623339161276817,
0.09426296502351761,
-0.04199100285768509,
-0.4217917025089264,
0.3042937219142914,
0.28737401962280273,
-0.30995655059814453,
0.284685373306... | |
the form `yyyyMMdd`, which happened to be the way the dates were stored in a DB2 dump I had to use.
Los Techies have an example on implementing `IUserType` that you can use to solve your problem: [Mapping Strings to Booleans Using NHibernate's IUserType](http://www.lostechies.com/blogs/rhouston/archive/2008/03/23/mapp... | [
-0.09755277633666992,
0.012512880377471447,
0.03757346048951149,
0.14413562417030334,
-0.11266350001096725,
-0.19188599288463593,
0.13934999704360962,
0.137367844581604,
-0.19800420105457306,
-0.3410038352012634,
0.026623258367180824,
0.2689388394355774,
-0.2446444183588028,
0.365028023719... | |
What is the best way to handle the need to a user to download 2 files. I'm using *send\_data* to send the file to the browser. How can I allow the user to get two dynamically generated files from one request, **OR** what is a better alternative to do this. A simple example of what I'm trying to do is:
```
def data_o... | [
0.04816777631640434,
-0.1072407141327858,
0.5917431712150574,
-0.15766149759292603,
0.020940527319908142,
-0.15513043105602264,
0.050561536103487015,
-0.3325432240962982,
-0.24426332116127014,
-0.6560957431793213,
-0.24174179136753082,
0.755912184715271,
-0.5804787278175354,
-0.07066089659... | |
data\_out, only *bar.txt* file is sent to the browser.
I would zip them first using RubyZip, then present the zip file as a single download. Smaller download size, faster download. | [
0.3116098642349243,
-0.08689173310995102,
0.5776367783546448,
-0.09173419326543808,
-0.14936932921409607,
0.3541736304759979,
0.02116548828780651,
-0.13212350010871887,
-0.28725749254226685,
-0.7021991610527039,
-0.21966663002967834,
0.2317967563867569,
-0.5085060596466064,
0.0913375169038... | |
I have a web service (actually a silverlight enable wcf service, but for all intents and purposes, it's a web service) with a method taking a datetime parameter. The method gets called from a client, which could be in a different time zone. The service hosting the web service is in pacific standard time, and it appears... | [
0.7852598428726196,
0.10087596625089645,
0.732537567615509,
0.10025051236152649,
0.2043713927268982,
-0.320443719625473,
0.2307807207107544,
0.2375834435224533,
0.08039102703332901,
-0.7464167475700378,
0.16336792707443237,
-0.014911600388586521,
-0.024626614525914192,
0.5328950881958008,
... | |
timezone, so because of the conversion, the comparison is not working.
Is there any way to turn the conversion off?
> and it appears the web service is converting the date time value to the servers time zone.
I'm trying to make sure I have this correct: your web service method takes a parameter of type DateTime (as ... | [
0.1531032770872116,
-0.23952533304691315,
0.5248281359672546,
0.15619520843029022,
0.13954520225524902,
0.07135944068431854,
0.30714741349220276,
0.16485531628131866,
-0.2185012400150299,
-0.8764524459838867,
0.180894672870636,
0.2281011939048767,
-0.23738498985767365,
0.46878382563591003,... | |
code snippets, it would make the scenario easier to diagnose.
UPDATE: Not sure if this scenario is accurate, so please clarify:
* Client submits request with DateTime value of '12:00:00 00:00:00 PM CST'
* Server in PST receives/interprets request at '10:00:00 00:00:00 PM PST'
If this is the case, can you convert all... | [
0.17571361362934113,
-0.323243111371994,
0.5860497355461121,
0.3547669053077698,
0.12072811275720596,
0.05543071776628494,
0.6010866761207581,
0.09921851754188538,
-0.1904510259628296,
-0.855542778968811,
-0.4185768961906433,
0.07981965690851212,
0.02511484920978546,
0.1401456594467163,
... | |
Some lanaguages, like Perl, support printing preformatted code:
```
print <<EOL
a line
another line
and another.
EOL
```
Some languages don't.
For the ones that don't, I'd like to be able to write my text and then convert it to a bunch of printfs:
```
printf "a line\n";
printf "another line\n";
printf "and ... | [
-0.056115150451660156,
-0.14757169783115387,
0.39521756768226624,
0.27199140191078186,
-0.18084563314914703,
-0.08359780162572861,
0.16881048679351807,
-0.15980049967765808,
-0.08900579810142517,
-0.6026836037635803,
-0.39836931228637695,
0.6419444680213928,
-0.06724970787763596,
0.0471784... | |
According to a school assignment, only one property of the Document object can be dynamically changed after a Web page is rendered. Is it body or cookie?
You can manipulate the body contents, but can't assign to the body property. It's a readonly property. You can however set or get the cookies associated with the docu... | [
0.2205285280942917,
-0.32967492938041687,
0.3451264500617981,
0.4314497709274292,
0.15477876365184784,
-0.20604756474494934,
0.2521896958351135,
-0.05943940579891205,
-0.2812498211860657,
-0.5902360677719116,
-0.3079190254211426,
0.1961817443370819,
0.04898344725370407,
0.05610762163996696... | |
I'm trying to parse the title tag in an RSS 2.0 feed into three different variables for each entry in that feed. Using ElementTree I've already parsed the RSS so that I can print each title [minus the trailing `)`] with the code below:
> ```
> feed = getfeed("http://www.tourfilter.com/dallas/rss/by_concert_date")
>
>... | [
0.6194681525230408,
0.0996999517083168,
0.570711076259613,
-0.003354306798428297,
0.04345081374049187,
-0.12235554307699203,
0.32771730422973633,
-0.2210051715373993,
-0.486687570810318,
-0.16340196132659912,
-0.011524982750415802,
0.7951326966285706,
-0.122780442237854,
0.2084023952484130... | |
of Blues Dallas 3/26'
>
> ```
The user selects a band and I hope to, after parsing each `item.title` into 3 variables (one each for band, venue, and date... or possibly an array or I don't know...) select only those related to the band selected. Then they are sent to Google for geocoding, but that's another story.
I... | [
0.6926625370979309,
0.11100781708955765,
0.46440091729164124,
-0.1178392618894577,
0.169053852558136,
0.013516183942556381,
0.25669872760772705,
0.059230294078588486,
-0.3408437967300415,
-0.42753028869628906,
-0.1290791630744934,
0.3911688029766083,
-0.4218188524246216,
0.5242883563041687... | |
it matter that the output is currently is `repr()`s? Is there a better way? I was thinking I'd use a loop like (and this is my pseudoPython, just kind of notes I'm writing):
```
list = bandRaw,venue,date,latLong
for item in feed:
parse item.title for bandRaw, venue, date
if bandRaw == str... | [
0.5762355923652649,
-0.08397587388753891,
0.7327590584754944,
0.11074481159448624,
0.03712683543562889,
-0.23413866758346558,
0.0794544667005539,
0.2648514211177826,
-0.30749696493148804,
-0.4268217384815216,
-0.17075181007385254,
0.08129202574491501,
-0.2658960819244385,
0.295807987451553... | |
return lat,long
list = list + return character + bandRaw + "," + venue + "," + date + "," + lat + "," + long
else
```
In the end, I need to have the chosen entries in a .csv (comma-delimited) file looking like this:
> ```
> band,venue,date,lat,long
> randy travis,Billy Bobs,3/21,1234.5678,1234.567... | [
0.193791463971138,
0.24382458627223969,
0.3625301420688629,
-0.086353600025177,
0.41753050684928894,
0.06441372632980347,
0.0807274580001831,
-0.22913715243339539,
-0.3309146761894226,
-0.5074010491371155,
0.16249221563339233,
0.5445159673690796,
-0.04241793230175972,
0.27578338980674744,
... | |
post here to make sure it got answered.
So, the question is, how do I best parse each `repr(item.title[0:-1])` in the `feed` into the 3 separate values that I can then concatenate into a .csv file?
Don't let regex scare you off... it's well worth learning.
Given the examples above, you might try putting the trailing... | [
0.38848036527633667,
0.21431368589401245,
0.5958959460258484,
-0.1420348733663559,
0.024328628554940224,
0.10124028474092484,
0.27151310443878174,
-0.20964570343494415,
-0.37490010261535645,
-0.4408442974090576,
-0.1326993852853775,
0.3154587745666504,
-0.5019654035568237,
0.09787134081125... | |
of Blues Dallas","3/26"
```
The hard thing about regex in this case is making sure you know all the known possible characters in the title. If there are non-alpha chars in the 'Michael Schenker Group' part, you'll have to adjust the regex for that part to allow them.
The pattern above breaks down as follows, which i... | [
0.12274464219808578,
0.16470016539096832,
0.10419724881649017,
-0.18660597503185272,
0.1665085405111313,
-0.07897552102804184,
0.3082750141620636,
-0.12060677260160446,
-0.07129604369401932,
-0.49086323380470276,
-0.38903895020484924,
0.2978038787841797,
-0.5242576599121094,
0.127750858664... | |
can be numbers and dashes here, you'll want to modify the pieces between the square brackets, which are the possible characters for the set.
`\(` : A literal parenthesis. The backslash escapes the parenthesis, since otherwise it counts as a regex command. This is the "(" part of the string.
`([\w\s]+)` : Same as the ... | [
0.24805258214473724,
0.0027830719482153654,
0.31816402077674866,
-0.23612873256206512,
0.0032035706099122763,
0.05794702097773552,
0.39062783122062683,
-0.34994378685951233,
-0.3341575264930725,
-0.4245912730693817,
-0.3261636197566986,
0.3111458122730255,
-0.6059556603431702,
0.0815332755... | |
group.
`\)` : Closing parenthesis for the above.
The python intro to regex is quite good, and you might want to spend an evening going over it <http://docs.python.org/library/re.html#module-re>. Also, check Dive Into Python, which has a friendly introduction: <http://diveintopython3.ep.io/regular-expressions.html>.
... | [
0.05315428599715233,
-0.11633841693401337,
0.2747812569141388,
0.2183118313550949,
-0.08887633681297302,
-0.24016250669956207,
0.17156165838241577,
-0.03514939919114113,
-0.145765021443367,
-0.35092729330062866,
-0.13361234962940216,
0.7490841746330261,
-0.07384855300188065,
-0.35969686508... | |
As multi-core processors become more and more popular, I think it would be wise for me to become familiar with how to write code to take advantage of them. I am a .NET developer, and am not sure where to begin (seriously, I have *no clue* where to start). Any suggestions?
Multi-core programming is essentially multi-thr... | [
0.49476194381713867,
0.3024643063545227,
-0.12446457892656326,
0.15481123328208923,
0.048818111419677734,
0.22295820713043213,
0.08429880440235138,
0.38981106877326965,
-0.519995391368866,
-0.6813566088676453,
0.11954959481954575,
0.4823836386203766,
-0.2586495578289032,
0.3163627386093139... | |
solve equal portions of the problem. | [
-0.09948254376649857,
0.5142911672592163,
-0.09706519544124603,
0.33167168498039246,
-0.15663033723831177,
0.1667615920305252,
0.30185526609420776,
-0.4007161259651184,
-0.04733244702219963,
-0.8569641709327698,
-0.06157117336988449,
0.41265416145324707,
-0.0984257385134697,
-0.42411264777... | |
I've been using C-style functions, but I just learned they can't see instance variables. So I was advised to convert them to Objective-C methods.
```
NSString* myfunc ( int x )
```
becomes:
```
- (NSString *)myfunc:(int)x
```
and
```
myString = myfunc(x);
```
becomes
```
myString = [myString myfunc:x];
```
... | [
-0.12577129900455475,
0.4231688976287842,
0.39066460728645325,
-0.3073016107082367,
-0.15196335315704346,
-0.0852551981806755,
0.4793846309185028,
-0.11819485574960709,
0.02018970437347889,
-0.5436128973960876,
-0.14582788944244385,
0.9274173974990845,
-0.510160505771637,
0.002701733727008... | |
I need to build an old VB6 application with a version number where the 4th digit is greater than 9999, for example, version `1.2.0.10003`. VB6 won't let you do this; the build fails.
The current workaround is to build version `1.2.0.9999` and then manually edit the file in Visual Studio to insert the correct version.... | [
0.3395845592021942,
0.34197378158569336,
0.40202808380126953,
0.0033460715785622597,
-0.02697511948645115,
-0.01365933008491993,
0.47627541422843933,
-0.1699831336736679,
-0.23655930161476135,
-0.7768977284431458,
-0.01865152083337307,
0.6837261915206909,
-0.18396469950675964,
0.4065791964... | |
the version info of a windows executable but I don't think you will need them.
Look here are using resource files in vb
<http://visualbasic.about.com/od/usevb6/a/ResVB6.htm>
And here for info on the version resource
<http://msdn.microsoft.com/en-us/library/aa381058.aspx>
And here for info on the microsoft resource c... | [
0.49196162819862366,
0.3484097123146057,
0.10501958429813385,
-0.0750056728720665,
-0.10502798110246658,
-0.11165574193000793,
0.2769770622253418,
-0.0014328506076708436,
-0.3255305886268616,
-0.6415019631385803,
-0.07330437004566193,
0.539316713809967,
-0.3344026207923889,
0.4943327605724... | |
I am using [JvMemoryData](http://sourceforge.net/projects/jvcl) to populate a JvDBUltimGrid. I'm primarily using this JvMemoryData as a data structure, because I am not aware of anything else that meets my needs.
I'm not working with a lot of data, but I do need a way to enumerate the records I am adding to JvMemoryDa... | [
0.36730191111564636,
0.15582211315631866,
0.38003450632095337,
0.043756838887929916,
-0.09415080398321152,
-0.42137566208839417,
0.06691063195466995,
0.07933040708303452,
-0.2765187621116638,
-0.8108248710632324,
0.1516890674829483,
0.18330118060112,
0.0014772121794521809,
0.26269027590751... | |
like a Dictionary/Hash, that allows for 1 key, and many values. Like so:
```
KEY1: val1;val2;val3;val4;val5;etc...
KEY2: val1;val2;val3;val4;val5;etc...
```
I considered using [THashedStringList](http://www.functionx.com/bcb/classes/thashtable.htm) in the IniFiles unit, but it still suffers from the same problem in ... | [
-0.15767110884189606,
-0.23406077921390533,
0.432068407535553,
-0.0017465850105509162,
-0.000028489524993347004,
-0.04891502112150192,
0.035118360072374344,
-0.44123008847236633,
-0.08601465076208115,
-0.516535222530365,
-0.17456039786338806,
0.3721478581428528,
-0.3589109182357788,
0.0287... | |
tStringList.Create );
InnerList := tStringList(SList.Objects[id]);
// for each child in list
InnerList.add( value );
```
When its time to dispose the list, make sure you free each of the inner lists also.
```
for i := 0 to SList.count-1 do
begin
if Assigned(SList.Objects[i]) then
SList.Objects[i].free;... | [
-0.10778246819972992,
-0.12685324251651764,
0.38614869117736816,
-0.1093326136469841,
0.053399328142404556,
0.23668189346790314,
0.29530400037765503,
-0.48036953806877136,
-0.43803104758262634,
-0.7198354601860046,
-0.3175583481788635,
0.17179664969444275,
-0.264917254447937,
0.14451542496... | |
I am currently working with `Panel`s in WPF, and I noticed that as regards the `Width` and `Height` properties, there are also two other properties called `ActualWidth` and `ActualHeight`.
> `ActualWidth`
>
>
> Gets the rendered width of this
> element. This is a dependency
> property. (Inherited from
> Framework... | [
0.2446475625038147,
-0.04661259800195694,
0.6883241534233093,
-0.1344647854566574,
-0.06857721507549286,
0.18349488079547882,
0.11152292042970657,
-0.4005812108516693,
-0.3451642096042633,
-0.8596733212471008,
-0.19396671652793884,
0.46144217252731323,
0.1077798530459404,
-0.05915693566203... | |
then the value is `double.NaN` when you access the property in code behind.
`ActualWidth`/`ActualHeight` and `RenderSize.Width`/`RenderSize.Height` both return the element's rendered size, as *RenderSize* is of type **Size**. If you want/need the actual size of the item, then use any of these attributes. | [
0.3194216787815094,
-0.14666534960269928,
0.22401674091815948,
-0.11192842572927475,
-0.1076739951968193,
0.4678201973438263,
0.05020677670836449,
-0.0173947773873806,
-0.15588510036468506,
-0.5955027937889099,
-0.05565202236175537,
0.6476325988769531,
0.3575384020805359,
-0.01371354050934... | |
God I hate the term "code smell", but I can't think of anything more accurate.
I'm designing a high-level language & compiler to [Whitespace](http://compsoc.dur.ac.uk/whitespace/) in my spare time to learn about compiler construction, language design, and functional programming (compiler is being written in Haskell).
... | [
0.5277191400527954,
0.9069094657897949,
0.15218080580234528,
-0.3343293368816376,
-0.03708716481924057,
0.06556939333677292,
0.6232588291168213,
-0.2074001282453537,
0.2841469943523407,
-0.8279128074645996,
0.13224123418331146,
0.4442411959171295,
-0.28323689103126526,
0.15681777894496918,... | |
be used again). Another example is when I come across in-line string literals in the syntax tree, they need to be permanently converted into heap variables (in Whitespace, strings are best stored on the heap). I'm currently wrapping the entire code generation module in the state monad to handle this.
I've been told th... | [
0.2055947333574295,
-0.10685376077890396,
-0.09024177491664886,
-0.06703661382198334,
-0.11716397851705551,
-0.10062073171138763,
0.3377164602279663,
-0.19970975816249847,
-0.21008926630020142,
-0.6481212377548218,
-0.10246844589710236,
0.5076735615730286,
-0.19360874593257904,
0.066358171... | |
learn how to think in Haskell (rather, in the functional paradigm) - not in C with Haskell syntax. Should I really try to eliminate/minimize use of the state monad, or is it a legitimate functional "design pattern"?
I'd say that state in general is not a code smell, so long as it's kept small and well controlled.
This... | [
0.3491915166378021,
-0.10505063086748123,
-0.18955190479755402,
0.22016412019729614,
0.1234937459230423,
-0.271862655878067,
0.5098283886909485,
0.30064138770103455,
0.10188418626785278,
-1.028191089630127,
-0.007009985391050577,
0.4582667648792267,
-0.12732261419296265,
-0.381477355957031... | |
state that goes all over the place (yes, this means you, IO monad!) is a bad smell.
An fairly clear example of this was when my team was working on our entry for the [ICFP Programming Contest 2009](http://icfpcontest.org/) (the code is available at git://git.cynic.net/haskell/icfp-contest-2009). We ended up with sever... | [
0.5206571817398071,
0.00044728608918376267,
-0.10846339166164398,
0.25216802954673767,
-0.2426193207502365,
0.1698482483625412,
0.32178932428359985,
-0.40816977620124817,
0.045605000108480453,
-0.657442033290863,
0.2667804956436157,
0.3714519143104553,
-0.36854273080825806,
0.2865327000617... | |
read both the input and output ports and generated some sort of visualization or log of what was going on as the simulation progressed
Each of these has its own state, and they all interact in various ways through the input and output values of the VM. We had several different controllers and visualizers, each of whic... | [
0.7346755862236023,
-0.08046858012676239,
0.2891400158405304,
0.4761725962162018,
0.04890495911240578,
0.48715198040008545,
-0.28856176137924194,
-0.25543928146362305,
-0.09886449575424194,
-0.38428178429603577,
0.5000092387199402,
0.5092816948890686,
0.005591406486928463,
0.33545678853988... | |
stateful code and data was generally only a few dozen lines long, with a handful of data items in the state.
All this was glued together in one small function of about a dozen lines which had no access to the internals of any of the states, and which merely called the right things in the proper order as it looped thro... | [
0.48021697998046875,
-0.26597386598587036,
0.1746654212474823,
0.5734806656837463,
0.011995657347142696,
0.2951711118221283,
0.2003585398197174,
-0.03664200007915497,
-0.15912865102291107,
-0.36675751209259033,
0.05356115475296974,
0.16448484361171722,
-0.08109094202518463,
-0.045619167387... | |
modifying it, it's quite easy to handle. It's one of the beauties of Haskell that it lets you do this.
One answer says, "Don't use monads." From my point of view, this is exactly backwards. Monads are a control structure that, among other things, can help you minimize the amount of code that touches state. If you look... | [
0.36607739329338074,
0.013641810044646263,
0.013802332803606987,
-0.12056533247232437,
-0.12361495941877365,
-0.040000222623348236,
0.5490346550941467,
0.1652384251356125,
-0.10787564516067505,
-0.8396115899085999,
-0.20583365857601166,
0.6183249950408936,
-0.47551319003105164,
0.087514661... | |
be a few combinators that actually manipulate the state directly; anything else uses one of these few functions. This allows you to see clearly and in one place all of a small amount of code that can change the state, and more easily reason about how it can be changed, again making it easier to deal with. | [
0.387024462223053,
-0.15192338824272156,
-0.14358697831630707,
0.4060184955596924,
-0.0669253021478653,
0.033532705157995224,
0.27006766200065613,
-0.130498468875885,
-0.17656069993972778,
-0.7039994597434998,
0.0963607206940651,
0.5310611128807068,
-0.20407207310199738,
-0.042183469980955... | |
I want to create a small windows application will go automatically every time period to my site and check if its running fine, if it found it down, not working or have an error "Examples: 404, network error, connection to db failed" it will show a message on my screen.
How can i know that there is an error there progr... | [
0.3361224830150604,
-0.04592883214354515,
0.18547962605953217,
0.06256340444087982,
-0.05164271220564842,
-0.14878708124160767,
0.46120312809944153,
-0.01593911275267601,
-0.1920718550682068,
-0.7896153926849365,
0.1226133480668068,
0.5883854031562805,
-0.48066970705986023,
0.2613443136215... | |
string response =
client.DownloadString("http://www.example.com/tester.cgi");
// We at least got the file back from the server
// You could optionally look at the contents of the file
// for additional error indicators
if (response.Contains("ERROR: Something"))
... | [
0.0774853304028511,
-0.26106148958206177,
0.18351422250270844,
-0.03578605502843857,
-0.1394772082567215,
0.2689172327518463,
0.347684383392334,
-0.13947215676307678,
-0.3073415160179138,
-0.22393810749053955,
-0.05714844912290573,
0.5431164503097534,
-0.23739247024059296,
0.12895725667476... | |
}
}
catch (WebException ex)
{
// We couldn't get the file.
// ... handle, depending on the ex
//
// For example, by looking at ex.Status:
switch (ex.Status)
{
case | [
0.33574360609054565,
-0.514701247215271,
0.24706697463989258,
-0.05305970460176468,
0.4157581627368927,
-0.08788178116083145,
0.12005910277366638,
-0.035746343433856964,
-0.13260440528392792,
-0.273470401763916,
-0.0394100584089756,
0.37972667813301086,
-0.34102919697761536,
0.153872057795... | |
WebExceptionStatus.NameResolutionFailure:
// ...
break;
// ...
}
}
```
You could hook that up to a `Timer`'s `Tick` event or something to periodically make the check. | [
0.4350184202194214,
-0.2007656842470169,
0.1135772317647934,
0.3430219888687134,
0.06636517494916916,
-0.4542961120605469,
0.17664089798927307,
0.2248641848564148,
-0.05036292225122452,
-0.6610656380653381,
0.09545031189918518,
0.39377450942993164,
-0.37159374356269836,
0.09367233514785767... | |
Is there a straightforward way to run mysql\_query with an insert and get the ID of the new row, for example in the return? Or will I have to do another query with select to check it?
mysql\_insert\_id()
or
select last\_insert\_id() | [
-0.04783167317509651,
-0.08987680077552795,
0.14927680790424347,
-0.12791085243225098,
0.17569522559642792,
0.06734498590230942,
-0.15125031769275665,
-0.13470421731472015,
0.06902151554822922,
-0.6075283288955688,
0.08560565114021301,
0.6343984603881836,
-0.3518265187740326,
-0.1057742983... | |
I have an editable ComboBox component and I want to reference the TextInput that is shown, in order to programmatically select the Text in it. This is very straightforward on a TextInput:
```
private function selectNameText():void
{
nameTextInput.selectionBeginIndex = 0;
nameTextInput.selectionEndIndex = name... | [
-0.07005004584789276,
-0.11883977800607681,
0.1475406140089035,
-0.22932688891887665,
-0.08906907588243484,
0.04237403720617294,
0.11860200017690659,
-0.32656723260879517,
0.08756513893604279,
-0.7684533596038818,
-0.08428380638360977,
0.7274532914161682,
-0.3536422550678253,
0.11374078691... | |
Per the title, do you find the default Java logging framework sufficient for your needs?
Do you use alternative logging services such as [log4j](http://logging.apache.org/log4j/) or others? If so, why?
I'd like to hear any advice you have regarding logging requirements in different types of projects, and when integrat... | [
0.5179422497749329,
0.08242521435022354,
-0.04232973977923393,
0.3004893958568573,
-0.0075281355530023575,
-0.43639272451400757,
0.25214940309524536,
-0.13173435628414154,
-0.5306248068809509,
-0.44113120436668396,
-0.13291111588478088,
0.6584238409996033,
-0.2001148760318756,
-0.253665864... | |
need to abstract your logging API from your logging implementation become important. I recommend using [slf4j](http://www.slf4j.org/) or [logback](http://logback.qos.ch/) (uses the slf4j API) as your API and if you want to stick with Java JDK logging, you still can! Slf4j can output to many different logger implementat... | [
0.3794133961200714,
-0.09150194376707077,
0.3254428803920746,
-0.020905859768390656,
-0.28438800573349,
-0.3380427062511444,
0.1528320014476776,
-0.17879584431648254,
-0.3479357957839966,
-0.5027165412902832,
0.2157965749502182,
0.4639417827129364,
-0.5001693367958069,
-0.21371415257453918... | |
fine, but a standardized API that is used in my third party libraries will save you time in the long run. Just try to imagine refactoring every logging statement! | [
0.6869442462921143,
0.1538389027118683,
-0.05171835049986839,
0.31987494230270386,
0.19641591608524323,
-0.5199642181396484,
0.5767654776573181,
0.3312947452068329,
-0.1697492152452469,
-0.2992801070213318,
0.18888616561889648,
0.6114823222160339,
0.02913694642484188,
-0.04444742202758789,... | |
I have a report I need to print from a Flex Project I have written. The report needs to look like this:
```
Header
-----------
text, more text
.----------------------------.
|Data Grid of Variable Height|
|============================|
| |
| |
|~~~~~~~~~... | [
0.027247747406363487,
-0.06080397590994835,
0.581841766834259,
-0.07709100097417831,
-0.06075654551386833,
-0.33104395866394043,
0.02053641900420189,
-0.3208268880844116,
-0.24444285035133362,
-0.7870745658874512,
-0.10636293143033981,
0.6955440044403076,
-0.1195836216211319,
0.10072272270... | |
|
| |
|____________________________|
Fixed height chart
Lots more text
End
```
I have spent about 16 hours trying to get this working. Every example I have found either has a PrintDataGrid a fixed height of 100% of its container, and then doing some really verbose | [
0.22229386866092682,
0.34632498025894165,
0.7488902807235718,
0.05014771595597267,
0.016411684453487396,
-0.26590514183044434,
0.3905065059661865,
0.0062911310233175755,
-0.14665469527244568,
-0.6029101014137268,
-0.2470148652791977,
0.391765832901001,
-0.10282678157091141,
0.1184610798954... | |
code to span it to multiple pages. Has anyone gotten anything like this to work? I am considering just making a webservice that takes the data and spits it back in Html, but I would have to recreate the chart.
Python
```
sum(map(int,open('file.dat').readline().split(',')))
``` | [
0.517729640007019,
-0.13340741395950317,
0.3321962058544159,
-0.018162939697504044,
-0.0032267768401652575,
-0.16272325813770294,
0.30876898765563965,
-0.2637375593185425,
-0.31910836696624756,
-0.7465395331382751,
-0.14520466327667236,
0.3013555407524109,
-0.43987756967544556,
-0.06872241... | |
I've deployed trac using apache/mod\_wsgi (no SSL) (preferable, since the
problem I'm facing with CGI is performance), and it works fine WITHOUT SVN
integration. But I actually need SVN, so when I configure the repository
path (i.e: repository\_dir = c:/projects/svn/my\_project) I can't even get my
project TRAC to even... | [
0.1184191107749939,
0.03846072778105736,
0.5451828241348267,
-0.3189672529697418,
-0.038294561207294464,
-0.2201889604330063,
0.5026777982711792,
-0.1418989896774292,
-0.09852446615695953,
-0.7114858627319336,
-0.25669384002685547,
0.7443320751190186,
-0.6204375624656677,
0.065658569335937... | |
using Apache Basic Auth).
**Environment:**
* Win 2000 Server SP 4;
* Apache 2.2.10;
* Python 2.5.2;
* mod\_wsgi revision 1018 2.3, py25\_apache22;
* Trac 0.12dev;
* Subversion 1.5.3.
**Configuration files:**
* Apache httpd.conf excerpt:
> ```
> WSGIScriptAlias /trac "c:/projects/apache/trac.wsgi"
>
> <Directory c... | [
0.11903511732816696,
-0.06466327607631683,
0.3388385772705078,
0.15849058330059052,
-0.11954033374786377,
-0.17406967282295227,
0.32245394587516785,
-0.23067201673984528,
-0.31103694438934326,
-0.42218315601348877,
-0.4392246603965759,
0.1558188647031784,
-0.27342331409454346,
0.0714557841... | |
handler (NewFaqDropDownCategory\_SelectedIndexChanged).
I suspect the databind is being called right before your NewFaqDropDownCategory\_SelectedIndexChanged event fires causing your selected value to change.
If so, you need either to make sure you only databind if you aren't in the middle of your autopostback or inst... | [
0.1497574746608734,
-0.6216656565666199,
0.18951602280139923,
0.18478824198246002,
0.10560561716556549,
-0.26278096437454224,
0.10376083105802536,
-0.2855105400085449,
-0.2093961089849472,
-0.5454907417297363,
-0.030731242150068283,
0.5849691033363342,
-0.5679640173912048,
-0.0010069003328... | |
Is it possible to install the latest JDK on Mac OS 10.5? What are the best options, considering that the Apple-supplied version is 1.5?
**Update:** I am trying to install JDeveloper 11, which requires JDK 6.
If you have an Intel Mac with a Core 2 Duo, go to Applications/Java and run Java Preferences.app
You'll be abl... | [
0.3606143593788147,
0.18220162391662598,
0.20772917568683624,
-0.08704562485218048,
-0.14274027943611145,
-0.2620633542537689,
0.5522890090942383,
0.15181483328342438,
0.18347768485546112,
-1.0466147661209106,
-0.2690029442310333,
0.9411696791648865,
-0.137414813041687,
-0.0939647629857063... | |
I'm trying to add a timestamp to a file. However the `DateTime` Format `ToString()` looks weird to me.
Here is my code:
```
Dim _timeStamp As String = Date.Now.ToString("dd_mm_yyyy")
```
but the value looks like this:
> `_timeStamp = "03_24_2009"`
I checked my PC and the current date is correct. Shouldn't the va... | [
0.20370446145534515,
0.13397416472434998,
0.7847765684127808,
-0.09676142036914825,
0.2919189929962158,
0.19380004703998566,
0.1356286108493805,
0.2607550621032715,
-0.3266448974609375,
-0.5253390669822693,
0.06975843757390976,
0.13386750221252441,
0.12846271693706512,
0.45566219091415405,... | |
I have the following code:
```
Dim db As New linqclassesDataContext
Dim categories = (From c In db.faq_cats)
NewFaqDropDownCategory.DataSource = categories
NewFaqDropDownCategory.DataTextField = "category"
NewFaqDropDownCategory.DataValueField = "category_id"
If Not Page.IsPostBack Then
NewFaqDropDownCategory.Data... | [
0.20047807693481445,
0.10174190998077393,
0.7907328009605408,
-0.01739216409623623,
-0.18543457984924316,
-0.2215815931558609,
0.2452070116996765,
-0.6779372692108154,
-0.28117635846138,
-0.2703806459903717,
-0.21794499456882477,
0.6356134414672852,
-0.46382609009742737,
0.2069966197013855... | |
End If
Next
```
I could expand this in the future to process other values as well.
If there are other HTML encoded characters in there as well you could use `HttpUtility.HtmlDecode(c.category)`. This would prevent your replace and ensure that any characters are properly decoded.
I don't know if this is exact VB li... | [
0.14504845440387726,
-0.06965246051549911,
0.80560302734375,
0.21585699915885925,
-0.02031385898590088,
-0.17998187243938446,
0.0766855850815773,
-0.2678530216217041,
-0.15887534618377686,
-0.5681951642036438,
-0.22481144964694977,
0.5745725035667419,
-0.17908047139644623,
0.41310742497444... | |
also just use .Replace if you only need `&`
```
Dim datasource = From categories In db.faq_cats _
Select New With { .category = categories.category.Replace("&", "&"), .category_id = categores.category_id }
``` | [
0.021766996011137962,
-0.15688194334506989,
0.5514832139015198,
-0.056843772530555725,
0.12435490638017654,
-0.13620419800281525,
0.20526406168937683,
-0.43755099177360535,
-0.14529186487197876,
-0.5768018364906311,
-0.2785525321960449,
0.810078501701355,
-0.49060556292533875,
0.1194844990... | |
I am trying to write something in my Flex 3 application with actionscript that will take an image and when a user clicks a button, it will strip out all the white(ish) pixels and convert them to transparent, I say white(ish) because I have tried exactly white, but I get a lot of artifacts around the edges. I have gotte... | [
0.28333643078804016,
-0.22877240180969238,
0.33851903676986694,
-0.1378805935382843,
-0.3108816146850586,
0.009856697171926498,
0.10771780461072922,
-0.2728065848350525,
0.008873329497873783,
-0.9396212697029114,
0.36501798033714294,
0.29708191752433777,
-0.4981497526168823,
0.086533807218... | |
that is better suited for my needs?
A friend and I were trying to do this a while back for a project, and found writing an inline method that does this in ActionScript to be incredibly slow. You have to scan each pixel and do a computation against it, but doing it with PixelBender proved to be lightning fast (if you ca... | [
0.36189553141593933,
-0.1673567295074463,
0.5768149495124817,
0.00678875669836998,
-0.28018292784690857,
-0.013939376920461655,
-0.14449499547481537,
-0.4741719365119934,
0.1789516657590866,
-0.6873114705085754,
0.4783285856246948,
0.6038041710853577,
-0.5645220279693604,
-0.14167289435863... | |
1.0;
defaultValue: 0.4;
>;
// Color you are matching against.
parameter float3 color
<
defaultValue: float3(1.0, 1.0, 1.0);
>;
void evaluatePixel()
{
float4 current = sampleNearest(src, outCoord());
dst = float4((distance(current.rgb, color) < threshold) ? 0.0 : current);
}
```
If you need to do it in AS yo... | [
0.24094267189502716,
-0.4719301462173462,
0.6311178803443909,
-0.16855765879154205,
0.10906881093978882,
0.20072178542613983,
0.3772071599960327,
-0.8092689514160156,
-0.06358396261930466,
-0.42785367369651794,
-0.23333711922168732,
0.4558311104774475,
-0.2782045900821686,
0.09744308143854... | |
var rx:uint = Math.abs(((c1 & 0xff0000) >> 16) - ((c2 & 0xff0000) >> 16));
var gx:uint = Math.abs(((c1 & 0xff00) >> 8) - ((c2 & 0xff00) >> 8));
var bx:uint = Math.abs((c1 & 0xff) - (c2 & 0xff));
var dist = Math.sqrt(rx*rx + gx*gx + bx*bx);
if (dist <= threshold)
dest.setPixel(x, y, 0x0... | [
-0.31568190455436707,
-0.03382920101284981,
0.6701062917709351,
-0.16041140258312225,
-0.2157340943813324,
0.48838675022125244,
0.49510031938552856,
-0.6303113698959351,
-0.14042344689369202,
-0.18361271917819977,
-0.6822323203086853,
0.7299098372459412,
-0.2488245964050293,
-0.36479228734... | |
}
}
dest.unlock();
}
``` | [
-0.22707773745059967,
-0.08394062519073486,
-0.07505004107952118,
-0.26605120301246643,
0.42959490418434143,
-0.38789838552474976,
0.33382493257522583,
-0.07199938595294952,
-0.013274270109832287,
-0.5454680919647217,
-0.5815830230712891,
0.9716235399246216,
-0.39208823442459106,
0.2947689... | |
I need a good source for reading up on how to create a algorithm to take two polylines (a path comprised of many lines) and performing a union, subtraction, or intersection between them. This is tied to a custom API so I need to understand the underlying algorithm.
Plus any sources in a VB dialect would be doubly hel... | [
0.7735188603401184,
-0.06443606317043304,
0.12435131520032883,
0.14751316606998444,
-0.04748358204960823,
0.09028974920511246,
0.007678027730435133,
0.06805729866027832,
-0.07812319695949554,
-0.8465688824653625,
0.26576367020606995,
0.25947436690330505,
-0.4940042793750763,
0.006302010267... | |
but doing it with PixelBender proved to be lightning fast (if you can use Flash 10, otherwise your stuck with slow AS).
The pixel bender code looks like:
```
input image4 src;
output float4 dst;
// How close of a match you want
parameter float threshold
<
minValue: 0.0;
maxValue: 1.0;
defaultValue: 0.4... | [
0.12165753543376923,
-0.5019487738609314,
0.7047696113586426,
0.0005623582401312888,
-0.3850281834602356,
0.004179611336439848,
0.416525661945343,
-0.7436754703521729,
-0.03318912163376808,
-0.527019202709198,
0.16989284753799438,
0.5150976777076721,
-0.42766323685646057,
-0.27528640627861... | |
dest:BitmapData, color:uint, threshold:Number) {
dest.lock();
var x:uint, y:uint;
for (y = 0; y < source.height; y++) {
for (x = 0; x < source.width; x++) {
var c1:uint = source.getPixel(x, y);
var c2:uint = color;
var rx:uint = Math.abs(((c1 & 0xff0000) >> 16) - ((c2 & 0xff0000) >> 16));
... | [
0.09146580100059509,
-0.3143516778945923,
0.7000055909156799,
0.09240509569644928,
-0.3118378221988678,
0.4133215546607971,
0.566972017288208,
-0.8055763840675354,
-0.21333828568458557,
-0.49976539611816406,
-0.5650096535682678,
0.8024945259094238,
-0.1236557811498642,
0.000460061215562745... | |
- (c2 & 0xff));
var dist = Math.sqrt(rx*rx + gx*gx + bx*bx);
if (dist <= threshold)
dest.setPixel(x, y, 0x00ffffff);
else
dest.setPixel(x, y, c1);
}
}
dest.unlock();
}
``` | [
-0.1951279491186142,
-0.13443557918071747,
0.3782447576522827,
-0.17594683170318604,
0.06082291901111603,
0.034894101321697235,
0.4492180347442627,
-0.5423623919487,
-0.10525380820035934,
-0.2845502495765686,
-0.6148977279663086,
0.6715850830078125,
-0.2579615116119385,
0.19121815264225006... | |
Where can I find an explanation of what the `=>` operator means in Ruby?
For example,
```
class Acct < ActiveRecord::Base
validates_confirmation_of :password, :email_address, :on => :create
end
```
what is the `=>` operator doing in this case?
The symbol "=>" is not an operator. It's just a syntactic means to ex... | [
0.06987527012825012,
0.1106138750910759,
0.04880162328481674,
-0.01605241559445858,
-0.1535061001777649,
-0.33428019285202026,
0.42333441972732544,
-0.0983550027012825,
-0.14508488774299622,
-0.2314516305923462,
-0.1940963715314865,
0.3575442135334015,
-0.31175631284713745,
0.1528373658657... | |
to define an array). If you are still confused, have a look into the Hash Ruby class and compare it to the Array class. | [
0.10027243196964264,
-0.18169453740119934,
-0.0495581179857254,
0.01825682260096073,
-0.21460062265396118,
-0.13648644089698792,
0.4367344379425049,
-0.3537452816963196,
-0.08724009245634079,
-0.6461141705513,
-0.05532771348953247,
0.3424322307109833,
-0.3136295974254608,
0.084194548428058... | |
Given the following XML:
```
<?xml version="1.0"?>
<user_list>
<user>
<id>1</id>
<name>Joe</name>
</user>
<user>
<id>2</id>
<name>John</name>
</user>
</user_list>
```
And the following class:
```
public class User {
[XmlElement("id")]
public Int32 Id { get; set; }
[XmlE... | [
0.20383772253990173,
0.1373319923877716,
0.2725374102592468,
-0.010896998457610607,
0.08825951814651489,
-0.043383970856666565,
-0.19616982340812683,
-0.5508316159248352,
0.01110572088509798,
-0.8151943683624268,
-0.3401517868041992,
0.44359269738197327,
-0.013057333417236805,
0.1193719059... | |
do I need to use to construct the `XmlSerializer` instance?
An array ( `User[]` ) would be acceptable, if a bit less preferable.
You can *encapsulate* the list trivially:
```
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
[XmlRoot("user_list")]
public class UserList
{
public User... | [
-0.08408040553331375,
0.03751802444458008,
0.4262186884880066,
-0.13078050315380096,
0.07038826495409012,
0.08363568782806396,
0.01845180056989193,
-0.44495224952697754,
-0.06495537608861923,
-0.7424589395523071,
-0.2862568199634552,
0.3984142541885376,
-0.43169939517974854,
0.154343456029... | |
XmlSerializer ser= new XmlSerializer(typeof(UserList));
UserList list = new UserList();
list.Items.Add(new User { Id = 1, Name = "abc"});
list.Items.Add(new User { Id = 2, Name = "def"});
list.Items.Add(new User { Id = 3, Name = "ghi"});
ser.Serialize(Console.Out, list);
}
}
... | [
-0.23318549990653992,
-0.16873864829540253,
0.7781915664672852,
-0.276111364364624,
-0.3979993462562561,
0.25445497035980225,
-0.010230371728539467,
-0.5398016571998596,
-0.36930474638938904,
-0.9459114670753479,
-0.46916237473487854,
0.30140694975852966,
-0.5407037734985352,
0.43124133348... | |
I'm creating an image gallery site that you have to log in to access. The site will use sessions to keep track of usernames and passwords. Logged in users will be able to search for images and see results. Presumably, this means I'll be putting images in a web directory. How do I keep non-logged in people from being ab... | [
0.8630578517913818,
0.06545800715684891,
0.2745233476161957,
0.016619296744465828,
0.06757115572690964,
-0.17655369639396667,
0.1639648675918579,
0.0633644238114357,
-0.19096894562244415,
-0.6864908337593079,
0.3374205231666565,
0.5325977802276611,
-0.13701066374778748,
0.18525905907154083... | |
is then having PHP fetch the images from a location outside of your web dir.
Also, check out the comment string: using mod\_rewrite can do all this directly from apache. | [
0.19609352946281433,
-0.2428642064332962,
0.31424054503440857,
0.23739582300186157,
-0.2543126940727234,
-0.21640008687973022,
0.19620883464813232,
-0.12256446480751038,
0.020350812003016472,
-0.6704551577568054,
-0.002943505998700857,
0.7561244368553162,
-0.3123348355293274,
0.02076248265... | |
Is it possible to authenticate users across sub-domains when the authentication takes place at a sub-domain instead of the parent domain?
For example:
User logs into site1.parent.com, and then we need to send them to reporting.parent.com.
Can I authenticate them to the reporting site even though the log-in occured ... | [
0.4097045958042145,
0.09740162640810013,
0.2378389686346054,
0.14692243933677673,
-0.10391858220100403,
-0.34126558899879456,
0.4511496424674988,
-0.12067924439907074,
-0.17405229806900024,
-0.5323575139045715,
0.17502380907535553,
0.021681735292077065,
0.1480008363723755,
0.24921374022960... | |
full domain that you are on.
Once the auth cookie is correctly set to the parent domain, then all sub-domains should be able to read it. | [
-0.0014373607700690627,
-0.2288742959499359,
0.6578360199928284,
0.1781201958656311,
0.04821544513106346,
-0.3354875147342682,
0.03715880587697029,
0.5359777212142944,
-0.22443926334381104,
-0.8355234861373901,
-0.39973577857017517,
0.706657350063324,
-0.198548823595047,
0.3528323769569397... | |
I've set a breakpoint in firebug and am examining my xhr object. Its readyState is 0, its status is 200. My understanding is that if the status is 200, the request should have at least started, and the readystate should be at least 1. Can anyone explain what's going on?
I'm using jquery's $.ajax to create the xhr obje... | [
0.41206371784210205,
0.07662591338157654,
0.9467630982398987,
0.10607029497623444,
-0.1518419235944748,
-0.19254170358181,
0.06861361116170883,
-0.21053379774093628,
0.11988239735364914,
-0.7279617786407471,
-0.25476545095443726,
0.4158289432525635,
0.15942133963108063,
-0.0018578275339677... | |
I'm currently putting together a site in the N2 CMS framework. One of things I'd wanted to do was to be able to have users rate various elements of the site using a fairly standard star rating-style user control or something similar.
Has anyone seem anything similar to this implemented within N2 specifically? Just loo... | [
0.5619935989379883,
-0.007601587101817131,
0.655752956867218,
0.045853108167648315,
-0.05676020681858063,
-0.29455405473709106,
0.19829250872135162,
-0.19581672549247742,
-0.4524725377559662,
-0.8067601323127747,
-0.10208617895841599,
0.4497828185558319,
0.12050461769104004,
0.049043811857... | |
I'm using MS Office 2003 PIA to create a MS Word document from c#.
```
ApplicationClass officeApplication = new ApplicationClass();
```
Is there any way to specify that I don't want any office add-ins to be loaded using this method?
EDIT:
I know that one can do this via command line so I'm pretty sure there must b... | [
0.08873946219682693,
0.27396175265312195,
0.5342824459075928,
0.03493353724479675,
-0.0201992429792881,
-0.18013688921928406,
0.24277013540267944,
-0.235932394862175,
-0.07588063925504684,
-0.6851586699485779,
-0.10583612322807312,
0.7274363040924072,
-0.47490835189819336,
-0.0560064464807... | |
//startup without plugins
System.Diagnostics.Process.Start(
@"Winword.exe",
@"/a");
//give a time for startup
Thread.Sleep(2000);
//attach to office
Application officeApplication = (Application)Marshal.GetActiveObject("Word.Application");
``` | [
0.14629286527633667,
0.3360818028450012,
0.5899324417114258,
-0.04072136804461479,
0.540168046951294,
-0.09066174179315567,
0.29449519515037537,
-0.2812110483646393,
-0.11258705705404282,
-0.7679399251937866,
-0.38018086552619934,
0.40342217683792114,
-0.07648580521345139,
0.35809189081192... | |
I'm trying to put some (vertically-stacked) display:block elements within a display:inline-block element. According to the CSS specification, the inline-block element should be a containing block, so it can have display:block elements within it and those should not affect the rest of the layout.
However, the display:b... | [
0.2352372258901596,
0.3601453900337219,
0.2805585563182831,
-0.13894528150558472,
-0.19337023794651031,
-0.11252808570861816,
0.4229319393634796,
0.18890951573848724,
-0.24292156100273132,
-0.6386241912841797,
-0.35485535860061646,
0.16718517243862152,
-0.5192865133285522,
0.11124878376722... | |
moves down a line and has a blank white space above it). I'm using Firefox 3.0.6.
```
<html><head><style type="text/css">
#left {
display: inline-block;
background: red;
width: 20%;
height: 100%;
}
#right {
display: inline-block;
background: green;
width: 80%;
height: 100%;
}
</style></head><body>
<d... | [
-0.3459058403968811,
-0.19107088446617126,
0.7700340151786804,
-0.27078601717948914,
0.2204778492450714,
0.2409675419330597,
0.040654461830854416,
-0.04577646031975746,
-0.3967723250389099,
-0.9274480938911438,
-0.3710446059703827,
0.07826534658670425,
-0.37480485439300537,
-0.143609255552... | |
(FWIW, IE 7 mangles them all equally, as if it doesn't understand inline-block; doesn't matter, this is an internal app. and I'm only using Firefox). I may be able to get the layout I want using float/margin, but I'd prefer not to have to do that.
Well display: inline-block can be a bit tricky to get cross-browser. It ... | [
0.11290483921766281,
0.1457947939634323,
0.8345861434936523,
-0.1287134438753128,
-0.19535963237285614,
-0.053297724574804306,
0.4133561849594116,
-0.29593414068222046,
-0.11049813777208328,
-0.691920280456543,
-0.1480346918106079,
0.7688061594963074,
-0.5572806000709534,
-0.28712567687034... | |
block level elements. Note if you need your inline-block element to shrink wrap I think you can use *display: -moz-inline-box* instead.
*zoom: 1* gives hasLayout to the element (for IE 7 and below). Part 1 of the hack needed for IE7 and below compatibilty.
\*\*display: inline\* is a hack second part of the hack neede... | [
0.10575594753026962,
-0.016241855919361115,
0.787002682685852,
0.035613417625427246,
-0.1233593225479126,
-0.12194979190826416,
0.37585383653640747,
-0.34256312251091003,
-0.08737755566835403,
-0.7781133055686951,
-0.16604012250900269,
0.5283212661743164,
-0.3676648437976837,
-0.2625893056... | |
background: green;
width: 80%;
height: 100%;
vertical-align: top;
}
</style></head><body>
<div id="left">Left</div><div id="right"><p>Right</p><p>Right 2</p></div>
</body></html>
``` | [
-0.13072532415390015,
-0.08835908770561218,
0.07236448675394058,
0.020489534363150597,
0.15179851651191711,
0.13414417207241058,
-0.21079136431217194,
0.004652851261198521,
-0.15770195424556732,
-0.4648568034172058,
-0.5990631580352783,
0.43796029686927795,
-0.09794704616069794,
-0.3357554... | |
I am developing a web page for iPhones and iPod Touch's. I am using the Universal iPhone UI framework. I need to have silding page transitions, but can't seem to get it working. Is there a good javascript framework I could use that would make this easier? I've done a lot of normal web dev with jquery, but it doesn't se... | [
0.43446528911590576,
0.16438712179660797,
0.2797502279281616,
0.20895080268383026,
-0.14796659350395203,
0.18524974584579468,
0.014217019081115723,
0.235666885972023,
-0.22404228150844574,
-0.9181293845176697,
0.1545342057943344,
0.4306480288505554,
-0.13482627272605896,
0.0169314313679933... | |
JavaScript and only a few lines of CSS.
Here's [what Google finds](http://www.google.com/search?client=safari&rls=en-us&q=webkit+css+transitions&ie=UTF-8&oe=UTF-8) on the subject. | [
-0.0021700463257730007,
0.11642516404390335,
0.008098305203020573,
0.025554191321134567,
-0.18178075551986694,
-0.05453232303261757,
0.11215199530124664,
0.27158668637275696,
-0.34105756878852844,
-0.6513342261314392,
-0.47535431385040283,
0.054224394261837006,
-0.248504638671875,
-0.24395... | |
I'm trying to set the text of a textfield using the Carbon API like this:
```
ControlID editId = {'EDIT', 3};
ControlRef ctrl;
GetControlByID(GetWindowRef(), &editId, &ctrl);
CFStringRef title = CFSTR("Test");
OSErr er = SetControlData(ctrl, kControlEntireControl, kControlEditTextTextTag, CFStringGetLength(title... | [
0.37803104519844055,
0.16441430151462555,
0.24732902646064758,
-0.0693490132689476,
0.12011034786701202,
0.061096955090761185,
0.19466345012187958,
-0.27762019634246826,
0.2729470431804657,
-0.38165009021759033,
-0.12072207778692245,
0.5689108967781067,
-0.49823349714279175,
0.029334463179... | |
you can also use the function:
`HIViewSetText` to set the text. This is documented to work with functions that accept `kControlEditTextCFStringTag`.
By the way, the line you wrote:
```
CFRelease(title);
```
Will cause problems. One should only release objects that have been made using functions that have Create or... | [
0.4780220687389374,
0.01946389302611351,
0.056340575218200684,
0.10362791270017624,
0.1307385414838791,
-0.3866424262523651,
0.15061131119728088,
0.23274728655815125,
-0.03896867856383324,
-0.6484863758087158,
0.07036219537258148,
0.6137191653251648,
-0.35819360613822937,
0.049213748425245... | |
I learned that the `name` attribute has been deprecated. But this is how I performed exclusive selection of radio buttons on the form. How do I do it now without using JavaScript?
```
<input type="radio" name="gender" value="male">Male</input>
<input type="radio" name="gender" value="female">Female</input>
```
Undo y... | [
0.01073954813182354,
0.3995044529438019,
0.405022531747818,
-0.14354920387268066,
-0.10629813373088837,
-0.11043891310691833,
0.2207714319229126,
-0.6764160394668579,
-0.1274169534444809,
-0.460312157869339,
-0.32419970631599426,
0.5803879499435425,
-0.4528382420539856,
0.13118574023246765... | |
I'm having trouble understanding conceptually what I should do while trying to make my first large Javascript web application.
Depending on which tab a user has selected, I show different content inside a container. The content is more than just text and uses different Javascript functions and events. I am using the Y... | [
0.5603881478309631,
0.05637899786233902,
0.2788320779800415,
-0.2392905205488205,
-0.034458234906196594,
-0.15110956132411957,
0.07917795330286026,
0.09417901188135147,
-0.3271980881690979,
-0.7037529349327087,
0.03369525447487831,
0.5307128429412842,
-0.4807170629501343,
0.272106885910034... | |
with browser buttons to a previous tab state), I could call `MYAPP.modules[oldModule].disable()` and `MYAPP.modules[newModules].enable()`. These functions would subscribe or unsubscribe their custom events (for example, a general click handler attached to the container).
An alternate approach to dealing with events mi... | [
0.00009103570482693613,
-0.30932870507240295,
0.6305374503135681,
-0.14850769937038422,
0.004854514729231596,
0.03205558657646179,
0.17015977203845978,
-0.009476172737777233,
-0.3542908728122711,
-0.659676730632782,
-0.31434401869773865,
0.5477989315986633,
-0.5217504501342773,
0.292734831... | |
should do anything.
There seem to be a lot of options, but I've been having trouble finding resources that talk about the best ways to do things like this. Am I on the right path? How should I handle this?
Assuming all curly quotes are properly balanced, this regex should do what you want:
```
@"[\r\n]+(?=[^“”]*”)"
... | [
0.30352672934532166,
0.05984285846352577,
0.43730977177619934,
0.09775390475988388,
-0.04948919266462326,
-0.008133290335536003,
0.2382739782333374,
-0.03300591930747032,
0.05437503755092621,
-0.42656177282333374,
0.01584106869995594,
0.6757957935333252,
-0.20182347297668457,
-0.2388819009... | |
I have a small web application that is currently running on [Sinatra](http://www.sinatrarb.com/). It only has two pages so I don't really need controllers or many views. I have included ActiveRecord to interact with a database and ActiveMailer to send and receive mail.
Would it be worth it to use Rails, or Merb on a p... | [
0.2217779904603958,
0.0870475247502327,
0.4124271273612976,
-0.017996639013290405,
-0.06700288504362106,
-0.12499278038740158,
0.041963130235672,
0.09765256196260452,
-0.2604534327983856,
-0.6505699157714844,
0.32690727710723877,
0.6084357500076294,
-0.17294660210609436,
-0.032169714570045... | |
on a project that only needs a few components.
Thanks.
No need to switch to Rails if your already running on Sinatra for a small project. You can use ActiveRecord and ActiveMailer outside of Rails. | [
0.10018926858901978,
-0.05542600527405739,
0.09677211195230484,
0.18395332992076874,
-0.09684968739748001,
-0.16424475610256195,
0.4326671361923218,
0.3401070833206177,
-0.17920245230197906,
-0.6587111353874207,
0.044468678534030914,
0.9638704061508179,
-0.4047817289829254,
-0.290665537118... | |
I am currently building an application that consists of several components, each of which is essentially a WPF user control with a little C# code around it for the plugin system to work (using MEF).
The problem I am having is that each component should include an icon and for niceness purposes I defined that as a `Sys... | [
0.4303224980831146,
0.09288132190704346,
0.5171486735343933,
-0.07272246479988098,
-0.22419223189353943,
0.10281091928482056,
-0.051962800323963165,
-0.29744938015937805,
-0.06488090753555298,
-0.7185057401657104,
0.3462572395801544,
0.3226037621498108,
-0.3257698118686676,
0.2686890065670... | |
= null;
public override Brush Icon
{
get
{
if (CachedIcon == null)
{
CachedIcon = (Brush)(new BlahControl().TryFindResource("Icon"));
}
return CachedIcon;
}
}
```
I couldn't find a way to read that resource (which is a .xaml file, and referenced in a `ResourceD... | [
0.4041571617126465,
-0.31789395213127136,
0.6244186758995056,
-0.2865845263004303,
-0.019575821235775948,
0.08358901739120483,
0.6169418096542358,
-0.6618634462356567,
-0.03097090870141983,
-0.49840396642684937,
-0.0136324567720294,
0.4079045057296753,
-0.32771387696266174,
0.1474143862724... | |
that nice `TryFindResource` method but how to do that otherwise? I don't want to have the XAML file with the icon lying around un-embedded.
In your XAML code make sure the icon resource has the build option set to "Resource", and then reference the resource to make it a xaml static resource
```
<UserControl.Resources>... | [
-0.05495978891849518,
0.12196402996778488,
0.5855591893196106,
-0.17332234978675842,
0.14823880791664124,
0.06640779972076416,
0.3359394073486328,
-0.15802641212940216,
-0.16543039679527283,
-0.9218510389328003,
-0.24062450230121613,
0.5096089243888855,
-0.4519156515598297,
0.1165212616324... | |
+ ".g.resources");
using (ResourceReader resourceReader = new ResourceReader(resourceStream)) {
foreach (DictionaryEntry resourceEntry in resourceReader) {
if (resourceEntry.Key.ToString().ToUpper().EndsWith(".ICO")) {
icons.Add(resourceEntry.Key.ToString(), Image.FromStream(resourceEntry.Value ... | [
-0.15449751913547516,
-0.3994567394256592,
0.7314916253089905,
-0.022886034101247787,
0.4624813497066498,
0.27766215801239014,
0.15525014698505402,
0.0654449462890625,
-0.11036261916160583,
-1.0478060245513916,
-0.353397935628891,
0.7680829167366028,
-0.08496182411909103,
0.160016879439353... | |
In jQuery, if I have a reference to an element, how can I determine what kind of element it is, for example, an input or an dropdown? Is there any way to find out?
Duplicate:
[How can I determine the element type of a matched element in jQuery?](https://stackoverflow.com/questions/341900/how-can-i-determine-the-eleme... | [
-0.0293524619191885,
0.05938386172056198,
0.4537600874900818,
0.0567769929766655,
-0.2076658457517624,
-0.272522509098053,
-0.01929314434528351,
-0.2264968901872635,
-0.08578149229288101,
-0.2502823770046234,
-0.12017510831356049,
0.5404712557792664,
-0.369904488325119,
-0.1106723248958587... | |
We are investigating the use of HTTP Compression on an application being served up by JBoss. After making the setting change in the Tomcat SAR, we are seeing a compression of about 80% - this is obviously great, however I want to be cautious... before implementing this system wide, has anyone out there encountered issu... | [
0.1777184158563614,
0.19400902092456818,
0.33698007464408875,
-0.020922718569636345,
-0.13286074995994568,
-0.09202071279287338,
0.3505512475967407,
-0.028127502650022507,
-0.09966199845075607,
-0.6632262468338013,
-0.2515467405319214,
0.49928900599479675,
0.0007391568506136537,
-0.1626880... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.