text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
subItem.MouseDown += new MouseEventHandler(subItem_MouseDown); cxItems.Items.Add(subItem); } } void subMenuitem1_MouseDown(object sender, MouseEventArgs e) { //get a reference to the menu that was clicked ToolStripMenuItem clickedMenu = sender as ToolStripMenuIt...
[ -0.33299872279167175, -0.42492684721946716, 0.36292681097984314, -0.12987840175628662, 0.2928524613380432, 0.11343782395124435, 0.5869072079658508, -0.23334912955760956, -0.3363415002822876, -0.6725131869316101, -0.32636314630508423, 0.6032397150993347, -0.42962682247161865, 0.174459502100...
tell you which button was clicked. } ```
[ 0.3389984369277954, 0.1357201635837555, 0.16152700781822205, 0.03000701777637005, 0.3241025507450104, -0.23780323565006256, 0.06148326024413109, 0.2206665724515915, 0.030966782942414284, -0.3130680322647095, -0.10593800246715546, 0.48622989654541016, -0.5290589332580566, 0.0054520978592336...
I have a problem where my ASP.NET controls are not able to be referenced from the code behind files. I found a solution in Stack Overflow question [ASP.NET controls cannot be referenced in code-behind in Visual Studio 2008](https://stackoverflow.com/questions/38670/asp-net-controls-cannot-be-referenced-in-code-behind...
[ -0.26431742310523987, 0.043070487678050995, 0.5018881559371948, 0.2110596001148224, 0.027813265100121498, 0.21869993209838867, 0.323498398065567, -0.37637120485305786, -0.2637970745563507, -0.6500027179718018, 0.03704860433936119, 0.581565260887146, -0.12531322240829468, -0.227614477276802...
edition) this comes from [Clear Client TFS Cache](http://blogs.msdn.com/technet/archive/2008/05/15/clear-client-tfs-cache.aspx): > Clear Client TFS Cache > > > Visual Studio and Team Explorer > provide a caching mechanism which can > get out of sync. If I have multiple > instances of a single TFS which can be > ...
[ -0.28913414478302, -0.08835173398256302, 0.6920656561851501, -0.026209203526377678, -0.38017377257347107, -0.13191749155521393, 0.13713252544403076, -0.4611673355102539, -0.1596897393465042, -0.8815568685531616, -0.3651409447193146, 0.3747008144855499, -0.33352720737457275, -0.090191543102...
I'm not clear about the interaction between database schema changes and differential backups on sql 2005. Lets say I do a Full backup right right now. Then I perform some schema changes. Then I do a diff backup. What happens? Do I need to create another FULL backup? Are my schema changes and any data in those new sch...
[ -0.08147671818733215, 0.16603438556194305, 0.7228570580482483, 0.003114293096587062, 0.143276184797287, -0.12972329556941986, 0.34826767444610596, 0.058012817054986954, -0.31030982732772827, -0.4769619107246399, -0.05408861115574837, 0.78352952003479, -0.23919236660003662, 0.02540348097681...
information (regarding team edition) this comes from [Clear Client TFS Cache](http://blogs.msdn.com/technet/archive/2008/05/15/clear-client-tfs-cache.aspx): > Clear Client TFS Cache > > > Visual Studio and Team Explorer > provide a caching mechanism which can > get out of sync. If I have multiple > instances of a...
[ 0.14776404201984406, -0.17489749193191528, 0.09468629211187363, -0.07382253557443619, -0.20692738890647888, -0.19946524500846863, 0.3637844920158386, -0.14091281592845917, -0.18744853138923645, -0.897196888923645, -0.21035976707935333, 0.5259087681770325, -0.28054696321487427, -0.312604129...
I have a SQL database which i use to store some info and every record has a unique id generated by the database. MY program is written in flash and runs over the web, the program runs fine and it inserts records into the database and pulls the idnumber of the last record and displays it for user, my question is though ...
[ 0.6183646321296692, 0.4834151864051819, 0.1717231422662735, 0.2881619334220886, -0.0067429617047309875, -0.07509058713912964, 0.032909926027059555, -0.11392243206501007, -0.17762455344200134, -0.4430939853191376, 0.49197331070899963, 0.2639637291431427, 0.048741549253463745, 0.436342060565...
id numbers for users here is the code for inserting into the database ``` $query = "INSERT into $tablename (grade,school,country) VALUES ('$datarray[0]','$datarray[1]','$datarray[2]')"; $result = mysql_query($query) or die("no rows selected"); ``` and after that i load another php file on the second in my ...
[ 0.45561593770980835, 0.12226887792348862, 0.445944607257843, 0.27124547958374023, 0.10205936431884766, -0.03667905926704407, -0.09916548430919647, -0.5758506059646606, 0.02850540354847908, -0.40218421816825867, 0.030651075765490532, 0.3351128399372101, -0.028773071244359016, -0.02704927325...
record? PHP has [`mysql_insert_id()`](http://us3.php.net/manual/en/function.mysql-insert-id.php) to return > The ID generated for an `AUTO_INCREMENT` > column by the previous INSERT query on > success, 0 if the previous query does > not generate an `AUTO_INCREMENT` value, > or `FALSE` if no MySQL connection was >...
[ 0.3398100733757019, 0.2649986743927002, 0.28768253326416016, 0.11988833546638489, 0.2998613715171814, 0.008855869993567467, -0.18190240859985352, -0.12679852545261383, -0.5736424922943115, 0.11163394898176193, -0.03594072535634041, 0.4591519832611084, -0.38974472880363464, 0.10072446614503...
Have you ever had to use [bit shifting](http://en.wikipedia.org/wiki/Bit_shift#Bit_shifts) in real programming projects? Most (if not all) high level languages have shift operators in them, but when would you actually need to use them? I still write code for systems that do not have floating point support in hardware. ...
[ 0.3194991946220398, -0.2796238958835602, -0.2856452465057373, 0.01572481356561184, -0.10017658025026321, -0.03730929270386696, -0.3652160167694092, 0.25921982526779175, -0.33964598178863525, -0.2565101087093353, 0.03550108149647713, 0.4798220992088318, -0.3746821880340576, -0.3328256905078...
if you want to, but that would be harder to write, less readable and sometimes slower. The compilers detect cases where multiplication can be reduced to a shift.
[ 0.1311074048280716, -0.19463063776493073, 0.021074632182717323, -0.17254561185836792, -0.042245592921972275, -0.07936610281467438, -0.020740462467074394, -0.07260217517614365, -0.3967216908931732, -0.47234150767326355, -0.3427158296108246, 0.5264393091201782, -0.043932948261499405, -0.2605...
Recently gmail added some [custom button and menu widgets](http://gmailblog.blogspot.com/2009/02/new-ways-to-label-with-move-to-and-auto.html) in html. They've already [tipped their hand](http://stopdesign.com/archive/2009/02/04/recreating-the-button.html) as to how the gradient effect within the button works without i...
[ 0.16699853539466858, 0.02467990480363369, 0.69668048620224, 0.10415515303611755, -0.15177690982818604, -0.08655016124248505, 0.2722703814506531, 0.24732595682144165, -0.3503168523311615, -0.3925522565841675, 0.22107484936714172, 0.12909866869449615, -0.2511472702026367, -0.0966742709279060...
cells are styled with CSS to have PNG backgrounds. The corners and bottom edge are sprites in this image: [icons\_ns5.png](http://mail.google.com/mail/images/2/icons_ns5.png) and the right is a sprite from this image: [vimages7.png](http://mail.google.com/mail/images/2/5/chrome/vimages7.png) So, for instance, the righ...
[ -0.20483827590942383, -0.05706430971622467, 0.7183582186698914, 0.030116252601146698, 0.042503561824560165, 0.3916664123535156, 0.0477755106985569, -0.32944127917289734, -0.25596874952316284, -0.5852795243263245, -0.16188958287239075, 0.1602439433336258, -0.16630493104457855, 0.03885860741...
for IE 6, I haven't checked, but either they don't display shadows or they use the [known fix for transparent PNGs in IE 6 from Drew McLellan](http://24ways.org/2007/supersleight-transparent-png-in-ie6).
[ 0.3048633933067322, -0.10116581618785858, 0.26652494072914124, -0.004458105191588402, -0.11360062658786774, -0.24824081361293793, 0.3375454843044281, 0.17021745443344116, -0.255432665348053, -0.3473271131515503, -0.34758511185646057, 0.6902118921279907, -0.48329147696495056, -0.30666485428...
There have been a few articles recently about Google's new imageless buttons: * <http://stopdesign.com/archive/2009/02/04/recreating-the-button.html> * <http://stopdesign.com/eg/buttons/3.0/code.html> * <http://stopdesign.com/eg/buttons/3.1/code.html> * <http://gmailblog.blogspot.com/2009/02/new-ways-to-label-with-mov...
[ 0.2149498462677002, -0.23144400119781494, 0.5764620304107666, -0.014896536245942116, -0.25348252058029175, 0.17409759759902954, -0.0731690376996994, -0.1664031744003296, -0.47737109661102295, -0.6416631937026978, 0.22924897074699402, 0.5531501770019531, -0.4508494734764099, -0.205675661563...
the "onclick" event which would have `<a>` tags in them and a search bar for filtering? Would a table layout for that popup be sane? I'm terrible at reverse engineering things on the web, what are some of the tools that I could use to help reverse engineer these buttons? Using Firefox's web developer toolbar I can't r...
[ 0.5667041540145874, 0.1835198849439621, 0.03932228684425354, 0.29130589962005615, -0.009608600288629532, 0.012215306051075459, 0.22130145132541656, 0.2485693395137787, -0.0709889754652977, -0.46204957365989685, 0.33739951252937317, 0.4806784987449646, -0.5221027731895447, -0.01888175867497...
just get an idea of how I could create similar button functionality. -- EDIT -- I didn't see the link in the original post. Sorry! Will try and re-write to reflect actual question StopDesign has an excellent post on this [here](http://stopdesign.com/archive/2009/02/04/recreating-the-button.html). **[edit 20091107] The...
[ -0.44665420055389404, -0.3862053453922272, 0.6281672120094299, 0.019863750785589218, -0.15254943072795868, 0.45166248083114624, 0.02835957705974579, -0.3515456020832062, -0.40853598713874817, -0.6838136315345764, 0.3136584758758545, 0.14316393435001373, -0.3876933455467224, -0.280419617891...
faked by using three layers: ![Button Gradient](https://stopdesign.com/img/archive/2009/02/bands-spec.png) All of the code can be found at the [Custom Buttons 3.1](http://stopdesign.com/eg/buttons/3.1/code.html) page. (although the gradient without the image is only working in Firefox and Safari) Step by Step Instruc...
[ 0.17826485633850098, 0.17993280291557312, 0.5628311634063721, -0.0043397038243710995, -0.03752359002828598, 0.2800236642360687, 0.5951937437057495, -0.12776120007038116, -0.007865351624786854, -0.3489317297935486, -0.145436629652977, 0.4555942416191101, -0.3927765488624573, -0.067333139479...
an extra 3px of left/right padding to button elements which can't be overriden. Thus, we use -3px of left/right margin to overcome this. */ html:not([lang*=""]) button.btn { margin:0 -3px; } .btn span { background:#f9f9f9; z-index:1; margin:0; padding:3px 0; border-left:1px solid #ccc; border-rig...
[ -0.04882077872753143, -0.028986599296331406, 1.017255425453186, -0.12218564748764038, -0.0912453681230545, 0.42398637533187866, 0.017123378813266754, -0.5655298829078674, -0.36681193113327026, -0.561999499797821, -0.5540281534194946, 0.4890185594558716, -0.2121170610189438, -0.199758678674...
width:100%; overflow:hidden; height:40%; border-top:3px solid #eee; } * html .btn b { top:1px; } .btn u { text-decoration:none; position:relative; z-index:3; } /* pill classes only needed if using pill style buttons ( LEFT | CENTER | RIGHT ) */ button.pill-l span { border-right-width:0; } butto...
[ -0.02281673066318035, -0.05161473900079727, 0.6612449884414673, -0.11481964588165283, -0.10101689398288727, 0.6850524544715881, 0.16244922578334808, -0.39081841707229614, -0.2814764976501465, -0.5305066108703613, -0.27295124530792236, 0.5218222737312317, 0.04979190230369568, -0.02036845125...
cursor:pointer; border-color:#9cf !important; color:#000; } /* use if one button should be the 'primary' button */ .primary { font-weight:bold; color:#000; } ``` 2 - Use one of the following ways to call it (more can be found in the links above) ``` <a href="#" class="btn"><span><span><b>&nbsp;</b><u>bu...
[ -0.47542527318000793, 0.01410716027021408, 0.958178699016571, -0.048005834221839905, -0.47824418544769287, 0.24487358331680298, -0.37229809165000916, -0.3328709602355957, -0.491869181394577, -0.5607573986053467, -0.2896348536014557, 0.4320589601993561, -0.42412108182907104, 0.1049657389521...
I'm resizing jpegs by using the Graphics.DrawImage method (see code fragment below). Can anyone confirm that this will not affect the compression of the new image? I have seen [this thread](https://stackoverflow.com/questions/87753/resizing-an-image-without-losing-any-quality), but I am talking specifically about compr...
[ 0.4662388563156128, 0.021889761090278625, 0.4738476872444153, -0.049177754670381546, -0.18408875167369843, 0.0009443783783353865, 0.1573774218559265, -0.35059642791748047, -0.35363519191741943, -0.6972330808639526, -0.3246817886829376, 0.7046153545379639, -0.1671154797077179, 0.26882189512...
{ ImageFormat format = inputImage.RawFormat; decimal ratio; //ratio old width:new width int newHeight = 0; //*** If the image is smaller than a thumbnail just return it if (inputImage.Width < newWidth)
[ 0.22679905593395233, -0.17306849360466003, 0.8989686965942383, -0.2004917711019516, 0.15136298537254333, 0.15886931121349335, -0.019932011142373085, -0.3148857355117798, -0.15964771807193756, -0.6697532534599304, -0.11372025310993195, 0.7665707468986511, 0.05112479254603386, 0.149114087224...
return null; ratio = (decimal)newWidth / inputImage.Width; decimal h = inputImage.Height * ratio; newHeight = (int)h; bmpOut = new Bitmap(newWidth, newHeight); Graphics g = Graphics.FromImage(bmpOut); g.InterpolationMode =
[ -0.016232263296842575, -0.1703808605670929, 0.36793163418769836, -0.0120330099016428, -0.275776743888855, 0.4516043961048126, 0.10048171132802963, -0.4195590019226074, -0.2414863407611847, -0.4262687861919403, -0.39809179306030273, 0.5853134989738464, -0.2223707139492035, 0.008513407781720...
System.Drawing.Drawing2D.InterpolationMode.HighQualityBicubic; // try testing with following options: //g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; //g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; //g.PixelOffsetMode = System...
[ -0.23522791266441345, -0.4091157615184784, 0.43368855118751526, 0.08319251984357834, -0.4063718318939209, 0.6184157133102417, 0.25785279273986816, -0.669184684753418, 0.013626055791974068, -0.6976503729820251, -0.018796484917402267, 0.4768247902393341, -0.4685560464859009, 0.01027307007461...
g.DrawImage(inputImage, 0, 0, newWidth, newHeight); bmpOut.Save(outStream, getImageFormat(url)); } return outStream.ToArray(); } ``` When you call "bmpOut.Save" you have to pass in some EncoderParameters to tell the method what quality level you would like to save it with. <http://ms...
[ 0.22525395452976227, -0.1304987668991089, 0.6089584827423096, -0.19203118979930878, -0.029960786923766136, 0.09832727164030075, 0.06726468354463577, -0.3677743673324585, -0.2539874315261841, -0.7345812320709229, -0.22949352860450745, 0.5271069407463074, -0.426135778427124, -0.0407936237752...
i [Dispose](http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.close.aspx) an SqlConnection object, but of of course [it isn't really closed](http://www.ondotnet.com/pub/a/dotnet/2004/02/09/connpool.html). i need closed connection to not hold locks on database objects. How can i prevent closed ...
[ 0.24318087100982666, 0.0739191472530365, 0.6207540035247803, 0.09763933718204498, -0.015177268534898758, -0.4449160099029541, 0.322749525308609, -0.09730207175016403, -0.37827250361442566, -0.7770763635635376, -0.11816763877868652, 0.15352119505405426, -0.286183625459671, 0.667245388031005...
Although, not really. TCP/IP has it's own method for keeping TCP connections open for a few more minutes (in the "**CLOSE\_WAIT**" state). This is done in case you ask to open a TCP connection to the same IP:Port again. If so, it can use that already open TCP connection. * With connection pooling and SQL Server, the co...
[ 0.352789968252182, -0.18684427440166473, 0.4687879979610443, 0.32876014709472656, -0.019230904057621956, -0.40208593010902405, 0.010451732203364372, 0.0964476689696312, -0.4042781889438629, -0.5595057010650635, -0.1736253947019577, 0.29503950476646423, -0.14712858200073242, 0.5499926805496...
delete this database while i'm in it please." How can i prevent it from holding a shared lock on *my* database, while keeping the benefits of connection pooling? --- My ad-hoc solution right now is every time a developer called Dispose: ``` connection.Dispose() ``` change it into a call to a global helper functio...
[ 0.021510334685444832, 0.002250419929623604, 0.5086311101913452, 0.09033257514238358, 0.32801395654678345, -0.4081742465496063, 0.32802754640579224, 0.10337143391370773, -0.44719815254211426, -0.7396010756492615, -0.28340864181518555, 0.641438364982605, -0.5688029527664185, 0.62148183584213...
pooling will have its brain scrambled - because i switched database contexts behind its back. --- In case anyone didn't know, or thought otherwise: From [the SDK](http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.close.aspx): > **Close** and **Dispose** are functionally > equivalent. You ...
[ 0.037171993404626846, -0.21126331388950348, 0.6564743518829346, 0.11184865236282349, 0.005096863955259323, -0.14560610055923462, 0.020602505654096603, -0.30459064245224, -0.5508190393447876, -0.4519111216068268, -0.11793301999568939, 0.6960095763206482, -0.6384150981903076, 0.1533718258142...
it for regularly). Using it kicks out all other connections, and new connections cannot be made. I haven't played with the various "WITH" options such as with "ROLLBACK IMMEDIATE", but their usage seems straightforward.
[ 0.21232187747955322, -0.35177353024482727, 0.4854147136211395, 0.18091095983982086, 0.22808784246444702, -0.27841871976852417, -0.04580768942832947, 0.013500353321433067, -0.07556045055389404, -0.4518629312515259, -0.005879286210983992, 0.7768365144729614, -0.20255115628242493, 0.018899492...
Can you use ``` int blah = Convert.ToInt32(cmd.ExecuteScalar()); ``` When the sproc's last statement does: ``` RETURN @value ``` I can only get it to work if it does: SELECT @value Also, this gives me a object null exception: ``` int blah = (int)cmd.ExecuteScalar(); ``` isn't convert.toint32 and (int) the s...
[ 0.09557387232780457, -0.11015329509973526, 0.4930635392665863, -0.09070465713739395, 0.030706867575645447, -0.14323601126670837, 0.14548979699611664, -0.40719112753868103, -0.10905954241752625, -0.4008030593395233, 0.0473666749894619, 0.7091143727302551, -0.5222004652023315, 0.111688621342...
direction of Return when creating the parameter object. You can then use the ExecuteNonQuery() method. I must note that IMO, stored procedure return values should simply indicate the status of the procedure. All data should be returned through result sets or output parameters.
[ -0.22210422158241272, -0.33228206634521484, 0.7136729955673218, 0.07490730285644531, 0.15952369570732117, 0.18033947050571442, -0.11108413338661194, -0.08550985157489777, -0.07598469406366348, -0.2817023694515228, -0.016130512580275536, 0.763708233833313, -0.2547568380832672, 0.19732771813...
I would like to prepend some text to multiple files in bash, I've found this post that deals with prepend: [prepend to a file one liner shell?](https://stackoverflow.com/questions/54365/prepend-to-a-file-one-liner-shell "prepend to a file one liner shell?") And I can find all the files I need to process using find: `...
[ 0.24521884322166443, 0.150787353515625, 0.2708189785480499, -0.11241081357002258, -0.10770175606012344, 0.04526270553469658, 0.03302210941910744, -0.3214389383792877, 0.005949533078819513, -0.9910350441932678, 0.21551643311977386, 0.9338315725326538, -0.07639052718877792, -0.05203153565526...
file with the -i flag: ``` find ./ -name somename.txt -exec sed -i .bak -e '2q;1i\ My new text here' {} \; ``` To prepend multiple lines, you'll need to end each one with a backslash. That leaves the original files around with a `.bak` extension.
[ -0.06725365668535233, 0.043886810541152954, 0.3643054664134979, -0.09733034670352936, -0.06386490166187286, 0.24478644132614136, 0.3199319839477539, 0.2944839596748352, -0.16601227223873138, -0.5513128042221069, -0.34549981355667114, -0.06496631354093552, -0.5833795070648193, 0.33293452858...
The easiest way to check if a path is an UNC path is of course to check if the first character in the full path is a letter or backslash. Is this a good solution or could there be problems with it? My specific problem is that I want to create an System.IO.DriveInfo-object if there is a drive letter in the path. Since ...
[ 0.1478336751461029, 0.08700165897607803, 0.15596699714660645, 0.16373106837272644, -0.02329443208873272, -0.12705098092556, 0.32355189323425293, 0.18566565215587616, -0.14919763803482056, -0.7439030408859253, -0.17760822176933289, 0.6357356309890747, -0.289050430059433, 0.074310302734375, ...
rooted local path. A path without either of this things (myfolder\blah) is a relative local path. This includes a path with only a single slash (\myfolder\blah).
[ -0.23993755877017975, -0.36271023750305176, 0.2160373032093048, -0.04015389084815979, -0.23223207890987396, -0.00428692065179348, 0.2604236602783203, 0.15458692610263824, -0.2612890601158142, -0.7023439407348633, -0.2373722791671753, 0.04034869000315666, -0.2865603566169739, 0.216161146759...
I have a similar problem as this [question](https://stackoverflow.com/questions/209224/-net-consuming-web-service-identical-types-in-two-different-services). I have multiple web services that I am consuming with WCF, which all share types. The services themselves are written in Java and I do not have access to them. Th...
[ 0.47172051668167114, 0.4889542758464813, 0.23422826826572418, -0.2983231842517853, -0.1607588827610016, -0.2547704875469208, 0.2671732008457184, -0.2023564726114273, -0.05422970652580261, -0.887213945388794, 0.25938311219215393, 0.6497941017150879, -0.32071322202682495, 0.32355213165283203...
`svcutil`: ``` svcutil.exe /o:GeneratedServices.cs /n:*,MyNamespace.Generated http://MyServer.MyService1?WSDL http://MyServer.MyService2?WSDL ``` I know that `wsdl.exe` has `/mergeTypes` flag, which works for these services, but there are some options on `svcutil.exe` that I'd really like to use. I did have someone ...
[ 0.3639792799949646, 0.17293621599674225, 0.4022113084793091, -0.12208806723356247, -0.13603828847408295, -0.04368211701512337, 0.32684096693992615, -0.09726806730031967, 0.027013704180717468, -0.8551492691040039, 0.1310722976922989, 0.48900753259658813, -0.3612792491912842, 0.1829682886600...
conflicts), and shift data between the two types. If the types *are* the same and it still doesn't work, then you can perhaps use the /r switch with svcutil to consume the types from an existing assembly. Try using it once to get the first types (just from 1 of the urls) - then compile that code into an assembly. Use ...
[ 0.2452850341796875, -0.38285771012306213, 0.1998540163040161, 0.08240903913974762, -0.0653117448091507, 0.11057494580745697, 0.13239331543445587, -0.2145177125930786, -0.19744183123111725, -0.575228214263916, -0.10126102715730667, 0.8186823129653931, -0.28282833099365234, 0.134103268384933...
themselves. This might make things simpler. For example, you could write an implicit (or explicit) static conversion operator between two similar types in different namespaces.
[ 0.311502605676651, 0.12718434631824493, -0.16633592545986176, 0.06506182998418808, -0.09791599959135056, 0.2848083972930908, 0.24248188734054565, -0.12774351239204407, 0.05265962332487106, -0.6872507929801941, -0.1569449007511139, 0.5707354545593262, -0.44566577672958374, 0.035700000822544...
I am just beginning to learn SQL and have stumbled at the first hurdle, I am unable to create a table. Below is the code example. The error I am receiving when running the statement, references line 7 stating there is an issue with a 'relational operator'. The purpose of **line 7** is to check that the age of the perso...
[ 0.3784255385398865, 0.5008487105369568, 0.42236897349357605, -0.1963391900062561, 0.42180922627449036, -0.20041458308696747, 0.4137248396873474, 0.0015648026019334793, -0.3295038342475891, -0.5295281410217285, 0.09089958667755127, 0.2955428659915924, 0.17386214435100555, 0.2908641397953033...
VARCHAR2(20) NOT NULL primary key, 4. surname VARCHAR2(15) NOT NULL CHECK(surname=UPPER(surname)), 5. deptCode CHAR(5) NOT NULL CHECK(deptCode=UPPER(deptCode)), 6. empYear NUMBER(1,0) NOT NULL CHECK(empYear >= 1 AND empYear <= 4), 7. birthDate DATE NOT NULL CHECK((SYSDATE - birthDate) /365 ) >=...
[ 0.05619719251990318, 0.14920873939990997, 0.5070993304252625, -0.21967735886573792, 0.032950181514024734, 0.2877102792263031, 0.406197726726532, -0.43694373965263367, -0.10102739185094833, -0.3253597021102905, -0.32546740770339966, 0.4237876236438751, -0.24643318355083466, 0.18837158381938...
Is there a chart of existing Blackberry platform vs. OS vs. Model versions? Something like: ``` Blackberry Storm, platforms: x.x.x - y.y.y, OS versions: x.x.x-y.y.y Blackberry Bold, platforms: x.x.x - y.y.y, OS versions: x.x.x-y.y.y Blackberry Curve, platforms: x.x.x - y.y.y, OS versions: x.x.x-y.y.y ``` e.t.c Th...
[ -0.46719127893447876, 0.10963080823421478, 0.5447964668273926, 0.03499417006969452, 0.20931969583034515, 0.1529466211795807, 0.3400315046310425, 0.6269116401672363, -0.38572993874549866, -0.4869737923145294, 0.21850425004959106, 0.3623524010181427, 0.032377246767282486, 0.15287543833255768...
I'm trying to install MySQLdb for python on Cygwin. Unfortunately, when I run `python setup.py build`, I get the following error: ``` $ python setup.py build /bin/sh: /usr/local/bin/mysql_config: No such file or directory Traceback (most recent call last): File "setup.py", line 16, in <module> metadata, options ...
[ 0.023261304944753647, 0.4755012094974518, 0.36323079466819763, -0.4053875207901001, 0.19285286962985992, -0.13009238243103027, 0.44143542647361755, 0.13408298790454865, -0.1942170411348343, -0.7751924991607666, -0.1882675737142563, 0.4947621822357178, -0.44510096311569214, 0.07696374505758...
but it doesn't explain how to either get around it or how to install mysql\_config. So maybe this is as easy as: How can I install `mysql_config` for Cygwin? Or maybe it's harder than that. FYI: I have python 2.5.2 and MySQL 5.1.30, running under Cygwin. You'll need mysql-devel, if it's available for cygwin, or you'...
[ 0.35424983501434326, 0.18514922261238098, 0.2106672078371048, 0.06718381494283676, -0.35183075070381165, -0.10552141070365906, 0.18424205482006073, 0.3298852741718292, -0.23975178599357605, -0.5688679218292236, -0.02910878136754036, 0.7728451490402222, -0.31837478280067444, -0.036652240902...
In TFS, I want to see how many files I modified for a day/week/etc. Is this possible? Apparently adding `setFetchSize()` does the trick. So something like this now works perfectly: ``` query.setFirstResult(0); query.setMaxResults(30); query.setFetchSize(30); List list = query.list(); //list.size() now returns....
[ 0.38700994849205017, -0.41060853004455566, 0.7271739840507507, -0.32206255197525024, 0.06055228039622307, -0.2462409883737564, 0.1003483235836029, -0.40632927417755127, -0.47914522886276245, -0.8930156826972961, -0.20891830325126648, 0.7540209293365479, -0.4787278175354004, -0.057129606604...
I have a UserControlParent that dynamically loads UserControlChild. In the UserControlChild, I store a value using the ViewState object by doing a ``` ViewState["count"] = myCount; ``` On Postbacks, the ViewState returns a null. Is this because the UserControlChild is being loaded dynamically? If it helps, the Use...
[ 0.19702892005443573, -0.13297416269779205, 0.3322390913963318, -0.03061870113015175, -0.1916290521621704, 0.04114117845892906, -0.030608249828219414, -0.11665701121091843, -0.17850886285305023, -0.5992550253868103, 0.049735721200704575, 0.48609426617622375, -0.18579354882240295, 0.04379737...
encode all the characters in the String. Depending on the encoding and the characters, some of them may span more than one byte. You can either split the String into chunks of 1024 characters and encode those as bytes, but then each chunk may be more than 1024 bytes. Or you can encode the original string into bytes ...
[ 0.0740869864821434, -0.07815451174974442, -0.17196139693260193, 0.27656304836273193, -0.1436842679977417, 0.2399253100156784, 0.1807507872581482, -0.00966619048267603, -0.2065516859292984, -0.4253982901573181, -0.2893802225589752, 0.08664482831954956, -0.2505408525466919, -0.06219983100891...
than 1 byte. If you're worried about memory usage when the String can be very long, you should use streams (java.io package) to to the en/decoding and splitting, in order to avoid keeping the data in memory several times as copies. Ideally, you should avoid having the original String in one piece at all and instead us...
[ 0.18086892366409302, -0.2469666302204132, 0.13052405416965485, 0.27800312638282776, -0.06268925964832306, -0.2781272828578949, 0.035446472465991974, -0.18484412133693695, -0.2150266319513321, -0.7983251214027405, -0.055683434009552, 0.3511189818382263, -0.236766517162323, -0.00471882941201...
Supposing a multi-player game, what you be the fairest way give final scores based on the previous scores of all players. For example, in a two player match, player A having two times the score of player B. "A" finishing first would not give him a lot of points; finishing last, he would lose quite a lot of points. Mic...
[ -0.1873609870672226, -0.12451153248548508, 0.5413506031036377, 0.35841912031173706, -0.18400117754936218, -0.326638400554657, 0.22614000737667084, -0.27950334548950195, -0.10161861032247543, -0.5802140235900879, 0.2735782563686371, 0.303386926651001, 0.19664323329925537, 0.1256248503923416...
is that it is supposed to gravitate towards your True Skill quickly (usually in 20 games or less). The disadvantage is that it is quite complicated. The ELO System (and others like it) have a disadvantage in that they suffer from a problem called point inflation. For example, if 1500 is intended to mean the average pl...
[ 0.12749414145946503, -0.2963007688522339, 0.6094280481338501, 0.3479723334312439, -0.04366404563188553, -0.10399085283279419, 0.09400197118520737, -0.026454336941242218, -0.395854651927948, -0.5330482721328735, 0.14483340084552765, 0.14757604897022247, 0.15158574283123016, 0.05183660238981...
players think they are better than they are:). However, the advantage of the ELO system is that it is very easy to calculate.
[ -0.154822438955307, -0.029700573533773422, 0.328326553106308, 0.15112420916557312, 0.23280173540115356, -0.26679396629333496, -0.11196762323379517, -0.3782438039779663, 0.03360641002655029, -0.5098891854286194, -0.21428446471691132, 0.6084193587303162, -0.08694472163915634, -0.423777192831...
How do you guys organise your asp.net web applications? Do you have you classes in the applicaiton, or in a seperate class library? How do you split your classes into name spaces, by type, function, tier? I've got a great working applicaiton, but the codes a bit messsy, I want to look at the best way to organise it. I ...
[ 0.4741077721118927, -0.05550898239016533, -0.07058524340391159, 0.19008614122867584, -0.22754856944084167, 0.25545021891593933, -0.18778735399246216, -0.09745945781469345, -0.5401866436004639, -0.6166722178459167, -0.062448952347040176, -0.006932999938726425, -0.11200170964002609, -0.02614...
MyProjectName.Web I never add classes into web application project.
[ 0.5364195108413696, 0.27756384015083313, 0.0698716789484024, -0.06045364961028099, -0.11929766088724136, -0.3842448890209198, 0.7293095588684082, 0.62531578540802, 0.10444290935993195, -0.8273746371269226, 0.1854509562253952, 0.24279020726680756, 0.23032476007938385, 0.37569037079811096, ...
* What's the best way to size text across browsers? * What are the advantages and disadvantages of defining font size in pixels / em? > Which to use? Both. Relative for main body text that users are going to have to read a lot of (so they'll want to be able to read it comfortably); Absolute for text that has to be siz...
[ 0.061409346759319305, 0.03309565782546997, 0.7943882942199707, 0.19268609583377838, -0.13958092033863068, 0.3848816156387329, 0.30783501267433167, -0.15733429789543152, -0.19638320803642273, -0.8292469382286072, -0.18950492143630981, 0.5727658867835999, 0.10852348059415817, -0.348056823015...
It is a pity that ‘pt’ is considered the default unit for font-handling because on the web it is the worst possible choice. (ETA: Note that since this answer, CSS3 has [redefined](http://www.w3.org/TR/css3-values/) the ‘physical units’ so that `px` and `pt` are always proportional. So this problem no longer matters un...
[ 0.10570518672466278, 0.06301745027303696, 0.17274178564548492, 0.0026384517550468445, -0.19701944291591644, 0.29964303970336914, 0.2685977816581726, -0.1775195300579071, -0.2750703692436218, -0.8209827542304993, -0.11118073016405106, 0.3528936207294464, -0.06094745546579361, -0.17353717982...
font-size keywords ‘small’/‘medium’/‘xx-large’/etc., but unfortunately that way you don't get much granularity, and there are still even today differences between how the browsers handle them.
[ -0.27482903003692627, 0.2694113850593567, 0.20440630614757538, 0.19823893904685974, -0.17876678705215454, 0.17129795253276825, 0.06739889085292816, 0.0790119469165802, -0.47258371114730835, -0.7230488657951355, -0.28480106592178345, 0.20588336884975433, -0.010007323697209358, -0.0156236123...
I'm using ASP.NET and C# and am exporting a very large results set to Excel. While my export code is running I would like to show a "loading" animated gif so the users will know their request is processing. I've been trying to do this with multithreading, but I am not very familiar with it. Can anyone guide me in the r...
[ 0.39632412791252136, 0.13281624019145966, 0.06788989156484604, -0.10507890582084656, -0.15928907692432404, 0.0006596802268177271, 0.14926424622535706, 0.45056021213531494, -0.4641842544078827, -0.7724820971488953, 0.1723700910806656, 0.48747384548187256, -0.3164512515068054, -0.14303003251...
posting you turn the message off. Without knowing more about your actual setup I can't help much further, but last time I implemented this I did something along these lines: Assume we have a div called PrintLoadingPanel using JQUERY I set the div to display and take over the window: ``` $("#printLoadingPanel") ...
[ 0.4703209102153778, -0.11109380424022675, 0.5908481478691101, -0.17561985552310944, -0.2863050103187561, -0.2014177441596985, 0.012661473825573921, 0.267282634973526, -0.37531107664108276, -0.8903959393501282, 0.09075063467025757, 0.40924087166786194, -0.235824316740036, 0.0037011916283518...
want to tweak this: ``` window.setTimeout(checkIfDoneDownload,500); ``` Then my CheckIfDoneDownload function hits the server and checks if we finished generating the file and downloaded it. I am using JQUERY here again to call an AJAX enabled WCF service. You could substitute this with PageMethods or any other w...
[ 0.005510205402970314, 0.04779554158449173, 0.5484868288040161, -0.1113797053694725, -0.039371147751808167, -0.1663966327905655, 0.37369900941848755, -0.11074573546648026, -0.12973366677761078, -0.7371327877044678, -0.2507292330265045, 0.7467970252037048, -0.2597055733203888, 0.116643778979...
if (xhr.status==12030) {checkIfDoneDownload();} } }); } ``` Now on the server side, I am generating my downloads via an HTTP Handler. Essentially the first thing it does is set a session level flag to false, then the last thing it does is set it back to true. My check if done service just returns the value of the fla...
[ 0.370010644197464, 0.17905566096305847, 0.603816032409668, -0.10565612465143204, 0.12532375752925873, -0.3870665729045868, 0.6612740159034729, 0.03853752091526985, 0.1262117624282837, -0.636020302772522, -0.08196929097175598, 0.7865489721298218, -0.08859621733427048, 0.4019800126552582, ...
I am attempting to select a distinct list where duplicates are created over several fields. For example, ``` SELECT tablename.field1Date, tablename.field2Number, tablename.field3Text FROM tablename; ``` Would select duplicating records over the date, number and text fields respectively. Now, when ...
[ 0.05169646441936493, 0.2948535084724426, -0.05354573577642441, -0.047810669988393784, 0.16002090275287628, 0.28490766882896423, 0.14592118561267853, -0.11243698745965958, -0.37368398904800415, -0.5918263792991638, 0.2787078619003296, 0.441083699464798, -0.4056837856769562, 0.35141173005104...
tablename.field3Text FROM tablename; ``` Is there any known reasons for this? I must admit I am using MS Access 2003 which may be the issue. Yes, basically it has to sort the results and then re-processed to eliminate the duplicates. This cull could also be being done during the sort, but we can only speculate as to...
[ -0.04336848855018616, 0.3126510679721832, 0.31491580605506897, -0.10261064767837524, -0.0960807055234909, -0.34298908710479736, 0.08482781052589417, 0.00449757557362318, -0.2921976149082184, -0.6117538213729858, 0.1379595845937729, 0.5301305651664734, -0.484637588262558, 0.2033727020025253...
I'm trying to understand what the Java *java.security.Signature* class does. If I compute an SHA1 message digest, and then encrypt that digest using RSA, I get a different result to asking the *Signature* class to sign the same thing: ``` // Generate new key KeyPair keyPair = KeyPairGenerator.getInstance("RSA").genera...
[ -0.0568937249481678, 0.1814572960138321, 0.45874786376953125, -0.33196792006492615, -0.26934072375297546, 0.19910117983818054, 0.38044849038124084, -0.536308228969574, -0.40367773175239563, -0.6919242739677429, -0.28493645787239075, 0.2962162494659424, -0.36880818009376526, 0.1409022659063...
Input data: This is the message being signed > > Digest: 62b0a9ef15461c82766fb5bdaae9edbe4ac2e067 > > Cipher text: 057dc0d2f7f54acc95d3cf5cba9f944619394711003bdd12... > > Signature: 7177c74bbbb871cc0af92e30d2808ebae146f25d3fd8ba1622... I must have a fundamental misunderstanding of what *Signature* is doing...
[ 0.004626512993127108, 0.05210186913609505, 0.3840884268283844, 0.15432025492191315, -0.043440282344818115, 0.2076568305492401, 0.026565132662653923, -0.30469638109207153, -0.2963266372680664, -0.6387202739715576, -0.012803375720977783, 0.17333799600601196, -0.36482205986976624, -0.09455572...
the [RFC](http://www.apps.ietf.org/rfc/rfc3447.html): * [RSASSA-PKCS1-v1\_5](http://www.apps.ietf.org/rfc/rfc3447.html#sec-9.2) * [RSASSA-PSS](http://www.apps.ietf.org/rfc/rfc3447.html#sec-9.1) The [first of these](http://www.apps.ietf.org/rfc/rfc3447.html#sec-9.2) (PKCS1) is the one I describe above. It uses a hash ...
[ -0.163218691945076, 0.2881026864051819, 0.5154255032539368, 0.019258463755249977, -0.16954487562179565, 0.09766169637441635, 0.07623054087162018, -0.25720953941345215, -0.2883109748363495, -0.7299461960792542, -0.3546753525733948, 0.24537290632724762, -0.586578905582428, -0.266109555959701...
String hexString = Integer.toHexString(0x00FF & b); string.append(hexString.length() == 1 ? "0" + hexString : hexString); } return string.toString(); } ``` OK, I've worked out what's going on. Leonidas is right, it's not just the hash that gets encrypted (in the case of the Cipher class method), it's t...
[ 0.019555462524294853, 0.13803386688232422, 0.012320955283939838, 0.24262776970863342, 0.10106490552425385, 0.03578457981348038, 0.09061427414417267, -0.2872273921966553, -0.32105785608291626, -0.23463651537895203, -0.19461844861507416, 0.6751698851585388, -0.5556688904762268, 0.21830207109...
Cipher and Signature are different.
[ 0.10644406080245972, 0.3362022936344147, 0.2248954027891159, 0.11117706447839737, 0.10151635855436325, 0.005830318666994572, 0.10002237558364868, -0.39507028460502625, -0.32833996415138245, -0.705276608467102, -0.042212653905153275, -0.23857077956199646, 0.14121897518634796, 0.176882594823...
I have the following HandleUnknownAction set on my base controller class: ``` protected override void HandleUnknownAction(string action) { Response.Redirect("/"); } ``` How can I unit test that? Another point, is that way to handle the unknown action correct? Seems that calling RedirectToAction() would be more c...
[ -0.012773515656590462, -0.03503383323550224, 0.21948108077049255, -0.09518343210220337, 0.017437970265746117, -0.2002146989107132, 0.2954196631908417, -0.33142751455307007, -0.19044162333011627, -0.4264369010925293, 0.04126361012458801, 0.7135887742042542, -0.14538446068763733, 0.168866440...
by calling HandleUnknownAction directly with the mocking framework [Moq](http://code.google.com/p/moq/). Should also be possible with [Rhino Mocks](http://ayende.com/projects/rhino-mocks.aspx). ``` public void TestHandleUnknownAction() { Mock<ControllerContext> cc = new Mock<ControllerContext> ...
[ 0.14796645939350128, 0.03526005893945694, 0.33131787180900574, 0.1250300258398056, -0.26779890060424805, 0.17700490355491638, 0.36793258786201477, -0.38791903853416443, -0.22901953756809235, -0.5894666910171509, -0.04999098926782608, 0.46306341886520386, -0.10194625705480576, 0.19617210328...
: RealController { public void InvokeUnknownAction(string action) { this.HandleUnknownAction(action); } } ```
[ -0.05775972083210945, -0.333001971244812, 0.34903231263160706, -0.21252986788749695, 0.20835740864276886, 0.03314965218305588, 0.28547754883766174, 0.06528923660516739, -0.30040058493614197, -0.36073654890060425, -0.37493976950645447, 0.9133499264717102, -0.3562421500682831, 0.148804530501...
More of a wiki list/collection, I'm looking for a list of good Java desktop apps. I've added a couple below to get started. Please list the framework/widget toolkit being used if it's know as well. This use to be a good showcase for that. [Swing Sightings at Sun](http://java.sun.com/products/jfc/tsc/sightings)
[ 1.022681474685669, 0.06596463918685913, 0.2811783254146576, 0.13390114903450012, -0.0977872908115387, -0.5100241303443909, 0.06066980957984924, 0.16993600130081177, -0.5508953332901001, -0.3361092805862427, 0.21579740941524506, 0.24558104574680328, 0.18742696940898895, -0.16775274276733398...
I am looking at using Ruby on Rails for a storefront that has to make use of existing data, but I can create my own database schema if I need to. A lot of the fields in the existing data are char(1) emulating a boolean field (i.e. Y/N) for, I believe, cross-platform portability. Since the data is prone to change, I don...
[ 0.438457190990448, 0.2611601650714874, -0.10620611160993576, 0.12469319254159927, -0.12223734706640244, 0.026568593457341194, 0.07257590442895889, 0.06460608541965485, -0.1485987901687622, -0.5647393465042114, 0.15636511147022247, 0.5026571154594421, -0.3452208340167999, 0.2831298708915710...
if product.recycled? %>`, but will Rails recognize char(1) as a boolean, or do I have to define those methods myself in the model like: ``` class Product < ActiveRecord::Base # ... other stuff here def recycled? self.recycled == 'Y' end end ``` I'm thinking I will have to redefine them myself, which is no ...
[ 0.12339304387569427, 0.11193647235631943, 0.08212262392044067, -0.13227516412734985, 0.04647687450051308, 0.09177865087985992, 0.039699677377939224, -0.11138520389795303, -0.30332455039024353, -0.3162786066532135, 0.0681249275803566, 0.36405932903289795, -0.2316657453775406, 0.183042049407...
look at doing a little bit of meta-programming to provide a declarative way to add the relevant accessor logic. Something like :- ``` class Product < ActiveRecord::Base yes_no_accessor :recycled end ``` Another possibility is to monkey-patch `ActiveRecord`. I think the relevant method is `ActiveRecord::Connectio...
[ 0.023638151586055756, 0.025523100048303604, 0.25993838906288147, 0.03624274954199791, 0.190724179148674, -0.3094337582588196, 0.28857049345970154, 0.08170370757579803, -0.42397090792655945, -0.4618101119995117, -0.051911864429712296, 0.5089505910873413, -0.485001802444458, 0.10915934294462...
I saw that there is a **virtual()** function in PHP that will call a CGI script, but is that the best way? Can I pass any parameters to that scripts as well? I saw some examples using **`file_get_contents()`** or **include()** and passing in the URL of a CGI script, but that feels like a hack. Use **exec()** if you ca...
[ 0.4679146707057953, -0.1752653419971466, 0.4563756287097931, 0.11940427124500275, -0.14495408535003662, -0.1421738862991333, 0.15762822329998016, 0.08329197019338608, -0.36524686217308044, -0.6034429669380188, -0.06591464579105377, 0.5097479820251465, -0.40583497285842896, 0.08010340481996...
the output of the sub-request. You can pass parameters through **include()**, **file\_get\_contents()**, and **virtual()** as GET parameters: ``` http://localhost/cgi-bin/foo?param1=val1&param2=val2 ``` If possible, go the **exec()** route. Using the other methods may require a config change. When using [exec](ht...
[ 0.26835232973098755, -0.0291574839502573, 0.5037178993225098, -0.013493262231349945, -0.09938499331474304, 0.2173585593700409, 0.21863441169261932, -0.576751172542572, -0.290863960981369, -0.38431867957115173, -0.5190321207046509, 0.5754603147506714, -0.3040808439254761, -0.032697334885597...
I'm writing a PowerShell script to manipulate some Windows Installer XML (WiX). I'm using the new XML APIs in .NET 3.5 to do this, as I find it an easier API to work with than the DOM. The following script fragment is flatly refusing to work: ``` [System.Reflection.Assembly]::LoadWithPartialName("System.Xml.Linq") | O...
[ 0.22672343254089355, -0.11199366301298141, 0.6929321885108948, -0.18055298924446106, 0.10789109766483307, -0.19968146085739136, 0.38220590353012085, -0.24459651112556458, 0.03132529556751251, -0.8644015789031982, -0.016878383234143257, 0.6094603538513184, -0.31943410634994507, -0.003104038...
once this bug's been solved ;-) The XML document is a standard WiX localisation file: ``` <?xml version="1.0" encoding="utf-8" ?> <WixLocalization Culture="en-US" xmlns="http://schemas.microsoft.com/wix/2006/localization"> <String Id="0">Advertising published resource</String> <String Id="1">Allocating registry...
[ -0.25763022899627686, 0.027710625901818275, 0.4919099509716034, -0.11755554378032684, 0.15724055469036102, -0.27281633019447327, 0.3858777582645416, -0.011299388483166695, -0.22376365959644318, -0.7083757519721985, -0.44806286692619324, 0.36119958758354187, -0.39226004481315613, 0.30739852...
has been set to IEnumerator, rather than the expected IEnumerable<XElement>. Testing the IEnumerator with a single MoveNext and then a Current indicates that "Current = ", presumably $null. The weird thing is that the same technique worked in a previous script. The exact same code, but with different variable names a...
[ 0.24545173346996307, 0.06558938324451447, 0.40064823627471924, -0.16547320783138275, 0.04084936901926994, -0.013042309321463108, 0.009851401671767235, -0.18597915768623352, -0.07448546588420868, -0.34491801261901855, 0.09624846279621124, 0.5077815651893616, -0.030965371057391167, 0.3929399...
goes to Jamie Thomson for the actual code. <http://dougfinke.com/blog/index.php/2007/08/07/using-xmllinq-in-powershell/> The missing piece is to handle the namespace in the XML file. Here is the code that should work for you: ``` [System.Reflection.Assembly]::LoadWithPartialName("System.Xml.Linq") | Out-Null # Basic ...
[ -0.05816621333360672, 0.18356217443943024, 0.437012255191803, 0.0647353082895279, 0.16418403387069702, 0.0678061693906784, 0.1692729890346527, -0.46896156668663025, -0.22632959485054016, -0.16673196852207184, -0.18575450778007507, 0.2897871732711792, -0.2052542120218277, 0.0907452404499054...
In SAS, outside of a data step, what is the best way to replace a character in a macro variable with a blank? It seems that `TRANSLATE` would be a good function to use. However when using `%SYSFUNC` with this function, the parameters are not surrounded with quotes. How do you indicate a blank should be used as replace...
[ -0.018288901075720787, 0.1524055451154709, 0.30944669246673584, -0.22746364772319794, -0.021666156128048897, 0.08901267498731613, 0.034351445734500885, -0.08739140629768372, -0.048210401087999344, -0.4895031750202179, -0.3821604549884796, 0.4732514023780823, -0.20991133153438568, -0.213687...
in Carolina's post.
[ -0.2788494825363159, 0.06386759132146835, 0.09681347012519836, -0.1972675323486328, 0.4428624212741852, 0.29486072063446045, 0.30078592896461487, -0.049421750009059906, -0.38462796807289124, -0.3968439996242523, -0.04385857656598091, 0.04769096523523331, 0.03853828087449074, 0.123864166438...
I'm using the application-scoped settings to store settings that cannot change at run-time. I'm using the user-scoped settings to let individual users configure their preferences. But how should I store/control settings that are modifiable at run-time by an admin-level user that are application wide (i.e., they impact ...
[ 0.33804792165756226, 0.22901371121406555, 0.6370108127593994, 0.1224091649055481, 0.24094083905220032, -0.09685201197862625, 0.23583398759365082, -0.1221834123134613, -0.16581234335899353, -0.7481826543807983, -0.14765655994415283, 0.7743513584136963, -0.3659348785877228, -0.08152707666158...
yourself, and as others mentioned, you can use an xml serializer for that. Unfortunately, it would be up to you in this case to make it admin-only accessible - any user can write to this folder (that's really the purpose here - for common settings that can be changed). If the 'admin settings' are by convention only, ...
[ 0.5953558683395386, 0.1809939295053482, 0.20005397498607635, 0.3440222144126892, 0.15168794989585876, -0.3739337623119354, 0.09834786504507065, 0.21423320472240448, -0.034691616892814636, -0.4780758023262024, -0.3332219421863556, 0.5841997265815735, -0.10317594558000565, -0.170434355735778...
I am working on modifying a control on a existing site. All controls from the site inherit form a base class. I have a requirement to hide several links on the master page so I wrote this method on my control: ``` private void HideCartLink (bool visible) { Control control1 = Page.Master.FindControl( "link1" ); con...
[ 0.16091875731945038, -0.05020074546337128, 0.3510807752609253, -0.19946345686912537, -0.09848637878894806, -0.1329101324081421, 0.5569888353347778, -0.24286258220672607, 0.0340457558631897, -0.5768483281135559, -0.14896659553050995, 0.17699365317821503, -0.6687704920768738, 0.2739283740520...
Control control = Page.Master.FindControl( controlName ); control.Visible = visible; } ``` and added this method on my controls: ``` void CartLinkVisible(bool visible) { ////hide cart link HideMasterPageControl("link1", visible); HideMasterPageControl("link2", visible); } ``` Now I moved on to a th...
[ -0.2189473658800125, -0.2524397075176239, 0.6033927798271179, 0.06469175219535828, -0.28742581605911255, -0.1279367357492447, 0.11361859738826752, -0.17624682188034058, -0.1490492969751358, -0.49676597118377686, 0.07634217292070389, 0.3433111310005188, -0.6315214037895203, 0.32234504818916...
I'm honest, I'd be more inclined to turn this upside-down. I'd have something that *added* the buttons/links as necessary, based on the criteria of the page. This would then give you something more like a toolbar, and in fact you could make it configurable (or based on user privileges) which buttons/links appear on eac...
[ 0.7716236114501953, 0.09325481206178665, 0.06775469332933426, 0.09527747333049774, 0.2667649984359741, -0.04786129668354988, 0.18789970874786377, 0.21080242097377777, -0.4202285408973694, -0.4630720913410187, 0.15950322151184082, 0.5195418000221252, -0.05703181400895119, -0.179855912923812...
further about the about the final implementation. With only a few controls you're okay and would be making it worse by over-complicating it. You might want to consider the [Visitor pattern](http://en.wikipedia.org/wiki/Visitor_pattern), though. This would mean you implement a class that "visits" **all** the links on a...
[ 0.1778135448694229, -0.23968759179115295, 0.0945344865322113, 0.30157390236854553, 0.1098676547408104, -0.317067950963974, 0.2581472396850586, 0.19239240884780884, -0.4996010661125183, -0.7105616927146912, -0.11200226098299026, 0.4677017033100128, -0.013482385315001011, 0.07762472331523895...
**<edit>** Thanks to everyone who has answered so far. The zip and os.path.join are really helpful. Any suggestions on ways to list the counter in front, without doing something like this: ``` zip(range(len(files)), files, directories) ``` **</edit>** Hi, I'm in the process of learning Python, but I come from a ba...
[ 0.31938645243644714, 0.2079097479581833, 0.5033528208732605, -0.09823831170797348, -0.18211935460567474, -0.023040911182761192, 0.3480928838253021, -0.27171117067337036, -0.21841156482696533, -0.5217297673225403, -0.143268421292305, 0.53373122215271, -0.07271342724561691, 0.003955048043280...
would be like this: ``` directories = ['directory_0', 'directory_1', 'directory_2'] files = ['file_a', 'file_b', 'file_c'] for i in range(len(directories)): print '%s. %s/%s' % ((i + 1), directories[i], files[i] # Output: # 1. directory_0/file_a # 2. directory_1/file_b # 3. directory_2/file_c ``` While reading...
[ 0.2974047362804413, -0.040676217526197433, -0.2300727665424347, 0.1903851330280304, -0.22832489013671875, 0.1613464206457138, 0.2602713406085968, -0.43433427810668945, -0.04086322709918022, -0.5484193563461304, -0.06213788315653801, 0.23570536077022552, -0.22280171513557434, -0.15489241480...
it possible to do it a different way? If I took out the incrementing line count, is it possible to just match the two lists together using some kind of list comprehension? For example, if all I wanted from the output was this (no counters, is that possible with list comprehension): ``` # Output: # directory_0/file_...
[ 0.2149030566215515, -0.31641384959220886, 0.515356183052063, 0.0975644662976265, -0.1860055923461914, 0.026635803282260895, 0.06465194374322891, -0.33062827587127686, -0.3671647310256958, -0.6741073727607727, 0.1366296261548996, 0.5969922542572021, -0.3612632155418396, -0.06164128705859184...
list comprehension as well, creating list of string with print going after that] with counter: ``` for i, (dir, file) in enumerate(zip(directories, files)): print(i, os.path.join(dir, file)) ```
[ 0.03447616845369339, -0.18448200821876526, 0.3635484576225281, -0.10925110429525375, 0.07613607496023178, 0.18237780034542084, 0.19609330594539642, -0.40220874547958374, -0.2636236548423767, -0.5743906497955322, -0.20006966590881348, 0.6863691806793213, -0.46511828899383545, -0.28692585229...
The app was working fine but now a few weeks later when the new version begun testing, it crashes. Tried it on five of the workstations, it crashes only on two of them. And the only common about them I can find is that those two have Windows installed with English language. Its a DirectX 8.1 application, written in C+...
[ 0.2120656967163086, 0.3298592269420624, 0.23498831689357758, 0.13460853695869446, -0.04357317090034485, 0.03784986212849617, 0.4303743839263916, 0.2428431361913681, -0.27369922399520874, -0.4448758363723755, -0.08921513706445694, 0.5968673825263977, -0.3788919448852539, 0.07836449891328812...
ask if anyone have seen this before? If the language really is the problem. And how to solve it. **Edit**: The actual error message is ``` This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem. ``` At first we thought it was the Vis...
[ 0.11240140348672867, 0.30940937995910645, 0.4555080831050873, 0.14653916656970978, 0.053190551698207855, -0.06772135943174362, 0.6175945997238159, 0.015028061345219612, -0.47999319434165955, -0.503202497959137, -0.3157825171947479, 0.5981020331382751, -0.24649761617183685, 0.08489407598972...
this only affected the english workstations. Maybe it was a coincidence after all.
[ 0.24257725477218628, 0.210172638297081, 0.013382339850068092, -0.09500135481357574, -0.27887290716171265, -0.1923205405473709, 0.34301623702049255, 0.41118884086608887, -0.36201369762420654, -0.08377716690301895, -0.29855117201805115, 0.06018802896142006, 0.04170385003089905, 0.05238564312...
I want to delete every "\_svn" in every folder and subfolder... For example ``` c:\ proyect1 _svn images _svn banner _svn buttons _svn ``` Then I run something like ``` rm-recurse c:\proyect1 _svn ``` And I should get: ``` c:\ proyect1 images banner buttons...
[ 0.25232794880867004, 0.08241089433431625, 0.301288366317749, 0.16935084760189056, 0.08339420706033707, -0.07675506919622421, 0.020363401621580124, 0.16999943554401398, -0.3096314072608948, -0.6342629790306091, -0.018908390775322914, 0.2739907503128052, -0.41817405819892883, 0.0513678453862...
SVN export command, but I also want to delete the \_vti\_\* folders stuff Visual Studio creates, so I'll also explore the `for` solution. Similar to BlackTigerX's "for", I was going to suggest `for /d /r . %d in (_svn) do @if exist "%d" rd /s/q "%d"`
[ 0.11495266109704971, -0.1510734111070633, 0.2662217319011688, -0.5616121888160706, -0.13445250689983368, -0.08978693187236786, 0.2590049207210541, 0.1334228217601776, -0.046554382890462875, -0.7094534635543823, -0.297821581363678, 0.8448098301887512, -0.4682670831680298, 0.0269966218620538...
When creating a new xml file, how does one go about structuring the file correctly or the best possible way. By structure, which may not be the best word in this case, I mean how does one choose between making something an element or an attribute of an element. For example, if I create a Person.xml file which contains ...
[ 0.21631605923175812, 0.014107530005276203, -0.1303689330816269, 0.01273632887750864, -0.009045015089213848, -0.04520132765173912, -0.07667960226535797, -0.38252153992652893, -0.23036949336528778, -0.728219211101532, -0.05088219419121742, 0.1539286971092224, -0.10297761857509613, -0.0701870...