text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
the binary value stored in the computer's memory, not the string you actually typed into the source code.1 If you decode the sequence of bits back into a decimal number, again using the IEEE 64-bit floating-point format, you get ``` 0.2999999999999999888977697537484345957637... ``` so a naive implementation would c...
[ -0.07752636075019836, 0.3321865200996399, -0.042811620980501175, -0.022189784795045853, -0.023411262780427933, 0.14712458848953247, 0.18021626770496368, -0.17000947892665863, -0.2616284191608429, -0.4473530948162079, -0.11721663177013397, 0.4620000720024109, -0.24237345159053802, -0.054086...
the "nicest" decimal representation out of all that could correspond to the value in memory. Python 2.7 and up (but not 3.0) includes a [sophisticated algorithm to do just that](https://bugs.python.org/issue1580), which we can access through the default string formatting operation. ``` '{}'.format(f) ``` The only ca...
[ -0.029115376994013786, 0.17778824269771576, 0.44562873244285583, 0.12686145305633545, 0.10501757264137268, 0.061459966003894806, 0.03519291430711746, 0.14618007838726044, -0.24977268278598785, -0.33548060059547424, -0.15220050513744354, 0.3968576192855835, -0.21802784502506256, -0.17404720...
`3e-10` to 28 digits of precision (it produces `0.0000000002999999999999999980`), and I'm not yet sure how best to handle those. If you actually *are* working with `float`s that are very close to round numbers but intentionally not equal to them (like 0.29999999999999998 or 99.959999999999994), this will produce some ...
[ 0.040634214878082275, 0.23726598918437958, 0.517412006855011, -0.23657965660095215, -0.18255595862865448, 0.12915188074111938, 0.3211614489555359, -0.5856168866157532, -0.11171858757734299, -0.3407379686832428, 0.06475836038589478, 0.6829873919487, -0.05551046505570412, -0.0998098254203796...
conversion doesn't "bump up" the value to its nice decimal representation. I think `sys.float_info.dig + n + 2` may be enough in all cases, but if not that `2` might have to be increased, and it doesn't hurt to do so. In earlier versions of Python (up to 2.6, or 3.0), the floating point number formatting was a lot mor...
[ 0.02507103607058525, -0.012468073517084122, 0.24889734387397766, -0.0934203714132309, -0.25126075744628906, 0.2639368772506714, 0.010650073178112507, -0.33837243914604187, -0.1824972927570343, -0.7396853566169739, 0.2694348096847534, 0.686109721660614, -0.11510060727596283, -0.331651598215...
full precision representable by a `float`, and round the number to that many digits before truncating it. A typical choice is 12, ``` '%.12f' % f ``` but you can adjust this to suit the numbers you're using. --- 1Well... I lied. Technically, you *can* instruct Python to re-parse its own source code and extract the...
[ 0.24112653732299805, 0.21504388749599457, 0.2231614738702774, -0.15692780911922455, -0.17125554382801056, 0.08220208436250687, 0.24647365510463715, -0.29098138213157654, -0.13550981879234314, 0.16298460960388184, 0.09970909357070923, 0.775849461555481, -0.04970677196979523, -0.280537009239...
it fairly useless. The following is presented for entertainment value only: ``` def trunc_introspect(f, n): '''Truncates/pads the float f to n decimal places by looking at the caller's source code''' current_frame = None caller_frame = None s = inspect.stack() try: current_frame = s[0] ...
[ -0.2815854847431183, -0.007790867704898119, 0.5810851454734802, 0.02237960882484913, 0.07906448841094971, 0.11770084500312805, 0.23849880695343018, -0.24467657506465912, -0.16457948088645935, -0.330593466758728, -0.1304396688938141, 0.4190389811992645, -0.17225661873817444, -0.034737501293...
if token_type == tokenize.NAME and token_string == current_frame[3]: next(gen) # left parenthesis token_type, token_string, _, _, _ = next(gen) # float literal if token_type == tokenize.NUMBER: try:
[ -0.0982259064912796, -0.2634018063545227, 0.16468407213687897, -0.020231107249855995, 0.05301983281970024, 0.20156899094581604, -0.174632728099823, -0.28561514616012573, -0.08122684806585312, -0.34520748257637024, -0.30331751704216003, 0.10284723341464996, -0.22009721398353577, -0.04168934...
cut_point = token_string.index('.') + n + 1 except ValueError: # no decimal in string return token_string + '.' + '0' * n
[ -0.026346035301685333, -0.08969596773386002, -0.2168535590171814, -0.029200859367847443, -0.16039323806762695, 0.22762581706047058, -0.19103209674358368, -0.12717458605766296, -0.28686270117759705, 0.024590933695435524, -0.1314477026462555, 0.10549271106719971, -0.06401840597391129, 0.0179...
else: if len(token_string) < cut_point: token_string += '0' * (cut_point - len(token_string)) return token_string[:cut_point]
[ -0.10237473249435425, -0.4440014362335205, -0.3502562642097473, -0.23793241381645203, -0.11809025704860687, 0.1794665902853012, -0.013421311974525452, -0.19139569997787476, -0.22640623152256012, -0.18178726732730865, -0.16300466656684875, 0.24458637833595276, -0.10229469835758209, -0.05898...
else: raise ValueError('Unable to find floating-point literal (this probably means you called {} with a variable)'.format(current_frame[3])) break finally: del s, current_frame, caller_frame ``` Generalizing this to handle the case where you pass in a variable seems lik...
[ 0.21228548884391785, -0.09887877106666565, 0.4587518572807312, -0.09762606024742126, 0.18964484333992004, -0.23999211192131042, 0.3108334541320801, -0.2500341236591339, -0.5527858734130859, -0.09600747376680374, -0.2546301782131195, 0.39366090297698975, -0.20636343955993652, 0.347282856702...
until you find the floating-point literal which gave the variable its value. If there even is one. Most variables will be initialized from user input or mathematical expressions, in which case the binary representation is all there is.
[ -0.024514155462384224, -0.07697366923093796, 0.4238998293876648, 0.21611320972442627, 0.13926546275615692, -0.016653144732117653, -0.10468603670597076, 0.14069749414920807, -0.06587972491979599, -0.2576677203178406, -0.343511700630188, 0.4722607433795929, 0.0028978886548429728, 0.267146974...
> **This question already has an answer here:** > > [What are Extension Methods?](https://stackoverflow.com/questions/403539/what-are-extension-methods) *5 answers* > > [Usage of Extension Methods](https://stackoverflow.com/questions/403619/usage-of-extension-methods) *9 answers* > > [What Advantages of Extens...
[ 0.03205186128616333, -0.032445598393678665, 0.35097530484199524, 0.057630233466625214, -0.05069806054234505, -0.009429465048015118, -0.012917300686240196, -0.27796757221221924, -0.30296507477760315, -0.48428088426589966, -0.1484956592321396, 0.4904539883136749, -0.20443947613239288, 0.1184...
static int ToInt( this string value ){ return Int32.Parse( value ); } ``` Now say you have a TextBox called Port on your web page you can get it as an int like this: ``` int port = Port.Text.ToInt(); ``` Real world use of extension methods is usually much more useful then that and is used heavily by [Fluent](http:...
[ 0.06757912784814835, -0.14716051518917084, 0.3771337568759918, -0.14494487643241882, -0.38481006026268005, 0.024958612397313118, 0.22699366509914398, -0.2618671655654907, -0.32915306091308594, -0.6006999611854553, -0.10118051618337631, 0.7126179933547974, -0.29458391666412354, 0.1522560119...
Extension methods can add some of the convenience of base classes without the pollution of the interfaces. For example say I have a `Window` base class defined like this ``` public class Window { public void Show( object owner ){...} public void Show(){ Show( null ); } } ``` Now I want to extract an `IWind...
[ 0.265248566865921, 0.06623340398073196, 0.4681713879108429, -0.22765490412712097, -0.23417697846889496, -0.03922947868704796, -0.11345219612121582, -0.2655116617679596, -0.20228172838687897, -0.8086698651313782, 0.18044012784957886, 0.5809692144393921, -0.5229350924491882, 0.22679045796394...
Show( object owner ); } ``` And an extension method like this: ``` public static void Show( this IWindow window ) { window.Show( null ); } ```
[ 0.21098066866397858, 0.14299705624580383, 0.193514883518219, -0.3585101068019867, -0.3011036813259125, -0.23853352665901184, 0.1453455537557602, 0.024965208023786545, -0.021011022850871086, -0.5723628401756287, -0.33474281430244446, 0.4008980691432953, -0.622229814529419, 0.548514544963836...
I'm new to FDT and I'd like to move some (actionscript)projects from FlexBuilder to FDT. I've noticed FDT can read .actionscriptProperties from FlexBuilder, so just setting the workspace to my FlexBuilder workspace got the projects, the current one open, the rest of them closed which is great. I got a an error on the...
[ -0.029104458168148994, -0.07893430441617966, 0.5915611982345581, -0.12784573435783386, -0.4813216030597687, -0.053867872804403305, 0.23339572548866272, -0.2079176902770996, -0.20573914051055908, -0.7699381709098816, -0.11315889656543732, 0.6580440998077393, -0.2931652069091797, 0.060820452...
) I've tried right clicking the project then Flash Project > Remove Flash Nature then Flash Project > Add Flash Nature again...but it didn't seem to do anything. I don't even know what it does. I'm guessing it's telling FDT to treat this project as CS3 or Flex compiled project. I've also imported a project from SVN i...
[ 0.24095985293388367, 0.027314718812704086, 0.17105647921562195, 0.0889507308602333, -0.3309011161327362, -0.030771693214774132, 0.2447969615459442, 0.0933481752872467, -0.38019824028015137, -0.7170549631118774, -0.09750967472791672, 0.6326854825019836, -0.35775142908096313, 0.0230180583894...
fdt just like that and having everything working. So I guess the answer would be using Export/Import.
[ 0.3568856716156006, -0.09343121200799942, 0.07502784579992294, 0.17633409798145294, 0.19650590419769287, 0.019778359681367874, -0.301146000623703, 0.31036433577537537, -0.23659652471542358, -0.21814142167568207, -0.17326140403747559, 0.3614717125892639, -0.3499120771884918, 0.0017681022873...
I apologize for the subjectiveness of this question, but I am a little stuck and I would appreciate some guidance and advice from anyone who's had to deal with this issue before: I have (what's become) a very large RESTful API project written in C# 2.0 and some of my classes have become monstrous. My main API class is...
[ 0.6244773268699646, 0.3743330240249634, -0.08119021356105804, -0.22220079600811005, 0.046108175069093704, -0.1948915421962738, 0.5659825801849365, 0.15256592631340027, -0.24577470123767853, -0.4174840450286865, 0.15271809697151184, 0.09960421174764633, 0.11581908911466599, 0.32076448202133...
to the SOLID principles, and I am massive fan of design patterns (but I am still at that stage where I can **implement** them, but not quite enough to know when to **use** them - in situations where its not so obvious). I need to break my classes down in size, but I am at a loss of how best to go about doing it. Can m...
[ 0.6061626076698303, 0.08924759924411774, 0.009962211363017559, 0.11689086258411407, -0.21303829550743103, -0.14750505983829498, 0.39937373995780945, -0.21443788707256317, -0.5340330004692078, -0.3671036660671234, -0.08579431474208832, 0.440462201833725, 0.022009989246726036, 0.258283704519...
monolithic class, then it probably has more than one reason to change. Simply define your one reason to change, and be as granular *as reasonable*. I would suggest to start "large". Refactor one third of the code out into another class. Once you have that, then start over with your new class. Going straight from one cl...
[ 0.331925630569458, -0.1848420798778534, -0.1728116124868393, 0.25381723046302795, -0.09888848662376404, -0.050648607313632965, 0.3233731985092163, -0.1330723911523819, -0.4622889757156372, -0.5783425569534302, -0.31960928440093994, 0.23375515639781952, -0.3220926821231842, 0.40630105137825...
or definition of behavior. However, if you need to change the functionality later, you will be able to *add* code, rather than *change* code to introduce new/different functionality. **Liskov Substitution Principle** - A class should be substitutable for its base class. The key here, in my opinion, is do to inheritanc...
[ 0.24403056502342224, -0.14889292418956757, -0.3300819993019104, 0.14452716708183289, -0.19624821841716766, -0.14469517767429352, 0.4967094361782074, -0.44247519969940186, -0.1097840741276741, -0.48161107301712036, -0.1549864560365677, 0.4907885193824768, -0.5101431012153625, 0.238142967224...
specifically to a high level (or mature) class/interface. One way to use this principle in a large class is to make your class implement an *empty* interface. Next, change all of the types that use your class to be the type of the interface. This will break your code. However, it will point out exactly how you are cons...
[ 0.24940766394138336, -0.13115526735782623, -0.06328456103801727, 0.034538384526968, -0.22099480032920837, -0.010270810686051846, 0.165260449051857, -0.2136911004781723, 0.02585766650736332, -0.663248598575592, 0.19746659696102142, 0.626857578754425, -0.573015570640564, 0.3891063332557678, ...
Principle** - The parent / child allegory made me understand this. Think of a parent class. It defines behavior, but isn't concerned with the dirty details. It's dependable. A child class, however, is all about the details, and can't be depended upon because it changes often. You always want to depend upon the parent, ...
[ 0.37035322189331055, -0.2705053985118866, -0.1519811600446701, 0.28297609090805054, -0.0007791848038323224, 0.03507039695978165, 0.37663525342941284, -0.26863807439804077, -0.15369614958763123, -0.6406103372573853, 0.05960831418633461, 0.6189787983894348, -0.23599249124526978, 0.4192316234...
no details. Of course, my opinions and understandings may be incomplete or wrong. I would suggest learning from people who have mastered these principles, like Uncle Bob. A good starting point for me was his book, [Agile Principles, Patterns, and Practices in C#](https://rads.stackoverflow.com/amzn/click/com/013185725...
[ 0.4247467517852783, -0.13702045381069183, 0.2622849643230438, 0.3063269257545471, -0.040650807321071625, -0.12667961418628693, 0.4040706157684326, -0.3696877360343933, -0.41802307963371277, -0.721508800983429, 0.13049158453941345, 0.4697451889514923, 0.04328084737062454, -0.410362720489501...
I've learned about Google's (unofficial) suggest API and their search API, which both look really great, but the suggest API doesn't actually suggest navigational completions. On the other hand, in Google Chrome if you start to type for example "apple", it will suggest "www.apple.com/trailers". I know it searches your...
[ 0.5801162719726562, 0.5020785927772522, 0.49948209524154663, -0.124861940741539, -0.052431538701057434, 0.08774230629205704, 0.15660609304904938, 0.0285921860486269, -0.39134931564331055, -0.6047894358634949, 0.25121545791625977, 0.39272457361221313, -0.07667072862386703, 0.307119250297546...
chrome I see the following request ``` http://clients1.google.co.uk/complete/search?client=chrome&output=chrome&hl=en-US&q=app GET /complete/search?client=chrome&output=chrome&hl=en-US&q=app HTTP/1.1 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.53 Sa...
[ -0.3744816184043884, 0.49556684494018555, 0.8832204937934875, -0.12469416856765747, -0.5369488000869751, 0.17558999359607697, 0.32213377952575684, -0.38851794600486755, -0.31333765387535095, -0.6667764782905579, -0.45707055926322937, 0.4477008879184723, -0.37652331590652466, 0.186919912695...
apple trailers). It also contains more information for each a description for the NAVIGATION result(Apple(United Kingdom)) and the number of results for each of the QUERY suggestions(437,000,000 37,700,00 995,000).
[ 0.48183563351631165, 0.22952133417129517, 1.0873736143112183, 0.2460693120956421, -0.1095452755689621, 0.2930631935596466, -0.09472024440765381, -0.13698402047157288, -0.15114465355873108, -0.003991195932030678, -0.15235397219657898, 0.20910905301570892, -0.18608121573925018, 0.01378712709...
I'm developing an iPhone application and am new to Objective-C as well as SQLite. That being said, I have been struggling w/ designing a practical data management solution that is worthy of existing. Any help would be greatly appreciated. Here's the deal: The majority of the data my application interacts with is sto...
[ 0.03397754952311516, 0.32313257455825806, 0.48748692870140076, -0.02028319239616394, 0.23409347236156464, 0.3838426470756531, 0.08729138225317001, -0.13389158248901367, -0.226273313164711, -0.47644826769828796, 0.06815366446971893, 0.46774008870124817, -0.1108437106013298, 0.13100065290927...
each object instance always has an ID attribute available, regardless of hydration state. In most cases it is a UUID which I can then easily reference. Before a few days ago, I would simply access the objects via these arrays by tracking down their UUID. I would then proceed to hydrate/dehydrate them as I needed. How...
[ -0.1294107437133789, 0.41258296370506287, 0.39269015192985535, 0.021129757165908813, -0.20658299326896667, 0.18044669926166534, 0.46914398670196533, -0.11891017854213715, -0.042762622237205505, -0.8448280096054077, -0.07106263935565948, 0.22815896570682526, -0.24050931632518768, 0.64526456...
enumerate through one of the previously mentioned arrays to find a "parent" object's UUID, and then proceed to find the "child's" UUID, I added a DataController w/ a singleton instance to simplify the process. I had hoped that the DataController could provide a single access point to the local database and make things...
[ -0.07681772112846375, -0.0077280146069824696, 0.3551725745201111, 0.12358899414539337, 0.06912744790315628, 0.3655490577220917, 0.15117421746253967, -0.22860240936279297, 0.06375408917665482, -0.7580429315567017, 0.12158417701721191, 0.19582931697368622, -0.24733999371528625, 0.42217549681...
given object as the value and it's UUID as the key. The DataController then exposes procedures that allow a client to call in w/ a desired object's UUID to retrieve a reference to the actual object. Whenever their is a request for an object, the DataController automatically hydrates the object in question and then re...
[ -0.10180440545082092, 0.08230765908956528, 0.6076542735099792, 0.0891011580824852, 0.022716287523508072, -0.02867841348052025, 0.16460861265659332, -0.09545516967773438, -0.029501082375645638, -0.4011327624320984, -0.3676103949546814, 0.309895396232605, -0.19171518087387085, 0.728292405605...
necessary replace the original object down the road, but I wanted to avoid that scenario if at all possible. I therefore added an additional dictionary to monitor what objects are hydrated at any given time using the object's UUID as the key and a fluctuating count representing the number of hydrations w/out an offset ...
[ 0.0987454354763031, 0.1070619523525238, 0.45093992352485657, -0.049143411219120026, -0.07962647080421448, 0.05669432878494263, 0.53653883934021, -0.34982025623321533, 0.14386412501335144, -0.4198070764541626, -0.06936385482549667, 0.42689892649650574, -0.2144039273262024, 0.318927019834518...
hydration retainment count of the object. There are obviously many cases when this is just not obvious or maybe not even easily accomplished, and if only one calling object fails to do so properly I encounter the exact opposite scenario I was trying to prevent in the first place. Ironic, huh? Anyway, I'm thinking that...
[ 0.39739009737968445, 0.40261268615722656, 0.24220895767211914, -0.03864352032542229, -0.14890596270561218, -0.13323774933815002, 0.44517022371292114, -0.18085667490959167, -0.08991038799285889, -0.44121378660202026, 0.3015989661216736, 0.45419201254844666, -0.23389554023742676, 0.332871168...
any advice would be greatly appreciated. Thanks in advance. I'd also be aware (as I'm sure you are) that CoreData is just around the corner, and make sure you make the right choice for the future.
[ 0.5039003491401672, -0.07184930145740509, -0.04480183497071266, 0.3293895721435547, 0.3429306447505951, -0.2639474868774414, 0.3212011158466339, 0.9498673677444458, 0.021525349467992783, -0.7381744980812073, -0.05967386066913605, 0.3749082684516907, 0.6291754245758057, -0.02716747112572193...
I would like to create a 'New Document' dialog similar to the Office 2007 style (see pic). I am having trouble with the list shown on the left. I have tried using a ListView control but I can't figure out how to display the header sections that scroll with the list (e.g. 'Template Categories' and 'Microsoft Office Onli...
[ 0.3002723157405853, 0.0485190786421299, 0.5414949655532837, 0.25981417298316956, -0.0947951078414917, -0.36298853158950806, 0.30292218923568726, -0.12849988043308258, -0.31264442205429077, -0.7732420563697815, 0.1463034451007843, 0.5008440017700195, -0.21088141202926636, 0.1053512990474700...
you're talking about groups within a ListView. This is pretty easy to accomplish. Take a look at the MSDN documentation on the [ListView.Groups](http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.groups.aspx) property. Once you've defined your groups ("Template Categories" and "Microsoft Office Onli...
[ 0.4531612694263458, -0.006376693025231361, 0.23446395993232727, 0.14007924497127533, -0.13653145730495453, -0.32876989245414734, 0.011919092386960983, -0.2318490594625473, -0.554908037185669, -0.5520233511924744, -0.17512227594852448, 0.05991899594664574, -0.19687213003635406, 0.0199932474...
I was coding on a project in VS2008 and I tried to hit CTR + R +E to encapsulate a field as a property(feature of resharper) and I fummble fingered, now I have dots everywhere I have spaces and I cant figure out how to get rid of it. e.g. ``` using.System; Namespace.EgNamespace { ....public.class.TestClass ....{ .......
[ 0.19845463335514069, 0.039277225732803345, 0.3466189503669739, -0.07266400009393692, 0.10297160595655441, -0.01424762699753046, 0.39207133650779724, -0.2851213812828064, 0.156786248087883, -1.0228890180587769, 0.09965270012617111, 0.21530412137508392, -0.25559693574905396, 0.09491231292486...
I would like to programmatically disable hardware prefetching. From [Optimizing Application Performance on Intel® Core™ Microarchitecture Using Hardware-Implemented Prefetchers](http://software.intel.com/en-us/articles/optimizing-application-performance-on-intel-coret-microarchitecture-using-hardware-implemented-pref...
[ 0.20541071891784668, -0.02127746306359768, 0.3193296790122986, 0.2527357041835785, 0.16562625765800476, 0.0936281830072403, 0.1084294393658638, -0.16955623030662537, 0.03055443987250328, -0.8150224089622498, -0.37958434224128723, 0.6749222874641418, -0.18491674959659576, -0.030584776774048...
the `IA32_MISC_ENABLE MSR` that have to be changed in order to control the `DPL` and L2 Streaming Prefetch: ``` Prefetcher Type MSR (0x1A0) Bit Value DPL (Hardware Prefetch) Bit 9 0 = Enable 1 = Disable L2 Streamer (Adjacent Cache Line Prefetch) Bit 19 0 = Enable 1 = Disable" ``` I tried using <http://etallen.com/...
[ -0.1589447557926178, 0.08551519364118576, 0.4141910970211029, -0.1316099762916565, 0.09251751005649567, 0.07273510843515396, 0.4909924268722534, -0.2534237802028656, -0.26564276218414307, -0.8388085961341858, -0.41027355194091797, 0.7820436358451843, -0.5788470506668091, 0.1292321979999542...
the Intel reference: This instruction must be executed at privilege level 0 or in real-address mode; otherwise, a general protection exception #GP(0) will be generated. Specifying a reserved or unimplemented MSR address in ECX will also cause a general protection exception. ... The CPUID instruction should be ...
[ 0.019908327609300613, 0.07659341394901276, 0.07815215736627579, 0.10837250202894211, -0.026589781045913696, -0.16423246264457703, 0.24951307475566864, -0.0785803496837616, 0.06757542490959167, -0.517949640750885, -0.1808859407901764, 0.6491003036499023, -0.39741045236587524, 0.174849405884...
for a single cpu, it demonstrates disabling prefetch for the Xeon in arch/i386/kernel/cpu/intel.c, in the function: static void \_\_cpuinit Intel\_errata\_workarounds(struct cpuinfo\_x86 \*c) The rdmsr function arguments are the msr number, a pointer to the low 32 bit word, and a pointer to the high 32 bit word. ...
[ -0.4113447070121765, -0.00994972512125969, 0.5838394165039062, -0.1592014878988266, -0.09523407369852066, 0.36227428913116455, 0.3188113868236542, -0.3423900306224823, 0.02897527441382408, -0.5020295977592468, -0.3302338123321533, 0.4864771068096161, -0.1405845731496811, 0.2462918311357498...
wrmsr\_on\_cpu(unsigned int cpu, u32 msr\_no, u32 l, u32 h);
[ -0.3707515597343445, 0.0156866442412138, 0.7134695649147034, -0.33025062084198, 0.1050259992480278, 0.3480079472064972, 0.30521807074546814, -0.1455669403076172, -0.06928294897079468, -0.5608171224594116, -0.36303994059562683, 0.37251245975494385, -0.11098187416791916, 0.30273211002349854,...
I received the following error when I tried to run a C# WinForms application on a Windows Server 2003 Standard Edition SP1 machine that was connecting to a SQL server 2000, converting the data in the WinForms app and inserting the converted into a SQL server 2005 application. I am connecting to each database using SSPI...
[ -0.08337950706481934, 0.04516451433300972, 0.42087915539741516, -0.1139034628868103, 0.40087252855300903, 0.004579356871545315, 0.4442276060581207, -0.18332983553409576, -0.024582350626587868, -0.692828357219696, 0.15704138576984406, 0.5911063551902771, -0.4782410264015198, 0.0049340771511...
//meat of transaction... } catch(Exception ex) { throw ex; } Scope.Complete(); } ``` Error Messages: > Exception: The transaction has already > been implicitly or explicitly > committed or aborted. > > > Inner Exception: The transaction has > already been...
[ 0.028123879805207253, -0.035094473510980606, -0.08380230516195297, -0.19400639832019806, 0.042000435292720795, -0.1317266970872879, 0.38432076573371887, -0.26372069120407104, -0.389540433883667, -0.3707849085330963, -0.283746600151062, 0.46394023299217224, -0.31441953778266907, -0.00886792...
or aborted (Exception from > HRESULT: 0x8004D00E) Any one know what might be causing this issue? Check that the DTC is started on the machine where your code is running. Since you are using 2 connections in the transactionscope, the transaction will be promoted to a DTC based transaction. Also, check that the securi...
[ 0.34496617317199707, -0.19484134018421173, 0.23845212161540985, 0.2081659883260727, 0.3275951147079468, -0.4816143214702606, 0.24175585806369781, 0.07429560273885727, -0.666039764881134, -0.5739149451255798, -0.32039323449134827, 0.651180624961853, -0.3823969066143036, 0.16428403556346893,...
From the [Google Results](http://www.google.com/search?client=opera&rls=en&q=change+browser+scrollbar+color+using+css&sourceid=opera&ie=utf-8&oe=utf-8) page, the examples I saw were working only in IE and one case in Opera. Is there any way this can be done consistently across all browsers? Also, is there a differenc...
[ 0.124671071767807, -0.16203120350837708, 0.6023690104484558, -0.0035662890877574682, -0.36708205938339233, 0.15212154388427734, 0.4982694387435913, -0.3177950382232666, -0.19930127263069153, -0.6606566905975342, -0.2749650180339813, 0.4491097331047058, -0.05067932978272438, -0.060756091028...
to style the default scrollbars](http://webkit.org/blog/363/styling-scrollbars/), but this still only applies within the page. **EDIT**: It seems that [MooScroll](http://greengeckodesign.com/projects/mooscroll.aspx) *has* managed to 'replace' the browser's main scrollbar by telling it there's nothing to scroll and the...
[ 0.6129662394523621, 0.03664552420377731, 0.33662089705467224, -0.09071221202611923, 0.0021270697470754385, -0.20045576989650726, 0.4877792000770569, 0.02836822159588337, -0.3215588331222534, -0.6378364562988281, 0.015343351289629936, 0.40955600142478943, -0.05156213045120239, -0.1562390923...
I've been making small scale projects for a while now. I haven't started a large project, yet, because I haven't come across anything which I needed and wasn't already accomplished by some other FOSS. Until now. I want to make a program which will allow users to interactively learn secondary languages (I'm kind of want...
[ 0.4541757106781006, 0.3004817068576813, -0.49747398495674133, 0.11408265680074692, 0.20771612226963043, 0.2842291593551636, 0.5510859489440918, 0.7641443610191345, -0.07784470170736313, -0.6800981163978577, 0.2712501287460327, 0.33181947469711304, 0.31150439381599426, 0.09942403435707092, ...
is going to work and setting up tools to make the project start smoothly and for it to be readily accessible for when other users are ready to contribute to it. I've set up a SourceForge account, a git repository, as well as a document which lists all the features and what the program is going to accomplish. A basic b...
[ 0.3769627511501312, 0.18043477833271027, 0.15097787976264954, -0.0755070298910141, 0.275708943605423, -0.3021896481513977, 0.2634764313697815, 0.21666911244392395, 0.14885938167572021, -0.7299895286560059, -0.33275291323661804, 0.4648502767086029, 0.06374656409025192, -0.29953286051750183,...
the ability to use pre-made jython courses to teach their course, or make their own original ones. I'm hoping this will allow for the software to teach copious languages via many mother tongues. I'm also planning on having a repository of "released courses" which are ones which I (or people who better comprehend the l...
[ 0.5060138702392578, 0.13313432037830353, -0.3507556617259979, 0.3084397315979004, 0.03182914853096008, -0.0782022774219513, 0.543980598449707, 0.5605196952819824, -0.1482902467250824, -0.4009253978729248, -0.20801612734794617, 0.39570102095603943, 0.38857170939445496, -0.2543119192123413, ...
a big project in general? Thank you for your time and effort, Joseph Pond You will always be biting off more than you can chew if you don't believe other people should consider your project worth their time. This is much more of a leadership point than a programming point. But seriously, work it out: is this idea som...
[ 0.6013768911361694, -0.16144196689128876, -0.7194840908050537, 0.3825337290763855, 0.22283923625946045, -0.20147499442100525, 0.2801392078399658, 0.11238094419240952, -0.44677734375, -0.5388954877853394, 0.22354233264923096, 0.14745917916297913, -0.0503576286137104, 0.055101897567510605, ...
you've overlooked some stuff. Nobody can keep that from happening to you. Having said that, if you think that you have a good grasp of the requirements of most of the components and you believe you can thoroughly describe the requirements to others with appropriate skills, I'd say go for it. P.S. -- If you have any mo...
[ 0.5682094693183899, 0.22994817793369293, -0.3093796968460083, 0.2631945013999939, -0.05743010342121124, -0.06508678942918777, 0.2985784709453583, 0.053891971707344055, -0.2700149714946747, -0.29102349281311035, -0.19616319239139557, 0.49007976055145264, 0.5387136936187744, -0.1224015951156...
supervisor gives me a task that I understand thoroughly, I'd rather he didn't show me how to get started or what design or implementation to use. When I have no idea what he's talking about, the roughest of sketches gives me days of a head start.
[ 0.27671194076538086, 0.22608767449855804, -0.2917907238006592, 0.26407724618911743, 0.06353992223739624, 0.23440416157245636, -0.0066273408010602, -0.29403263330459595, -0.24449880421161652, -0.9623949527740479, 0.028101185336709023, 0.46466732025146484, 0.21184200048446655, -0.09085015207...
There is a Debian [g++-4.4](http://packages.debian.org/experimental/g++-4.4) package, but it's not Ubuntu. There are too many system-destroyed scary stories on the web. How can I install g++ 4.4 on Ubuntu? Have a look at this URL. I installed gcc-4.4 (and g++-4.4) from there, which seem to be the most official group o...
[ 0.3968392312526703, 0.11371958255767822, 0.05809330567717552, 0.33134016394615173, -0.27736884355545044, -0.3851495683193207, 0.28741222620010376, 0.04163109511137009, -0.11752232909202576, -0.4350128173828125, -0.23138341307640076, 0.5814874172210693, -0.284347265958786, 0.141371086239814...
I'm looking for a consensus for one or the other * Beta; Release software that is semi- functional to a limited audience and let users guide the process until an application is complete. * No Beta; Define all functionality based on previous user-feedback and/or business logic, build the software, and test it with what...
[ 0.8985869884490967, 0.0810757502913475, -0.2449725717306137, -0.10205049067735672, -0.10258936136960983, -0.3226288855075836, 0.15086068212985992, 0.07380130887031555, 0.06898784637451172, -0.5457339882850647, -0.18607932329177856, 0.4873630702495575, -0.40188297629356384, 0.19836546480655...
[WP-o-Matic](http://wordpress.org/extend/plugins/wp-o-matic/) is a wordpress plugin to auto post based on some configured feeds, it read feeds everything time interval i setup, its working on my blog, my blog is on shared windows web hosting, i want to know how it auto work like that, and because i am on a shared h...
[ 0.12183224409818649, -0.17723581194877625, 0.5159613490104675, 0.1601588875055313, -0.3673597276210785, -0.08525922894477844, 0.17997512221336365, 0.15174157917499542, -0.5138711929321289, -0.7094660401344299, -0.06724387407302856, 0.25322210788726807, -0.2939424216747284, -0.0998847931623...
Technically it should iterate from 0 to rangeLength outputting the user name of the c[i][0].from\_user...but from looking at example online, they seem to replace the brackets with dot notation. I have the following code: ``` <div id="right_pod"> {%for i in rangeLength%} <div class="user_pod" > {{c.i.0.from...
[ -0.006704255472868681, 0.045482195913791656, 0.7559283375740051, -0.2971203327178955, 0.12106942385435104, -0.09792493283748627, 0.12728072702884674, -0.37815916538238525, -0.09529387950897217, -0.567054271697998, 0.06416697055101395, 0.6457351446151733, -0.04713049158453941, 0.12373026460...
<div class="user_pod"> {{ i.0.from_user }} </div> {% endfor %} ```
[ 0.03586706146597862, 0.09012521803379059, 0.37102195620536804, -0.21353653073310852, 0.054484978318214417, -0.01426379382610321, 0.17420023679733276, -0.09952700138092041, 0.18174044787883759, -0.684962809085846, -0.3654749095439911, 0.3321267366409302, -0.29157769680023193, 0.543092370033...
Okay, it took me a little while to narrow down this problem, but it appears python is doing this one purpose. Can someone explain why this is happening and what I can do to fix this? File: library/testModule.py ``` class testClass: myvars = dict() def __getattr__(self, k): if self.myvars.has_key(k):...
[ 0.2106020301580429, 0.17489546537399292, -0.16350141167640686, -0.11861478537321091, -0.017785144969820976, -0.04688091203570366, 0.6534805297851562, -0.13422712683677673, -0.11282392591238022, -0.586094319820404, -0.043619271367788315, 0.6474087238311768, -0.2319757491350174, 0.0687497258...
l = [] for k, v in self.myvars.iteritems(): l.append(str(k) + ":" + str(v)) return " - ".join(l) ``` test.py ``` from library import testModule #I get the same result if I instantiate both classes one after another c1 = testClass() c1.foo = "hello" c2 = testClass() print("c1: " + str(c...
[ -0.14776349067687988, -0.2037493735551834, 0.25280243158340454, -0.36198094487190247, 0.3343377113342285, 0.1943569779396057, -0.02466205134987831, -0.23125353455543518, -0.13044802844524384, -0.6626089811325073, -0.03039332665503025, 0.6042405366897583, -0.322236567735672, -0.027739295735...
of a lasting object.. is this the case? `myvars` is a property of the *class*, not the *instance*. This means that when you insert an attribute into `myvars` from the instance `c1`, the attribute gets associated with the class `testClass`, not the instance `c1` specifically. Since `c2` is an instance of the same class,...
[ -0.14473086595535278, 0.19773150980472565, 0.3080904185771942, -0.2625412344932556, -0.0801696926355362, -0.05386719852685928, 0.3719838559627533, -0.2639160752296448, -0.2206389158964157, -0.49856698513031006, -0.19388091564178467, 0.442949116230011, -0.13515418767929077, 0.43709155917167...
return self.myvars[k] def __setattr__(self, k, v): self.myvars[k] = v def __str__(self): l = [] for k, v in self.myvars.iteritems(): l.append(str(k) + ":" + str(v)) return " - ".join(l) ```
[ -0.2958706021308899, 0.15578624606132507, 0.5294438600540161, -0.44339340925216675, 0.16941194236278534, 0.5374767780303955, 0.4247576892375946, -0.29824063181877136, 0.012629315257072449, -0.6106535196304321, -0.037698324769735336, 0.6091204881668091, -0.37542515993118286, 0.2601593732833...
So we have a C# WinForms project with a Form that contains a bazillion `UserControl`s. Each `UserControl` naturally exposes all the `UserControl` methods, properties, etc. in addition to its own specific members. I've been thinking that one way to reduce the complexity of dealing with these `UserControl`s is to access...
[ 0.32147911190986633, 0.0763508602976799, 0.08208978176116943, 0.02989753894507885, 0.12149011343717575, -0.08775299042463303, -0.08880745619535446, 0.0017832351149991155, 0.26328372955322266, -0.7253808379173279, -0.2716298997402191, 0.353466272354126, -0.20933721959590912, 0.2668282687664...
var uc = new SomeCustomerNameUserControl(); this.Controls.Add(uc); cName = uc; } } ``` `SomeCustomerNameUserControl` implements `ICustomerName`, naturally, and `ICustomerName` contains the specific properties I really care about (say, `FirstName` and `LastName`). In this way I can refer to the `Us...
[ -0.24217407405376434, 0.26098668575286865, 0.4697011709213257, -0.24956226348876953, 0.20396889746189117, -0.08184017986059189, 0.007977690547704697, 0.012375581078231335, 0.08332596719264984, -0.640508234500885, -0.3159080147743225, 0.6042571067810059, 0.017005600035190582, 0.402769178152...
way I can do this but still see the `UserControl` on the form's design surface? **EDIT:** One way to do this, which isn't overly complicated, is to put the controls on a base form. By default (in C#) the control members are private. Then I create a property for each control exposing it through the interface. However,...
[ 0.6307117938995361, -0.1289825737476349, 0.4893755316734314, 0.2435510754585266, -0.196404829621315, -0.5902325510978699, 0.0457705594599247, -0.3947570025920868, 0.16909700632095337, -0.5374133586883545, 0.1425444334745407, 0.6110005974769592, -0.17450138926506042, -0.051660798490047455, ...
false in the Properties window to suppress generation of a member. You could then use some other technique in the constructor to assign your cName reference, e.g.: ``` foreach(Control control in this.Controls) { cName = control as ICustomerName; if (cName != null) break; } ``` cName would then be the only r...
[ -0.05535673722624779, 0.1634250283241272, 0.03960408642888069, 0.10767167061567307, 0.19831174612045288, -0.31938108801841736, 0.40697169303894043, -0.14373941719532013, 0.0361829437315464, -0.5108174681663513, -0.17276333272457123, 0.22744986414909363, -0.41434529423713684, 0.549151599407...
Is it true that a service written in C# is unable to give visual feedback to the desktop? I understand that services start up before user logon and at that point ther is no desktop available. My question then, apart from logging events in the system event log which is not a very efficient way of communicating to the u...
[ 0.7212027907371521, -0.02503104694187641, 0.23440775275230408, 0.0848551020026207, -0.31000465154647827, -0.012379731982946396, 0.24275797605514526, 0.15057748556137085, -0.3666853606700897, -0.4837096035480499, 0.30880728363990784, 0.38446569442749023, -0.33959609270095825, 0.035503629595...
this messagebox needs to be shown. Please assume that it needs to be shown as I don't want responses on "good practice". Not at this point at least. A windows service should not perform interactions with a user. Instead you should create a seperate control or configuration application - often put into the system tray -...
[ 0.033142827451229095, -0.03253690153360367, 0.2834734320640564, 0.22128230333328247, -0.05175325274467468, -0.17679829895496368, 0.30924275517463684, 0.27218759059906006, -0.28532618284225464, -0.6170743107795715, -0.28075429797172546, 0.3263130486011505, -0.24202072620391846, -0.070778019...
from C#.
[ -0.08847922831773758, 0.10913237929344177, 0.2560165524482727, -0.1489720642566681, -0.3830377459526062, 0.13391783833503723, 0.0746149942278862, -0.003953190986067057, -0.4183838367462158, -0.33189234137535095, -0.5563967823982239, 0.35776349902153015, -0.10263769328594208, 0.238316282629...
I've been working in ASP.NET for several years now (since the 1.0 days!), but I've never been formally instructed. I'm fully capable of doing pretty much anything I want and I've built several production-level, data-driven sites, including one that does over a million in sales a year (according to the owner). But I'm s...
[ 0.9766733646392822, 0.08814895898103714, 0.1256989985704422, -0.14092545211315155, 0.01667773723602295, -0.19634611904621124, 0.19974017143249512, 0.3727363348007202, -0.1823720484972, -0.3986653983592987, -0.07478249073028564, 0.4225986897945404, 0.358888179063797, 0.08667327463626862, ...
it's because of my lack of formal training. Does anyone have any ideas on the best way to fill in these gaps without having to rehash the fundamentals? Thanks 1) Read the Code of popular Open Source Projects. There are a few that have some really good practices in place. I recommend checking out [BlogEngine.NET](htt...
[ 0.7354587316513062, -0.1310039460659027, -0.04425521567463875, 0.07641518861055374, -0.07160335034132004, -0.3885089159011841, 0.21297672390937805, -0.04025162383913994, -0.5005905628204346, -0.6181647181510925, -0.07591312378644943, 0.581205427646637, 0.0007843513158150017, -0.22332258522...
book that covers some of the newer features. Here's a good book that shows of some of the new features in C# 3.0: [C# 3.0 Design Patterns](https://rads.stackoverflow.com/amzn/click/com/059652773X) 3) It may seem odd, but reading up on other languages/platforms (such as Ruby on Rails) will help you in the way you des...
[ 0.2252451479434967, 0.2478448748588562, -0.2624416649341583, 0.2677749693393707, -0.07526340335607529, -0.22213220596313477, 0.43167567253112793, -0.49398621916770935, -0.047153256833553314, -0.5062403082847595, 0.06428395211696625, 0.6984263062477112, 0.03428015485405922, -0.4173727929592...
Handbook of Software Construction](https://rads.stackoverflow.com/amzn/click/com/0735619670)
[ -0.3815959393978119, 0.23058873414993286, 0.33973705768585205, 0.07321419566869736, 0.15551941096782684, -0.11380884051322937, 0.03872254490852356, -0.735981285572052, -0.18292053043842316, -0.13214033842086792, -0.2013702094554901, 0.6183992028236389, -0.048479143530130386, -0.17252680659...
I am retreiving a class from a webservice and in this class there is a generic list, but somehow it is being turned into an ObservableCollection. I configured the webservice collection type to Generic Lists but to no avail. Is there a reason as to why this is happening? 1) Read the Code of popular Open Source Projects....
[ 0.585664689540863, -0.23299431800842285, 0.03538033366203308, 0.03206219896674156, -0.17305207252502441, -0.3102470934391022, 0.16298039257526398, -0.007912866771221161, -0.38186946511268616, -0.7152606844902039, 0.09728847444057465, 0.42395293712615967, -0.14005593955516815, 0.14076685905...
working with a particular framework since a much earlier version. In this case, it can be really useful to pick up a book that covers some of the newer features. Here's a good book that shows of some of the new features in C# 3.0: [C# 3.0 Design Patterns](https://rads.stackoverflow.com/amzn/click/com/059652773X) 3) ...
[ 0.4920368790626526, 0.14820636808872223, -0.2693835496902466, 0.17850829660892487, -0.21696637570858002, -0.1928650289773941, 0.41189172863960266, -0.3248327672481537, -0.30580198764801025, -0.47303494811058044, 0.16708536446094513, 0.7980141639709473, 0.018079420551657677, -0.420205473899...
books I recommend are: [The Pragmatic Programmer: From Journeyman to Master](https://rads.stackoverflow.com/amzn/click/com/020161622X) [Practices of an Agile Developer: Working in the Real World](https://rads.stackoverflow.com/amzn/click/com/097451408X) [Code Complete: A Practical Handbook of Software Construction](...
[ -0.12732869386672974, 0.27845314145088196, 0.08631670475006104, 0.3434491455554962, 0.1619865745306015, -0.06745514273643494, 0.33443644642829895, -0.6717461943626404, -0.03522829711437225, -0.48332616686820984, -0.13298377394676208, 0.6460588574409485, 0.19627660512924194, -0.404582560062...
I would like to reproduce UIScrollView's flick-to-scroll behavior, but I don't want to use (or can't use) that class. What can I do? Okay, I've answered this by implementing my own library that captures the dynamics of UIScrollView. What’s useful about my code is that it is independent of coordinate system, animation ...
[ 0.25563865900039673, -0.15448178350925446, 0.5036101341247559, 0.10575100034475327, 0.1271512806415558, 0.05952270328998566, -0.020132295787334442, 0.002311544958502054, -0.2995222210884094, -0.5081999897956848, 0.2631338834762573, 0.6709645986557007, -0.21356138586997986, -0.1042613610625...
very last direction is used to compute the scrolling motion. If you try to build this code yourself, however, you’ll quickly discover that simply using the last two points to compute the direction of motion isn’t going to cut it. Instead, my code keeps a short history of touches and uses linear interpolation to determ...
[ -0.12446297705173492, 0.053755924105644226, 1.0558569431304932, 0.03758414462208748, 0.17869237065315247, 0.2526424825191498, -0.1711651086807251, -0.024591660127043724, -0.12313535809516907, -0.7401315569877625, 0.21366237103939056, 0.3573899269104004, 0.06699136644601822, 0.0516810566186...
Just wondering if there is a Python [MTA](http://en.wikipedia.org/wiki/Mail_transfer_agent). I took a look at [smtpd](http://docs.python.org/library/smtpd.html) but they all look like forwarders without any functionality. Yes, Twisted includes a framework for building SMTP servers. There's a simple Twisted-based email ...
[ 0.437221497297287, -0.18196947872638702, 0.3621189296245575, -0.0785607323050499, -0.44104620814323425, 0.1764782965183258, 0.2342222034931183, 0.313400536775589, -0.5871379375457764, -0.2955601215362549, 0.20537176728248596, 0.021463774144649506, -0.24027477204799652, 0.21791931986808777,...
I have the enum structure as follows: ``` public enum MyEnum { One=1, Two=2, Three=3 } ``` Now I want to get a list of `MyEnum`, i.e., `List<MyEnum>` that contains all the `One`, `Two` `Three`. [Again](https://stackoverflow.com/questions/782096/convert-listt-to-object), I am looking for a one liner that doe...
[ 0.021999865770339966, 0.3107081353664398, 0.4878336191177368, -0.14370450377464294, -0.08719710260629654, 0.024243364110589027, -0.11458005756139755, -0.2777145206928253, -0.16919325292110443, -0.6538987159729004, -0.11382141709327698, 0.3609245717525482, -0.2753988206386566, 0.32510754466...
(MyEnum)Enum.Parse(typeof(MyEnum), exEnum)) .ToList(); ``` A better suggestion? ``` Enum.GetValues(typeof(MyEnum)).Cast<MyEnum>(); ```
[ 0.02987240068614483, 0.2675650715827942, 0.4254903197288513, -0.15305586159229279, 0.043919458985328674, 0.6534669995307922, 0.1951623558998108, -0.30776217579841614, -0.01701372303068638, -0.674984872341156, -0.5684528946876526, 0.002508883597329259, -0.27382606267929077, 0.04228793457150...
My understanding is that Java's implementation of regular expressions is based on Perl's. However, in the following example, if I execute the same regex with the same string, Java and Perl return different results. Here's the Java example: ``` public class RegexTest { public static void main( String args[] ) { ...
[ 0.2232118397951126, 0.07322575896978378, 0.03170844167470932, -0.17886491119861603, -0.21357041597366333, -0.08993738889694214, 0.549771249294281, -0.12116242945194244, -0.07339563220739365, -0.45590701699256897, -0.10098856687545776, 0.5991731286048889, -0.5784170627593994, 0.042474523186...
test of regular expressions.'; print ( $sentence =~ /\w/ ? "Matches" : "Doesn't match" ) . "\n"; ``` This returns: Matches To me, the Perl result makes sense. It looks for a match for a single word character. I don't understand why Java doesn't consider it a match. What's the reason for the difference? The Java `mat...
[ 0.3123352527618408, -0.10978126525878906, -0.0021717397030442953, 0.014286616817116737, -0.25775694847106934, -0.11435007303953171, 0.37291383743286133, -0.3817407190799713, 0.18657854199409485, -0.539474368095398, -0.09293018281459808, 0.4661114811897278, -0.5383320450782776, -0.248113721...
I'm looking for an efficient algorithm for scrambling a set of letters into a permutation containing the maximum number of words. For example, say I am given the list of letters: {e, e, h, r, s, t}. I need to order them in such a way as to contain the maximum number of words. If I order those letters into "theres", it...
[ -0.2272322177886963, 0.29386764764785767, 0.24593456089496613, -0.037769969552755356, 0.03594168275594711, 0.7863302826881409, 0.35030701756477356, -0.1778368204832077, -0.34380972385406494, -0.6053917407989502, -0.4377455413341522, 0.15063618123531342, 0.06218858063220978, 0.1710565537214...
(contain the most words). A naive algorithm would be to try and score every permutation. I believe this is O(n!), so 720 different permutations would be tried for just the 6 letters above (including some duplicates, since the example has e twice). For more letters, the naive solution quickly becomes impossible, of cou...
[ -0.12055230885744095, 0.495476096868515, 0.12127324193716049, -0.14865173399448395, -0.13886988162994385, 0.43993598222732544, 0.7245858907699585, -0.3675956130027771, -0.12490735948085785, -0.7168884873390198, -0.08333554863929749, 0.3798919916152954, 0.06736341863870621, 0.19839622080326...
the [Aho-Corasick](https://en.wikipedia.org/wiki/Aho-Corasick_algorithm) algorithm to score permutations. It searches for each word in the dictionary in just one pass through the text, so I believe it's quite efficient. This also means I have all the words stored in a [trie](https://en.wikipedia.org/wiki/Trie), but if ...
[ -0.13803482055664062, 0.27164125442504883, 0.4720260202884674, -0.16826364398002625, -0.028149284422397614, 0.6204339861869812, 0.3099980354309082, -0.5188493728637695, 0.10675930231809616, -0.5544797778129578, 0.1410231739282608, 0.31224167346954346, -0.025966541841626167, -0.146367520093...
never changes, but several different lists of letters need to be ordered. I am considering trying a [path finding algorithm](https://en.wikipedia.org/wiki/Pathfinding). I believe I could start with a random letter from the list as a starting point. Then each remaining letter would be used to create a "path." I think t...
[ 0.1238824874162674, -0.03408230468630791, 0.24507400393486023, 0.05689534172415733, -0.024418167769908905, 0.3598536550998688, 0.46115511655807495, 0.009218546561896801, -0.38600867986679077, -1.0688755512237549, 0.1755649894475937, 0.07322587072849274, -0.29970473051071167, 0.032478433102...
a random letter. Then the dictionary trie would be searched for "rich" branches containing the remain letters. Dictionary branches containing unavailable letters would be pruned. I'm a bit foggy on the details of how this would work exactly, but it could completely eliminate scoring permutations. You might try [simulat...
[ 0.07037185877561569, -0.18703968822956085, 0.2346566915512085, 0.21040385961532593, -0.24879461526870728, 0.32629039883613586, 0.3239825367927551, -0.3119674623012543, -0.0965946614742279, -0.4546956717967987, 0.25605905055999756, 0.2522912323474884, -0.07603837549686432, -0.01713537424802...
simple like swapping a pair of letters should work fine.
[ 0.6716755032539368, -0.03738682344555855, -0.24993093311786652, 0.13890302181243896, 0.135007843375206, -0.009198006242513657, -0.15490271151065826, 0.027948107570409775, 0.11514266580343246, -0.4105321168899536, 0.11789330840110779, 0.3434869050979614, -0.197861909866333, -0.4097717106342...
I need to create and modify tasks in Windows Task Scheduler on Windows Server 2003 from an ASP.NET web application. The Network Service that the web app runs under is unable to make the changes. It errors with an System.UnauthorizedAccessException exception. It works fine running from Visual Studio on my desktop. Wha...
[ 0.03602413088083267, 0.20708055794239044, 0.2875417470932007, -0.040403228253126144, 0.11708972603082657, 0.0865563377737999, 0.3181357681751251, -0.12512260675430298, -0.3994389772415161, -0.7831611633300781, 0.19957487285137177, 0.8437156677246094, -0.2681942284107208, -0.001568806706927...
Where can I find a good tutorial on TDD with ASP.NET MVC 1.0? I'd prefer a video tutorial but a text tutorial would be fine as well. I have a new project starting soon and I want to start off on the right foot. The [Storefront Videos](http://www.asp.net/learn/mvc-videos/#MVCStorefrontStarterKit) from ASP.NET are a must...
[ 0.33959734439849854, -0.2286641150712967, 0.3705582320690155, 0.302974671125412, -0.07170164585113525, -0.15655718743801117, 0.2828177511692047, 0.49958091974258423, -0.5075118541717529, -0.6083358526229858, 0.010277943685650826, 0.6659336686134338, 0.5396739840507507, 0.29154807329177856,...
I have a distributed application using ClickOnce. I went to do an update and got an error about the certificate expiring. I noticed on the signing tab that I could uncheck signing the ClickOnce manifests. I did this and successfully published my application. It worked fine for the first seven users - but just had a use...
[ 0.5630528926849365, 0.016977736726403236, 0.684029221534729, 0.005531765520572662, 0.08886923640966415, -0.31833991408348083, 0.2563565969467163, -0.04684949293732643, -0.43773749470710754, -0.8244256377220154, 0.23226778209209442, 0.5548129081726074, -0.31450191140174866, 0.23579572141170...
a bunch of reading about the problems/bugs with MS ClickOnce and expiring certificates, and I am hoping to avoid them by simply not signing. The certificate that expired was just a generic one that seemed to be created when setting up ClickOnce originally. Is there a problem going from a signed manifest to unsigned man...
[ 0.5035958290100098, 0.14808787405490875, 0.4905315935611725, 0.12624727189540863, 0.4278988540172577, -0.46150463819503784, 0.3206738829612732, 0.09055211395025253, -0.4492219090461731, -0.6095223426818848, 0.019313156604766846, 0.48540398478507996, -0.34398773312568665, 0.4677216708660126...
problem was fixed in one of the service packs to .NET 2. Installing the latest framework (3.5 SP1) will definitely include the fix. You can just switch to a renewed certificate and redeploy. If really want to go unsigned, I think the fix is same - make sure your users have .NET 3.5 SP1 and make it a prerequisite in yo...
[ 0.08029930293560028, 0.008137719705700874, 0.5961402654647827, 0.1372513324022293, 0.22816139459609985, -0.07336654514074326, 0.40424644947052, 0.1786513775587082, -0.5331422090530396, -0.5630558133125305, -0.03803233057260513, 0.6479571461677551, -0.404633104801178, -0.025493621826171875,...
When I run some programs over SSH, such as `firefox &`, I get an error ``` Error: no display specified ``` I would like to open many displays, still showing the `stdout` of each program. **Initial Question:** How can I specify the display to get a many-displayed program? Pablo Santa Cruz gives me the following ...
[ 0.36149030923843384, 0.20570853352546692, 0.542506754398346, 0.009485479444265366, -0.13175514340400696, -0.25357165932655334, 0.035812318325042725, 0.2022285759449005, -0.21264256536960602, -0.5483140349388123, 0.10490575432777405, 0.7195315361022949, -0.5426892042160034, 0.12806124985218...
which runs on a specific machine, and you have X clients (like firefox) that try to connect to that server to get their information displayed. Often (on "home" machines), the client and server run on the same box and there's only one server, but X is powerful enough that this doesn't need to happen. It was built with ...
[ 0.5945457220077515, -0.12309066206216812, 0.4313463866710663, 0.3162606954574585, 0.33926668763160706, -0.1151643618941307, 0.0348648838698864, 0.14574570953845978, -0.3578945994377136, -0.4797704517841339, -0.057221610099077225, 0.12327416986227036, -0.4598211646080017, 0.0718811154365539...
the windows suddenly start appearing locally. In order for a client to interact with a user, it needs to know how to *find* the server. There are a number of ways to do this. Many clients allow the `-display` or `--display`option to specify it: ``` xeyes -display paxbox1.paxco.com:0.0 ``` Many will use the `DISPLAY...
[ 0.1319253295660019, 0.15867595374584198, 0.5465611815452576, -0.1953539252281189, -0.023211248219013214, 0.29753729701042175, -0.09177975356578827, 0.388613760471344, -0.40953949093818665, -1.1766477823257446, -0.0008421947131864727, 0.39018651843070984, -0.42005038261413574, 0.18811580538...
the same rule as any other IP address; it can be a resolvable DNS name (including `localhost`) or a specific IP address (such as 192.168.10.55). The second part is X-specific. It gives the X "display" (X server) number and screen number to use. The first (display number) generally refers to a group of devices containi...
[ 0.12149752676486969, -0.08660609275102615, 0.6524927020072937, 0.1357744187116623, -0.034559376537799835, -0.15767765045166016, -0.1332332342863083, 0.13782380521297455, -0.18968133628368378, -0.820528507232666, -0.40656599402427673, 0.031063809990882874, -0.32345595955848694, 0.1682193428...
| +-----------------+ | | | | +----------+----+ +----------+----+ | | |Display :0| | |Display :1| | | | +----------+ | +----------+
[ -0.7196692824363708, 0.26774662733078003, 0.4985869228839874, 0.0487452894449234, -0.22297145426273346, 0.4827454090118408, 0.07345614582300186, -0.16148371994495392, -0.006891485303640366, -0.4300041198730469, -0.42523324489593506, 0.29204076528549194, 0.026350121945142746, 0.123546235263...