text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
to draw it yourself. I know you said you don't want to, but sometimes you have to. Thankfully a group box is a very simple control to draw. This page has an example for drawing a classic-style group box: <http://www.codeguru.com/cpp/controls/controls/groupbox/article.php/c2273/> You can also draw it very simply using t...
[ 0.5238121747970581, -0.14715665578842163, 0.04549997299909592, 0.2368851900100708, -0.16198889911174774, 0.08117538690567017, -0.09812601655721664, -0.16595718264579773, -0.270940363407135, -0.48852694034576416, 0.21566355228424072, 0.2213732749223709, -0.27996790409088135, -0.059857349842...
I want to display from cache for a long time and I want a slightly different behavior on page render vs loading the page from cache. Is there an easy way I can determine this with JavaScript? One way you could do it is to include the time the page was generated in the page and then use some javascript to compare the lo...
[ 0.5066480040550232, -0.10343721508979797, 0.3053663671016693, 0.06614699959754944, -0.2537889778614044, 0.02831157296895981, 0.16104084253311157, -0.24055373668670654, -0.2780916690826416, -1.0401512384414673, 0.4610562324523926, 0.5990363955497742, -0.0931159257888794, 0.2553485631942749,...
incorrectly, although you could get around this by making the client include its current system time in the request to generate the page and then send that value back to the client.
[ 0.36930614709854126, 0.21110793948173523, 0.35965418815612793, 0.11475471407175064, 0.009310773573815823, 0.10634436458349228, 0.36533066630363464, -0.06330054253339767, -0.23544012010097504, -0.29392051696777344, 0.13854633271694183, 0.34658005833625793, -0.18774102628231049, 0.1608920246...
I'm working on a project which stores single images and text files in one place, like a time capsule. Now, most every project can be saved as one file, like DOC, PPT, and ODF. But complete web pages *can't* -- they're saved as a separate HTML file and data folder. **I want to save a web page in a single archive, and wh...
[ 0.6573277711868286, 0.1672295480966568, 0.3063385486602783, 0.2109634280204773, -0.03117547184228897, -0.21301867067813873, 0.01865091733634472, 0.2762945592403412, -0.3290473520755768, -0.7818253636360168, -0.1836383044719696, 0.13868483901023865, 0.008113013580441475, 0.1853746920824051,...
and MHTML as its own was proposed as [rfc2557](https://www.rfc-editor.org/rfc/rfc2557). This is a great idea and it's been around forever, except it's been a "proposed standard" since 1999. Plus, implementations other than IE's are just cumbersome. IE and Opera support it; Firefox and Safari with a cumbersome extension...
[ 0.4265064001083374, -0.07390201091766357, 0.9512210488319397, -0.2782042920589447, -0.06073688343167305, -0.45852991938591003, 0.13466015458106995, -0.08176615089178085, -0.5408456921577454, -0.48824992775917053, -0.27896764874458313, 0.5302497744560242, -0.5280518531799316, 0.031103966757...
supporting it wasn't updated since Firefox 1.5. * **[Data URIs](http://en.wikipedia.org/wiki/Data_URI_scheme)** are becoming more popular. Instead of referencing an external location a la MHTML or MAF, you encode the file straight into the HTML markup as base64. Depending on your view, it's streamlined since the files ...
[ 0.2672995328903198, -0.007199659012258053, 0.4149051308631897, -0.26509520411491394, -0.03331620991230011, -0.2865651845932007, 0.11799965053796768, 0.20268391072750092, -0.3205903470516205, -0.7273942828178406, -0.33576712012290955, 0.4090586304664612, -0.5050528049468994, -0.018084462732...
`"savedpage_files"` folder. Afaik, everyone does this. It's well supported. But having to handle two separate elements is not simple and streamlined at *all*. My project needs to have them in a *single archive*. Keeping in mind **browser support** and **ease of editing the page**, **what do you think's the best way to...
[ 0.5120683908462524, 0.3021687865257263, 0.05728496238589287, -0.054968807846307755, -0.32016098499298096, -0.32112807035446167, 0.13969530165195465, 0.019004812464118004, -0.5753290057182312, -0.8468313217163086, 0.11543578654527664, 0.41539978981018066, -0.10683286935091019, -0.1711242198...
Because: * It is very well sutied for the purpose * It is well documented * There a a lot of implementations available for creating or reading them * A user can easily extract single files, change them and put them back in the archive * Almost every major Operating System (Windows, Mac and most linux) have a ZIP progr...
[ 0.20749059319496155, -0.06089905649423599, 0.18280918896198273, 0.3183106482028961, -0.21069325506687164, -0.4171046018600464, 0.37361106276512146, 0.2671612799167633, -0.24439546465873718, -0.7241073250770569, -0.09828746318817139, 0.10929196327924728, -0.2245589941740036, 0.2153786122798...
files just has far too many things that could go wrong and mess up your archive.
[ 0.5048980116844177, 0.44676151871681213, 0.005952866747975349, 0.48846954107284546, 0.2974870800971985, -0.31872424483299255, -0.004741073120385408, 0.2422700822353363, -0.3197186589241028, -0.2769903242588043, 0.1851278841495514, 0.3581191897392273, 0.011860895901918411, 0.359566867351532...
I've been developing a few JSF applications lately and am disturbed with the inconsistency in the web component APIs. I've noticed that there is extremely unpredictable behavior when calling .getValue() or .getSubmittedValue() on a JSF component object in server side code. Sometimes when I call .getValue() on a drop ...
[ 0.12844975292682648, -0.15375719964504242, 0.26737716794013977, -0.09480652213096619, -0.23921731114387512, -0.26671430468559265, 0.25674039125442505, 0.007273523136973381, -0.24010354280471802, -0.8288025856018066, -0.12212976068258286, 0.5585053563117981, -0.4669889509677887, 0.343303442...
submit(ActionEvent ae) { someMethod(name.getValue().toString()); // Retrieves the "old" value someMethod(name.getSubmittedValue().toString()); // Retrieves the correct value } ``` Also, I've noticed that calling .getSubmittedValue() on a form field sometimes results in a null pointer exception becau...
[ -0.006400305777788162, -0.0031299137044698, 0.4769490361213684, -0.14417928457260132, -0.2936484217643738, -0.06704562157392502, 0.2098788470029831, -0.6249839067459106, 0.12407112121582031, -0.7075034976005554, -0.23219561576843262, 0.5013717412948608, -0.522541880607605, -0.0199849605560...
// Retrieves the correct value someMethod(name.getSubmittedValue().toString()); // Throws NullPointerException } ``` Is this just a "quirk" of the JSF framework, or am I just using the API **COMPLETELY** incorrectly?? Any insight into these two methods would be greatly appreciated. Cheers. Since this is the #1 r...
[ 0.10488228499889374, -0.036303747445344925, 0.3865683674812317, 0.02785647101700306, -0.11560853570699692, -0.40238192677497864, 0.5518823266029358, -0.1581249088048935, -0.07742596417665482, -0.2986692488193512, -0.15301086008548737, 0.585138738155365, -0.13135577738285065, -0.15073563158...
component has not > succeeded. Once conversion and > validation has succeeded, the > (converted) value is stored in the > local "value" property of this > component, and the submitted value is > reset to null. Source: [<http://myfaces.apache.org/core11/myfaces-api/apidocs/javax/faces/component/UIInput.html#getSu...
[ 0.2248394787311554, 0.01690933294594288, 0.9121526479721069, -0.19524571299552917, -0.2667395770549774, -0.07692623138427734, 0.5962342619895935, -0.5939774513244629, -0.19542661309242249, -0.6331769824028015, -0.3001379072666168, 0.5779888033866882, -0.39396870136260986, 0.128754809498786...
count on that as changing field in your UI shouldn't break your code. You can detect if the validation/conversion has been done by just looking at what isLocalValueSet() returns. If it returns true, then the valdation/conversion has been done, so you should call getValue(). Otherwise you'll need to call getSubmittedVa...
[ 0.19136333465576172, -0.19811342656612396, 0.4550255239009857, 0.09562692791223526, -0.10839691758155823, -0.11557784676551819, 0.3367463946342468, -0.30418661236763, -0.07027629762887955, -0.731859564781189, -0.288420706987381, 0.8084911108016968, -0.18956628441810608, -0.1637246906757354...
into a Date so it can be validated. It'd be great if the JSF spec had a method which would do this for us, but AFAIK it doesn't. If certain dates need to be before other dates, and some are only required in certain circumstances, one will need to write several validators to handle this. So it can easily become an issu...
[ 0.6909206509590149, -0.04706602916121483, 0.1190100759267807, 0.10731619596481323, 0.08973187208175659, -0.43136292695999146, 0.2662303149700165, -0.09502445161342621, -0.16782701015472412, -0.20715181529521942, -0.0796661525964737, 0.06494458019733429, -0.11155063658952713, 0.220596775412...
validator could be written to throw an exception if it should be required and is not. There are some things with JSF which are just a pain; unless/until they're fixed, we just have to deal with them. To speak to the specifics of the issue in the original post: the difference here is where you're at in the life cycle. ...
[ 0.24180494248867035, -0.252841591835022, 0.45369163155555725, 0.09014444053173065, -0.2575531303882599, -0.28960591554641724, 0.29160916805267334, -0.51612788438797, 0.03635842725634575, -0.36599111557006836, -0.0547516830265522, 0.5483933091163635, 0.10532727092504501, -0.1137784570455551...
validation. If you're going to program in JSF, you should learn and understand the life cycle. It's worth the time.
[ 0.7354682683944702, 0.1681477427482605, -0.17562270164489746, 0.445308119058609, -0.014796347357332706, -0.053713358938694, 0.26934269070625305, 0.23905354738235474, 0.033071838319301605, -0.29378053545951843, 0.32541078329086304, 0.17203275859355927, 0.5412167906761169, -0.367158770561218...
I'm not a designer, so I'm looking for some free WPF themes. Any suggestions? The only one that I have found (for sale) is [reuxables](http://www.nukeation.com/reuxables.aspx). A little pricey, if you ask me, but you do get 9 themes/61 variations. ### UPDATE 1: A WPF Contrib project ... which does have 1 [theme](htt...
[ 0.42757150530815125, -0.1451810747385025, 0.473910391330719, -0.06841720640659332, -0.36711305379867554, -0.04765130206942558, 0.033653561025857925, -0.3080894351005554, -0.7665188312530518, -0.5589333772659302, -0.20384865999221802, -0.018578553572297096, -0.2157040238380432, 0.3404247462...
incorporated some free [themes](http://wpf.codeplex.com/wikipage?title=WPF%20Themes&referringTitle=Home), in particular, the themes from the Silverlight Toolkit. Rudi's [project](http://wpfthemes.codeplex.com/) goes a little further and adds several more ... but depending on your situation, the WPF Toolkit might be all...
[ 0.6240069270133972, -0.032804328948259354, 0.3148833215236664, 0.07100503891706467, -0.017977217212319374, -0.30047500133514404, 0.09412983059883118, -0.3443295359611511, -0.5882837176322937, -0.44687843322753906, -0.2004040628671646, -0.14082156121730804, -0.1984027475118637, 0.1507509350...
I'm using jQuery and wanting to target the nth <li> in a list after clicking the nth link. ``` <ul id="targetedArea"> <li></li> <li></li> <li></li> <li></li> </ul> <div id="clickedItems"> <a></a> <a></a> <a></a> <a></a> </div> ``` I can target them individually, but I know there must be a faster way ...
[ 0.2459685355424881, 0.18821829557418823, 0.5374448895454407, -0.3132688105106354, -0.36122721433639526, 0.03963981941342354, 0.012958751060068607, -0.241437628865242, -0.0035959300585091114, -0.8307890892028809, -0.0733988881111145, 0.33512550592422485, -0.5009053945541382, -0.052113883197...
1:1 relationship between your `<a>` and `<li>` elements it will update the appropriate `<li>`
[ 0.06814564764499664, 0.0734039843082428, 0.35566580295562744, -0.17591911554336548, 0.06583885103464127, -0.08984334766864777, -0.14957836270332336, -0.15371793508529663, 0.20904459059238434, -0.39463409781455994, -0.13890820741653442, 0.3911435604095459, -0.4632841944694519, -0.2727023959...
I've created a Visual Basic WPF Application project that contains Toy.edmx, an ADO.NET Entity Data Model generated from a database called Toy. Its *Window1.xaml.vb* file looks like this: ``` 1 Class Window1 2 3 Private Sub Window1_Loaded( _ 4 ByVal sender As System.Object, _ 5 ByVal e As Syste...
[ 0.5142709016799927, -0.20034486055374146, 0.5772173404693604, 0.15157963335514069, 0.07050711661577225, 0.02993326634168625, -0.40897706151008606, 0.1008431613445282, -0.1542128175497055, -0.5035377740859985, 0.01605597510933876, 0.2348136305809021, -0.38270139694213867, 0.5442661643028259...
Label1.Content = (From c As Client In dc.ClientSet _ 10 Select c).First.FirstName 11 12 End Sub 13 14 End Class ``` That runs just fine. But, if I add the file *Client.vb*... ``` 1 Partial Public Class Client 2 Function IsWashington() As Boolean 3 Return Me.La...
[ 0.3381948173046112, -0.12117445468902588, 0.6240214109420776, -0.012019820511341095, -0.043792832642793655, -0.1857123076915741, 0.2613455653190613, -0.3177163898944855, -0.19454386830329895, -0.4076349139213562, -0.03401954844594002, 0.626735270023346, -0.33842095732688904, 0.331627428531...
Function 5 End Class ``` ...and add a WHERE clause to my *Window1.xaml.vb* query... ``` 9 Label1.Content = (From c As Client In dc.ClientSet _ 10 Where c.IsWashington _ 11 Select c).First.FirstName ``` ...then I get this NotSupportedException: > L...
[ 0.03513689339160919, 0.0669415220618248, 0.7622929215431213, 0.002213734434917569, 0.23234830796718597, -0.24209558963775635, 0.11367987096309662, -0.19155552983283997, -0.026306981220841408, -0.3602449893951416, -0.325214147567749, 0.6231026649475098, 0.03071925975382328, 0.44355711340904...
recognize the method 'Boolean IsWashington()' method, and this method cannot be translated into a store expression. How do I extend ADO.NET Entity Framework objects with partial classes? The problem is that you're writing code, and expecting the Entity Framework to translate that into SQL... it can't do that. Just lik...
[ 0.08983712643384933, 0.14996950328350067, -0.0013919709017500281, 0.10495255887508392, -0.03662809729576111, -0.2862372100353241, 0.2677348554134369, -0.2611890435218811, 0.07118576020002365, -0.4550497829914093, 0.1592072993516922, 0.4721856415271759, -0.33613771200180054, 0.1908999681472...
A little example ``` TTest<T> = class private f : T; public function ToString : string; end; ``` If is an object then this should work ``` TTest<T>.ToString; begin Result := f.ToString; end; ``` But what happens when is say an integer? This would be ok in .net. of course. I know it won't work, but how do I...
[ 0.2160063534975052, -0.1708570420742035, 0.4124961495399475, -0.041750796139240265, 0.07021766901016235, -0.10799852758646011, 0.5228747725486755, -0.16512411832809448, -0.056133512407541275, -0.5195398330688477, -0.016679728403687477, 0.7392148375511169, -0.39285653829574585, 0.1045240536...
to show, since TObject.ToString is an instance method, not a class method, so T.ToString would not work even for TObject). 1. Delphi does not have a rooted type system, and there are very few operations that are common to all types. These operations - copying, assignment, creating locations (fields, locals, parameters...
[ -0.20381362736225128, -0.2179451286792755, -0.09226249158382416, 0.03561999276280403, -0.09258562326431274, -0.3534160256385803, 0.11197321116924286, -0.11463085561990738, -0.018898969516158104, -0.28630346059799194, -0.11006636917591095, 0.3935185968875885, -0.6604906916618347, -0.1082309...
part of the reason is that the design was originally intended to maximize compatibility with .NET and dccil, so things that .NET generics did not permit did not have significant affordances in the Win32 generics design. 3. The second justification for the design is that check-only-at-instantiation-time is problematic. ...
[ 0.09460995346307755, -0.2042565643787384, -0.32791242003440857, 0.09088598936796188, -0.19469712674617767, -0.4899955093860626, 0.5263246893882751, 0.02912699431180954, -0.07723014801740646, -0.3078426122665405, -0.07646925747394562, 0.2665937542915344, -0.7840295433998108, 0.2273090481758...
the problem. In fact, it's so bad that C++ is itself rectifying this fault in the form of C++ 0x Concepts. Hopefully you now understand why operations that aren't guaranteed to be available via constraints cannot be used. However, you can get out of this restriction relatively easily, by providing the operation in the...
[ -0.1389351189136505, -0.01362205483019352, 0.17717565596103668, 0.181997150182724, 0.04823434725403786, -0.256873220205307, 0.1341681331396103, -0.11316211521625519, -0.32615533471107483, -0.28545185923576355, -0.3348467946052551, 0.8768942356109619, -0.48791414499282837, 0.017465427517890...
available. If it went along type class lines, then type inference may proceed in that fashion too.
[ -0.0473291352391243, -0.2886257767677307, -0.039425455033779144, 0.30039218068122864, -0.10845712572336197, 0.010808858089148998, -0.09571124613285065, 0.09628269821405411, -0.18142716586589813, -0.4282083213329315, -0.33821025490760803, 0.4557047188282013, -0.29029402136802673, -0.1050881...
I'm writing a simple C++ class in which I would like cache picture thumbnails versions of images downloaded from the web. As such, I would like to use a hash function which takes in URL strings and outputs a unique string suitable as a filename. Is there a simple way to do this without re-writing the function myself? ...
[ 0.4872768223285675, 0.28245818614959717, -0.047752995043992996, 0.07603945583105087, -0.0995144248008728, -0.2064523547887802, 0.09711480885744095, -0.12156738340854645, -0.07776368409395218, -0.5104362368583679, 0.11246488988399506, 0.4235082268714905, -0.5067806839942932, 0.0932190939784...
*str) { char *safe = strdup(str); for (int i = 0; i < strlen(str); i++) { if (isalpha(str[i])) safe[i] = str[i]; else safe[i] = '_'; } } ```
[ 0.045023854821920395, 0.029289456084370613, 0.3371935486793518, -0.5558894276618958, 0.06570946425199509, 0.27443814277648926, 0.7956541776657104, -0.8636149764060974, 0.049188096076250076, -0.18365073204040527, -0.4238719344139099, 0.6710363626480103, -0.3656448721885681, 0.09328320622444...
From a programmer stuck in the web world... What are the most common desktop development "frameworks" currently being used for desktop application development? 1. Is it realistic to write desktop software for both Windows and OS X? 2. Is it realistic to use the same base code to write the business/data layers for an ...
[ 0.4545973837375641, 0.08473050594329834, -0.05993936210870743, 0.3612936735153198, 0.05668990686535835, 0.10005366802215576, 0.10085698217153549, -0.1750410795211792, -0.21460701525211334, -0.7625045776367188, -0.06836998462677002, 0.5897012948989868, -0.260030597448349, -0.193406313657760...
the desktop or web UI model. If you went down the .NET root, you could use Silverlight for the web app, .NET server code for the backend and even Mono to enable you to develop for OS X. If you took the Java route, Java runs within the browser, there is JavaFX coming soon that is a small flash-like version for browser...
[ 0.41780588030815125, -0.01410156674683094, 0.3656212091445923, 0.09720594435930252, -0.17610494792461395, -0.12701256573200226, 0.04446783661842346, 0.1667121797800064, -0.2618480324745178, -1.1005467176437378, -0.09981813281774521, 0.5953492522239685, -0.2932504713535309, -0.0119325332343...
Java, PHP etc all work fine as the backend though. **Edit** At MrJeepster's request, here are details on interfacing an AIR frontend and .NET backend: There are two ways you can interface AIR to a .NET backend: the DIY way and the remoting way. The DIY way would involve defining your own (probably XML) data form...
[ 0.40372127294540405, -0.0544818639755249, 0.5181999802589417, 0.2928529977798462, -0.5065514445304871, -0.2795855402946472, 0.2794021964073181, -0.290974885225296, -0.08529103547334671, -0.675184965133667, -0.3726733922958374, 0.5149664878845215, -0.31821930408477783, -0.17347584664821625,...
<http://www.fluorinefx.com/> Remoting involves sharing objects between the client and server. So you create some object on the AIR client, get the remoting framework to serialise it, transfer it to the server and deserialise it into a .NET object. The server then processes it and sends it, or a new object, back again...
[ 0.6786431074142456, -0.18348850309848785, 0.5307345390319824, 0.22236649692058563, -0.05531419813632965, -0.04877861589193344, -0.0018039561109617352, 0.03162948787212372, -0.36290794610977173, -0.3112196624279022, -0.1995934545993805, 0.037030234932899475, -0.39708825945854187, 0.35457736...
I have a file and I don't know how big it's going to be (it could be quite large, but the size will vary greatly). I want to search the last 10 lines or so to see if any of them match a string. I need to do this as quickly and efficiently as possible and was wondering if there's anything better than: ``` s = "foo" las...
[ 0.5751848220825195, 0.1884208470582962, 0.740374743938446, -0.21505874395370483, 0.5316767692565918, -0.2521275281906128, 0.19714857637882233, -0.15825104713439941, -0.14037829637527466, -0.7130410075187683, -0.13600106537342072, 0.640191912651062, -0.24042923748493195, 0.00581165775656700...
# String to find fname = "g:/autoIt/ActiveWin.log_2" # File to check with open(fname, "r") as f: f.seek (0, 2) # Seek @ EOF fsize = f.tell() # Get Size f.seek (max (fsize-1024, 0), 0) # Set pos @ last n chars lines = f.readlines() # Read to end lines = lines[-10:]
[ 0.026353519409894943, -0.35863858461380005, 0.707218587398529, -0.21222427487373352, 0.20852938294410706, 0.19524653255939484, 0.3763335049152374, -0.35143792629241943, -0.07267778366804123, -0.6221813559532166, -0.2635263502597809, 0.6151546835899353, -0.3288620114326477, -0.0867098346352...
# Get last 10 lines # This returns True if any line is exactly find_str + "\n" print find_str + "\n" in lines # If you're searching for a substring for line in lines: if find_str in line: print True break ```
[ -0.18803127110004425, -0.33058157563209534, 0.6602081656455994, -0.14021195471286774, 0.029719656333327293, 0.1839137077331543, 0.612276017665863, -0.15751412510871887, -0.25723129510879517, -0.5680051445960999, -0.6442772150039673, 0.2569005787372589, -0.2889319658279419, -0.3471947908401...
I need to take production data with real customer info (names, address, phone numbers, etc) and move it into a dev environment, but I'd like to remove any semblance of *real* customer info. Some of the answers to [this question](https://stackoverflow.com/questions/157600/data-generators-for-sql-server) can help me gen...
[ 0.5366402268409729, 0.44324758648872375, 0.13078036904335022, 0.18282917141914368, -0.001861870288848877, 0.10117150098085403, 0.15432602167129517, -0.15969766676425934, -0.2080278992652893, -0.5119857788085938, 0.05116855725646019, 0.3368748426437378, -0.2692222595214844, 0.36081844568252...
be tricky and if not done correctly can lead you to trouble, like what happened to [AOL when they released search data a while back](http://en.wikipedia.org/wiki/AOL_search_data_scandal). I would attempt to create test data from scratch at all costs before I tried to convert existing customer data. Things may lead you ...
[ 0.5670972466468811, 0.042975109070539474, -0.05004596710205078, 0.31446585059165955, 0.1908595860004425, -0.2867569327354431, 0.2982602119445801, 0.00012533766857814044, -0.02739705517888069, -0.09201811999082565, 0.22076469659805298, 0.5028377771377563, -0.12840701639652252, 0.17485153675...
How does an application perform a proximity search? For example, a user types in a postal code, then the application lists all the businesses within 20 miles ordered by proximity. I want to build something like that in PHP and MySQL. Is this approach correct? 1. Get the addresses for locations I'm interested in and s...
[ 0.19457758963108063, 0.22936725616455078, 0.6297500729560852, 0.11111736297607422, 0.3485991060733795, -0.10395178943872452, -0.08094792068004608, -0.24174880981445312, 0.06749890744686127, -0.6668001413345337, 0.11819658428430557, 0.418395072221756, -0.31094682216644287, -0.12001404166221...
PROXIMITY table that lists the distance between every business and a few reference locations? If there are enough records for speed to matter, here's a way to index them ahead of time. Define a grid of bins about 20 miles on a side. Store the bin number with each store's record. At search time, compute the numbers of ...
[ 0.3256851136684418, 0.043956298381090164, 0.645071268081665, 0.3434063792228699, 0.29640963673591614, -0.03789032995700836, 0.041809048503637314, -0.2640809416770935, 0.0025722752325236797, -0.8083323836326599, 0.2536409795284271, 0.2732510566711426, -0.03038792498409748, 0.322339624166488...
I have a base class with an optional virtual function ``` class Base { virtual void OnlyImplementThisSometimes(int x) {} }; ``` When I compile this I get a warning about the unused param x. Is there some other way I should have implemented the virtual function? I have re-written it like this: ``` class Base { ...
[ 0.051476750522851944, 0.0379708856344223, 0.14947174489498138, -0.06168825551867485, 0.108717180788517, 0.03810906410217285, 0.5189991593360901, -0.16181468963623047, -0.18992583453655243, -0.33788713812828064, 0.03386508673429489, 0.5434698462486267, -0.5194870829582214, 0.011955943889915...
notice because of overloading: e.g. ``` class Derived : public Base { void OnlyImplementThisSometimes(int x, int y) { // some code } }; Derived d; Base *b = dynamic_cast<Base *>(&d); b->OnlyImplementThisSometimes(x); // calls the method in the base class ``` The base class method was called because I implemente...
[ 0.2697899341583252, 0.00898898858577013, 0.03781353309750557, -0.20209603011608124, 0.01013448927551508, -0.21681010723114014, 0.48601239919662476, -0.2448716163635254, -0.02059025689959526, -0.1254270374774933, -0.22985298931598663, 0.5111556053161621, -0.5564072132110596, 0.2948324382305...
wrong method signature when trying to override the virtual function is just something you need to be careful about in C++. Languages like C# get around this with the 'override' keyword.
[ 0.16677387058734894, -0.054140638560056686, 0.17479506134986877, 0.10350267589092255, -0.007495006546378136, -0.5311657786369324, 0.5387885570526123, 0.14894825220108032, -0.09273949265480042, -0.27600017189979553, -0.08368493616580963, 0.357244074344635, -0.46043720841407776, 0.1168927848...
I have a C program with an embedded Perl interpreter. I want to be able to precompile some Perl code from within the program. How do I do that? Rationale (if anyone is interested) is to be able to compile it once, store the parse tree, and execute many times (as long as the compiled code does not change). Thanks! Mad...
[ 0.6634852290153503, 0.033475425094366074, 0.15589508414268494, 0.07848253846168518, -0.0757649689912796, 0.1276949942111969, 0.26413029432296753, -0.08388016372919083, -0.2690754532814026, -0.26099318265914917, 0.034244097769260406, 0.3866319954395294, -0.42375457286834717, 0.2967450618743...
you can use perl\_run() and call\_argv() over and over with the same parsed Perl program.
[ 0.2596055269241333, -0.1374559849500656, 0.19543807208538055, -0.18417304754257202, -0.2464875876903534, 0.04500965029001236, 0.20751452445983887, -0.07377316802740097, -0.2456420212984085, -0.3615663945674896, -0.023807264864444733, 0.6255014538764954, -0.6953349113464355, 0.0267840325832...
I have an Access form where each record has some info that is computed on the fly. I'm using the Form\_Current() event; each time a record is selected, I compute some information and change some form controls to reflect it, based on the record's ID. I want to print a bunch of these records. However, in this situation ...
[ 0.4816223382949829, 0.01833442412316799, 0.2874893248081207, 0.2633655071258545, 0.34263888001441956, -0.04959557205438614, -0.2656046748161316, -0.1841900646686554, -0.38215261697769165, -0.410849392414093, 0.2465398609638214, 0.6029646396636963, -0.342436283826828, 0.3135104477405548, ...
We've been fighting with [HAProxy](http://haproxy.1wt.eu/) for a few days now in Amazon EC2; the experience has so far been great, but we're stuck on squeezing more performance out of the software load balancer. We're not exactly Linux networking whizzes (we're a .NET shop, normally), but we've so far held our own, att...
[ 0.3611745238304138, -0.034734997898340225, 0.5985147953033447, -0.06956467032432556, -0.18609748780727386, -0.11707679182291031, 0.015252672135829926, -0.0128222880885005, -0.06011737510561943, -0.3265748620033264, 0.09972422569990158, 0.643913745880127, 0.10851874202489853, 0.085018344223...
Overflow podcast, in which the Reddit founders note that their entire site runs off one HAProxy node, and that it so far hasn't become a bottleneck. Ack! Either there's somehow not seeing that many concurrent requests, we're doing something horribly wrong, or the shared nature of EC2 is limiting the network stack of th...
[ 0.15656569600105286, -0.015403137542307377, 0.4028739929199219, 0.22472533583641052, -0.22090205550193787, -0.17188780009746552, 0.2230246514081955, 0.3023798167705536, -0.2996332347393036, -0.3776176869869232, -0.049548763781785965, 0.47158998250961304, -0.3026285469532013, 0.069495014846...
was not, in fact, with the load balancer node! The culprit was actually the nodes running httperf, in this instance. As httperf builds and tears down a socket for each request, it spends a good amount of CPU time in the kernel. As we bumped the request rate higher, the TCP FIN TTL (being 60s by default) was keeping soc...
[ 0.04829136282205582, -0.1569286435842514, 0.49619001150131226, 0.09545563906431198, -0.11379807442426682, -0.10983376950025558, 0.31757888197898865, 0.2284494787454605, -0.2733531594276428, -0.5224035382270813, -0.10626058280467987, 0.4635566771030426, -0.24752163887023926, 0.4048429727554...
errored-out at this stage, yielding low request/sec numbers and a large amount of errors. We also had looked at nginx, but We've been working with RighScale, and they've got drop-in scripts for HAProxy. Oh, and we've got too tight a deadline [of course] to switch out components unless it proves absolutely necessary. ...
[ 0.19682900607585907, -0.19058309495449066, 0.1869734227657318, 0.10619097203016281, 0.08012410253286362, -0.10026421397924423, 0.16033805906772614, 0.08981720358133316, -0.23301613330841064, -0.3437536954879761, -0.005105352494865656, 0.4333644509315491, -0.21803778409957886, 0.12435732781...
nginx and pound both have good reputations as load-balancers. Wordpress just [switched to nginx](http://barry.wordpress.com/2008/04/28/load-balancer-update/) with good results. But more specifically, to debug your problem. If you aren't seeing 100% cpu usage (including I/O wait), then you are network bound, yes. EC2 i...
[ -0.005902688484638929, -0.1649048924446106, 0.20115895569324493, -0.1662389039993286, -0.3050757646560669, 0.014484545215964317, 0.13843701779842377, -0.05124024301767349, -0.33588719367980957, -0.44836753606796265, 0.042381253093481064, 0.652413010597229, -0.3444574773311615, 0.1115359738...
Disclaimer: the following is a sin against XML. That's why I'm trying to change it with XSLT :) My XML currently looks like this: ``` <root> <object name="blarg" property1="shablarg" property2="werg".../> <object name="yetanotherobject" .../> </root> ``` Yes, I'm putting all the textual data in attributes. ...
[ 0.13370494544506073, 0.40019145607948303, 0.5176278352737427, 0.02147800102829933, -0.22869858145713806, -0.326425701379776, 0.2407263070344925, -0.1779571771621704, 0.04913851246237755, -0.6529672145843506, -0.035090599209070206, 0.44124940037727356, -0.004218303598463535, 0.2669979631900...
... </object> </root> ``` I've actually got all of this working so far, with the exception that my sins against XML have been more... exceptional. Some of the tags look like this: ``` <object description = "This is the first line This is the third line. That second line full of whitespace is meaningful"/> ```...
[ 0.31486308574676514, 0.1692105531692505, 0.3818681538105011, -0.06586183607578278, -0.061570145189762115, -0.2070891559123993, 0.45063865184783936, -0.09735805541276932, -0.03190900385379791, -0.6930117011070251, -0.15000192821025848, 0.3266318142414093, -0.38203907012939453, -0.0975648835...
above gets changed to: ``` This is the first line This is the third line. That second line full of whitespace is meaningful ``` So the question is, can I preserve the attribute whitespace? This is actually a raw XML parsing problem, not something XSLT can help you with. An XML parse must convert the newlines in th...
[ 0.3459188938140869, 0.15327188372612, 0.35041165351867676, 0.011657965369522572, -0.09656631201505661, -0.06864696741104126, 0.1839791238307953, -0.2548529803752899, -0.05133765935897827, -0.7800891399383545, -0.1945781707763672, 0.44068074226379395, -0.28655725717544556, 0.109752342104911...
#10; character references, as long as you haven't also got newlines where charrefs are disallowed, such as inside tag bodies. Charrefs should survive as control characters through to the attribute value, where you can then turn them into text nodes.
[ -0.13630636036396027, -0.1508118063211441, 0.6463939547538757, 0.022535432130098343, -0.046086385846138, 0.30299127101898193, 0.2683277726173401, 0.1999923288822174, -0.2355356216430664, -0.45704543590545654, -0.4865722954273224, 0.31004711985588074, -0.1176910400390625, -0.040956702083349...
I'd like to set up a large linear programming model to solve an interesting problem. I would be most comfortable in Java. What tools/libraries are available? I used [lp\_solve](http://lpsolve.sourceforge.net/5.5/) with success. It looks like there is a native Java API, but I've only used the text file interface. It sup...
[ 0.021021632477641106, 0.022578908130526543, 0.25105538964271545, -0.1364077925682068, 0.08612902462482452, 0.06291349977254868, -0.2444990873336792, 0.0009764437563717365, -0.375583678483963, -0.7295940518379211, 0.01375811081379652, 0.4972771406173706, -0.3080929219722748, -0.151702955365...
When hosting a WCF service on IIS you have an option of manually configuring the endpoint or declaratively by means of WebServiceHostFactory. It doesn't seem to be that difficult to manually create the endpoint so I figured I would ask. * What are the benefits of using WebServiceHostFactory? * Are there any performanc...
[ 0.22105838358402252, -0.031245559453964233, 0.6370698809623718, -0.1251608431339264, -0.38192224502563477, -0.39363762736320496, 0.2694210410118103, -0.1923333704471588, -0.05083230882883072, -1.0713567733764648, -0.18591196835041046, 0.36688432097435, -0.33375948667526245, 0.1625996232032...
you are already using a ServiceHostFactory - simply the default one shipped with WCF. You can write your own factory if you want, and I've done this in the past to create a factory that **only** listens on https (I had an issues on a farm hosting multiple sites, where it couldn't identify the correct site for http, but...
[ 0.7506322264671326, 0.11245141923427582, 0.19332383573055267, -0.23383916914463043, -0.09039846807718277, 0.11029169708490372, 0.5279824137687683, -0.08746565133333206, -0.3027954399585724, -0.8405658006668091, -0.08977262675762177, 0.7979376316070557, -0.34229686856269836, 0.1817896962165...
(for example) a windows service. IIS is fine for some things, but app-pools get recycled, so aren't ideal for a server that needs to retain long-lived state. IIS has the advantage of being much easier to configure, especially with security (SSL etc) and compression.
[ -0.12264905869960785, -0.15463705360889435, 0.19979798793792725, 0.16972047090530396, -0.05538218468427658, -0.37626320123672485, 0.22361183166503906, -0.06773888319730759, -0.26241907477378845, -0.9385983347892761, -0.36447933316230774, 0.2286640852689743, -0.1744871884584427, 0.192914903...
I'm running my C++ program in gdb. I'm not real experienced with gdb, but I'm getting messages like: ``` warning: HEAP[test.exe]: warning: Heap block at 064EA560 modified at 064EA569 past requested size of 1 ``` How can I track down where this is happening at? Viewing the memory doesn't give me any clues. Thanks! S...
[ 0.05519770458340645, 0.34468182921409607, -0.18459007143974304, -0.004673208575695753, -0.1524088978767395, -0.3782114088535309, 0.5607010722160339, 0.1591070145368576, -0.3843831419944763, -0.5340344905853271, -0.1423269659280777, 0.23260655999183655, -0.31116804480552673, -0.017155803740...
assume it has to do with something you're putting on the heap so pay special attention to variables (I think you can use print in GDB to determine it's memory address and that may be able to sync you with where your erroring out). You should also remember that entering functions and returning from functions play with t...
[ 0.046295519918203354, -0.18122203648090363, -0.0494941808283329, 0.1495113968849182, 0.0052505373023450375, -0.31339403986930847, 0.3577278256416321, 0.18083804845809937, -0.16569209098815918, -0.4410903751850128, 0.07399788498878479, 0.6580039262771606, -0.3168571889400482, 0.043948706239...
I am having a problem getting a list of fields from a query defined at run time by the users of my program. I let my users enter a SQL query into a memo control and then I want to let them go through the fields that will return and do such things as format the output, sum column values and so forth. So, I have to get t...
[ 0.4965277910232544, 0.2255827635526657, 0.1364177167415619, 0.1128801479935646, -0.028464118018746376, 0.0801277831196785, -0.031516823917627335, -0.1603732854127884, -0.202436164021492, -0.5142737030982971, 0.2407333105802536, 0.4544464945793152, -0.45644837617874146, 0.15880420804023743,...
the query. So, if I want to set the parameters to null, I have to know what the parameter's datatype is. I am using Delphi 2006. I connect to a Firebird 2.1 database using the DBExpress component TSQLConnection and TSQLQuery. Previously, I was successful using: for i := 0 to Qry.Params.Count - 1 do Qry.Params[i].valu...
[ -0.2874152660369873, -0.05058201774954796, 0.6688631772994995, -0.16391393542289734, -0.2265796959400177, 0.06613442301750183, 0.12206956744194031, -0.14270393550395966, -0.3605768084526062, -0.31434309482574463, 0.12127699702978134, 0.2419760823249817, -0.4909443259239197, 0.3505881428718...
so I was getting acceptable results (no records) was working okay. I only need a list of the fields. Maybe I should just parse the SELECT clause of the SQL statement. I thought setting Qry.Prepared to True would get me a list of the fields but no such luck. It wants values for the parameters. If you have an idea, I ...
[ 0.6098639369010925, 0.12556017935276031, 0.1677691489458084, 0.21681398153305054, -0.3278293311595917, 0.2171047478914261, 0.5165389180183411, -0.033263374119997025, -0.2236931324005127, -0.1917399764060974, 0.27700525522232056, 0.4947150647640228, -0.07572886347770691, 0.16131222248077393...
the query to know or derive the datatype of the param given that you are not even selecting the field that it operates against. So I think your query setup and user input method will need more attention. I've just looked up how I did this a while ago. I do not use a parameterised query - I just get the "parameter valu...
[ 0.3221074342727661, -0.12460510432720184, 0.4664696753025055, 0.11050522327423096, -0.15254181623458862, 0.3469833731651306, -0.05458774417638779, -0.5212509036064148, 0.0003401394351385534, -0.4353169798851013, 0.13961604237556458, 0.4041663408279419, -0.33172154426574707, 0.2595947086811...
> '01/01/2008' therefore no parameter type knowledge is necessary. Does not stop your users entering garbage but that goes back to input control :)
[ -0.09888806939125061, 0.00580664211884141, 0.28392666578292847, 0.1273784041404724, -0.21799351274967194, -0.2926248610019684, 0.31780779361724854, -0.1136043518781662, 0.010170506313443184, -0.3844310939311981, -0.09844101965427399, 0.4553913176059723, -0.2683534622192383, 0.1122233942151...
How have you explained nested arrays to a programmer. I'm thinking someone that has an entry level understanding of programming, but is trying to do more complicated coding. The array with array works, but they can't quite get their mind around the idea. **Edit:** example of a nested array: ``` array( 'array1' =...
[ 0.16977474093437195, 0.02352551370859146, -0.24340052902698517, -0.1319124549627304, -0.02921985648572445, -0.0253048837184906, 0.18995040655136108, -0.4132080674171448, -0.11852406710386276, -0.6685440540313721, -0.2178211510181427, 0.2886955142021179, -0.5053638815879822, -0.119026839733...
'key2' => 'val2', ), ); ``` Of course, they are usually more complicated than this and maybe that's the problem. Tell them to think of an array as a list- it helps to give them something less abstract, like a grocery list. Then, a nested array is simply a list of lists. Maybe I have a todo list, a grocery list,...
[ 0.36098241806030273, 0.024460697546601295, 0.1333942413330078, 0.0023047365248203278, -0.09322737157344818, 0.040408920496702194, 0.19662627577781677, -0.13845711946487427, -0.6068962216377258, -0.7505457997322083, -0.0902106910943985, 0.2898526191711426, -0.24379485845565796, 0.0654604434...
Please advise how to scrape AJAX pages. **Overview:** All screen scraping first requires manual review of the page you want to extract resources from. When dealing with AJAX you usually just need to analyze a bit more than just simply the HTML. When dealing with AJAX this just means that the value you want is not in...
[ 0.13525858521461487, 0.08249028027057648, 0.1525179147720337, 0.15161700546741486, -0.3936450779438019, -0.26768845319747925, -0.07738173007965088, 0.09697284549474716, -0.24953383207321167, -1.0174118280410767, 0.12282464653253555, 0.7445269823074341, 0.2677820324897766, -0.24794417619705...
the start. --- **Example:** Take this as an example, assume the page you want to scrape from has the following script: ``` <script type="text/javascript"> function ajaxFunction() { var xmlHttp; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try ...
[ -0.07126154005527496, -0.16112804412841797, 0.49064400792121887, -0.21494261920452118, -0.02562873251736164, -0.11541908234357834, 0.03376040980219841, -0.1453530639410019, -0.16352497041225433, -1.0392428636550903, -0.22675296664237976, 0.4070601463317871, -0.41338562965393066, -0.0699579...
alert("Your browser does not support AJAX!"); return false; } } } xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) { document.myForm.time.value=xmlHttp.responseText; } } xmlHttp.open("GET","time.asp",true); xmlHttp.send(null); } </script> ``` Th...
[ 0.1273822784423828, -0.20549343526363373, 0.3286794424057007, -0.17847779393196106, -0.1830161064863205, -0.12976385653018951, 0.45062118768692017, -0.07677504420280457, -0.15625859797000885, -0.8572463989257812, -0.45649558305740356, 0.6602470874786377, -0.2626907229423523, -0.08349823951...
also consider using the firefox javascript engine [SpiderMonkey](http://www.mozilla.org/js/spidermonkey/) to execute the javascript on a page. **Advanced scraping with Java:** For complex usage, and if you're using Java you could also consider using the firefox javascript engine for Java [Rhino](http://www.mozilla.o...
[ 0.2995305061340332, 0.11205136030912399, 0.15847574174404144, -0.04295232892036438, -0.14234963059425354, -0.054298318922519684, 0.13692143559455872, -0.12280955910682678, -0.3855695128440857, -0.9149677157402039, 0.01620168425142765, 0.49539822340011597, -0.5142679214477539, -0.2519792020...
I'm tasked with replicating a production environment to create many test/sit environments. One of the things I need to do is build up Perl, with all the modules which have been installed (including internal and external modules) over the years. I could just use CPAN.pm autobundle, but this will result in the test envi...
[ 0.6107885837554932, 0.09366410225629807, 0.23601502180099487, 0.014360631816089153, -0.012433855794370174, 0.08822838217020035, -0.048242632299661636, -0.005362130235880613, -0.5280812382698059, -0.3279741704463959, 0.06678241491317749, 0.31272679567337036, -0.06865579634904861, 0.09690655...
help you do that. The CPAN tools only install the latest version of any distribution because PAUSE only indexes the latest version. However, you can create your own, private CPAN that has exactly the distributions that you want. Once you have your own CPAN mirror with only what you want, you point your CPAN tools at o...
[ 0.5371848344802856, 0.09721106290817261, 0.2199694812297821, 0.44790345430374146, 0.19939430058002472, -0.2552604079246521, 0.1602461189031601, 0.24069029092788696, -0.34058770537376404, -0.6631043553352356, 0.27693799138069153, 0.7637189626693726, -0.31494787335395813, 0.05456480383872986...
check out any version of the mirror that you like. Tools such as CPAN::Mini::Inject can help you set up your own CPAN. Check out [my talks on Slideshare](http://www.slideshare.net/brian_d_foy) for the basic examples, and some of [my videos on Vimeo](http://vimeo.com/user493904/videos) for some of the demonstrations. ...
[ 0.3742124140262604, -0.17249587178230286, 0.34700480103492737, 0.03646064177155495, -0.49437016248703003, -0.013055827468633652, 0.32703089714050293, 0.10904642194509506, -0.3669324815273285, -0.49164655804634094, 0.2463812679052353, 0.42871904373168945, -0.04848462715744972, 0.04366612061...
structure and index files that you need. You run dpan, you get a URL to point your CPAN client toward, and off you go. It's part of my MyCPAN-Indexer project, which is in [Github](http://github.com/briandfoy/mycpan-indexer/tree/master). It's not quite ready for unsupervised public use because I mostly work with corpora...
[ 0.3830300569534302, 0.14036709070205688, 0.3913252651691437, 0.008508613333106041, -0.03342090919613838, -0.3678593337535858, -0.3430527448654175, 0.08066121488809586, -0.5172345042228699, -0.6229715943336487, 0.3134790360927582, -0.0008528558537364006, -0.06326963007450104, 0.218758359551...
My question is how do I configure an EJB 3.0 style message driven bean to use a configured JMS datasource in jboss. For example, my MDB looks something like: ``` @MessageDriven(mappedName = "ExampleMDB", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax....
[ -0.11487612128257751, 0.03952168673276901, 0.4993884861469269, -0.21008989214897156, -0.02794858254492283, -0.1653330773115158, 0.12929977476596832, -0.19428543746471405, -0.28793591260910034, -0.8182169198989868, -0.010000230744481087, 0.44319531321525574, -0.4698202908039093, 0.260573804...
this is in deploy/jms/jms-ds.xml). Perhaps this is not even possible but is worth asking. Make your own CPAN mirror with exactly what you want. [Stratopan.com](http://www.stratopan.com), a service, and [Pinto](http://www.metacpan.org/module/Pinto), tools that's built on top of, can help you do that. The CPAN tools onl...
[ 0.4858083128929138, 0.12445579469203949, 0.3926987946033478, -0.015986774116754532, -0.022463053464889526, -0.12922954559326172, -0.001294983783736825, 0.014881809242069721, -0.4550175368785858, -0.46290716528892517, 0.15554264187812805, 0.5824052691459656, -0.29872801899909973, 0.05981964...
on that in a minute. Now, you want to have several versions of that. You can create as many mirrors as you like, and you can also put the mirrors in source control so you can check out any version of the mirror that you like. Tools such as CPAN::Mini::Inject can help you set up your own CPAN. Check out [my talks on ...
[ 0.5453974604606628, 0.19170188903808594, 0.4660150706768036, 0.22289875149726868, 0.054960012435913086, -0.15584741532802582, 0.28234347701072693, -0.004178645554929972, -0.3690658509731293, -0.4640997350215912, 0.3075854480266571, 0.4988170564174652, 0.032807111740112305, 0.01554186362773...
[The Perl Review](http://www.theperlreview.com) too, or should by the next issue. :) Lately, I've been working on a program called dpan (for DarkPAN) that can look at random directories, find Perl distributions in them, and create the structure and index files that you need. You run dpan, you get a URL to point your C...
[ 0.30200812220573425, -0.14611448347568512, 0.3309478163719177, 0.09170863777399063, -0.26279836893081665, -0.29677867889404297, -0.17911694943904877, 0.24789364635944366, -0.46537041664123535, -0.41098105907440186, 0.07598117738962173, 0.020767681300640106, -0.154365673661232, 0.3094893693...
I recently released [CPAN::PackageDetails](http://search.cpan.org/dist/CPAN-PackageDetails) that can help you build the right index file. It's still a bit young too, but again, if you need something special, just ask.
[ 0.32127583026885986, -0.022277893498539925, 0.3149203956127167, 0.11398728936910629, 0.18102598190307617, -0.2589988708496094, -0.06188719719648361, 0.07920148968696594, -0.5051775574684143, -0.5882264375686646, 0.26262131333351135, 0.05092712491750717, 0.14012852311134338, 0.1860941797494...
I am trying this in my Form Load Event ``` cmdCancel.Attributes.Add("onClick", "document.forms[0].reset();return false;") ``` but it doesn't clear my form. My form is a "ContentPage", part of a masterpage. Am I missing something? Try this: ``` cmdCancel.Attributes.Add("onClick","document.getElementById('" + thi...
[ 0.13324503600597382, 0.07809444516897202, 0.5604435205459595, -0.15815047919750214, 0.24078135192394257, -0.38262662291526794, 0.6556162238121033, -0.17092585563659668, -0.17900702357292175, -0.724734365940094, -0.25492063164711, 0.5326628684997559, -0.26639702916145325, -0.052452899515628...
Via command line, I usually do this: ``` cp -rRp /path/to/a\_folder/. /path/to/another\_folder ``` This copies just the contents underneath **a\_folder** to **another\_folder**. In SVN I need to do the same thing, but can't figure it out. I always end up with this: ``` /path/to/another\_folder/a\_folder ``` SVN t...
[ 0.1346110701560974, 0.19577589631080627, 0.11571414768695831, 0.2105661928653717, -0.007240681909024715, -0.371028333902359, 0.3085394501686096, 0.17938143014907837, -0.40413931012153625, -0.7808529138565063, -0.29088547825813293, 0.5362006425857544, -0.13172197341918945, 0.133700639009475...
merge? Given a repo like this: ``` trunk/a_folder/foo trunk/a_folder/bar trunk/new_folder/baz ``` use these commands to merge the foo and bar directories: ``` cd trunk/new_folder svn merge -r1:HEAD http://svn/repo/trunk/a_folder . ```
[ 0.12535399198532104, -0.10153887420892715, 0.46821385622024536, -0.41479143500328064, -0.22844137251377106, 0.29782187938690186, -0.11565753072500229, -0.15031428635120392, -0.4046246409416199, -0.43485912680625916, -0.44723910093307495, 0.43228405714035034, -0.6689504981040955, -0.0165130...
Can an abstract class have a constructor? If so, how can it be used and for what purposes? Yes, an abstract class can have a constructor. Consider this: ``` abstract class Product { int multiplyBy; public Product( int multiplyBy ) { this.multiplyBy = multiplyBy; } public int mutiply(int val)...
[ 0.13420513272285461, -0.48107656836509705, 0.2041412740945816, -0.26659002900123596, 0.07759205996990204, -0.07050519436597824, 0.17279036343097687, -0.41329821944236755, -0.07890887558460236, -0.5867437720298767, -0.38723573088645935, 0.3817595839500427, -0.5229024887084961, 0.19212518632...
} } class TimesWhat extends Product { public TimesWhat(int what) { super(what); } } ``` The superclass `Product` is abstract and has a constructor. The concrete class `TimesTwo` has a constructor that just hardcodes the value 2. The concrete class `TimesWhat` has a constructor that allows the caller ...
[ 0.2858474850654602, -0.14878542721271515, 0.03597678989171982, -0.10899323225021362, 0.2142769992351532, -0.06675724685192108, 0.05344397947192192, -0.19770190119743347, -0.09308423846960068, -0.626740038394928, -0.21412354707717896, 0.3649495542049408, -0.5360861420631409, 0.0052835112437...
in subclass must explicitly call > the parent constructor.
[ -0.4844706654548645, -0.0972493514418602, 0.037482455372810364, 0.10857287049293518, -0.3381294906139374, -0.34569284319877625, 0.391438752412796, -0.07973548024892807, 0.1081656664609909, -0.53786301612854, -0.41261687874794006, 0.1012052446603775, -0.346853643655777, 0.17919176816940308,...
I have been using [PLT Scheme](http://www.plt-scheme.org/), but it has some issues. Does anyone know of a better implementation for working through SICP? Use [**MIT Scheme**](http://www.gnu.org/software/mit-scheme/). It's recommended by the authors of SICP, and is used at MIT for the **6.001: Structure and Interpretat...
[ 0.7806283831596375, -0.02584073320031166, 0.2940840423107147, -0.17736415565013885, -0.19508622586727142, -0.26221656799316406, -0.013819191604852676, -0.03715147078037262, -0.22405235469341278, -0.6556012034416199, 0.022644121199846268, 0.34520119428634644, 0.06725791841745377, -0.3632580...
I'm using a `RichTextBox` (.NET WinForms 3.5) and would like to override some of the standard ShortCut keys.... For example, I don't want `Ctrl`+`I` to make the text italic via the RichText method, but to instead run my own method for processing the text. Any ideas? `Ctrl`+`I` isn't one of the default shortcuts affect...
[ -0.005479412153363228, 0.018794186413288116, 0.33839765191078186, -0.215767502784729, 0.04612473025918007, -0.14692948758602142, 0.4393060803413391, -0.01008358970284462, 0.029695605859160423, -0.7387647032737732, -0.12072623521089554, 0.7704493999481201, -0.3583947420120239, 0.11296632140...
&& e.KeyCode == Keys.I) { // do whatever you want to do here... e.SuppressKeyPress = true; } } ```
[ 0.25736138224601746, -0.06735022366046906, 0.43223026394844055, -0.3170056641101837, 0.4518774151802063, -0.422607958316803, 0.6921690106391907, -0.4400339722633362, -0.04037383198738098, -0.4162900149822235, -0.5434274077415466, 0.7693476676940918, -0.24667596817016602, -0.006871538236737...
I want to increment a cookie value every time a page is referenced even if the page is loaded from cache. What is the "best" or most concise way to implement this? Stolen from <http://www.quirksmode.org/js/cookies.html#script> ``` function createCookie(name,value,days) { if (days) { var date = new Date(); ...
[ 0.4767240881919861, 0.06629408150911331, 0.8741486668586731, -0.010716616176068783, 0.3404543995857239, -0.0852336511015892, 0.5109133124351501, 0.01502737682312727, -0.12952391803264618, -0.6840580105781555, -0.3759661316871643, 0.09314727783203125, -0.20987021923065186, 0.560621142387390...
= name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function eraseCookie(name) { crea...
[ 0.02150336652994156, 0.11613108962774277, 0.3619449734687805, -0.30455201864242554, 0.266860693693161, 0.05948571115732193, 0.371844619512558, -0.2481974959373474, -0.11434517800807953, -0.37895557284355164, -0.3756469488143921, 0.49678680300712585, -0.1754370927810669, 0.4171592593193054,...
strings. Using `foo++` or `++foo` will actually cast for you, but it's safer to know exactly what you're working with: ``` var x = "5"; // x = "5" (string) x += 1; // x = "51" (string!) x += 5; // x = "515" (string!) ++x; // x = 516 (number) ```
[ 0.04484042897820473, 0.11005609482526779, 0.06600788235664368, -0.21194081008434296, -0.02486260049045086, -0.12560482323169708, 0.34304726123809814, -0.4875856935977936, -0.1909855306148529, -0.3056710958480835, -0.21636952459812164, 0.452461838722229, -0.43631511926651, -0.17490896582603...
The webservice on MSDN is now all about the Windows Communication Foundation. Is there any site out there that deal with WebService only? (.Net) I did find this section for web services under [MSDN](http://msdn.microsoft.com/en-us/library/ms950421.aspx).
[ 0.4696669578552246, 0.1282370239496231, 0.20625805854797363, 0.05196814239025116, -0.23368984460830688, -0.5842612981796265, 0.0004809376550838351, 0.5517984628677368, -0.3653337061405182, -0.5532111525535583, 0.011052115820348263, 0.34532636404037476, 0.10309775918722153, 0.28926336765289...
I'm looking for a linux utility that can alter the payloads of network packets based on a set of rules. Ideally, I'd use `iptables` and the `netfilter` kernel module, but they don't support generic payload mangling: `iptables` will alter various *header* fields (addresses, ports, TOS, etc), and it can *match* arbitrary...
[ 0.46014028787612915, -0.16795137524604797, 0.18765759468078613, 0.30384358763694763, -0.07081183791160583, -0.23081240057945251, 0.052866023033857346, 0.036370035260915756, -0.2696869373321533, -0.8933857083320618, 0.11171121895313263, 0.5522075891494751, -0.31136465072631836, 0.1326974332...
the `NFQUEUE` module, which is the latest implementation of the QUEUE modules that Robert Gamble suggested. It appeared to be fairly simple, with a safety bonus for allowing our code to run in user, not kernel, space. The implementation would have been almost trivial if we'd simply wanted to alter the payload without ...
[ -0.0027014994993805885, -0.22329822182655334, 0.39420774579048157, 0.06561162322759628, -0.013709144666790962, -0.15317007899284363, -0.2969054579734802, -0.1856670379638672, -0.2856791913509369, -0.6130070090293884, -0.10787423700094223, 0.31713172793388367, -0.6493699550628662, 0.0762897...
and IP headers. However, our use case involves injecting additional characters into the data stream. This has the somewhat obvious side-effect of increasing the corresponding SEQ/ACK numbers in the TCP stream, and the not-so-obvious side-effect of confusing the [`conntrack`](http://kalamazoolinux.org/presentations/200...
[ 0.5112388730049133, -0.06647267192602158, -0.13476522266864777, 0.30865031480789185, -0.06748489290475845, -0.2967122495174408, 0.6200951933860779, 0.3072066605091095, -0.18612335622310638, -0.572969377040863, -0.04876548796892166, 0.4889738857746124, -0.24772870540618896, 0.04394994303584...