text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
00 6d 00 70 00 6c 00 65 UTF-16LE: FF FE 45 00 78 00 61 00 6d 00 70 00 6c 00 65 00 ``` For further information, please read the Wikipedia page of [Endianness](http://en.wikipedia.org/wiki/Endianness) and/or [UTF-16](http://en.wikipedia.org/wiki/UTF-16/UCS-2).
[ 0.016595689579844475, 0.2487349510192871, 0.6472489237785339, -0.19845809042453766, -0.15714263916015625, 0.25448378920555115, 0.21719928085803986, -0.21727681159973145, -0.22646145522594452, -0.4817354381084442, -0.7167662978172302, 0.5733106732368469, -0.021088717505335808, 0.00839907303...
I'm decoding some JSON (from the Youtube data API) with json\_decode and it gives me an object that looks like this when var\_dump()ed: ``` object(stdClass)[29] public 'type' => string 'text' (length=4) public '$t' => string 'Miley and Mandy! KCA VIDEO WINNERS' (length=34) ``` How can I access the $t member? Try...
[ 0.6154293417930603, -0.15857824683189392, 0.8149985074996948, 0.16903828084468842, 0.1081608459353447, -0.14520759880542755, 0.3902607858181, -0.1630951315164566, -0.23983147740364075, -0.2658306360244751, -0.04267440736293793, 0.454030305147171, -0.3157315254211426, 0.32906487584114075, ...
I want to understand how the dynamic proxy stub implementation is actually done behind the scene. According to what I read, by the time a remote object is exported if no pre-generated stub class is found, the RMI runtime would generate a dynamic proxy to act as the stub. That stub is then bound to the RMI Registry and ...
[ 0.38129740953445435, 0.005607177037745714, 0.1402924358844757, 0.028337644413113594, -0.071720190346241, -0.14580723643302917, -0.004352657124400139, -0.027027389034628868, -0.071250781416893, -0.3747275471687317, -0.15337903797626495, 0.5429473519325256, -0.2237691879272461, 0.31378775835...
from the RMI Registry? Is there some kind of dynamic class-loading happening behind the scene or does RMI use another technique to work-around this? Java.lang.reflect.Proxy is serializable and it has special support in ObjectOutputStream and ObjectInputStream. Basically just the interfaces implemented and the invocatio...
[ 0.20502439141273499, -0.1662910282611847, 0.1472763568162918, 0.0783408135175705, -0.26568475365638733, -0.1520460695028305, 0.1654907613992691, -0.1415586769580841, -0.1432802826166153, -0.5374972224235535, 0.11444609612226486, 0.27965524792671204, -0.35745304822921753, 0.1380483955144882...
Somewhat stuck trying to find a newer/better SCC system for my employer. My personal darling is SVN as it's compatible across a good swath of machines and relatively fast, but with past/present experience, it's not as friendly/easy to do branching. The needs assessment is as follows: 1. Must be easy to use (CVS is co...
[ 0.25575336813926697, -0.3200087249279022, 0.6051608920097351, 0.357200026512146, 0.15555554628372192, -0.22951211035251617, 0.14061623811721802, 0.30671244859695435, -0.42108064889907837, -0.4219037890434265, -0.10543157905340195, 0.2943638861179352, 0.19456957280635834, 0.2515737414360046...
Vista and it's been a nightmare getting any developer tool to function with some sense of stability on that OS. I'm also looking at Mercurial but not sure yet if it's going to work right for how the company operates. SVN is much easier with branching now that mergeinfo properties have been implemented (since v1.5). Yo...
[ 0.14278358221054077, -0.17767474055290222, 0.4461929202079773, 0.035826388746500015, -0.12471167743206024, -0.2754434049129486, 0.22014640271663666, 0.27592483162879944, -0.062453094869852066, -0.7000555396080017, 0.16178278625011444, 0.8966052532196045, -0.12961015105247498, 0.28552970290...
files around with notes on which trunk revisions you've merged into your branch. You just say "merge trunk". Then, you can "reintegrate" a branch automatically Although it's worth noticing that you need to upgrade your svn server to 1.5 for this to work, the clients are backwards compatible with older servers, but you...
[ 0.09788664430379868, -0.46841832995414734, 0.6811875104904175, 0.20375791192054749, -0.09452830255031586, 0.03929352015256882, 0.1438312828540802, 0.10976190865039825, -0.802671492099762, -0.34346991777420044, -0.359056681394577, 0.7539167404174805, 0.0066267079673707485, 0.001916529261507...
I have an array of arrays - information about selection in Excel using VSTO, where each element means start and end selection position. For example, ``` int[][] selection = { new int[] { 1 }, // column A new int[] { 6 }, // column F new int[] { 6 }, // column F new int[] { 8, 9 } // columns H:I new int[] { 8, 9 } //...
[ 0.05013692006468773, 0.1901639699935913, 0.2980971336364746, -0.05434736981987953, -0.007207050919532776, 0.2897580862045288, -0.1230437308549881, -0.5416011214256287, -0.1748323291540146, -0.7133069038391113, 0.17639853060245514, 0.42367711663246155, -0.2030973732471466, -0.03581345081329...
you want to use a pure LINQ/extension method solution, then you'll need to define your own implementation of `IEqualityComparer` for arrays/sequences. (Unless I'm missing something obvious, there's no pre-existing array or sequence comparer in the BCL). This isn't terribly hard however - here's an example of one that s...
[ -0.06516100466251373, -0.0926898941397667, 0.2643345594406128, -0.13807860016822815, -0.18647928535938263, 0.04795758053660393, -0.04726273566484451, -0.1125098317861557, 0.05366326868534088, -0.5318593382835388, 0.14559443295001984, 0.455115407705307, -0.44233012199401855, 0.1194431185722...
it should do the job in most cases. public int GetHashCode(IEnumerable<T> obj) { int hash = 0; int i = 0; foreach (var element in obj) hash = unchecked((hash * 37 + hash) + (element.GetHashCode() << (i++ % 16))); return hash; } } ``` The advantage of this is tha...
[ -0.14526596665382385, -0.06050999462604523, 0.4136975109577179, -0.2520717680454254, 0.04759235680103302, -0.2151658833026886, 0.44312819838523865, -0.2645389437675476, -0.08466748148202896, -0.43395423889160156, -0.3951321244239807, 0.3577491343021393, -0.40301769971847534, 0.050870437175...
the following to remove any duplicate arrays. ``` var result = selection.Distinct(new SequenceEqualityComparer<int>()).ToArray(); ``` Hope that helps.
[ 0.03434829041361809, -0.08329825848340988, 0.17285503447055817, -0.16734391450881958, 0.1878730207681656, 0.08643323928117752, 0.27547940611839294, -0.33728793263435364, -0.12377573549747467, -0.6299173831939697, 0.01194794662296772, 0.5013378262519836, -0.23771467804908752, 0.355893015861...
What is the best algorithm to use for scheduling an application that will support 10K concurrent threads with heavy I/O but low CPU usage? Links to papers are appreciated. Why wouldn't you use SCHED\_RR? You said it yourself: **low CPU usage**. You could even nice the process when you expect to do some heavy I/O so you...
[ 0.11423412710428238, -0.27168744802474976, 0.029937870800495148, 0.3561747968196869, 0.13808199763298035, -0.03416233882308006, -0.05577759072184563, -0.06954386085271835, -0.5238269567489624, -0.6437978744506836, 0.07874072343111038, 0.5221499800682068, -0.3601994216442108, -0.10518357902...
select another task to run. You don't need to worry about those details.
[ 0.46432146430015564, -0.20443709194660187, -0.2575984001159668, 0.23875561356544495, 0.005935372319072485, 0.10573460161685944, 0.033198025077581406, 0.33290383219718933, -0.1792725771665573, -0.7473359704017639, 0.053122732788324356, 0.3948875367641449, 0.11501529067754745, -0.22561691701...
I have a CDATA tag within my XML code which contains some hyperlinks. ``` <smartText><![CDATA[ Among individual stocks, the top percentage gainers in the S.&P. 500 are <a href ='http://investing.domain.com/research/stocks/snapshot /snapshot.asp?ric=LNC'>Lincoln National Corp</a> and <a href ='http://investing.domain...
[ 0.4074363708496094, 0.0057445308193564415, 0.17796878516674042, 0.029176956042647362, 0.010154793970286846, -0.09350434690713882, -0.4179801046848297, -0.1050209105014801, -0.05437137186527252, -0.613746166229248, 0.01931622251868248, 0.7317938804626465, -0.29894503951072693, -0.0138088641...
not as html. ``` Among individual stocks, the top percentage gainers in the S.&P. 500 are <a href ='http://investing.businessweek.com/research/stocks/snapshot/snapshot.asp?ric=PLD'>ProLogis</a> and <a href ='http://investing.businessweek.com/research/stocks/snapshot/snapshot.asp?ric=LNC'>Lincoln National Corp</a>. ``...
[ 0.5337396264076233, 0.14106671512126923, 0.18618416786193848, 0.13438527286052704, 0.028464678674936295, -0.09381117671728134, -0.4886535406112671, -0.07251356542110443, -0.3120900094509125, -0.261262446641922, -0.1792064905166626, 0.7448656558990479, -0.21893008053302765, -0.0650811940431...
contained within a CDATA section**. Any CDATA section is just part of a text() node and the XSLT processor treats it as such. Putting markup within CDATA is universally acknowledged as bad practice and the reported issue is one typical result. DOE (disable-output-escaping) is an optional feature in XSLT and is not g...
[ 0.1835126429796219, -0.17773379385471344, 0.1315310150384903, -0.12982508540153503, 0.06910237669944763, -0.1546030193567276, 0.2506379187107086, -0.2945907413959503, -0.1751110553741455, -0.36581891775131226, -0.530167281627655, 0.18777789175510406, -0.7132328152656555, 0.0415116138756275...
processor may signal an error; if it does not signal an error, it must recover by not disabling output escaping. "` and: `"Since disabling output escaping may not work with all XSLT processors and can result in XML that is not well-formed, it should be used only when there is no alternative."`
[ -0.35184773802757263, -0.061258696019649506, 0.0649731308221817, 0.09994567185640335, -0.0029542255215346813, -0.023924414068460464, 0.3375623822212219, -0.16932831704616547, -0.0977671816945076, -0.5755647420883179, -0.5928668975830078, 0.38846075534820557, -0.447376549243927, -0.16178838...
I've got a wpf listbox that is bound to a datatable. At some times, I want to programmaticly change the selection of the listbox. I know the text of the item I want to select. But it doesn't work to set the listbox1.SelectedItem to the text I want because the type of the SelectedItem is System.Data.DataRowView. If I h...
[ 0.309308797121048, -0.34412848949432373, 0.5162469744682312, 0.11926806718111038, -0.11983402073383331, 0.045135919004678726, -0.28486624360084534, -0.46171146631240845, -0.21041205525398254, -0.7878507971763611, 0.10205410420894623, 0.3201734721660614, -0.23756635189056396, 0.212330147624...
What does the slash mean here: ``` font: 100%/120%; ``` This actually sets two properties and is equivalent to: ``` font-size: 100%; line-height: 120%; ``` To quote the [official documentation](http://www.w3.org/TR/css3-fonts/#propdef-font): > The syntax of this property is based on a traditional typographical sh...
[ 0.2902555763721466, 0.08697018027305603, 0.5212865471839905, -0.14801861345767975, -0.16433095932006836, 0.304536908864975, 0.0881841853260994, -0.2410329431295395, -0.11115886270999908, -0.7389508485794067, -0.20350776612758636, 0.17991070449352264, -0.026621298864483833, -0.0049989148974...
least both the font size and family. Simply writing `font: 100%/120%;` is therefore not enough; you could add a generic family name to make it valid though, e.g.: ``` font: 100%/120% serif; ```
[ 0.16329488158226013, 0.5474721193313599, 0.3851148188114166, 0.04463421553373337, -0.06420938670635223, 0.051738444715738297, 0.4457981586456299, -0.20489954948425293, 0.07533326745033264, -0.7642425298690796, -0.4590899646282196, 0.3405759632587433, 0.07391668111085892, -0.039830885827541...
Okay, so I've learned WPF and WCF and that was great. I didn't bother with CardSpace because it's probably not gonna take off. Should i bother with Workflow,..is it worth it? What's the big deal? It is worth learning or at least understanding WF. WF offers a different paradigm for building apps, a paradigm which *may...
[ 0.47661301493644714, 0.09826663136482239, 0.25946372747421265, 0.16352175176143646, -0.025094039738178253, -0.13802559673786163, 0.13531558215618134, 0.30396613478660583, -0.6059262156486511, -0.8322722911834717, -0.20738078653812408, 0.44571202993392944, -0.27086716890335083, -0.101485721...
new thing broadens your thinking. For example, even if you use C# or Java in your day-to-day job, knowing Lisp helps broaden your thinking about how to solve problems. IMO. WF is the same. A second thought is to think like an investor. If you want to raise the value of YOU as a programmer, whether to learn WF would d...
[ 0.5190439224243164, -0.20880572497844696, 0.16516445577144623, 0.055777836591005325, 0.1547607183456421, -0.3384259045124054, -0.02581861801445484, 0.0977969691157341, -0.5224738717079163, -0.9582847952842712, 0.0228491872549057, 0.760827362537384, 0.23284505307674408, -0.01918557099997997...
I have a situation utilizing class table inheritance where the base object (which is abstract) is extended by specific types of the object. For example, Person --> User --> Prospect However, in some instances like with Prospect, sometimes it extends User and sometimes it doesn't. I can't reverse the relationship beca...
[ 0.02175820618867874, -0.10011333972215652, -0.3531254827976227, 0.13012272119522095, 0.10349119454622269, -0.07496555894613266, 0.1637437641620636, -0.1274307668209076, -0.11474712938070297, -0.5239361524581909, -0.006004967726767063, 0.37561771273612976, -0.06421314924955368, 0.4961539506...
properties are populated so that all properties are accessed in the exact same manner. Inheritance in a database usually means the primary\_key of the child table is a foreign\_key to the parent table's primary\_key. But you mention the child could be an orphan. In this case the parent is an optional relation. (Usua...
[ -0.15008878707885742, -0.10306692868471146, -0.13919813930988312, 0.5249029994010925, 0.30947503447532654, -0.1547321081161499, 0.05493386462330818, -0.1032167300581932, -0.0829014927148819, -0.7923967242240906, -0.2725547254085541, 0.33007845282554626, -0.05411494895815849, 0.651510357856...
I'm choosing a Bug/Issue Tracking system for use on our project. [This question](https://stackoverflow.com/questions/12328/what-bug-tracking-software-do-you-use) and [this question](https://stackoverflow.com/questions/101774/what-is-your-bug-task-tracking-tool) are helpful in giving systems to evaluate. However, I have...
[ 0.4222710132598877, 0.007796142715960741, -0.08368737995624542, 0.3593316674232483, 0.3575364053249359, -0.04053174704313278, -0.006335861515253782, -0.1506395936012268, -0.2695523500442505, -0.7070746421813965, 0.16103310883045197, 0.6383273005485535, -0.16403138637542725, -0.207033798098...
save me time or make our product better? [Jira](http://www.atlassian.com/software/jira/) together with [FishEye](http://www.atlassian.com/software/fisheye/default2.jsp) (a SCM browser) can, when if you commit a changeset with a log messages containing a Jira issue key, such as "PROJ-123", insert a link into the corresp...
[ 0.575136125087738, -0.01769760064780712, 0.16666018962860107, 0.018003448843955994, 0.25839701294898987, 0.41097915172576904, 0.031807634979486465, -0.011784816160798073, 0.09982303529977798, -0.5796368718147278, 0.04585253447294235, 0.38616514205932617, -0.07783498615026474, -0.0564273558...
track of issues with the source code, there are a boatload of features one might imagine in an integrate issue/source-control management system.
[ 0.11960525065660477, 0.17319263517856598, 0.061336781829595566, 0.3817179203033447, 0.32750850915908813, -0.0978894755244255, 0.030352143570780754, -0.06751227378845215, -0.27386853098869324, -0.37509244680404663, 0.01319038774818182, 0.8403627276420593, -0.0993955209851265, -0.25843906402...
How many pixels is the available area for an image view in iPhone? If you need to, you can have access to the full 480x320 screen with something like this: ``` [[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO]; self.navigationController.view.bounds = CGRectMake(0,0,320,480); self.navigationControl...
[ 0.13315218687057495, -0.228911355137825, 0.4205660820007324, 0.17080262303352356, 0.05859461426734924, 0.5679080486297607, 0.18771815299987793, -0.43682393431663513, -0.25727367401123047, -0.6575462818145752, -0.12617076933383942, 0.6081653833389282, -0.042657140642404556, -0.5157319903373...
I want to make an app that can take a snapshot with the cam for a user photo, if the user has an iPhone. If he has an iPod touch, he may choose an standard avatar, but the app should still work on iPod touch. Is that possible? Or would apple not allow to differenciate programmatically between "yes, he has an iPhone" a...
[ 0.6399556994438171, 0.041409771889448166, 0.5990845561027527, 0.2853638231754303, 0.44437330961227417, -0.012378089129924774, -0.18058589100837708, -0.09166478365659714, -0.19169020652770996, -0.25984135270118713, 0.15637946128845215, 0.6338921189308167, -0.01903720386326313, -0.1759513020...
isSourceTypeAvailable in UIImagePickerController - e.g. `[UIImagePicker isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]` Most apps bring up an alert sheet with buttons for the available options (and cancel) and let the user choose. On an iPod Touch the "Camera" button just won't be there (unless Apple b...
[ -0.31917035579681396, 0.1762065887451172, 0.4314136505126953, 0.05017154663801193, 0.3211476504802704, -0.1444079577922821, 0.268756240606308, 0.07087540626525879, -0.07178594917058945, -0.4909147024154663, -0.24610581994056702, 0.6359655261039734, -0.3628992736339569, -0.22415108978748322...
Today I run Cygwin with `rxvt` using the following startup line: ```` rxvt -bg black -sl 8192 -fg white -sr -g 150x56 -fn "Fixedsys" -e /usr/bin/bash --login -i ```` This gives me a resizeable native Windows window which is much better than the standard "DOS box" the default `cygwin.bat` provides. However, the cur...
[ -0.08822381496429443, 0.43633168935775757, 0.29676342010498047, -0.2719201147556305, 0.1506146341562271, -0.05724111944437027, 0.44572514295578003, 0.2289859652519226, 0.23543573915958405, -0.9285872578620911, -0.15144062042236328, 0.8045722246170044, -0.14954407513141632, 0.20594359934329...
like "bølle" (Norwegian for "bulley"), all I get is "blle". 2. I am not able to render UTF-8 character, they only show as ?, even if they are supported by the font (i.e. when rendering the same characters in ISO-8859-1 they show just fine.). I am running English Windows Vista with locale and keyboard layout set to Nor...
[ 0.3117043375968933, 0.4630417823791504, 0.5143969058990479, -0.48119640350341797, -0.3721529543399811, 0.027734611183404922, 0.5520914196968079, 0.15370234847068787, -0.4156195819377899, -0.5155609250068665, -0.1624877154827118, 0.6651691198348999, -0.16715171933174133, 0.00541876628994941...
resolve them I'd like to continue using it. However, if the issues are not (easily) solvable, are the any other good terminal solutions for Cygwin? **Update** The solution provided by Andy and Mattias (editing the `.inputrc` file) did solve the input problem, but output rendering is still an issue. Output is fine whe...
[ -0.2757449448108673, 0.11136026680469513, 0.4339965581893921, -0.11694274842739105, 0.023646747693419456, 0.29808032512664795, 0.3366696536540985, -0.02072324976325035, -0.08125574141740799, -0.9601151347160339, -0.13926173746585846, 0.622455894947052, -0.03353374823927879, -0.174658671021...
on a Linux system)? Add the following two lines to the readline config file ~/.inputrc ``` set convert-meta off set output-meta on ``` Should work both in rxvt and mintty. More here: <http://www.gnu.org/software/bash/manual/bashref.html#Readline-Init-File-Syntax>
[ 0.2447756677865982, -0.10281628370285034, 0.44847771525382996, -0.11906745284795761, -0.16922329366207123, 0.22981557250022888, 0.21853739023208618, -0.3810756504535675, -0.055257342755794525, -0.4501771628856659, -0.20568951964378357, 0.6912762522697449, -0.4093214273452759, -0.1686538308...
I can't find it. Actually I look for the part where I could try this: ``` [[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO]; self.navigationController.view.bounds = CGRectMake(0,0,320,480); self.navigationController.navigationBar.hidden = YES; ``` The starting point would be your App delegate, th...
[ 0.02306773141026497, -0.008947007358074188, 0.4369300603866577, 0.16410110890865326, 0.2296454757452011, 0.09629496186971664, 0.351826936006546, -0.11088620871305466, -0.14173267781734467, -0.7977323532104492, -0.25827839970588684, 0.4768940508365631, -0.37530314922332764, 0.23767775297164...
I'm using MVVM pattern and I have string type property in my ModelView. The string may contain following HTML tags: ``` <b>, </b>, <i>, </i> ``` I need to make certain parts of text in TextBlock to be in normal, bold or italic. At moment I have created workaround, a helper method that works like this: 1. Breaks...
[ 0.31890398263931274, 0.17854748666286469, 0.49695470929145813, -0.1341843605041504, -0.2927202880382538, -0.029003633186221123, 0.4822162985801697, -0.3250986933708191, -0.06387204676866531, -0.6551182270050049, 0.14945584535598755, 0.5197510123252869, -0.502306342124939, 0.048712134361267...
of TextBlock should I do binding to. What do You think, how can this problem be solved? The easiest solution that I've found for this problem. Is to use BindableRichTextBox, that can be found at <http://www.shawnduggan.com/?p=54> 1. Using Convertors convert HTML string to XAML and then make it into FlowDocument obje...
[ 0.45315393805503845, 0.07787004113197327, 0.5764479637145996, 0.045580729842185974, -0.38037803769111633, -0.35564014315605164, 0.3437999486923218, -0.24726630747318268, 0.023313265293836594, -0.6398040652275085, 0.05306234583258629, 0.5869945287704468, -0.4658053517341614, 0.0578140914440...
My site has a lot of dynamic stats with names of people, places and topics that all have their own associated pages. I want to automatically link each of these to their page based on data I've set up in a MySQL database of 'words' and 'links'. What would be an efficient way of automatically linking 20-50 occurrences o...
[ 0.4215315878391266, 0.3071942627429962, 0.34539541602134705, 0.16975902020931244, -0.14026568830013275, -0.0886319950222969, 0.3254621624946594, 0.10433550924062729, -0.34349003434181213, -0.5641919374465942, 0.04967650771141052, 0.22561538219451904, -0.09180212765932083, 0.197566047310829...
data your site has on it, but I'm going to assume it's something like a wiki, or a blog. I'm going to talk about this sort of functionality as it would be done for a wiki, but a similar approach would work for anything. With a wiki, you only want to be doing the link-searching when a page is changed (or submitted in t...
[ 0.5170911550521851, -0.10549711436033249, 0.57025545835495, 0.40793493390083313, 0.08543823659420013, -0.5320922136306763, -0.040639568120241165, -0.006684157066047192, -0.37113967537879944, -0.7271782159805298, 0.07767526805400848, 0.46037206053733826, -0.06612469255924225, 0.179957777261...
it. Second, whenever any page is created, renamed, or deleted, you need to (in addition to the search of this page in the case of creation) search all other pages to add/update/remove links as needed. There are a few options for how to store these links. One option is to keep two "versions" of every page's text in the...
[ 0.19580866396427155, -0.27031317353248596, 0.3814707398414612, 0.32051026821136475, -0.015145422890782356, -0.10143210738897324, -0.016316963359713554, 0.338261216878891, -0.17727965116500854, -0.7170719504356384, -0.284606397151947, 0.28273341059684753, -0.2969459891319275, 0.234348639845...
display the page to normal viewers. For example, if your wiki markup for bold is `**`, the "markup version" has `**bold text**`, and the "display version" has `<strong>bold text</strong>`. This makes it so that you don't have to process your markup on every page view. This approach is applied to page-links by doing a...
[ 0.2148100584745407, -0.10212084650993347, 0.6322792768478394, -0.047594912350177765, -0.5629152059555054, -0.08775744587182999, 0.24011312425136566, -0.01913698948919773, -0.1516202837228775, -0.9835413694381714, -0.1348564475774765, 0.2395741492509842, -0.16612181067466736, 0.072718441486...
you have this list cached, you don't want to be doing a database query for every word). This can be made fairly efficient by storing the potential linkwords as keys into a hash. If the word being tested is in the "link word" list, you put a link to the relevant page around the word when you copy it into the "display ve...
[ 0.40712684392929077, -0.006325655151158571, 0.24053041636943817, 0.2356966733932495, -0.0239370446652174, -0.2500530779361725, 0.446549654006958, 0.05610404536128044, 0.08469788730144501, -0.8327654600143433, 0.1085132285952568, 0.4569641053676605, -0.07243584096431732, 0.09654156863689423...
with that for now, but if you'd like to me to describe any of the other options, let me know in a comment and I'll edit it in.
[ 0.495147705078125, 0.15037351846694946, 0.15414349734783173, 0.2302355319261551, 0.05669446289539337, -0.40085527300834656, -0.19287076592445374, 0.48214441537857056, 0.15953969955444336, -0.4858957827091217, 0.17887143790721893, 0.4976035952568054, -0.00771444384008646, 0.0017220500158146...
I have an `NSTimer` running in my application that collects some data and sends it to a server periodically. In production the timer will fire every few hours. I am worried about interfering with automatic sleep. In testing, some combinations of timer and sleep time prevent automatic sleep entirely — the display sleep...
[ 0.1347525715827942, 0.12274914234876633, 0.5830674171447754, -0.24481870234012604, 0.29889264702796936, -0.17819616198539734, 0.7482609748840332, 0.0017646807245910168, -0.2823890149593353, -0.7589496374130249, -0.1164528951048851, 0.7710974216461182, -0.17255084216594696, 0.15609243512153...
the disk will prevent your computer from sleeping, according to Apple's article "[Mac OS X: Why your Mac might not sleep or stay in sleep mode](http://support.apple.com/kb/HT1776)". Additionally, my testing has shown that the priority of a thread also has an impact on whether or not a computer will sleep. The followin...
[ 0.2568032443523407, -0.18757492303848267, 0.39393773674964905, -0.21065832674503326, 0.2862480878829956, -0.31153297424316406, 0.3636334240436554, -0.19006776809692383, -0.2498086392879486, -0.7286593317985535, -0.40391892194747925, 0.8914830684661865, -0.1280742585659027, 0.11735583096742...
} [pool drain]; } -(void)awakeFromNib { [NSThread detachNewThreadSelector:@selector(spawnThread) toTarget:self withObject:nil]; } @end ``` Removal of the setThreadPriority call will prevent the computer from sleeping.
[ 0.0196442361921072, 0.007818290963768959, 0.35762089490890503, -0.34503576159477234, 0.513471245765686, -0.3303944766521454, 0.4484991729259491, -0.1575574278831482, -0.12043400853872299, -0.6608098745346069, -0.2833409905433655, 0.8462897539138794, -0.0538647398352623, 0.3780628442764282,...
I am compiling a C program with the SPARC RTEMS C compiler. Using the Xlinker -M option, I am able to get a large memory map with a lot of things I don't recognize. I have also tried using the RCC nm utility, which returns a slightly more readable symbol table. I assume that the location given by this utility for, sa...
[ 0.0077737015672028065, 0.2640344798564911, 0.08675748109817505, -0.11226131021976471, 0.3533261716365814, -0.16100549697875977, 0.2575508952140808, -0.03929014503955841, -0.26103687286376953, -0.7018089890480042, 0.04406041279435158, 0.4947197735309601, -0.3563016951084137, 0.2157785743474...
functions? Also, when the linking is done, does it link just the functions that the executable calls, or is it all functions in the library? It seems to me to be the latter, given the number of things I found in the symbol table and memory map. Can I make it link only the required functions? Thanks for your help. Most...
[ -0.09496533870697021, -0.268098384141922, 0.13575379550457, 0.4327428638935089, 0.007579886354506016, 0.0794546976685524, 0.15101787447929382, -0.14881126582622528, -0.37225696444511414, -0.4856071472167969, -0.10013199597597122, 0.43557384610176086, -0.47266966104507446, 0.127768576145172...
Using the Xlinker -M option, I am able to get a large memory map with a lot of things I don't recognize. The linker map will usually have all symbols -- yours, the standard libraries, runtime hooks etc. > Is there any way to get a list of locations for all the library/system functions? The headers are a good place ...
[ 0.09828133881092072, -0.05686385557055473, 0.3150630593299866, 0.30988001823425293, 0.03698365390300751, -0.0683135986328125, 0.07546228170394897, -0.0595802366733551, -0.0552603118121624, -0.885546088218689, -0.04989262670278549, 0.5077425837516785, -0.49065765738487244, 0.047753185033798...
on the type of binary you are creating. Some compilers like gcc however, does allow you whether to create a non-relocatable binary or not. (For gcc you may check out exp files, dlltool etc.) Check with the appropriate documentation.
[ 0.396818608045578, 0.06506786495447159, -0.27330315113067627, 0.21787764132022858, -0.08055273443460464, -0.4460602402687073, -0.08762998133897781, 0.4327642619609833, -0.3368084728717804, -0.3398504853248596, -0.4042113721370697, 0.6019208431243896, -0.25417080521583557, 0.072845131158828...
What is the Linq equivalent to the [map! or collect!](http://www.ruby-doc.org/core/classes/Array.html#M002213) method in Ruby? ``` a = [ "a", "b", "c", "d" ] a.collect! {|x| x + "!" } a #=> [ "a!", "b!", "c!", "d!" ] ``` I *could* do this by iterating over the collection with a foreach, but I w...
[ 0.08110246807336807, 0.0074292453937232494, 0.33514055609703064, -0.10543790459632874, -0.33906611800193787, -0.18025000393390656, 0.16232748329639435, -0.6720326542854309, -0.28838321566581726, -0.13012808561325073, -0.28044289350509644, 0.5168535709381104, -0.46131402254104614, -0.070390...
how can i get the type of of an object (with `GetType`) from within the object itself? Something like `GetType(Me)` (that, of course, doesn't work). Thanks. `Me.GetType()` should work. If it doesn't, then please say in what way it doesn't.
[ 0.519402265548706, 0.13785295188426971, 0.2716045081615448, 0.11681696772575378, -0.10449164360761642, -0.1341252326965332, 0.3924312889575958, 0.05300533026456833, 0.2864731252193451, -0.5712069272994995, -0.25537800788879395, 0.3766920566558838, -0.24509090185165405, 0.15463051199913025,...
I have an index that stores birth-dates, and I would like to search for anybody whose birth-date is within X days of a certain month/day. For example, I'd like to know if anybody's birthday is coming up within a certain number of days, regardless of what year they were born. How would I perform this query this using So...
[ 0.30181753635406494, 0.11018551886081696, 0.5010424256324768, 0.26618871092796326, -0.04389071837067604, 0.11825992166996002, -0.068130262196064, 0.11337313055992126, -0.2704460620880127, -0.4053838551044464, 0.17369116842746735, -0.05006710812449455, 0.36596202850341797, 0.545608878135681...
query and indexing standpoint)? You need to remember that Solr uses Lucene, and that as of now - everything is stored and indexed as a string. Range query as is won't work because the dates are usually internally indexed as YYYYMMDD Having a seperate field in the index that just stores MMDD strings would be easily se...
[ 0.23769688606262207, -0.1491169035434723, 0.7031340599060059, 0.1644180715084076, 0.032726187258958817, 0.11654432117938995, -0.2749394178390503, -0.10505037754774094, -0.2736787497997284, -0.4921341836452484, -0.03573322668671608, 0.5636067390441895, -0.06970281153917313, 0.36990994215011...
lucene matches lexiographically (A rangequery that was ba -> bc would match BAt, BAseball, but not BEcause.) Indexing like this is a onetime fixed cost, and doesnt destroy anything other than internal arrangement chronologically. If that's a problem, use two fields, disk space is cheap!)
[ 0.09333913028240204, -0.1153743639588356, 0.13360407948493958, 0.35122767090797424, -0.0058197458274662495, 0.2003229260444641, -0.22279734909534454, 0.17051616311073303, 0.11034968495368958, -0.7783598303794861, -0.1735428422689438, 0.30903351306915283, 0.07654616236686707, -0.23538789153...
Alright, I'm trying to buy into the idea that html tables should not be used, and that divs should be. However, I often have code that resembles the following ``` <table> <tr> <td>First Name:</td> <td colspan="2"><input id="txtFirstName"/></td> </tr> <tr> <td>Last Name:</td> ...
[ 0.2409406155347824, 0.04048224166035652, 0.33245164155960083, -0.403461754322052, -0.34512588381767273, -0.15615609288215637, 0.29741162061691284, -0.031227365136146545, -0.23693963885307312, -0.7929822206497192, -0.1962415724992752, 0.6356508135795593, -0.5595720410346985, -0.121072515845...
<td> <select type="text" id="ddlState"> <option value="NY">NY</option> <option value="CA">CA</option> </select> </td> <td> <select type="text" id="ddlCountry">
[ 0.2890080511569977, -0.4084108769893646, 0.4099101126194, 0.13038085401058197, 0.0903383120894432, 0.12312332540750504, -0.19406771659851074, -0.31336674094200134, -0.2687280476093292, -0.4238506257534027, -0.2352377027273178, 0.3489031195640564, -0.022494351491332054, 0.24059081077575684,...
<option value="NY">USA</option> <option value="CA">CAN</option> </select> </td> </tr> </table> ``` I want the labels to be aligned and I want the controls to be aligned. How would I do this without using tables? This ought to do the trick. ``` <style> div.block{ overflow:hid...
[ 0.09815531224012375, -0.3497982323169708, 0.6602715849876404, 0.07343938946723938, 0.2551534175872803, -0.04355625435709953, -0.25468000769615173, -0.7038503289222717, -0.15871979296207428, -0.4873562753200531, -0.1304973065853119, 0.5997714400291443, -0.1938844472169876, -0.15500588715076...
field</label> <input class="input" type="text" id="txtFirstName"/> </div> <div class="block"> <label>Second field</label> <input class="input" type="text" id="txtLastName"/> </div> ``` I hope you get the concept.
[ 0.3145793080329895, -0.29033222794532776, 0.2813464403152466, -0.16340765357017517, -0.14336535334587097, -0.19908590614795685, -0.14598819613456726, -0.051192257553339005, 0.07519220560789108, -0.7470102310180664, -0.18402856588363647, 0.5333878397941589, -0.11571919173002243, 0.208619847...
I have some image processing code that loops through 2 multi-dimensional byte arrays (of the same size). It takes a value from the source array, performs a calculation on it and then stores the result in another array. ``` int xSize = ResultImageData.GetLength(0); int ySize = ResultImageData.GetLength(1); for (int x ...
[ 0.09546058624982834, -0.31624093651771545, 0.44890785217285156, -0.06717538833618164, -0.014225820079445839, 0.017706863582134247, 0.05908304080367088, -0.4712543189525604, -0.08315764367580414, -0.6116656064987183, -0.05299149826169014, 0.17453686892986298, -0.401937872171402, 0.120956219...
ResultImageData[x, y] = (byte)((CurrentImageData[x, y] * AlphaValue) + (AlphaImageData[x, y] * OneMinusAlphaValue)); } } ``` The loop currently takes ~11ms, which I assume is mostly due to accessing the byte
[ -0.18316979706287384, -0.2833123207092285, 0.4807067811489105, -0.2055186778306961, 0.08604294806718826, -0.03796948119997978, 0.6778835654258728, -0.41419363021850586, -0.306715726852417, -0.14278653264045715, -0.014428334310650826, 0.4040050208568573, -0.08527746796607971, 0.062615625560...
arrays values as the calculation is pretty simple (2 multiplications and 1 addition). Is there anything I can do to speed this up? It is a time critical part of my program and this code gets called 80-100 times per second, so any speed gains, however small will make a difference. Also at the moment xSize = 768 and ySi...
[ 0.16034995019435883, -0.02858557738363743, 0.3127877712249756, -0.17555654048919678, -0.1645934134721756, -0.015495093539357185, 0.39608994126319885, -0.3437521457672119, -0.7870162129402161, -0.5637823343276978, 0.2259048968553543, 0.6084115505218506, -0.19456015527248383, 0.1224130615592...
ResultImageData, c = CurrentImageData, a = AlphaImageData) { while (size > 0) { *(r + counter) = (byte)(*(c + counter) * AlphaValue + *(a + counter) * OneMinusAlphaValue);
[ -0.19259795546531677, -0.5108656883239746, 0.2584694027900696, -0.3267574608325958, 0.10889779031276703, 0.1846756786108017, 0.35521435737609863, -0.5649334788322449, -0.14661063253879547, -0.09235215932130814, -0.09798780828714371, 0.26822203397750854, -0.5027798414230347, 0.1095946058630...
counter++; size--; } } } ``` To get any real speadup for this code you would need to use pointers to access the arrays, that removes all the index calculations and bounds checking. ``` int size = ResultImageData.Length; unsafe { fixed(byte* rp = ResultImageData, cp = CurrentImageData, ap =...
[ -0.009743011556565762, -0.22169877588748932, 0.3476429581642151, -0.2363761067390442, -0.0037881596945226192, 0.3128100037574768, 0.3703566789627075, -0.6659684777259827, -0.4587157368659973, -0.13988830149173737, -0.002060128143057227, 0.269344687461853, -0.6282401084899902, 0.16945940256...
ap; while (size > 0) { *r = (byte)(*c * AlphaValue + *a * OneMinusAlphaValue); r++; c++; a++; size--; } } } ``` Edit: Fixed variables can't be changed, so I added code to copy the pointers to new pointers that can be changed.
[ 0.07711786776781082, 0.14942282438278198, 0.30660712718963623, -0.2629674971103668, 0.019867833703756332, 0.3940095007419586, 0.17704932391643524, -0.46934083104133606, -0.3405567407608032, -0.4420637786388397, -0.11842961609363556, 0.3799534738063812, -0.6593509316444397, 0.08397030830383...
I'm fairly certain I know the answer to this, but any ideas would be extremely helpful... First of all, this is MySQL 5.1.32-community. I have a large table (millions of rows, can't reduce the size - that is the reduced size) and the pertinent fields are two datetime fields. We'll call it date1 and date2. I need to ru...
[ 0.07423393428325653, -0.0395641066133976, 0.3559093773365021, -0.11507202684879303, 0.03164583444595337, -0.13254281878471375, 0.005384418647736311, 0.07282404601573944, -0.051226623356342316, -0.7339374423027039, 0.21446047723293304, 0.2338157743215561, -0.1954667568206787, 0.191825777292...
between the two dates and indexing that - any methods to decrease the query time? This seems like such a basic question, but I always wonder if maybe I'm just missing something... Have you run a count to see if there just is really so much data being returned that it will take that long to return it all? ``` select co...
[ 0.3512139618396759, -0.06498493254184723, 0.109404556453228, -0.03088509291410446, -0.04829646646976471, -0.166887566447258, -0.28741490840911865, -0.05318620428442955, -0.25955358147621155, -0.49098795652389526, 0.2229653149843216, 0.38437002897262573, -0.10688301175832748, 0.153339505195...
In perforce you can issue a 'sync to none' command to remove files from the client, but leave them untouched in the depot (or repository in svn lingo). > p4 sync ...#none Is there a similar command in svn? --- **Edit:** Thanks to those that have answered so far. To clarify: I don't want to use rm -rf on the dire...
[ 0.2342110425233841, -0.11220970749855042, 0.6124707460403442, -0.19453135132789612, -0.29064667224884033, 0.06741951406002045, 0.35944876074790955, -0.476915568113327, -0.12596701085567474, -0.37357208132743835, -0.2295554280281067, 0.864156186580658, -0.28449857234954834, 0.17423795163631...
client, which are in the depot/repository, and leaves local only files alone. With a small set of files, this is not a big deal, but with numerous files it is painful to do by hand. So you basically want to remove all files that are versioned and unmodified? You could cook up a script that iterates through all files ...
[ 0.02579471841454506, -0.2950735092163086, 0.04552682116627693, -0.038752127438783646, -0.20586825907230377, -0.07891109585762024, 0.34539246559143066, 0.1450723260641098, -0.4998294413089752, -0.7662619352340698, -0.09236369282007217, 0.7243224382400513, -0.5184251666069031, 0.068220220506...
that. The script only removes files, it doesn't touch folders. ``` import os from subprocess import * def isUnchangedInRepo(name): output = Popen(["svn","stat",name], stdout=PIPE).communicate()[0] return len(output) == 0 for dirname, dirnames, filenames in os.walk('.'): for filename in filenames: ...
[ -0.0602637380361557, -0.059497248381376266, 0.4418947100639343, -0.19777727127075195, 0.07468665391206741, 0.12221141159534454, 0.5328962206840515, -0.0820770263671875, 0.010643177665770054, -0.749603271484375, -0.30560922622680664, 0.7255196571350098, -0.41955652832984924, -0.005773687269...
If there is a difference, what is the difference between the two ways of doing the following cast? In this case `e` is a `GridViewRowEventArgs` object. ``` GridView gv = (GridView)e.Row.FindControl("gv"); //first way GridView gv2 = e.Row.FindControl("gv") as GridView; //second way ``` The differences are: * If a c...
[ 0.1427280157804489, -0.22101694345474243, 0.36762186884880066, -0.2492128312587738, -0.3398441970348358, 0.06693065166473389, 0.47941267490386963, -0.4443387985229492, -0.033700764179229736, -0.7820773124694824, -0.267689049243927, 0.5890921950340271, -0.3871850073337555, 0.142595931887626...
I've [written elsewhere](https://stackoverflow.com/questions/496096/casting-vs-using-the-as-keyword-in-the-clr/496167#496167) about when I feel it's appropriate to use which operator. That might be worth a read...
[ 0.4767865538597107, 0.04499278962612152, 0.4093383848667145, -0.16902706027030945, 0.2614334225654602, -0.008627218194305897, 0.011509766802191734, -0.22435718774795532, -0.15542025864124298, -0.324289470911026, 0.18459753692150116, 0.40108129382133484, 0.33789804577827454, -0.141461238265...
I'm trying to create a script that automatically downloads packages for new servers. However, some things like 'mysql-server' can not installed automatically cause you need to configure them in the ncurses interface first. I've looked through the man pages and can't find anything appropriate. I don't care if I have to...
[ 0.5148229002952576, 0.1105097085237503, -0.20767928659915924, 0.08400081843137741, -0.35793328285217285, -0.1791166365146637, 0.28438496589660645, -0.16052286326885223, -0.054155874997377396, -0.9625191688537598, 0.001807822030968964, 0.875161349773407, -0.39536920189857483, 0.029935248196...
packages that ask questions through debconf (which is what puts up the ncurses display), you can pre-answer the questions. For sun-java, the questions can be pre-answered by following the instructions at [http://www.davidpashley.com/blog/debian/java-license](https://web.archive.org/web/20120618123342/http://www.davidpa...
[ 0.39702627062797546, 0.028888147324323654, 0.1680968850851059, -0.07788167893886566, -0.03800712153315544, -0.3858467638492584, 0.008208774030208588, -0.4898524880409241, -0.0337660051882267, -0.33357957005500793, -0.46788641810417175, 0.605872392654419, -0.4926072359085083, -0.31154230237...
For my iPhone app I'm working on, i want to have the ability to dynamically add or remove sections to the settings area for my app. ideally I'd like to be able to alter the list of options in a multi-value specifier, and also to add new rows that drilldown into copies of one settings page. I haven't seen anything in th...
[ 0.48346689343452454, 0.03952391818165779, 0.2881258428096771, 0.07311665266752243, 0.22867624461650848, 0.26101961731910706, 0.1865212768316269, -0.10617013275623322, -0.48905128240585327, -0.5202919244766235, 0.16490858793258667, 0.5923040509223938, -0.39893966913223267, -0.24698576331138...
that is deployed at install time, and your application will not have access to that file at runtime, because of the sandbox. As many people have noted, the Settings app really stops being useful for anything more than trivial settings. I would suggest adding a preferences section inside your application. But of cours...
[ 0.33213984966278076, 0.051583483815193176, 0.423936128616333, 0.13259181380271912, 0.3832331597805023, -0.38240864872932434, 0.37792688608169556, 0.2421451061964035, -0.07864993065595627, -0.5165073275566101, -0.27129724621772766, 0.6160421967506409, -0.37207603454589844, -0.11496195942163...
I have one question concerning Python and the sqlalchemy module. What is the equivalent for `cursor.rowcount` in the sqlalchemy Python? `ResultProxy` objects have a [`rowcount`](https://docs.sqlalchemy.org/en/13/core/connections.html#sqlalchemy.engine.ResultProxy.rowcount) property as well.
[ 0.07070556282997131, 0.0814741924405098, 0.08202841877937317, 0.13408459722995758, -0.18994669616222382, -0.1942482441663742, -0.25436919927597046, 0.19582593441009521, -0.3344270884990692, -0.17876864969730377, 0.15969450771808624, 0.6501549482345581, -0.22964826226234436, 0.1737322956323...
I have a SSIS master package, which executes several child packages. It works great, but when I deploy it to the file system on the server, I get an error code "0xC00220DE". "The system cannot find the file specified." When I run the package on the server by double-clicking it, it works correctly. But when I use DTExe...
[ 0.08186865597963333, 0.17659275233745575, 0.43913599848747253, 0.03828824684023857, 0.3540470600128174, -0.027288777753710747, 0.262531042098999, -0.1743669956922531, -0.14020566642284393, -0.8298001289367676, -0.10413021594285965, 0.4679696559906006, -0.09114935994148254, 0.25244852900505...
of ideas here... By the way, I'm running Sql Server 2005 sp3. Solved it. I was using relative paths to point to the child packages, and in runtime SSIS was unable to find them. In the end I used a specific path, set in a configuration file. Then I used the deployment utility, copied everything to the server, run it ...
[ 0.21854984760284424, 0.2573212683200836, 0.002440983196720481, 0.3042694330215454, 0.20001763105392456, 0.026451146230101585, 0.25285589694976807, 0.23404188454151154, -0.35320350527763367, -0.7256876826286316, 0.2690640091896057, 0.17764633893966675, -0.07107330113649368, 0.09327148646116...
I need to deploy this app and currently the installer the path goes something like "C:\Program Files\Manufacturer\App". I just want it to be "C:\Program Files\App" by default. I know I can change this manufacturer from the properties for the project, but I want it to go away altogether. The setup project won't build ...
[ 0.5578641891479492, 0.10221435874700546, 0.5922002792358398, -0.17852188646793365, 0.11042622476816177, -0.03926941007375717, 0.35978129506111145, -0.175706684589386, -0.2310652732849121, -0.9270890355110168, -0.32223138213157654, 0.7748915553092957, -0.3937397003173828, 0.1566701233386993...
I have problem with comparing the value of array elements. e.g. I wanted to compare the value of index 0 and index 2, and index 1 to index 3 and so on. With the code below I suppose to get the result of numOfdifferentShape is 2 but I get 3. How can I solve this problem? :-( ``` int numOfdifferentShape=0; myArray = {...
[ -0.11908987909555435, 0.027759719640016556, 0.5294387936592102, -0.33034074306488037, -0.11125855147838593, 0.15361598134040833, 0.3795798718929291, -0.6597344875335693, -0.10554030537605286, -0.4906613528728485, 0.0937761589884758, 0.5065423250198364, -0.23438316583633423, 0.0857423543930...
break; } } ``` ``` for (int i = 0; i < (myArray.size() - 2); ++i) { if (myArray[i] != myArray[i + 2]) ++numOfdifferentShapes; } ```
[ -0.14961086213588715, -0.038925934582948685, 0.31012168526649475, -0.3586018979549408, 0.259894460439682, -0.07582308351993561, 0.45216405391693115, -0.5103898048400879, -0.24281688034534454, -0.2670859098434448, -0.4060811698436737, 0.41968414187431335, -0.26989880204200745, 0.07342359423...
I have many projects that are named after namespaces types are under ![alt text](https://farm4.static.flickr.com/3635/3401652745_4d942700e0_o.png) When adding a new sub-namespace, how do you decide whether to • create a new folder in a project -- or -- • create a new project in a solution? What are some ...
[ 0.5222902894020081, 0.11940233409404755, -0.19563539326190948, -0.0036357806529849768, 0.13653884828090668, 0.06572070717811584, 0.19302192330360413, -0.11474373936653137, -0.46440213918685913, -0.6908054947853088, 0.09276298433542252, 0.2154710739850998, 0.0419926755130291, 0.358825355768...
the "nested" namespace - it just doesn't seem to work that way usually. In particular, think about whether you'd want to access the "nested" namespace from the "outer" one and vice versa - if they would reasonably reference each other, then they should be in the same project.
[ 0.01258834358304739, 0.1974172741174698, -0.1908540278673172, 0.36059650778770447, 0.043800659477710724, -0.14981432259082794, -0.013664821162819862, 0.06938362121582031, -0.10767769068479538, -0.6766230463981628, 0.005523031111806631, 0.08937466144561768, -0.14554676413536072, 0.228684797...
This code is taken from a previous question, but my question directly relates to it, so I've copied it here: ``` class User < ActiveRecord::Base has_many :group_memberships has_many :groups, :through => :group_memberships end class GroupMembership < ActiveRecord::Base belongs_to :user belongs_to :role belon...
[ -0.02733321487903595, 0.014756385236978531, 0.4323904812335968, -0.1870974600315094, 0.057658687233924866, -0.11758367717266083, 0.14804352819919586, -0.5899291634559631, -0.35800716280937195, -0.7561083436012268, 0.08680851757526398, 0.4839753806591034, -0.1482115089893341, -0.13649152219...
the code above I also added actions. Let's say that the system kept track of each user's actions on the site. How would you code this so that each action was unique and sorted with the most recent at the top for all the user's friends? ``` <% for action in @user.friends.actions %> <%= action.whatever %> <% end %> ``...
[ -0.03548021614551544, 0.011143064126372337, 0.30511587858200073, -0.09474263340234756, -0.18562479317188263, 0.15843422710895538, 0.36065763235092163, -0.3419746160507202, -0.5177621245384216, -0.5492510199546814, 0.132815420627594, 0.5439102053642273, -0.3241041898727417, -0.1351512223482...
real issue here is how to define friends? Do I create a new model or join table that links users to other users? Ideally, I'd like to define friends through the common group memberships of other users, but I'm not sure how to go about defining that. ``` has_many :friends, :through => :group_memberships, :source => :us...
[ 0.15015612542629242, 0.2501930296421051, -0.10120047628879547, -0.015440120361745358, -0.10392282158136368, -0.503535270690918, 0.18271836638450623, 0.03797592595219612, -0.11997382342815399, -0.6200847625732422, 0.2934550344944, 0.6626427173614502, -0.0882163792848587, 0.2153279334306717,...
at [Ivy Roundup](http://code.google.com/p/ivyroundup), it's a repository of Ivy definitions for various libraries.
[ 0.33830389380455017, -0.013716488145291805, 0.11876597255468369, 0.14509239792823792, 0.09611217677593231, -0.26038888096809387, -0.002100904006510973, -0.050774116069078445, 0.01437957864254713, -0.284229040145874, -0.12892985343933105, -0.1784500628709793, 0.045552100986242294, 0.0424812...
I'm trying to debug a problem (exception being thrown) in an ASP.NET MVC program using the Microsoft CLR Debugger. It works pretty well, except after a minute or two, the debugger gets detached (the web request times out or something?) and I can no longer inspect its state. This is extremely frustrating. How can I mak...
[ 0.14033380150794983, 0.25637170672416687, 0.25622573494911194, 0.16089820861816406, 0.20492413640022278, -0.14946797490119934, 0.42492222785949707, 0.06781666725873947, -0.39974385499954224, -0.3358290493488312, -0.10631219297647476, 0.4065566062927246, -0.17133702337741852, 0.323477953672...
When throwing custom exceptions or issuing messages to the end user, one could use hard-coded the strings (including string constants), use resource-only assemblies or get strings from a table in a database. I would like my application to be able to switch to a different language easily without having to recompile. Wh...
[ 0.7300502061843872, 0.1836216300725937, -0.06184491142630577, 0.2569671869277954, -0.04771843180060387, 0.12239246070384979, 0.2808845341205597, -0.15701496601104736, -0.15665015578269958, -0.17633458971977234, 0.02247077412903309, 0.61937415599823, -0.44437921047210693, -0.179770871996879...
that comes with each option? If you have a practice that is better than what's been listed, I'd love to hear it. Technologies: OS: Windows family Platform: .NET Frame 2 and up Language: C# Database: MS SQL 2005 and up Thanks guys! Cullen Use resources: How does this add more complexity to the program logic? ``` tr...
[ 0.3467291295528412, -0.07629915326833725, 0.027950549498200417, 0.21948577463626862, -0.020886607468128204, -0.021232834085822105, 0.521159291267395, -0.4338752031326294, -0.03170401230454445, -0.6630188822746277, 0.03541365638375282, 0.7266820073127747, -0.32530826330184937, 0.27688610553...
of the error. Again I don't think this adds any compelxity to the logic.
[ 0.1775064319372177, 0.3338652551174164, 0.17443791031837463, 0.17244747281074524, -0.21984931826591492, 0.2345559298992157, 0.37501829862594604, -0.14841528236865997, -0.09304248541593552, -0.2952904999256134, 0.38460588455200195, 0.6848297119140625, -0.09594618529081345, 0.057279370725154...
Imagine a generic class MySet which maintains a parent MySet instance and a child MySet instance. The idea is that the parent should be able to hold a superset of T and the child a subset. So given the following sample, consider the following problem: ``` class MySet<T> { MySet<? extends T> child; void doStuff ...
[ -0.02022552117705345, -0.15039043128490448, -0.10198161751031876, 0.00865672342479229, 0.2561984658241272, 0.2497943788766861, 0.10182540863752365, -0.12486007809638977, 0.04179048910737038, -0.5774598717689514, -0.2642519772052765, 0.20604269206523895, -0.36463794112205505, 0.418558835983...
conforms to the child's `<T`>. Keep in mind that this parent->child chain could extend to be arbitrarily long. Is there any way to arrange the generics so that parent.doStuff(...) will compile, ie, so that it can only be called with the arguments of it's most restrictive child? This would mean that the java compiler w...
[ 0.12294304370880127, 0.14619415998458862, 0.2683362662792206, 0.030303748324513435, 0.05547935515642166, -0.1564079374074936, 0.31736573576927185, -0.24906831979751587, -0.0633634477853775, -0.5009344816207886, -0.07855256646871567, 0.4884130358695984, -0.24352328479290009, 0.2339456230401...
MySet`<T`> child; rather than MySet`<? extends T`>) and have children be more restrictive than their parents elsewhere in the code? I can give a negative answer to part of that question right away: > Is there any way to arrange the > generics so that parent.doStuff(...) > will compile, ie, so that it can only > be ...
[ 0.014219827018678188, 0.019444525241851807, -0.05619610473513603, -0.03713115677237511, 0.11935823410749435, 0.06886447221040726, 0.21677042543888092, -0.18366913497447968, 0.056994467973709106, -0.689702570438385, -0.09269683063030243, 0.33336588740348816, -0.21966533362865448, 0.25128906...
and I don't know > if it has that capability. The simple answer is no, because the actual extend (and type requirements) of that chain are only known at run time, and by then any information about generics has been lost through erasure. To push it even further, if you had a checked type instead of vanilla generics, ...
[ 0.5703248381614685, -0.07020023465156555, 0.28745678067207336, 0.1406085044145584, -0.030766218900680542, -0.3145900070667267, 0.44009697437286377, -0.03397717699408531, -0.07117212563753128, -0.3445054590702057, -0.025043638423085213, 0.4121161103248596, -0.36897602677345276, 0.5190163254...
(and specified, maybe by a second type arg) in advance, the compiler is not going to be able to help you there. What you can (and should do imo) is keep with what you just wrote (which should compile just fine), and pass it an argument that can be unsafe. Whether you type-check it yourself, or let the JVM raise a Clas...
[ 0.2949225902557373, -0.061540789902210236, -0.1720159649848938, 0.09521085023880005, 0.09489832073450089, -0.28811725974082947, 0.3100631535053253, -0.02745947428047657, -0.13497474789619446, -0.37259960174560547, -0.08653980493545532, 0.5589318871498108, -0.27955737709999084, -0.212059840...
IIS enables us to also configure Asp.Net file mappings. Thus besides aspx, IIS also invokes Asp.Net runtime, when requests have the following file extensions: a) .ascx --> .asmx extension is used to request user controls. * Since user controls can’t be accessed directly, how and why would anyone send a request to a ...
[ 0.14598049223423004, -0.294574111700058, 0.34031936526298523, 0.18696656823158264, -0.20774373412132263, -0.30984291434288025, 0.11990643292665482, -0.38611266016960144, -0.16245391964912415, -0.8592391610145569, -0.20926013588905334, 0.20271939039230347, -0.4042666554450989, 0.07278313487...
Besides, since there can be several Http handlers registered, how will Asp.Net know which handler to invoke if they all use ashx extension? • What does the requested ashx file contain? Perhaps a definition of a Http handler class? • I know how we register Http handlers to be invoked when non-ashx pages are requested...
[ 0.2676008939743042, -0.1342209130525589, 0.2292284518480301, 0.09394338726997375, -0.39497309923171997, 0.026105672121047974, 0.19697605073451996, 0.013073018752038479, -0.306643545627594, -0.604766845703125, 0.07393153011798859, 0.2376619428396225, -0.3754189908504486, 0.01884757913649082...
other reason why I would choose to request file with .asax extension directly? > • ashx files don't have to be registered. They are basically a simpler aspx, for when you don't need the entire page life cycle. A common use is for retrieving dynamic images from a database. So if I write a Http handler, I should put i...
[ 0.3875884711742401, -0.05083642154932022, 0.26339930295944214, 0.11022164672613144, -0.6270409822463989, -0.07935154438018799, 0.28869280219078064, 0.034539151936769485, -0.3471968472003937, -0.7853330373764038, 0.041527159512043, 0.17584043741226196, -0.40619027614593506, 0.06985799968242...