text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I'd like to be able to do something like this in vim (you can assume v7+ if it helps). Type in a command like this (or something close) ``` :inshtml ``` and have vim dump the following into the current file at the current cursor location ``` <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:...
[ 0.5148448944091797, -0.0031612233724445105, 0.7129886150360107, -0.04170531779527664, -0.19679047167301178, -0.30571338534355164, -0.1353282779455185, -0.48547476530075073, -0.08996155858039856, -0.6459999680519104, -0.010791280306875706, 0.5017794370651245, -0.2255922257900238, 0.19118680...
files which then I insert using the `r` command (which inserts the contents of a file, at the current location if no line number is passed) from some function: ``` function! Class() " ~/vim/cpp/new-class.txt is the path to the template file r~/vim/cpp/new-class.txt endfunction ``` This is very practical - in...
[ -0.16432355344295502, 0.12953273952007294, 0.6826973557472229, -0.0917314738035202, 0.29819226264953613, 0.1190236508846283, 0.07405051589012146, -0.2766503393650055, -0.2519981861114502, -0.8556094169616699, -0.5799252390861511, 0.6392913460731506, -0.31051960587501526, 0.0825303122401237...
I've tried ``` select top 1 * from tbl select top(1) * from tbl select * from tbl limit 1 ``` Nothing worked. Does SQL Server Compact Edition support getting the top x rows? Yes it does, and your second syntax should be correct. What happens when you try it? However, the keyword was added in version 3.5, so if ...
[ -0.14508891105651855, 0.11449412256479263, 0.5446324348449707, -0.18415796756744385, -0.05079760402441025, -0.24411839246749878, 0.3100467622280121, 0.16990463435649872, -0.203962504863739, -0.5730273127555847, -0.20748262107372284, 0.5687709450721741, -0.3882448673248291, 0.10391018539667...
I am trying to hide the TextBlock and Label which are placed inside a grid like so: ``` <TextBlock Grid.Column="3" Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Hidden">Text inside TextBlock</TextBlock> <Label Grid.Column="4" Grid.Row="2" HorizontalAlignment="Center" Visibility="Hidd...
[ 0.3357190191745758, 0.34303054213523865, 0.012567680329084396, -0.2577974200248718, -0.06648865342140198, 0.1301579624414444, 0.5521655082702637, 0.042574793100357056, 0.047222964465618134, -0.7454434633255005, -0.022288337349891663, 0.4167577922344208, -0.36494162678718567, 0.221177041530...
I have a web application that dumps logging information in a file using log4j RollingFileAppender. The application is currently configured to dump only WARN and higher logging information so that the disk I/O do not impact performance on the server. However, I would like to know the last X debug information when an er...
[ 0.6280261874198914, 0.2600882947444916, 0.02408234402537346, 0.22448281943798065, -0.018297193571925163, -0.09992192685604095, 0.30117931962013245, 0.13913868367671967, -0.3524371087551117, -0.5054576992988586, 0.19699136912822723, 0.48517099022865295, -0.1030634194612503, 0.08721567690372...
of my projects I capture the subversion revision number, time, user who ran the build, and some system information, stuff them into a .properties file that gets included in the application jar, and read that jar at runtime. The ant code looks like this: ```xml <!-- software revision number --> <property name="version...
[ 0.4094134271144867, 0.26475268602371216, 0.4273388087749481, -0.02415524795651436, -0.004573916085064411, 0.39535969495773315, 0.20782490074634552, -0.22615821659564972, -0.297229140996933, -0.7781321406364441, 0.14938561618328094, 0.1345549374818802, 0.07980506867170334, 0.010684345848858...
<propertyfile file="path/to/project.properties" comment="This file is automatically generated - DO NOT EDIT"> <entry key="buildtime" value="${builtat}"/> <entry key="build" value="${svnversion}"/> <entry key="builder" value="${whoami}"/> <entry key="version" value="${vers...
[ 0.5578098893165588, -0.038731809705495834, 0.3496210277080536, -0.12178557366132736, -0.07610440999269485, -0.31355729699134827, 0.1358804553747177, -0.48892930150032043, 0.04164808243513107, -0.8680989742279053, -0.24057592451572418, 0.5781564712524414, 0.1032402515411377, 0.2620221674442...
Linqpad, when coding in C#, will draw a vertical line between opening and closing curly braces. Boy, oh boy, I sure do wish Visual Studio would do this. Does it? Is there anyway to make it do it? [CodeRush Xpress for C#](http://msdn.microsoft.com/en-us/vcsharp/dd218053.aspx) will do that, and MS is providing it for f...
[ 0.39359235763549805, 0.05011330917477608, 0.48333945870399475, 0.09819065779447556, -0.0005842373939231038, 0.1396651715040207, 0.11914345622062683, 0.3491513133049011, -0.37533068656921387, -0.41759923100471497, -0.01801786571741104, 0.3279774487018585, -0.11592096090316772, -0.2456442713...
I have a way of hiding the back button used by the navigation controller. It's set by the previous controller, not the one managing the current view, and that makes it tricky to get to. I needed to do this in editing mode so that I could prevent the user from navigating away from the screen. ``` if(self.editing) { ...
[ 0.015567244030535221, 0.020153556019067764, 0.7855378985404968, -0.23884941637516022, -0.014723824337124825, 0.2094724476337433, 0.49589085578918457, -0.1280023455619812, -0.051016099750995636, -0.7447938323020935, -0.08556760102510452, 0.932998776435852, -0.27987268567085266, 0.0970155596...
// Restore the back button [self.navigationItem setLeftBarButtonItem:nil animated:YES]; } ``` Is there a better way to do this? use this to hide back button ``` [self.navigationItem setHidesBackButton:YES] ``` use this to show back button ``` [self.navigationItem setHidesBackButton:NO] ```
[ -0.24631068110466003, 0.1469111442565918, 0.5267469882965088, 0.0030539699364453554, 0.11383263766765594, 0.15966425836086273, 0.44681480526924133, 0.21433286368846893, -0.14127373695373535, -0.5873024463653564, -0.3077240586280823, 0.7447627186775208, -0.14797651767730713, 0.0109483962878...
Which are more performant, `CTE` or `Temporary Tables`? I'd say they are different concepts but not too different to say "chalk and cheese". * A temp table is good for re-use or to perform multiple processing passes on a set of data. * A CTE can be used either to recurse or to simply improved readability. And, lik...
[ 0.32440951466560364, -0.12421631067991257, 0.09161946922540665, 0.2887375056743622, -0.21122969686985016, -0.027363717555999756, -0.18057452142238617, 0.07683581858873367, -0.3158627450466156, -0.7567270994186401, -0.08899348229169846, 0.2711164057254791, -0.2926926910877228, -0.2184104621...
I have an XSLT with a C# script in it: ``` <msxsl:script language="C#" implements-prefix="user"> <msxsl:using namespace="System.Xml"/> <msxsl:using namespace="System.Xml.XPath"/> <![CDATA[ public string GetMenuPath(XPathNodeIterator node) { XPathNavigator dataSourceNode = node.Current; ...
[ -0.20890574157238007, 0.023759080097079277, 0.6606113910675049, -0.025236569344997406, 0.16516850888729095, -0.2420981228351593, 0.19467562437057495, -0.020683467388153076, 0.07509146630764008, -0.7716342210769653, -0.2307107299566269, 0.5238675475120544, -0.3141818642616272, 0.18164964020...
why... I use nxslt with .NET Framework. Thank you for help ! Thank you for your answers, I found out the origin of the problem now. It was because I was using the "style" tag instead of "nxslt" for calling the XSLT transformation. "style" works as long as there is no extension script. ``` <nxslt style="transformation...
[ 0.22586648166179657, -0.17587411403656006, 0.1330564022064209, -0.15039971470832825, -0.10210566222667694, -0.3278449475765228, 0.267633855342865, -0.15312762558460236, -0.15316085517406464, -0.5562868118286133, -0.05628535524010658, 0.6859274506568909, -0.584624707698822, 0.17263358831405...
If I were to remove my CSS stylesheet and set all the properties via a JavaScript file, would that be possible? That is, would there be anything I couldn't access via the JS DOM API? Everything in CSS can be accessed through JS, but bear in mind that users with JS disabled won't get any style at all! * CSS is for styl...
[ 0.6610262989997864, -0.02381868287920952, 0.2235078513622284, 0.1123618632555008, -0.14804314076900482, 0.021779252216219902, 0.1830018162727356, -0.19964781403541565, -0.18333035707473755, -0.6974740624427795, 0.0388861708343029, 0.6263740658760071, -0.10706015676259995, -0.02245032973587...
I have a flex/as3 project in which I have a bitmap background, and then draw Sprites over top of that background. It creates a map and a route to locations on the map. I am implementing a print function to print that map(the flash screen) and then adding other information to the same page. The map displays with a width...
[ 0.4825551211833954, -0.20079614222049713, 0.4238649904727936, 0.07215797156095505, -0.2082529217004776, -0.024275127798318863, -0.0833696722984314, -0.16948392987251282, -0.3128614127635956, -0.8849915862083435, 0.1584659218788147, 0.30460524559020996, 0.0381167009472847, -0.07274259626865...
screen capture of the flash file and then save that as a png. to display separately on a new page with additional information. I know that saving the screen capture as a .png is a different problem but If I could figure out how to capture the stage in the first place the second problem would cease to be. You would need...
[ 0.47386297583580017, -0.18116343021392822, 0.5944410562515259, 0.008225026540458202, -0.25362107157707214, -0.12425066530704498, -0.0020005018450319767, -0.5271432995796204, -0.12925925850868225, -0.564318835735321, 0.16690480709075928, 0.47401726245880127, -0.30847522616386414, -0.2413595...
for you.
[ 0.48026570677757263, 0.2626650333404541, -0.04092003405094147, 0.041094228625297546, -0.010719617828726768, 0.09581850469112396, 0.14491835236549377, -0.056555621325969696, -0.09295427054166794, -0.3049659729003906, -0.3166050910949707, 0.23210075497627258, -0.3027842342853546, 0.251926422...
We've got some data (10-50 columns, hundreds of thousands of rows) that we usually visualize in Excel as a line graph or stacked bar chart. Users want to be able to zoom in and out of the graph to get down to the individual samples, but these kind of operations really bring Excel to its knees. I'm thinking about em...
[ 0.6066330075263977, 0.16005238890647888, 0.3772091269493103, 0.3327711820602417, 0.14528755843639374, -0.2910693883895874, -0.045088157057762146, -0.028962159529328346, -0.2013239860534668, -0.6890420317649841, 0.2298572063446045, 0.18518312275409698, -0.305532306432724, -0.241331651806831...
kind of load? 3. Is this a solved problem that I just should have googled more thoroughly before asking? Javascript is probably ready for it, since javascript itself has gotten to be quite fast. In my experience browsers are generally *not* ready to handle very large DOM structures. At the least you can expect to be sp...
[ 0.2772274911403656, 0.013086876831948757, 0.09955165535211563, 0.05549106001853943, -0.3130452632904053, -0.5661677718162537, 0.3170551359653473, -0.1838369220495224, -0.5005505084991455, -0.47723954916000366, 0.014818770810961723, 0.47054871916770935, -0.23340418934822083, -0.243316724896...
slow on *all* browsers, but in the end it turns out to be for 3-4 different reasons on the different browsers. This is based on experience from working with moderately oversized DOMs. While certainly possible, it's going to cost a fair amount of work to get a decent result.
[ 0.10396403074264526, -0.047034695744514465, 0.34322190284729004, 0.08127284795045853, -0.08552508056163788, 0.20527055859565735, 0.6483597755432129, 0.20418964326381683, -0.3335441052913666, -0.7749447822570801, -0.14071135222911835, 0.4234716296195984, -0.20187200605869293, 0.070549480617...
How can I achieve hot deployment with Intellij-IDEA and Seam 2? I've set up a separate module to deploy hot deployable class files to WEB-INF/dev/, but it still deploys as one big clump. Steps to get hot deployment with Intellij-IDEA and Jboss: (This is assuming your WAR project already deploys from an exploded direc...
[ 0.19497519731521606, -0.0813087522983551, 0.21717272698879242, 0.21284134685993195, -0.011597070842981339, -0.22862786054611206, 0.054885461926460266, -0.2560984492301941, -0.2330193817615509, -0.7886719703674316, -0.48328959941864014, 0.7114769220352173, -0.15461339056491852, -0.253654479...
relative path' to WEB-INF/dev 4. Edit your run configuration and enable 'Build on frame deactivation'. 5. Run the server. Now, whenever you alt-tab out of IDEA, your views and seam POJO controllers are redeployed automatically.
[ 0.024176208302378654, -0.5354024767875671, 0.7685831189155579, 0.16702832281589508, -0.033748116344213486, 0.033703647553920746, 0.18941140174865723, -0.07233812659978867, -0.12612269818782806, -1.1441256999969482, -0.15727904438972473, 0.6708071827888489, -0.09532206505537033, 0.028659926...
How can I get Django 1.0 to write **all** errors to the console or a log file when running runserver in debug mode? I've tried using a middleware class with process\_exception function as described in the accepted answer to this question: [How do you log server errors on django sites](https://stackoverflow.com/quest...
[ 0.1637568324804306, 0.45817479491233826, 0.0674673542380333, -0.27692747116088867, -0.34563183784484863, -0.48325127363204956, 0.39823582768440247, 0.10682228207588196, -0.24887190759181976, -0.6076487302780151, 0.38343968987464905, 0.7620317935943604, -0.30007994174957275, 0.0851597338914...
it was a compile-time error and it doesn't. I've watched Simon Willison's fantastic presentation on Django debugging (<http://simonwillison.net/2008/May/22/debugging/>) but I didn't see an option that would work well for me. In case it's relevant, I'm writing a Facebook app and Facebook masks HTTP 500 errors with the...
[ 0.050618067383766174, 0.5968743562698364, -0.05833810195326805, 0.012289527803659439, -0.2513545751571655, -0.001990280579775572, 0.4545406699180603, 0.1819625198841095, -0.2468518316745758, -0.5705850720405579, 0.20790332555770874, 0.771432638168335, -0.03997679799795151, 0.02170690707862...
it should be able to write the same detail to the console or a file without having to add any additional exception handling to the code. I've never seen exception handling around import statements. Thanks, Jeff It's a bit extreme, but for debugging purposes, you can turn on the [`DEBUG_PROPAGATE_EXCEPTIONS`](http://do...
[ 0.3076821267604828, 0.3798540234565735, 0.08781161159276962, 0.16664621233940125, 0.08141793310642242, -0.4504462778568268, 0.5315580368041992, -0.07909771800041199, -0.14008823037147522, -0.41798749566078186, 0.24434415996074677, 0.7125600576400757, -0.44238710403442383, -0.06948740035295...
on what platform you're deploying this for. At any rate, never use this in production! For production, you're pretty much going to have to have extensive error handling in place. One technique I've used is something like this: ``` >>> def log_error(func): ... def _call_func(*args, **argd): ... try: ... ...
[ 0.04330825060606003, 0.10018376260995865, -0.21261927485466003, -0.023792678490281105, 0.05755975469946861, -0.13229598104953766, 0.1627836525440216, -0.026251278817653656, -0.3828717768192291, -0.5574490427970886, 0.010832320898771286, 0.7851259112358093, -0.4040069282054901, -0.176392808...
return _call_func ... >>> @log_error ... def foo(a): ... raise AttributeError ... >>> foo(1) error ``` If you use log\_error as a decorator on your view, it will automatically handle whatever errors happened within it. > The process`_`exception function is called for some exceptions (eg: assert(False) in views.p...
[ 0.19920040667057037, 0.24224384129047394, 0.3176085948944092, -0.39729076623916626, 0.024809708818793297, -0.2616516053676605, 0.2720613181591034, -0.23926310241222382, -0.2137988805770874, -0.4405926465988159, 0.07211758196353912, 0.7848867774009705, -0.4429701268672943, 0.098500020802021...
view is ever called. The first method I posted will catch errors like these for debugging. You might be able to figure something out for production, but I'd argue that you have worse problems if you're getting ImportErrors in a production app (and you're not doing any dynamic importing). A tool like [pylint](http://ww...
[ 0.4490516781806946, -0.354663223028183, 0.06500514596700668, 0.008341027423739433, -0.16315989196300507, -0.06994672119617462, 0.08058688789606094, 0.381301611661911, -0.5061690807342529, -0.4254622757434845, 0.03873474523425102, 0.7842704057693481, -0.10952556878328323, -0.008347982540726...
Regardless of what the user's local time zone is set to, using Delphi 2007, I need to determine the time (TDateTime) in the Eastern time zone. How can I do that? Of course, needs to be daylight savings time aware. TDateTime does not have any time zone information (it is just a double - date as whole number, time as de...
[ -0.2363462597131729, -0.3685515820980072, 0.7026441693305969, 0.14836713671684265, 0.05616453289985657, 0.08502911776304245, 0.16648872196674347, -0.1427258998155594, -0.4173680543899536, -0.6148189902305603, 0.11188424378633499, 0.40453892946243286, -0.03806835040450096, -0.06128819286823...
web services that will do this for you. Does your application need to be self contained, or can it connect to the web to do it?
[ 0.5538576245307922, 0.052741192281246185, 0.1272565871477127, 0.5303934216499329, 0.18531793355941772, -0.1833663433790207, 0.29391586780548096, 0.26261693239212036, -0.4408282935619354, -0.6196478605270386, 0.08190010488033295, 0.36000362038612366, -0.11335339397192001, 0.0788216292858123...
I have an application that uses DataGridView in two different locations. In one location, the DataGridView shows everything fine. In the other location, whenever the form containing the DataGridView is initially loaded, only about half of the visible portion of the DataGridView is actually drawn; through the rest of th...
[ 0.39028435945510864, -0.23768813908100128, 0.6723514795303345, 0.139459490776062, -0.03613479807972908, -0.007516245357692242, -0.13834570348262787, -0.001546754501760006, -0.16330789029598236, -1.0079776048660278, 0.1708814799785614, 0.7350234389305115, -0.04012281075119972, -0.0250613354...
either to select a cell, forcing that particular cell to redraw; or to invalidate an area of the window, causing that area to redraw (which it does do correctly). I've compared how each of these DataGridViews were set up: For the one that works fine, the DataGridView is statically bound to a BindingSource, which is st...
[ 0.15943551063537598, -0.20258168876171112, 0.5761289000511169, 0.040427494794130325, -0.33749720454216003, -0.1410496085882187, 0.3339521288871765, -0.47061455249786377, 0.05004148185253143, -0.8672643899917603, 0.07075770944356918, 0.49194446206092834, -0.4013824164867401, 0.3257108330726...
zone information (it is just a double - date as whole number, time as decimal), so you would need that separately. You would need your own logic for DST as well, I don't believe there is any in Delphi. Then use the IncHour function in DateUtils.pas to alter the TDateTime to the Eastern Timezone. There are probably web...
[ 0.08145026862621307, -0.4505434036254883, 0.6152732968330383, 0.3625645935535431, 0.31432226300239563, 0.04791226610541344, -0.03782101348042488, 0.1180625930428505, -0.3894740343093872, -0.5675879120826721, -0.08747437596321106, -0.119644396007061, -0.05975722894072533, 0.0739715918898582...
Is there a way to cast objects in objective-c much like the way objects are cast in VB.NET? For example, I am trying to do the following: ``` // create the view controller for the selected item FieldEditViewController *myEditController; switch (selectedItemTypeID) { case 3: myEditController = [[SelectionL...
[ -0.014549029059708118, -0.4093296229839325, 0.44201532006263733, 0.049867842346429825, -0.17920248210430145, 0.02726922370493412, 0.0513223297894001, -0.3015308976173401, -0.13506124913692474, -0.6075578927993774, -0.10981007665395737, 0.5921707153320312, -0.3550565838813782, 0.19331371784...
load the view [self.navigationController pushViewController:myEditController animated:YES]; [myEditController release]; ``` However I am getting a compiler error since the 'list' property exists in the SelectionListViewController class but not on the FieldEditViewController even though SelectionListViewController in...
[ 0.13912130892276764, 0.030637916177511215, 0.5009253025054932, -0.01602800376713276, -0.40054136514663696, -0.09381533414125443, 0.2854136526584625, -0.17791377007961273, -0.11720054596662521, -0.7019786238670349, -0.1660657674074173, 0.8879469633102417, -0.39416253566741943, 0.18653324246...
What is the difference? %w quotes like single quotes `''` (no variable interpolation, fewer escape sequences), while %W quotes like double quotes `""`. ```rb irb(main):001:0> foo="hello" => "hello" irb(main):002:0> %W(foo bar baz #{foo}) => ["foo", "bar", "baz", "hello"] irb(main):003:0> %w(foo bar baz #{foo}) => ["fo...
[ -0.0046450113877654076, 0.26404833793640137, 0.4897705018520355, -0.3445195257663727, -0.31486833095550537, 0.5057400465011597, 0.12582112848758698, -0.4190159738063812, 0.1252010613679886, -0.28935474157333374, -0.10057980567216873, 0.6631695628166199, -0.3362906277179718, 0.2122089266777...
I want to *slideUp* some divs, then *slideDown* 1 div. However, I'm having some issues. ``` $("#divDocument,#divLocation").slideUp("normal", function() { $("#divSearch").slideDown("normal", doStuff()); }); ``` With this code, *divDocument* is visible, *divLocation* isn't. Because the *divLocation* is already hid...
[ 0.511368989944458, -0.1884314864873886, 0.47273629903793335, -0.31922614574432373, 0.04156516492366791, -0.16828249394893646, 0.6416829824447632, -0.528691828250885, 0.08842475712299347, -0.7391157746315002, -0.25667887926101685, 0.8211578130722046, -0.4781569838523865, -0.0066521330736577...
doStuff()); }); ``` **EDIT**: Sorry, I got confused. slideUp is meant to HIDE the elements. For some reason I thought it was meant to show them. In that case, you could do this: ``` $("#divDocument,#divLocation").filter(':visible').slideUp("normal", function() { $("#divSearch").slideDown("normal", doStuff()...
[ 0.27037563920021057, -0.47534337639808655, 0.34111180901527405, -0.20285995304584503, 0.09234417229890823, -0.2566016912460327, 0.34929966926574707, -0.21911974251270294, -0.2015267014503479, -0.6322464942932129, -0.3165242373943329, 0.6696394681930542, -0.5257554054260254, -0.098732784390...
my original answer from `hide()` to `show()` and then do the `slideUp`.
[ 0.39586809277534485, -0.03929826244711876, 0.16072136163711548, -0.07037527114152908, -0.05261169746518135, -0.045037891715765, 0.23258107900619507, -0.15090519189834595, 0.21805889904499054, -0.035618286579847336, -0.23425725102424622, 0.4471270442008972, -0.07795019447803497, -0.09933086...
I am working on an AS3 Flash game that initially takes a input from a barcode scanner. The data that it scans comes in as one long string using tabs to separate the data segments. The scanner acts as a keyboard and inputs the string into a hidden textfield so that I can grab the string and split it apart to get the dat...
[ 0.37487107515335083, -0.0013222119305282831, 0.06237945705652237, 0.12749597430229187, 0.014519593678414822, 0.09109936654567719, -0.3018012046813965, 0.11253529042005539, 0.059021834284067154, -0.6105000972747803, 0.006555477622896433, 0.44911885261535645, -0.13622981309890747, 0.02208100...
textfield. Then the next set of characters overwrite what was already in the textfield. Is there any way around this? Is there some way to make the textfield accept the tab as a literal character? I cannot change the way the barcode delimits the data in the string. Thanks for any help you can give. (Updated solution)...
[ 0.04395981878042221, -0.09525184333324432, 0.6956872344017029, -0.4132659435272217, 0.17707805335521698, -0.07244497537612915, 0.3632882535457611, -0.06525038182735443, -0.06782487034797668, -0.6622304916381836, -0.48761749267578125, 0.8839762210845947, -0.5753000378608704, 0.0790954530239...
The specific error that I'm getting is a System.ArgumentException with a message of "Value does not fall within the expected range". I'd like to know specifically what could cause this error (I suspect some kind of overflow), but I'd also like to know if there's a place where these sort of generic .NET messages and th...
[ 0.18239448964595795, -0.010133880190551281, 0.20925021171569824, 0.09062281250953674, -0.13099856674671173, -0.13748277723789215, 0.2335997074842453, -0.10049083083868027, -0.23407131433486938, -0.6006679534912109, 0.2127653807401657, 0.5524234771728516, -0.2160836011171341, 0.246078148484...
Reflector->F3->ArgumentException, double click result and hit Ctrl+R to analyse where is it used. That way you can specify the BCL (various versions) or whatever assembly you like (just has to be loaded in Reflector).
[ 0.33054319024086, -0.10459909588098526, 0.7872501015663147, 0.043362002819776535, -0.32872357964515686, -0.06560048460960388, -0.1596372276544571, -0.16844405233860016, 0.08577987551689148, -0.5073137879371643, -0.026792971417307854, 0.5494994521141052, -0.40670397877693176, 0.012455831281...
I have a need to change ONE PK value in one row of a table of a SQLSERVER 2005 databsae. The PK is currently auto-incrementing. One possibility is to temporarily remove the auto-increment from the key, make the modification, and put it back. The database is in production. Is there a way to safely make this change wit...
[ 0.23301628232002258, 0.33540382981300354, 0.2238665521144867, 0.14644359052181244, 0.10052044689655304, 0.022238951176404953, 0.3073940873146057, -0.32087865471839905, -0.3975678086280823, -0.4339202046394348, 0.359241783618927, 0.45343562960624695, -0.11484138667583466, 0.3398889601230621...
that uses the field as an FK? Am I nuts? Updating doesn't work - you'd have to insert the new record and delete the old one instead... ``` set identity_insert mytable on insert mytable (myidentitycolumn, someothercolumn) select 42, someothercolumn from mytable where myidentitycolumn = 1; delete mytable where myiden...
[ -0.0968061238527298, 0.5297294855117798, 0.3772522211074829, -0.06018674373626709, 0.2713605463504791, 0.07006097584962845, -0.2930688261985779, -0.21845854818820953, -0.2793990969657898, -0.0824989601969719, -0.04823516681790352, 0.4164268672466278, -0.13586045801639557, 0.266076803207397...
Like you would do in php: ``` if (@$some_var_exists) // do stuff ``` How would you do something like this in Javascript without getting an error? Thanks EDIT: Thanks for the answers. However, the problem I'm trying to solve is how to check if a variable exists when it's deep in a object, for example: ``` if (...
[ 0.42307138442993164, 0.08325669914484024, -0.11642344295978546, -0.08878087252378464, -0.1280871033668518, -0.1913861632347107, 0.6081041693687439, 0.05766410008072853, -0.005416794680058956, -0.5153273344039917, 0.03079409711062908, 0.524146556854248, -0.2994103729724884, -0.0497726239264...
will not cause an error. So if "someObj" exists, but "sometObj.something" does not, it will return false and never execute the test for someObj.something.foo that would throw an error.
[ 0.3452187180519104, 0.23328156769275665, -0.0147634819149971, 0.07320329546928406, 0.014541423879563808, -0.2811907231807709, 0.79569411277771, 0.5022386908531189, 0.11693580448627472, -0.2501465082168579, 0.004321027081459761, 0.3737093508243561, -0.1429828405380249, 0.268260657787323, ...
As someone who did a lot of sh scripting twenty years ago, and now coming back to it again, I find I'm using techniques that are considered obsolete. I should take the time to read the "What's new", but I don't. and it's not terribly efficient. Examples: ``` Instead of use tmpfile=/tmp/me$$ tmpfil...
[ 0.36645954847335815, 0.08206555992364883, 0.24918590486049652, -0.1920163631439209, 0.25098738074302673, -0.09446369856595993, 0.314258873462677, -0.16761164367198944, -0.2663058638572693, -0.9315109252929688, -0.1307898461818695, 0.5134755373001099, -0.3726259171962738, 0.0463932231068611...
comparing the original Bourne shell to BASH? Just a taste: * Forget **[**, learn **[[**: + No wordsplitting or pathname expansion happens on unquoted variables in [[. + You can use = to do glob pattern matching: [[ $foo = \*.txt ]] (foo ends with .txt) + You can use =~ to do ereg pattern matching: ereg='.\*.txt'; ...
[ 0.00021802943956572562, 0.016104629263281822, -0.04469337314367294, -0.012764951214194298, -0.12149658054113388, 0.6026432514190674, 0.18689894676208496, -0.3073202967643738, 0.14382529258728027, -0.5685549974441528, 0.28034675121307373, 0.7441228032112122, -0.22790560126304626, -0.3434336...
passes. * Use (( )) for everything numeric. Eg. ``` (( ++count )) (( $# )) || { echo "Expected an argument to the script." >&2; exit 1; } ``` * Some lovely IO operators, such as <(), <<<, etc. Eg. ``` read filesize _ < <(wc -c myfile) openssl base64 <<< "Bar!" # as opposed to the more expensive: echo "Bar!" | ope...
[ 0.4021315276622772, 0.19925643503665924, 0.4406503736972809, -0.04869823530316353, -0.06519154459238052, -0.071773461997509, 0.53682941198349, -0.5149085521697998, -0.11652208864688873, -0.48406916856765747, -0.16808536648750305, 0.31679579615592957, -0.4523344933986664, -0.133940219879150...
"$(grep -l foo <<< "$(</my/file.list)")" ``` * Arrays, arrays, arrays. Whenever you need to keep multiple strings (like filenames!), keep them in arrays. Do not keep them in a single string that uses some kind of delimitor to separate your separate strings, this method is always flawed. Eg. ``` files=(/foo/*); for ...
[ 0.05794805288314819, 0.037920042872428894, 0.06612091511487961, -0.0556202307343483, -0.27428296208381653, 0.13914091885089874, 0.1538085639476776, -0.4173009395599365, -0.47099608182907104, -0.537182092666626, -0.0542571023106575, 0.4775969088077545, -0.4224085211753845, 0.022884231060743...
I'm trying to scale a rectangle from its center using AffineTransform. I'm sure the solution is obvious but I cannot make it work ! Here is what I've tested so far... ``` import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.g...
[ 0.2943645119667053, -0.17424753308296204, 0.3501647114753723, -0.1849215179681778, -0.28132304549217224, 0.41108810901641846, 0.35438743233680725, -0.7252414226531982, -0.06570623070001602, -0.9254490733146667, 0.03433368355035782, 0.3112261891365051, -0.5116119384765625, 0.046726007014513...
@Override protected void paintComponent(Graphics g1) { super.paintComponent(g1); Rectangle r= new Rectangle(5,5,getWidth()-10,getHeight()-10); double cx= r.getCenterX(); double cy= r.getCenterY(); Graphics2D g=(Graphics2D)g1; g.setColor(Color.BLACK); AffineTra...
[ 0.19066640734672546, -0.340739905834198, 0.8320562243461609, -0.06804915517568588, 0.11089956015348434, 0.2312745749950409, 0.3674105703830719, -0.4875410199165344, -0.10519228130578995, -0.43141213059425354, -0.3190400004386902, 0.8911191821098328, -0.4994981586933136, 0.07674244046211243...
AffineTransform tr2= new AffineTransform(old); tr2.translate(-cx, -cy); tr2.scale(zoom, zoom); tr2.translate(cx/zoom,cy/zoom); g.setTransform(tr2); g.draw(r); g.setTransform(old); }
[ -0.13229545950889587, -0.4323519468307495, 0.9919009804725647, -0.017850521951913834, -0.1012672707438469, 0.18798455595970154, 0.10921477526426315, -0.6585938334465027, -0.17488045990467072, -0.6274622678756714, -0.4743598401546478, 0.7003334164619446, -0.41754475235939026, 0.106909610331...
} public static void main(String[] args) { JOptionPane.showMessageDialog(null, new Test()); } } ``` But it doesn't work.... Any suggestion ? I see what you mean when you're dealing with rectangles. The reason is because the initial calculation for the translation didn't take into account the ...
[ -0.12017370760440826, -0.14022324979305267, 0.6716700196266174, -0.176520437002182, -0.07897172123193741, 0.12593789398670197, 0.12543323636054993, -0.048011414706707, -0.29359757900238037, -0.7390782237052917, -0.378240704536438, 0.4242359399795532, -0.43137118220329285, 0.104764394462108...
before scaling it. In my tests it works just fine.
[ 0.049720123410224915, -0.007681692484766245, 0.28762975335121155, 0.011897379532456398, 0.23361675441265106, 0.15120889246463776, 0.5399953722953796, -0.2650367021560669, -0.1571052521467209, -0.2411436289548874, 0.5164769291877747, 0.5287560820579529, 0.42758938670158386, -0.6014260053634...
I need to implement a file transferring from a web server to a SFTP server. When the connection is interrupted during the file transferring, what happens to the bytes already transferred? Short Answer: The part of the file already transferred is lost/garbage collected/marked for deletion
[ 0.25562146306037903, -0.05292089655995369, 0.13400329649448395, 0.24794021248817444, 0.15445508062839508, -0.10294952243566513, -0.027398135513067245, 0.09093187004327774, -0.2679803669452667, -0.4861674904823303, 0.021280577406287193, 0.09049107879400253, -0.25701090693473816, 0.187949046...
Is there a method to obtain the (x, y) coordinates of the mouse cursor in a controls DoubleClick event? As far as I can tell, the position has to be obtained from the global: ``` Windows.Forms.Cursor.Position.X, Windows.Forms.Cursor.Position.Y ``` Also, is there a method to obtain which button produced the double ...
[ -0.4086313843727112, -0.23790094256401062, 0.47951269149780273, 0.13339072465896606, -0.022748826071619987, 0.2533282935619354, -0.11162832379341125, -0.38730400800704956, -0.37837687134742737, -0.4416266083717346, -0.1459278017282486, 0.4030119478702545, -0.3792484700679779, -0.2141824960...
which mouse actions trigger which events depending on the control. **UPDATE** I missed Moose's cast so this will not work. You have to use the static Control properties from inside Control.DoubleClick(). Because the button information is encoded as bit field yoou have to test as follows using your desired button. ``...
[ 0.08468572050333023, -0.08406461030244827, 0.3762364387512207, -0.10630140453577042, 0.2817158102989197, 0.12209445983171463, 0.7223185300827026, -0.4029627740383148, -0.20914362370967865, -0.227194145321846, -0.0046530491672456264, 0.514103889465332, -0.4703279137611389, -0.21837472915649...
I'm getting the following error when trying to run the Facebook Connect toolkit on a server with ASP.Net 2.0 installed - I manually moved over System.Core and System.xml.Linq to the server from the 3.5 DLLs. Most other things seem to run, until I try to access the "users" object - more specifically, the getinfo() meth...
[ 0.02512645535171032, 0.023430276662111282, 0.675888180732727, 0.12440767139196396, -0.10827405750751495, 0.04660816863179207, 0.5657091736793518, -0.22280828654766083, -0.4724307656288147, -0.7370262742042542, -0.2660216689109802, 0.49707451462745667, -0.3443809747695923, -0.21065434813499...
o, Object t, EventArgs e) +15 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34 System.Web.UI.Control.OnLoad(EventArgs e) +99 System.Web.UI.Control.LoadRecursive() +47 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPo...
[ -0.22478342056274414, -0.013039915822446346, 0.5841922760009766, 0.09752778708934784, 0.09877349436283112, 0.17581707239151, 0.4529757797718048, -0.2887789011001587, -0.21947352588176727, -0.6129307150840759, -0.13932539522647858, 0.5230030417442322, -0.24315199255943298, 0.102731987833976...
I may have designed myself into a corner with this problem but I feel like there's a workable known solution to something like this that I'm not seeing. It may well be that I'm completely overcomplicating the problem and skipped over the obvious solution. Any advice would be greatly appreciated. I have a set of entiti...
[ 0.07786993682384491, 0.2965664267539978, 0.35037049651145935, -0.04725079983472824, -0.1185765266418457, 0.1696631908416748, 0.1544511616230011, -0.21496334671974182, -0.017080072313547134, -0.6729642748832703, 0.20642931759357452, 0.6259698867797852, -0.5714828968048096, 0.116825893521308...
return name; } } -- AbstractWrapper.java public class AbstractWrapper { protected String decorate(String text) { return "** " + text + " **"; } -- FooWrapper.java public class FooWrapper extends AbstractWrapper implements Foo { private Foo wrappedFoo; public FooWrapper(Foo wrappedFoo) ...
[ 0.17355979979038239, -0.1872834712266922, 0.3842490315437317, -0.5183808207511902, -0.05310438200831413, 0.10046372562646866, 0.32071608304977417, -0.5800336599349976, -0.2286769151687622, -0.25581440329551697, -0.04095710813999176, 0.5267489552497864, -0.33049270510673523, 0.0094141727313...
} } ``` Now, the part that's complicating the situation is that I'm trying to make a List that automatically wraps the appropriate type with its appropriate wrapper before adding it. Something like: ``` -- WrappingList.java /** T is the base entity interface type. */ public class WrappingList<T> implements List<T> ...
[ 0.29291579127311707, -0.27311989665031433, 0.22317031025886536, -0.277056485414505, -0.11492685228586197, -0.03223753347992897, 0.016205286607146263, -0.45727384090423584, -0.2671026289463043, -0.5946881175041199, -0.2089519202709198, 0.6934479475021362, -0.4305964410305023, -0.00661601452...
protected T wrapItem(T item) { T wrappedItem = .....; return T; } } ``` Is there anything I can do to make a somewhat clean factory method here? Or am I already out of luck at this point because of type erasure? I think you should add a WrapperFactory to your WrappingList, and provide the actual...
[ 0.38988348841667175, -0.16862034797668457, 0.12656964361667633, -0.06941100209951401, -0.08244867622852325, -0.013536914251744747, 0.3994084596633911, -0.3339455723762512, -0.31697946786880493, -0.5707131624221802, -0.33099910616874695, 0.7420374155044556, -0.35924163460731506, -0.18255378...
item type */ public class WrappingList<T> implements List<T> { private List<T> wrappedList; private WrapperFactory<T> wrapper; public WrappingList(List<T> wrappedList, WrapperFactory<T> wrapper) { this.wrappedList = wrappedList; this.wrapper = wrapper; } .... public boolean a...
[ 0.31109997630119324, -0.3283860385417938, 0.2608741521835327, -0.08377527445554733, -0.05389511585235596, 0.09952739626169205, 0.306878924369812, -0.3120134770870209, -0.24815309047698975, -0.5450417995452881, -0.4285370111465454, 0.5161339044570923, -0.49444302916526794, 0.125158682465553...
your list that knows about the specific T you are using (e.g. how to wrap it) you won't be able to do anything. And it's not designing you in a corner ;) it's simply a common limitation of Java generics.
[ 0.6624928712844849, -0.27385666966438293, -0.06966990232467651, 0.011273195967078209, -0.26394328474998474, -0.508455753326416, 0.2794833481311798, 0.02074134722352028, -0.2916409969329834, -0.6094501614570618, 0.00861101970076561, 0.47548991441726685, -0.5360257029533386, 0.18507023155689...
I have a hierarchy of classes. The base class uses some tuning parameters that are loadable from file (and reloadable during runtime). Each derived class may add some additional parameters. I am looking for a way to allocate a correctly sized parameters array in the base constructor, so that I don't have to deallocate ...
[ 0.23962517082691193, -0.3159295618534088, 0.16415239870548248, 0.014797651208937168, -0.04872582480311394, 0.1992141604423523, 0.3039952516555786, -0.5292691588401794, -0.11989788711071014, -0.5540375709533691, 0.1642492562532425, 0.587351381778717, -0.3863662779331207, 0.17092254757881165...
float *parameters; public: Base() { parameters= new float[this->getNParms()]; parameters[0] = globalReloadableX; parameters[1] = globalReloadableY; } }; int Base::nParams =2; class Derived : public Base { static int nParms; virtual int getNParms() { return nParms;} ...
[ -0.12351443618535995, -0.6237735748291016, 0.47027668356895447, 0.1127869039773941, -0.018138781189918518, 0.2831956446170807, 0.05011129006743431, -0.4974983334541321, -0.2885538339614868, -0.11853263527154922, -0.3537788391113281, 0.42058008909225464, -0.26855969429016113, 0.042627759277...
int Derived::nParams =3; ``` I've seen [this question](https://stackoverflow.com/questions/594730/overriding-static-variables-when-subclassing), but the solution there doesn't quite work for me. I also tried making parameters a regular array in each class: ``` class Base { float parameters[2] ... class ...
[ -0.10219096392393112, -0.4211622476577759, 0.2369595170021057, 0.14785164594650269, -0.4074406027793884, 0.15392349660396576, 0.08546075969934464, -0.5606229901313782, 0.009449716657400131, -0.1797402799129486, 0.09674537926912308, 0.5285010933876038, -0.3151226341724396, 0.028211027383804...
the derived class constructor completes, the object's type is still the base class.)
[ -0.16532184183597565, -0.22752857208251953, 0.2835250496864319, 0.23986244201660156, -0.03013627603650093, -0.047976382076740265, 0.3171115219593048, -0.3067563474178314, 0.18905523419380188, -0.2083631008863449, -0.3742060959339142, 0.3907383680343628, -0.2678987383842468, 0.2457248568534...
I need to get the list of all the files on a drive. I am using a recursive solution. But it is taking a lot of time. I was wondering that, is it possible to get the names and location of all the files on a NTFS drive from it's Master File Table? I think it will be very fast. Any suggestions? When you get a list of all ...
[ 0.4285155236721039, 0.17566363513469696, 0.19012045860290527, 0.3106270730495453, 0.20429681241512299, -0.3025873601436615, -0.010745790787041187, 0.11722543090581894, -0.3851274251937866, -0.7797542810440063, 0.04914481192827225, 0.8131948709487915, -0.13880331814289093, 0.280302524566650...
of filenames and directories. Before going down the path of determining the format of the MFT (which is available from a variety of places on the Internet) and writing code to read it directly, you should probably profile your code and determine that you aren't already CPU or IO bound.
[ 0.5125265121459961, 0.18582108616828918, 0.3216777443885803, 0.17966000735759735, 0.3732396960258484, -0.3336199223995209, -0.35775694251060486, -0.04298429936170578, -0.6376157999038696, -0.7894560694694519, -0.4798288345336914, 0.466989666223526, -0.005826910492032766, 0.0938893109560012...
I am getting started with the notion of test-driven development, and kind of failing since I am finding that I know what the test is going to be kind of, but I can't figure out how to get it to do what I want. What I have is a property that has a `public` getter and an `internal` setter. I'd like to test the functional...
[ 0.31479641795158386, 0.14020924270153046, -0.34899279475212097, 0.05163756012916565, -0.07705920189619064, -0.09739406406879425, 0.12509407103061676, -0.21132826805114746, 0.1271543949842453, -0.5069510340690613, 0.04329304397106171, 0.672574520111084, -0.22222718596458435, 0.2841510772705...
_requestType = _request.GetType(); PropertyInfo propStdin = _requestType.GetProperty("StandardInput", BindingFlags.Public | BindingFlags.NonPublic); if(propStdin == null) { // Bug in the test. throw new Exception("There is a bug in the test. Reflection of stdin proper...
[ 0.21402288973331451, -0.4442824721336365, 0.42935869097709656, -0.031188948079943657, -0.01875109225511551, 0.020252889022231102, 0.6122948527336121, -0.6525762677192688, -0.09712017327547073, -0.5803614854812622, -0.2021811306476593, 0.3377968966960907, -0.24634499847888947, 0.31298360228...
MethodInfo setStdin = propStdin.GetSetMethod(); // This will fail at the moment since nothing is here to make this happen. Assert.AreEqual("NewInputNewRequestInput", _request.StandardInput); } ``` Now, the problem is that when I run the test, I get: ``` [mono-2.4] mbt@zest:~/Projects/StaffASAP/T...
[ 0.11815260350704193, 0.2729525864124298, 0.4379572868347168, 0.1869868040084839, 0.041847918182611465, -0.10515769571065903, 0.7099587917327881, -0.40106019377708435, -0.1540529429912567, 0.10660770535469055, -0.010212314315140247, 0.3069407641887665, -0.42847639322280884, 0.24246101081371...
run: 0, Time: 0.111 seconds Test Case Failures: 1) Test.FastCGI.tRequest.HandleInput : System.Exception : There is a bug in the test. Reflection of stdin property returned null. at Test.FastCGI.tRequest.HandleInput () [0x00051] in /home/mbt/Projects/StaffASAP/Test.FastCGI/tRequest.cs:54 at (wrapper managed-to-native) ...
[ -0.06918419897556305, 0.15127305686473846, 0.22019508481025696, 0.06613736599683762, 0.19295726716518402, 0.1285444051027298, 0.7841575145721436, -0.4705180525779724, -0.347228467464447, -0.1880081444978714, -0.32523468136787415, 0.6322395205497742, -0.3741888105869293, 0.3145834505558014,...
attribute, as you don't need to rely on reflection, and refactoring will propagate if the test project is part of your solution in Visual Studio.
[ 0.12814725935459137, 0.12511581182479858, -0.07039991766214371, 0.3338571786880493, -0.23048710823059082, 0.1532290279865265, 0.46298128366470337, -0.34949570894241333, 0.21030797064304352, -0.7409784197807312, 0.013378347270190716, 0.7203878164291382, 0.32453134655952454, -0.3243009746074...
I'm going to implement a tokenizer in Python and I was wondering if you could offer some style advice? I've implemented a tokenizer before in C and in Java so I'm fine with the theory, I'd just like to ensure I'm following pythonic styles and best practices. Listing Token Types: In Java, for example, I would have a ...
[ 0.13599801063537598, 0.054746489971876144, -0.15243345499038696, -0.14837133884429932, -0.3172895610332489, -0.02884521894156933, 0.07613596320152283, 0.01159872766584158, -0.22948311269283295, -0.5034763216972351, 0.2016686201095581, 0.429325133562088, -0.40395188331604004, -0.03344740346...
declarations could be altered. Returning Tokens From The Tokenizer: Is there a better alternative to just simply returning a list of tuples e.g. ``` [ (TOKEN_INTEGER, 17), (TOKEN_STRING, "Sixteen")]? ``` Cheers, Pete Python takes a "we're all consenting adults" approach to information hiding. It's OK to use vari...
[ 0.4705367386341095, 0.0711885392665863, -0.024199815467000008, 0.12398045510053635, -0.28906092047691345, -0.12850430607795715, 0.5548295378684998, -0.11389700323343277, -0.16937100887298584, -0.042922623455524445, -0.24313843250274658, 0.6793157458305359, -0.1871090680360794, -0.054564647...
**Background:** My team is dedicated to ensuring that straight from checkout, our code compiles and unit tests run successfully. To facilitate this and test some of our NHibernate mappings, we've added a SQLite DB to our repository which is a mirror of our production SQL Server 2005 database. We're using the latest ve...
[ 0.11158576607704163, 0.1684080809354782, 0.1572108119726181, -0.03178085759282112, -0.1989162117242813, -0.07693464308977127, 0.41010379791259766, -0.1273755431175232, -0.02095244824886322, -0.4662363529205322, -0.10222367197275162, 0.6782543063163757, -0.19730648398399353, 0.2010412216186...
// returns a Configuration for either SQLite or SQL Server 2005 depending on how the project is configured. Configuration config = GetDbConfig(); ISessionFactory sessionFactory = config.BuildSessionFactory(); ISession session = sessionFactory.OpenSession(); Node node = new Node(); ...
[ -0.222871795296669, -0.16517534852027893, 0.5264872312545776, -0.011794022284448147, 0.13802936673164368, 0.06340283900499344, 0.655178427696228, -0.2581152617931366, -0.17536020278930664, -0.8133236169815063, -0.09076271206140518, 0.5304169654846191, -0.16225259006023407, 0.09356591105461...
the exception below after the next line called. node.NodeLocation = session.Get<NodeLocation>(2); session.Save(node); session.Flush(); Assert.AreNotEqual(-1, node.NodeID); Assert.IsNotNull(session.Get<Node>(node.NodeID)); } ``` The exception I'm getting (ONLY when working...
[ -0.514141321182251, 0.07040965557098389, 0.6604992747306824, -0.15779346227645874, 0.2123977392911911, -0.24073366820812225, 0.45520129799842834, -0.17697490751743317, -0.45623579621315, -0.5182555317878723, -0.3284003436565399, 0.40125250816345215, -0.336556613445282, 0.3596392869949341, ...
System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior) at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery() at System.Data.SQLite.SQLiteTransaction..ctor(SQLiteConnection connection, Boolean deferredLock) at System.Data.SQLite.SQLiteConnection.BeginDbTransaction(IsolationLevel isolationLe...
[ -0.41490086913108826, 0.05187228322029114, 0.30596038699150085, -0.07475901395082474, -0.07377944141626358, 0.5086303949356079, 0.23784016072750092, -0.3691887855529785, -0.26516273617744446, -0.6624913811683655, -0.30029794573783875, 0.3655744791030884, -0.43146175146102905, 0.27396047115...
ISessionImplementor session) at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) at NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) at NHi...
[ -0.6074979901313782, -0.03441549092531204, 0.3766455352306366, 0.031981974840164185, 0.10081732273101807, 0.46379104256629944, 0.2169298678636551, -0.2655453383922577, -0.18068985641002655, -0.514507532119751, -0.44508352875709534, 0.5805190205574036, -0.03282724320888519, 0.29439505934715...
at NHibernate.Event.Default.DefaultLoadEventListener.Load(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) at NHibernate.Event.Default.DefaultLoadEventListener.ProxyOrLoad(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) at NHibernate.Event.D...
[ -0.41156551241874695, 0.03686123713850975, 0.49373942613601685, -0.11128263175487518, 0.09603637456893921, 0.1797916740179062, 0.27623817324638367, -0.35251423716545105, -0.3385617136955261, -0.48438364267349243, -0.2686736285686493, 0.5496642589569092, -0.3073885440826416, 0.2726120948791...
write this unit test, working against SQLite, that will rollback so as to avoid affecting the database each time the test is run? Check if you're not missing `connection.release_mode=on_close` in your SQLite NHibernate configuration. ([reference docs](http://www.nhforge.org/doc/nh/en/index.html#transactions-connection-...
[ -0.03876042738556862, -0.12488174438476562, 0.4315333962440491, 0.09822788089513779, 0.10286373645067215, -0.35237225890159607, 0.27224913239479065, -0.0472845584154129, -0.10280470550060272, -0.7451852560043335, -0.2002723217010498, 0.6589770317077637, -0.42616328597068787, 0.317279130220...
I just learned about Java's Scanner class and now I'm wondering how it compares/competes with the StringTokenizer and String.Split. I know that the StringTokenizer and String.Split only work on Strings, so why would I want to use the Scanner for a String? Is Scanner just intended to be one-stop-shopping for spliting? T...
[ 0.736271321773529, -0.29587751626968384, -0.16479501128196716, 0.07855035364627838, -0.35795870423316956, -0.12422411143779755, -0.2795977294445038, -0.18014590442180634, -0.20373563468456268, -0.4747357964515686, 0.26382046937942505, 0.5525417923927307, -0.12126602232456207, 0.01924395002...
you an easy syntax for doing the latter, but that's essentially all that they do. If you want to parse the resulting strings, or change the delimiter halfway through depending on a particular token, they won't help you with that. * `StringTokenizer` is even more restrictive than `String.split()`, and also a bit fiddlie...
[ 0.09888225048780441, -0.45833620429039, 0.01593398116528988, 0.014771084301173687, -0.2536045014858246, -0.056805722415447235, 0.22248032689094543, -0.27401724457740784, -0.24401240050792694, -0.19073238968849182, 0.23384100198745728, 0.2507489323616028, -0.06672853231430054, -0.0353808067...
timings that `String.split()` can still tokenize **thousands of strings in a few milliseconds** on a typical machine. In addition, it has the advantage over `StringTokenizer` that it gives you the output as a string array, which is usually what you want. Using an `Enumeration`, as provided by `StringTokenizer`, is too ...
[ 0.4029194712638855, -0.25902530550956726, -0.17892029881477356, 0.0916900485754013, 0.06403282284736633, -0.08877809345722198, 0.11210865527391434, -0.13013586401939392, -0.36481326818466187, -0.35904717445373535, 0.022991638630628586, 0.28075629472732544, -0.0849902555346489, -0.059456095...
My WPF application gets a file from the user with Microsoft.Win32.OpenFileDialog()... ``` Private Sub ButtonUpload_Click(...) Dim FileOpenStream As Stream = Nothing Dim FileBox As New Microsoft.Win32.OpenFileDialog() FileBox.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments...
[ 0.35075992345809937, -0.4400843679904938, 1.083733081817627, -0.2037307620048523, -0.08270654827356339, -0.08174700289964676, 0.3530215919017792, -0.48938214778900146, -0.28161999583244324, -0.6997667551040649, -0.23362630605697632, 0.46892741322517395, -0.3625636696815491, -0.132968693971...
FileBox.Multiselect = False Dim FileSelected As Nullable(Of Boolean) = FileBox.ShowDialog(Me) If FileSelected IsNot Nothing AndAlso FileSelected.Value = True Then Try FileOpenStream = FileBox.OpenFile() If (FileOpenStream IsNot Nothing) Then Dim ByteArray As Byte(...
[ 0.20297697186470032, -0.43005892634391785, 0.6209319829940796, -0.35540348291397095, 0.02039210870862007, -0.062060486525297165, 0.23300349712371826, -0.3034427762031555, -0.3273121416568756, -0.594425618648529, -0.08132673799991608, 0.7629086971282959, -0.3888712227344513, 0.1838691383600...
As New BinaryReader(FileOpenStream) ByteArray = br.ReadBytes(FileOpenStream.Length) End Using Dim z As New ZackFile z.Id = Guid.NewGuid z.FileData = ByteArray
[ 0.04548253118991852, -0.24246849119663239, 0.49111616611480713, 0.16563303768634796, -0.17209383845329285, -0.023931533098220825, 0.1393803209066391, -0.08297602087259293, -0.2639305293560028, -0.30612704157829285, -0.38059189915657043, 0.7369128465652466, -0.26421278715133667, 0.404994487...
z.FileSize = CInt(ByteArray.Length) z.FileName = FileBox.FileName.Split("\").Last z.DateAdded = Now db.AddToZackFile(z) db.SaveChanges() End If
[ 0.1949969232082367, -0.24685245752334595, 0.45834335684776306, -0.08442473411560059, 0.32082340121269226, -0.060053471475839615, 0.06946194171905518, -0.1863127052783966, -0.032381944358348846, -0.655392050743103, -0.32955777645111084, 0.2476324588060379, -0.03679022938013077, 0.6334031224...
Catch Ex As Exception MessageBox.Show("Cannot read file from disk. " & Ex.Message, "Fail", MessageBoxButton.OK, MessageBoxImage.Error) Finally If (FileOpenStream IsNot Nothing) Then FileOpenStream.Close() End If End Try End If End Sub ``` And my ...
[ 0.08162155002355576, -0.29379796981811523, 0.7128894329071045, -0.16807833313941956, 0.09373483061790466, -0.3312743306159973, 0.5421437621116638, -0.021722355857491493, -0.21861523389816284, -0.5037559270858765, -0.3000718653202057, 0.5710223317146301, -0.22783195972442627, 0.175357267260...
MVC application serves it up for download at a web site with FileStreamResult()... ``` Public Class ZackFileController Inherits System.Web.Mvc.Controller Function Display(ByVal id As Guid) As FileStreamResult Dim db As New EfrDotOrgEntities Dim Model As ZackFile = (From z As ZackFile In db.Zac...
[ -0.20952296257019043, -0.2693181335926056, 0.9832757115364075, 0.28485098481178284, -0.034329481422901154, -0.14599980413913727, 0.19249148666858673, -0.17789992690086365, -0.048131175339221954, -0.20350243151187897, -0.6498733162879944, 0.8399227857589722, -0.3366914987564087, 0.373606592...
Select z).First Dim ByteArray As Byte() = Model.ImageData Dim FileStream As System.IO.MemoryStream = New System.IO.MemoryStream(ByteArray) Dim ContentType As String = ????? Dim f As New FileStreamResult(FileStream, ContentType) f.FileDownloadName = Model.FileName
[ -0.042429402470588684, -0.7510454058647156, 0.9623862504959106, -0.0423317514359951, -0.09225491434335709, 0.1496536135673523, -0.03463057056069374, -0.4142933785915375, -0.274565190076828, -0.4854188561439514, -0.2263960838317871, 0.6515687704086304, -0.5026939511299133, 0.478818982839584...
Return f End Function End Class ``` But FileStreamResult() needs a content type string. How do I know the correct content type of my file? I've replaced the FileExtension column in my database table with a ContentType column. I populate it when I upload a file. ``` Private Sub ButtonUpload_Click(...) ... ...
[ -0.2396666407585144, -0.12240191549062729, 1.1098666191101074, -0.18514148890972137, 0.0887281745672226, -0.09723415225744247, 0.027066970244050026, -0.2780337631702423, 0.12887515127658844, -0.6021881699562073, -0.37417885661125183, 0.6524427533149719, -0.2457779347896576, 0.2962843477725...
d.Add(".bmp", "image/bmp") d.Add(".gif", "image/gif") d.Add(".jpeg", "image/jpeg") d.Add(".jpg", "image/jpeg") d.Add(".png", "image/png") d.Add(".tif", "image/tiff") d.Add(".tiff", "image/tiff") 'Documents' d.Add(".doc", "application/msword") d.Add(".docx", "application/vnd.openxmlfo...
[ 0.19385236501693726, -0.1497599482536316, 0.90175861120224, 0.0489005446434021, -0.49753743410110474, 0.3044058382511139, -0.3564341366291046, -0.4027821123600006, -0.4261687994003296, -0.6872631907463074, -0.9010599851608276, 0.2882159650325775, -0.4584462344646454, -0.0731315091252327, ...
Folders' d.Add(".zip", "application/zip") 'Audio' d.Add(".ogg", "application/ogg") d.Add(".mp3", "audio/mpeg") d.Add(".wma", "audio/x-ms-wma") d.Add(".wav", "audio/x-wav") 'Video' d.Add(".wmv", "audio/x-ms-wmv") d.Add(".swf", "application/x-shockwave-flash") d.Add(".avi", "video/...
[ 0.16400092840194702, -0.1314464509487152, 0.843828022480011, -0.08247677981853485, -0.26318591833114624, -0.043490443378686905, -0.07168885320425034, -0.46120160818099976, -0.3194660246372223, -0.6385320425033569, -0.7448247671127319, 0.6008315086364746, -0.36756613850593567, 0.12019045650...