text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
the Blog - Home" title="Err the Blog - Home" type="rss" xmlUrl="http://feeds.feedburner.com/errtheblog" htmlUrl="http://errtheblog.com/"/> <outline text="Euruko 2009 Barcelona 9-10 May" title="Euruko 2009 Barcelona 9-10 May" type="rss" xmlUrl="...
[ -0.15583261847496033, 0.023580750450491905, 0.972404420375824, -0.050566673278808594, -0.4167422950267792, -0.00844051968306303, 0.1732441484928131, 0.2618251442909241, 0.1460799127817154, -0.1884496510028839, -0.4123287498950958, 0.5442448258399963, -0.2417232096195221, -0.411414027214050...
<outline text="evan.musing" title="evan.musing" type="rss" xmlUrl="http://blog.fallingsnow.net/feed/" htmlUrl="http://blog.fallingsnow.net"/> <outline text="Fair Answers" title="Fair Answers" type="rss" xmlUrl="http://www.blog.fairanswers.com/?feed=rss2" htmlUrl="http://www.b...
[ -0.25146615505218506, 0.10586237162351608, 0.6183779835700989, 0.053361911326646805, -0.5879063010215759, 0.15816578269004822, 0.23218029737472534, -0.41675928235054016, -0.290473610162735, 0.02176974155008793, -0.06823507696390152, 0.2740803062915802, -0.05142216756939888, -0.023124992847...
<outline text="five pound app" title="five pound app" type="rss" xmlUrl="http://fivepoundapp.com/meetup/next/" htmlUrl="http://fivepoundapp.com/"/> <outline text="FiveRuns Blog - Home" title="FiveRuns Blog - Home" type="rss" xmlUrl="http://blog.fiveruns.com/fe...
[ 0.5577288269996643, 0.17576220631599426, 0.18052858114242554, -0.10352784395217896, -0.2592088580131531, 0.4836376905441284, 0.2511409521102905, -0.26479578018188477, -0.2797378599643707, -0.265373557806015, -0.08615566045045853, 0.40145957469940186, -0.04846951365470886, -0.04207988083362...
Screencasts" title="Free Ruby and Rails Screencasts" type="rss" xmlUrl="http://feeds.feedburner.com/rubyplus" htmlUrl="http://www.rubyplus.org/episodes.rss"/> <outline text="Freelancing Gods" title="Freelancing Gods" type="rss" xmlUrl="http://f...
[ 0.21686233580112457, -0.011068984866142273, 0.4203866124153137, 0.1434740275144577, -0.49455374479293823, 0.3234294652938843, 0.4211099445819855, -0.021258583292365074, -0.4320113956928253, -0.4999081492424011, -0.20089146494865417, 0.3063945472240448, 0.04345838725566864, -0.0558746568858...
text="geek!daily" title="geek!daily" type="rss" xmlUrl="http://feeds.feedburner.com/geekdailyblog" htmlUrl="http://blog.geekdaily.org/"/> <outline text="Geoff Evason" title="Geoff Evason" type="rss" xmlUrl="http://feeds.feedburner.com/GeoffEvason" htmlUrl="http://geoff.evason...
[ 0.22646114230155945, 0.21415355801582336, 0.15329566597938538, -0.06628066301345825, -0.3243158757686615, 0.23428311944007874, 0.2281712293624878, 0.23677881062030792, -0.6145576238632202, -0.1775631308555603, -0.6435675621032715, 0.5000248551368713, -0.32460540533065796, -0.21160086989402...
title="GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS - Home" type="rss" xmlUrl="http://feeds.feedburner.com/GiantRobotsSmashingIntoOtherGiantRobots" htmlUrl="http://giantrobots.thoughtbot.com/"/> <outline text="Giles Bowkett" title="Giles Bowkett" type="rss" ...
[ -0.44258323311805725, -0.16157811880111694, 0.24974921345710754, -0.0745224580168724, -0.23890149593353271, 0.35747087001800537, 0.39310452342033386, -0.006237240042537451, -0.34242093563079834, -0.25775471329689026, -0.40029317140579224, 0.17818062007427216, -0.11252686381340027, -0.01174...
<outline text="Gluttonous" title="Gluttonous" type="rss" xmlUrl="http://feeds.feedburner.com/Gluttonous" htmlUrl="http://glu.ttono.us/"/> <outline text="Grasp Ruby on Rails - Blog" title="Grasp Ruby on Rails - Blog" type="rss" xmlUrl="http://grasprubyonrails.c...
[ -0.11496399343013763, 0.25495219230651855, 0.32050269842147827, -0.2819528579711914, -0.2146974503993988, 0.26645147800445557, 0.039411962032318115, -0.05285593867301941, -0.176347553730011, -0.5386371612548828, -0.18535642325878143, 0.33985042572021484, -0.21134112775325775, 0.09624879062...
title="GrokBlok - Home" type="rss" xmlUrl="http://feeds.feedburner.com/grokblok" htmlUrl="http://www.google.com/reader/view/feed%2Fhttp%3A%2F%2Ffeeds.feedburner.com%2Fgrokblok"/> <outline text="gurge.com" title="gurge.com" type="rss" xmlUrl="http://gurge.com/blog/feed/" htmlU...
[ -0.4606747329235077, 0.26869168877601624, 0.5531604290008545, -0.2639438211917877, -0.205687016248703, 0.2203393578529358, -0.01691232994198799, 0.035089161247015, -0.18901528418064117, -0.3808521330356598, -0.4137823283672333, 0.31502804160118103, -0.1528426557779312, 0.22952912747859955,...
xmlUrl="http://hamptoncatlin.com/feed/atom.xml" htmlUrl="http://hamptoncatlin.com/"/> <outline text="has_many :bugs, :through =&amp;gt; :rails - Home" title="has_many :bugs, :through =&amp;gt; :rails - Home" type="rss" xmlUrl="http://feeds.feed...
[ -0.026309208944439888, -0.07377847284078598, 0.3198605179786682, -0.13700620830059052, -0.13851602375507355, 0.12505407631397247, -0.08701801300048828, -0.3067411780357361, -0.49024516344070435, -0.4958730638027191, -0.11912199854850769, 0.2253851592540741, -0.40495172142982483, 0.00819746...
<outline text="has_many :through - home" title="has_many :through - home" type="rss" xmlUrl="http://feeds.feedburner.com/hasmanythrough" htmlUrl="http://blog.hasmanythrough.com"/> <outline text="Headius" title="Headius" type="rss" xmlUrl="http://headius.blogsp...
[ 0.2294873297214508, 0.16624899208545685, 0.6702569723129272, -0.3150639533996582, -0.13096310198307037, -0.03745833411812782, 0.09951810538768768, -0.04695203900337219, -0.30763810873031616, -0.6851785182952881, -0.1883561611175537, 0.4040660858154297, -0.21013464033603668, 0.0815958678722...
xmlUrl="http://blog.headius.com/feeds/posts/default" htmlUrl="http://blog.headius.com/"/> <outline text="Heroku News" title="Heroku News" type="rss" xmlUrl="http://feeds.feedburner.com/heroku" htmlUrl="http://blog.heroku.com"/> <outline text="HeyCarsten - Home" title="HeyCarsten ...
[ 0.04847753793001175, 0.13679757714271545, 0.6225427985191345, -0.16505785286426544, -0.6292111277580261, 0.29734566807746887, 0.19112159311771393, -0.23404410481452942, -0.2187705934047699, -0.3851543366909027, -0.5177308917045593, 0.16413603723049164, -0.08369098603725433, -0.081478916108...
<outline text="HickoryTech" title="HickoryTech" type="rss" xmlUrl="http://tech.hickorywind.org/articles.rss" htmlUrl="http://tech.hickorywind.org/articles.rss"/> <outline text="Hungry Machine Blog - All" title="Hungry Machine Blog - All" type="rss" xmlUrl="htt...
[ 0.6571643948554993, 0.09051266312599182, 0.12781791388988495, -0.03959757089614868, -0.27662965655326843, 0.13432422280311584, -0.2596215605735779, 0.2515804171562195, -0.40106794238090515, -0.29651781916618347, -0.22164076566696167, 0.8894806504249573, -0.12720772624015808, 0.049743857234...
xmlUrl="http://feeds.feedburner.com/igvita" htmlUrl="http://www.igvita.com"/> <outline text="In the Key of E" title="In the Key of E" type="rss" xmlUrl="https://blogs.oracle.com/emononen/feed/entries/atom?cat=%2FNetBeans" htmlUrl="https://blogs.oracle.com/emononen/"/> ...
[ 0.30821308493614197, -0.10798664391040802, 0.41361385583877563, -0.05202678591012955, -0.4571381211280823, 0.05295751988887787, -0.11769094318151474, -0.17012569308280945, -0.25362318754196167, -0.5403735637664795, -0.48407962918281555, 0.31381699442863464, -0.5198604464530945, -0.12270151...
title="interblah.net - blog" type="rss" xmlUrl="http://interblah.net/feed.xml" htmlUrl="http://www.google.com/reader/view/feed%2Fhttp%3A%2F%2Finterblah.net%2Ffeed.xml"/> <outline text="Intridea - Blog" title="Intridea - Blog" type="rss" xmlUrl="http://www.intr...
[ 0.21597722172737122, -0.007953891530632973, 0.4635941684246063, -0.158333882689476, -0.43029093742370605, -0.17927271127700806, 0.16201338171958923, -0.2818298041820526, -0.16019637882709503, -0.1130470409989357, -0.4594356119632721, 0.24520236253738403, -0.4044017195701599, -0.09960810095...
title="Inventive Labs: Weblog" type="rss" xmlUrl="http://feeds.feedburner.com/inventivelabs-weblog" htmlUrl="http://www.google.com/reader/view/feed%2Fhttp%3A%2F%2Ffeeds.feedburner.com%2Finventivelabs-weblog"/> <outline text="Irene Ros - Blog" title="Irene Ros - Blog" type="rs...
[ 0.08677046000957489, 0.17788434028625488, 0.14739617705345154, -0.034181252121925354, -0.1239895150065422, 0.0029734906274825335, 0.2034645825624466, -0.10559176653623581, -0.005919639486819506, -0.18110381066799164, -0.3629985749721527, 0.40825721621513367, -0.3526766002178192, 0.06373041...
xmlUrl="http://jakescruggs.blogspot.com/feeds/posts/default" htmlUrl="http://jakescruggs.blogspot.com/"/> <outline text="James on Software - Home" title="James on Software - Home" type="rss" xmlUrl="http://feeds.feedburner.com/JamesOnSoftware" htmlUrl="http://jamesgolick.com/...
[ 0.19754230976104736, 0.32416120171546936, 0.48259425163269043, -0.5444187521934509, -0.004024163354188204, 0.2639150619506836, 0.13062520325183868, -0.08743072301149368, -0.006356068886816502, -0.4599531888961792, -0.44672101736068726, 0.3098008632659912, -0.30062371492385864, 0.0836634859...
<outline text="Jay Fields Thoughts" title="Jay Fields Thoughts" type="rss" xmlUrl="http://blog.jayfields.com/feeds/posts/default" htmlUrl="http://blog.jayfields.com/"/> <outline text="jeremydurham.com" title="jeremydurham.com" type="rss" xmlUrl...
[ 0.09344717860221863, 0.30431315302848816, 0.4234434962272644, -0.5449873208999634, -0.46908310055732727, 0.4144687354564667, 0.13891524076461792, 0.2136460691690445, -0.01721404492855072, -0.15043435990810394, -0.20982210338115692, 0.12215062230825424, -0.24467867612838745, 0.0367527268826...
<outline text="Jicksta.com" title="Jicksta.com" type="rss" xmlUrl="http://feeds.feedburner.com/jicksta" htmlUrl="http://jicksta.com"/> <outline text="jlaine.net - Home" title="jlaine.net - Home" type="rss" xmlUrl="http://feeds.feedburner.com/jlainenet" htmlUrl...
[ 0.41399410367012024, 0.31078553199768066, 0.03569593280553818, -0.3481568694114685, -0.09879588335752487, 0.16941232979297638, 0.1415553241968155, 0.1104927808046341, -0.1902274340391159, -0.1972905844449997, -0.43665018677711487, 0.4981550872325897, 0.061502620577812195, -0.09959288686513...
title="John Lam on Software" type="rss" xmlUrl="http://feeds.feedburner.com/LessIsBetter" htmlUrl="http://www.iunknown.com/"/> <outline text="Jonathan.inspect" title="Jonathan.inspect" type="rss" xmlUrl="http://jonathan.tron.name/articles.atom" htmlUrl="http:/...
[ 0.11447914689779282, 0.1838698387145996, 0.23092681169509888, -0.08032769709825516, -0.4751824736595154, -0.22448380291461945, -0.053824517875909805, -0.08903427422046661, -0.3982255160808563, -0.10214529186487198, -0.4237390458583832, 0.11915407329797745, -0.2943645715713501, -0.002031034...
xmlUrl="http://www.rorsecurity.info/journal/atom.xml" htmlUrl="http://www.rorsecurity.info/journal/"/> <outline text="Juixe TechKnow" title="Juixe TechKnow" type="rss" xmlUrl="http://www.juixe.com/techknow/index.php/feed/atom/" htmlUrl="http://www.juixe.com/techknow"/> ...
[ 0.18395142257213593, 0.15208390355110168, 0.5299960970878601, -0.14600270986557007, -0.37379348278045654, 0.2072051763534546, -0.23455597460269928, -0.07875795662403107, -0.1212770864367485, -0.48324939608573914, -0.525039792060852, 0.28562596440315247, -0.20582987368106842, 0.133603483438...
<outline text="LakTEK" title="LakTEK" type="rss" xmlUrl="http://feeds.feedburner.com/laktek-blog" htmlUrl="http://www.web2media.net/laktek"/> <outline text="Learning Rails" title="Learning Rails" type="rss" xmlUrl="http://feeds.feedburner.com/learning-rails" h...
[ 0.2255968600511551, 0.03453175351023674, -0.08131317049264908, 0.1586434245109558, -0.3175126016139984, 0.3236065208911896, 0.019614869728684425, 0.03775255009531975, -0.2901057302951813, -0.5118152499198914, -0.1359318494796753, 0.19481109082698822, -0.11334248632192612, 0.036205232143402...
xmlUrl="http://feeds.feedburner.com/LibinPan" htmlUrl="http://blog.libinpan.com"/> <outline text="LiquidRail - Rails" title="LiquidRail - Rails" type="rss" xmlUrl="http://liquidrail.com/feed/atom.xml" htmlUrl="http://liquidrail.com/"/> <outline text="Loud Thinking...
[ 0.014643433503806591, -0.046081800013780594, -0.004892513155937195, 0.04989875480532646, -0.34562361240386963, 0.02731117606163025, 0.034263018518686295, -0.08400299400091171, -0.23544181883335114, -0.4881178140640259, -0.47336068749427795, 0.2002699375152588, -0.23820729553699493, 0.00222...
Thinking by David Heinemeier Hansson" type="rss" xmlUrl="http://feeds.feedburner.com/LoudThinking" htmlUrl="http://www.loudthinking.com/"/> <outline text="Luca Guidi - Home" title="Luca Guidi - Home" type="rss" xmlUrl="http://www.lucaguidi.com/...
[ 0.16679036617279053, 0.2521721124649048, -0.05059683322906494, -0.20876795053482056, 0.07563978433609009, 0.33775365352630615, 0.20220650732517242, -0.2041853666305542, -0.22962598502635956, -0.662702739238739, -0.028845369815826416, -0.06781470030546188, -0.38204389810562134, 0.1160427927...
<outline text="Lucky Sneaks - Blog" title="Lucky Sneaks - Blog" type="rss" xmlUrl="http://feeds.feedburner.com/luckysneaks" htmlUrl="/blog"/> <outline text="Magnus Holm" title="Magnus Holm" type="rss" xmlUrl="http://feeds.feedburner.com/MagnusHolm" htmlUrl="ht...
[ 0.2641565799713135, 0.029457781463861465, 0.13887205719947815, 0.1113257110118866, -0.3402986228466034, -0.27795225381851196, 0.3789655864238739, 0.4633175730705261, -0.11876881122589111, -0.46287375688552856, -0.4515645503997803, 0.1838236302137375, -0.1301179975271225, -0.414054214954376...
title="Marc-Andre Cournoyer's Awesome Feed" type="rss" xmlUrl="http://macournoyer.com/blog.atom" htmlUrl="http://macournoyer.com"/> <outline text="Marc-André Cournoyer's blog" title="Marc-André Cournoyer's blog" type="rss" xmlUrl="http://macournoyer.wordpres...
[ 0.2191481739282608, 0.1985962986946106, 0.06359586864709854, 0.04387473687529564, -0.6301508545875549, -0.1268596649169922, 0.2280093878507614, 0.2748764753341675, -0.021470412611961365, -0.5172665119171143, -0.49422168731689453, 0.23275649547576904, 0.12015391886234283, -0.093661859631538...
xmlUrl="http://marcricblog.blogspot.com/feeds/posts/default" htmlUrl="http://marcricblog.blogspot.com/"/> <outline text="Martin's Blog" title="Martin's Blog" type="rss" xmlUrl="https://blogs.oracle.com/martink/feed/entries/rss" htmlUrl="https://blogs.oracle.com/martink/"/> ...
[ 0.15269964933395386, 0.09551695734262466, 0.8303177952766418, -0.12491144239902496, -0.25521355867385864, 0.30006274580955505, 0.21292085945606232, -0.08572613447904587, -0.2553693950176239, -0.047569695860147476, -0.4325755536556244, 0.34076738357543945, -0.17408181726932526, 0.0199276246...
<outline text="Meme Agora" title="Meme Agora" type="rss" xmlUrl="http://memeagora.blogspot.com/feeds/posts/default" htmlUrl="http://memeagora.blogspot.com/"/> <outline text="Mental Paging Space" title="Mental Paging Space" type="rss" xmlUrl="http://mentalpagin...
[ -0.06417451798915863, 0.1419193595647812, 0.03189963847398758, -0.20337511599063873, -0.0728842169046402, 0.3928624093532562, -0.23593437671661377, -0.06079372391104698, -0.30955949425697327, -0.1836066097021103, -0.1597055196762085, 0.6432554125785828, 0.005984658841043711, 0.032362371683...
type="rss" xmlUrl="http://feeds.feedburner.com/aisleten/blog" htmlUrl="http://blog.aisleten.com"/> <outline text="Mike Clark" title="Mike Clark" type="rss" xmlUrl="http://www.clarkware.com/cgi/blosxom/index.rss" htmlUrl="http://www.clarkware.com/cgi/blosxom"/> <ou...
[ 0.154815673828125, 0.24444305896759033, 0.2784101366996765, -0.12598983943462372, -0.2712952792644501, 0.2001960575580597, 0.04398420453071594, 0.11735451966524124, -0.3767227530479431, -0.014877638779580593, -0.5343396067619324, 0.1381458044052124, -0.5895242094993591, -0.0103754457086324...
title="Mister Bleigh - Blog" type="rss" xmlUrl="http://feeds.feedburner.com/mbleigh/" htmlUrl="http://www.mbleigh.com/"/> <outline text="Mr. Matt - Ruby on Rails Developer, Manchester UK" title="Mr. Matt - Ruby on Rails Developer, Manchester UK"
[ 0.22171077132225037, -0.03974700719118118, 0.07766913622617722, -0.07772660255432129, -0.1734016388654709, 0.4329617917537689, 0.506850004196167, 0.4754951596260071, -0.1582694798707962, -0.0782863199710846, -0.4712403416633606, 0.08396551012992859, -0.3188033998012543, 0.12799392640590668...
type="rss" xmlUrl="http://matthall.wordpress.com/feed/" htmlUrl="http://matthall.wordpress.com"/> <outline text="Mutually Human Software - Blog" title="Mutually Human Software - Blog" type="rss" xmlUrl="http://www.mutuallyhuman.com/feed/blog/atom.xml" htmlUrl="http://mutually...
[ 0.3249114155769348, 0.18809060752391815, 0.2812144160270691, -0.1372806578874588, -0.2387426346540451, -0.1544925719499588, 0.039032500237226486, -0.021963071078062057, 0.04328470304608345, -0.3383216857910156, -0.37931564450263977, 0.33855652809143066, -0.3737073838710785, 0.0907361805438...
testing and hosting tidbits - Home" title="nano RAILS: development, testing and hosting tidbits - Home" type="rss" xmlUrl="http://feeds.feedburner.com/Nanorails" htmlUrl="http://blog.nanorails.com/"/> <outline text="NetBeans Wiki: RubyOnRails" ...
[ 0.5595606565475464, 0.11277469992637634, 0.004182257689535618, 0.009391946718096733, -0.07198461145162582, -0.23720690608024597, 0.04030011594295502, -0.1742635816335678, -0.09204361587762833, -0.32514750957489014, -0.20476636290550232, -0.00778566999360919, -0.01876041106879711, 0.2111630...
xmlUrl="http://wiki.netbeans.org/wiki/rss.jsp?page=RubyOnRails&amp;mode=wiki" htmlUrl="http://wiki.netbeans.org/"/> <outline text="Neverintheoffice.net - Home" title="Neverintheoffice.net - Home" type="rss" xmlUrl="http://neverintheoffice.net/feed/atom.xml" htmlUrl="http://ne...
[ 0.22655898332595825, -0.10939204692840576, 0.3257981240749359, -0.09200631827116013, -0.2358865886926651, -0.054161325097084045, 0.18452990055084229, -0.02569437026977539, -0.26665186882019043, -0.5184532403945923, -0.3288622498512268, 0.05298915132880211, -0.28148069977760315, 0.372645020...
<outline text="Nobody Listens Anyway" title="Nobody Listens Anyway" type="rss" xmlUrl="http://www.justinball.com/feed/" htmlUrl="http://www.justinball.com"/> <outline text="Not So Stupid" title="Not So Stupid" type="rss" xmlUrl="http://www.notsostupid.com/feed...
[ 0.4323684871196747, -0.1774595081806183, 0.320317804813385, 0.11735499650239944, -0.1022593304514885, -0.32330673933029175, 0.4605812430381775, -0.13105426728725433, -0.32875168323516846, -0.08029966056346893, 0.05284922197461128, 0.616696298122406, -0.01490254420787096, -0.412049442529678...
type="rss" xmlUrl="http://www.notch8.com/xml/atom/feed.xml" htmlUrl="http://www.notch8.com"/> <outline text="Nuby on Rails" title="Nuby on Rails" type="rss" xmlUrl="http://feeds.feedburner.com/nubyonrails" htmlUrl="http://nubyonrails.com"/> <outlin...
[ 0.21381519734859467, -0.33337679505348206, 0.17307978868484497, -0.14723913371562958, -0.318947434425354, 0.2962101101875305, 0.03416673094034195, 0.020078856498003006, -0.18223661184310913, -0.3797619938850403, -0.16747336089611053, 0.1064017117023468, -0.37108954787254333, 0.212151154875...
type="rss" xmlUrl="http://nubyonrails.topfunky.com/xml/atom/feed.xml" htmlUrl="http://nubyonrails.com"/> <outline text="Nullcreations - Recent Entries" title="Nullcreations - Recent Entries" type="rss" ```
[ 0.13222035765647888, 0.043079767376184464, 0.2981518507003784, -0.11119678616523743, -0.019181210547685623, -0.16742652654647827, 0.19583144783973694, 0.013754366897046566, -0.26934483647346497, -0.301345556974411, -0.5598341822624207, -0.27789533138275146, -0.39835596084594727, -0.0360298...
After reading a book on LINQ I'm thinking about re-writing a mapper class that I wrote in c# to use LINQ. I'm wondering if anyone can give me a hand. Note: its a bit confusing, but the User object is the local user and user (lowercase) is the object generated from the Facebook XSD. **Original Mapper** ``` public clas...
[ -0.13446901738643646, 0.05820554867386818, 0.6611889004707336, -0.17613963782787323, -0.15417161583900452, 0.23113681375980377, 0.17921335995197296, -0.08302411437034607, -0.40463709831237793, -1.034571886062622, -0.03886447101831436, 0.3232615292072296, -0.3763211667537689, -0.16991265118...
{ var uids = (from u in users where u.FacebookUid != null select u.FacebookUid.Value).ToList(); // return facebook users for uids using WCF } public IEnumerable<User> MergeUsers(IEnumerable<User> users, Facebook.user[] facebookUsers) { foreach(var u in users) { ...
[ -0.13915202021598816, -0.356764018535614, 0.7231507897377014, -0.3531728982925415, -0.03141312301158905, 0.27487096190452576, 0.23149865865707397, -0.4129285514354706, -0.07739855349063873, -0.9197418093681335, -0.2990131378173828, 0.5202375650405884, -0.3750153183937073, 0.058291304856538...
if (fbUser != null) u.FacebookAvatar = fbUser.pic_sqare; } return users; } } ``` My first two attempts hit walls **Attempt 1** ``` public IEnumerable<User> MapFrom(IEnumerable<User> users) { // didn't have a way to check if u.FacebookUid == null return from u in users join f in Get...
[ -0.21568554639816284, 0.033021990209817886, 0.8616898655891418, -0.3425387740135193, 0.009474676102399826, 0.4424070417881012, 0.8562237620353699, -0.8271782994270325, -0.22631388902664185, -0.7993281483650208, -0.3137028217315674, 0.6373122334480286, -0.30450308322906494, -0.2412387430667...
2** ``` public IEnumerable<User> MapFrom(IEnumerable<User> users) { // had to get the user from the facebook service for each single user, // would rather use a single http request. return from u in users let f = GetFacebookUser(user.FacebookUid) select AppendAvatar(u, f); } ``` Okay, it's not clear exa...
[ 0.1936529278755188, 0.08058443665504456, 0.5012956857681274, -0.21961738169193268, -0.2038382887840271, 0.060701340436935425, 0.40422379970550537, -0.2018568217754364, -0.10098303854465485, -0.8218767046928406, -0.0932975709438324, 0.5135608911514282, -0.43942585587501526, -0.0891170203685...
it easier for you to do the same thing next time. (Assuming you like my solutions, of course :) LINQ is inherently functional in style. That means that ideally, queries shouldn't have side-effects. For instance, I'd expect a method with a signature of: ``` public IEnumerable<User> MapFrom(IEnumerable<User> users) ``...
[ 0.18820998072624207, 0.12307170033454895, 0.49190959334373474, 0.1884762942790985, -0.01534434873610735, -0.0704740509390831, -0.047639358788728714, 0.07564149796962738, -0.1594301164150238, -0.720554530620575, 0.010619577951729298, 0.5647408366203308, -0.22601312398910522, -0.053099356591...
User clone = new User(this.Name, this.Age, etc); clone.FacebookAvatar = avatar; return clone; } ``` You might even want to make `User` fully immutable - there are various strategies around that, such as the builder pattern. Ask me if you want more details. Anyway, the main thing is that we've created a new us...
[ 0.29656943678855896, -0.06803099811077118, 0.3276531994342804, -0.04917917773127556, 0.10929111391305923, 0.10132366418838501, 0.3261075019836426, 0.06608843803405762, -0.36155420541763306, -0.9763867259025574, 0.06546411663293839, 0.4471762776374817, -0.3152487576007843, 0.304839760065078...
of the API doesn't actually need to expose the Facebook users. It looks like your `GetFacebookUsers` method is basically okay, although I'd probably line up the query in terms of whitespace. So, given a sequence of local users and a collection of Facebook users, we're left doing the actual mapping bit. A straight "joi...
[ 0.3274770975112915, 0.07716581970453262, 0.1652740240097046, 0.06607209146022797, -0.11654160916805267, -0.14970365166664124, 0.5017067193984985, -0.11116333305835724, -0.04045718535780907, -0.6614226698875427, 0.07994722574949265, 0.24034100770950317, -0.6054441332817078, 0.13873022794723...
by coming up with a Facebook user who has a null uid (assuming the object model allows that): ``` // Adjust for however the user should actually be constructed. private static readonly FacebookUser NullFacebookUser = new FacebookUser(null); ``` However, we actually want a *sequence* of these users, because that's wh...
[ 0.13756480813026428, 0.07483091950416565, 0.3606474697589874, -0.061935294419527054, -0.0614924319088459, -0.06474703550338745, 0.5408502817153931, -0.11690764874219894, -0.28348395228385925, -0.7960229516029358, -0.059661224484443665, 0.3520788252353668, -0.4608380198478699, -0.0244226381...
we'd need to revisit this and not use an inner join. We include the "null" user at the end, then do the join and project using `WithAvatar`: ``` public IEnumerable<User> MapFrom(IEnumerable<User> users) { var facebookUsers = GetFacebookUsers(users).Concat(NullFacebookUsers); return from user in users ...
[ -0.08800093829631805, -0.04493942856788635, 0.48887860774993896, -0.17630930244922638, -0.08144929260015488, 0.08630916476249695, 0.404852956533432, -0.3270083963871002, -0.033380329608917236, -0.8590642809867859, -0.13800309598445892, 0.47145283222198486, -0.5139837861061096, 0.0025896411...
private static readonly IEnumerable<FacebookUser> NullFacebookUsers = Enumerable.Repeat(new FacebookUser(null), 1); public IEnumerable<User> MapFrom(IEnumerable<User> users) { var facebookUsers = GetFacebookUsers(users).Concat(NullFacebookUsers); return from user in users ...
[ -0.2500705420970917, -0.2066432237625122, 0.6721957921981812, -0.07410231232643127, -0.03245989605784416, 0.13509267568588257, 0.459001749753952, -0.13222342729568481, -0.1836666315793991, -0.9388513565063477, -0.1564451903104782, 0.4275357127189636, -0.4447352886199951, 0.0667293891310691...
select user.WithAvatar(facebookUser.pic_square); } private Facebook.user[] GetFacebookUsers(IEnumerable<User> users) { var uids = (from u in users where u.FacebookUid != null select u.FacebookUid.Value).ToList(); // return facebook users for uids usi...
[ 0.07043750584125519, -0.19577421247959137, 0.7065224051475525, -0.26091039180755615, -0.04498637840151787, 0.09848993271589279, 0.3211384117603302, -0.34226399660110474, -0.26230013370513916, -1.0040051937103271, -0.10064253211021423, 0.4368499517440796, -0.29918959736824036, 0.19191579520...
} } ``` A few points here: * As noted before, the inner join becomes problematic if a user's Facebook UID might not be fetched as a valid user. * Similarly we get problems if we have duplicate Facebook users - each local user would end up coming out twice! * This replaces (removes) the avatar for non-Facebook users....
[ 0.06063918396830559, -0.1541023701429367, 0.37033823132514954, -0.03842349350452423, -0.20876193046569824, -0.08714359998703003, 0.08626352250576019, -0.04225071147084236, -0.2292233109474182, -0.6756742000579834, 0.023837527260184288, 0.5454553365707397, -0.1774018108844757, -0.0423907078...
group join, so that for each local user we get a sequence of matching Facebook users. We'll then use `DefaultIfEmpty` to make life easier. We can keep `WithAvatar` as it was before - but this time we're only going to call it if we've got a Facebook user to grab the avatar from. A group join in C# query expressions is ...
[ 0.008345420472323895, -0.15765446424484253, 0.5454461574554443, -0.27974629402160645, -0.07398834824562073, -0.07255229353904724, 0.33257558941841125, -0.33593741059303284, -0.1263963282108307, -0.5333968997001648, -0.14132557809352875, 0.1848493069410324, -0.5537351369857788, -0.261414557...
join facebookUser in facebookUsers on user.FacebookUid equals facebookUser.uid into matchingUsers let firstMatch = matchingUsers.DefaultIfEmpty().First() select firstMatch == null ? user : user.WithAvatar(firstMatch.pic_square); } ``` Here's the query expression a...
[ -0.2380891740322113, -0.1948026716709137, 0.5432148575782776, -0.3068939447402954, -0.15674786269664764, 0.017905747517943382, 0.09101167321205139, -0.3280622363090515, -0.2413722276687622, -0.8912853002548218, 0.22916756570339203, 0.2728177607059479, -0.45519301295280457, -0.0647883713245...
range variable will // now be a sequence of FacebookUsers with the right UID. This could be empty. join facebookUser in facebookUsers on user.FacebookUid equals facebookUser.uid into matchingUsers // Convert an empty sequence into a single null entry, and then take the first // element - i.e. the first matchi...
[ 0.1219470277428627, -0.26398560404777527, 0.8433215618133545, -0.20027904212474823, -0.08810850977897644, 0.08879624307155609, -0.07743864506483078, -0.5271161794662476, 0.07986288517713547, -0.6750596165657043, 0.15305568277835846, 0.6809979677200317, -0.40302813053131104, -0.163739293813...
users) { var facebookUsers = GetFacebookUsers(users); var uidDictionary = facebookUsers.ToDictionary(fb => fb.uid); foreach (var user in users) { FacebookUser fb; if (uidDictionary.TryGetValue(user.FacebookUid, out fb) { yield return user.WithAvatar(fb.pic_square); ...
[ -0.022050639614462852, -0.1671990007162094, 0.819872260093689, -0.36495769023895264, 0.06095818802714348, 0.41999322175979614, 0.5382401347160339, -0.5787132978439331, -0.30767419934272766, -0.7812871932983398, -0.2483091652393341, 0.4721252918243408, -0.43341293931007385, 0.17340141534805...
yield return user; } } } ``` This uses an iterator block instead of a LINQ query expression. `ToDictionary` will throw an exception if it receives the same key twice - one option to work around this is to change `GetFacebookUsers` to make sure it only looks for distinct IDs: ``` private Facebook.user...
[ -0.008616924285888672, -0.09807799756526947, 0.6351152658462524, -0.2811596989631653, -0.012399263679981232, -0.06904040277004242, 0.3879861831665039, -0.3878461420536041, -0.11160136014223099, -0.7842234969139099, -0.1793685257434845, 0.3465844988822937, -0.3394758999347687, 0.07982710003...
where u.FacebookUid != null select u.FacebookUid.Value).Distinct().ToList(); // return facebook users for uids using WCF } ``` That assumes the web service works appropriately, of course - but if it doesn't, you probably want to throw an exception anyway :) **Conclusion** Take your ...
[ -0.28877219557762146, -0.04082856699824333, 0.3606322705745697, -0.14866261184215546, -0.09164492040872574, -0.03013155795633793, 0.2669757604598999, -0.5974133014678955, -0.13396702706813812, -0.4937882721424103, 0.017794638872146606, 0.2480531930923462, -0.3388555347919464, -0.1254076659...
behave okay with the `GetFacebookUsers` modification. Making `User` immutable would almost certainly be a positive step though. One nice by-product of all of these solutions is that the users come out in the same order they went in. That may well not be important to you, but it can be a nice property. Hope this help...
[ 0.3322473168373108, -0.2201298177242279, 0.15941257774829865, 0.014521884731948376, -0.06713341921567917, -0.30836620926856995, 0.8195618391036987, 0.1579234004020691, -0.1831689029932022, -0.7242076992988586, -0.22694316506385803, 0.6635518670082092, -0.3043544292449951, 0.052582893520593...
much out of the question, and I suspect that most uses of the type will *expect* mutation. If that's the case, it may be worth changing your interface to make that clearer. Instead of returning an `IEnumerable<User>` (which implies - to some extent - projection) you might want to change both the signature and the nam...
[ 0.36094337701797485, -0.16756337881088257, 0.4576014280319214, -0.2608150839805603, 0.1639855057001114, -0.08164601027965546, 0.4621695876121521, -0.1733916848897934, -0.15994153916835785, -0.952534019947052, -0.2551853656768799, 0.37539827823638916, -0.3447076082229614, 0.0811084508895874...
=> fb.uid); foreach (var user in users) { FacebookUser fb; if (uidDictionary.TryGetValue(user.FacebookUid, out fb) { user.Avatar = fb.pic_square; } }
[ -0.2013300359249115, -0.30372801423072815, 0.6305434703826904, -0.2693021893501282, -0.08226187527179718, 0.3828619122505188, 0.3909450173377991, -0.30954498052597046, -0.248345285654068, -0.6891196966171265, -0.2313801497220993, 0.2706904113292694, -0.3440680503845215, 0.07436374574899673...
} private Facebook.user[] GetFacebookUsers(IEnumerable<User> users) { var uids = (from u in users where u.FacebookUid != null select u.FacebookUid.Value).Distinct().ToList(); // return facebook users for uids using WCF } } ``` Again, this isn't a p...
[ -0.10785442590713501, -0.0955883041024208, 0.6196026802062988, -0.23259316384792328, -0.05668160691857338, -0.13896821439266205, 0.17419587075710297, -0.1227785274386406, -0.30760976672172546, -0.6339291334152222, -0.09082838892936707, 0.375310480594635, -0.2732219696044922, 0.291993677616...
main operation) any more - but that's reasonable, as you're not really "querying"; you're "updating".
[ -0.05500930920243263, -0.08415337651968002, 0.35694316029548645, 0.1582735776901245, 0.1762983500957489, -0.2710839509963989, 0.33697447180747986, -0.020809803158044815, -0.30070847272872925, -0.2937365472316742, -0.45764100551605225, 0.6660431623458862, -0.25357362627983093, -0.0895380154...
i created a web service, upload it to my site on a remote server. i tried to browse it but i cant, i also tried to add web reference to his adress through vs08 but the same problem happened there. It is not possible to modify the default screen of a device with J2ME. You need a native application (Symbian, Windows Mobi...
[ 0.2517910301685333, 0.2601388096809387, 0.2617780864238739, -0.12155245989561081, 0.057377591729164124, -0.11382655054330826, 0.6281788945198059, 0.11226232349872589, -0.09750820696353912, -0.8860238790512085, 0.03775465860962868, 0.2299465835094452, -0.3310864567756653, 0.4510397315025329...
an application to run at the start-up of the phone. It has been discussed that MIDP 3.0 may address many of the above issues, but I don't think it will ever be available.
[ 0.20032383501529694, -0.29935264587402344, 0.14241920411586761, 0.2955995798110962, 0.34499219059944153, -0.2221229076385498, 0.16842080652713776, 0.19074825942516327, 0.366845965385437, -0.6511355042457581, -0.23063358664512634, 0.6374791860580444, -0.10710093379020691, 0.0683381780982017...
**A few words about an ongoing design and implementation** I send a lot of requests to the remote application (running on a different host, of course), and the application send back data. **About client** Client is a UI that spawn a separate thread to submit and process the requests. Once it submits all the request...
[ 0.44891101121902466, -0.21542710065841675, 0.5485584735870361, 0.028206918388605118, 0.05970964953303337, 0.07956261932849884, -0.1244083121418953, -0.025372840464115143, -0.38430219888687134, -0.6494755744934082, 0.026047619059681892, 0.36447954177856445, -0.2653038203716278, 0.2456464469...
if (_socket.Poll(milliseconds, SelectMode.SelectRead)) { // read info of the buffer and calls registered callbacks for the client if(_socket.IsAvailable > 0) ProcessSocket(socket); } else
[ -0.1342547982931137, -0.31393226981163025, 0.6059632301330566, -0.19115754961967468, 0.2953617572784424, 0.31427475810050964, 0.14083948731422424, -0.4174599349498749, -0.038085415959358215, -0.6799692511558533, -0.32584238052368164, 0.6266102194786072, -0.1406770497560501, 0.2150867134332...
return; //returns after Poll has expired } } ``` The *Wait* is called from a separate thread, responsible for managing network connection: both inbound and outbound traffic: ``` _Receiver = new Thread(DoWork); _Receiver.IsBackground = true; _Receiver.Start(this); ``` This thread is...
[ 0.016993293538689613, -0.27510911226272583, 0.5720597505569458, -0.09630100429058075, -0.14550763368606567, -0.024645565077662468, 0.19125960767269135, -0.2230495661497116, -0.4085226356983185, -0.5495669841766357, -0.20228147506713867, 0.3778463900089264, -0.41219836473464966, 0.492731630...
until I client disconnected, and internally I called: ``` _socket.Shutdown(SocketShutdown.Both); ``` I think something funky is happening in the **Poll** Any suggestions on how to fix the issue or an alternative workaround? Thanks please let me know if anything is unclear A couple of things. First, in your examp...
[ 0.3318512737751007, -0.12198136746883392, -0.018003221601247787, 0.14943304657936096, -0.17118725180625916, -0.24826224148273468, 0.2697686553001404, 0.2532769441604614, -0.26181256771087646, -0.6960627436637878, 0.10490156710147858, 0.721669614315033, -0.2718302309513092, 0.15391767024993...
and writing a message to the Console/Output window, e.g., ``` if (_socket.IsAvailable > 0) { ProcessSocket(socket); } else { Console.WriteLine("Poll() returned true but there is no data"); } ``` This might give you an idea of what might be going on in the larger context of your program. Aside from...
[ 0.10900329053401947, -0.1818581521511078, 0.21765784919261932, -0.04972321167588234, -0.05541212484240532, 0.0928952544927597, 0.30096808075904846, -0.13624601066112518, -0.011300337500870228, -0.5989747047424316, -0.1709107756614685, 0.6443319320678711, -0.33250290155410767, -0.0132458768...
fact that you're already using a separate thread to send and receive your data. Here is an [example](http://msdn.microsoft.com/en-us/library/dxkwh6zw.aspx) from MSDN. Additionally, I've added the typical implementation that I use of this mechanism to [this SO post](https://stackoverflow.com/questions/582550/c-begin-end...
[ 0.30295324325561523, -0.055686138570308685, 0.5034456253051758, 0.22608411312103271, 0.3743419945240021, -0.199752077460289, -0.051164012402296066, 0.22688505053520203, -0.6846723556518555, -0.2276412397623062, -0.04466865956783295, 0.4972248673439026, -0.010657550767064095, 0.160385563969...
In Perl, `localtime` takes a Unix timestamp and gives back year/month/day/hour/min/sec etc. I'm looking for the opposite of `localtime`: I have the parts, and I'd like to build a unix timestamp from them. [POSIX::mktime](http://search.cpan.org/perldoc?POSIX#mktime)
[ -0.17246533930301666, -0.34792667627334595, 0.5869947075843811, -0.12016420811414719, 0.04291972145438194, 0.12004782259464264, -0.01241955067962408, 0.1354953944683075, -0.30570897459983826, -0.23945772647857666, -0.16407907009124756, 0.15718787908554077, -0.061309777200222015, 0.11629618...
**What's a common way of generating sentences from a grammar?** I want an algorithm that's sort of the opposite of a parser. That is, given a formal context-free grammar (say LL), I want to generate an arbitrary sentence that conforms to that grammar. I use *sentence* here to mean any valid body of text, so it can act...
[ 0.038602765649557114, 0.10924277454614639, 0.2394709289073944, 0.12058360129594803, -0.2507431209087372, 0.012756065465509892, 0.09036783874034882, -0.06622089445590973, -0.29391103982925415, -0.5973847508430481, -0.548586905002594, 0.3965851366519928, -0.45182591676712036, -0.151095837354...
*program*: ``` import jkhbhhuob import aaaaa888_ namespace u8nFGubgykb { class ui0op_np { ... } } ``` I don't know that there's a "common" algorithm for doing this. Random program generation is used in genetic programming so you could look for a grammar based GP system and see how they handle program generation. I w...
[ -0.12937413156032562, -0.012050200253725052, 0.01224902831017971, 0.015764180570840836, -0.0754697397351265, -0.06205679476261139, 0.1568191945552826, -0.20027686655521393, 0.00242487876676023, -0.2924356162548065, -0.17856775224208832, 0.2900247871875763, -0.3893447518348694, 0.2236816883...
handle the repetitions(randomly generate the number of times they occur) and optional rules (flip a coin to see if they are there or not). --- Edit: Oh, and if the rule has more than one option, you'd just pick one of the options to go with, and process it the same way. So if some rule was (Literal|Variable), you'd r...
[ 0.4589557945728302, -0.39601483941078186, -0.21222811937332153, 0.35693129897117615, -0.06884901225566864, -0.2434757649898529, -0.078476183116436, -0.2646116316318512, -0.38221031427383423, -0.06623484194278717, 0.05275609716773033, 0.6220738291740417, -0.2933712899684906, -0.070120446383...
I have a binary stream that has a very high error rate. The error rate is 50% meaning each bit has a 50% chance of being flipped. The error does not occur in bursts and is completely random, so Reed–Solomon codes wouldn't work well. Which scheme or algorithm should I apply to the stream? I don't care about the overhea...
[ 0.39849624037742615, 0.17744918167591095, -0.05400330573320389, 0.21655824780464172, 0.03166595846414566, 0.037493541836738586, 0.2613546848297119, -0.019541874527931213, 0.04061872139573097, -0.6955447793006897, -0.009962933138012886, 0.5824233293533325, -0.428055077791214, 0.399805456399...
coding theorem says you can actually achieve the Shannon capacity for the channel. It does **not** say the channel has nonzero capacity! If you **randomize** 100% of the bits in the channel, 50% of them will be unchanged, so you only flip a random 50% of the bits. It should be obvious that you can't send any data over...
[ 0.2002716213464737, -0.37877848744392395, -0.04078807309269905, 0.37558481097221375, -0.005260730627924204, -0.10706650465726852, 0.3413453698158264, -0.08925765007734299, -0.012319950386881828, -0.5222405195236206, -0.15368352830410004, 0.3602372407913208, -0.41291922330856323, 0.06980672...
Is there a standard way of laying out a C# file? As in, Fields, then Properties, then Constructors, etc? Here's what I normally do, but I'm wondering if there's a standard way? 1. Nested Classes or Enums 2. Fields 3. Properties 4. Events 5. Constructors 6. Public Methods 7. Private Methods Do people group their fie...
[ 0.39009004831314087, -0.015743233263492584, 0.006693810690194368, 0.09906383603811264, -0.35535672307014465, -0.19272688031196594, 0.03152799233794212, -0.49759313464164734, -0.40733376145362854, -0.3844512701034546, -0.1717103123664856, 0.6327004432678223, -0.21021001040935516, -0.2830539...
according to rule [SA1201](http://stylecop.soyuz5.com/SA1201.html): > **Cause** An element within a C# code > file is out of order in relation to > the other elements in the code. > > > **Rule Description** A violation of this > rule occurs when the code elements > within a file do not follow a standard > order...
[ 0.14505015313625336, 0.04931062087416649, 0.24722781777381897, -0.013112783432006836, 0.20772820711135864, -0.3543790876865387, 0.2786256968975067, -0.6114599108695984, -0.306867390871048, -0.2956896424293518, -0.49408718943595886, 0.007484395522624254, -0.5438780188560486, 0.2708122730255...
Structs > * Classes > > > Within a class, struct, or interface, > elements must be positioned in the > following order: > > > * Fields > * Constructors > * Finalizers (Destructors) > * Delegates > * Events > * Enums > * Interfaces > * Properties > * Indexers > * Methods > * Structs > * Classes > > > Complying w...
[ -0.1578255444765091, 0.20438574254512787, 0.28317221999168396, 0.2811031639575958, -0.4158986806869507, 0.18955302238464355, -0.07641559839248657, -0.47830501198768616, -0.15912170708179474, -0.8587203621864319, -0.23615920543670654, 0.06880176812410355, -0.4507603049278259, -0.13093839585...
another. This will sometimes require > violating this rule, if the interface > contains elements of different types. > This problem can be solved through the > use of partial classes. > > > 1. Add the partial attribute to the class, if the class is not already > partial. > 2. Add a second partial class with the ...
[ -0.006516796071082354, -0.37343400716781616, 0.12549474835395813, -0.014051329344511032, -0.20317992568016052, -0.04004184529185295, 0.009036686271429062, -0.42636987566947937, 0.17498065531253815, -0.9215635657310486, 0.07919654250144958, 0.45871981978416443, -0.5916178822517395, 0.131485...
of > the class.
[ 0.06811044365167618, 0.12501981854438782, 0.07345022261142731, 0.164784774184227, -0.2399485856294632, -0.06733498722314835, 0.34768202900886536, 0.24217218160629272, 0.003204765496775508, -0.46656349301338196, -0.07851116359233856, 0.41472312808036804, 0.2509036362171173, 0.02134419418871...
I'm working on my first Java site. I'm running Apache Tomcat on port 8080, and Apache HTTPD on port 80. The current URL that I can access the site at is (for example) 123.4.5.6:8080. I want to **remove** the port number from the URL before I point the domain at the new IP. At the moment I am only using Apache for phpm...
[ 0.3540986478328705, 0.3683951199054718, 0.49887365102767944, -0.224899023771286, -0.23404471576213837, -0.26207825541496277, 0.5629981756210327, 0.18392062187194824, -0.15251271426677704, -0.8061674237251282, 0.11107614636421204, 0.6585704684257507, -0.23822443187236786, 0.4383087754249573...
to do things is to leave Apache at 80 and Tomcat at 8080 and use a plug in (preferably mod\_proxy) to proxy Tomcat from Apache. mod\_proxy would only take you 10 minutes to set up. This [how-to](http://tomcat.apache.org/tomcat-4.1-doc/proxy-howto.html) is very simple to follow.
[ 0.058307625353336334, -0.19646023213863373, 0.3381415009498596, 0.15596233308315277, 0.15120680630207062, -0.3888740837574005, 0.40279799699783325, -0.3093540072441101, -0.16082914173603058, -0.5371653437614441, -0.18053992092609406, 0.41886618733406067, 0.019326139241456985, -0.2719362974...
[CancelEventArgs](http://msdn.microsoft.com/en-us/library/system.componentmodel.canceleventargs.aspx) provides a Property called Cancel that different event handlers can set to tell the object that invoked the event whether it should continue execution cancel the action. It seems that since events are multicast delega...
[ 0.2735680639743805, -0.44396474957466125, 0.11473610252141953, 0.27033984661102295, -0.049203068017959595, 0.023316578939557076, 0.1505376547574997, -0.35179126262664795, -0.32110440731048584, 0.024580765515565872, -0.14763422310352325, 0.5431268215179443, -0.43512260913848877, 0.046369068...
CancelEventArgs passed to each delegate? Are separate instances used? A little experiment quickly shows that they use 1 instance of Cancel (probably of the EventArgs object). That makes it a bit of a gamble, with the outcome depending on the order in which the Eventhandlers were attached. In the particular case of t...
[ 0.14201343059539795, -0.26445481181144714, 0.021146072074770927, 0.3624435067176819, -0.347083181142807, 0.0022530059795826674, 0.1765523999929428, -0.07030859589576721, -0.31241485476493835, -0.21362526714801788, 0.049692291766405106, 0.29000115394592285, -0.25222378969192505, 0.059103798...
Inside an MDI form is a client area that hosts the mdi child forms. How do I find out how big that area is? The best I can come up with so far is finding the total size of the parent's potential client area (mdiparent.ClientRectangle) and then subtracting off the sizes of components like toolbars, etc that take away fr...
[ 0.38871708512306213, -0.025927221402525902, 0.4271716773509979, 0.23919987678527832, 0.29465630650520325, -0.023210493847727776, 0.0046573118306696415, -0.11721345782279968, -0.1110476478934288, -0.6899873614311218, -0.10926041752099991, 0.15216423571109772, -0.2159772515296936, 0.35991623...
{ if (ctl is MdiClient) return ctl as MdiClient; } return null; } ``` From there, just use its Size property.
[ -0.06670200079679489, -0.1960141956806183, 0.1940191388130188, -0.34669220447540283, 0.040021780878305435, -0.2979212999343872, -0.10260751098394394, -0.033073652535676956, -0.17998254299163818, -0.5621657967567444, -0.48939141631126404, 0.5564962029457092, -0.23541629314422607, 0.28326919...
I am using an interface called Predicate which is used for sifting through Collections. For example, I can define ``` public class BlackCatPredicate implements Predicate<Cat> { public boolean evaluate( Cat c ) { return c.isBlack(); } } ``` and then use some utility `findAll( Collection<T> coll, Predicate<...
[ 0.1669265627861023, -0.03097025491297245, -0.03945004194974899, -0.23799173533916473, 0.0809498280286789, 0.08721282333135605, 0.15158529579639435, -0.2605438232421875, -0.3373768627643585, -0.7446233034133911, -0.20884163677692413, 0.4272893965244293, -0.6147732138633728, 0.15564955770969...
singleton?) But then, over the course of writing many predicates, I don't want to have to implement each one as a singleton. So -- what is the proper design here? I'd use an anonymous class constant and put it with the class it operates on: ``` public class Cat{ public static final Predicate<Cat> BLACK_PREDICATE =...
[ 0.08361930400133133, 0.06604521721601486, 0.027150845155119896, -0.24130284786224365, 0.12641631066799164, 0.049671292304992676, 0.19582992792129517, -0.25234225392341614, -0.06055087596178055, -0.37095707654953003, -0.27805161476135254, 0.7210333943367004, -0.5648109316825867, 0.359143257...
} }; // Rest of the Cat class goes here } ``` If the predicate has parameters, you can use a static factory method. **Edit:** As was pointed out in the comments, depending on the usage patterns, it may result in clearer code to collect the predicate constants (and/or factory methods) in a separate class...
[ 0.1886337846517563, -0.180857852101326, 0.028673328459262848, -0.040622543543577194, -0.06743105500936508, 0.1218750849366188, 0.1204129233956337, -0.07081242650747299, -0.20534516870975494, -0.47852766513824463, -0.19359347224235535, 0.6316009163856506, -0.45111918449401855, 0.11021135747...
I know how to do this, but i think I'll overcomplicate it with double selects and so on. How can you do this (example in pseudo-sql) ``` UPDATE some_table SET an_int_value = (an_int_value==1 ? 0 : 1); ``` It must be an int value due to some other functionality, but how do you do it in a simple way? ``` UPDATE some_...
[ 0.250670462846756, 0.05795418098568916, 0.4125518798828125, 0.06476578861474991, 0.1580611616373062, -0.47291994094848633, 0.329067200422287, -0.4501296281814575, -0.07996595650911331, -0.5274297595024109, 0.08663000166416168, 0.560116708278656, -0.3527012765407562, -0.07457224279642105, ...
I am looking to get on with contributors on an ASP.NET MVC Project. I am professionally developing for a large firm and don't get enough of it here. I also teach Java Object Oriented practices at a University, and still don't feel that I get enough of the engineering with this. Simply put, I am looking to get onto a pr...
[ 0.6887593865394592, 0.3795127272605896, -0.2609202265739441, -0.04019997641444206, 0.005439565517008305, -0.25454601645469666, 0.4313403367996216, 0.5308287739753723, -0.36008960008621216, -0.5402767658233643, 0.13113752007484436, 0.34084492921829224, 0.09796131402254105, 0.240052968263626...
of work? My wannabe expertises... JQuery, ASP.NET MVC, CSharp, AJAX, Javascript, Memberships, and the list continues on. Previous work is mostly private (intranet), so all I have is a couple sites I have put together. http://jancel.doesntexist.com (is one that I am currently working on, won't be here forever, just wai...
[ 0.8534114360809326, 0.18279246985912323, 0.10674268752336502, -0.06554148346185684, -0.022275423631072044, -0.171037957072258, 0.1006615087389946, 0.18482425808906555, -0.3919258415699005, -0.45970696210861206, 0.22133633494377136, 0.376103937625885, 0.0823560431599617, 0.03879231959581375...
check time by time for a new available one to download.
[ 0.4153462052345276, 0.06841578334569931, 0.132279172539711, 0.4117530286312103, 0.5167532563209534, -0.3288082778453827, 0.14987589418888092, 0.2887061834335327, -0.22456294298171997, -0.7177581191062927, -0.2148757129907608, 0.2026173323392868, 0.07512285560369492, 0.040453508496284485, ...
I've been bashing my face into this one for literally days now and even though I feel constantly that I am right on the edge of revelation, I simply cannot achieve my goal. I thought, ahead of time in the conceptual phases of my design, that it would be a trivial matter to grab a image from the iPhone's camera or libr...
[ 0.21644815802574158, 0.179969921708107, 0.36877429485321045, 0.11168789118528366, 0.14727887511253357, 0.3502161502838135, 0.2308637499809265, -0.05019722506403923, -0.031153526157140732, -0.41731083393096924, 0.29549816250801086, 0.5309187769889832, 0.18963587284088135, 0.0544805265963077...
or library, was trivial. I am shocked at how difficult the other two steps have proved to be. The attached image shows what I am trying to achieve. Would someone please be kind enough to hold my hand? Every code example I have found so far seems to smash the image, be upside down, look like crap, draw out of bounds, o...
[ 0.1965155154466629, -0.1663573831319809, 0.3673650920391083, 0.4971722662448883, -0.1013137549161911, 0.09654318541288376, -0.041264764964580536, 0.03476710617542267, -0.3252122402191162, -0.6422786712646484, -0.0827365294098854, 0.11822003871202469, 0.2538505792617798, 0.11930875480175018...
not have noticed any deficiencies in portrait mode.) Here's my code - it's part of a categeory on UIImage. Target size in my code is always set to the full screen size of the device. ``` @implementation UIImage (Extras) #pragma mark - #pragma mark Scale and crop image - (UIImage*)imageByScalingAndCroppingForSize:(CG...
[ 0.19101886451244354, -0.08289183676242828, 0.9410226941108704, -0.3012593984603882, -0.11953237652778625, 0.16094759106636047, 0.1298973262310028, -0.4541645646095276, -0.28109240531921387, -0.9149563312530518, 0.11511942744255066, 0.5848366618156433, 0.017714327201247215, -0.1213131397962...
CGFloat scaleFactor = 0.0; CGFloat scaledWidth = targetWidth; CGFloat scaledHeight = targetHeight; CGPoint thumbnailPoint = CGPointMake(0.0,0.0); if (CGSizeEqualToSize(imageSize, targetSize) == NO) { CGFloat widthFactor = targetWidth / width; CGFloat heightFactor = targetHeight / h...
[ -0.0008841220405884087, -0.19424378871917725, 1.1972490549087524, -0.45109501481056213, -0.02401220053434372, 0.15373602509498596, 0.07105474919080734, -0.4079240560531616, -0.2951398491859436, -0.39913859963417053, 0.09966646134853363, 0.632199764251709, 0.044458091259002686, -0.101166263...
scale to fit height } else { scaleFactor = heightFactor; // scale to fit width } scaledWidth = width * scaleFactor; scaledHeight = height * scaleFactor; // center the image if (widthFactor
[ -0.15703259408473969, -0.28252798318862915, 1.1179940700531006, -0.12475323677062988, -0.18558846414089203, 0.17256660759449005, 0.06591877341270447, -0.45851388573646545, -0.08062521368265152, -0.7674821019172668, -0.07864482700824738, 0.6861302256584167, 0.05292048677802086, 0.1356063336...
> heightFactor) { thumbnailPoint.y = (targetHeight - scaledHeight) * 0.5; } else { if (widthFactor < heightFactor) { thumbnailPoint.x = (targetWidth - scaledWidth)
[ -0.08603283762931824, -0.16089887917041779, 1.0555592775344849, -0.30732041597366333, 0.034210454672575, 0.1419009119272232, 0.18224555253982544, -0.3245715796947479, 0.17404034733772278, -0.504858136177063, 0.04972672089934349, 0.7202277183532715, 0.21025802195072174, -0.09741374105215073...
* 0.5; } } } UIGraphicsBeginImageContext(targetSize); // this will crop CGRect thumbnailRect = CGRectZero; thumbnailRect.origin = thumbnailPoint; thumbnailRect.size.width = scaledWidth; thumbnailRect.size.height = scaledHeight; [sourceImage drawInRect:thumbnailRect...
[ -0.2579553425312042, -0.34378084540367126, 0.7476804256439209, -0.2504938542842865, 0.048086270689964294, 0.2506696879863739, 0.3517192304134369, -0.3398103415966034, -0.3124178647994995, -0.7409553527832031, -0.12287437170743942, 0.509955108165741, -0.022044720128178596, 0.167415693402290...
//pop the context to get back to the default UIGraphicsEndImageContext(); return newImage; } ```
[ -0.0033146298956125975, -0.21987512707710266, 0.5043970346450806, -0.06058059632778168, 0.31640028953552246, -0.13758881390094757, 0.5081617832183838, 0.12690772116184235, -0.13361604511737823, -0.6022428274154663, -0.5538397431373596, 0.6200583577156067, -0.32277724146842957, 0.2021969854...
I'm adding a new method to the String class in Ruby, How can I get the value of the class? e.g.: ``` class String def myMethodName(arguments) # here I want the string value end end puts "Lennie".myMethodName() # this should return "Lennie" or whatever the value of the string is. ``` Thanks You should be able ...
[ 0.22959716618061066, 0.12890557944774628, 0.31887364387512207, -0.10059496760368347, -0.09913963824510574, 0.21784323453903198, 0.45415952801704407, -0.0859590694308281, 0.035576511174440384, -0.43643030524253845, 0.033695925027132034, 0.6204953193664551, -0.3269728124141693, 0.30178043246...
I encountered what may be a leap year in .NET's `DateTime` handling, specifically `ToLocalTime()`. Here's some code which reproduces the problem (I'm in the Pacific time zone): ``` DateTime dtStartLocal = DateTime.Parse("2009-02-28T23:00:00.0-08:00"); DateTime dtEndLocal = dtStartLocal.AddYears(3); DateTime dtStartUtc...
[ -0.04994771257042885, -0.21395885944366455, 0.9282557964324951, -0.11850140988826752, 0.19418387115001678, -0.10134502500295639, 0.5961337089538574, 0.021344289183616638, -0.01469317264854908, -0.42680826783180237, 0.20466911792755127, 0.5726471543312073, 0.120935820043087, 0.0793287605047...