text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
for all tasks to finish var done = now - DateTime.Now; // average about 3.01 seconds ``` If I where to traverse the list the first algorithm returns 318,222 files and directories (that is the correct number). the second algorithm returns 318,195 which is very close I don't understand why though... I am tes...
[ 0.14658652245998383, 0.057495079934597015, 0.5655889511108398, -0.04311651736497879, -0.046586256474256516, 0.24972641468048096, 0.6636477112770081, -0.3019789755344391, -0.8324580192565918, -0.8569980263710022, -0.253587931394577, 0.27312394976615906, 0.06533528864383698, 0.21153101325035...
I use to get the files that fast then look at <https://stackoverflow.com/a/724184/637142> Use the **Task Parallel Library**, rather than rolling your own parallelism code. It is ideally suited to solve this sort of problem. The way the TPL works is rather than you assigning threads to a problem, you simply break up th...
[ 0.448580801486969, -0.3294426202774048, 0.28156620264053345, 0.17662329971790314, 0.07330425828695297, 0.17892590165138245, -0.4743135869503021, 0.08891419321298599, -0.6114763617515564, -0.60011887550354, 0.11024728417396545, 0.37427088618278503, -0.34916263818740845, 0.10682032257318497,...
will assign threads out of a pool until the processors are saturated. Because of this, it is important to let the TPL know whether your tasks are going to be gated on the CPU or the I/O: * If the tasks are CPU-bound then the TPL will assign one pooled thread per CPU and make the other tasks wait until there is a core...
[ 0.3984389305114746, -0.4549404978752136, 0.14708992838859558, 0.3228292763233185, 0.2001861184835434, 0.20000165700912476, -0.1727055311203003, -0.022858576849102974, -0.4542258679866791, -0.8563898801803589, -0.007470306474715471, 0.6414287090301514, -0.29072996973991394, -0.1428257972002...
using. * If a *single* task is I/O bound then you can use the `LongRunning` option when creating the task to indicate to the TPL that this task should not consume an entire core; other tasks should be given a turn at that core. * If, as it seems is the case, you have *many* I/O bound tasks then you should consider usin...
[ 0.2690024971961975, -0.45224952697753906, 0.1933019906282425, -0.050722554326057434, 0.14166635274887085, -0.15605215728282928, 0.009976699948310852, -0.015349581837654114, -0.45607104897499084, -0.41253146529197693, -0.2537657618522644, 0.6094906330108643, -0.29170310497283936, -0.0238373...
course, do not forget that if the problem actually is saturating the I/O capability of the machine then no amount of *processor* parallelism is going to make a dent. If you're filling a swimming pool, adding more hoses to the same faucet doesn't increase the flow through that faucet.
[ 0.6356353759765625, 0.026079000905156136, -0.2699357569217682, 0.462738573551178, 0.12448113411664963, -0.005374916363507509, 0.3370426297187805, 0.02138247713446617, -0.4301474988460541, -0.3576745390892029, 0.2287319004535675, 0.4824899733066559, -0.24447260797023773, 0.29349255561828613...
We have been using javascript "hashes" a lot lately, and we've been looking for a universal way to count the items contained in both arrays and hashes without having to "know" which we're dealing with except in the count method. As everyone knows .length is useless since it only returns the value of the highest index i...
[ 0.2255294770002365, 0.07326632738113403, 0.03688865900039673, 0.09684412181377411, -0.23093807697296143, -0.32193830609321594, 0.3345126211643219, -0.060758695006370544, -0.30932706594467163, -0.5542084574699402, 0.2289363443851471, 0.35214054584503174, -0.2846229374408722, 0.1739057749509...
such a stupid simple thing and we can't seem to get it working. Help me, Obi Wan. You're my only hope! ``` function isNullOrUndefined(aObject) { "use strict"; return (typeof aObject === 'undefined' || aObject === null); } function count(aList) { "use strict"; var lKey = null, lResult = 0; ...
[ 0.08451739698648453, -0.28280335664749146, 0.49738577008247375, -0.34708964824676514, 0.41319480538368225, 0.2055426985025406, 0.786429226398468, -0.34962552785873413, 0.1237412616610527, -0.4178551435470581, -0.2699793577194214, 0.6142743229866028, -0.6729123592376709, -0.0360011570155620...
} else if (!isNullOrUndefined(Object.keys)) { lResult = Object.keys(aList).length; } else { for (lKey in aList) { if (aList.hasOwnProperty(lKey)) { lResult++;
[ -0.14613184332847595, -0.46651971340179443, 0.5420837998390198, -0.6027160882949829, 0.4309217035770416, -0.0034939975012093782, 0.11793120950460434, -0.26928502321243286, -0.18169671297073364, -0.6241968870162964, -0.386909157037735, 0.520767867565155, -0.3912918269634247, 0.2689947485923...
} } } } return lResult; } ``` Despise the answer from Raynos that is completely valid please consider performance This is how my hash object look like ``` function Hash(){ this.values = []; this.keys = {}; } Hash.prototype.set = function(key, val){ if(this.keys[key]){ th...
[ -0.020047323778271675, -0.07498816400766373, 0.2513525187969208, -0.10650257766246796, -0.0725376084446907, 0.0017095099901780486, 0.46389394998550415, -0.3039780259132385, 0.1303630918264389, -0.590524435043335, -0.01682988554239273, 0.6251640915870667, -0.10241341590881348, 0.24809531867...
this is simple performance looping through an object to count the properties length will be really inefficient the solution above give you direct access all the time.
[ 0.051018085330724716, -0.22700779139995575, -0.05092296376824379, 0.46890899538993835, -0.19822299480438232, -0.4511862099170685, 0.46265748143196106, -0.39458200335502625, -0.16286121308803558, -0.5904308557510376, 0.30206021666526794, 0.5536485314369202, -0.13412906229496002, 0.152264669...
I am really struggling with understanding the difference between these two. From my textbook, it essentially describes the difference by saying > a language is co-turing recognizable if it is complement of a turing-recognizable language. I guess the part of this definition I don't understand is: what does it mean wh...
[ -0.1351369023323059, 0.21806979179382324, -0.2829420864582062, -0.29381319880485535, -0.5487729907035828, 0.04711184650659561, 0.33722105622291565, 0.4709344208240509, -0.2830483019351959, -0.4502003788948059, -0.2458840161561966, 0.5390433073043823, -0.18056264519691467, 0.386075973510742...
answer. The reason for this is that if a language is decidable, then its complement must be decidable as well. The same is not true of recognizable languages.) Intuitively, a language is Turing-recognizable if there is some computer program that, given a string in the language, can confirm that the string is indeed wi...
[ -0.3751832842826843, 0.25085848569869995, -0.26548177003860474, 0.18111586570739746, -0.26349371671676636, -0.024441398680210114, 0.3813033998012543, 0.06761554628610611, -0.28554293513298035, -0.43551352620124817, -0.5195722579956055, 0.261798232793808, -0.15116079151630402, 0.33383062481...
definition doesn't shed much light on what's going on. Intuitively, if a language is co-Turing-recognizable, it means that there is a computer program that, given a string *not* in the language, will eventually confirm that the string is not in the language. It might loop infinitely if the string is indeed within the l...
[ 0.06584712117910385, -0.00037159663042984903, -0.3051649332046509, -0.01036518532782793, -0.11593286693096161, -0.19362463057041168, 0.40177154541015625, 0.273619145154953, -0.388183057308197, -0.44355836510658264, -0.38589727878570557, 0.2090775966644287, -0.20973962545394897, 0.417239844...
there must be some program that can confirm that w is indeed in the complement. This program therefore can confirm that w is not in the original co-Turing-recognizable language. In short, Turing-recognizability means that there is a program that can confirm that a string w is in a language, and co-Turing-recognizabili...
[ 0.25672340393066406, 0.11265593767166138, -0.2068282812833786, 0.17929081618785858, -0.0050681415013968945, -0.005269320216029882, 0.39793580770492554, 0.12628298997879028, -0.37775319814682007, -0.501020073890686, -0.3258594572544098, 0.37716373801231384, -0.030373170971870422, -0.0067784...
I have added an overlay to the map and changed colors of the overlay. I was wondering is it possible to add a hover event to the overlays? basically to when you hover over a US state if is is colored blue it will change to green. stuff like that. This is what i have right now. <http://www.opsdivina.net/soum/> thanks...
[ 0.16248273849487305, -0.1544255167245865, 0.6874183416366577, 0.2701621353626251, 0.200221449136734, 0.1619124710559845, -0.4458446800708771, -0.032476019114255905, -0.5265882015228271, -0.9361247420310974, -0.09300047904253006, 0.055398304015398026, -0.0534643679857254, -0.094142690300941...
I have a small web application on an application server which accesses very sensitive data on a database server. Instead of accessing this data directly through a SQL connection I was thinking about writing a web service interface on the database server which can only be used by the application server. My thoughts are...
[ 0.44693073630332947, 0.3955864906311035, 0.22843967378139496, 0.15208111703395844, 0.18828609585762024, 0.009581604041159153, 0.19637656211853027, 0.1190858706831932, -0.23616333305835724, -0.6512167453765869, 0.3749125003814697, 0.6301577091217041, -0.13761907815933228, 0.3064384460449219...
application, but since the data is sensitive I believe this is an acceptable trade-off. Will this extra "layer" of security really make my system more secure or am I missing something? I beleive you need to create an instance of the fps class in your main class, and then call the method through it. ``` fps nameOfClas...
[ 0.11292214691638947, 0.14422069489955902, 0.5135440826416016, 0.017111189663410187, 0.03579254820942879, -0.28731605410575867, 0.5233690142631531, -0.2112768143415451, -0.20917010307312012, -0.9016081690788269, -0.21012620627880096, 0.7759665250778198, -0.5377346277236938, -0.1083231791853...
threads properly. ( I can't help with this issue, I am still green to java threading.)
[ 0.26395541429519653, -0.12742078304290771, 0.11338882148265839, 0.013810794800519943, 0.0044899736531078815, -0.21199114620685577, 0.222676619887352, 0.13167867064476013, -0.7003278136253357, -0.702414333820343, -0.09603895246982574, 0.7014649510383606, -0.17540931701660156, -0.32210236787...
Rails 3.0.12, newest omniauth, I can connect to Google and get the user's email address just fine. But then I run that same rails app behind nginx in SSL mode, and it fails with the Google page: ``` "The page you requested is invalid." ``` **Is it my nginx config? My omniauth setup?** I know the `X-Forwarded-Proto:...
[ 0.12182639539241791, -0.07834715396165848, 0.21274808049201965, 0.13035152852535248, -0.25338447093963623, -0.13305410742759705, 0.3686223030090332, 0.0024105042684823275, 0.21541599929332733, -0.7873148918151855, 0.18879224359989166, 0.6161959767341614, -0.3055381774902344, -0.02040642127...
to see it fail. <https://github.com/jjulian/open_id_ssl> nginx.conf: ``` worker_processes 2; pid tmp/nginx.pid; error_log log/error.log; daemon off; events { } http { client_body_temp_path tmp/body; proxy_temp_path tmp/proxy; fastcgi_temp_path tmp/fastcgi; uwsgi_temp_path tmp/uw...
[ -0.05447931960225105, 0.018516141921281815, 0.6267890930175781, -0.21493642032146454, 0.013523026369512081, 0.03856409713625908, 1.084020733833313, -0.14956556260585785, -0.15268592536449432, -0.6673102974891663, -0.45760053396224976, 0.42426547408103943, -0.45618337392807007, 0.0840637311...
proxy_buffering off; location / { proxy_pass http://127.0.0.1:3300; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; proxy_set_header X-For...
[ -0.09821697324514389, 0.004364000633358955, 0.5488095283508301, -0.0948614776134491, -0.021272869780659676, 0.15819422900676727, 0.21033576130867004, -0.16162192821502686, -0.0525217279791832, -0.7412418723106384, -0.4845694303512573, 0.4780898690223694, -0.36184653639793396, 0.36352488398...
do provider :open_id, :identifier => 'https://www.google.com/accounts/o8/id' end ``` routes.rb: ``` OpenIdSsl::Application.routes.draw do match '/auth/open_id/callback' => 'accounts#update' match '/auth/failure' => 'accounts#failure' root :to => 'accounts#show' end ``` **UPDATE:** This example used Rails 3...
[ 0.2698683440685272, 0.056316036731004715, 0.33582350611686707, 0.014918920584022999, -0.1620418280363083, 0.021998388692736626, 0.49369171261787415, -0.45682820677757263, 0.13540054857730865, -0.6608589291572571, -0.05282760038971901, 0.45732229948043823, -0.16047446429729462, 0.2180918902...
access url and not the nginx one (wich uses ssl) resulting in this being sent to the openid server: ``` openid.realm:http://localhost:3001 openid.return_to:https://localhost:3001/auth/open_id/callback ``` The realm use the http url (rails url) while the return\_to points to the right https url (nginx), when the open...
[ -0.18234670162200928, -0.058778177946805954, 0.5394641757011414, 0.41642677783966064, -0.1760772168636322, -0.1274697184562683, 0.35171589255332947, 0.11598643660545349, -0.08310668170452118, -0.9512108564376831, -0.26475095748901367, 0.12866482138633728, -0.2838064432144165, 0.56114035844...
I am working on a program that reads a series of ints from a text file into a 2D array. The file contains 40 lines of 81 numbers that have no spaces between them. The problem is that when I cout the array after the loop has finished, it is outputting 2 random numbers in `array[0][0]` and `array[0][1]` before the exp...
[ 0.20911060273647308, 0.012004685588181019, 0.4882733225822449, -0.3544442653656006, -0.0027906927280128, 0.30435818433761597, 0.3407909870147705, -0.3185570240020752, 0.03379116952419281, -0.8322160243988037, -0.0352933295071125, 0.25355276465415955, -0.5890794396400452, -0.137398108839988...
ifile.open("numbers.txt", ios::in); if (ifile.fail()) { cout << "Could not open numbers.txt" << endl; return -1; } while (!ifile.eof()) { for(int i=0; i<9; i++) { for(int j=0; j<9; j++) { int n = ifile.get(); if(isdigit(n))
[ -0.02472160942852497, -0.4416576027870178, 0.3858073055744171, -0.3489512503147125, 0.36295780539512634, 0.06696639955043793, 0.48012447357177734, -0.1970873326063156, -0.24612867832183838, -0.5354846715927124, -0.5135893225669861, 0.5972824096679688, -0.5229629278182983, -0.05878645554184...
{ array[i][j] = n - '0'; } cout<<"array ["<<i<<"]["<<j<<"] is "<<array[i][j]<<endl; } } cout<<"This is a test"<<endl; } return 0; } ``` The random numbers appear because you increment `j` regardless of whether you write to `grid[i][j]`. Try replacing your inner...
[ 0.14241939783096313, -0.4470929205417633, -0.171017125248909, -0.09740326553583145, 0.053803637623786926, 0.005013315938413143, 0.4431322515010834, -0.36421483755111694, -0.24880188703536987, -0.2737424969673157, -0.006812863051891327, 0.3588707149028778, -0.651986837387085, 0.131288796663...
= file.get(); if(!file) break; if(isdigit(n)) { array[i][j] = n - '0'; cout<<"array ["<<i<<"]["<<j<<"] is "<<array[i][j]<<endl; j++; } cout<<"grid ["<<i<<"]["<<j<<"] is "<<grid[i][j]<<endl; } ```
[ -0.19234618544578552, -0.2516191005706787, 0.34430667757987976, -0.24482594430446625, 0.27078500390052795, -0.1329714059829712, 0.17418527603149414, -0.3830494284629822, -0.2901879847049713, -0.5720763206481934, -0.6939231753349304, 0.3870737850666046, -0.4325130879878998, 0.05528291687369...
I have an .NET 4.0 ASP.NET MVC application, which also hosts a Workflow Foundation 4.0. From within this workflow, some custom workflow activity will execute code to do some database updates using Linq to SQL. The code consists of calling a method, which in turn call some other methods etc... I also have a business lay...
[ 0.4615841805934906, 0.25375449657440186, 0.5245257019996643, -0.15987403690814972, -0.03329593315720558, -0.11132755130529404, 0.06511819362640381, -0.47913017868995667, -0.2974861264228821, -0.3835521638393402, -0.12982997298240662, 0.3375478684902191, -0.1930127888917923, 0.2269781082868...
D in yet another class. In each of these methods I want to retrieve the same instance of my data accesss factory, so that all database operations are excuted on the same database transaction. How would I design the singleton pattern for my data access factory? Note that methods A, B, C and D also can be called from Asp...
[ 0.2476271688938141, -0.13943539559841156, 0.1628647744655609, 0.07237328588962555, -0.2400340586900711, 0.2519276440143585, 0.09875766187906265, -0.34096047282218933, -0.4210745394229889, -0.8704944849014282, 0.10829108953475952, 0.3893701136112213, -0.4025837779045105, 0.35907986760139465...
my data access factory. But when these methods are called from the Workflow activity, there is no HttpContext of course. I tried thread static variable, but in web applications you're not sure, method A, B, C en D will be called on the same thread. I also tried CallContext, but I experienced, I'm not always retrieving...
[ -0.06397433578968048, -0.14676956832408905, 0.2490425854921341, 0.24425828456878662, -0.162754088640213, 0.04195740073919296, 0.2189481109380722, 0.038025207817554474, -0.5291669368743896, -0.6157821416854858, 0.08132733404636383, 0.3772308826446533, -0.37451639771461487, 0.342617422342300...
WF activity or another way of background tasks e.g. using Task<T>) Not really related to your question but doing background tasks in a asp.net application is awful, I speak from experience. [The Dangers of Implementing Recurring Background Tasks In ASP.NET](http://haacked.com/archive/2011/10/16/the-dangers-of-impleme...
[ 0.3346109986305237, -0.27975013852119446, 0.44808056950569153, -0.2837703227996826, -0.13792134821414948, 0.11786402761936188, 0.6556094288825989, -0.4577105939388275, -0.3483934700489044, -0.45203229784965515, -0.22160452604293823, 0.7031875848770142, -0.46475863456726074, -0.113027825951...
I have developed an HLS player for Android 2.3. It works. However, I am finding that certain Android devices lack support for .ts files. On these phones my player does not work. So, my question is this: Is there a way that I can include support for these files within my app (perhaps a codec or a library of some sort)? ...
[ 0.2442537397146225, -0.01680874265730381, 0.4291864037513733, 0.06719992309808731, -0.0820717066526413, 0.13490501046180725, 0.5255104303359985, -0.0880536213517189, -0.40549641847610474, -0.6449857950210571, -0.05501933395862579, 0.5144934058189392, -0.3978171646595001, -0.156204745173454...
When I include the following HTML in an email, the image is downloaded automatically by Outlook: ``` <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head></head><body><div><p><br /></p></div><div style="border-style:solid;border-width:2px;border-color:rgb(0,0,0);background-color:rgb(255,232,0);wi...
[ -0.09325678646564484, 0.14653581380844116, 1.0988104343414307, -0.01979125663638115, -0.21989887952804565, 0.43442243337631226, 0.182742178440094, -0.2555849552154541, -0.15717844665050507, -0.8232016563415527, -0.3390212655067444, 0.22678211331367493, -0.330167680978775, 0.124772056937217...
margin:0; padding:0; font-family: Helvetica; font-size:14px; color:#000; font-weight:bold; } div.box {
[ -0.5114582777023315, 0.1279727965593338, 0.5213229060173035, 0.012718922458589077, -0.1101364716887474, 0.4130271375179291, 0.24646420776844025, -0.15183323621749878, 0.143719881772995, -0.3852757215499878, -0.4521358013153076, 0.04493995010852814, -0.16415579617023468, -0.0586405731737613...
padding:15px; width:272px; height:155px; border:2px solid #000; background-color:rgb(255,232,0); } div.box div.inner { height:100%; background:url("https://s3.amazonaws.com/signoffmainbucket/8CA8EC1A-C1C5-4390-9FC4-649648AA26C8.jpg"...
[ -0.3733471930027008, -0.07528729736804962, 0.7391945719718933, 0.18789681792259216, 0.14570800960063934, 0.527605414390564, 0.05964996665716171, -0.38137945532798767, -0.29242411255836487, -0.3473356366157532, -0.47738075256347656, 0.4472278654575348, -0.06714636087417603, -0.0547539256513...
} p.name { margin-bottom:65px; } </style> </head> <body> <div class="box"> <div class="inner"> <p class="name">John</p> <p>XYZ Company</p> </div> </div> </body> </html> ``` Why would the image be downloaded in the first example but not
[ 0.06707479804754257, -0.06900722533464432, 0.6283776760101318, 0.08671055734157562, 0.04846592992544174, 0.254720538854599, -0.3383200764656067, -0.10708537697792053, -0.01889394037425518, -0.5727173686027527, -0.26603272557258606, 0.1461876630783081, -0.1598212867975235, 0.088801249861717...
the second please? That's because creating HTML emails suck. Outlook, since 2007 I believe, switched from using Internet Explorer's renderer to using a Word based HTML renderer. This makes CSS support extremely limited. Your best hope at making an HTML email without losing your mind is to use tables to structure your c...
[ -0.04987279698252678, 0.026515739038586617, 0.3265123963356018, -0.11255822330713272, -0.4480726420879364, -0.010656559839844704, 0.020026162266731262, 0.720845639705658, -0.13060180842876434, -0.7474700212478638, 0.21305139362812042, 0.27675649523735046, -0.3565642237663269, -0.0288453642...
I'm using [RPostgreSQL](http://code.google.com/p/rpostgresql/) to read and write data. Reading from any schema works perfectly, but I'm not able to write to non-public schemas. For example, the following code places a table in the `public` schema, with the name `myschema.tablex` ``` # write dataframe to postgres drv ...
[ 0.04079217463731766, 0.4140290319919586, 0.4358435869216919, -0.17818710207939148, -0.07870262116193771, -0.005391644313931465, 0.43529266119003296, -0.15541352331638336, -0.02157801389694214, -0.8060711026191711, 0.029634717851877213, 0.5200832486152649, -0.24183988571166992, 0.3767490684...
work, so I'm wondering if there is another method that I can use. The default schema where objects are created is defined by the [`search_path`](http://www.postgresql.org/docs/current/interactive/runtime-config-client.html#RUNTIME-CONFIG-CLIENT-OTHER). One way would be to set it accordingly. For instance: ``` SET sear...
[ 0.15502984821796417, 0.07329662144184113, 0.4879164397716522, -0.03546588495373726, 0.029497897252440453, 0.013629740104079247, 0.08710560947656631, -0.16102895140647888, -0.4654361605644226, -0.7305587530136108, -0.17366306483745575, 0.5094763040542603, -0.28094395995140076, -0.0307954754...
the search\_path influence identifier resolution and the "current schema"](https://stackoverflow.com/questions/9067335/how-does-the-search-path-influence-identifier-resolution-and-the-current-schema/9067777#9067777)
[ -0.4934399127960205, -0.05845079571008682, 0.6884677410125732, 0.05699954181909561, 0.42073318362236023, -0.007523859851062298, -0.21038730442523956, -0.38110703229904175, -0.20306415855884552, -0.6745949387550354, -0.01665811613202095, 0.4753338396549225, -0.2785119116306305, -0.046195503...
I'm having a bit of a trouble trying to figure this out today, i want to make 5 items inside my DOM (which is listed under the same attribute element, $('.elements')) fade in and out, and after reading up a bit on the API i thought .each() would be a fabulous idea to implement a fade in and fade out showcase gallery. ...
[ 0.41863110661506653, -0.11281077563762665, 0.4304530620574951, -0.31940388679504395, -0.03952767327427864, 0.09378418326377869, 0.09438718855381012, -0.45624545216560364, -0.2828407883644104, -0.48878660798072815, 0.11894490569829941, 0.30924567580223083, -0.5797297358512878, 0.52882522344...
(a.k.a - $('elements').eq(0)?) down to the last one, and then restarts again? Do i really need a while loop to do this in javascript/jquery? I was hoping there would be a similar function that i could chain for jQuery to perform to reduce load and filesize. Also, is there a way to restrict the images from overflowing...
[ 0.31141188740730286, -0.3070333003997803, 0.4613467752933502, -0.1960740089416504, 0.09129433333873749, 0.04261782392859459, 0.3446862995624542, -0.3112209439277649, -0.4923143982887268, -0.31997814774513245, 0.015492891892790794, 0.4148392677307129, -0.44681331515312195, 0.408401787281036...
probably more readable, approach: ``` (function fade(idx) { var $elements = $('.elements'); $elements.eq(idx).fadeIn(2000).delay(200).fadeOut(2000, function () { fade(idx + 1 < $elements.length ? idx + 1 : 0); }); }(0)); ``` ​demo: <http://jsfiddle.net/uWGVN/3/>
[ 0.19306491315364838, -0.4566427171230316, 0.30386072397232056, -0.29352644085884094, -0.04827454686164856, 0.016105342656373978, 0.1418692022562027, -0.6016258001327515, -0.03870796039700508, -0.48591434955596924, -0.04630061984062195, 0.4368707537651062, -0.419556587934494, 0.131551727652...
I created keys as instructed in the github tutorial, registered them with github, and tried using ssh-agent explicitly — yet git continues to ask me for my passphrase every time I try to do a pull or a push. What could be the cause? Once you have started the SSH agent with: ``` eval $(ssh-agent) ``` Do either: 1. ...
[ 0.03708479925990105, 0.20732955634593964, 0.6838245987892151, -0.0567554235458374, -0.06593036651611328, 0.0033709402196109295, 0.2756030261516571, -0.09049469977617264, -0.14262351393699646, -0.6524840593338013, -0.2662487328052521, 0.3997943103313446, -0.19277255237102509, 0.173099279403...
after you close and re-open it by storing it in user's keychain. If you see a warning about `deprecated` flags, try the new variant: ``` ssh-add --apple-use-keychain ``` 3. To add and save your key permanently on **Ubuntu** (or equivalent): ``` ssh-add ~/.ssh/id_rsa ```
[ 0.14448091387748718, 0.1909436285495758, 0.591838002204895, -0.24131907522678375, 0.24766479432582855, -0.14405502378940582, 0.10795404016971588, 0.025510665029287338, -0.3187682330608368, -0.5661501288414001, -0.6536543369293213, 0.35429924726486206, -0.2463095635175705, 0.097935393452644...
I'm trying SocketIO and I'm stuck. I can't find any proper documentation. Here is a sample code of what I'd like to do : ``` io.sockets.in('group1').join('group2'); io.sockets.in('group3').on('message', function(){}); ``` Is there any workaround to those two particular actions ? The function io.sockets.clients is w...
[ 0.08829197287559509, -0.13305844366550446, -0.009172915481030941, -0.28896790742874146, -0.09716737270355225, 0.022120589390397072, 0.1323159784078598, -0.12057838588953018, -0.361980140209198, -0.6381651163101196, 0.16998745501041412, 0.5960601568222046, -0.3926333785057068, 0.05888120457...
I have the following code in my accounting application: ``` // switch View to the Customer layout, widget id's are the same on both layouts private void hideExpenseView() { setContentView(R.layout.customer_invoices); } // switch View to the Supplier layout private void hideIncomeView() { setContentView(R.layo...
[ 0.6414469480514526, 0.057600583881139755, 0.595709502696991, -0.20824772119522095, 0.038192737847566605, 0.1326378434896469, 0.1926882117986679, -0.23984302580356598, 0.019118493422865868, -0.741664469242096, 0.1302843987941742, 1.0045727491378784, -0.2815178632736206, 0.24464835226535797,...
on different states, I switch the entire View to the appropriate layout - whether entering a Customer sales invoice, or a Supplier expense invoice. By switching Views, I would have basically 6 lines of code taking care of the UI transition, very simple. I hope this is still possible in another capacity, can someone p...
[ 0.6423842310905457, -0.18232400715351105, 0.6014668941497803, -0.1745768040418625, -0.0904933288693428, 0.1349155455827713, 0.1684558391571045, -0.2302834540605545, -0.2786392569541931, -0.7428474426269531, 0.26674774289131165, 0.7394458651542664, -0.07995890825986862, -0.09206265956163406...
I have an SVN repo set up on my server and am having post-commit issues. I am using SmartSVN as my client on my iMac. I connect through ssh+svn from SmartSVN. I am able to successfully connect to the SVN and make changes to it, but my post-commit script is not working after I commit from my SVN client. I created my p...
[ 0.29061293601989746, -0.0702589675784111, 0.4306661784648895, -0.2520032227039337, -0.15983963012695312, -0.022263729944825172, 0.31406769156455994, -0.0856669694185257, -0.28711140155792236, -0.8398351669311523, -0.10389716178178787, 0.64337557554245, -0.10154806822538376, 0.2328867614269...
then upload the necessary files to my development subdomain on my server. I do this so that I can have a testing environment for all changes that users make for my web application. The file originally looked liked this. ``` rm -rf /home/modionzc/tempworkspace/artistcondevspace/* cd /home/modionzc/tempworkspace/artistc...
[ -0.019430626183748245, 0.4804881811141968, 0.5661764740943909, -0.06773590296506882, -0.0034890049137175083, 0.31955626606941223, 0.06330381333827972, -0.7979182600975037, -0.08716007322072983, -0.7267061471939087, -0.19390146434307098, 0.7111476063728333, 0.005389968864619732, 0.060835450...
is not being called whenever I commit from my SmartSVN. The changes are made through the repository and if I run the script manually I can see that the updates were actually made. I did some research and found out that it could be permission issues or that I'm not using absolute paths. I am using absolute paths through...
[ 0.2816498577594757, -0.06777983903884888, 0.9492139220237732, -0.016513442620635033, 0.07647936791181564, -0.29322436451911926, 0.4883771240711212, -0.20659859478473663, -0.19522349536418915, -0.44334548711776733, -0.17001491785049438, 0.876394510269165, -0.09760536253452301, 0.06462096422...
SVN manual and over the internet for a fix without much success. One suggestion was to to make a log file to see any errors that are caused when the script is called. So now my post-commit script calls another file that has the commands above and outputs the command line returns to a file called `svna.log`. The `post...
[ 0.15464958548545837, -0.06817671656608582, 0.4963500499725342, -0.35093197226524353, 0.011346716433763504, -0.12531700730323792, 0.24637256562709808, -0.3185902237892151, -0.36958497762680054, -0.6686468124389648, -0.3129585385322571, 0.9003066420555115, -0.26258543133735657, 0.11491722613...
empty. FYI - for some reason my post-commit.sh has a `*` at the end of it and is listed as post-commit.sh\* when I ls the files in the hooks directory. Please, any help with this would be greatly appreciated. I found out that the issue on the svn forums while looking at another persons post here <http://www.svnforum...
[ 0.21685998141765594, 0.008217600174248219, 0.29979249835014343, -0.1301751583814621, -0.22029565274715424, -0.1478484570980072, 0.1409335434436798, 0.48439159989356995, -0.31463655829429626, -0.5106366872787476, -0.019714077934622765, 0.18839746713638306, -0.009870052337646484, 0.447790145...
the first line which was mentioned by Mensi above but was not the problem with the script. Thanks for your help anyway.
[ 0.3063661754131317, -0.20511578023433685, 0.14611196517944336, 0.24902112782001495, 0.003040899755433202, 0.004626290872693062, 0.28434550762176514, 0.4704945385456085, 0.13524292409420013, -0.5192239284515381, 0.1068781241774559, 0.547423243522644, 0.06498286128044128, -0.1669387370347976...
I'm looking to customize the creation-time behavior of [AutoFixture](http://autofixture.codeplex.com/) such that I can set up some dependent objects after the properties of the fixture have been generated and assigned. For example, suppose I have a method that customizes a `User` because its `IsDeleted` property alway...
[ 0.4304879605770111, 0.03412899002432823, 0.5860852599143982, -0.3177100718021393, 0.0011025823187083006, 0.31492435932159424, 0.103242427110672, -0.6863310933113098, 0.029837043955922127, -0.5674741864204407, 0.12473142892122269, 0.7172368764877319, -0.5920455455780029, 0.3151843249797821,...
the test so it can further customize the fixture if necessary.) What I'd like to do is automatically associate that user with an anonymous collection by its `Id` at creation time, but I can't do this as-is because `Id` has not been generated by the time I hand the return value back to the unit test proper. Here's the ...
[ 0.5976877212524414, 0.11313032358884811, 0.7980787754058838, -0.2507956624031067, 0.20012067258358002, 0.032032035291194916, 0.04714903607964516, -0.5244576334953308, 0.29302769899368286, -0.42828652262687683, -0.034802407026290894, 0.9105854630470276, -0.4167953133583069, 0.37078219652175...
.AfterCreation(u => { var relation = f.Build<UserCollectionMembership>() .With(ucm => ucm.UserCollectionId, uc.Id) .With(ucm => ucm.UserId, u.Id)
[ 0.07961329817771912, -0.07298034429550171, 0.8710548877716064, -0.16197583079338074, 0.24151238799095154, 0.4370113015174866, 0.014620667323470116, -0.344329833984375, 0.11226963251829147, -0.5699244737625122, -0.46443262696266174, 0.3263291120529175, 0.09494353085756302, 0.307316333055496...
.CreateAnonymous(); Repository.Install(relation); } } ``` Is something like this possible? Or perhaps there is a better way to accomplish my goal of creating an anonymous object graph? For the `Build` method, this isn't possible, and probably never will be, because there are much better opt...
[ 0.5941433906555176, 0.2427026480436325, 0.1910155713558197, 0.00393776735290885, -0.11826660484075546, -0.39529815316200256, 0.47353774309158325, 0.28732916712760925, -0.0623786561191082, -0.6999213099479675, -0.050992701202631, 0.5820189714431763, -0.523461639881134, 0.4186956584453583, ...
should never be necessary to write static helper methods around the `Build` method. The `Build` method is for truly one-off initializations where one needs to define property or field values before the fact. I.e. imagine a class like this: ``` public class MyClass { private string txt; public string SomeWeir...
[ 0.43296802043914795, -0.08664312213659286, 0.24914169311523438, -0.2853948473930359, 0.15863345563411713, -0.1685187965631485, 0.32084059715270996, -0.075140081346035, 0.13919095695018768, -0.48501574993133545, -0.39019477367401123, 0.6178901791572571, -0.27245578169822693, 0.0867061913013...
throw new ArgumentException(); this.txt = value; } } } ``` In this (contrived) example, a straight `fixture.CreateAnonymous<MyClass>` is going to throw because it's going to attempt to assign something other than "bar" to the property. In a one-off scenario, one can use the `Build` method to ...
[ 0.14729025959968567, 0.1524658054113388, 0.27129316329956055, -0.48072898387908936, 0.016940411180257797, 0.05230478569865227, 0.30775001645088196, -0.33884191513061523, -0.014962522312998772, -0.4658355116844177, -0.24050183594226837, 0.724330484867096, -0.2644289433956146, 0.432319670915...
even easier would be to just omit that property: ``` var mc = fixture.Build<MyClass>().Without(x => x.SomeWeirdText).CreateAnonymous(); ``` However, once you start wanting to do this repeatedly, there are better options. AutoFixture has a very sophisticated and customizable engine for defining how things get cre...
[ 0.3050825893878937, 0.11464828252792358, 0.5537022352218628, -0.32440871000289917, 0.17810407280921936, -0.051623307168483734, 0.014455322176218033, -0.47833549976348877, -0.20559628307819366, -0.6404011249542236, -0.06753259897232056, 0.74204021692276, -0.3161740303039551, 0.5148833394050...
a custom ISpecimenBuilder](http://blog.ploeh.dk/2010/10/19/ConventionbasedCustomizationsWithAutoFixture.aspx). If you want to run some custom code after the instance has been created, you can decorate your own ISpecimenBuilder with a Postprocessor and supply a delegate. That might look something like this: ``` fixture...
[ 0.3677216172218323, -0.1519494652748108, 0.6516565680503845, 0.14791229367256165, -0.0052160280756652355, 0.06221020594239235, 0.118231862783432, -0.24461622536182404, -0.6627076268196106, -0.4593217968940735, -0.008850756101310253, 0.4782640039920807, -0.30189865827560425, 0.1111126467585...
This is a super simple question that I just can't seem to find a good answer too. ``` $.get('/myurl.html', function(response){ console.log(response); //works! console.log( $(response).find('#element').text() ); //null :( }, 'html'); ``` I am just trying to traverse my the html response. So far the only thi...
[ 0.4774003326892853, 0.3365698456764221, 0.6121740937232971, -0.012085430324077606, -0.11188863962888718, 0.13900893926620483, 0.4282081127166748, -0.1869131624698639, -0.0626073032617569, -0.7174258232116699, -0.013425180688500404, 0.4917408227920532, -0.20223915576934814, -0.2158203721046...
<head> <title>Center</title> </head> <body> <!-- tons-o-stuff --> </body> </html> ``` This also works fine but will not suit my needs: $('#myelem').load('/myurl.html #element'); It fails because it doesn't like `<html>` and `<body>`. Using the method described here: [A JavaScript pars...
[ -0.036904726177453995, 0.15169104933738708, 0.9946127533912659, -0.112447090446949, 0.015328136272728443, -0.11192052066326141, 0.25020745396614075, -0.742469847202301, 0.05864110216498375, -0.5996142029762268, -0.34846240282058716, 0.6800889372825623, -0.05170843005180359, 0.0077553014270...
I'm using Weka to develop a classifier for a medical problem. This dataset has a class imbalance situation and I want to know if there is also a problem of class overlapping. Each record has 30 attributes, how can I discover if there is class overlapping using Weka features? > Class Overlapping happens when some sample...
[ 0.30845504999160767, -0.003001059638336301, -0.08403468132019043, 0.4016123116016388, -0.2098085582256317, 0.22576621174812317, 0.12690867483615875, -0.35294508934020996, -0.4225786626338959, -0.739176332950592, 0.6527005434036255, 0.287509560585022, -0.3150270879268646, 0.4785406589508056...
found what you are asking.
[ 0.06571166217327118, -0.10358962416648865, 0.3960786461830139, 0.30995309352874756, 0.4065023362636566, -0.2101309895515442, -0.1709682196378708, 0.17329272627830505, -0.20974339544773102, -0.39867067337036133, -0.001770855626091361, 0.2760404348373413, 0.13070708513259888, -0.007068456616...
I'm having a problem where I can't find images through Java. My friend and I are working on a project and we've done the exact same things. I've changed the paths to the location of the images and even dragged/dropped the images into Eclipse. However, I've had no luck. Here's my code: ``` import java.awt.FlowLayout; i...
[ 0.256851464509964, -0.1281752586364746, 0.5187619924545288, -0.16977617144584656, -0.44448521733283997, 0.32971370220184326, 0.35185641050338745, -0.5367757678031921, -0.14024145901203156, -1.0171473026275635, -0.09367313235998154, 0.6710575222969055, -0.6155837178230286, -0.28822067379951...
static int place=0; public MapArray(){ } protected static ImageIcon createImageIcon(String path) { java.net.URL imgURL = Map.class.getResource(path); if (imgURL != null) { return new ImageIcon(imgURL); } else { System.err.println("Couldn't find file: " + path); return null; } ...
[ -0.30369997024536133, -0.486146479845047, 0.5859450697898865, -0.05212574452161789, -0.07048974931240082, 0.021247146651148796, 0.39616698026657104, -0.07589752972126007, -0.21676182746887207, -0.44139182567596436, -0.3233731985092163, 0.6163204312324524, -0.5952863097190857, 0.17279024422...
for(int y=0; y<30; y++){ images[x][y]=a.substring(0,a.indexOf(" ")); a=a.substring(a.indexOf(" ")+1); System.out.println(images[x][y]); } } } catch (Exception e) { System.out.println("y u no
[ -0.0974518284201622, -0.28921177983283997, 0.4573048949241638, -0.2765193283557892, 0.2163432091474533, 0.23638887703418732, 0.3284797966480255, -0.398718923330307, -0.24040724337100983, -0.22911185026168823, -0.49091312289237976, 0.5007982850074768, -0.44153329730033875, 0.048375703394412...
work :("); } } public static String getFileContents(String fileName) throws Exception { File theFile = new File(fileName); byte[] bytes = new byte[(int) theFile.length()]; InputStream in = new FileInputStream(theFile); int m = 0, n = 0; while (m < bytes.length) { n = in.read(bytes, m, ...
[ 0.04790216684341431, -0.15869849920272827, 0.4614642262458801, -0.24063536524772644, 0.18979907035827637, 0.14252632856369019, 0.4099540412425995, -0.3565317690372467, -0.3972977101802826, -0.4990270733833313, -0.6261400580406189, 0.510948657989502, -0.6417261362075806, 0.17478422820568085...
javax.swing.SwingUtilities.invokeLater(new Runnable() { @Override public void run() { setMap(); JFrame frame = new JFrame(); frame.setLayout(new GridLayout(30, 29, 0, 0)); for (int i = 0; i < 29; i++) {
[ 0.29248663783073425, -0.44531774520874023, 0.6719722747802734, -0.41062450408935547, 0.28023478388786316, 0.07267101854085922, 0.29796332120895386, -0.7026926875114441, -0.32262447476387024, -0.47630107402801514, -0.23514975607395172, 0.26363447308540344, -0.6785172820091248, 0.01069758925...
for (int j = 0; j < 29; j++) { tiles[i][j] = new JPanel(new GridLayout()); tiles[i][j].add(new JLabel( createImageIcon("C:\\Users\\*****\\workspace\\Pokemon\\src\\tile"+"-"+images[i][j]+".png")));
[ -0.12143585830926895, -0.5243420600891113, 0.45373135805130005, -0.19117575883865356, -0.0940345823764801, 0.06981934607028961, 0.1939263790845871, -0.3424108922481537, 0.03657777979969978, -0.6313043236732483, -0.4509620666503906, 0.31310784816741943, -0.5039584636688232, -0.1256002634763...
frame.add(tiles[i][j]); } } frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack(); frame.setVisible(true); } }); } } ``` Everything I've tried with putting in the full image path doesn't work. Also, would anyone be able
[ 0.44259464740753174, -0.12074578553438187, 0.5830788016319275, -0.2258734405040741, 0.0032117250375449657, -0.07856781780719757, 0.4943233132362366, -0.4592037498950958, -0.19502604007720947, -0.8322164416313171, -0.20443181693553925, 0.594203531742096, -0.42465081810951233, 0.065889522433...
to help with relative paths? My friend and I will be sharing code between multiple computers so relative paths that aren't dedicated on where our workspace is located would be great. Thanks! ``` // get resource of *your* class, instead of Java's Map.class MapArray.class.getResource(path); ... String a = getFileContents...
[ -0.21992820501327515, -0.22170798480510712, 0.46725621819496155, 0.025037026032805443, -0.009899274446070194, -0.06802751868963242, 0.25052616000175476, -0.11068947613239288, -0.09740107506513596, -0.9778483510017395, 0.042705342173576355, 0.7070416212081909, -0.24007169902324677, -0.15048...
resource file is packaged into `.jar`.
[ -0.13601872324943542, 0.19277329742908478, -0.17670811712741852, 0.1955106556415558, 0.1873316466808319, -0.06455764174461365, 0.15783637762069702, 0.02529778704047203, -0.01706044375896454, -0.8930497765541077, -0.17258723080158234, 0.3425505459308624, 0.2084137499332428, 0.38179782032966...
I am having an issue where I am using regex.Replace to replace part of a string. The basic idea is that I want to capture the beginning of the string then replace the end of the string with a value from code. For an example pretend I have a string that says "Test Number " followed by number and I want to increment that...
[ 0.5106440782546997, -0.22864621877670288, 0.32443249225616455, 0.01857079192996025, 0.08346071094274521, -0.15463949739933014, 0.09975864738225937, -0.0687495768070221, -0.01368527952581644, -0.4004760682582855, -0.2293449193239212, 0.4827718138694763, -0.5051256418228149, 0.36649054288864...
as String = "We are on Test Number 1" Dim newNumber as Integer = 2 s=Regex.Replace(s,"(Test Number )(\d)","$1" & newNumber) ``` This will output "We are on $12". However, if I use a literal in the replace, the issue doesn't happen. ``` Dim s as String = "We are on Test Number 1" s=Regex.Replace(s,"(Test Number )(\...
[ 0.5353652834892273, -0.08593302965164185, 0.42306530475616455, 0.09211988002061844, 0.058004382997751236, -0.17779883742332458, 0.4669337272644043, -0.298727810382843, -0.06914849579334259, -0.47738003730773926, -0.37769031524658203, 0.9193617105484009, -0.29104459285736084, 0.030566725879...
= 2 s=Regex.Replace(s,"(Test Number) (\d)","$1 " & newNumber) ``` The problem is that when you concatenate, you end up specifying "$12" and of course there is no capture 12. In this case, we can take out the trailing space from "Test Number" and add it in the replacement, so our replacement string is "$1 2" and the ...
[ 0.1100679263472557, -0.09129313379526138, 0.17540472745895386, -0.2978915274143219, 0.13689172267913818, 0.018478211015462875, 0.264188289642334, -0.43768781423568726, -0.006972274277359247, -0.5734354853630066, -0.4574001133441925, 0.5587097406387329, -0.6604728698730469, -0.1332265883684...
I used to have tables before to display the content and people here advised me to remove tables and use CSS floating for better styling. I am new to everything. My Problem is I have content and side bar. I want it to be displayed like ``` content | Sidebar ``` But Now with the current styling I have It is...
[ 0.20452292263507843, 0.37697792053222656, 0.6534446477890015, 0.005575757473707199, 0.09759263694286346, -0.12105148285627365, -0.05834031105041504, 0.2712177336215973, -0.15068624913692474, -0.7944178581237793, 0.04480019584298134, 0.1622186303138733, 0.07738670706748962, 0.33653944730758...
} .csssidebar { float: right; width: 500px; background: darkgreen; /* height:500px; */ } </style> ``` If I add ``` <div class="Content"> all the content <div class="sidebar"> <Image> </div> ``` If I add sidebar inside the content the image is getting displayed b...
[ 0.004209944978356361, -0.03945567458868027, 0.6735867857933044, -0.08870452642440796, 0.0922284796833992, -0.02467762865126133, -0.019599922001361847, -0.12780317664146423, -0.19941365718841553, -0.7820591926574707, -0.4366985559463501, 0.3057478070259094, -0.024019069969654083, 0.02290952...
all the content </div> <div class="sidebar"> <Image> </div> ``` **I want both content and side bar to be displayed side by side** In the HTML file you first need to set the floating elements, followed by the none floating ones. Because the floating element is going to block the entire "level" of the websit...
[ 0.35604745149612427, 0.10946522653102875, 0.8521032929420471, 0.02846549265086651, -0.39943110942840576, -0.09308910369873047, 0.009546885266900063, 0.23243682086467743, -0.1966066211462021, -0.8006678819656372, -0.15033434331417084, 0.26529374718666077, -0.27063533663749695, -0.1237105652...
In my windows form application, I'm trying to test the user's ability to access a remote machine's shared folder. The way I'm doing this (and I'm sure that there are better ways...but I don't know of them) is to check for the existence of a specific directory on the remote machine (I'm doing this because of firewall/ot...
[ 0.3323518633842468, 0.20491144061088562, 0.16036388278007507, 0.1164948046207428, 0.37909215688705444, -0.3203115463256836, 0.10938690602779388, 0.06257451325654984, -0.3616122305393219, -0.5092506408691406, -0.06435323506593704, 0.25963571667671204, -0.14030574262142181, 0.311489969491958...
thread and wait only 1000 milliseconds before determining that the share can't be hit by the user. However, when I do this, it still hangs as if it was never run in the same thread. **What is making it hang and how do I fix it?** I would think that the fact that it is in a separate thread would allow me to just let th...
[ 0.589386522769928, -0.20260891318321228, 0.6703627109527588, -0.16731595993041992, 0.3496468663215637, -0.22358816862106323, 0.38150301575660706, -0.499811053276062, -0.31871694326400757, -0.4378392696380615, 0.2089814692735672, 0.38365089893341064, -0.3192221522331238, 0.47919461131095886...
hit folder: " + compInfo.Path); } ``` **Edit:** I feel that I should add that the line of throwing the exception **IS HIT**. I've debugged this and verified it...however, when the exception is thrown, then is when my program hangs. (I might also add that the exception is caught in the calling method and I never get t...
[ 0.3460821807384491, 0.08252443373203278, 0.3536520302295685, -0.10543599724769592, 0.01646634005010128, -0.40129220485687256, 0.17364603281021118, -0.027545912191271782, -0.3537830114364624, -0.4384344518184662, -0.0020539695397019386, 0.7945407032966614, -0.2802790701389313, 0.15752564370...
I tried commenting out the the check and it executed successfully. This explains why I couldn't get past the throwing of the exception, I call compInfo.Path in the message of the exception. However, I think we learned a lot from "the real problem": 1. The code I posted in the question (as is) works perfectly fine. 2....
[ 0.37890827655792236, -0.09262991696596146, 0.4822867512702942, -0.116038016974926, 0.0006077129510231316, -0.16020703315734863, 0.5204398036003113, -0.015738002955913544, -0.2800940275192261, -0.5844622254371643, 0.03800979629158974, 0.36816534399986267, -0.20920869708061218, 0.06186436489...
thread.Join(int).** 4. Using the "step into" button on a debugger will reveal many things...even about your own "solid" code. :) Thanks everyone for your help, patience, and thoughtful input/insights.
[ 0.6098033785820007, -0.007418866269290447, 0.042239442467689514, 0.3386375904083252, 0.07698389887809753, -0.3266933858394623, 0.8375440835952759, 0.28934726119041443, -0.15089954435825348, -0.7070607542991638, -0.08195240795612335, 0.1373474895954132, 0.2404366135597229, 0.136610895395278...
I'm currenly on a project and I'm trying out the awesome Twitter Bootrtrap including the responsive grid. All works fine and dandy except for one issue. How do you give the `.container` (which holds the grid) a background color? Example: ``` <div class="container green"> <div class="row"> <div class="span...
[ 0.5535668730735779, -0.3723713159561157, 0.22479453682899475, 0.07410736382007599, -0.023448867723345757, 0.1008518785238266, -0.17455847561359406, 0.07958713918924332, -0.12233194708824158, -0.9118029475212097, 0.2189909815788269, 0.5101324319839478, -0.2386881411075592, -0.24761998653411...
<p>This is a test</p> </div> </div> </div> .green{ background:green; } ``` When I add a color to the container it will turn green but leaves a margin on the left side, about 20px. How do I implement a full-width background? That margin you're seeing is due to the fact that the `.row` class part of the g...
[ 0.13210955262184143, -0.15024785697460175, 0.4492509961128235, -0.0481649786233902, 0.16417153179645538, 0.20112614333629608, -0.2873384952545166, -0.19065974652767181, -0.46052515506744385, -0.7924121022224426, 0.07284575700759888, 0.22183758020401, -0.08926989138126373, -0.15165336430072...
`.container` div with another container with the background color of your choice, like so: **HTML** ``` <div class="green"> <div class="container"> <div class="row"> <div class="span6"> <p>This is a test</p> </div> </div> <div class="row">
[ 0.3139488697052002, -0.1477450281381607, 0.32874852418899536, 0.021758047863841057, -0.009965726174414158, -0.17336571216583252, -0.16367483139038086, -0.2948024868965149, -0.15312637388706207, -0.9099075198173523, -0.022950125858187675, 0.2924586236476898, -0.24251693487167358, 0.03667912...
<div class="span6"> <p>This is a test</p> </div> </div> </div> </div> ``` **CSS** ``` .green{ background:green; } ```
[ 0.1545606553554535, -0.10077868402004242, 0.26706379652023315, -0.03821926191449165, -0.0529804453253746, -0.16350919008255005, -0.023269327357411385, -0.3726945221424103, -0.2195674479007721, -0.5641286373138428, -0.1305958479642868, 0.29210206866264343, -0.29687803983688354, -0.161671862...
I am trying to write a test that simulates some return values from Dropbox's REST service that gives me back data in an Array, with a nested hash. I am having trouble figuring out how to code my Factory since the return result is an array with a has inside. What would go here? ``` Factory.define :dropbox_hash do ?? ...
[ 0.3901759684085846, 0.259049654006958, 0.4670749008655548, -0.30408117175102234, -0.0832621157169342, 0.15420092642307281, 0.25544479489326477, -0.224702388048172, -0.2678185701370239, -0.5887749791145325, 0.03619488328695297, 0.3306565284729004, -0.3659667372703552, 0.07063385099172592, ...
of mine that operates using a hash of content from a 3rd-party API. I found that by using a few of the built-in features of factory\_girl I was able to cleanly construct these sort of data structures. Here's a contrived example: ``` factory :chicken, class:Hash do name "Sebastian" colors ["white", "orange"]...
[ 0.40823495388031006, -0.001202533720061183, 0.13960283994674683, -0.1203247681260109, 0.43044427037239075, 0.03197334334254265, 0.1253422498703003, -0.2581307888031006, -0.08180195093154907, -0.5437477231025696, 0.07888546586036682, 0.0620427243411541, -0.3790960907936096, 0.31657531857490...
attributes to the resultant object. It also seems to skip the db store in this case. So, instead of constructing anything complicated, we just pass back the already prepared attribute hash as our content. Voila. It does seem necessary to specify some value for the class, despite it not actually being used. This is to ...
[ 0.45364126563072205, 0.1585441529750824, -0.08348359912633896, 0.1502644270658493, -0.08236989378929138, 0.2682010233402252, 0.37782150506973267, -0.08247562497854233, -0.08673912286758423, -0.315748929977417, 0.05795574188232422, 0.44360244274139404, -0.11328722536563873, 0.29874962568283...
nested content and want to override deeper fields you will need to increase the complexity of the initialization block to do some sort of deep merge. In your case, you're using some mixed array and hash data, and it appears that the Path property should be reused between portions of the data structure. No problem - yo...
[ 0.2840528190135956, 0.05149206519126892, 0.12934282422065735, -0.050411026924848557, 0.208120658993721, -0.2606284022331238, 0.0979156345129013, -0.16036750376224518, -0.27933159470558167, -0.725222110748291, -0.04967166483402252, 0.4095088839530945, -0.468013733625412, 0.08199484646320343...
"30054214dc" thumb_exists false bytes 0 modified { 3.days.ago } is_dir true icon "folder_app" root "app_folder" size "0 bytes" initialize_with { [ attributes[:path], attributes ] } end FactoryGirl.build(:dropbox_hash, path:"/Chickens", is_dir:false) ``` You are also still free to...
[ 0.41897425055503845, -0.075716532766819, 0.4946140944957733, -0.25175049901008606, 0.2195715457201004, 0.19159074127674103, 0.5617334842681885, -0.43652212619781494, -0.38945016264915466, -0.4697149395942688, 0.13426104187965393, 0.6523438096046448, -0.3587815463542938, -0.0509059429168701...
FactoryGirl.build(:dropbox_hash, path:"/Chickens", revision:99, modified:Time.now) ```
[ 0.6218456625938416, -0.35660940408706665, -0.1983214020729065, -0.2699147164821625, 0.008939886465668678, 0.41534480452537537, 0.5647726058959961, 0.45083820819854736, -0.34018757939338684, -0.5115686655044556, 0.10282575339078903, 0.33894842863082886, -0.17888513207435608, 0.2207157462835...
I have a UITable that has over 200+ cells. The table works beautifully with data coming in from the network. Now I need to add in a way to change the background color of the label to match with the data (Red if the value decreased and green if the value increased). This seems to work well initially, but after awhile th...
[ 0.38651660084724426, 0.019290819764137268, 0.7045785188674927, -0.14463436603546143, -0.12595368921756744, 0.13193370401859283, 0.06287679076194763, -0.13365259766578674, -0.38830140233039856, -0.9978904128074646, 0.4257873296737671, 0.1398838609457016, -0.2682327926158905, 0.3522125482559...
to the cell perfectly fine. It is the color of the cell that refuses to change after a few minutes no matter what the value is. ``` - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequ...
[ 0.06949054449796677, -0.22616344690322876, 0.7228780388832092, -0.2349657565355301, 0.23135337233543396, -0.14495442807674408, 0.43083062767982483, -0.5026541948318481, -0.12083746492862701, -0.7673066258430481, -0.3089907765388489, 0.4070349335670471, -0.26106348633766174, 0.1743020415306...
[label release]; } UILabel *label = (UILabel*)[cell viewForTag:1]; float value = [label.text floatValue]; float newValue = [dataSource objectAtIndex:indexPath.row]; // Get the current value of the cell and compare it with the new value if(value < newVal) { label.backgroundColor = [U...
[ -0.15046542882919312, -0.33181455731391907, 0.6748693585395813, -0.15311218798160553, 0.4089493751525879, 0.05996239557862282, -0.08285147696733475, -0.45514246821403503, -0.18847163021564484, -0.45762133598327637, -0.1938115358352661, 0.2968794107437134, -0.431133508682251, 0.270974993705...
label.text = [NSString stringWithFormat:@"%d", newValue]; } ``` I second the recommendation of regex. The module is simply fantastic. Here's an example of fuzzy matching with regex: ``` import regex # traditional matching - three digits r = '(?:\d\d\d)' print regex.findall(r, '1xx22yy333zz') ## ['333'] # fuzzy mat...
[ -0.18490912020206451, -0.09797591716051102, 0.464053750038147, -0.027297601103782654, -0.06690201163291931, -0.05402173474431038, 0.005904325749725103, -0.3845740556716919, -0.04032563790678978, -0.3447995185852051, 0.01817585527896881, 0.7733341455459595, -0.2762906849384308, -0.065508760...