text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
{ // Deserialize, cast and return. var b = new BinaryFormatter(); return (T)b.Deserialize(s); }
[ 0.2899158000946045, -0.3904685974121094, -0.22518862783908844, -0.21674448251724243, 0.19039152562618256, 0.569462776184082, 0.5185632705688477, -0.3953152894973755, -0.10670546442270279, -0.4646877646446228, -0.365904837846756, 0.5436000823974609, -0.3233640193939209, 0.3633309304714203, ...
catch (InvalidCastException) { // T is not what it should have been // (Code changed perhaps?) }
[ 0.21366778016090393, -0.6966781616210938, -0.22265370190143585, -0.05596476420760155, 0.051055412739515305, -0.07834117114543915, 0.1689477413892746, 0.12285659462213516, -0.22401808202266693, -0.10274998098611832, -0.06821379065513611, 0.46905866265296936, -0.4399636387825012, -0.14944592...
catch (SerializationException) { // Something went wrong during Deserialization } } }
[ 0.05922311171889305, -0.49533817172050476, -0.10688315331935883, -0.02860799804329872, 0.3000674843788147, -0.13516025245189667, 0.08506134897470474, 0.033350441604852676, -0.15901196002960205, -0.24309134483337402, -0.008387257345020771, 0.38895565271377563, -0.4013437032699585, 0.1957710...
// Else return fallback return fallback; } } ``` **Note 1:** In the load method you have to look for previously stored `WindowState`, `WindowBounds` and other values. We use SQL Server, and have a `Window` table with columns for `Id`, `Name`, `MachineName` (for `Environment.MachineName`), `UserId`, `Windo...
[ -0.29151782393455505, 0.07740785926580429, 0.3643687069416046, 0.049405548721551895, 0.152221217751503, 0.09271273016929626, 0.04031844437122345, -0.0015228145057335496, 0.03310439735651016, -0.6829596757888794, -0.11829734593629837, 0.6052889227867126, -0.14204593002796173, 0.216218382120...
a `Value` column of type `Binary`. If there is stuff that is not found, I just leave things default and return false. **Note 2:** In the save method you then, of course do the reverse from what you do in the Load method. Creating rows for `Window` and `WindowValues` if they don't exist already for the current user and...
[ -0.09330125153064728, -0.12021345645189285, 0.7030160427093506, -0.10057400912046432, -0.06602820008993149, -0.24940761923789978, 0.4043763279914856, 0.0589015893638134, -0.1590023785829544, -0.7023023366928101, -0.021924780681729317, 0.6963163614273071, -0.23163801431655884, 0.27199929952...
set; } private bool handlerReady; protected PersistentFormBase() { // Prevents designer from crashing if (LicenseManager.UsageMode != LicenseUsageMode.Designtime) { Load += persistentFormLoad; FormClosing += persistentFormFormClosing; } } pr...
[ -0.23063261806964874, -0.37362799048423767, 0.32590410113334656, -0.17559127509593964, 0.1301378458738327, -0.1463416963815689, 0.49832189083099365, -0.28106290102005005, -0.20305025577545166, -0.4012339115142822, -0.3494063913822174, 0.7902571558952332, -0.3671445846557617, 0.389700472354...
EventHandler<EventArgs> StoringValues; protected void StoreValue<T>(string key, T value) { if (!handlerReady) throw new InvalidOperationException(); PersistenceHandler.Set(key, value); } protected T GetValue<T>(string key) { if (!handlerReady) throw ...
[ -0.1555478423833847, -0.4955234229564667, 0.29014134407043457, -0.3025752604007721, 0.2391069084405899, 0.07344656437635422, 0.4809873104095459, -0.24686604738235474, -0.15489700436592102, -0.4589117169380188, -0.38213369250297546, 0.7880182266235352, -0.35291749238967896, 0.23879560828208...
protected T GetValue<T>(string key, T fallback) { if (!handlerReady) throw new InvalidOperationException(); return PersistenceHandler.Get(key, fallback); } private void persistentFormLoad(object sender, EventArgs e) { // Create PersistenceHandler and load values from...
[ 0.08661723881959915, -0.5506462454795837, 0.38729214668273926, -0.18558819591999054, 0.30918240547180176, -0.032862767577171326, 0.689200222492218, -0.21254707872867584, -0.13378100097179413, -0.3237495720386505, -0.46401941776275635, 0.8263905644416809, -0.45551687479019165, 0.32109916210...
handlerReady = true; // Set size and location Bounds = PersistenceHandler.WindowBounds; // Check if we have an MdiParent if(MdiParent == null) { // If we don't, make sure we are on screen if (!Screen.AllScreens.Any(ø => ø.Bounds.IntersectsWith(Bounds)))
[ 0.07184398919343948, -0.4114208221435547, 0.5000510215759277, -0.05744808167219162, 0.30282729864120483, -0.04334873706102371, 0.39214760065078735, -0.3028017580509186, -0.19304028153419495, -0.7776471972465515, 0.20183928310871124, 0.5880875587463379, -0.38482141494750977, -0.107421755790...
Location = new Point(); } else { // If we do, make sure we are visible within the MdiClient area var c = MdiParent.Controls.OfType<MdiClient>().FirstOrDefault(); if(c != null && !c.ClientRectangle.IntersectsWith(Bounds))
[ -0.14339856803417206, -0.23693324625492096, 0.9085947275161743, -0.2635217607021332, 0.5411943793296814, -0.0005247607477940619, 0.22697201371192932, -0.2685306668281555, -0.08769893646240234, -0.7707650065422058, -0.1105402484536171, 0.21180710196495056, -0.24869868159294128, 0.2929833531...
Location = new Point(); } // Set state WindowState = Enum.IsDefined(typeof (FormWindowState), PersistenceHandler.WindowState) ? (FormWindowState) PersistenceHandler.WindowState : FormWindowState.Normal; // Notify that values are loaded and ready for getting. var handler = Value...
[ -0.03441464900970459, -0.2837015390396118, 0.4502885937690735, -0.28070133924484253, 0.48467719554901123, -0.05982667952775955, 0.44831860065460205, -0.18430127203464508, -0.10304449498653412, -0.5895354151725769, -0.24267679452896118, 0.3005006015300751, -0.3712475895881653, 0.25309175252...
handler(this, EventArgs.Empty); } private void persistentFormFormClosing(object sender, FormClosingEventArgs e) { // Set common things PersistenceHandler.WindowState = (int) WindowState; PersistenceHandler.WindowBounds = WindowState == FormWindowState.Normal ? Bounds : RestoreBounds...
[ -0.03801577910780907, -0.3562242090702057, 0.3154183328151703, -0.1894015073776245, 0.38539981842041016, 0.02201155386865139, 0.7499586343765259, -0.26600635051727295, -0.2551555633544922, -0.3894505798816681, -0.1572771668434143, 0.6576340794563293, -0.501513659954071, 0.20126166939735413...
handler(this, EventArgs.Empty); // Save values PersistenceHandler.Save(); } } ``` And thats pretty much it. To use it, a form would just inherit from the PersistentFormBase. That would automatically take care of bounds and state. If anything else should be stored, like a splitter distance, you wo...
[ 0.039153195917606354, -0.5476894378662109, 0.062019068747758865, -0.06050335243344307, 0.12673799693584442, -0.34592193365097046, 0.4737374782562256, -0.10619153827428818, -0.05096284672617912, -0.6577551960945129, 0.1944882720708847, 0.5710790753364563, -0.34223443269729614, -0.0438756048...
provide some feedback if there is anything you think could be done better or something. I would like to learn =) I found a solution to your problem by writing a little functio, that tests, if a poitn is on a connected screen. The main idea came from <http://msdn.microsoft.com/en-us/library/system.windows.forms.screen(...
[ 0.2501315474510193, -0.25032371282577515, 0.6161990165710449, 0.023302733898162842, 0.014174873940646648, -0.016603998839855194, 0.13546039164066315, -0.4305528998374939, 0.07885441184043884, -0.6910861730575562, 0.2932100296020508, 0.3482247292995453, -0.2677183747291565, -0.1120608747005...
if(Screen.AllScreens[i].Bounds.Contains(thePoint)) FoundAScreenThatContainsThePoint = true; } return FoundAScreenThatContainsThePoint; } ```
[ 0.01163876336067915, 0.0017260708846151829, 0.43858271837234497, -0.2940005958080292, 0.3225042223930359, 0.021451368927955627, 0.39310768246650696, -0.236974835395813, 0.14998719096183777, -0.6504794359207153, -0.1204490065574646, 0.5444288849830627, -0.1008443683385849, 0.209199294447898...
I'm using the m2Eclipse plugin (<http://m2eclipse.sonatype.org/>) to handle maven modules in eclipse. After enabling a project for dependency management and for nested modules, I can no longer do a 'File Search' over the project. The search finishes instantly with the search window display "0 matches in empty scope". ...
[ 0.30704745650291443, 0.026111245155334473, 0.2985377907752991, -0.29426687955856323, -0.21560247242450714, -0.1334366798400879, 0.2552291750907898, -0.1544358879327774, -0.16344590485095978, -0.6937141418457031, -0.020446382462978363, 0.5223192572593689, -0.18849380314350128, 0.19417610764...
I'm new to python, so please excuse what is probably a pretty dumb question. Basically, I have a single global variable, called \_debug, which is used to determine whether or not the script should output debugging information. My problem is, I can't set it in a different python script than the one that uses it. I ha...
[ 0.22846587002277374, 0.4728027880191803, -0.15292952954769135, -0.3621273934841156, -0.21801848709583282, -0.19949273765087128, 0.5760090947151184, 0.09421010315418243, -0.16090117394924164, -0.5162632465362549, 0.13303355872631073, 0.48694512248039246, -0.5309012532234192, 0.2096429616212...
call `my_function()`, it still won't have your `debug` variable in its namespace, unless you import it from `two.py`. Of course, doing that means you'll end up with cyclic dependencies (`one.py -> two.py -> one.py`), and you'll get `NameError`s unless you refactor where various things are imported and declared. One s...
[ 0.1404036581516266, 0.05854920297861099, 0.43765202164649963, -0.15174268186092377, 0.05776514858007431, -0.09656593948602676, 0.12329553067684174, -0.1897987425327301, -0.44515785574913025, -0.2085326910018921, -0.12786045670509338, 0.728302001953125, -0.4264147877693176, 0.20662024617195...
flexible and extensible.
[ -0.19573178887367249, 0.129131481051445, 0.2558327615261078, 0.05599527433514595, 0.02603152021765709, -0.11000530421733856, -0.02256081998348236, 0.00490342453122139, 0.04178937152028084, -0.7253878712654114, -0.33831876516342163, 0.26170337200164795, 0.10256015509366989, 0.01317032799124...
How would you design a RESTful query to support OR operand between parameters. Let's say my resource has two fields field1 & field2. How would you design the URL to enable the following query: "Get myresources where field1=x OR field2=y" Designing queries in REST is pretty straight forward, but I have only seen quer...
[ -0.05646779388189316, -0.208763986825943, 0.1964980661869049, 0.25241413712501526, -0.017515258863568306, 0.08930517733097076, -0.12304244190454483, -0.08744301646947861, 0.012932173907756805, -0.509410560131073, 0.11040206253528595, 0.4562758207321167, -0.1847093254327774, 0.1042001545429...
params aren't by definition AND related, they're just inert params - how you handle them is up to you. For an OR search I'd suggest: ``` GET /myresources?field1=x&field2=y&inclusive=true ``` *If* you want to default to an AND relationship (reasonable), and any other extension you want is of course possible.
[ 0.040646858513355255, 0.07495147734880447, 0.35203275084495544, 0.16483137011528015, -0.17233975231647491, 0.09229787439107895, 0.22357435524463654, -0.08626872301101685, -0.2994302809238434, -0.2601076364517212, -0.5323006510734558, 0.49210041761398315, -0.24233102798461914, -0.0972219109...
I'm looking to create a generic confirmation box that can be used by multiple widgets easily, but I'm running into problems with scope and was hoping for a clearer way of doing what I'm trying to do. Currently I have the following - ``` (function() { var global = this; global.confirmationBox = function() { ...
[ 0.4539829194545746, -0.022350521758198738, 0.3974761962890625, 0.02738037519156933, -0.04687124863266945, -0.19022877514362335, 0.02807963266968727, 0.14046913385391235, 0.03634471073746681, -0.5756874680519104, 0.14573313295841217, 0.4854160249233246, -0.4146125316619873, 0.37536209821701...
render: function(caller) { var jqContainer = $(config.container); jqContainer.append(config.message); jqContainer.dialog({ buttons: { 'Confirm': caller.confirm_action,
[ -0.026805397123098373, -0.3150147795677185, 0.9875031113624573, -0.31571707129478455, 0.3269290626049042, 0.5307679176330566, 0.2811700105667114, -0.1397988647222519, 0.20942701399326324, -0.4607018530368805, -0.10174917429685593, 0.7181681990623474, -0.34183692932128906, -0.07535398751497...
Cancel: caller.cancel_action } }); } } } //end confirmationBox global.testWidget = function() { return { create_message: function(msg) { var msg = confirmationBox(); msg.message = msg;
[ 0.16822439432144165, -0.3924437165260315, 0.3827403783798218, -0.1811051219701767, 0.15503622591495514, 0.03765203431248665, 0.4628722369670868, 0.10616885125637054, 0.10924889892339706, -0.3368898928165436, -0.23693180084228516, 0.3071744441986084, -0.666795551776886, 0.22024565935134888,...
msg.render(this); }, confirm_action: function() { //Do approved actions here and close the confirmation box //Currently not sure how to get the confirmation box at //this point }, cancel_action: function() {
[ 0.27783870697021484, -0.2565601170063019, 0.7220155596733093, -0.02641335129737854, 0.4820519685745239, -0.11371433734893799, 0.20226164162158966, 0.019875001162290573, 0.08569926768541336, -0.4487972855567932, -0.4051286280155182, 0.4325214624404907, -0.20614184439182281, -0.0369257144629...
//Close the confirmation box and register that action was //cancelled with the widget. Like above, not sure how to get //the confirmation box back to close it } } }//end testWidget })(); //Create the widget and pop up a test message var widget = testWidget(); widget.create_message(...
[ 0.6407173275947571, 0.004083634819835424, 0.4351860582828522, -0.010292409919202328, 0.16981983184814453, -0.44228601455688477, 0.5968060493469238, -0.15074984729290009, -0.08068527281284332, -0.24450838565826416, -0.16118508577346802, 0.3971826732158661, -0.41297078132629395, 0.1891114115...
as close the box from the within the widget, but I think I've wrapped my own brain in circles in terms of what knows what. Anyone want to help clear my befuddled brain? Cheers, Sam **The resulting code:** I thought it might be useful for people who find this thread in later days looking for a solution to a similar ...
[ 0.43460527062416077, 0.266060471534729, 0.46210455894470215, 0.34379228949546814, -0.06844033300876617, -0.15986259281635284, 0.25597822666168213, -0.041288722306489944, -0.12549273669719696, -0.4777083396911621, -0.11938527971506119, 0.33963462710380554, -0.006949760485440493, 0.072701811...
user such as * wanting to delete an item */ global.confirmationBox = function() { self = this; config = { container: '<div>', message: '', } return { set_config:config, render_message: function(caller) { var jqContainer = $(config.container); j...
[ -0.11906423419713974, -0.3850231170654297, 0.37126317620277405, -0.05883942171931267, 0.0239449180662632, 0.09669159352779388, 0.27829229831695557, -0.07406297326087952, -0.038597434759140015, -0.6341534852981567, -0.07234365493059158, 0.587316632270813, -0.5583419799804688, 0.367143362760...
jqContainer.append(config.message); jqContainer.dialog({ buttons: { 'Confirm': function() { caller.confirm_action(this);
[ 0.10735397785902023, -0.36044180393218994, 0.7725218534469604, -0.3141859471797943, 0.3817597031593323, 0.07367834448814392, 0.3411391079425812, -0.13707876205444336, 0.24697618186473846, -0.1618393212556839, -0.18607279658317566, 0.6260622143745422, -0.6981173157691956, -0.124679960310459...
}, Cancel: function() { caller.cancel_action(this); } } });
[ -0.1278834044933319, -0.6311721205711365, 0.3075321614742279, -0.45989954471588135, 0.43531158566474915, -0.04159558191895485, 0.1568204015493393, -0.12376562505960464, 0.05002177506685257, -0.039891861379146576, -0.5231354832649231, 0.9142369031906128, -0.713040828704834, 0.09311535954475...
} } } // end confirmationBox global.testWidget = function() { return { create_message: function(msg) { var msg = confirmationBox(); msg.message = msg; msg.render(this); }, confirm_action: function(box) { alert('Success');
[ 0.21991075575351715, -0.32642436027526855, 0.3934757709503174, -0.269683837890625, 0.23151086270809174, 0.02128259465098381, 0.45141854882240295, 0.07530693709850311, 0.23520974814891815, -0.42515575885772705, -0.30459094047546387, 0.3941674530506134, -0.31980466842651367, 0.17766605317592...
$(box).dialog('close'); }, cancel_action: function(box) { alert('Cancelled'); $(box).dialog('close'); } } }//end testWidget ``` You could pass jqContainer to the confirm/cancel functions. Alternately, assign jqContainer as a property of caller. Since the confirm/c...
[ 0.25625666975975037, -0.2623243033885956, 0.5043231248855591, -0.15590235590934753, 0.29846999049186707, -0.2179127186536789, 0.1895710825920105, -0.24293562769889832, 0.16789595782756805, -0.11469162255525589, -0.3728068470954895, 0.6173767447471619, -0.5329932570457458, 0.124976389110088...
But that limits you to tracking one dialog per widget.
[ 0.3898382782936096, 0.10705701261758804, 0.3243086040019989, 0.31512030959129333, 0.08168470859527588, -0.20600050687789917, 0.1594846099615097, -0.20915111899375916, -0.10074932128190994, -0.27852872014045715, 0.10343978554010391, 0.5180068016052246, -0.09932097047567368, -0.2301706820726...
Should I use this. ``` Imports System.IO Dim myStream As New Stream ``` or this.. ``` Dim myStream As New System.IO.Stream ``` Does it make any difference to performance / memory usage? No difference whatsoever - it's just a matter of taste and affects readability only. By the way, CLR is not even aware of the...
[ 0.26434898376464844, 0.25022533535957336, 0.6127215027809143, 0.0004773989785462618, -0.046885356307029724, -0.150695338845253, -0.03593406826257706, 0.22849686443805695, -0.010893169790506363, -0.540898323059082, 0.12465658783912659, 0.5133415460586548, -0.06793065369129181, 0.30729502439...
Anyone know of some good tutorials on how to create a custom ID generator for hibernate? A cursory search of Google for 'hibernate custom id generator tutorial' turned up the following possibilities. I've excluded those that don't look useful and summarized the content of each. * <http://www.devx.com/Java/Article/3039...
[ 0.5385369658470154, -0.019272109493613243, 0.30050230026245117, 0.15491950511932373, -0.2347417175769806, -0.10496271401643753, 0.25424546003341675, -0.47143056988716125, 0.011922200210392475, -0.4868270754814148, 0.18620282411575317, 0.5957209467887878, -0.05201097950339317, -0.2210574597...
schema (including auto-generated values). Hope that helps.
[ 0.2673848271369934, 0.1769171953201294, 0.04072089493274689, 0.4771685004234314, 0.05813487246632576, -0.10328154265880585, 0.25844067335128784, -0.20002686977386475, 0.05934247747063637, -0.7698242664337158, -0.26701444387435913, 0.4655160903930664, -0.22318336367607117, -0.46887311339378...
How do I get past this variable initialization problem? If I only could figure out how to only initialize them only once... ``` * Main.cpp : main project file. /************************** Begin Header **************************/ #include "stdafx.h" //Required by Visual C ++ #include <string> //Required to use s...
[ -0.1550922691822052, 0.034360338002443314, 0.731785774230957, 0.08641116321086884, 0.0008252388215623796, 0.11705457419157028, 0.3045160174369812, -0.3929033875465393, -0.2237047255039215, -0.8466346263885498, -0.10549552738666534, 0.46000006794929504, -0.23599672317504883, -0.316449999809...
to organize class member calls when setting and getting new data. int getData(); // Will get user data, input in character string, convert to an integer and then perform data validation. void createReport(int place, int number, string type); // Will organize commands to create the report and display it on the screen. /...
[ 0.09030485153198242, -0.04103628918528557, 0.36469632387161255, -0.09778746962547302, -0.10664456337690353, 0.26003196835517883, 0.04479240998625755, -0.7318601012229919, -0.3704552948474884, -0.3625548183917999, -0.05895686522126198, 0.5770975351333618, -0.19316376745700836, 0.30941095948...
of MaxArray /* End Initialization & Creation of important resources */ public: // Makes underlining elements Public instead of the default Private JarsSold() // Begin Constructor { // Put something in num array JARS_SOLD[0] = 0; // [1] JARS_SOLD[1] = 0; // [2] JARS_SOLD[2] = 0; // [3] ...
[ 0.10779116302728653, 0.10123670101165771, 0.17659494280815125, -0.0877731516957283, 0.08982174843549728, 0.3198481500148773, 0.2676960229873657, -0.5901007056236267, -0.12008748948574066, -0.30794811248779297, 0.18733981251716614, 0.4658367335796356, -0.12783338129520416, 0.249443560838699...
~JarsSold(){}; // Destructor /* Put all members for JarsSold class below here */ void setNumber(int num, int value) // Set the number of jars sold with number placement in array and value to replace it with { JARS_SOLD[num] = value; // Stores value into JARS_SOLD at whatever num is at the time }; ...
[ 0.11210140585899353, 0.06260675191879272, 0.5404294729232788, -0.23677025735378265, 0.08039841800928116, 0.25584495067596436, 0.025499146431684494, -0.4946882128715515, -0.212776780128479, -0.3103008270263672, -0.266701877117157, 0.5327456593513489, 0.04920971021056175, 0.5996519327163696,...
return JARS_SOLD[num]; // Returns whatever is in JARS_SOLD depending on what num is at the time } // End getNumber class member /* Put all members for JarsSold class above here */ }; // End Class -- JarsSold class SalsaTypes // Begin Class -- SalsaTypes { /* Begin Initialization & Creation of important resou...
[ -0.03239872679114342, 0.050131656229496, 0.23000721633434296, -0.11478376388549805, 0.08484430611133575, 0.25612080097198486, 0.10895176231861115, -0.6339559555053711, -0.26162320375442505, -0.14488528668880463, 0.03247406333684921, 0.39755335450172424, 0.01281179953366518, 0.3447723090648...
Creation of important resources */ public: // Makes underlining elements public instead of the default Private SalsaTypes() // Begin Constructor { // Add default strings to str array SALSA_TYPES[0] = "Mild"; // [1] Stores Mild into SALSA_TYPES at 0 spot SALSA_TYPES[1] = "Medium"; // [2] Stores Me...
[ -0.12494777143001556, -0.18176612257957458, 0.1972149759531021, 0.15034064650535583, 0.47274482250213623, 0.1771359145641327, 0.012779884040355682, -0.3257480263710022, -0.13377900421619415, -0.6280933022499084, -0.2116740643978119, 0.4733164608478546, -0.2698934078216553, -0.1349819898605...
Stores Hot into SALSA_TYPES at 3 spot SALSA_TYPES[4] = "Zesty"; // [5] Stores Zesty into SALSA_TYPES at 4 spot } // End Constructor ~SalsaTypes(){}; // Destructor /* Put all members for SalsaTypes class below here */ void setType(int num, string type) // Set salsa type with number placement in array...
[ 0.1479121893644333, -0.2464437037706375, 0.5239156484603882, 0.19751551747322083, 0.2559932768344879, 0.10547833889722824, -0.009004402905702591, -0.23171426355838776, -0.09561969339847565, -0.30584046244621277, -0.22661903500556946, 0.3698798716068268, -0.18007628619670868, -0.07600960880...
}; // End setType class member string getType(int num) // Get the Salsa Type with number placement in array { return SALSA_TYPES[num]; // Returns SALSA_TYPES depending on what is in num at the time }; // End getType class member /* Put all members for SalsaTypes class above here */ };// End Class ...
[ 0.17703914642333984, -0.26016756892204285, 0.2738165557384491, -0.1974092274904251, -0.040888212621212006, 0.15529002249240875, 0.007435943465679884, -0.35443273186683655, -0.13226932287216187, -0.2640593349933624, 0.09562043845653534, 0.41087961196899414, -0.40608784556388855, 0.112985089...
// Main Program Contents Begin Here // // Opening Credits for Program cout << "Welcome to the /Professional Edition\\ of the Chip and Salsa Sale Tool EXPRESS." << endl; cout << "This handy-dandy tool will make a chip and salsa manufacturer's job much easier!" << endl; cout << endl << endl << endl; ...
[ 0.24678876996040344, 0.4147477149963379, 0.4071236550807953, 0.011375943198800087, -0.09492350369691849, -0.07913249731063843, -0.4314633309841156, -0.141622394323349, -0.004776825662702322, -0.1142137199640274, 0.02379891276359558, 0.6030120849609375, 0.32742565870285034, 0.06678231805562...
"-Medium" << endl<< "-Sweet" << endl << "-Hot" << endl << "-Zesty" << endl << endl << endl; system("pause"); // Pause here. After this begin data input cout << endl << endl << endl; inputData(); // Will deal with data input, validation, and reports // Main Program Contents End Here // } //End Main P...
[ -0.2999590337276459, -0.018960298970341682, 0.9185582995414734, -0.2564420998096466, -0.07718043029308319, 0.3548937737941742, 0.034470852464437485, -0.3356451392173767, 0.04733002185821533, -0.38801732659339905, -0.437029093503952, 0.3953087627887726, -0.2060391753911972, 0.33807232975959...
// End Create Class Objects // // Variable Creation Begin // // Variable Creation End // // All Content for Functions Begin Here // for (int i = 0 ; i < 5 ; i++) // Start For Loop { cout << "Input how many Jars were sold for \"" << salsa.getType(i) << "\"" << ": "; // Displays which Salsa w...
[ 0.2688445746898651, -0.13247495889663696, 0.3457316756248474, -0.203521266579628, 0.1364789605140686, 0.27320563793182373, -0.009849436581134796, -0.4340442717075348, -0.035492897033691406, -0.3779643774032593, 0.09092205762863159, 0.3837512731552124, -0.2911582291126251, 0.282831996679306...
determine what value to send to the JarsSold class. createReport(i,jars.getNumber(i),salsa.getType(i)); // Send these numbers to another function so it can make a report later cout << endl << endl; // Using this as a spacer } // All Content for Functions End Here // }; // End inputData Functi...
[ -0.06361483037471771, -0.2048548310995102, 0.38363975286483765, -0.21087926626205444, 0.09270584583282471, 0.2312978059053421, -0.04552607238292694, -0.5383070111274719, 0.11350108683109283, -0.44229593873023987, -0.1528824269771576, 0.3509458005428314, -0.2160411775112152, 0.2174871414899...
// Will be used for Data Validation methods // Variable Creation End // // Main Contents of Function Begin Here // retry: // Locator for goto command cin >> charData; // Ask user for input. Will store in character string then convert to an integer for data validation using 'Atoi' numTest = atoi ( cha...
[ -0.18552345037460327, -0.06386066228151321, 0.32341742515563965, -0.10694847255945206, -0.12188374996185303, 0.4893569052219391, 0.3949947655200958, -0.3613944351673126, -0.010144414380192757, -0.33212608098983765, -0.16531477868556976, 0.5689995288848877, -0.315620481967926, -0.2028794437...
<< endl << endl << "Re-enter number: "; goto retry;} // Filter out negative numbers // Main Contents of Function End Here // return numTest; // If it makes it this far, it passed all the tests. Send this value back. }; // End getData Function void createReport(int place, int number, string type) // Begin cre...
[ 0.1941625326871872, -0.18971015512943268, 0.4429570436477661, -0.28027287125587463, 0.19007843732833862, 0.1862882375717163, 0.21213503181934357, -0.4109072983264923, -0.12184040248394012, -0.34600576758384705, -0.09300616383552551, 0.36532121896743774, -0.1223672479391098, 0.2411900013685...
lowest jar sales in the array int highest; // The integer it will use to store the place of the highest jar sales in the array int total; // The integer it will use to store total sales int numArray[MAX]; // Create array to store jar sales (integers) string typeArray[MAX]; // Create array to store typ...
[ 0.0026911550667136908, 0.046897538006305695, 0.3441266417503357, -0.12329410761594772, -0.09029483795166016, 0.37898358702659607, 0.016748663038015366, -0.36576467752456665, -0.12846477329730988, -0.1344994455575943, 0.1952388733625412, 0.4864870011806488, -0.07044440507888794, 0.473474711...
number into new array typeArray[place] = type; // Store type into new array if (place = 4) // If the array is full it means we are done getting data and it is time to make the report. { // Begin making report, If statement start for ( int i = 0 ; i < 5 ; i++ ) // Using a for-loop to find the hi...
[ 0.11085742712020874, -0.14522328972816467, 0.508371889591217, -0.38028523325920105, -0.018902095034718513, 0.14040599763393402, 0.2499697357416153, -0.6181191205978394, -0.01711433194577694, -0.37068799138069153, -0.046665094792842865, 0.4023381769657135, -0.20001216232776642, 0.0289221685...
// For Loop to find high and low values BEGIN if ( lowest < numArray[i]) // Keep setting lowest to the lowest value until it finds the lowest one { // Start If lowest = numArray[i]; // Lowest equals whatever is in numArray at i spot } // End If
[ -0.29224371910095215, -0.41550230979919434, -0.03169676288962364, -0.34502801299095154, 0.16586251556873322, -0.10382391512393951, 0.2569064795970917, -0.1787342131137848, -0.0732327476143837, -0.3704661726951599, -0.12765905261039734, 0.3266511559486389, -0.3611612319946289, -0.0144759202...
if ( highest > numArray[i]) // Keep setting highest to the highest value until it finds the highest one { // Start If highest = numArray[i]; // Highest equals whatever is in numArray at i spot } // End If total += numArray[i]; // Will continually add numArray at i spot
[ -0.2088497132062912, -0.33616501092910767, 0.20032744109630585, -0.06360882520675659, -0.21122393012046814, -0.3265310823917389, 0.2371581494808197, -0.24918437004089355, -0.35094913840293884, -0.20810063183307648, -0.11823516339063644, 0.4820510447025299, -0.08567088842391968, 0.018839720...
until it has the total sales } // For Loop to find high and low values END // Main Contents of Function End Here // } // END creatReport Function // All Content for Functions Ends Here // ``` Well my problem is...I need to get my data across from one function to another. I thought I could figure out how...
[ 0.22728843986988068, 0.19420646131038666, 0.43377867341041565, 0.05413256585597992, -0.09144781529903412, 0.01697537675499916, 0.15683512389659882, 0.12088619917631149, -0.13937844336032867, -0.3910963535308838, -0.03510859236121178, 0.6458491086959839, -0.26662495732307434, 0.448686629533...
doing that until i've completely copied all number arrays and string arrays. Well...yeah that does work EXCEPT this part in createReport(): ``` // Variable Creation Begin // int const MAX = 5; // Create array size variable int lowest; // The integer it will use to store the place of the lowest jar sales in t...
[ 0.2785826325416565, 0.23091529309749603, 0.6695175766944885, -0.04169599711894989, -0.060647644102573395, -0.05218092352151871, 0.13423596322536469, -0.2531769573688507, -0.4547419250011444, -0.4577319025993347, 0.12548089027404785, 0.8030180931091309, -0.003694369690492749, 0.243026167154...
int numArray[MAX]; // Create array to store jar sales (integers) string typeArray[MAX]; // Create array to store types of salsa (strings) // Variable Creation End // ``` What happens is, I guess I am so tired that I missed it, every time I call that function it re-initializes those same variables again. I will...
[ 0.18496938049793243, -0.010491976514458656, 0.30704063177108765, -0.09350794553756714, -0.1940523236989975, -0.018356366083025932, 0.2876526713371277, -0.33422285318374634, -0.23687754571437836, -0.3227638006210327, 0.4493952691555023, 0.6177459359169006, -0.10702097415924072, 0.2969043552...
the variables werent initialized outside the scope of the if statement. I then tried a GOTO statement that would skip the initialization after it happened once. Nope something went wrong with the first initialization phase and no compilation. I need to figure out how I can either 1. keep those variables from getting...
[ 0.03429948166012764, -0.10248511284589767, 0.10611401498317719, 0.2578071057796478, -0.2479354590177536, 0.08870848268270493, 0.4862852990627289, 0.05245635285973549, 0.07970535010099411, -0.6149396300315857, 0.27366548776626587, 0.6063328385353088, -0.19307757914066315, 0.0288172718137502...
on this piece for hours and hours and hours and I stayed up all night just constantly trial and error. I really proud of myself because this code is pretty advanced for me. I've looked at every tutorial on Google and I'm fresh out of luck -- you guys are my last hope!! Sorry again guys. I know this is a dumb question.....
[ 0.18325741589069366, 0.14920084178447723, 0.07841029018163681, 0.3452742397785187, -0.18297190964221954, 0.14893688261508942, 0.4167678654193878, 0.38847556710243225, -0.3125237822532654, -0.8261362314224243, 0.17004874348640442, 0.3214198648929596, 0.011467480100691319, 0.2584344744682312...
object every time with every function I use. And that means I lose all data stored inside my class? I've read that having global object isn't a good idea though. I would love to not have to use them but I have no clue on any alternatives that I can actually understand. Any other critiques or tips is GREATLY appreciat...
[ -0.20379666984081268, 0.021967561915516853, 0.5670305490493774, 0.054624043405056, -0.1470184326171875, 0.013376325368881226, 0.34323692321777344, 0.23119224607944489, -0.3305247128009796, -0.6863746643066406, -0.0007543620304204524, 0.7247699499130249, -0.30296790599823, 0.235380738973617...
// The integer it will use to store the place of the lowest jar sales in the array static int highest; // The integer it will use to store the place of the highest jar sales in the array static int total; // The integer it will use to store total sales static int numArray[MAX]; // Create array to store jar sales (inte...
[ 0.2194540798664093, 0.13012507557868958, 0.38294467329978943, 0.0026375858578830957, -0.22612151503562927, 0.2336772084236145, 0.1430089920759201, -0.15802399814128876, -0.2704671323299408, -0.09434786438941956, 0.3329129219055176, 0.6280707716941833, -0.23452197015285492, 0.31183502078056...
wrote there with MyClassObject would work fine. You'd use it like this: ``` MyClass { public: MyClass(){}; ~MyClass(){}; int variable; }; MyClass MyClassObject; // in a method you'd do this void whateverMethod() { MyClassObject.variable = 5; std::cout << MyClassObject.variable << std::endl; } ``` That ...
[ 0.023374386131763458, -0.07477576285600662, 0.19463935494422913, -0.06539006531238556, 0.07151270657777786, -0.22313596308231354, 0.33967718482017517, 0.09121815115213394, 0.0935148149728775, -0.7187278270721436, 0.2795819938182831, 0.48157602548599243, -0.2816103398799896, 0.0342077687382...
If one has a project that has tests that are executed as part of the build procedure on a build machine, if a set tests fail, should the entire build fail? What are the things one should consider when answering that question? Does it matter which tests are failing? --- Background information that prompted this que...
[ 0.41338878870010376, -0.06513387709856033, -0.012745370157063007, 0.1729147583246231, 0.2095015048980713, -0.16032572090625763, 0.25058498978614807, -0.036936525255441666, -0.296421617269516, -0.3471421003341675, 0.14032870531082153, 0.635998010635376, 0.31287282705307007, 0.13047377765178...
being if the tests fail, that means the product is not working/not complete/it is a failure of a project, and hence the build should fail. We have added some tests that although they fail, they are not crucial to the project (see below for more details). So if those tests fail, the project is not a complete failure, a...
[ 0.42706426978111267, 0.4207202196121216, -0.1327723115682602, 0.019476238638162613, 0.1841784119606018, 0.07534316927194595, 0.6129080653190613, -0.19077527523040771, 0.09980044513940811, -0.3340476453304291, -0.34921061992645264, 0.6442744731903076, -0.04438358172774315, 0.152892276644706...
So the class rejects all invalid cases, but also some valid ones. This is not a problem for the project, since the rejected valid arguments are fringe cases, on which the application will not rely. If it's in any way doable, then do it. It greatly reduces the [broken-window-problem](http://www.pragprog.com/the-pragmati...
[ 0.0497908741235733, -0.03233340382575989, -0.35379528999328613, 0.27200502157211304, 0.015916775912046432, -0.24630871415138245, 0.41717076301574707, 0.03642834722995758, -0.37774932384490967, -0.44227516651153564, -0.5739966034889221, 0.43542200326919556, -0.18283113837242126, 0.229614481...
the other side, there are known-failing tests, then adding just another broken test is seen as keeping the status-quo. Therefore you should always strive to keep *all* tests running (and not just "most of them"). And treating every single failing test as reason for failing the build goes a long way towards that goal.
[ 0.6586905121803284, 0.3691512644290924, -0.13903018832206726, 0.2115057110786438, -0.16850781440734863, -0.1623779833316803, 0.9456843137741089, 0.12826679646968842, -0.23891687393188477, -0.23991289734840393, 0.024314722046256065, 0.5251148343086243, 0.1773882955312729, -0.085793808102607...
I've looked at the [Python Time module](http://docs.python.org/library/time.html) and can't find anything that gives the integer of how many seconds since 1970 as PHP does with time(). Am I simply missing something here or is there a common way to do this that's simply not listed there? ``` import time print int(time....
[ 0.22026535868644714, 0.16160695254802704, 0.010312240570783615, -0.08669315278530121, 0.18408046662807465, 0.24455514550209045, 0.03534986451268196, -0.02145843207836151, -0.5276185870170593, -0.3861407935619354, 0.3118821084499359, 0.3464886248111725, -0.16277672350406647, 0.2137574404478...
What's the difference between CPPFLAGS and CXXFLAGS in GNU Make? `CPPFLAGS` is supposed to be for flags for the **C** **P**re**P**rocessor; `CXXFLAGS` is for flags for the C++ compiler. The default rules in make (on my machine, at any rate) pass `CPPFLAGS` to just about everything, `CFLAGS` is only passed when compili...
[ 0.5069469213485718, -0.012174706906080246, 0.5344336628913879, -0.008525705896317959, -0.2469138503074646, -0.3315121829509735, -0.01673325151205063, -0.27760952711105347, -0.5453550219535828, -0.053138405084609985, -0.17663709819316864, 0.2072294056415558, -0.6200117468833923, 0.000967300...
I have two paths: ``` fred\frog ``` and ``` ..\frag ``` I can join them together in PowerShell like this: ``` join-path 'fred\frog' '..\frag' ``` That gives me this: ``` fred\frog\..\frag ``` But I don't want that. I want a normalized path without the double dots, like this: ``` fred\frag ``` How can I ...
[ 0.1752493679523468, -0.0974920243024826, 0.4115454852581024, 0.10239972174167633, 0.2080952227115631, -0.2500537931919098, 0.1579320728778839, -0.14670896530151367, -0.04912392795085907, -0.8535830974578857, -0.014924943447113037, 0.5583998560905457, -0.40966299176216125, 0.089080780744552...
you first qualify your path: ``` Join-Path (Join-Path $pwd fred\frog) '..\frag' ``` This yields (given my current location): ``` C:\WINDOWS\system32\fred\frog\..\frag ``` With an absolute base, it is now safe to call the .NET API `GetFullPath`: ``` [System.IO.Path]::GetFullPath((Join-Path (Join-Path $pwd fred\fr...
[ -0.006489312741905451, -0.11801895499229431, 0.5344838500022888, 0.1037830263376236, 0.30304020643234253, -0.3389347791671753, 0.344868004322052, -0.1608077883720398, 0.1451779454946518, -0.6888396143913269, -0.1403224915266037, 0.8608570694923401, -0.059753455221652985, -0.172643616795539...
case.
[ -0.21959392726421356, 0.11487308889627457, -0.005363093689084053, 0.003022602526471019, 0.49902328848838806, 0.020197439938783646, -0.16709323227405548, -0.33197394013404846, -0.18016280233860016, -0.582048773765564, -0.10313058644533157, 0.4221295416355133, -0.10714444518089294, 0.1947209...
Is it possible to use a jQuery ajax call to perform Forms Authentication with ASP.NET MVC? I've been unable to find any such examples. More specifically, how do I set the auth cookie on the page (without a redirect) so I can make successive authenticated ajax requests? Yes, it's possible. Just submit the login-form u...
[ 0.08078666776418686, 0.1893567144870758, 0.34710952639579773, -0.06788685917854309, -0.1945941001176834, -0.19393593072891235, 0.46195295453071594, -0.38037019968032837, 0.05227379873394966, -0.600063681602478, -0.17079584300518036, 0.6012232303619385, -0.19848448038101196, -0.308773636817...
block from my LogOn view: ``` <script type="text/javascript"> $(document).ready(function() { var form = $($("form")[0]); form.submit(function() { var data = form.serialize(); $.post(form.attr("action"), data, function(result, status) {
[ 0.5125211477279663, -0.1882634311914444, 0.6443653106689453, -0.2254483848810196, 0.066405288875103, 0.05244122073054314, 0.24466483294963837, -0.39492711424827576, 0.07090011984109879, -0.40255007147789, -0.27105966210365295, 0.21612250804901123, -0.44467562437057495, 0.11964359134435654,...
if (result.Success && result.ReturnUrl) { location.href = result.ReturnUrl; } else { alert(result.Message);
[ 0.08034666627645493, -0.4085332751274109, 0.5731646418571472, -0.3328326642513275, 0.60414719581604, -0.03226960822939873, 0.4099227786064148, -0.11956754326820374, -0.12240802496671677, -0.2191464751958847, -0.6861942410469055, 0.4458446204662323, -0.2730053663253784, 0.018266085535287857...
} }, "json"); return false; }); }); </script> ``` This will ajax wrap the logon form. Note that this is the simplest implementation of the javascript code possible but it's a place to start. Then I have modified my LogOn action in the AccountController and in the r...
[ 0.12309731543064117, -0.0671716257929802, 0.5480322241783142, -0.35508009791374207, 0.03907807916402817, -0.49351930618286133, 0.37337517738342285, -0.26612335443496704, 0.007145892363041639, -0.8920623660087585, -0.18389195203781128, 0.7387950420379639, -0.30585041642189026, -0.2515636384...
Json(new LoginResultDTO{Success=true,Message="Successfully logged in"}); }else { return View(); } ``` So this is an ultralight but rather complete version of how jquery authentication could be done in asp.net mvc.
[ -0.019615119323134422, -0.3748791217803955, 0.5447974801063538, -0.10288604348897934, -0.02654288150370121, -0.4750741124153137, 0.49742868542671204, -0.32012739777565, -0.2439582198858261, -0.28912264108657837, -0.355149507522583, 0.4956371784210205, -0.06867080181837082, -0.2234975248575...
Expanding upon my [earlier problem](https://stackoverflow.com/questions/489173/writing-xml-with-c), I've decided to (de)serialize my config file class which worked great. I now want to store an associative array of drive letters to map (key is the drive letter, value is the network path) and have tried using `Diction...
[ -0.026609119027853012, 0.08113457262516022, 0.40975019335746765, -0.045263588428497314, -0.0018556100549176335, -0.08246128261089325, 0.28551793098449707, -0.1548280417919159, -0.27020642161369324, -0.7808368802070618, 0.04203890264034271, 0.7030052542686462, -0.5957381725311279, 0.1945617...
String guiPath { get; set; } public string configPath { get; set; } public Dictionary<string, string> mappedDrives = new Dictionary<string, string>(); public Boolean Save(String filename) { using(var filestream = File.Open(filename, FileMode.OpenOrCreate,FileAccess.ReadWrite)) { ...
[ 0.10325201600790024, -0.36016935110092163, 0.648992121219635, -0.09647946059703827, 0.1855655461549759, 0.1549208164215088, 0.32261762022972107, -0.016210392117500305, 0.07240848988294601, -0.8042519092559814, -0.2835250198841095, 0.8473284244537354, -0.4997873306274414, -0.075031466782093...
new XmlSerializer(typeof(ConfigFile)); serializer.Serialize(filestream, this); return true; } catch(Exception e) { MessageBox.Show(e.Message); return false; }
[ -0.05774228647351265, -0.4251575767993927, 0.4686529040336609, -0.1931103765964508, 0.02829037792980671, -0.021929344162344933, 0.1926591396331787, -0.3741053342819214, -0.26741522550582886, -0.845734179019928, -0.5524049997329712, 0.25457435846328735, -0.5614499449729919, 0.27735891938209...
} } public void addDrive(string drvLetter, string path) { this.mappedDrives.Add(drvLetter, path); } public static ConfigFile Load(string filename) { using (var filestream = File.Open(filename, FileMode.Open, FileAccess.Read)) { try {
[ 0.1963377743959427, -0.2148527204990387, 0.49286940693855286, -0.311696857213974, 0.23255296051502228, 0.027855681255459785, 0.1373673528432846, -0.2313394397497177, -0.012542770244181156, -0.497785359621048, -0.2661181688308716, 0.7732334136962891, -0.4272952973842621, 0.13418392837047577...
var serializer = new XmlSerializer(typeof(ConfigFile)); return (ConfigFile)serializer.Deserialize(filestream); } catch (Exception ex) { MessageBox.Show(ex.Message + ex.ToString());
[ -0.13086286187171936, -0.4175982177257538, 0.4820248484611511, -0.3388342261314392, 0.00625968212261796, 0.15508422255516052, 0.36729204654693604, -0.4211636781692505, -0.322286993265152, -0.5311985015869141, -0.4726419150829315, 0.41649070382118225, -0.5856150388717651, 0.3154134750366211...
return new ConfigFile(); } } } } ``` You can't serialize a class that implements IDictionary. Check out this [link](http://msdn.microsoft.com/en-us/library/ms950721.aspx). > Q: Why can't I serialize hashtables? > > > A: The XmlSerializer cannot process > classes implementing the IDictionary...
[ -0.0684167742729187, -0.23528112471103668, 0.32396891713142395, -0.049600888043642044, -0.18467123806476593, -0.326222687959671, 0.20992612838745117, -0.23269400000572205, -0.21179702877998352, -0.5268718600273132, -0.20841526985168457, 0.5389263033866882, -0.6403898000717163, 0.3339354395...
not implement the IDictionary > interface. So I think you need to create your own version of the Dictionary for this. Check this [other question](https://stackoverflow.com/questions/67959/c-xml-serialization-gotchas).
[ 0.5236474871635437, 0.09500489383935928, 0.14396196603775024, -0.009354600682854652, -0.1197437047958374, -0.2890229821205139, 0.448407918214798, 0.08056139945983887, -0.03635197505354881, -0.5983661413192749, -0.02899087220430374, 0.5306383967399597, -0.4028955101966858, -0.07464575022459...
I am building a system for distributing packages (.zip archives) created by different organizations. I'd like a way to verify that the publisher of a package is indeed who they claim to be, and that the file has not been tampered with. To verify the publisher, a system similar to what is used by web browsers is requi...
[ 0.6349835991859436, 0.19981855154037476, 0.1671498417854309, -0.07035825401544571, 0.1613457053899765, -0.5908375382423401, 0.09959536045789719, -0.3158087432384491, -0.17926748096942902, -0.3817561864852905, -0.23404991626739502, 0.29885333776474, -0.3493630290031433, 0.09343164414167404,...
re-packaged, with: * A header containing the signed hash, and the public certificate * A body containing the contents of the zip file Package opening would work like this: 1. Take the body of the data 2. Hash it using the same algorithm 3. Decrypt the package's hash using the public key from the certificate 4. Comp...
[ 0.51669842004776, -0.000775277556385845, 0.45964667201042175, -0.039368223398923874, 0.2603941261768341, -0.19661924242973328, 0.0959663912653923, -0.6466457843780518, -0.3161313235759735, -0.3541572690010071, -0.2859252989292145, 0.37873250246047974, -0.12257809191942215, 0.13911207020282...
the correct way to approach it? 2. What hashing algorithm do people normally use? I assume it should be one-way. Would you just choose one (MD5, SHA1, SHA2?) or is it more normal to support a variety and let the package author tell you which one they used (e.g., the header of the document contains the name of the hashi...
[ 0.4740000367164612, 0.06929636001586914, -0.09698016941547394, 0.10656048357486725, -0.1575961709022522, -0.26790159940719604, 0.01611960493028164, -0.2558367848396301, -0.04127955436706543, -0.5013555288314819, 0.20624148845672607, 0.4733965992927551, -0.2447720468044281, -0.0922492295503...
certificates?) Lastly, if an organization does not have a paid-for certificate and instead decide to use a self-issued certificate, I assume I can still verify the hashes (for the sake of data integrity) without having to install stuff into the computer's certificate stores or any magic like that (in these cases, I'd ...
[ 0.554171085357666, 0.5847600102424622, 0.39731305837631226, 0.3919164538383484, 0.07051777094602585, -0.46610820293426514, 0.2366890162229538, -0.023830359801650047, -0.42711010575294495, -0.02388685755431652, -0.04555961489677429, 0.30312836170196533, 0.11897499859333038, 0.07058628648519...
standard API to create signed ZIP packages. [System.IO.Packaging](http://msdn.microsoft.com/en-us/library/system.io.packaging.aspx) namespace contains necessary classes to create OPS (open packaging specification) conformant ZIP packages with [digital signatures](http://msdn.microsoft.com/en-us/library/system.io.packa...
[ 0.5469703674316406, -0.31025588512420654, 0.15178008377552032, 0.237065851688385, 0.255875825881958, -0.18056808412075043, -0.17584507167339325, -0.3461344242095947, -0.32005754113197327, -0.6951166987419128, -0.5194748640060425, 0.21960070729255676, -0.17912526428699493, -0.27528032660484...
I have had many requests come in to a project that I work on, to include an IIS 7 module interface. Does anybody know of any resources for creating an IIS 7.0 module interface? I have searched <http://www.iis.net> and I have not really found a good article on the basics of how to create an IIS 7.0 module interface. ...
[ 0.3423985540866852, 0.1643991768360138, 0.18838532269001007, 0.05777239054441452, -0.28354281187057495, -0.05134103074669838, 0.22177481651306152, 0.05649038776755333, -0.17265364527702332, -0.5314130783081055, 0.18788282573223114, 0.7592383027076721, -0.2054452747106552, 0.097941346466541...
Overview](http://learn.iis.net/page.aspx/121/iis-7-modules-overview/) This may help to get started: <http://learn.iis.net/page.aspx/121/iis-7-modules-overview/#Getting> <http://www.iis.net/ConfigReference/system.webServer/globalModules>
[ -0.4506737291812897, -0.28918054699897766, 0.580715537071228, 0.002578586805611849, 0.056987375020980835, -0.15525810420513153, -0.12855327129364014, -0.020325927063822746, -0.7663977146148682, -0.719904363155365, -0.3003765940666199, 0.3817908465862274, 0.20541240274906158, 0.003477024380...
This is one of the most used Regex functions ``` Regex.IsMatch("Test text for regex test.", "(test)", RegexOptions.IgnoreCase | RegexOptions.Multiline); ``` Can you explain how Regex.IsMatch method works ? I mean how it handles bitwise OR RegexOptions parameters ? How it defines method parameters ? Thanks for repl...
[ -0.01901581883430481, -0.12754803895950317, 0.22574222087860107, 0.1575082689523697, 0.2377965748310089, -0.04477778077125549, 0.0970848798751831, -0.4123125374317169, -0.0437377505004406, -0.5084261298179626, -0.04741983488202095, 0.35200202465057373, -0.4255431294441223, -0.0922117903828...
((options & MyOptions.UpperCase) == MyOptions.UpperCase) { /* Do Upper case transform */ } if ((options & MyOptions.Reverse) == MyOptions.Reverse) { /* Do Reverse transform */ } /* etc, ... */ } DoTransform(MyOptions.UpperCase | MyOptions.Reverse); ``` I've just done a bit more diggin...
[ 0.10242864489555359, -0.29073506593704224, 0.35396867990493774, -0.14007136225700378, 0.2116607427597046, 0.2425084412097931, 0.548719584941864, -0.43530070781707764, -0.046320196241140366, -0.618030309677124, -0.24999509751796722, 0.7079865336418152, -0.29122233390808105, -0.1531022489070...
but other than "it affects the `ToString()` result" no one seems to know or wants to explain what it *does* do. In code I write, I adorn enumerations that I intend to use as bitfields with the `[Flags]` attribute, so in that case it is at least somewhat self-documenting. Otherwise, I'm at a loss.
[ 0.4963092803955078, 0.26655465364456177, -0.12048640847206116, 0.09451381117105484, 0.0007827716181054711, -0.4670901596546173, 0.38927873969078064, -0.049051955342292786, -0.040888313204050064, -0.24074585735797882, -0.21206967532634735, 0.20631635189056396, 0.016503073275089264, -0.08513...
I am relatively new to arena of emails. Just drilling out tutorial by tutorial about email internals. My requirement is I need to send emails and receive emails from my webhost. For this to happen, I need an smtp server(daemon) running right? I recently studied about MTAs, which are responsible for transferring emails ...
[ 0.41998738050460815, 0.02518177032470703, 0.47964152693748474, -0.00795748084783554, -0.1865766942501068, -0.1911676675081253, 0.4886154234409332, 0.02087712474167347, -0.37883618474006653, -0.6110991835594177, -0.08154574036598206, 0.31155601143836975, -0.19137346744537354, 0.223399475216...
bitwise operations to be applied to the various values. You can also do something similar: ``` [Flags] enum MyOptions { UpperCase = 1, Reverse = 2, Trim = 4 } public static void DoTransform(MyOptions options) { if ((options & MyOptions.UpperCase) == MyOptions.UpperCase) { /* Do Upper case...
[ 0.06983614712953568, -0.8592246770858765, 0.2538990080356598, -0.11868412792682648, 0.30281853675842285, 0.4815148413181305, 0.20625096559524536, -0.2840672433376312, 0.1582617610692978, -0.5317599773406982, -0.2685878872871399, 0.7232701778411865, -0.3267780542373657, -0.06768321990966797...
etc, ... */ } DoTransform(MyOptions.UpperCase | MyOptions.Reverse); ``` I've just done a bit more digging based on Frank's comment and he is correct that with or without the `[Flags]` attribute, the code above will compile and run. There have been other comments in regard to what the `[Flags]` attribute *does not* ...
[ 0.35343244671821594, 0.21873465180397034, 0.3672226369380951, -0.09614201635122299, 0.07471790909767151, -0.17090429365634918, 0.4645988941192627, -0.10618661344051361, -0.05893292278051376, -0.4700307846069336, -0.13696087896823883, 0.5991405248641968, -0.3211241662502289, -0.068113386631...
loss.
[ -0.3103189766407013, 0.2420300394296646, 0.10167243331670761, 0.09638965129852295, -0.19219870865345, 0.17716307938098907, -0.12611199915409088, -0.022930480539798737, -0.059995975345373154, -0.8717087507247925, -0.3852161765098572, 0.20971523225307465, 0.09705318510532379, 0.6743802428245...
I have no idea why this is happening. I have some very straightforward code, replicated below, which works fine in all browsers except for IE 7 & 8. In those browsers, trying to expand the list of options in the select triggers the built-in Pop-up blocker bar. What gives? ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML...
[ 0.17151042819023132, 0.0923537015914917, 0.5262344479560852, -0.12641912698745728, -0.06580610573291779, -0.30300572514533997, 0.27420663833618164, -0.3439217507839203, -0.04344695061445236, -0.6423220038414001, -0.23932136595249176, 0.34995079040527344, -0.27144038677215576, 0.02437435090...
<select name="bedrooms"> <option selected="selected" value=""> Bedrooms * </option> <option value="0"> Studio
[ 0.3864695131778717, -0.1852707713842392, 0.042734187096357346, 0.1143956109881401, 0.6977173089981079, 0.11275342106819153, -0.07919356226921082, -0.32613757252693176, -0.3630148768424988, -0.4765970706939697, -0.3571181297302246, 0.47610175609588623, 0.2909012734889984, 0.1943956911563873...
</option> <option value="1"> 1 Bedroom </option> <option value="1.5">
[ 0.2749421000480652, -0.22388526797294617, 0.21854527294635773, 0.15701593458652496, 0.4393354654312134, 0.13198965787887573, -0.06848470866680145, -0.3407374322414398, -0.06833579391241074, -0.6603900790214539, -0.40965861082077026, 0.1486351191997528, -0.012228191830217838, 0.075112313032...