text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
for is the [acts\_as\_state\_machine gem](http://github.com/rubyist/aasm/tree/master). If you're unfamiliar with State Machines, take a look [here](http://en.wikipedia.org/wiki/Finite_state_machine).
[ 0.006621638312935829, -0.048729971051216125, -0.26250940561294556, -0.3144499659538269, -0.06630276143550873, 0.2062169909477234, 0.2696303129196167, -0.34742671251296997, -0.3803975582122803, -0.6450339555740356, -0.11285296827554703, 0.4429289698600769, -0.3809494376182556, 0.17536067962...
I am having a nightmare, been trying all day with this, and searched google with no success. I have a little navigation that is floated to left and I wanted to make it work for RTL language. It worked fine in FireFox but IE6 does not display it at all. Can someone tell me why? The HTML is the default markup.. nothing...
[ -0.1535787731409073, -0.09151315689086914, 0.7762898802757263, -0.08016092330217361, -0.028330015018582344, -0.2081838697195053, 0.6462380886077881, 0.1281120479106903, -0.2913936674594879, -0.7797739505767822, -0.19965702295303345, 0.5585901141166687, -0.32666850090026855, 0.0642463564872...
padding-left: 10px; background: url(img/topnav_br.png) no-repeat left center; } ``` The point is that it will be floated to left, but LI items will start from right to left because its RTL lanuage.. but this code above shows nothing in IE6 but works in FF. Somebody please tell me what I am doing wrong here. Tha...
[ -0.11206088960170746, 0.06412506848573685, 0.9428550601005554, -0.3577890694141388, -0.07792611420154572, -0.02862713858485222, 0.16445016860961914, -0.2888873219490051, -0.4001321792602539, -0.8255814909934998, -0.3050477206707001, 0.2636706233024597, -0.13424909114837646, 0.1277096271514...
the ul (and actually 30px off the display window with a double margin on the left). We do not know what your containers are (if any) or what doctype (if any) you are using. We do not know what else is being floated. ``` <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dt...
[ -0.08346455544233322, -0.3073667585849762, 1.167228102684021, 0.0940130427479744, -0.32172349095344543, 0.15740659832954407, -0.5008745789527893, -0.32632672786712646, -0.34639981389045715, -0.650922417640686, -0.16515590250492096, 0.46752288937568665, -0.08657118678092957, 0.0143793756142...
padding-left: 10px; background-color: pink; } </style> </head> <body> <div id="topnav"> <ul> <li><a href="#">Selection 1</a></li> <li><a href="#">Selection 2</a></li> </ul> </div> <p>This is where the page content will go.</p> </body> </html> ```
[ -0.31010228395462036, -0.37357279658317566, 1.0726771354675293, -0.04357593134045601, -0.06997864693403244, 0.21538656949996948, -0.47947514057159424, -0.3299100995063782, -0.27856388688087463, -0.7797160148620605, -0.4369129538536072, 0.07299820333719254, -0.2547360062599182, -0.287542432...
How can I use Javascript to display the information message next to the mouse pointer when the mouse pointer hovers over a link or button? The information will always be next to the mouse pointer until the mouse moves out of the link/button. With jQuery, you would use the following methods: * <http://docs.jquery.com/E...
[ -0.07202700525522232, -0.27267593145370483, 0.6356412768363953, -0.06605352461338043, 0.15442277491092682, 0.10049879550933838, -0.21480011940002441, -0.19947397708892822, -0.13638508319854736, -1.0558334589004517, 0.003879929194226861, 0.6025071144104004, -0.06770583242177963, -0.25280177...
In our company there are many teams who constantly submit build request work items to us via TFS. I know that it's possible to trigger a build from a check-in or on a schedule, but this is not what we need. We would like for the team managers to be able to create a build request work item in TFS that, when saved, would...
[ 0.9068622589111328, 0.29520824551582336, 0.11938965320587158, -0.15492485463619232, 0.08885052055120468, -0.0024335230700671673, 0.05981440097093582, -0.09753265976905823, -0.23698459565639496, -0.5233985185623169, 0.12368408590555191, 0.4579261839389801, 0.06683212518692017, -0.0409415178...
it a good idea? If not, why? How far can you take automation of the build process? Thanks! Answer to your first question is NO, not out of the box. I would argue that firing builds based off of Build work item types is not a good idea. Work items can not be locked down by type and thus you could not isolate the creati...
[ 0.36151376366615295, 0.06171414256095886, 0.02459472045302391, 0.047345638275146484, 0.02081339992582798, 0.0071270642802119255, 0.04405424743890762, -0.3162185549736023, -0.37081071734428406, -0.11462786793708801, 0.03789825737476349, 0.6183101534843445, -0.018372295424342155, 0.106187902...
as far as you wish using the team build APIs. MS has made TFS and Team Build very extensible.
[ 0.23465022444725037, -0.20089325308799744, 0.02661898545920849, 0.0796739012002945, -0.049335867166519165, -0.43612968921661377, 0.23077277839183807, 0.05380841717123985, -0.133472740650177, -0.7799346446990967, -0.2393212914466858, 0.6327825784683228, -0.07819157093763351, -0.185878127813...
If I have two ranges that overlap: ``` x = 1..10 y = 5..15 ``` When I say: ``` puts x.include? y ``` the output is: ``` false ``` because the two ranges only overlap partially. But if I want it to be "true" when there is partial overlap between two ranges, how would I write that? In other words I need a wa...
[ 0.35857823491096497, 0.3547380864620209, 0.3307245969772339, -0.338483601808548, -0.10766565054655075, -0.06957605481147766, 0.440978467464447, -0.4042612314224243, -0.04289920628070831, -0.3979582190513611, -0.15023967623710632, 0.5670269727706909, -0.3348606526851654, 0.05450017750263214...
& y.to_a).empty? ```
[ 0.30422040820121765, 0.663434624671936, 0.11661599576473236, -0.17473137378692627, 0.17994484305381775, -0.005438078660517931, -0.08322133868932724, 0.2106408029794693, -0.2411598265171051, -0.2688466012477875, -0.27893581986427307, 0.6051239967346191, -0.47209814190864563, 0.3218880295753...
I have been tasked with exploring the possibility of offline access of my webapp. What are people's experiences using google gears with rails? I am aware of the [gearsonrails](http://gearsonrails.googlecode.com) project, but it has some really strange constructs and doesn't appear to be under significant, active develo...
[ 0.22282062470912933, 0.14122915267944336, 0.2364782989025116, 0.23261836171150208, 0.11571028083562851, 0.18882320821285248, 0.3631255626678467, 0.444610595703125, -0.1554148942232132, -0.4726003110408783, 0.1604613959789276, 0.5579860806465149, 0.03185008466243744, 0.3415910005569458, 0...
a key-value store.) At this point, none of the major browsers completely implement the (developing) standard. So you have to make the decision between developing against a de facto obsolete plugin, or targeting an emerging standard.
[ 0.2595708966255188, 0.09294534474611282, 0.017302226275205612, 0.08213111758232117, 0.16911986470222473, -0.36467069387435913, 0.4258595108985901, 0.10258187353610992, 0.09339966624975204, -0.4683452844619751, -0.47869688272476196, 0.6097971200942993, -0.23121163249015808, 0.18435272574424...
I come to you this time with a question to do with .NET. I was given the challenge of finding out the four steps involved with postback. The exact challenge is: "There are four methods executed each time there is a postback. Describe and identify each." From what I can tell (this is a challenge for a .NET class), po...
[ 0.4070035517215729, -0.057132795453071594, 0.3741031587123871, 0.32016751170158386, -0.30829399824142456, 0.126570463180542, 0.2947811782360077, -0.14441339671611786, -0.27793365716934204, -0.8704119920730591, 0.15734821557998657, 0.05620478093624115, -0.1590954065322876, 0.029942115768790...
from Reflectoring the source at some point: 1. LoadScrollPosition 2. PerformPreInit * Fire PreInit Event * Initialize Themes * ApplyMasterPage 3. InitRecursive * Recursively: + generate naming container ids for controls + set control.page property + init controls * set Page.Form property * Apply skin * Fi...
[ 0.26164624094963074, -0.1810978502035141, 0.7460081577301025, -0.1950719803571701, -0.3834713101387024, -0.003078828100115061, 0.3512994945049286, -0.919953465461731, -0.009042464196681976, -0.4997794032096863, -0.23672880232334137, 0.5660521388053894, -0.08874307572841644, -0.154613137245...
controls implementing IPostBackEventHandler * Validate 12. OnLoadComplete * Fire LoadComplete Event 13. PreRender 14. SaveState 15. Render That makes LoadAllState, ProcessPostData, RaiseChangedEvents, and RaisePostBackEvent the ones that are only done on PostBack.
[ 0.13728967308998108, -0.24820874631404877, 0.6160985827445984, 0.023879719898104668, 0.025678986683487892, -0.2357872724533081, 0.1995324343442917, -0.5560739636421204, 0.009644318372011185, -0.5065149068832397, -0.18548117578029633, 0.5693156719207764, -0.1386728733778, -0.185900419950485...
I came up with a basic one to help automate the process of removing a number of folders as they become unneeded. ``` #!/bin/bash rm -rf ~/myfolder1/$1/anotherfolder rm -rf ~/myfolder2/$1/yetanotherfolder rm -rf ~/myfolder3/$1/thisisafolder ``` This is evoked like so: ``` ./myscript.sh <{id-number}> ``` The proble...
[ 0.033267080783843994, 0.04826465994119644, 0.27654069662094116, 0.11874464154243469, -0.11004411429166794, -0.04024596884846687, 0.1651540994644165, -0.40825265645980835, -0.2179262787103653, -0.37857091426849365, 0.2333172708749771, 0.6152889132499695, -0.05672364681959152, -0.17154990136...
exists; before continuing with the script. ``` #!/bin/sh die () { echo >&2 "$@" exit 1 } [ "$#" -eq 1 ] || die "1 argument required, $# provided" echo $1 | grep -E -q '^[0-9]+$' || die "Numeric argument required, $1 provided" while read dir do [ -d "$dir" ] || die "Directory $dir does not exist" rm -...
[ 0.1338186264038086, 0.12589643895626068, 0.7707492709159851, -0.11047255992889404, 0.2545088827610016, -0.317276269197464, 0.6473454833030701, -0.41729503870010376, 0.026798566803336143, -0.48021405935287476, -0.16517822444438934, 0.35554853081703186, -0.18616047501564026, 0.19367632269859...
switched from `==` to `eq`. This should be a portable, POSIX compliant script as far as I can tell; it doesn't use any bashisms, which is actually important because `/bin/sh` on Ubuntu is actually `dash` these days, not `bash`.
[ 0.23388342559337616, -0.27688294649124146, 0.4241787791252136, -0.22741176187992096, -0.5445115566253662, -0.26810961961746216, 0.401978075504303, 0.33230718970298767, -0.17900559306144714, -0.7111051082611084, -0.32552874088287354, 0.47066837549209595, -0.3509940207004547, 0.1536031514406...
I am getting this error when trying to build a winforms solution: *The located assemblys manifest destination does not match the assemblys reference.* Maybe you will find this article useful: <http://blogs.msdn.com/junfeng/archive/2004/03/25/95826.aspx>. Typically this indicates that the assembly found during executi...
[ 0.28834041953086853, 0.05888151004910469, -0.10279432684183121, -0.14125089347362518, -0.018889741972088814, -0.07235036045312881, 0.45439356565475464, 0.20502419769763947, -0.2778414487838745, -0.5055065155029297, -0.0023785678204149008, 0.34881114959716797, -0.20828887820243835, 0.232943...
How would I go about changing the sound volume in c++ win32? Also how would I mute/unmute it? Thanks for the help! Two options: 1. There's [an answer to that question here on SO (changing the master volume from C++, which also includes SetMute, etc.)](https://stackoverflow.com/questions/294292/changing-master-volume-l...
[ 0.24557074904441833, -0.058199960738420486, 0.3151446580886841, -0.05596882477402687, -0.07889267057180405, -0.04186105728149414, 0.2039511352777481, -0.4638693034648895, -0.2504255473613739, -0.5334728956222534, -0.05773531645536423, 1.2078392505645752, -0.05972495675086975, 0.04753796383...
I've a list of elements editable via a simple AJAX/jQuery edit button, which works great. But when I try editing the same field a second time it doesn't want to play ball. 1. **EDIT** - AJAX returns a tinyMCE textarea containing content from MySQL 2. **SAVE** - AJAX posts tinyMCE contents to MySQL and displays posted ...
[ 0.19953061640262604, -0.00923699140548706, 0.6720148324966431, -0.03483631834387779, 0.012421815656125546, 0.03642149269580841, 0.21242563426494598, -0.25505998730659485, -0.3161086142063141, -0.9441580176353455, 0.10184979438781738, 0.6752231121063232, -0.17912375926971436, -0.06797956675...
- when editing, add the tinyMCE control to the textarea ``` tinyMCE.execCommand("mceAddControl",true,'content'); ``` **SAVE** - when saving, remove the control for next time ``` tinyMCE.execCommand('mceRemoveControl',false,'content'); ``` I am more familiar with FCKeditor but I think it is similar. TinyMCE has mce...
[ -0.18016649782657623, 0.11493270844221115, 0.6113030314445496, 0.2275911569595337, 0.16183575987815857, -0.09356649965047836, 0.21080952882766724, -0.11677437275648117, -0.09835508465766907, -0.7988734841346741, -0.10471131652593613, 0.7996912002563477, -0.31644800305366516, 0.073951803147...
I have an EmptyDataTemplate in my asp:ListView which I want to use to insert a new record. I have Inserting working in the InsertItemTemplate... I thought I could copy the InsertItemTemplate into the EmptyDataTemplate, on clicking Insert this gives the error ``` Insert can only be called on an insert item. Ensure on...
[ 0.14646567404270172, 0.31316980719566345, 0.41601037979125977, -0.07097139954566956, 0.23222419619560242, -0.011605430394411087, 0.14074194431304932, -0.11520244181156158, -0.1584220975637436, -0.47909367084503174, 0.31947579979896545, 0.8167227506637573, -0.26474401354789734, 0.0310251209...
data template.
[ 0.2634158730506897, -0.20586273074150085, 0.1458737999200821, 0.35709118843078613, -0.0009854498784989119, -0.1516643762588501, -0.024285338819026947, -0.4720841944217682, -0.14973929524421692, -0.8350632786750793, -0.4206019639968872, 0.12811781466007233, -0.4338913559913635, 0.1428201198...
Any ideas how to fix this? ``` UserService.UserServiceClient userServiceClient = new UserServiceClient(); userServiceClient.GetUsersCompleted += new EventHandler<GetUsersCompletedEventArgs>(userServiceClient_GetUsersCompleted); userServiceClient.GetUsersAsync(searchString); ``` . ``` <system...
[ -0.17290058732032776, -0.0594920851290226, 0.6345946788787842, 0.0701172798871994, 0.3387315571308136, -0.06176086515188217, 0.33233442902565, -0.04661918431520462, -0.4975287616252899, -0.7308835387229919, -0.3968909978866577, 0.44982945919036865, -0.36797234416007996, 0.1329069435596466,...
maxReceivedMessageSize="2147483647"> <security mode="None" /> </binding> </basicHttpBinding> </bindings> <client> <endpoint address="http://localhost:52185/UserService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHtt...
[ -0.3573148548603058, -0.2841680943965912, 0.5380820631980896, 0.048346515744924545, -0.15826520323753357, 0.07142984867095947, 0.24371787905693054, -0.4170041084289551, -0.3568447232246399, -0.4576471745967865, -0.32773831486701965, 0.32482025027275085, -0.23662354052066803, 0.120014704763...
contract="UserService.UserService" name="BasicHttpBinding_UserService" /> </client> <behaviors> <serviceBehaviors> <behavior name="Shell.Silverlight.Web.Service3Behavior"> <serviceMetadata httpGetEnabled="true" /> <serviceDebug
[ 0.28388622403144836, -0.2365843802690506, 0.09310711175203323, -0.1522558331489563, -0.13166271150112152, 0.04928441345691681, 0.6390342116355896, -0.31049638986587524, -0.13265816867351532, -0.4815426766872406, -0.05498398840427399, 0.6100631952285767, -0.13973236083984375, 0.223584875464...
includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/> <services> <service behaviorConfiguration="Shell.Silverlight.Web.Service3Behavior" name="Shell.Silverlight.Web.S...
[ 0.14456124603748322, 0.09017622470855713, -0.0064627863466739655, -0.3319726288318634, -0.1106303259730339, -0.1495416909456253, 0.8477830290794373, -0.6213381290435791, -0.1402377188205719, -0.29956918954849243, -0.2942202091217041, 0.4634396731853485, -0.43169116973876953, 0.101511642336...
contract="Shell.Silverlight.Web.Service3" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> </service> </services> </system.serviceModel> ``` Could not find default endpoint element that
[ -0.12806443870067596, 0.017403747886419296, 0.4109242856502533, -0.39667969942092896, -0.016353245824575424, 0.24635782837867737, 0.19474446773529053, -0.3450022041797638, 0.006585623603314161, -0.5957352519035339, -0.21794424951076508, 0.22748151421546936, -0.2568865418434143, 0.256213456...
references contract 'UserService.UserService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element. **Resolved!** I didn't mention that this was a Silverl...
[ 0.4045637547969818, 0.12866555154323578, 0.7636651992797852, 0.0652676597237587, -0.4147340655326843, -0.26525944471359253, 0.15179632604122162, -0.2865142822265625, -0.2523428499698639, -0.6818065643310547, 0.3689161539077759, 0.508914053440094, -0.2695070505142212, 0.2883482277393341, ...
a custom UserControl that was being used in it. The solution is simple. Copy the endpoint definitions from the config file (e.g. ServiceReferences.ClientConfig) of the class library to the config file of the silverlight application. I know you'd expect it to work without having to do this, but apparently someone in Re...
[ 0.4345038831233978, -0.16698287427425385, 0.21271906793117523, 0.2604075074195862, 0.15069672465324402, -0.42053306102752686, 0.3655335307121277, -0.09223209321498871, -0.19991491734981537, -0.5886809229850769, 0.09035518020391464, 0.5942671298980713, -0.2648906707763672, -0.09351623058319...
We have two repositories, one for current code and one for project management. Now we need to branch code to the project management repository. SVN gives me an error, and I found in the documentation that SVN cannot do this work (different repository), So I export the code and check in to the project repository. Th...
[ 0.45407065749168396, -0.12677140533924103, 0.24905437231063843, 0.24224475026130676, 0.381264328956604, 0.19877278804779053, 0.08166330307722092, 0.17721910774707794, -0.32723790407180786, -0.6152116060256958, -0.10858999192714691, 0.2770942151546478, 0.03385764732956886, 0.269154489040374...
use two repositories. If I got it right you want to add contents already under version control from a repository to another ? If that's it you should probably have a look on [svnsync](http://svnbook.red-bean.com/en/1.4/svn.ref.svnsync.html) which helps you merging different repositories. Otherwise it may be simpler to...
[ 0.31595855951309204, -0.04848637804389, 0.21879160404205322, -0.015228530392050743, 0.0025475267320871353, -0.16503050923347473, -0.02505895495414734, -0.1292496621608734, -0.44666165113449097, -0.7158401012420654, 0.12965571880340576, 0.6194202899932861, -0.15997298061847687, 0.1880851089...
What's wrong with the following setup? The Where filter on the AutoPersistanceModel does not appear to be working and the table name convention does not appear to be working either. The error I'm evenually getting is "The element 'class' in namespace 'urn:nhibernate-mapping-2.2' has invalid child element 'property' in ...
[ -0.2335779219865799, 0.13508376479148865, 0.2764115631580353, -0.18955130875110626, 0.05873784050345421, 0.2072250097990036, 0.49781283736228943, -0.31325486302375793, -0.1377614587545395, -0.8055725693702698, 0.10481858253479004, 0.7476687431335449, -0.24483023583889008, 0.341300606727600...
OracleConfiguration.Oracle9.ConnectionString( c => c.FromConnectionStringWithKey("ConnectionString"))) .Mappings(m => { m.AutoMappings.Add(GetAutoPersistanceModel);
[ -0.2026684284210205, -0.2633446753025055, 0.16369479894638062, 0.05566272884607315, 0.2963348627090454, 0.1856825053691864, 0.3050364851951599, -0.4351496398448944, -0.21162989735603333, -0.5245229005813599, -0.39302635192871094, 0.7531436085700989, -0.5150502920150757, -0.2052730917930603...
m.FluentMappings.AddFromAssembly(Assembly.GetExecutingAssembly()); }) .BuildSessionFactory(); } public AutoPersistenceModel GetAutoPersistanceModel() { return AutoPersistenceModel.MapEntitiesFromAssemblyOf<User>()
[ -0.4426608681678772, -0.16976091265678406, 0.7251021265983582, -0.23843127489089966, 0.3559400141239166, 0.24470849335193634, 0.7759820818901062, -0.42776578664779663, -0.0780000314116478, -0.900927722454071, -0.39533817768096924, 1.0644152164459229, -0.3832480013370514, -0.047073114663362...
.Where(type => type.IsClass && !type.IsAbstract && type.Namespace == "Some.Namespace") .ConventionDiscovery.Add<IConvention>( Table.Is(x => "tbl" + x.EntityType.Name.Pluralize()) ); } ``` James is leading you correctly but his snippet is wrong. ``` .WithSetup(s=> s.FindIden...
[ 0.019915178418159485, -0.2108915001153946, 0.5972893834114075, 0.05289260670542717, 0.37958186864852905, -0.30974119901657104, 0.31828102469444275, -0.4985159635543823, -0.10100006312131882, -0.44643327593803406, -0.38078057765960693, 0.5334668159484863, -0.2961443066596985, 0.079220011830...
I'm writing a program that needs to take input from an XBox 360 controller. The input will then be sent wirelessly to an RC Helicopter that I am building. So far, I've learned that this can be done using either the XInput library from DirectX, or the Input framework in XNA. I'm wondering if there are any other option...
[ 0.5580008625984192, -0.04533541575074196, 0.20236997306346893, 0.31116095185279846, 0.11055152863264084, -0.3359401822090149, -0.3406308591365814, 0.15468181669712067, -0.07884684950113297, -0.6993007659912109, 0.06342219561338425, 0.6754888296127319, -0.10478971898555756, 0.06019973009824...
can grab the controller input with something like Python? **Edit to answer some comments:** The copter will have 6 total propellers, arranged in 3 co-axial pairs. Basically, it will be very similar to [this](http://www.draganfly.com/uav-helicopter/draganflyer-x6/features), only it will cost about $1,000 rather than $...
[ 0.3292253613471985, -0.33928096294403076, 0.6838151812553406, 0.7833829522132874, -0.10004077106714249, 0.42399781942367554, -0.4960307478904724, -0.260259211063385, -0.12314286828041077, -0.3836001455783844, 0.455181747674942, 0.40890324115753174, -0.26822295784950256, -0.0286923721432685...
triggers will control the yaw. The analog triggers are a big feature for the 360 controller. PS and most others do not have them. I have a webpage for the project, but it is still pretty sparse. I do plan on documenting the whole design though, so eventually it will be interesting. <http://tricopter.googlecode.com> ...
[ 0.6928654313087463, -0.4305339455604553, 0.26219815015792847, 0.5288659930229187, -0.11310628801584244, 0.03856588900089264, -0.4164868891239166, -0.024752723053097725, -0.16211992502212524, -0.578521192073822, 0.4655781388282776, 0.5180906653404236, -0.11739323288202286, -0.09012877196073...
that I don't have to go through a computer, but its not a high priority at the moment. [PyGame](http://www.pygame.org/news.html) can read joysticks, which is what the X360 controller shows up as on a PC.
[ 0.2949416935443878, -0.05006035417318344, 0.31035879254341125, 0.6746698021888733, 0.218525230884552, -0.39477863907814026, -0.19800274074077606, 0.16246436536312103, -0.2882557809352875, -0.3438032567501068, 0.09174659103155136, 0.6044936180114746, 0.23130439221858978, -0.1099684685468673...
What are some of the tricks or tools or policies (besides having a unit testing standard) that you guys are using to write better unit tests? By better I mean 'covers as much of your code in as few tests as possible'. I'm talking about stuff that you have used and saw your unit tests improve by leaps and bounds. As an...
[ 0.7186283469200134, 0.26669928431510925, -0.46497347950935364, 0.227703258395195, -0.23361234366893768, -0.28464701771736145, 0.2920561730861664, -0.0771583616733551, -0.036392565816640854, -0.6540736556053162, 0.4567435681819916, 0.5211665630340576, 0.12354395538568497, -0.035834945738315...
some of the other great stuff you guys are using/doing? EDIT: Lots of good answers. I'll be marking as correct the answer that I'm currently not practicing but will definitely try and that hopefully gives the best gains. Thanks to all. On my current project we use a little generation tool to produce skeleton unit test...
[ 0.6641039252281189, 0.15587778389453888, -0.20421594381332397, 0.5695136189460754, 0.0825657770037651, 0.014478920958936214, 0.2580260634422302, -0.05642252787947655, -0.22300289571285248, -0.5851153135299683, 0.2329799383878708, 0.47618141770362854, 0.3712179660797119, -0.0137059418484568...
the entities and other dependencies are added by default). The structure of the (templated) tests follows a fairly predictable syntax, and the template allows for implementation of module/object-specific buildup/tear down (we also use a base class for all the tests to encapsule some logic). We also create instances o...
[ 0.4130730628967285, 0.0003046786005143076, -0.010187908075749874, 0.3878970146179199, -0.020360128954052925, -0.2951279282569885, 0.19018475711345673, -0.45440348982810974, 0.17420624196529388, -0.4571876525878906, -0.3250788152217865, 0.4064103662967682, -0.1658957451581955, 0.08621343970...
I'm using a well known template to allow binary constants ``` template< unsigned long long N > struct binary { enum { value = (N % 10) + 2 * binary< N / 10 > :: value } ; }; template<> struct binary< 0 > { enum { value = 0 } ; }; ``` So you can do something like binary<101011011>::value. Unfortunately this has ...
[ 0.03107188642024994, 0.08513819426298141, 0.09732583910226822, 0.04472203552722931, 0.06543119996786118, 0.01842188462615013, 0.1386675089597702, -0.23338522017002106, -0.28360456228256226, -0.41356420516967773, 0.08812768757343292, 0.4393294155597687, -0.15732760727405548, 0.1532871276140...
couple more digits out of this solution - always start your binary constant with a zero! Then replace the 10's in your template with 8's.
[ 0.050844717770814896, -0.1376357078552246, 0.19515275955200195, 0.12215353548526764, 0.2375722974538803, 0.35314303636550903, 0.19140200316905975, -0.05438912287354469, -0.4160470962524414, -0.32146432995796204, 0.17631101608276367, 0.4675113558769226, -0.24574236571788788, -0.077101059257...
I need to take a MySQL query and insert a string before each table name. The solution doesn't need to be one line but obviously it's a regex problem. It will be implemented in PHP so having programming logic is also fine. Rationale and Background: I'm revamping my code base to allow for table prefixes (eg: 'nx\_users...
[ -0.08872330188751221, 0.2862463891506195, 0.14581866562366486, 0.05799168720841408, -0.19869369268417358, -0.02907758206129074, 0.056969743221998215, 0.06562608480453491, -0.32978591322898865, -0.7416229248046875, 0.13807259500026703, 0.2437051385641098, -0.24562592804431915, 0.02726648189...
change to ``` SELECT * FROM nx_users, nx_ teams WHERE nx_ users.team_id = nx_ teams.team_id ORDER BY nx_ users.last_name ``` Obviously it should handle other cases such as table aliases, joins, and other common MySQL commands. Has anybody done this? How big of a code base are we talking about here? A regular expre...
[ 0.202339306473732, -0.17282769083976746, 0.3326454162597656, -0.09647110849618912, 0.10236681997776031, -0.24007658660411835, 0.1524912416934967, 0.2163645625114441, -0.41978147625923157, -0.732632577419281, -0.21910148859024048, 0.5676680207252502, -0.44175294041633606, 0.1098108366131782...
undoubtedly miss.
[ -0.008377435617148876, 0.31278175115585327, 0.0489172488451004, -0.1349865347146988, 0.0919860452413559, 0.3593628704547882, -0.11251640319824219, 0.10012927651405334, -0.11361981183290482, -0.21927517652511597, -0.13523662090301514, 0.10206766426563263, -0.008338970132172108, 0.2780178785...
I need to run a java program in a Windows Mobile 6 device. Is this possible? I need to do some tcp/ip programming with that so I can communicate to other computers. It's a simple computer class project, nothing fancy. Just sending messages and small files. Any suggestions? A ReentrantLock which implements Lock wraps a ...
[ 0.38717570900917053, 0.32497894763946533, 0.025983506813645363, 0.06354566663503647, 0.34286513924598694, 0.1915350705385208, 0.3722161650657654, -0.07609850913286209, 0.1953754872083664, -0.6635804176330566, 0.1422824263572693, 0.4378909468650818, -0.5147209167480469, -0.1855849027633667,...
I'm looking more toward CMSes as I'd like my clients to be able to be as self sufficient as possible. Anyhow, I'm just starting to evaluate and will update this with my conclusions. However, since I'm starting with evaluating Umbraco first, I'd like to get a consensus. I have no preference for C# or VB.NET. so I'm ope...
[ 0.08873003721237183, 0.06909593939781189, 0.570989191532135, 0.11175812780857086, -0.02848559245467186, -0.07927291840314865, -0.3532164692878723, 0.19556865096092224, -0.12108518928289413, -0.5514150261878967, -0.07942691445350647, 0.9050105810165405, -0.3423095643520355, -0.2165915668010...
of Umbraco along with .NET usercontrols written in VB or C# which ever you prefer. I recommend you take a look and let me know what you think. Here are some links to get you started. * <http://umbraco.tv/documentation/videos/getting-started/what-is-umbraco> * <http://umbraco.tv/documentation/videos/getting-started/i...
[ 0.21183863282203674, -0.15930284559726715, 0.9321833848953247, 0.09009786695241928, 0.2822100520133972, -0.2881900668144226, -0.628600537776947, 0.28254011273384094, -0.43806734681129456, -0.2987968921661377, -0.145057812333107, 1.1049290895462036, -0.053012315183877945, -0.117015719413757...
The Query I'm writing runs fine when looking at the past few days, once I go over a week it crawls (~20min). I am joining 3 tables together. I was wondering what things I should look for to make this run faster. I don't really know what other information is needed for the post. EDIT: More info: db is Sybase 10. Query:...
[ 0.1845327466726303, 0.19764310121536255, 0.834723711013794, -0.1274731606245041, -0.35762545466423035, 0.23163168132305145, 0.3019874095916748, -0.29931819438934326, -0.27152878046035767, -0.763655960559845, 0.05108629912137985, 0.09726880490779877, -0.29607653617858887, 0.3347234129905700...
try another JOIN method? I don't know Sybase 10 that well, but try running that query for say 10-day period and then 10 times, for each day in a period respectively and compare times. If the time in the first case is much higher, you've probably hit the database cache limits. The solution is than to simply run queries...
[ 0.19585999846458435, -0.19357788562774658, 0.1073855459690094, 0.02854975312948227, 0.007728388532996178, -0.20327511429786682, 0.2464125007390976, -0.0305611751973629, -0.343669593334198, -0.5576821565628052, 0.2469893991947174, 0.07663492858409882, -0.40129250288009644, 0.193689852952957...
I need to create some files using Visual Studio T4 (templating). What is the best way to import some configuration settings into multiple .tt files and have it accessible in the templating code portion. The simplest way to store configuration is by placing it as code in a shared .tt file, which you can include from mul...
[ 0.6548768877983093, -0.05529839172959328, 0.05508534610271454, 0.1066233217716217, -0.04420933127403259, -0.02572302520275116, 0.001160000916570425, 0.014851056970655918, -0.14843957126140594, -0.9027881026268005, 0.24041201174259186, 0.8713648915290833, -0.2405867725610733, -0.14948064088...
I have a string in a db that contains a local variable reference and I want Ruby to parse and replace it. For example, the string in the db is `"Hello #{classname.name}"` and it is stored in classname.description and my code reads: ``` <%=h @classname.description %> ``` Put that just prints the exact value from the...
[ 0.29224562644958496, 0.3811947703361511, 0.3559284210205078, -0.2343912422657013, -0.5150360465049744, -0.04411063343286514, 0.5825579762458801, -0.3408050239086151, 0.18817822635173798, -0.5771156549453735, 0.15429168939590454, 0.4755658805370331, -0.4055377244949341, 0.503806471824646, ...
without the > need to call session\_write\_close(), > but as session data is locked to > prevent concurrent writes only one > script may operate on a session at any > time. When using framesets together > with sessions you will experience the > frames loading one by one due to this > locking. You can reduce the...
[ 0.25540509819984436, -0.1119716539978981, 0.4059745967388153, 0.13516822457313538, -0.30371132493019104, -0.28293946385383606, 0.6574698686599731, -0.2639000415802002, -0.4459776282310486, -0.8593524098396301, -0.14253190159797668, 0.679575502872467, -0.4208031892776489, 0.2632091343402862...
I already read the [link checker](https://stackoverflow.com/questions/65515/how-to-find-broken-links-on-a-website) question posted in SO. If there are more questions of this kind and I missed them, my apologies. We need to find broken links in a [website](http://blog.readytocloud.com) in a very easy way and scriptable...
[ 0.23200057446956635, 0.2598540782928467, 0.04844747856259346, 0.14433971047401428, -0.042599525302648544, -0.3238988220691681, 0.46078646183013916, -0.10595685988664627, -0.44714054465293884, -0.5785682201385498, 0.09764643758535385, 0.3758874833583832, -0.03729899227619171, 0.033254478126...
compile. Here is the code: ``` import java.net.HttpURLConnection; import java.net.URL; class links { private static boolean isLive(String link) { HttpURLConnection urlConnection = null; try { URL url = new URL(link); urlConnection = (HttpURLConnection) url.openConnection(); urlConnection.s...
[ -0.07896916568279266, -0.21916866302490234, 0.8866367936134338, -0.21286611258983612, 0.03413402661681175, -0.0720214992761612, 0.32538577914237976, -0.3030984401702881, -0.13130122423171997, -0.7216131091117859, -0.4747717082500458, 0.36160382628440857, -0.5447491407394409, 0.481234610080...
return urlConnection.getResponseCode() == HttpURLConnection.HTTP_OK; } } catch (Exception e) { return false; } finally { if (urlConnection != null) { urlConnection.disconnect(); } } } public static void main(String[] args) { System.out.println(isLive("http://www.fake...
[ 0.12674617767333984, -0.06937648355960846, 0.7502136826515198, -0.16686560213565826, 0.1151362732052803, -0.2704492211341858, 0.5850662589073181, 0.0879625752568245, -0.19520218670368195, -0.6455647945404053, -0.514549732208252, 0.46679601073265076, -0.472033828496933, 0.5423370599746704, ...
should have the follow at the top of the file: ``` import java.net.HttpURLConnection; import java.net.URL; ``` I'm also getting a compiler warning on the following piece of code: ``` && !url.equals(redirectLink) ``` It's trying to equate url (which is a URL) to redirectLink (which is a String). In Java it will a...
[ -0.03368784114718437, -0.009933797642588615, 0.5320836901664734, -0.2484290897846222, -0.350655198097229, -0.2320794314146042, 0.309234082698822, -0.03704472631216049, -0.038411617279052734, -0.8590246438980103, 0.042371880263090134, 0.6971360445022583, -0.6166657209396362, 0.0721723511815...
to find the correct packages that you're currently using and automatically insert the import statements.
[ 0.573366641998291, 0.11250626295804977, -0.15970253944396973, 0.09577259421348572, 0.30511075258255005, -0.35970059037208557, -0.06321793794631958, 0.007578191813081503, 0.1105431392788887, -0.43688714504241943, -0.2468799501657486, 0.7116187810897827, -0.1675797551870346, -0.1750128716230...
I want to create a custom Addon/plugin for Outlook 2003, to support integrated functionality with a task management system. I am unable to find many good development resources for the same. Can someone please explain Outlook 2003 architecure and development of a plugin. Good links/resources are also welcome. You ne...
[ -0.09664304554462433, 0.21214234828948975, 0.37448376417160034, -0.06659674644470215, -0.5178044438362122, -0.2180759310722351, 0.2915892004966736, 0.17959094047546387, 0.024375425651669502, -0.6326306462287903, 0.10786686092615128, 0.8314889669418335, -0.6056561470031738, -0.0563569702208...
automatically compare the string value when this happens and the toString actually gives what you want. To be more precise in the authors code I would change the above code to: ``` && !url.toExternalForm().equals(redirectLink) ``` Note: In netbeans, you can simply right click and select the option Fix Imports (or h...
[ 0.17738193273544312, -0.24426665902137756, 0.3240412175655365, -0.11292492598295212, 0.02556758187711239, -0.30070510506629944, 0.20572181046009064, 0.036579400300979614, -0.014148483984172344, -0.5977383255958557, -0.1262488067150116, 0.9185652732849121, -0.4655073583126068, -0.1214458644...
I have legacy C code base at work and I find a lot of function implementations in the style below. ``` char *DoStuff(char *inPtr, char *outPtr, char *error, long *amount) { *error = 0; *amount = 0; // Read bytes from inPtr and decode them as a long storing in amount // before returning as a formatted ...
[ 0.1182502806186676, 0.13590800762176514, 0.34793511033058167, -0.27293825149536133, 0.22815905511379242, 0.09344284981489182, 0.3367740511894226, -0.2517332136631012, -0.0575619675219059, -0.49355000257492065, -0.1644674688577652, 0.7547362446784973, -0.1799732744693756, 0.1508522629737854...
*error) { long amount = 0; *error = 0; // Read bytes from inPtr and decode them as a long storing in amount. return amount; } ``` Using NewDoStuff: ``` myAmount = NewDoStuff(myInPtr, myError); myOutPtr += sprintf (myOutPtr, "%d", myAmount); ``` I can't help but wondering if there is something I'...
[ -0.11625716835260391, -0.062358271330595016, 0.2754446566104889, -0.19366692006587982, 0.08562742918729782, 0.12350209057331085, 0.34414973855018616, -0.24683840572834015, -0.09526281803846359, -0.6056495308876038, -0.13048286736011505, 0.6994069218635559, -0.12289899587631226, 0.053242702...
over again. Also, returning the out pointer makes it possible for you to do things like: ``` DoOtherStuff(DoStuff(myInPtr, myOutPtr, myError, &myAmount), &myOther); ``` With your new approach, the equivalent code is quite a lot more verbose: ``` myAmount = DoNewStuff(myInPtr, myError); myOutPtr += sprintf("%d", my...
[ -0.3165584206581116, 0.06323319673538208, 0.5941088795661926, -0.1632993072271347, -0.08533383905887604, 0.09660538285970688, 0.18166358768939972, 0.056162815541028976, 0.07692661136388779, -0.6850496530532837, -0.3983161747455597, 0.5906996726989746, -0.07294870167970657, -0.0335771627724...
I'm trying to install Zend framework on a WAMP server but it is not working properly. I downloaded the Zend framework and created the folder in `C:\wamp\library\Zend`, and then in `php.inc` I have something like this: ``` ; Windows: "\path1;\path2" ;include_path = ".;c:\php\includes:C:\wamp\library" ``` Now when I...
[ 0.45769003033638, 0.20765191316604614, 0.4261819124221802, 0.08270105719566345, -0.06897497922182083, -0.39799320697784424, 0.6749577522277832, -0.4722977876663208, 0.08910360932350159, -0.7172440886497498, 0.07789405435323715, 0.4220145046710968, -0.45028772950172424, 0.009148295037448406...
; ;;;;;;;;;;;;;;;;;;;;;;;;; ; UNIX: "/path1:/path2" ; Windows: "\path1;\path2" ``` The key is to a) remove the semi-colon at the beginning of the line, and b) add what you need to the path. **NOTE:** on Windows, paths must be separated by semi-colons, whereas on UNIX they are separated by full colons; Also, Dot me...
[ -0.19379130005836487, -0.11542878299951553, 0.7149176001548767, -0.22131291031837463, 0.4534507095813751, 0.014152486808598042, 0.37637510895729065, 0.14185521006584167, -0.15495942533016205, -0.7517771124839783, -0.45073625445365906, 0.47671929001808167, -0.42669346928596497, 0.3329896926...
I am developing a Java web application that bases it behavior through large XML configuration files that are loaded from a web service. As these files are not actually required until a particular section of the application is accessed, they are loaded lazily. When one of these files are required, a query is sent to the...
[ 0.48596063256263733, 0.12443883717060089, 0.08579780906438828, -0.06622292846441269, 0.16097304224967957, -0.45113879442214966, 0.016127508133649826, -0.26813027262687683, -0.005606058519333601, -0.7078051567077637, -0.16794541478157043, 0.5100897550582886, -0.2976580858230591, -0.13574083...
over and over. The files returned by the web service are the same for all users across all sessions. I do not use JSP, JSF or any other fancy framework, just plain servlets. My question is, what is considered a best practice to implement such a global, static cache within a java Web application? Is a singleton class ...
[ 0.38665303587913513, 0.36784982681274414, 0.027372203767299652, -0.08060271292924881, -0.03088802844285965, -0.0784231498837471, 0.45399582386016846, -0.049629032611846924, -0.2304280400276184, -0.6146438121795654, -0.004775562789291143, 0.4010554254055023, 0.019116688519716263, 0.18724790...
server)? Given the informations above, Would it be a correct implementation to put an object responsible for caching as a ServletContext attribute? Note: I do not want to load all of them at startup and be done with it because that would 1). overload the webservice whenever my application starts up 2). The file...
[ -0.051609333604574203, 0.05152140185236931, 0.5420130491256714, 0.09287825971841812, -0.21568377315998077, -0.23777928948402405, 0.3126811683177948, -0.2096681445837021, -0.2116798460483551, -0.6187565326690674, -0.017717309296131134, 0.3147358298301697, -0.2605746388435364, 0.471436232328...
the webservice will send rather large XML query in the post Data, which may be different each time. Only the web application really knows that two different calls to the webservice are actually equivalent. Thanks for your help Your question contains several separate questions together. Let's start slowly. ServletConte...
[ 0.3392677307128906, -0.0366930216550827, 0.12983252108097076, 0.37228095531463623, -0.5472431778907776, -0.21447837352752686, 0.17325006425380707, -0.2032286524772644, -0.04329147934913635, -0.8366572856903076, 0.18511100113391876, 0.25164735317230225, -0.060706496238708496, 0.112092070281...
this webservice via HTTP you can install simple HTTP proxy server on your side which handle caching of xml. The next step will be caching of resolved xml in some sort of local object cache. This cache can exists per server without any problem. In this second case the EHCache will do perfect job. In this case the chain ...
[ -0.3670057952404022, -0.036686062812805176, 0.6563221216201782, 0.24714086949825287, -0.36048346757888794, -0.302744597196579, -0.17085126042366028, -0.15980032086372375, -0.2099059522151947, -0.9784704446792603, -0.12696389853954315, 0.40678006410598755, -0.0522049181163311, -0.0310613475...
which contains only objects from requested xmls * One http proxy running on same hardware as our webapp. * Possibility to scale webapp without adding new http proxies for xml files. Cons: * Next level of infrastructure * +1 point of failure (http proxy) * More complicated deployment Update: don't forget to always se...
[ -0.23584890365600586, 0.04780158773064613, 0.6455056667327881, 0.2263767421245575, -0.04276217520236969, -0.23407970368862152, 0.37970471382141113, -0.19836784899234772, -0.34583577513694763, -0.9369938373565674, -0.16197209060192108, 0.2712407410144806, 0.046807661652565, -0.1436581462621...
On every break on the Production/QA/Dev getting to the root of the exception is very crucial and time taking process. As the web applications are in multi user environment and Stateless \ Asynchronous (HTTP) ,its really a tough job to look at the Eventviewer / log files and root cause an issue reported by the end user...
[ 0.3816945552825928, 0.017229890450835228, 0.019418682903051376, 0.3556880056858063, -0.1792593002319336, -0.31125491857528687, 0.46394360065460205, -0.05539117380976677, -0.2493460774421692, -0.4228821396827698, -0.18687322735786438, 0.46540218591690063, -0.04946466535329819, -0.0182134285...
Exceptions into an XML file, and which can be processed remotely for viewing or reports on Exceptions The signature of the Static method in the Error logging class is as follows *WriteLog (Unique Number , Module Name, Priority, Layer ,String Custom Message,Exception with Stack Trace);* I know there are many reusabl...
[ 0.14717714488506317, 0.20692360401153564, 0.005306310951709747, 0.029755031690001488, -0.13270919024944305, -0.21299321949481964, 0.2901064455509186, -0.028565410524606705, -0.3754431903362274, -0.23362797498703003, -0.136152446269989, 0.39629217982292175, -0.3960413634777069, -0.125483736...
the end user. Incase of any unexpected or exception is thrown to the Application layer ( Global .asax ) the Response would be cleared and Custom Message in HTML will be written back to the user with the Unique ID like the below one “ An Unexpected Error has occurred , the Exception has be recorded for further action; ...
[ 0.14660966396331787, -0.15698708593845367, 0.5795938968658447, 0.13635247945785522, -0.2159348428249359, -0.2414209544658661, 0.3422898054122925, -0.01463197823613882, -0.2060396373271942, -0.5596641898155212, -0.4769943952560425, 0.3853519558906555, -0.044472869485616684, -0.0441016294062...
, this would be concatenation of the *Hour+Minutes+Seconds+Milliseconds*; initially I thought to use GUID but then it would be tough for the end user to remember the GUID to report the issue. Public string strExceptionID { ``` Get { return DateTime.Now.ToString(“HHmmssfff”); } } ...
[ 0.3209663927555084, -0.40158548951148987, 0.5574922561645508, -0.24136365950107574, 0.07343995571136475, 0.11133097857236862, 0.12247563153505325, -0.3797541856765747, -0.011678522452712059, -0.3034999370574951, 0.06375276297330856, 0.4217052757740021, -0.20363368093967438, 0.3709545731544...
Module3 }; ``` Priority: This would be a Static Enum variable with Priority , developer has to decide the priority like if it’s a validation fail of Date or integer format use “Low” or if its unexpected in a Business layer call then use “2” . I think Priority High should be used in only in DAL or in Business Logic...
[ -0.1869150698184967, -0.30800455808639526, 0.4281162619590759, 0.07919055223464966, -0.0017734980210661888, -0.17514267563819885, 0.04259992018342018, -0.3357870280742645, -0.09863696992397308, -0.12756679952144623, -0.3776390850543976, 0.6111767888069153, -0.3560100197792053, -0.023974634...
Low =3, }; ``` Layer : This would be a Static Enum variable with Layer Ex : enum Layer { ``` Presentation, Business, DataAccess }; ``` String Custom Message : This is optional parameter, and its upto the developer to supply an information to help explain the Reason or Empty str...
[ 0.04373295605182648, -0.22247080504894257, 0.3178751468658447, -0.09426179528236389, 0.09235091507434845, 0.060098256915807724, 0.14417661726474762, -0.21866747736930847, -0.10048005729913712, -0.1345672756433487, -0.203323632478714, 0.43459075689315796, -0.3039611577987671, -0.00422718189...
method : The method will additionally get the logged-in Userid and timestamp and write it to the XML File. Pros : -> XML Logging will enable us to process an use it in any manner -> The exceptions can be viewed remotely in a browser. -> Easy to trace and find any exception. -> We can search , sort exception based o...
[ 0.285824179649353, -0.17907555401325226, 0.4450312852859497, 0.4759080708026886, -0.06214982271194458, -0.2606728672981262, 0.05661986395716667, -0.402610182762146, -0.2494588941335678, -0.5155656337738037, -0.03934310004115105, 0.46147194504737854, -0.19315676391124725, -0.071546606719493...
two ways; writing the xml to DB on timely basis OR write this on top of Event viewer logging as we'll always have the backup. Based on the review comments I'll post the XML Schema and the ASPX page to view and search the errors. Please take time to review and give ur feedback. I have a bit of a bug bear with people r...
[ 0.7234047055244446, -0.09002186357975006, 0.3077446520328522, 0.1887003481388092, -0.10287149250507355, -0.359393447637558, 0.11172359436750412, -0.4529836177825928, -0.06556396186351776, -0.47689443826675415, 0.13858942687511444, 0.6954166889190674, -0.3526582419872284, -0.212915614247322...
(check out System.Diagnostics) which adds this unique number, don't make the calling code generate it. Module Name: The stack trace will provide this kind of detail - assuming you know what code is in what module. In fact it probably doesn't matter from a fault finding perspective. Priority: The System.Diagnostics AP...
[ 0.1947985589504242, -0.029050368815660477, 0.51690274477005, 0.19517289102077484, 0.09504365921020508, -0.21821312606334686, 0.32985246181488037, -0.14267100393772125, -0.5788437724113464, -0.4756038784980774, -0.34341076016426086, 0.5467460751533508, 0.04117351025342941, 0.138324648141860...
(warning)" and "oh heck, I'm broken (error)". Layer: What is the real difference between module and error here? Once again, if you use System.Diagnostics correctly environmental information such as what computer this happened on can be added dynamically. You wouldn't want to rely on developers to do this consistently....
[ 0.5025643706321716, -0.06269600987434387, 0.14847348630428314, 0.24071167409420013, 0.22633861005306244, -0.5287946462631226, 0.46112290024757385, -0.14799126982688904, -0.3131120502948761, -0.5290208458900452, -0.03642711788415909, 0.6980549097061157, -0.289060115814209, -0.12803693115711...
as long as they take a format string - you can do this: Trace.TraceError( "The user provided the following input '{0}'. The follow exception was:\r\n{1}", userInput, ex ); Anyway - I guess what I am saying is that if you are writing this in .NET like it looks like you are - spend half a day surfing the System.Dia...
[ 0.5407189726829529, -0.0043416633270680904, 0.1073041707277298, 0.08963678777217865, 0.14020347595214844, -0.5062428116798401, 0.4314838647842407, 0.10980876535177231, -0.2345549464225769, -0.7180096507072449, 0.29611626267433167, 0.5276129841804504, -0.13579076528549194, -0.08656647056341...
I have a byte array which I got back from a FileStream.Read and I would like to turn that into a string. I'm not 100% sure of the encoding - it's just a file i saved to disk - how do I do the conversion? Is there a .NET class that reads the byte order mark and can figure out the encoding for me? If `File.ReadAllText` w...
[ 0.10316309332847595, 0.05856066942214966, 0.20866292715072632, -0.19283922016620636, 0.19054318964481354, 0.07555592805147171, 0.23405171930789948, -0.09886383265256882, -0.02056903950870037, -0.6047865152359009, -0.17329391837120056, 0.644230306148529, -0.25441834330558777, 0.262870281934...
{ string InputFilename = "testo.txt"; AsyncMethodCaller caller = File.ReadAllText; IAsyncResult rslt = caller.BeginInvoke(InputFilename, null, null); // do other work ... string fileContents = caller.EndInvoke(rslt); } ``` Or you can create a `MemoryStream` from the byte ...
[ 0.1751735806465149, -0.3056984841823578, 0.28934237360954285, -0.2319711595773697, 0.22521939873695374, 0.04623384773731232, 0.4953940510749817, -0.1882575899362564, -0.04242885112762451, -0.3731340169906616, -0.10765255242586136, 0.6591631174087524, -0.3971942961215973, 0.0287925228476524...
If you have polymorphic belongs\_to associations then references will add both of the columns required: ``` create_table :products do |t| t.references :attachment, :polymorphic => {:default => 'Photo'} end ``` will add an `attachment_id` column and a string `attachment_type` column with a default value of ‘Photo’....
[ 0.04860805347561836, -0.04410765692591667, 0.36969542503356934, 0.055849429219961166, -0.06337602436542511, -0.024951200932264328, -0.09678689390420914, -0.35373392701148987, -0.09029664099216461, -0.5718680024147034, 0.09626588225364685, 0.380200058221817, -0.7075772285461426, 0.199490845...
particular Model/table (ie Photo). Usually this provides you flexibility to associate one Model to many others.
[ 0.20785655081272125, 0.04655160382390022, 0.20349127054214478, 0.58806312084198, 0.2263564169406891, 0.004984850063920021, -0.3673505485057831, -0.07935576885938644, -0.39757856726646423, -0.9049144387245178, -0.1325777918100357, 0.2542512118816376, -0.03119926154613495, -0.040485683828592...
What is the difference between the `Unicode`, `UTF8`, `UTF7`, `UTF16`, `UTF32`, `ASCII`, and `ANSI` encodings? In what way are these helpful for programmers? Going down your list: * "[Unicode](https://en.wikipedia.org/wiki/Unicode)" isn't an encoding, although unfortunately, a lot of documentation imprecisely uses it...
[ 0.018349656835198402, -0.07582473754882812, 0.20283833146095276, -0.05961467698216438, -0.38137170672416687, 0.016760867089033127, -0.0874730795621872, 0.1453014612197876, -0.35797709226608276, -0.6007512807846069, -0.46308425068855286, 0.10041786730289459, -0.2439349740743637, 0.041842974...
Values outside the [Basic Multilingual Plane](http://en.wikipedia.org/wiki/Basic_Multilingual_Plane) (BMP) are encoded as surrogate pairs. These *used to be* relatively rarely used, but now many consumer applications will need to be aware of non-BMP characters in order to support emojis. * [UTF-8](http://en.wikipedia.o...
[ 0.09159892052412033, -0.05864814668893814, 0.2711564302444458, 0.025030799210071564, -0.46191564202308655, 0.5047329068183899, 0.05509251356124878, -0.24705763161182404, -0.27805134654045105, -0.4626613259315491, -0.3721452057361603, 0.11019723117351532, -0.44449666142463684, -0.0617436431...
using 4 bytes per code point. This isn't very efficient, but makes life easier outside the BMP. I have a .NET `Utf32String` class as part of my [MiscUtil](http://pobox.com/~skeet/csharp/miscutil) library, should you ever want it. (It's not been very thoroughly tested, mind you.) * [ASCII](http://en.wikipedia.org/wiki/A...
[ 0.23477652668952942, 0.07588790357112885, 0.1515801101922989, -0.17051072418689728, -0.23655396699905396, 0.3106049597263336, 0.3952028751373291, 0.12889434397220612, -0.39961275458335876, -0.7422776222229004, -0.3865630328655243, 0.10729072988033295, -0.2312803417444229, -0.08691155165433...
on [my Unicode page](http://csharpindepth.com/Articles/General/Unicode.aspx) and [tips for debugging Unicode problems](http://csharpindepth.com/Articles/General/DebuggingUnicode.aspx). The other big resource of code is [unicode.org](http://unicode.org) which contains more information than you'll ever be able to work y...
[ 0.23955169320106506, 0.2948952615261078, 0.17982211709022522, 0.16301167011260986, -0.19613051414489746, 0.003029362065717578, 0.37969157099723816, 0.2716992199420929, -0.35162803530693054, -0.8563631772994995, -0.20125459134578705, 0.028891822323203087, 0.2104739546775818, -0.080390684306...
I have a complete separation of my Entity Framework objects and my POCO objects, I just translate them back and forth... i.e: ``` // poco public class Author { public Guid Id { get; set; } public string UserName { get; set; } } ``` and then I have an EF object "Authors" with the same properties.. So I have m...
[ 0.03180529549717903, 0.36083143949508667, 0.5607112050056458, -0.22845429182052612, 0.050844043493270874, 0.07194576412439346, 0.3223562240600586, -0.3981914520263672, 0.020985830575227737, -0.5235358476638794, -0.12425119429826736, 0.5860406756401062, -0.4700219929218292, 0.34117481112480...
EntityKey value > cannot be attached to an object > context. **EDIT:** It looks like I have to use entities.AttachTo("Authors", dbAuthor); to attach without an EntityKey, but then I have hard coded magic strings, which will break if I change my entity set names at all and I wont have any compile time checking... Is ...
[ 0.050530754029750824, 0.2756274342536926, 0.6075791120529175, 0.14752785861492157, 0.027545146644115448, -0.440376877784729, 0.34279826283454895, -0.3104158043861389, -0.10088639706373215, -0.4080294668674469, -0.21231971681118011, 0.4907161295413971, -0.23104926943778992, 0.21310088038444...
set name. Edit: Yes there is a better way (well there should be). The designer should have generated ["Add" methods](http://msdn.microsoft.com/en-us/library/system.data.objects.objectcontext.addobject.aspx) to the ObjectContext for you which translate out to the call above.. So you should be able to do: ``` entiti...
[ 0.5365810990333557, 0.18959468603134155, 0.5781375765800476, 0.10443372279405594, 0.008993368595838547, -0.3269800543785095, 0.05139956250786781, -0.36207759380340576, -0.06508170813322067, -0.7198162078857422, -0.3291715979576111, 0.4603404104709625, -0.529484748840332, 0.0408077314496040...
I have a 15 GB XML file which I would want to split it .It has approximately 300 Million lines in it . It doesn't have any top nodes which are interdependent .Is there any tool available which readily does this for me ? I think you'll have to split manually unless you are interested in doing it programmatically. [Here'...
[ 0.4610303044319153, 0.0054596830159425735, 0.10367157310247421, 0.15673397481441498, -0.064946249127388, 0.03307753801345825, 0.12545040249824524, -0.2029852718114853, -0.3101215362548828, -0.6341744065284729, -0.0244861152023077, 0.4511735439300537, -0.1439855396747589, 0.0695542842149734...
like [Vim](http://www.vim.org/about.php). When handling such large files, it is always useful to turn off all forms of syntax highlighting and/or folding. Other options worth considering: 1. [EditPadPro](http://www.editpadpro.com/) - I've never tried it with anything this size, but if it's anything like other JGSoft ...
[ 0.2595359981060028, -0.20547842979431152, 0.7256941199302673, -0.0501336045563221, -0.22455279529094696, -0.0868215560913086, 0.09563372284173965, -0.17586860060691833, -0.36238718032836914, -0.8575124740600586, -0.06260374188423157, 0.5703390836715698, -0.26398301124572754, -0.16268649697...