text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
in C# 2.0 (I'll attempt to use C# 3.0 in my next run-through of the [Project Euler](http://projecteuler.net) questions). ### Question What suggestions (**not answers!**) do you have for solving project Euler #16 in C# 2.0? What methods would work? > **NB**: If you decide to post an answer, please prefix your attempt...
[ 0.023989848792552948, 0.26896652579307556, 0.15513671934604645, 0.15155160427093506, -0.21344217658042908, 0.2604197859764099, 0.1364719271659851, -0.33784300088882446, -0.06845515966415405, -0.2393335998058319, -0.3293880820274353, 0.12544415891170502, -0.3047051429748535, -0.340299218893...
datatype in C# with complete precision is probably the decimal type (128 bits, 28-29 digits). Just choose your own method of storing digits that allows you to store much bigger numbers. As for the rest, this will give you a clue: 21 = 2 22 = 21 + 21 23 = 22 + 22 Example: ``` The sum of digits of 2^100000 is 1...
[ -0.1775321066379547, -0.05956890061497688, 0.3164905309677124, 0.07613325119018555, -0.27844324707984924, 0.013461931608617306, 0.4330553412437439, -0.27429622411727905, -0.1778201311826706, -0.46008384227752686, -0.12232185900211334, 0.21579119563102722, -0.2587764263153076, -0.2672453522...
an array of digits. This can be represented easily in two ways: * As a string; * As an array of characters or digits. As others have mentioned, storing the digits in reverse order is actually advisable. It makes the calculations much easier. I tried both of the above methods. I found strings and the character arithme...
[ 0.04559743031859398, -0.0008172164089046419, 0.009880932979285717, 0.07140887528657913, -0.3192160129547119, 0.3171132206916809, 0.1790284961462021, -0.42349132895469666, -0.46125543117523193, -0.44527626037597656, 0.0486939512193203, 0.4334949254989624, -0.17355133593082428, -0.1412043124...
doubling the previous power of 2. So you can find 21000 by doubling 1 one thousand times. The doubling can be done in place with the general algorithm: ``` carry = 0 foreach digit in array sum = digit + digit + carry if sum > 10 then carry = 1 sum -= 10 else carry = 0 end if digit = sum end forea...
[ 0.18832360208034515, -0.1483832448720932, 0.5727590918540955, -0.32710227370262146, -0.24061736464500427, 0.16575974225997925, 0.02938762493431568, -0.7569395303726196, -0.6095112562179565, -0.3957280218601227, 0.129006490111351, 0.2672581672668457, -0.07615147531032562, -0.109120212495327...
add the results into a new array or string with each iteration. Bad idea. Really slows it down. As mentioned, it can be done in place. But how large should the array be? Well that's easy too. Mathematically you can convert 2^a to 10^f(a) where f(a) is a simple logarithmic conversion and the number of digits you need i...
[ 0.07146914303302765, 0.108261339366436, 0.28258034586906433, -0.0014709517126902938, -0.07800177484750748, 0.22685478627681732, 0.13592883944511414, -0.4695686995983124, -0.3106863498687744, -0.6596413850784302, -0.08118639141321182, 0.5380915999412537, -0.17047181725502014, -0.23049043118...
int can store a number between +/- 2 billion (approximately. Well 9 digits equals a billion so you can use a 32 bit int (signed or unsigned) as basically a base one billion "digit". You can work out how many ints you need, create that array and that's all the storage you need to run the entire algorithm (being 130ish b...
[ -0.20139044523239136, -0.11315411329269409, 0.3752065896987915, -0.15343232452869415, 0.05888190120458603, 0.256633996963501, 0.22792483866214752, -0.41581815481185913, -0.4941317141056061, -0.2525947690010071, -0.036987632513046265, 0.5319555997848511, -0.3467860221862793, -0.067245021462...
int ints = limit / 29; int[] number = new int[ints + 1]; number[0] = 2; for (int i = 2; i <= limit; i++) { doubleNumber(number); } String text = NumberToString(number); Console.WriteLine(text);
[ 0.0092544537037611, -0.36067160964012146, 0.6262507438659668, -0.4725877046585083, 0.24704407155513763, 0.243615984916687, 0.30911535024642944, -0.482206791639328, 0.06450111418962479, -0.38899901509284973, -0.36422738432884216, 0.48785826563835144, -0.3495834469795227, -0.0242638979107141...
Console.WriteLine("The sum of digits of 2^" + limit + " is " + sumDigits(text)); } static void doubleNumber(int[] n) { int carry = 0; for (int i = 0; i < n.Length; i++) { n[i] <<= 1; n[i] += carry;
[ 0.23807162046432495, -0.31380459666252136, 0.5092038512229919, -0.37062719464302063, 0.2025923728942871, 0.06339775770902634, 0.19671334326267242, -0.6443554759025574, 0.017923535779118538, -0.19902625679969788, -0.24642427265644073, 0.26888716220855713, -0.35720765590667725, -0.0516743548...
if (n[i] >= 1000000000) { carry = 1; n[i] -= 1000000000; } else {
[ 0.44259387254714966, -0.23262916505336761, 0.26686805486679077, -0.25339460372924805, 0.12653225660324097, -0.09112481772899628, 0.3155952990055084, -0.46846306324005127, -0.20319852232933044, -0.16607920825481415, -0.1889590322971344, 0.1656298190355301, -0.3582400381565094, 0.04208126291...
carry = 0; } } } static String NumberToString(int[] n) { int i = n.Length; while (i > 0 && n[--i] == 0) ; String ret = "" + n[i--];
[ 0.25084227323532104, -0.5229687094688416, 0.5733935832977295, -0.33629828691482544, 0.030958781018853188, 0.005802297964692116, 0.229591503739357, -0.8256147503852844, -0.268502801656723, 0.11784902215003967, -0.5491513609886169, 0.4934614300727844, -0.34277158975601196, 0.0853550210595130...
while (i >= 0) { ret += String.Format("{0:000000000}", n[i--]); } return ret; } ```
[ -0.06615415215492249, -0.10469286888837814, 0.5521494150161743, -0.31491923332214355, 0.24638338387012482, 0.28169941902160645, 0.6499848961830139, -0.36917921900749207, -0.19117386639118195, -0.3245707154273987, -0.5252633094787598, 0.7373675107955933, -0.1355375498533249, 0.3061354160308...
When overriding a class in C++ (with a virtual destructor) I am implementing the destructor again as virtual on the inheriting class, but do I need to call the base destructor? If so I imagine it's something like this... ``` MyChildClass::~MyChildClass() // virtual in header { // Call to base destructor... th...
[ 0.06250999122858047, -0.06995456665754318, 0.24049393832683563, -0.11335088312625885, -0.06154399365186691, -0.22663402557373047, 0.393359899520874, -0.037561994045972824, -0.04566604644060135, -0.7026627063751221, -0.2972615957260132, 0.9160759449005127, -0.3719271123409271, 0.24172547459...
Currently, I have a dynamically created gridview on my page. When a user enters something in a textbox and presses a button, the whole page refreshes to populate the gridview and make it visible. I do not want that anymore. How would I go about using the UpdatePanel to make the gridview visible and populate it? ``` <...
[ 0.1700868308544159, -0.11591240763664246, 0.8815999627113342, -0.4192591607570648, -0.1648365706205368, 0.20960260927677155, 0.15245464444160461, -0.21093186736106873, -0.2653745114803314, -0.8937717080116272, 0.012368950992822647, 0.36777523159980774, -0.09536198526620865, 0.2378971874713...
ID="Select" runat="server" Font-Bold="true" Text="Select choice" Visible="false"></asp:Label><br /> <ajax:UpdatePanel ID="UpdatePanel" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:GridView ID="GridView" Visible="false" runat="server" HeaderStyle-Width=...
[ 0.03179330378770828, -0.2740224599838257, 0.436336487531662, -0.18194663524627686, -0.12292245030403137, 0.057245515286922455, 0.016890937462449074, -0.46352049708366394, 0.06604398787021637, -0.7573540806770325, -0.2990802228450775, 0.5602786540985107, -0.034545328468084335, -0.3411003649...
DataKeyNames="Id" onsorting="GridView_OnSort"> <Columns> ... </Columns>
[ -0.40982586145401, -0.10828664153814316, 0.25766295194625854, 0.006933535914868116, 0.22753538191318512, 0.26998913288116455, -0.05753324553370476, -0.1839025467634201, -0.33365538716316223, -0.6672224998474121, -0.1799515187740326, 0.013454651460051537, -0.1565914750099182, 0.134391784667...
</asp:GridView> </ContentTemplate> <Triggers> <ajax:AsyncPostBackTrigger ControlID="CreateButton"/> </Triggers> </ajax:UpdatePanel> ``` Theres another button on the page called CreateButton, obviously, that will populate
[ 0.2450563758611679, -0.37815406918525696, 0.615506112575531, -0.02787906862795353, 0.008525197394192219, -0.17256177961826324, -0.23810109496116638, 0.20848357677459717, -0.29934993386268616, -0.8516573309898376, -0.3423353135585785, 0.17490586638450623, -0.46175622940063477, -0.1235709339...
the gridview and make it visible so a user can select from it. Is this possible? Thanks in advance. Edit: Binding Code to gridview: ``` protected void Create_Click(object sender, EventArgs e) { if (!String.IsNullOrEmpty(Number.Text)) { BLL newbll = new BLL();
[ 0.3095736503601074, -0.42039528489112854, 0.8405665755271912, -0.1464044153690338, 0.3762836456298828, -0.20856855809688568, 0.05080734193325043, -0.2030421793460846, -0.21571624279022217, -0.9387193322181702, -0.21682439744472504, 0.6736010313034058, -0.32107165455818176, 0.03149240836501...
Database.DataTable tempTable = newbll.GetItemByPartNumber(Number.Text); if (Table.Count != 0) { DataTable table = tempTable ; string[] VID = { "Id" }; GridviewDiv.Visible = true;
[ 0.1793162226676941, -0.35820454359054565, 0.3547820448875427, 0.18902446329593658, 0.23789499700069427, -0.11164578795433044, 0.2902102768421173, -0.22331734001636505, -0.16490137577056885, -0.6727852821350098, -0.1161135882139206, 0.6679658889770508, -0.44642373919487, 0.27697861194610596...
GridView.DataSource = table; GridView.DataKeyNames = VID; GridView.DataBind(); } } } ``` No, destructors are called automatically in the reverse order of construction. (Base classes last). Do not call base class destructors.
[ 0.027567239478230476, -0.2144021838903427, 0.5099694132804871, -0.23172593116760254, -0.040494684129953384, -0.026490913704037666, 0.17826449871063232, -0.2553831934928894, -0.26140663027763367, -0.8384428024291992, -0.3257371485233307, 0.7220995426177979, -0.32404863834381104, 0.245630413...
I have an ordered list: ``` <ol> <li>They used to bring concerns about their children or their marriages. But increasingly parishioners are also telling Glen VanderKloot, a Lutheran minister in Springfield, Ill., about their financial worries, and that puts him in the unusual position of dispensing investment advice.<...
[ 0.043399542570114136, 0.48162809014320374, 0.490748792886734, -0.461616188287735, -0.010826174169778824, 0.5945845246315002, 0.5171433687210083, 0.24590593576431274, -0.3412153422832489, -0.849793016910553, -0.036990080028772354, 0.352847158908844, -0.35927554965019226, 0.12460701167583466...
their marriages. But increasingly parishioners are also telling Glen VanderKloot, a Lutheran minister in Springfield, Ill., about their financial worries, and that puts him in the unusual position of dispensing investment advice. 2. This is the Second g 3. This is the Third g 4. This is the fourth g 5. ...
[ 0.15744951367378235, 0.41245266795158386, 0.7458035945892334, -0.3673434853553772, 0.13329845666885376, 0.4354625642299652, 0.920680820941925, -0.0396580770611763, -0.41446053981781006, -0.737790048122406, 0.028084101155400276, 0.44918298721313477, -0.11250515282154083, 0.23672489821910858...
have a lot of text like the first item, I want it to be formatted like above. I was able to accomplish this by setting: ``` list-style-position:outside; ``` and adjusting some margins on the li and ol tags. However, this had some adverse effects when I had double and triple digits. I had to use these margins as in I...
[ 0.2809005379676819, 0.1399088054895401, 0.3169352412223816, 0.005786615889519453, -0.23331281542778015, 0.10592833161354065, 0.1904716044664383, -0.14725488424301147, -0.04704396054148674, -0.789627194404602, -0.006932596210390329, 0.4423387944698334, -0.26770779490470886, -0.0785189345479...
this wrapping? Using `list-style-position:outside;` would be more doable if you were using an unordered list, which would always take the same amount of space for the marker. Since you are using an ordered list, I would stick with `list-style-position:inside;`. The problem, as you've discovered, is that IE and Firefox ...
[ 0.5339798927307129, 0.12358405441045761, 0.19666245579719543, -0.03196744993329048, -0.17076189815998077, 0.09365259855985641, -0.08697345107793808, -0.08198384195566177, -0.40607950091362, -0.5452669858932495, -0.274323433637619, 0.386961966753006, -0.3191297650337219, -0.0038468176499009...
different properties to create the space. IE uses `margin` on the `<ol>` (30 points) while Firefox uses `padding` (40 pixels), so you'll have to reset both of these values to achieve cross-browser happiness. Try this: ``` ol { margin-left: 0; padding-left: 3em; list-style-position: outside; } ```
[ -0.05525154620409012, -0.06017157435417175, 0.7274278998374939, -0.051384080201387405, -0.04836713522672653, 0.10354142636060715, 0.04445762187242508, -0.3117431700229645, -0.07938048243522644, -0.9175347089767456, -0.055098749697208405, 0.2647784948348999, -0.15866531431674957, -0.0344323...
I currently have the FLVplayback component on my stage, however, I have the autoPlay set to False. This is a problem because I want the stream to only start downloading when the user presses play. Also, I would like to be able to stop the stream from downloading when I click away from the page with the video on. Th...
[ 0.3070935010910034, -0.05871715396642685, 0.6994590759277344, -0.0115946214646101, 0.04383927956223488, -0.10652097314596176, 0.38927820324897766, -0.24126765131950378, -0.2694714069366455, -0.41283997893333435, 0.11102351546287537, 1.2900795936584473, -0.3021811544895172, -0.0262595340609...
method will work, but will mess up the player. I made a class a while back that does stop the video stream effectively and still allows you to continue using that player though, you can see it here: [FLVPlaybackUtils](http://pastie.org/310174) Using that class you can just do this: ``` import FLVPlaybackUtils; FLVP...
[ 0.09432265907526016, -0.08899426460266113, 0.584180474281311, 0.09991959482431412, 0.2601867616176605, -0.3853394091129303, 0.5198086500167847, -0.13553424179553986, -0.482745498418808, -0.5109533667564392, 0.11227802187204361, 0.9552314877510071, -0.39027464389801025, 0.20177868008613586,...
I'm backing up MySql -table to worksheet. My current result-set has rows where some of columns are empty. That's ok, but for the worksheet i need these to be replaced with 'foo'. HowTo? All help is highly appreciated. Empty or NULL? There's a big difference there. If it's NULL, you can use the `COALESCE()` function...
[ -0.16462847590446472, 0.2617358863353729, 0.35372960567474365, 0.06323742866516113, 0.07108233124017715, 0.2800488770008087, -0.10573775321245193, 0.04918090999126434, -0.024701355025172234, -0.47969093918800354, 0.012824670411646366, 0.527436375617981, -0.18084567785263062, 0.059161730110...
I am writing a controller for an audio server on the iPhone. Each 'view' generally needs to get data from the TCP/IP socket as a client. I have sockets working from one class using the [AsyncSocket](http://www.cocoadev.com/index.pl?AsyncSocket) class. (which, after trying to get a socket client working for more time th...
[ 0.41302746534347534, -0.08935581147670746, 0.4503062665462494, -0.037790995091199875, -0.17445090413093567, 0.1520780622959137, -0.007292220368981361, -0.30290427803993225, -0.34721875190734863, -0.8118932247161865, 0.1116902157664299, 0.48170599341392517, -0.3524962365627289, -0.013482262...
to the albums on the next view and so on. My question is: When I go from view to view, what is the best way to still send and receive data? Do I need to create a whole new socket for each view class? (seems a bit over the top) Somehow link the local receiver delegate again? I can't seem to think of the 'proper' way...
[ 0.69737309217453, -0.03605209290981293, 0.2806365489959717, 0.28865405917167664, -0.26227477192878723, 0.2038242220878601, 0.15600815415382385, -0.1275600641965866, -0.42707359790802, -0.49512970447540283, 0.26860299706459045, 0.4766642153263092, -0.0013799573061987758, 0.13272477686405182...
On Mac OS X, the solution is to use the notification system. I haven't looked at the `AsyncSocket` class, but it looks like it only supports a delegate out of the box. Notifications are great because they let an object broadcast information to any other objects that are interested in receiving it. Objects register the...
[ -0.05599969998002052, -0.03430797904729843, 0.010630743578076363, 0.021963588893413544, -0.21184231340885162, -0.25281596183776855, 0.23053225874900818, 0.1439419835805893, -0.372324675321579, -0.796832799911499, -0.16171878576278687, 0.633945882320404, -0.4376044273376465, 0.0079226288944...
this class as the delegate for the `AsyncSocket` object. Then, when the delegate methods get called, you would post notifications to the `NSNotificationCenter`. You'll probably need to stuff the parameters from the delegate methods into the notification's `userInfo` dictionary. On the flip side, your view controllers ...
[ 0.12257049977779388, -0.2512085735797882, 0.2211592197418213, 0.08894452452659607, -0.2476089745759964, -0.061433449387550354, 0.21366463601589203, -0.046164076775312424, -0.3234613239765167, -0.7236809134483337, -0.012984078377485275, 0.5739039182662964, -0.32837504148483276, 0.1998834162...
*socket; } @property (nonatomic, readonly) socket; @end ``` In the .m file: ``` NSString *const AsyncSocketDidReadData = @"AsyncSocketDidReadData"; @implementation MySocketWrapper @synthesize socket; - (id)init { if (![super init]) return nil; socket = [[AsyncSocket alloc] init]; // initialize this how...
[ -0.120174840092659, -0.23633402585983276, 0.19419628381729126, -0.1271560788154602, 0.12679193913936615, 0.23181186616420746, 0.3904573619365692, -0.31805962324142456, -0.18776528537273407, -0.6835977435112, -0.18765197694301605, 0.549967348575592, -0.13275034725666046, 0.26189330220222473...
nil]; [[NSNotificationCenter defaultCenter] postNotificationName:AsyncSocketDidReadData object:self.socket userInfo:userInfo]; } @end ``` Finally, in your various view controllers, you can write code like this: ``` - (id)initWithNibName:(NSString *)nibName bundle:(NSBundle *)bundle { if (![super initWithNib...
[ -0.1249907985329628, -0.4433920681476593, 0.40764814615249634, -0.022456277161836624, -0.1703215390443802, 0.1786659210920334, 0.1299082636833191, -0.13698135316371918, -0.2499352991580963, -0.9884853363037109, -0.2117268592119217, 0.5774075388908386, -0.09114993363618851, 0.32623875141143...
userInfo] objectForKey:@"data"]; long tag = [[[notification userInfo] objectForKey:@"tag"] longValue]; // Do what you want with the data here } ``` Obviously, this code isn't entirely complete, and I may have gotten some method names wrong (I'm doing this from memory) but this is a solution that should work ...
[ -0.02785721980035305, 0.005473364144563675, 0.42301616072654724, -0.04212699085474014, 0.19080929458141327, -0.34057384729385376, 0.34227296710014343, -0.3208874762058258, -0.054042086005210876, -0.5533989667892456, 0.04051561281085014, 0.6408327221870422, -0.317176878452301, 0.06207621470...
I have extension method: ``` public static IQueryable<TResult> WithFieldLike<TResult>( this IQueryable<TResult> query, Func<TResult, string> field, string value) { Expression<Func<TResult, bool>> expr = trans => field(trans).Contains(value); return query.Where(expr); } ``` I need change parame...
[ -0.3318573236465454, 0.1240948736667633, 1.0132795572280884, -0.05251691862940788, 0.12727801501750946, 0.15629728138446808, 0.13908980786800385, -0.6646352410316467, -0.11220255494117737, -0.48984265327453613, -0.24105414748191833, 0.5642484426498413, -0.31668511033058167, 0.3022914230823...
help. Deconstruct `field` and create a new expression, something like this: ``` var expr = Expression.Lambda<Func<TResult, bool>> ( Expression.Call (field.Body, typeof (string).GetMethod ("Contains"), Expression.Constant (value)), field.Parameters) ; ``` *(edited as per Maxs's refinement in comments)*
[ -0.11168530583381653, -0.07708964496850967, 0.36957475543022156, -0.09139323979616165, 0.28793567419052124, -0.05512871965765953, 0.5830299854278564, -0.4120705723762512, 0.08234942704439163, -0.5717535614967346, -0.4865224063396454, 0.6574845314025879, -0.5759370923042297, -0.101997606456...
Is there a module written purely in Python that will allow a script to communicate with a MySQL database? I've already tried MySQLdb without success. It requires too much: GCC, zlib, and openssl. I do not have access to these tools; even if I did, I don't want to waste time getting them to work together. I'm looking fo...
[ 0.36577996611595154, 0.18787936866283417, -0.19493243098258972, 0.48797324299812317, -0.11507991701364517, -0.1683627814054489, 0.1637418270111084, 0.35730209946632385, -0.15152627229690552, -0.3750424385070801, 0.18822763860225677, 0.6150593161582947, -0.03209947794675827, -0.091649547219...
I'm working with a small database (a few hundred records, mainly names and addresses) I've decided to use SQLite. I just discovered it. It seems to be perfectly suited for my purposes; it was simple to install (took about two minutes) and works well with Python. I'm stuck with Python 2.4 so I can't use the sqlite3 modu...
[ 0.2155296504497528, 0.060531094670295715, 0.3516887128353119, -0.11799576878547668, -0.13017337024211884, 0.0722360908985138, -0.11539410799741745, 0.07740609347820282, -0.11926409602165222, -0.6163396835327148, 0.14866314828395844, 0.4955715537071228, -0.3012661933898926, 0.20828102529048...
not be a problem for your prjoect. If you can't live with that, you can also pick up [PyMySQL](https://pypi.org/project/PyMySQL/) instead which is one of the few connectors that works well and is distributed under MIT.
[ 0.5004817843437195, -0.31556761264801025, 0.23175224661827087, 0.40419840812683105, -0.038651105016469955, -0.04338112473487854, -0.00977801438421011, 0.5212015509605408, -0.30508965253829956, -0.8802039623260498, -0.09917905181646347, 0.21187636256217957, -0.34655123949050903, 0.083693973...
Okay, I've scoured google and I haven't found an answer for this. Not exactly programming related unless I was trying to use an ide over the session... I have servers at the same remote location; one is older running fedora 4 (P4 3.0Ghz) and a couple of newer server running Centos5 (Quad Xeon 1.6). I can run a remot...
[ 0.29622137546539307, 0.08544065803289413, 0.36232390999794006, 0.3736554980278015, -0.29335319995880127, 0.12151114642620087, 0.20755092799663544, 0.2809133529663086, -0.16460828483104706, -0.8736593127250671, 0.19575756788253784, 0.49261215329170227, -0.11302550137042999, 0.16016671061515...
slow/laggy. The two centos servers are not taxed at all by applications, one is a hot standby so it's not running anything really. I've tried these kernels on the centos boxes: 2.6.18-92.1.22.el5xen 2.6.18-92.1.22.el5 2.6.18-8.1.8.el5 All these servers are on the same subnet and share the same routing pat...
[ -0.16210228204727173, -0.30696868896484375, 0.507268488407135, 0.27278971672058105, -0.027099130675196648, 0.12179842591285706, 0.21783649921417236, 0.4130092263221741, -0.24367164075374603, -0.8287182450294495, 0.0617348849773407, 0.36696237325668335, -0.05596756935119629, 0.0523689463734...
the older stuff. I've used VNC and NX to solve the problem in the past, and have had the best low-network use performance from NX. The FreeNX project is very useable if money is an issue. The only issue I've had with NX is I've never had reasonable sound, GLX, or XRender performance. But, that isn't really an issue for...
[ 0.501500129699707, 0.14009208977222443, 0.04915127903223038, 0.13632012903690338, -0.0459478422999382, -0.12815673649311066, -0.1338001787662506, 0.4355717599391937, -0.12357600778341293, -0.7282623648643494, 0.271284282207489, 1.1990889310836792, -0.10271282494068146, 0.2940409481525421, ...
Has anyone seen a performance increase in Visual Studio 2008 by using ReadyBoost in Windows Vista? I have 4G of RAM and adding more will do nothing (I'm running Vista 32), so I'm investigating other options to speed up the responsiveness of the development environment and the build process. Upgrading to 64-bit Windows...
[ 0.12340632826089859, 0.23502184450626373, 0.23909182846546173, -0.05016976222395897, -0.28747278451919556, -0.02972869761288166, 0.25313690304756165, 0.030772721394896507, -0.232542023062706, -0.4924582839012146, 0.12317162752151489, 1.235615849494934, -0.2342109978199005, -0.2314476221799...
the performance of Visual Studio with your system, ReadyBoost will only do a little... better hardware will do much more.
[ 0.29879996180534363, 0.05334626883268356, 0.3112757205963135, 0.3799827992916107, -0.1634761393070221, -0.1199655681848526, 0.2668655812740326, -0.1168525218963623, 0.1274893581867218, -0.6677829027175903, 0.2816182076931, 0.898379385471344, 0.23297026753425598, -0.2932179272174835, 0.01...
I've recently built a linux platform interface for Cocotron, and was able to build the Foundation framework with no errors. However, when linking my objective-C project, I get a linker error: /Developer/Cocotron/1.0/Linux/i386/Frameworks/Foundation.framework//libFoundation.so: undefined reference to `\_\_gnu\_objc\_p...
[ 0.08656026422977448, 0.2811570465564728, 0.1755066215991974, 0.24569572508335114, -0.1489511877298355, -0.1762809455394745, 0.2539357542991638, -0.09261393547058105, -0.024173902347683907, -0.7467797994613647, 0.2433476448059082, 0.5832421779632568, -0.6001079678535461, -0.0971373617649078...
-F/Users/me/MyProject/build/Linux/Release -F/Users/me/frameworks/Shared -F/Developer/Cocotron/1.0/Linux/i386/Frameworks -F/Users/me/frameworks/OtherProject/Linux -filelist "/Users/me/MyProject/build/Linux/MyProject.build/Release/MyProject Linux.build/Objects-normal/i386/MyProject.LinkFileList" ...
[ 0.28237876296043396, 0.38485953211784363, 0.11276499181985855, 0.27021926641464233, 0.032699473202228546, -0.1576938033103943, 0.07734768092632294, -0.19929274916648865, -0.40298891067504883, -0.4765741527080536, -0.18945921957492828, 0.5017685890197754, -0.3867450952529907, 0.070874750614...
help would be much appreciated. In my experience, ReadyBoost does provide marginal performance improvements, but typically for loading larger applications that you use often. If "loading Visual Studio" is an improvement for you, you will like ReadyBoost. In my opinion, you should get an inexpensive drive, and just use...
[ 0.15835070610046387, 0.04063739255070686, 0.02981344237923622, 0.4433235228061676, -0.23562155663967133, -0.06369965523481369, -0.00803860928863287, 0.1700190156698227, -0.010894274339079857, -0.6710505485534668, 0.15334413945674896, 1.1894330978393555, 0.04460471123456955, -0.184766843914...
A colleague emailed me an example ASP.NET MVC project that won't build on my machine as it contains a reference to `System.Web.Mvc.dll` In the .csproj file: ``` <Reference Include="System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" /> ``` I have VS2008 SP1...
[ 0.2530723214149475, 0.23758681118488312, 0.2792351543903351, -0.05532273277640343, 0.004032210912555456, 0.12305574119091034, 0.3776005804538727, -0.1288509964942932, -0.4344940185546875, -0.5941447615623474, 0.058855123817920685, 0.41253215074539185, -0.2317829579114914, 0.263675570487976...
the latest one. [ASP.NET MVC 1.0](http://www.microsoft.com/downloads/details.aspx?FamilyID=53289097-73ce-43bf-b6a6-35e00103cb4b&displaylang=en) includes the assembly `System.Web.Mvc.dll`
[ -0.254519522190094, -0.12906163930892944, 0.8563920855522156, -0.1021076887845993, 0.2520391047000885, -0.04379440099000931, -0.041980162262916565, -0.29712048172950745, -0.5640233755111694, -0.6408116817474365, -0.587252676486969, -0.07841917872428894, -0.0651899129152298, 0.0916016995906...
I need to remove elements with specific value from std::list. With the `list<int>` I used remove() method. Now I have `list<CMyClass>` so I thought I should use remove\_if() but it's predicate takes only one paramater - the element to be tested. How do I write a function `foo(const CMyClass &Bad)` which removes from ...
[ -0.08639243990182877, 0.24688595533370972, 0.43309327960014343, -0.13714437186717987, -0.15479792654514313, 0.2737656533718109, 0.31789979338645935, -0.673065721988678, -0.13739801943302155, -0.4720166027545929, 0.042150553315877914, 0.5702230930328369, -0.4118947386741638, -0.008015027269...
return false; } ``` Your class has to implement operator == in your ClassName ``` bool operator == ( const Class& rhs ); ``` and then you can use ``` list.remove( Bad ) ``` If it is reasonable to your class to have operator == ( not just for remove ) - than list::remove is good for you solution. If operator == ...
[ -0.30886051058769226, -0.1969638615846634, -0.05139058455824852, -0.21676629781723022, 0.100301593542099, -0.14543738961219788, 0.659774124622345, -0.3934546113014221, 0.08658929169178009, -0.6343601942062378, -0.3462088108062744, 0.6991583108901978, -0.5185917615890503, -0.041267134249210...
a_( a ), b_( b ) {} bool operator == (const Class &rhs) { return (rhs.a_ == a_ && rhs.b_ == b_); } void print() { std::cout << a_ << " " << b_ << std::endl; } }; bool isEqual( Class lhs, Class rhs ) { return (rhs.a_ == lhs.a_ && rhs.b_ ==
[ -0.16641446948051453, -0.07575301826000214, 0.36616072058677673, -0.5215797424316406, 0.1700318157672882, 0.18967439234256744, 0.6133494973182678, -0.6498593091964722, -0.11063094437122345, -0.36303529143333435, -0.49066847562789917, 0.6138540506362915, -0.4746593236923218, 0.1542382538318...
lhs.b_); } struct IsEqual { IsEqual( const Class& value ): value_( value ) {} bool operator() (const Class &rhs) { return (rhs.a_ == value_.a_ && rhs.b_ == value_.b_); } Class value_; }; int main() { std::list<Class> l; l.push_back( Class( 1, 3 ) ); l.push_back( ...
[ -0.2856283485889435, -0.6083402633666992, 0.841297447681427, -0.7431778311729431, 0.14608897268772125, 0.4951632618904114, 0.2750236392021179, -0.3989315927028656, -0.20040006935596466, -0.44116777181625366, -0.32620036602020264, 0.522659957408905, -0.3863559067249298, 0.1954265832901001, ...
) ); Class bad( 2, 5 ); std::cout << "operator == " << std::endl; l.remove( bad ); std::for_each( l.begin(), l.end(), std::mem_fun_ref( &Class::print ) ); std::cout << "binary function predicat" << std::endl; l.push_back( Class( 2, 5 ) ); l.remove_if( std::bind2nd( std::ptr_fun(isEqual), ...
[ -0.3254392445087433, -0.27685481309890747, 0.48919814825057983, -0.4660010039806366, 0.08456447720527649, 0.38074633479118347, 0.19419443607330322, -0.3258833587169647, -0.20027337968349457, -0.32478153705596924, -0.8747625946998596, 0.591115415096283, -0.6232388615608215, 0.05295731499791...
std::for_each( l.begin(), l.end(), std::mem_fun_ref( &Class::print ) ); return 0; } ```
[ -0.08050798624753952, 0.16187071800231934, 0.33840274810791016, -0.3579230010509491, 0.23032128810882568, 0.16714343428611755, 0.15781451761722565, -0.09479235112667084, -0.10871002823114395, -0.4206073582172394, -0.5579119920730591, 0.779330849647522, -0.4379582405090332, 0.13656620681285...
I'm currently working on moving a legacy Visual FoxPro app to the web. Our plans included purchasing an application framework such as Strataframe or MM .NET, both VFP friendly, and also some third-party controls to speed up development. Well, we recently heard that we're probably going to have to host this app using "...
[ 0.7417940497398376, 0.031455911695957184, 0.26965945959091187, 0.1157415509223938, -0.009844144806265831, 0.07947046309709549, -0.09987153112888336, 0.0373021699488163, -0.21890674531459808, -0.7010294198989868, 0.07267235964536667, 0.6354912519454956, -0.01470103021711111, 0.3399499058723...
"out of the box" SharePoint means you can't use Visual Studio to extend it. I'm not sure whether using SharePoint Designer would count or not. Out-of-the-box SharePoint can be pretty powerful for something that requires no development. However, if you're trying to solve a complex problem, the OOTB SharePoint applicati...
[ 0.263825923204422, -0.054498594254255295, 0.08256977796554565, 0.19194358587265015, 0.0672018975019455, -0.1426360011100769, 0.2056608647108078, 0.03286335617303848, -0.14432135224342346, -0.6012992858886719, 0.03016604110598564, 0.44843223690986633, -0.2870035767555237, 0.3802857100963592...
some dedication to be proficient--that is, it'll likely become a primary focus of you or other programmers on your team. The book *Inside Microsoft Windows SharePoint Services 3.0* is a good introduction to the development side of things. Before you commit to SharePoint, I'd make sure to get a fairly clear roadmap of ...
[ 0.4105055034160614, 0.06440849602222443, 0.18254779279232025, 0.12159301340579987, 0.08095981180667877, -0.2060118168592453, 0.4478989839553833, -0.12097739428281784, 0.0022231414914131165, -0.7826325297355652, -0.08779562264680862, 0.7331132888793945, 0.48536014556884766, -0.3716571033000...
do out of the box, and how it will affect your team of programmers if you have to go beyond that.
[ 0.7226659655570984, -0.06543979048728943, -0.36609190702438354, 0.21941031515598297, 0.11734744906425476, -0.4137352406978607, -0.0691654309630394, 0.09286066889762878, -0.023819096386432648, -0.16180887818336487, -0.2714620530605316, 0.5031777620315552, 0.07313622534275055, -0.09013807028...
I've wrapped most of wininet with no problems, but now I'm stuck. I am trying to p/invoke [FtpCommand](http://msdn.microsoft.com/en-us/library/aa384133(VS.85).aspx) from wininet.dll, but every command I run returns "500 syntax error". Even simple commands like dir, or ls. If I connect to the same server with ftp.exe th...
[ -0.1797405332326889, -0.01914883591234684, 0.4542267322540283, -0.20732051134109497, 0.009529313072562218, 0.03310637176036835, 0.4361339807510376, -0.0959736630320549, -0.04557717964053154, -0.5887355804443359, -0.23072703182697296, 0.6891446709632874, -0.2204386293888092, 0.3772124052047...
[In] string command, [In] IntPtr dwContext, [In][Out] ref int ftpCommand); ``` And the code where I'm calling it: ``` public string SendCommand(string cmd) { int result; IntPtr dataSocket = new IntPtr(); switch(cmd) { case "PASV":
[ 0.026848571375012398, -0.41478395462036133, 0.8642908334732056, -0.43822479248046875, 0.24986913800239563, 0.020034128800034523, 0.3256946802139282, -0.3395478427410126, -0.23711679875850677, -0.4870627522468567, -0.42911702394485474, 0.5564618706703186, -0.1731048971414566, 0.142920151352...
result = WININET.FtpCommand(_hConnect, false, WININET.FTP_TRANSFER_TYPE_ASCII, cmd, IntPtr.Zero, ref dataSocket); break; default: result = WININET.FtpCommand(_hConnect, true, WININET.FTP_TRANSFER_TYPE_ASCII, cmd, IntPtr.Zero, ref dataSocket); break; } ...
[ -0.601331353187561, -0.2892085015773773, 0.5324719548225403, -0.09272850304841995, 0.6229333281517029, 0.0289091095328331, 0.38833141326904297, -0.08068884909152985, -0.13776397705078125, -0.3749987483024597, -0.5398642420768738, 0.44424232840538025, -0.11683473736047745, 0.200481042265892...
int BUFFER_SIZE = 8192; if(result == 0){ Error(); } else if(dataSocket != IntPtr.Zero) { StringBuilder buffer = new StringBuilder(BUFFER_SIZE); int bytesRead = 0;
[ -0.3876810669898987, -0.35042494535446167, 0.4374414086341858, -0.4709163010120392, 0.14838078618049622, 0.3674335777759552, 0.2936656177043915, -0.3875727653503418, -0.27364611625671387, -0.3308236598968506, -0.3007994592189789, 0.3471370041370392, -0.19251547753810883, 0.0870491936802864...
do { result = WININET.InternetReadFile(dataSocket, buffer, BUFFER_SIZE, ref bytesRead); } while (result == 1 && bytesRead > 1); return buffer.ToString(); } return ""; } ``` Everything else is working, I can download files, upload files and
[ 0.03211773559451103, -0.053995102643966675, 0.6232689619064331, -0.12450811266899109, 0.40054547786712646, -0.10249029844999313, 0.28069546818733215, -0.2624952495098114, -0.04991805553436279, -0.6968625783920288, -0.17015989124774933, 0.520836353302002, -0.17020171880722046, 0.10737070441...
imitate the dir command using FtpFindFirstFile(), but I can't seem to send commands using the above method. EDIT ---- My code for SendCommand has just been SendCommand("DIR") or SendCommand("LS"). After reading one of the answers (can't see who while I'm editing) I changed it to SendCommand("LIST") and that returned ...
[ 0.08031967282295227, -0.12351541966199875, 0.5124188661575317, -0.35376277565956116, -0.35220053791999817, 0.1428743451833725, 0.2460249811410904, -0.14714497327804565, -0.11845207214355469, -0.715019941329956, 0.201968252658844, 0.7278048992156982, -0.2857809364795685, 0.00548371113836765...
I've also tried passing the handle received by dataSocket in the FtpCommand call, but the app just exits with no errors if I do that. EDIT 2 ------ I'm using InternetReadFile to read data from the handle of the data socket returned in my call to FtpCommand. The method signature for InternetReadFile I am using is this...
[ 0.03476057946681976, -0.13243289291858673, 0.9775353074073792, 0.07451148331165314, -0.0604088120162487, -0.07017724961042404, 0.21867838501930237, -0.2783641815185547, -0.1366906613111496, -0.8599116206169128, 0.09048619866371155, 0.6567700505256653, -0.22996385395526886, -0.1777066141366...
error`s?** Remember that unlike an FTP client (like `ftp.exe`) the actual [FTP protocol](http://www.faqs.org/rfcs/rfc959.html) doesn't take commands like `ls`, it takes commands like `LIST` and `NLST` See the [Raw FTP Command List](http://www.nsftools.com/tips/RawFTP.htm#LIST) or [RFC 959](http://www.faqs.org/rfcs/rf...
[ 0.016397908329963684, 0.013750217854976654, 0.35948824882507324, -0.043780453503131866, -0.03431704267859459, 0.14828559756278992, 0.4100196957588196, -0.13945545256137848, -0.45905637741088867, -0.6585820913314819, -0.07120109349489212, 0.6559518575668335, -0.38052088022232056, 0.05379560...
**Notes:** * You might consider using something like [WireShark](http://www.wireshark.org/) to see the actual network traffic sent by `ftp.exe` and compare it to what your code is sending * You might also consider looking into [FtpWebRequest](http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest.getresponse...
[ 0.5969623327255249, -0.47244352102279663, 0.2974429726600647, 0.4113920331001282, -0.12924444675445557, -0.458556592464447, 0.2943509817123413, 0.11382486671209335, -0.44910258054733276, -0.6643328070640564, -0.15749984979629517, 0.18668965995311737, -0.18033520877361298, -0.06982341408729...
We use wix to create setups for our application. For the case where the user has already installed an older version of our application, we do a major upgrade with the [MajorUpgrade XML element](http://wixtoolset.org/documentation/manual/v3/xsd/wix/majorupgrade.html). This is all working as desired: if an older version ...
[ 0.37917688488960266, -0.10903602838516235, 0.5651177763938904, -0.07472797483205795, -0.03825113922357559, -0.1652073860168457, 0.5405904054641724, -0.014890728518366814, -0.13327790796756744, -0.7458084225654602, -0.23795388638973236, 0.7465811967849731, -0.4315335750579834, 0.09853678196...
top of the older version in the same ProgramFiles location. The user gets to see two entries in the "add/remove programs" list and sees two identical shortcuts on the desktop (the old user-specific one and the new perMachine one). How do I transition my installer from the "perUser" to the "perMachine" install scope wi...
[ 0.018215566873550415, 0.025817492976784706, 0.8056619763374329, -0.11308005452156067, 0.3004794716835022, -0.09497206658124924, 0.29136165976524353, -0.32803887128829956, -0.2688397765159607, -0.72077476978302, -0.3796117901802063, 0.8957043290138245, -0.41677671670913696, 0.07356436550617...
Related install for product '{0C6604FB-58EC-48B9-8259-5871EFDADEB9}' is per-user. Skipping... MSI (c) (D0:0C) [15:46:35:496]: FindRelatedProducts: current install is per-machine. Related install for product '{0C6604FB-58EC-48B9-8259-5871EFDADEB9}' is per-user. Skipping... ``` So before install, make sure you run a...
[ -0.3759791851043701, 0.14442603290081024, 0.9806994199752808, -0.11152122914791107, 0.3626377284526825, -0.20630373060703278, 0.26438790559768677, -0.4048120081424713, -0.10883279144763947, -0.7397551536560059, -0.5451672673225403, 0.7899321913719177, -0.35604727268218994, 0.30518487095832...
PROPERTY CHANGE: Adding WIX_UPGRADE_DETECTED property. Its value is '{0C6604FB-58EC-48B9-8259-5871EFDADEB9}'. MSI (c) (D0:88) [15:46:36:716]: PROPERTY CHANGE: Adding MIGRATE property. Its value is '{0C6604FB-58EC-48B9-8259-5871EFDADEB9}'. ``` Existing products will be removed no matter in which check they are found. ...
[ 0.04984649643301964, 0.16493143141269684, 0.5827081203460693, -0.32561302185058594, 0.36822497844696045, -0.16889724135398865, 0.29472658038139343, -0.46645990014076233, -0.16680467128753662, -0.8903589844703674, -0.4751219153404236, 0.6964966058731079, -0.4837414026260376, 0.2871567904949...
I am looking for a hashing algorithm that produces a 31/32 bit signed/unsigned integer as a digest for a utf8 string with the purpose of using the output for seeding a prng, such as a Park-Miller-Carta LCG or a Mersenne-Twister. I have looked into FNV1 and FNV1a, but they provide very close values for similar strings ...
[ -0.06817758083343506, 0.12541833519935608, -0.03468593955039978, 0.1384402960538864, -0.14560380578041077, 0.05656541883945465, -0.02534637600183487, 0.09136976301670074, -0.028480634093284607, -0.4223298728466034, -0.1068195030093193, 0.4543411135673523, -0.48391327261924744, 0.1705218404...
multipliers: ``` a = 524287; for ( i = 0; i < n; i ++ ) a = ( a * string.charCodeAt ( i ) * 16807 + 524287 ) % 2147483647; ``` Please let me know of any better alternatives. If you're generating 32-bit value, consider using classic CRC32. FNV is suposed to be fast alternative to CRC, and you're saying, that performa...
[ -0.2224637120962143, -0.005360523704439402, 0.318677693605423, -0.3027680218219757, 0.031715795397758484, 0.15545020997524261, 0.15035739541053772, -0.4226800203323364, -0.30253103375434875, -0.4344809353351593, -0.18203067779541016, 0.8182982206344604, -0.2839473783969879, 0.0771171599626...
I'm attempting to learn Ruby on Rails. I'm pretty confident with the basics and writing my own models, controllers and views, although I only know the basics. Lately I've found that, when I start a new application, most of my models nicely fit into the REST philosophy, and I end up just writing most of the same scaff...
[ 0.5954173803329468, 0.19556200504302979, -0.025277363136410713, 0.28220000863075256, -0.11941744387149811, 0.13880020380020142, 0.28110450506210327, 0.03271656855940819, -0.19220463931560516, -0.5122919082641602, 0.4463619589805603, 0.7070761919021606, -0.003465318586677313, -0.32111638784...
be that the scaffolding is a "newbie trick" and real developers don't use it, but for most applications it seems to create a fair chunk of usable code (as opposed to bad code). What are your thoughts? Rails' fanatical devotion to choosing smart defaults is exactly why you observe that when you hand write code it ends ...
[ 0.6564735174179077, -0.08783463388681412, -0.12232015281915665, 0.3375623822212219, 0.019387226551771164, -0.18054825067520142, 0.28957799077033997, 0.35481444001197815, -0.2455897033214569, -0.5600804686546326, 0.13076041638851166, 0.47159135341644287, -0.36589160561561584, -0.22846600413...
complex, it's easy to start from a scaffold and move towards what you want. Definitely not just a newbie's tool.
[ 0.4510917365550995, -0.057549409568309784, 0.06065274029970169, 0.46727317571640015, 0.09495802223682404, 0.04737916216254234, 0.13438034057617188, -0.03078230284154415, -0.15959852933883667, -0.546413242816925, 0.18338969349861145, 0.4252612590789795, 0.05079680308699608, 0.22762888669967...
I have two interrupt service routines (ISR) which basically do the exact same thing but each handles an interrupt from a different device (although the same type of device). Therefore, the logic is the same but they access different CPU registers and memory locations. As a simple example consider the following code: ...
[ 0.15604202449321747, -0.007667983416467905, 0.4891795217990875, -0.210621640086174, 0.013215944170951843, -0.041661057621240616, 0.2741341292858124, -0.25270992517471313, 0.01439356803894043, -0.8243292570114136, 0.12411361932754517, 0.5965784788131714, -0.10104980319738388, 0.256510645151...
data = dev1_rx_buffer; } else { /* do something else using registers of device 1 */ } /* More stuff using registers of device 1 */ } void __attribute__((__interrupt__)) _dev2_interrupt(void) { /* Clear interrupt flag */ dev2.IF = 0; if (dev2.IS_FULL) { /* Read data from devic...
[ 0.04841310530900955, -0.1448706090450287, 0.6139411330223083, -0.01179551798850298, 0.22619923949241638, -0.038215700536966324, 0.276758074760437, -0.4440789222717285, -0.30475732684135437, -0.6892586350440979, -0.28199222683906555, 0.5995716452598572, -0.0692509263753891, 0.06544290482997...
{ /* do something else using registers of device 2 */ } /* More stuff using registers of device 2 */ } ``` How can I avoid the code duplication with the restrictions that apply to ISRs (i.e. I cannot pass parameters to the ISRs and function calls should be avoided because of their overhead). I have ...
[ 0.33187490701675415, 0.1535012274980545, 0.2135898768901825, 0.3049555718898773, -0.12235059589147568, -0.18731191754341125, 0.006609080359339714, -0.1819925457239151, -0.09221568703651428, -0.7029579877853394, 0.20020659267902374, 0.6914373636245728, -0.42656639218330383, 0.08995950967073...
helper function which gets pointers to the device and the buffer? I would check the generated assembly to make sure the compiler does what I expect, though. You could also use a macro, but IMHO it is not good to do this for functions this long.
[ -0.1925525814294815, -0.18227778375148773, 0.2520999312400818, -0.04863762855529785, 0.051230452954769135, 0.03466370701789856, 0.046349942684173584, -0.023868948221206665, -0.062087543308734894, -0.595889151096344, 0.1428488940000534, 0.8863893151283264, -0.4357181191444397, -0.0978291481...
I am creating an installation package for a VB6 application using Visual Studio Installer from the Visual Studio Installer Enterprise Tools v6.0. My issue is that Installer is adding a strange item under depdendencies, named simply "3". The "Sourcefile" and "Target" properties for this item are also shown as just "3". ...
[ 0.3149237334728241, 0.09938522428274155, 0.2705305516719818, -0.08755575865507126, -0.2483067810535431, -0.4046633243560791, 0.26149576902389526, -0.2804287075996399, -0.11692272871732712, -0.558496356010437, 0.10585881769657135, 0.6917510032653809, -0.34225866198539734, 0.2307180762290954...
this before, or have some insight as to where that dependency might be coming from? Thanks in advance for any replies. When I went to the [msysgit download page](http://code.google.com/p/msysgit/downloads/list) today, there was a download link for "PortableGit" that was new as of 22MAR09. Using this version might prov...
[ 0.19956134259700775, -0.492225706577301, 0.4944615364074707, 0.26893705129623413, -0.29595357179641724, -0.28285548090934753, -0.07496742904186249, 0.3132278621196747, -0.37100696563720703, -0.7886815667152405, 0.4894227087497711, 0.599124550819397, -0.08870692551136017, 0.1567686349153518...
Is it possible to instruct the aspnet\_compiler to set debug=false in the web.config? My intention is to automate this as part of the nant build process. I am open to suggestions other than xml parsing Have you thought about using `<xmlpoke>`? ``` <xmlpoke file="${Build.WebConfig}" xpath="/configuration/system.w...
[ 0.3069080710411072, 0.11570435762405396, -0.17208676040172577, -0.2126034051179886, -0.31246012449264526, 0.08929312974214554, 0.32442307472229004, -0.18894927203655243, -0.12871260941028595, -0.572479248046875, 0.1483483761548996, 0.47452282905578613, -0.04052283987402916, -0.270134180784...
Okay here's the problem (this is related to a previous post of mine) I need to be able to have an issue/response system for serial comms that works something like this: issue: hello response: world? issues: no, hello nurse reponse: well you're no fun. this would mean I say "hello" the remote unit is expected to send...
[ 0.17949120700359344, -0.03049413301050663, 0.5982343554496765, 0.25919848680496216, -0.17686966061592102, 0.20671018958091736, 0.18638791143894196, 0.22036699950695038, -0.6360907554626465, -0.38658761978149414, 0.4523484706878662, 0.5535483956336975, -0.2694638967514038, 0.521477758884429...
expecting or until the timeout expires. **first, how would the stackoverflow community design this class, second, how would they write the datarecieved event? Third how would they make this code more robust so that multiple instances of the class can exist in parallel threads for simultaneous communications?** This is...
[ 0.26859739422798157, -0.4909816086292267, 0.4170468747615814, -0.048171620815992355, 0.08527158945798874, 0.10099364817142487, -0.225826695561409, -0.1895967572927475, -0.25010621547698975, -0.5922396183013916, 0.09252973645925522, 0.5114076137542725, -0.22110910713672638, 0.16448426246643...
other one would read the data in a thread-safe manner. This only means you would have to use a lock on each enqueue/dequeue operation. FIFO Queue would enable you to simultaneously process the data in the worker thread, while filling it from the communication thread. If you need to receive lots of data, you could dequ...
[ 0.19659240543842316, -0.5748032331466675, 0.4470837414264679, 0.14021851122379303, 0.29083162546157837, 0.10348930209875107, -0.36195793747901917, -0.039924196898937225, -0.3981603980064392, -0.5613942742347717, -0.000280228239716962, 0.6041702032089233, -0.4386638402938843, 0.154583886265...
supposed to get, until you start to parse it. **b) Worker thread waiting for data** I would create a worker thread which would wait for a signal that new data has been received. You could use `ManualResetEvent.WaitOne(timeOut)` to have a timeout in case nothing happens for a while. When the data is received, you woul...
[ 0.2271047979593277, -0.24100640416145325, 0.3915582001209259, 0.23839068412780762, 0.19616851210594177, 0.25014761090278625, 0.16382253170013428, -0.047657858580350876, -0.3513697683811188, -0.7551026344299316, 0.04577915370464325, 0.48998939990997314, -0.19288167357444763, 0.4775480926036...
forgotten something): ``` interface IPort { void Open(); void Close(); event EventHandler<DataEventArgs> DataReceived; void Write(Data data); } ``` This would help you separate the specific communication code from the state machine. **NOTE:** (according to Microsoft) *The DataReceived e...
[ 0.16583140194416046, -0.07352834194898605, 0.4813566505908966, 0.07326389849185944, 0.3097672164440155, -0.04733571410179138, 0.15466797351837158, -0.1442762017250061, -0.3335905075073242, -0.6408283710479736, -0.09049958735704422, 0.5936183333396912, -0.13910827040672302, 0.39003017544746...
that you don't miss a byte (there is a question of SO which already addresses this). **d) Receiving data** To receive the data, you would have to attach a handler for the `IPort.DataReceived` event (or `SerialPort.DataReceived`, if you're not wrapping it), and enqueue the received data to the Queue inside the handler...
[ 0.28669288754463196, -0.22259889543056488, 0.49540334939956665, 0.06692522764205933, 0.1505497843027115, 0.06579554826021194, 0.052763618528842926, 0.01602666638791561, -0.4098183214664459, -0.45473697781562805, -0.24596552550792694, 0.5166293978691101, -0.0703875720500946, 0.2080581188201...
Currently inside my organization we are trying to come up w/ some conventions for a pilot SOA project. At first glance we thought it would be best to force users of the service to use the business service w/out direct access to any data endpoints .. but are there specific scenarios where this is not true or it might be...
[ 0.6728075742721558, 0.17508350312709808, 0.13769535720348358, 0.13427825272083282, 0.17210908234119415, -0.338081955909729, 0.2572222650051117, 0.01950862817466259, -0.11621002852916718, -0.41103318333625793, 0.0822756439447403, 0.3285318911075592, 0.03561902791261673, 0.2514358162879944, ...
data as it's available and would be "in theory .. easier" to just write a new business service rather than ask "what does this other service do that uses my database?" Because even if the service is almost a direct pass through to the database we would have the ability to apply rules that would save developers time an...
[ 0.4360317289829254, -0.2611619532108307, 0.41279304027557373, 0.3057982325553894, 0.3051230311393738, -0.1030585914850235, -0.01983368955552578, 0.040681399405002594, -0.12811218202114105, -0.4195529818534851, 0.2154715359210968, 0.4501934349536896, -0.42806369066238403, -0.083622112870216...
the Form to false and it will change to an (ok) button, which you can handle (as Petros points out). You can likely use an IMessageFilter or subclass the form to hook its WinProc to also get hold of the minimize event as well. See also: * [How to detect Smart Minimize](https://stackoverflow.com/questions/365773/pock...
[ -0.23537097871303558, 0.1925048977136612, 0.7687772512435913, 0.01884613186120987, -0.023164259269833565, -0.02903834916651249, 0.2693074643611908, -0.13520033657550812, 0.0642307847738266, -0.5730701684951782, -0.20776620507240295, 0.22146117687225342, -0.47293564677238464, 0.039378300309...
I have a method that creates a virtual directory. How can I set the .NET Framework to version 2 while I create the virtual directory? My method looks like this so far: ``` private static void CreateVDir(string metabasePath, string vDirName, string physicalPath) { // metabasePath is of the form "IIS://<servername...
[ 0.17803393304347992, 0.004142109304666519, 0.6252158284187317, -0.17762376368045807, -0.01127749215811491, -0.2197486162185669, 0.2975345849990845, -0.3113028109073639, -0.051320742815732956, -0.9811080694198608, 0.063268281519413, 0.5611210465431213, -0.24842862784862518, 0.49384081363677...
{2}:", metabasePath, vDirName, physicalPath); DirectoryEntry site = new DirectoryEntry(metabasePath); string className = site.SchemaClassName; if ((className.EndsWith("Server")) || (className.EndsWith("VirtualDir"))) { DirectoryEntries vdirs = site.Children; Direct...
[ -0.08308985084295273, -0.3638083040714264, 0.9236662983894348, -0.24896758794784546, 0.3679601848125458, 0.18463242053985596, 0.287302166223526, -0.2886218726634979, -0.22195224463939667, -0.9919012188911438, -0.45337575674057007, 0.6002984642982483, -0.1107364073395729, 0.3956218063831329...
// These properties are necessary for an application to be created. newVDir.Properties["AppFriendlyName"][0] = vDirName; newVDir.Properties["AppIsolated"][0] = "1"; newVDir.Properties["AppRoot"][0] = "/LM" + metabasePath.Substring(metabasePath.IndexOf("/", ("IIS://".Length...
[ -0.0363481342792511, -0.10664729028940201, 1.025187611579895, -0.32801419496536255, 0.4065508544445038, 0.12680089473724365, 0.4068109095096588, -0.7392764091491699, -0.14011891186237335, -0.8204010725021362, -0.3632350265979767, 0.5234847068786621, -0.3578612506389618, 0.23951290547847748...
" Failed. A virtual directory can only be created in a site or virtual directory node."); } ``` The "ScriptMaps" property is where the configuration mappings get stored. That is, that's where you can map \*.aspx files to get processed by ASP.NET. An example is in *[Creating ISAPI Mappings Programmatically](http://foru...
[ -0.024340519681572914, -0.2687978446483612, 0.3209288716316223, 0.05467388406395912, 0.6673708558082581, -0.1599603295326233, 0.36332327127456665, -0.08070488274097443, -0.24978744983673096, -0.7910458445549011, -0.17359018325805664, 0.621277391910553, -0.18169106543064117, 0.1791782081127...
When iterating through an array using foreach, are there any guaranties that the order in which the elements are returned is the order array[0], array[1], array[2], ... I know this is how the Array class is implemented now but are there any guaranties for future versions of the framework? The same questions goes for L...
[ -0.366169810295105, 0.006657197140157223, 0.2745532691478729, -0.3066135346889496, -0.17764554917812347, 0.06461495906114578, 0.22506636381149292, -0.5774143934249878, -0.1543911248445511, -0.4838050305843353, -0.20166608691215515, 0.5256034731864929, -0.18483634293079376, -0.2488646060228...
index order, starting with index 0 and > ending with index Length – 1. For > multi-dimensional arrays, elements are > traversed such that the indices of the > rightmost dimension are increased > first, then the next left dimension, > and so on to the left. -- [C# Language Specification Version 3.0](http://downlo...
[ -0.2884718179702759, 0.058631978929042816, 0.583655834197998, 0.08403398096561432, -0.0363130047917366, 0.16581273078918457, -0.21010668575763702, -0.3100724220275879, -0.4403139352798462, -0.707077145576477, -0.502504289150238, 0.26706358790397644, -0.23138903081417084, 0.1060153767466545...
elements will be returned in the order that the backing store stores them.
[ 0.3296472132205963, -0.08136708289384842, 0.23245173692703247, 0.23911358416080475, 0.5505608320236206, 0.15826676785945892, -0.014202829450368881, -0.3471625745296478, -0.025705546140670776, -0.16479067504405975, -0.45896634459495544, 0.09721064567565918, 0.09376952052116394, -0.270963877...