text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
where c.HasControls()
select c into ris
from lb in ris.OfType<LinkButton>()
select lb;
foreach(var linkButton in linkButtons)
{ linkButton.Click += PageNavigateButton_Click | [
0.2388460785150528,
-0.12095116823911667,
0.565409779548645,
-0.45687952637672424,
0.18127335608005524,
0.42986544966697693,
0.0022779381833970547,
-0.4211388826370239,
-0.3435707092285156,
-0.5560487508773804,
-0.35287147760391235,
0.40729981660842896,
-0.5708639025688171,
0.2293056845664... | |
}
}
``` | [
0.17493881285190582,
0.41805654764175415,
0.05209751054644585,
-0.04864929988980293,
0.437467485666275,
-0.15825650095939636,
0.13202530145645142,
0.5446501970291138,
0.35430577397346497,
-0.4846813380718231,
-0.2295716553926468,
0.546978771686554,
-0.3188462555408478,
0.2798506021499634,
... | |
Suppose there are two scripts Requester.php and Provider.php, and Requester requires processing from Provider and makes an http request to it (Provider.php?data="data"). In this situation, Provider quickly finds the answer, but to maintain the system must perform various updates throughout the database. Is there a way ... | [
0.12060898542404175,
-0.22065149247646332,
0.7447131872177124,
-0.09446998685598373,
0.15071889758110046,
0.22277335822582245,
0.19368906319141388,
-0.4296916723251343,
-0.08308130502700806,
-0.5461979508399963,
-0.22238034009933472,
0.1635647565126419,
-0.06692949682474136,
0.275050997734... | |
and spawn a new process (finish `Provider.php`). There is probably a more elegant way to pull this off, but I've managed this a couple different ways. All of them basically result in exec-ing a command in order to shell off the second process.
adding the following `> /dev/null 2>&1 &` to the end of your command will a... | [
0.6376057267189026,
-0.12709204852581024,
0.309248685836792,
0.05147545784711838,
-0.10620588809251785,
-0.2632471024990082,
0.22831155359745026,
0.054961901158094406,
0.04554332420229912,
-0.5142932534217834,
-0.06599539518356323,
0.5873352885246277,
-0.1441067010164261,
0.174954071640968... | |
could also save the information that needs to be processed and handle the remaining processing on a cron job that re-creates the same sort of functionality without the need to exec. | [
0.16688400506973267,
0.1615021824836731,
0.18389345705509186,
0.4130983054637909,
0.28799867630004883,
-0.0043608951382339,
-0.2622183561325073,
0.09521088749170303,
-0.2610929012298584,
-0.54082190990448,
-0.12048397213220596,
0.5898809432983398,
0.08793172985315323,
0.20135952532291412,
... | |
I am building a small website for fun/learning using a fairly standard Web/Service/Data Access layered design.
To save me from constantly having to create instances of my service layer/data access layer classes, I have made the methods in them all static. I shouldn't get concurrency issues as they use local variables ... | [
0.39733949303627014,
0.2921583950519562,
0.059084709733724594,
0.11039155721664429,
-0.042347654700279236,
-0.19402426481246948,
0.34840723872184753,
0.46933653950691223,
-0.28084036707878113,
-0.5405396819114685,
0.13413235545158386,
0.31962376832962036,
-0.19605305790901184,
0.1202206462... | |
would not be a viable approach? What sort of problems might arise later on? Would it be better to have a "factory" class that can return me instances of the service and data layer classes as needed?
Disadvantages:
* You will be unable to write unit tests as you will be unable to write mock data access/business logic o... | [
0.5129755139350891,
0.06382374465465546,
0.18983902037143707,
0.20642037689685822,
-0.26189932227134705,
0.16172529757022858,
0.37850821018218994,
-0.28758594393730164,
-0.2844909727573395,
-0.5332785248756409,
0.1817059963941574,
0.5422374606132507,
-0.13899216055870056,
0.441206872463226... | |
will not be able to use instance variables, which will become a restriction as the code becomes more complex.
* It will be more difficult to replace elements of the business or data access layers if you need to.
* If you intend to write your application in this manner you would be better off using a language designed t... | [
0.46382713317871094,
0.024650366976857185,
-0.08479142189025879,
0.15651480853557587,
-0.1674467921257019,
0.08010566234588623,
0.2336781919002533,
0.12525825202465057,
-0.32852432131767273,
-0.8784731030464172,
-0.05741722136735916,
0.3798443377017975,
-0.6309682130813599,
0.2338382452726... | |
in each thread as and when they are needed.
Keep in mind that each user/session connected to your application will be running in it's own thread - so your web application is inherently multi-threaded. | [
0.3527628183364868,
0.07483946532011032,
0.2536252439022064,
0.2873157858848572,
0.03991847485303879,
-0.1582278162240982,
0.024091042578220367,
0.05994578078389168,
-0.5557234287261963,
-0.5509648323059082,
-0.10904942452907562,
0.29478704929351807,
-0.24474959075450897,
0.136786445975303... | |
I have this bit of javascript written with jQuery 1.2.5. It's contained inside the main function() of a plugin that I wrote. The plugin is a horizontal gallery scroller very similar to jCarousel. It does alot of auto calculating of widths and determines how many to scroll based on that and the size of the images, which... | [
0.5849589109420776,
-0.1994970291852951,
0.4534166753292084,
0.06928946822881699,
-0.17731155455112457,
-0.2685065269470215,
-0.14166530966758728,
0.12293430417776108,
-0.1377306580543518,
-0.6775489449501038,
0.27665919065475464,
0.4813820421695709,
-0.21305592358112335,
0.080470785498619... | |
Things don't go so well in the UI when that happens and I'd like to fix it :) I thought the answer might lie in `queue`, but all my attempts at using it haven't turned out anything worthwhile.
```
var self = this;
$(".digi_next", this.container).click(function(){
var curLeft = $(".digi_container", sel... | [
0.003594390582293272,
-0.28753727674484253,
0.7817341089248657,
-0.3223109543323517,
0.23519675433635712,
-0.13439853489398956,
0.23071037232875824,
-0.23620542883872986,
-0.26114189624786377,
-0.7768659591674805,
-0.3579317629337311,
0.4725024998188019,
-0.305833101272583,
0.0653277337551... | |
newLeft = ((self.digi_gal_width - (self.containerPad + self.containerWidth) * self.show_photos)) * -1;
}
$(".digi_container", self.container).animate({
left: newLeft + "px"
}, self.rotateSpeed);
});
```
Just use a global busy flag. When you enter your click handler, check it, a... | [
-0.025370333343744278,
-0.3571016192436218,
0.8750619292259216,
-0.08003435283899307,
0.42835533618927,
0.044945135712623596,
0.17623868584632874,
0.02538130432367325,
-0.47554534673690796,
-0.960924506187439,
-0.37618592381477356,
0.5608881711959839,
-0.374350905418396,
0.0279784612357616... | |
ends. JavaScript is single-threaded, so there is no race condition to worry about.
```
var busy = false;
$("...").onclick(function() {
if (busy) return false;
busy = true;
$("...").animate(..., ..., ..., function() {
busy= false;
});
return false;
});
``` | [
-0.10232670605182648,
-0.13152851164340973,
0.14366379380226135,
-0.2117513120174408,
0.18366074562072754,
0.03162255510687828,
0.5184661746025085,
-0.11306655406951904,
0.10184070467948914,
-0.5933504700660706,
-0.24329636991024017,
0.41159865260124207,
-0.6627730131149292,
-0.05320892482... | |
I received the following exception when I was using the Regex class with the regular expression: (?'named a'asdf)
```
System.ArgumentException: parsing \"(?'named a'asdf)\" - Invalid group name: Group names must begin with a word character.
```
What is the problem with my regular expression?
The problem is the space... | [
0.04604756832122803,
0.07179203629493713,
0.07606656849384308,
-0.14272037148475647,
-0.0783669725060463,
0.014940593391656876,
0.212193101644516,
-0.05816926062107086,
-0.1499963104724884,
-0.3008033037185669,
-0.2528117895126343,
0.6134837865829468,
-0.5690582394599915,
-0.09627744555473... | |
to indicate a group name. | [
0.2555285096168518,
0.22059334814548492,
0.03900296241044998,
-0.09365178644657135,
-0.45386171340942383,
0.08341293036937714,
0.22793680429458618,
0.037926726043224335,
-0.4329598844051361,
0.016174394637346268,
-0.3502349257469177,
-0.04173462092876434,
-0.20689404010772705,
0.1143438667... | |
I can't quite figure this out. Microsoft Access 2000, on the report total section I have totals for three columns that are just numbers. These `=Sum[(ThisColumn1)], 2, 3`, etc and those grand totls all work fine.
I want to have another column that says `=Sum([ThisColumn1])+Sum([ThisColumn2]) + Sum([ThisColumn3])` but... | [
-0.4761301875114441,
0.2458013892173767,
0.27348217368125916,
0.14474819600582123,
-0.25468990206718445,
-0.04019447788596153,
0.343161940574646,
-0.3488072156906128,
-0.32935819029808044,
-0.31565964221954346,
0.21515026688575745,
0.47978270053863525,
-0.02375847101211548,
0.2179100364446... | |
How to do paging in Pervasive SQL (version 9.1)? I need to do something similar like:
```
//MySQL
SELECT foo FROM table LIMIT 10, 10
```
But I can't find a way to define offset.
I ended up doing the paging in code. I just skip the first records in loop.
I thought I made up an easy way for doing the paging, but it ... | [
0.07943375408649445,
0.18610021471977234,
0.05080647021532059,
-0.23789913952350616,
-0.36613157391548157,
0.13575755059719086,
0.12964141368865967,
-0.26233595609664917,
-0.09891754388809204,
-0.33985328674316406,
0.2151416689157486,
0.6772094368934631,
-0.6534899473190308,
-0.33396586775... | |
by id
``` | [
0.6319682598114014,
0.7066547274589539,
0.17743182182312012,
0.05322229862213135,
-0.015298874117434025,
-0.4647255539894104,
-0.20247696340084076,
0.11049781739711761,
-0.1909557282924652,
-0.1692035049200058,
-0.27451738715171814,
0.11887677758932114,
-0.11411179602146149,
0.415232062339... | |
On destruction of a restful resource, I want to guarantee a few things before I allow a destroy operation to continue? Basically, I want the ability to stop the destroy operation if I note that doing so would place the database in a invalid state? There are no validation callbacks on a destroy operation, so how does on... | [
0.16064491868019104,
-0.14987127482891083,
-0.014418954029679298,
0.2736356258392334,
0.3882652521133423,
-0.6462922096252441,
0.23152455687522888,
-0.10589677840471268,
-0.21531786024570465,
-0.34177595376968384,
-0.15685158967971802,
0.7367419004440308,
-0.45988234877586365,
0.0657286271... | |
raise "Cannot delete booking with payments" unless booking_payments.count == 0
# ... ok, go ahead and destroy
super
end
end
```
Alternatively you can use the before\_destroy callback. This callback is normally used to destroy dependent records, but you can throw an exception or add an error instead.
```
de... | [
0.19393277168273926,
0.06880147755146027,
0.4703848659992218,
0.06038312613964081,
0.2551164925098419,
-0.15174876153469086,
0.11400102078914642,
-0.5324381589889526,
-0.1895165890455246,
-0.4667194187641144,
0.08078467100858688,
0.6945873498916626,
-0.45943889021873474,
0.3751097023487091... | |
In C# when I am done entering the fields of a snippet, I can hit Enter to get to the next line. What is the equivalent Key in VB?
Edit: I prefer not to use the mouse.
Wow... I sure hope they improve this soon.
Meanwhile, in case anyone cares, I created an additional replacement field ($Enter$) at the end of my custom... | [
0.3113083839416504,
0.100884810090065,
0.43086448311805725,
-0.31214967370033264,
0.01614277809858322,
-0.18319207429885864,
0.2075541913509369,
0.027549223974347115,
-0.16123035550117493,
-0.6143646836280823,
-0.30469179153442383,
0.6891471743583679,
-0.1926811933517456,
0.126325547695159... | |
_$PropertyName$ = value
End Set
End Property $Enter$
``` | [
-0.01141243427991867,
0.5957133173942566,
0.29160529375076294,
-0.32773739099502563,
0.27014416456222534,
-0.5448194146156311,
0.4530997574329376,
-0.10602635145187378,
0.3213641047477722,
-0.39434415102005005,
-0.32720237970352173,
0.3388596475124359,
-0.14634130895137787,
0.7407735586166... | |
I can't make td "Date" to have fixed height. If there is less in Body section td Date element is bigger than it should be - even if I set Date height to 10% and Body height to 90%. Any suggestions?
```
<tr>
<td class="Author" rowspan="2">
<a href="#">Claude</a><br />
<a href="#"><img src="Users/4/Avatar.jpeg... | [
0.5603340864181519,
-0.1960841864347458,
0.7787030935287476,
-0.001158247934654355,
-0.3518906831741333,
0.26651954650878906,
0.4724927246570587,
-0.7046368718147278,
-0.2867235839366913,
-0.44972872734069824,
0.1560114622116089,
0.19816236197948456,
-0.1288023144006729,
0.0473447851836681... | |
elit cursus. Quis ipsum nec rutrum id tellus aliquam. Tortor arcu fermentum nibh justo leo ante vitae fringilla. Pulvinar aliquam. Fringilla mollis facilisis.</span>
</td>
</tr>
```
And my css for now is:
```
table.ForumThreadViewer td.Date {
text-align: left;
vertical-align: top;
font-size: xx-small;
bor... | [
0.17537301778793335,
-0.08269990980625153,
0.932978630065918,
0.12546823918819427,
-0.027205288410186768,
0.34071728587150574,
0.33282727003097534,
-0.03391805291175842,
0.2574395537376404,
-0.7522695660591125,
-0.1661711484193802,
0.4508834779262543,
-0.41911521553993225,
-0.2922124564647... | |
<div class="author">
<a href="#">Claude</a><br />
<a href="#"><img src="Users/4/Avatar.jpeg" /></a>
</div>
<div class="content">
<div class="date">Sent: 18.08.2008 20:49:28</div>
<div class="body">
This is the content of the message.
</div>
</div>
<div class="clear"> </div... | [
0.08799349516630173,
-0.16058267652988434,
0.9455182552337646,
-0.08032820373773575,
-0.4401392638683319,
0.2628205120563507,
0.33871710300445557,
-0.27302032709121704,
-0.10677247494459152,
-0.5624412298202515,
-0.350992351770401,
-0.10417144000530243,
-0.15762431919574738,
0.187256619334... | |
margin-left: 150px;
}
div.date {
border-bottom: 1px solid #999;
}
div.clear {
clear: both;
height: 0;
line-height: 0;
}
``` | [
-0.3731573522090912,
0.06636901199817657,
0.9115469455718994,
0.01298952754586935,
0.09105780720710754,
0.21905939280986786,
-0.10980603098869324,
0.10308033972978592,
-0.20673076808452606,
-0.5064364671707153,
-0.4177250564098358,
0.09759096801280975,
0.2112213522195816,
0.121689744293689... | |
Ideally something that will work with Oracle, MS SQL Server, MySQL and Posgress.
if you mean common lisp by lisp, then there's **[cl-rdbms](http://common-lisp.net/project/cl-rdbms/)**. it is heavily tested on postgres (uses [postmodern](http://common-lisp.net/project/postmodern/) as the backend lib), it has a toy sqlit... | [
0.08988697081804276,
-0.00925552099943161,
0.38403233885765076,
0.2833033502101898,
-0.06826134026050568,
-0.10593363642692566,
-0.29759517312049866,
0.1813974678516388,
-0.028689919039607048,
-0.5225884914398193,
0.08273192495107651,
0.6895402669906616,
-0.08783544600009918,
-0.0405219718... | |
widely used sql lib for cl.
see [cliki page about sql](http://www.cliki.net/SQL) for a further reference. | [
0.21575136482715607,
0.042313963174819946,
0.1640934944152832,
0.14159949123859406,
-0.28839173913002014,
-0.376321405172348,
-0.2399284392595291,
0.34471896290779114,
-0.17120975255966187,
-0.02876872755587101,
-0.11294344812631607,
0.32284489274024963,
-0.2994413673877716,
0.140449091792... | |
I was trying to remove all the lines of a file except the last line but the following command did not work, although file.txt is not empty.
```
$cat file.txt |tail -1 > file.txt
$cat file.txt
```
Why is it so?
Redirecting from a file through a pipeline back to the same file is unsafe; if `file.txt` is overwritten b... | [
0.5340015888214111,
-0.08955443650484085,
0.41639599204063416,
-0.3542655110359192,
-0.00806207675486803,
0.005883747711777687,
0.58174067735672,
-0.1407354176044464,
-0.18919086456298828,
-0.446213960647583,
-0.06393629312515259,
0.7577038407325745,
-0.5798807144165039,
0.2549878060817718... | |
a security-sensitive environment and running as root, the following is more appropriate:
```
tempfile="$(mktemp file.txt.XXXXXX)"
chown --reference=file.txt -- "$tempfile"
chmod --reference=file.txt -- "$tempfile"
tail -1 file.txt >"$tempfile" && mv -- "$tempfile" file.txt
```
Another approach (avoiding temporary fi... | [
0.11261953413486481,
-0.23396775126457214,
0.17084170877933502,
-0.06357152760028839,
-0.056645650416612625,
-0.24161751568317413,
0.4045722186565399,
-0.3015982210636139,
-0.52138352394104,
-0.3722742199897766,
-0.3719399869441986,
0.5198126435279846,
-0.3040470480918884,
-0.1656596511602... | |
what configuration needs to be tweaked, and where does it live, in order to increase the maximum allowed post size?
Apache Tomcat by default sets a limit on the maximum size of HTTP POST requests it accepts. In Tomcat 5, this limit is set to 2 MB. When you try to upload files larger than 2 MB, this error can occur.
Th... | [
-0.060046788305044174,
-0.22312870621681213,
0.5603048801422119,
-0.20577721297740936,
-0.10658065974712372,
-0.1230609118938446,
0.6100863218307495,
-0.006015063263475895,
-0.26955604553222656,
-0.6589391827583313,
-0.15606652200222015,
0.45992153882980347,
-0.4012452960014343,
0.15574736... | |
bytes) to increase the limit. Setting it to 0 in will disable the size check. See the [Tomcat Configuration Reference](http://tomcat.apache.org/tomcat-5.5-doc/config/http.html) for more information. | [
-0.11661115288734436,
-0.10605118423700333,
0.356021523475647,
0.02578401193022728,
0.034285418689250946,
0.1461755931377411,
0.062466494739055634,
-0.17799127101898193,
-0.5062699317932129,
-0.07410399615764618,
-0.1419532746076584,
0.46756884455680847,
-0.23376765847206116,
0.27824157476... | |
Do I have to restart IIS if I drop a new DLL in the bin of my virtual directory?
No you do not have to, the application will recycle, but an IISReset is NOT needed | [
0.12040185928344727,
0.019410498440265656,
0.322270929813385,
0.19992221891880035,
0.2211274653673172,
-0.5155206918716431,
0.5806588530540466,
-0.05048009753227234,
-0.2925214171409607,
-0.3870660960674286,
-0.279143750667572,
0.6034148335456848,
-0.24577879905700684,
0.3796176612377167,
... | |
we're have a client that needs to get interactive messages from a server, from clients that are distributed around the world behind all kinds of firewalls with all kinds of ports closed. The only thing we can rely on is HTTP port 80 (and HTTPS 443).
The design is basically modeled after XMPP (the Jabber protocol), usi... | [
0.31396564841270447,
-0.1489926278591156,
0.6091650724411011,
0.057613663375377655,
-0.04813171178102493,
-0.04445439577102661,
0.22096313536167145,
0.14909370243549347,
-0.18905410170555115,
-0.6620238423347473,
-0.2044273167848587,
0.3358941376209259,
-0.3347255289554596,
0.1997291296720... | |
closed with a "no-data" response. The client immediately reopens the communication.
Well, theoretically.
What's actually happening is first, IIS can't handle more than about 100 simultaneous requests - others are all queued, and there can be a several minute lag between "connected" and IIS recognizing that the client... | [
-0.09893342107534409,
-0.19450797140598297,
0.6088235378265381,
0.009710715152323246,
-0.2698361277580261,
-0.029951442033052444,
0.4778684973716736,
0.08092235028743744,
-0.4171192944049835,
-0.4645712077617645,
-0.5266717672348022,
0.20098553597927094,
-0.3925122618675232,
0.496578842401... | |
there a configuration option we're missing, or is there something else I should look at to address this?
Thanks.
I think you're hitting ASP.NET thread pool limits, rather than IIS ones. Look into creating a asynchronous HTTP handler (`IHttpAsyncHandler`) as when they block/wait they aren't tying up the thread pool (th... | [
0.21174977719783783,
-0.49931490421295166,
-0.030123405158519745,
0.31731265783309937,
-0.31483525037765503,
-0.46746349334716797,
0.24142496287822723,
0.11056288331747055,
-0.599189043045044,
-0.750538170337677,
-0.029828133061528206,
0.2932374179363251,
-0.40971639752388,
0.0355232469737... | |
My Google-fu is failing me on this question.
I have a coworker who has Visual Studio 2005 on his machine. I have Visual Studio 2008. He wants to open a project I wrote in C# 3.0, and we've gotten that far, but VS2005 barfs on the 3.0 code, like `var`.
He has the 3.0 and 3.5 frameworks installed, as well as the Visual... | [
0.6122009754180908,
0.37524428963661194,
0.2087627649307251,
0.12451472133398056,
-0.07044463604688644,
-0.0265997052192688,
0.4071972966194153,
0.02603432536125183,
-0.06787232309579849,
-0.5072851181030273,
0.13403375446796417,
0.7104874849319458,
-0.2841566205024719,
0.02238006889820099... | |
VS2008 or the Express edition. That simply isn't possible at this time. :(
So far as I understand it, this isn't possible. If you weren't using the new C# 3.0 code features, he should be able to work with a project created in VS2008 (and compile it against the 2.0 framework), but I don't think the 2005 compiler is ever... | [
-0.0754694938659668,
0.06393516808748245,
0.37913137674331665,
0.09466566890478134,
-0.2024473398923874,
-0.3641324043273926,
0.49245360493659973,
-0.018195845186710358,
-0.15673662722110748,
-0.5610916018486023,
0.0802842304110527,
0.6877431869506836,
-0.5191450119018555,
-0.2215527445077... | |
I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:
* `1-234-567-8901`
* `1-234-567-8901 x1234`
* `1-234-567-8901 ext1234`
* `1 (234) 567-8901`
* `1.234.567.8901`
* `1/234/567/8901`
* `1234567... | [
0.19688642024993896,
0.5063032507896423,
0.5355360507965088,
0.04466824233531952,
-0.13915158808231354,
0.06077003851532936,
0.20289123058319092,
-0.3916642367839813,
0.07016175985336304,
-0.23205433785915375,
-0.1635865718126297,
0.1926892250776291,
-0.12607239186763763,
0.015636065974831... | |
entirely).
Then, you end up with values like:
```
12345678901
12345678901x1234
345678901x1234
12344678901
12345678901
12345678901
12345678901
+4112345678
+441234567890
```
Then when you display, reformat to your hearts content. e.g.
```
1 (234) 567-8901
1 (234) 567-8901 x1234
``` | [
0.31422144174575806,
0.2267739325761795,
0.3022545278072357,
0.08295006304979324,
0.03400156646966934,
0.20622475445270538,
0.3913055956363678,
-0.5351066589355469,
-0.35964757204055786,
-0.3106669485569,
0.020123202353715897,
0.6240742206573486,
-0.4286434054374695,
0.1728876382112503,
... | |
does any one know how to get the current motherboard, processor or HD temperature statistics?
In GNU/Linux, I know I could use something like hddtemp or sensord to get the info, and then parse it... but in Windows: How can I do this? And, Can it be done with with C# or Java or any other hight level programming langu... | [
0.5362873077392578,
0.03105255402624607,
0.4217153787612915,
0.5251172184944153,
-0.06338875740766525,
-0.3366430103778839,
-0.012749205343425274,
0.15382376313209534,
-0.15501825511455536,
-0.8131942749023438,
0.25092071294784546,
0.5538362860679626,
-0.10082371532917023,
0.17368198931217... | |
makers of CPU-Z utility) work by painstakingly cataloging the various sensors and bus controllers, and implementing corresponding protocols, usually using kernel-mode driver to access SMBus devices.
To embed this functionality in you own software, you can either develop this functionality yourself (possibly reducing t... | [
0.54034024477005,
0.04859628528356552,
0.424272358417511,
0.26702237129211426,
0.1410561352968216,
0.14832809567451477,
-0.24091316759586334,
-0.381347119808197,
-0.32089555263519287,
-0.5867692232131958,
-0.04990750923752785,
0.5323355793952942,
-0.05995025113224983,
0.10994677990674973,
... | |
I know that a SQL Server full text index can not index more than one table. But, I have relationships in tables that I would like to implement full text indexes on.
Take the 3 tables below...
```
Vehicle
Veh_ID - int (Primary Key)
FK_Atr_VehicleColor - int
Veh_Make - nvarchar(20)
Veh_Model - nvarchar(50)
Veh_LicenseP... | [
-0.1155802309513092,
0.2760973870754242,
0.5668503046035767,
0.17529675364494324,
-0.006546801887452602,
0.059826046228408813,
-0.04267499968409538,
-0.3733783960342407,
-0.20552857220172882,
-0.5419583916664124,
0.09988050907850266,
0.6197896003723145,
-0.15256920456886292,
0.278518438339... | |
a user is trying to search for a "Blue Ford Mustang". So what is the best solution considering that tables like Vehicle will get rather large?
Do I create another field in the "Vehicle" table that is "Veh Color" that holds the text value of what is selected in the drop down in addition to "FK Atr VehicleColor"?
Or, d... | [
0.06313560903072357,
0.10192996263504028,
0.33150628209114075,
0.25639456510543823,
-0.21543006598949432,
0.373821884393692,
-0.02022983506321907,
-0.1792546957731247,
-0.16679900884628296,
-0.37430453300476074,
0.07684201002120972,
0.5556168556213379,
0.025734638795256615,
-0.070519335567... | |
Attributes are dropped from the database.
-- Note: could not use underscore outside of code view as everything between two underscores is *italicized*.
I believe it's a common practice to have separate denormalized table specifically for full-text indexing. This table is then updated by triggers or, as it was in our c... | [
-0.0028407443314790726,
-0.08962219953536987,
0.6377015709877014,
0.1843147724866867,
-0.2148764282464981,
-0.05029069259762764,
-0.010309814475476742,
-0.2894690930843353,
-0.3253549039363861,
-0.6014797687530518,
0.2605988383293152,
0.5386788249015808,
0.07709289342164993,
0.149481654167... | |
How to disable standard ASP.NET handling of 401 response code (redirecting to login page) for AJAX/JSON requests?
For web-pages it's okay, but for AJAX I need to get right 401 error code instead of good looking 302/200 for login page.
**Update**:
There are several solutions from Phil Haack, PM of ASP.NET MVC - <http:... | [
0.03888874128460884,
-0.1377348154783249,
0.43083351850509644,
0.04700851812958717,
0.15512286126613617,
-0.133954718708992,
0.44278496503829956,
-0.4919779896736145,
-0.14673581719398499,
-0.688635528087616,
-0.20020121335983276,
0.6386808753013611,
-0.5138725638389587,
-0.337737798690795... | |
this shouldn't be a big deal. | [
0.3782538175582886,
0.07591360807418823,
0.07444329559803009,
-0.018489385023713112,
0.03379417583346367,
-0.4244723618030548,
-0.00476832315325737,
0.1713755875825882,
-0.10030091553926468,
0.02945840358734131,
0.07264585793018341,
0.11673250794410706,
-0.18481583893299103,
0.209289953112... | |
Let's say I have the following `class X` where I want to return access to an internal member:
```
class Z
{
// details
};
class X
{
std::vector<Z> vecZ;
public:
Z& Z(size_t index)
{
// massive amounts of code for validating index
Z& ret = vecZ[index];
// even more code for d... | [
-0.1774621158838272,
0.002102535218000412,
0.4353936016559601,
0.19627231359481812,
0.020275361835956573,
0.12636977434158325,
0.11285664141178131,
-0.11714664101600647,
-0.2854195237159729,
-0.6798570156097412,
-0.06759267300367355,
0.6440907716751099,
-0.14571216702461243,
0.516177177429... | |
(a process
// which involves calculating leap years in which
// religious holidays fall on Tuesdays for
// the next thousand years or so)
return ret;
}
const Z& Z(size_t index) const
{
// identical to non-const X::Z(), except printed in
// a lighter shade of ... | [
0.1823185831308365,
0.0049619609490036964,
0.5303984880447388,
-0.11007653176784515,
0.06446615606546402,
-0.014810582622885704,
0.38055112957954407,
0.47603854537010193,
-0.32497528195381165,
-0.2989823818206787,
-0.4528915286064148,
0.22681501507759094,
-0.13903605937957764,
0.1640828400... | |
// we're running low on toner by this point
}
};
```
The two member functions `X::Z()` and `X::Z() const` have identical code inside the braces. This is duplicate code **and can cause maintenance problems for long functions with complex logic**.
Is there a way to avoid this code duplication?
Yes, it is possible... | [
0.3751963973045349,
0.2135762870311737,
0.1534036248922348,
-0.038085538893938065,
0.11502055823802948,
0.17101061344146729,
0.44877517223358154,
-0.013762066140770912,
0.14249148964881897,
-0.34246718883514404,
0.10663358867168427,
0.7402594089508057,
-0.37207096815109253,
-0.011237891390... | |
functions returns a pointer):
```
class X
{
std::vector<Z> vecZ;
public:
const Z& z(size_t index) const
{
// same really-really-really long access
// and checking code as in OP
// ...
return vecZ[index];
}
Z& z(size_t index)
{
// One line. One ugly, ugly line - but ju... | [
-0.21768461167812347,
-0.40775373578071594,
0.7008676528930664,
-0.06299684196710587,
-0.07482416927814484,
0.3126924932003021,
0.1549573391675949,
-0.1528599113225937,
-0.14595994353294373,
-0.49335670471191406,
-0.1630464792251587,
0.6629049777984619,
-0.43044233322143555,
0.202018857002... | |
A slightly less-ugly version
Z& Z(size_t index)
{
// Two lines -- one cast. This is slightly less ugly but takes an extra line.
const X& constMe = *this;
return const_cast<Z&>( constMe.z(index) );
}
#endif
};
```
**NOTE:** It is important that you do **NOT** put the logic in the non-const ... | [
-0.1347341537475586,
-0.06382346898317337,
0.47532790899276733,
-0.19547338783740997,
-0.1996595710515976,
0.1721009761095047,
0.5663116574287415,
0.06360600888729095,
0.12803365290164948,
-0.7294692397117615,
-0.040680892765522,
0.5733864307403564,
-0.3437316417694092,
0.15779957175254822... | |
non-const member function may accidentally modify the class, which the C++ standard states will result in undefined behavior. | [
-0.1975676566362381,
-0.020890308544039726,
-0.17799055576324463,
0.07036043703556061,
0.020722990855574608,
-0.23675470054149628,
0.23256352543830872,
0.1254999339580536,
0.014514618553221226,
-0.17050054669380188,
-0.46371856331825256,
0.3736327290534973,
-0.46992096304893494,
0.29351699... | |
I'm the leader of a small web development team, and I have a feeling that we will have a couple telecommuters joining the team pretty soon (either new employees, or existing employees that will begin telecommuting). Any idea how to effectively manage and collaborate with developers working remotely?
Most of the work w... | [
0.7987411022186279,
0.21919046342372894,
-0.0819060429930687,
0.03734099119901657,
0.2761084735393524,
-0.013696682639420033,
0.10426587611436844,
0.15560096502304077,
-0.25343286991119385,
-0.5021796226501465,
0.04429186135530472,
0.6944207549095154,
0.40324583649635315,
-0.11425888538360... | |
something like that. The biggest problem we have when people occasionally work from home is collaborating - it's tough to work together without the benefit of a whiteboard and hand-waving.
It seems like software development is perfect for telecommuting, but I haven't been able to find many good resources about the pra... | [
0.9932300448417664,
0.18246643245220184,
0.005427118856459856,
0.08752948045730591,
0.33501777052879333,
0.1318136602640152,
0.2617908716201782,
0.26950544118881226,
-0.36382177472114563,
-0.37107136845588684,
0.20200222730636597,
0.6180517673492432,
0.381499707698822,
-0.04393098503351211... | |
"suggest"). I think they're mostly common-sense, but you never know...
1. [Everyone] Communicate well. When you're having a conversation face-to-face, you can be verbose and explain things in a round-a-bout way. When you're limited to email, IM and phone, all parties need to explain themselves fully but succinctly. I ... | [
0.52305668592453,
0.11620199680328369,
0.06850093603134155,
0.15123668313026428,
-0.36473631858825684,
-0.3680707514286041,
0.32706496119499207,
-0.24103078246116638,
0.07968997955322266,
-0.5262722373008728,
0.01749732904136181,
0.33190420269966125,
-0.14182111620903015,
-0.28056246042251... | |
emails and sharing whiteboard ideas. Most online project apps allow for that by default.
3. [Management] Don't pester devs. If you need something urgently, set the status of the ticket, give them a call and chase them up later on in the day. **Half-hourly emails asking "is it done yet?" does more harm than good!**
4. [... | [
0.6869305968284607,
-0.14050136506557465,
0.41452059149742126,
0.4396628439426422,
-0.07261531800031662,
-0.38444092869758606,
0.24291574954986572,
0.16377408802509308,
-0.37833720445632935,
-0.6196139454841614,
0.05277414992451668,
0.33663538098335266,
-0.032864928245544434,
-0.1872365772... | |
them to accidentally sit on it. I don't want to have to chase up things like that because it's, frankly, not what I'm being paid for.
5. [Management] Make sure people have something to do. If you send them home with nothing on their task list that they can immediately action, they're not going to put in the effort. It'... | [
0.5926580429077148,
0.0811375230550766,
-0.172374427318573,
0.13564132153987885,
-0.026756372302770615,
-0.12607580423355103,
-0.06901270151138306,
0.2504243850708008,
-0.6838158369064331,
-0.45989519357681274,
-0.0544489324092865,
0.5182432532310486,
0.007651973981410265,
-0.2277274131774... | |
I will choose Java as an example, most people know it, though every other OO language was working as well.
Java, like many other languages, has interface inheritance and implementation inheritance. E.g. a Java class can inherit from another one and every method that has an implementation there (assuming the parent is ... | [
0.057250235229730606,
0.12017446011304855,
-0.32794851064682007,
-0.1086176261305809,
-0.059034354984760284,
-0.2269744873046875,
0.015300585888326168,
-0.061469290405511856,
-0.2136962115764618,
-0.7716208696365356,
0.10462021827697754,
0.3772468566894531,
-0.32988372445106506,
0.19596947... | |
interface, without implementation. Actually interfaces are really named that way in Java, they provide interface inheritance, but without inheriting any implementation, since all methods of an interface have no implementation.
Now there was this [article, saying it's better to inherit interfaces than implementations](... | [
-0.015229592099785805,
-0.05547795817255974,
0.10638662427663803,
-0.016554968431591988,
-0.4372170865535736,
-0.3714430034160614,
0.15526387095451355,
-0.22777137160301208,
-0.29546552896499634,
-0.6653097867965698,
0.311276912689209,
0.5114268064498901,
-0.473432719707489,
0.090647794306... | |
inheritance means **code reuse**, one of the most important properties of OO languages. Now if Java had no classes (like James Gosling, the godfather of Java has wished according to this article), it solves all problems of implementation inheritance, but how would you make code reuse possible then?
E.g. if I have a cl... | [
0.03616466373205185,
0.04325694963335991,
-0.33861154317855835,
0.1483401656150818,
-0.1395309716463089,
-0.06622735410928726,
0.20748376846313477,
-0.36560970544815063,
-0.2431250959634781,
-0.4667971432209015,
0.16670769453048706,
0.5713842511177063,
-0.3246403634548187,
0.00665905559435... | |
most would simply keep the inherited move, as they move alike just like the abstract parent Car. Now assume for a second that there are only interfaces in Java, only interfaces may inherit from each other, a class may implement interfaces, but all classes are always final, so no class can inherit from any other class.
... | [
0.0229856688529253,
-0.18821845948696136,
-0.059167616069316864,
0.20676128566265106,
-0.1825905442237854,
0.1278708130121231,
-0.1440729945898056,
-0.028722286224365234,
-0.33424249291419983,
-0.7547426223754883,
0.07880270481109619,
0.46868783235549927,
-0.10394572466611862,
0.0204607024... | |
Mixins. Are Mixins the answer to my question? I read about them, but I cannot really imagine how Mixins would work in a Java world and if they can really solve the problem here.
Another idea was that there is a class that only implements the Car interface, let's call it AbstractCar, and implements the move() method. N... | [
0.5089862942695618,
0.05947621539235115,
0.1201968714594841,
0.15689262747764587,
-0.21854372322559357,
0.27211710810661316,
-0.179176464676857,
-0.02065262570977211,
-0.09722858667373657,
-0.6285911798477173,
0.27263978123664856,
0.5520416498184204,
-0.41197553277015686,
0.052242178469896... | |
method - okay, JIT could inline the code, but still) and using extra memory for keeping internal objects, you wouldn't even need with implementation inheritance? (after all every object needs more memory than just the sum of the encapsulated data) Also isn't it awkward for a programmer to write dummy methods like
```
... | [
-0.04062553867697716,
-0.020388076081871986,
0.09855527430772781,
0.4228442907333374,
-0.3160339593887329,
-0.04632238671183586,
0.30665192008018494,
-0.35726016759872437,
-0.1831466108560562,
-0.27749595046043396,
0.39537832140922546,
0.36438992619514465,
-0.41569846868515015,
-0.16443572... | |
abstract and design with inheritance in mind, etc. )
Long answer:
Well, inheritance is not actually for "code re-use", it is for class "specialization", I think this is a misinterpretation.
For instance is it a very bad idea to create a Stack from a Vector, just because they are alike. Or properties from HashTable ... | [
0.05687106400728226,
-0.04622335731983185,
-0.1365022361278534,
0.23115067183971405,
-0.29124900698661804,
-0.05180908367037773,
-0.020803475752472878,
-0.32725051045417786,
-0.3454936146736145,
-0.5759555101394653,
0.01914939284324646,
0.5957621932029724,
-0.2978629171848297,
0.1045228615... | |
now have libraries that can be easily distributed; for instance in java the jar files can be used in any project saving thousands of hours of development. OO still has some problems with portability and things like that, that is the reason now WebServices are so popular ( as before it was CORBA ) but that's another thr... | [
0.10896430909633636,
0.08019818365573883,
0.1996719390153885,
0.1836344301700592,
-0.11513763666152954,
-0.5002531409263611,
0.15825200080871582,
0.13306884467601776,
-0.5520588159561157,
-0.7791090607643127,
0.06597334891557693,
0.1257796734571457,
-0.1997804045677185,
0.3871617913246155,... | |
the item 17 in the book previously mentioned; **Item 17: Design and document for inheritance or else prohibit it.** See [Effective]
Of course you may have a Car class and tons of subclasses. And yes, the approach you mention about Car interface, AbstractCar and CarImplementation is a correct way to go.
You define th... | [
0.4539283812046051,
0.23431898653507233,
0.10448348522186279,
0.210182324051857,
-0.2612994909286499,
-0.04061679542064667,
-0.048185206949710846,
-0.2164442092180252,
-0.09176845103502274,
-0.5292381048202515,
-0.01573149301111698,
0.7590017318725586,
0.19322392344474792,
-0.0503888390958... | |
this by marking the method as abstract.
When you proceed this way, there is not a problem with the "fragile" class ( or at least the designer is conscious or the threat ) and the subclasses do complete only those parts the designer allow them.
Inheritance is more to "specialize" the classes, in the same fashion a Tru... | [
-0.04367860034108162,
-0.09218417853116989,
-0.03536657243967056,
0.47420698404312134,
-0.17606046795845032,
-0.15609610080718994,
0.13741391897201538,
-0.4331296682357788,
-0.25605517625808716,
-0.5400617122650146,
-0.12250052392482758,
0.4199983775615692,
0.08916858583688736,
0.148843050... | |
below just to save lines of code. It belongs to a different domain, and it will be used for other purposes.
The way to prevent "implementation" inheritance is in the programming language since the beginning, you should use the final keyword on the class declaration and this way you are prohibiting subclasses.
Subcl... | [
0.48347777128219604,
-0.1343706101179123,
-0.09444206207990646,
-0.0663551390171051,
-0.051630500704050064,
-0.4302296042442322,
0.7120677828788757,
-0.04948985576629639,
-0.16931705176830292,
-0.6273882985115051,
-0.006990364752709866,
0.4123392105102539,
-0.27113646268844604,
0.363283514... | |
to design good API's and why it matters" See [Good API]
Keep reading articles and with time and practice ( and a lot of patience ) this thing will come clearer. Although sometime you just need to do the work and copy/paste some code :P . This is ok, as long you try to do it well first.
Here are the references both fr... | [
0.4817501902580261,
0.44368764758110046,
-0.1600857824087143,
0.03800853341817856,
-0.19448979198932648,
-0.03245677053928375,
0.4513402283191681,
-0.25342199206352234,
0.007876924239099026,
-0.5319016575813293,
-0.16025710105895996,
0.6126068830490112,
-0.03258639574050903,
-0.40761947631... | |
talks on API's design, reusability and related topics.
It is a little lengthy but it worth every minute.
[How To Design A Good API and Why it Matters](http://www.youtube.com/watch?v=aAb7hSCtvGw)
Regards.
---
Update: Take a look at minute 42 of the video link I sent you. It talks about this topic:
"When you have t... | [
0.5259086489677429,
0.138452410697937,
0.19117003679275513,
0.09236403554677963,
-0.34368619322776794,
-0.06762808561325073,
0.37682926654815674,
-0.08623165637254715,
0.0067259520292282104,
-0.4069247841835022,
0.11251812428236008,
0.48505833745002747,
0.2066841423511505,
0.04273948073387... | |
Is there a way to tell SQL Server 2008 Express to log every query (including each and every SELECT Query!) into a file?
It's a Development machine, so the negative side effects of logging Select-Queries are not an issue.
Before someone suggests using the SQL Profiler: This is not available in Express (does anyone kno... | [
-0.07895370572805405,
-0.07990166544914246,
0.20831187069416046,
0.051290255039930344,
-0.19961073994636536,
-0.24453409016132355,
0.3510238826274872,
0.17383728921413422,
-0.3607427775859833,
-0.5291882157325745,
0.43409809470176697,
0.43330255150794983,
-0.3402692973613739,
0.03750663623... | |
the "Event Selection" Tab
* Select the items you want to log.
* TSQL → SQL:BatchStarting will get you sql selects
* Stored Procedures → RPC:Completed will get you Stored Procedures.
More information from Microsoft: SQL Server 2008 Books Online - [Using SQL Server Profiler](http://msdn.microsoft.com/en-us/library/ms187... | [
-0.16770698130130768,
-0.41560277342796326,
0.2577325105667114,
0.021785086020827293,
-0.2449052333831787,
-0.2628990709781647,
0.12921209633350372,
-0.18682895600795746,
-0.41832834482192993,
-0.3641405999660492,
-0.104019396007061,
0.3026496171951294,
-0.28902962803840637,
-0.07383555173... | |
I am using Visual Studio 2005 with Team Foundation Server.
When I right click a file under the source control and choose "compare" VS appears to freeze until I hit escape. My guess is that the window that is supposed to be popping up is somewhere I can't get to. I tried minimizing all the windows that I can and it is ... | [
-0.19941091537475586,
-0.1351005733013153,
0.47762998938560486,
-0.09773125499486923,
-0.2879043221473694,
0.12163625657558441,
0.5938652753829956,
-0.4484513998031616,
-0.2880564033985138,
-0.870442271232605,
0.14505617320537567,
0.4282919466495514,
-0.2706671953201294,
0.0373791195452213... | |
the mouse it should jump to it.
Experiment with a window you can see first. | [
0.1607435643672943,
-0.3377600908279419,
0.07682276517152786,
0.25613850355148315,
0.20895574986934662,
0.013319317251443863,
-0.10057792067527771,
0.02694389596581459,
-0.045019492506980896,
-0.5039712190628052,
-0.04498685896396637,
0.6370363235473633,
-0.15985749661922455,
-0.1135742142... | |
If my code throws an exception, sometimes - not everytime - the jsf presents a blank page. I´m using facelets for layout.
A similar error were reported at this [Sun forumn´s post](http://forums.sun.com/thread.jspa?messageID=10237827), but without answers.
Anyone else with the same problem, or have a solution?
;)
Due t... | [
-0.03630225360393524,
0.4606977701187134,
0.4644473195075989,
-0.20850703120231628,
-0.3499314486980438,
0.11292241513729095,
0.3879343569278717,
-0.23035085201263428,
-0.40682271122932434,
-0.773720920085907,
-0.00657682167366147,
0.3109937906265259,
-0.3168654143810272,
0.017589217051863... | |
<BEA-101107> <[weblogic.servlet.internal.WebAppServletContext@6d46b9 - appName: 'ControlPanelEAR', name: 'ControlPanelWeb', context-path: '/Web'] Problem occurred while serving the error page.
javax.servlet.ServletException: viewId:/error.xhtml - View /error.xhtml could not be restored.
at javax.faces.webapp.FacesS... | [
-0.26051199436187744,
0.47073569893836975,
0.3020693361759186,
-0.11421102285385132,
-0.12115989625453949,
0.44728705286979675,
0.7704616785049438,
-0.8838210105895996,
-0.3375352919101715,
-0.25025370717048645,
-0.07938748598098755,
0.16526053845882416,
-0.3066267967224121,
0.134109929203... | |
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
javax.faces.application.ViewExpiredException: viewId:/error.xhtml - View /error.xhtml could not be restored.
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:180)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java... | [
0.13651570677757263,
0.14176352322101593,
0.5846033692359924,
-0.2871572971343994,
-0.13045094907283783,
0.27878665924072266,
0.6278623342514038,
-0.3476484715938568,
-0.4594537317752838,
-0.9187805652618408,
-0.22123463451862335,
0.5146288871765137,
-0.2698543965816498,
-0.204537019133567... | |
during our development phase.
But the best advice I can give you is to catch the exceptions and log them in an error log so you have the stack trace for debugging later. For messages that we couldn't do anything about like a backend failing we would just add a fatal message to the FacesContext that gets displayed on ... | [
0.09507369995117188,
0.04834069684147835,
0.10557382553815842,
0.1008858010172844,
-0.1704893708229065,
-0.09583541750907898,
0.5413443446159363,
0.05559742450714111,
-0.1024935394525528,
-0.3788736164569855,
0.3461879789829254,
0.3371642529964447,
-0.19253163039684296,
-0.2336086481809616... | |
I have a method that periodically (e.g. once in every 10 secs) try to connect to a server and read some data from it. The server might not be available all the time. If the server is not available the method throws an exception.
What would be the best way to implement a wrapper method that doesn't throw an exception e... | [
0.3478371500968933,
-0.13716799020767212,
0.24881386756896973,
0.34854453802108765,
0.05033846199512482,
-0.29247695207595825,
0.4242171049118042,
0.1674572378396988,
-0.25319066643714905,
-0.6896824836730957,
0.3123759329319,
0.059219151735305786,
-0.09020873159170151,
0.20272193849086761... | |
If that time is more than a minute, rethrow the exception. | [
0.12642088532447815,
0.16001136600971222,
0.2412707358598709,
-0.016708530485630035,
0.09549009799957275,
-0.32633692026138306,
0.06725931167602539,
0.13375404477119446,
-0.03152036666870117,
-0.6494254469871521,
-0.2825690507888794,
-0.0072700087912380695,
0.18648174405097961,
0.006725699... | |
How do I download all files in a directory and all subdirectories on an HTTP server?
If directory browsing is enabled on the server then you can crawl the directory listings, i.e. Use HttpWebRequest to get the listing page, parse the response to find the file links, download each file (also with HttpWebRequest), naviga... | [
0.3878423869609833,
-0.3268393278121948,
0.49661681056022644,
0.27163460850715637,
-0.17362026870250702,
-0.1963108777999878,
0.28454750776290894,
-0.08070573210716248,
-0.28331345319747925,
-0.9794539213180542,
-0.1052514910697937,
0.6132558584213257,
-0.055430393666028976,
0.412718743085... | |
I have created a bunch of movie clips which all have similar names and then after some other event I have built up a string like:
```
var clipName = "barLeft42"
```
which is held inside another movie clip called 'thing'.
I have been able to get hold of a reference using:
```
var movieClip = Eval( "_root.thing." + ... | [
0.5467092990875244,
0.05793339014053345,
0.2624605596065521,
0.28459280729293823,
-0.025731435045599937,
-0.06378506869077682,
-0.12424734979867935,
-0.41820573806762695,
-0.19716700911521912,
-0.2795245051383972,
-0.033361129462718964,
0.5932403802871704,
-0.1055235043168068,
0.2272210866... | |
the trick for you... | [
0.06515216827392578,
-0.03868874907493591,
0.3500675559043884,
0.06145510822534561,
0.1415291130542755,
-0.03912625461816788,
0.29504263401031494,
-0.07353364676237106,
-0.01855350472033024,
-0.22510716319084167,
0.13071197271347046,
0.6581491827964783,
0.13379359245300293,
-0.138489678502... | |
I'm trying to pass in a Base64 string into a C#.Net web application via the QueryString. When the string arrives the "+" (plus) sign is being replaced by a space. It appears that the automatic URLDecode process is doing this. I have no control over what is being passed via the QueryString. Is there any way to handle th... | [
0.11454115808010101,
0.3118998110294342,
0.39988023042678833,
-0.21586278080940247,
-0.05484575778245926,
0.046343278139829636,
0.5259397029876709,
-0.09200039505958557,
0.0001370752288494259,
-0.6538469791412354,
-0.15676341950893402,
0.2219710499048233,
-0.41053277254104614,
0.3380860984... | |
had though of this but my concern with it, and I should have mentioned this to start, is that I don't know what *other* characters might be malformed in addition to the plus sign.
***My main goal is to intercept the QueryString before it is run through the decoder.***
To this end I tried looking at Request.QueryStrin... | [
-0.0383194163441658,
-0.015280906111001968,
0.43234145641326904,
0.0848243311047554,
-0.2772352397441864,
-0.15137183666229248,
0.47067347168922424,
0.16668818891048431,
-0.0274185873568058,
-0.6393658518791199,
-0.09561770409345627,
0.42834869027137756,
-0.1675507128238678,
0.194438710808... | |
encode GET requests.
You could manually replace the value (`argument.Replace(' ', '+')`) or consult the `HttpRequest.ServerVariables["QUERY_STRING"]` (even better the HttpRequest.Url.Query) and parse it yourself.
You should however try to solve the problem where the URL is given; a plus sign needs to get encoded as "%... | [
0.3411928415298462,
-0.1789097934961319,
0.2438172996044159,
0.14843788743019104,
-0.2133963406085968,
-0.19617977738380432,
0.2999350428581238,
-0.10459940880537033,
0.2239493876695633,
-0.8366691470146179,
-0.30722466111183167,
0.08188598603010178,
-0.5613942742347717,
0.0574214458465576... | |
Using MS SQL Server Management Studio 2005 - To Restore a Database:
* Restore Database
* `(*) From Device:`
* Click "`...`" Button
* `Backup media: File`
* Click "`Add`" Button
* Popup Window: "`Locate Backup File`"
That window Defaults to `C:\Program Files\Microsoft SQL Server\MSSQL.1\Backup`
How do I configure MS ... | [
-0.6588606238365173,
0.21130765974521637,
0.5198360085487366,
-0.03470690920948982,
0.007985293865203857,
-0.003375538857653737,
0.3343246281147003,
-0.2103234827518463,
-0.3721758723258972,
-0.5333884358406067,
-0.3718947172164917,
0.8045319318771362,
-0.09449952840805054,
0.0935671851038... | |
> **Possible Duplicate:**
>
> [Choosing between MEF and MAF (System.AddIn)](https://stackoverflow.com/questions/835182/choosing-between-mef-and-maf-system-addin)
Is the Managed Extensibility Framework a replacement for System.Addin? Or are they complementary?
It is touched in the MSDN Forums here:
[Comparison to t... | [
0.14086413383483887,
-0.14163616299629211,
0.1219627857208252,
-0.06146272271871567,
0.10357563942670822,
0.3038390278816223,
0.01927679032087326,
-0.158672034740448,
-0.3144409954547882,
-0.8166057467460632,
0.027990451082587242,
0.21595719456672668,
0.07782358676195145,
0.167777672410011... | |
I'd like to slice and dice large datafiles, up to a gig, in a fairly quick and efficient manner. If I use something like UNIX's "CUT", it's extremely fast, even in a CYGWIN environment.
I've tried developing and benchmarking various Ruby scripts to process these files, and always end up with glacial results.
What w... | [
0.42384570837020874,
0.09039079397916794,
-0.34080052375793457,
0.20107987523078918,
-0.14955170452594757,
0.17036734521389008,
-0.24887430667877197,
0.1089848056435585,
-0.13433566689491272,
-0.4912174344062805,
0.03967815265059471,
0.6506549715995789,
-0.09439173340797424,
-0.03527233004... | |
backticks like this:
```
puts `cut somefile > foo.fil`
# process each line of the output from cut
f = File.new("foo.fil")
f.each{|line|
}
``` | [
0.43649083375930786,
-0.13831456005573273,
0.3467251658439636,
-0.1409132331609726,
-0.2717151939868927,
0.32168054580688477,
-0.2802327573299408,
-0.2895474433898926,
-0.1402399241924286,
-0.27727723121643066,
-0.03061838448047638,
0.4986429810523987,
-0.3279702663421631,
-0.0209384355694... | |
Mixing the use of primitive data types and their respective wrapper classes, in Java, can lead to a lot of bugs. The following example illustrates the issue:
```
int i = 4;
...
if (i == 10)
doStuff();
```
Later on you figure that you want the variable *i* to be either defined or undefined, so you change the above ... | [
0.3396523594856262,
0.13169147074222565,
-0.2633558213710785,
-0.2838100790977478,
-0.0670851394534111,
-0.1586078405380249,
0.3676846921443939,
-0.48605629801750183,
0.0046732788905501366,
-0.333976149559021,
0.13738426566123962,
0.5239894390106201,
-0.7338502407073975,
0.1016140133142471... | |
memory footprint? Are there any sneaky gotchas?
Using the boxed types *does* have both performance and memory issues.
When doing comparisons (eg `(i == 10)` ), java has to unbox the type before doing the comparison. Even using `i.equals(TEN)` uses a method call, which is costlier and (IMO) uglier than the == syntax.
... | [
-0.13338306546211243,
-0.12056338787078857,
-0.1846030354499817,
0.00973571091890335,
-0.3623303771018982,
0.08405552804470062,
0.41460108757019043,
0.0085420748218894,
0.08618864417076111,
-0.730567991733551,
0.2196282148361206,
0.4158603549003601,
-0.2589013874530792,
-0.2451037615537643... | |
those cases. | [
0.1065266951918602,
0.12425070255994797,
-0.22603753209114075,
0.10979191213846207,
-0.025861412286758423,
0.10148978233337402,
-0.16226054728031158,
0.03768922761082649,
-0.11193370074033737,
-0.3164248764514923,
-0.01665082760155201,
0.4272841215133667,
-0.24057899415493011,
0.0472394041... | |
Please explain to me why the very last `echo` statement is blank? I expect that `XCODE` is incremented in the while loop to a value of 1:
```
#!/bin/bash
OUTPUT="name1 ip ip status" # normally output of another command with multi line output
if [ -z "$OUTPUT" ]
then
echo "Status WARN: No messages from SMcli"
... | [
0.4037751257419586,
-0.09037834405899048,
0.10917887836694717,
-0.20174452662467957,
0.20544075965881348,
-0.3517357409000397,
0.5655270218849182,
-0.41529789566993713,
-0.41484713554382324,
-0.1916433423757553,
-0.24501347541809082,
0.521561861038208,
-0.21954618394374847,
0.0663658455014... | |
if [ "$STATUS" != "Optimal" ]
then
echo "CRIT: $NAME - $STATUS"
echo $((++XCODE))
else | [
0.14996616542339325,
0.0155903035774827,
0.16590166091918945,
-0.3453913629055023,
0.3728962242603302,
-0.07987275719642639,
0.23167027533054352,
-0.48767194151878357,
-0.07518195360898972,
-0.18434911966323853,
-0.1432262808084488,
0.32046374678611755,
-0.5312085151672363,
0.1176734790205... | |
echo "OK: $NAME - $STATUS"
fi
done
fi
echo $XCODE
```
I've tried using the following statement instead of the `++XCODE` method
```
XCODE=`expr $XCODE + 1`
```
and it too won't print outside of the while statement. I think I'm missing something about variable scope here, but the ol' man pag... | [
0.32194632291793823,
0.1904924362897873,
0.11649655550718307,
-0.43879249691963196,
0.050574105232954025,
-0.15828193724155426,
0.5459139347076416,
-0.2878814935684204,
-0.11521224677562714,
0.1142277643084526,
0.007921773940324783,
0.3940660059452057,
-0.7313979268074036,
0.08274238556623... | |
run the while loop.
Now this child process has its own copy of the environment and can't pass any
variables back to its parent (as in any unix process).
Therefore you'll need to restructure so that you're not piping into the loop.
Alternatively you could run in a function, for example, and `echo` the value you
want r... | [
0.38146457076072693,
-0.6293463110923767,
0.013672003522515297,
-0.14307734370231628,
0.03720387816429138,
0.03463219106197357,
0.358484148979187,
0.1786610335111618,
-0.4220147728919983,
-0.024431142956018448,
-0.11893612146377563,
0.5563808083534241,
-0.4939092993736267,
0.05647574365139... | |
I'm doing a sitemap producer in Object Pascal and need a good function or lib to emulate the [parse\_url](http://php.net/manual/en/function.parse-url.php) function on PHP.
Does anyone know of any good ones?
Freepascal has the unit URIParser with the ParseURI function. An example how to use it can be found in one of th... | [
0.2232455313205719,
0.31419894099235535,
0.3772004246711731,
0.08007151633501053,
-0.11808831989765167,
-0.2505013942718506,
0.09488267451524734,
0.18004952371120453,
-0.07312823086977005,
-0.5890370607376099,
0.08134232461452484,
0.23487171530723572,
-0.13641217350959778,
0.31798505783081... | |
I currently filter some message from my inbox with these steps:
```
select inbox
pick messages
set \Deleted tag
```
and then repeat the process after selecting Trash.
Is there a more direct way of disposing of these messages? Or is it just the feature of the Mail server that deleting a message puts it in the trash,... | [
0.3899460732936859,
-0.06014307960867882,
0.08286481350660324,
-0.2501012086868286,
-0.08584217727184296,
-0.0834059789776802,
0.30245500802993774,
-0.10249189287424088,
-0.2552475929260254,
-0.6702402234077454,
0.027742592617869377,
0.17036354541778564,
-0.4735836982727051,
0.099263876676... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.