text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
public override SoapFilter CreateServiceInputFilter(FilterCreationContext context)
{
return null;
}
public override SoapFilter CreateServiceOutputFilter(FilterCreationContext context)
{
return null;
}
}
```
Then in your web service proxy's contructo... | [
-0.13292190432548523,
-0.10887972265481949,
0.514987587928772,
-0.03276408836245537,
0.2932666540145874,
-0.1800186038017273,
0.5180611610412598,
-0.2754046618938446,
0.19298923015594482,
-0.8095481991767883,
-0.3532654047012329,
0.3909468352794647,
-0.3350105881690979,
0.1435413509607315,... | |
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Web.Services.WebServiceBindingAttribute(Name="MyBinding", Namespace="http://example.com")]
public partial class MyWebClient : WebServicesClientProtocol {
// ... member variables... | [
-0.01235178392380476,
0.03381580486893654,
0.3885442018508911,
0.0007362583419308066,
0.232363760471344,
0.16156086325645447,
0.12940233945846558,
0.035314418375492096,
-0.23032470047473907,
-0.7700002193450928,
-0.2326096147298813,
0.3287871181964874,
-0.21253378689289093,
0.2404867261648... | |
== true)) {
this.UseDefaultCredentials = true;
this.useDefaultCredentialsSetExplicitly = false;
}
else {
this.useDefaultCredentialsSetExplicitly = true;
} | [
-0.06872747093439102,
0.11510185152292252,
0.6467456221580505,
-0.25962671637535095,
0.23035483062267303,
0.29872748255729675,
0.9322518110275269,
-0.4344257414340973,
-0.2532046437263489,
-0.33976805210113525,
-0.5824432373046875,
0.8360911011695862,
-0.2249196618795395,
-0.30220335721969... | |
// Apply policy here
Policy policy = new Policy();
policy.Assertions.Add(new MyAssertion());
this.SetPolicy(policy);
}
}
``` | [
0.35350677371025085,
0.06876926124095917,
0.6680883169174194,
-0.2876649796962738,
0.1459851861000061,
-0.09496105462312698,
0.08313634991645813,
-0.44148173928260803,
-0.28843533992767334,
-0.5629174113273621,
-0.3382459282875061,
0.8798898458480835,
-0.3741350769996643,
0.374683231115341... | |
Ok, this is only the second stored procedure I've written. I think you'll get the idea, I'm trying to close a credit line, and all invoices, charges, notes, etc with it. But I get a syntax error.
The goal is to CALL close\_account\_proc(398985994)
```
DELIMITER $$
CREATE
PROCEDURE `cc`.`close_account_proc`(cid IN... | [
-0.051835887134075165,
0.22641174495220184,
0.7558744549751282,
-0.19273443520069122,
0.18379183113574982,
-0.142738476395607,
-0.1245427057147026,
0.16812890768051147,
-0.3579155206680298,
-0.32582351565361023,
-0.22568510472774506,
0.6209707260131836,
-0.1351039856672287,
0.4161276817321... | |
UPDATE sbal_sbl SET status_sbl = 'voided', void_date_sbl = NOW() WHERE credit_used_acc = cid;
INSERT INTO notes_not SET uid_usr = @uid_usr, initials_not = 'SYS',status_not = 'complete', date_not = NOW(), text_not = 'Closed credit line '.cid;
UPDATE invoices_inv SET status_inv = 'voided', void_date_inv = NOW() ... | [
-0.07688530534505844,
0.03605937957763672,
0.7666281461715698,
-0.2489996999502182,
0.15742139518260956,
0.043634314090013504,
0.20875447988510132,
-0.0052298326045274734,
-0.20540468394756317,
-0.6071438193321228,
-0.22922272980213165,
0.40683305263519287,
-0.17559631168842316,
0.18273723... | |
type\_acc = 'init' and credit\_used\_acc ' at line 5.
Any ideas?
```
DELIMITER $$
CREATE PROCEDURE `cc`.`close_account_proc`(cid INT)
BEGIN
/* Check that it's what you wanted */
SELECT uid_usr
INTO @uid_usr
FROM credit_acc
WHERE type_acc = 'init'
AND credit_used_acc = cid;
... | [
-0.2753935754299164,
-0.11422740668058395,
0.7081565856933594,
-0.08271139860153198,
0.25379982590675354,
-0.004203072749078274,
-0.06929950416088104,
0.09842788428068161,
-0.3341442048549652,
-0.44729283452033997,
-0.2290215641260147,
0.7520513534545898,
-0.17986932396888733,
0.2697573006... | |
WHERE creditid_acc = cid;
UPDATE sbal_sbl SET status_sbl = 'voided', void_date_sbl = NOW() WHERE credit_used_acc = cid;
/* Check that it's what you wanted */
INSERT
INTO notes_not (uid_usr, initials_not, status_not, date_not, text_not)
VALUES (@uid_usr, 'SYS', 'complete', NOW(), CONCAT('Close... | [
0.0587751530110836,
0.07860022038221359,
0.7017523050308228,
-0.18576470017433167,
0.2942768931388855,
0.14951984584331512,
-0.12007716298103333,
-0.03662439063191414,
-0.3006206750869751,
-0.29277878999710083,
-0.08461816608905792,
0.4160587191581726,
-0.019644929096102715,
0.368333280086... | |
Our website seems to be slower than it used to be, how can I test that? And is there a way to find the cause? (eg too many visitors).
Thanks.
There is a rather good tool for performance benchmarking of web servers: [Jakarta Jmeter](http://jakarta.apache.org/jmeter/), which is an Apache project, so it's rather well sup... | [
0.5299292802810669,
0.03708615154027939,
0.07921110093593597,
0.32114872336387634,
-0.24049289524555206,
-0.33960822224617004,
0.3620184361934662,
0.20318342745304108,
-0.25355809926986694,
-0.5416263937950134,
0.4126930236816406,
0.11215618997812271,
0.133402019739151,
-0.0896667316555976... | |
I have two columns but the codition I would like is to be evaluated from one cell to another.
The first column has cells which have a drop down validation with names, and the second will activate only if a certain name from the adjacent cell is selected.
so far i only found this code but it does not seem to work:
``... | [
0.3934456706047058,
0.3394222557544708,
0.2880345582962036,
-0.31783416867256165,
-0.005608158186078072,
0.2787073850631714,
0.3194245994091034,
-0.5236425399780273,
0.1303720623254776,
-0.3480326533317566,
0.03169039636850357,
0.4298652410507202,
-0.14516721665859222,
0.14433757960796356,... | |
End If
End Sub
```
I would need this code go from (for example) A1:A10 and B1:B10.
I hope I am making sense. If there is a way to do it without VBA, that would be great.
Thanks for the help.
The Target parameter tells you the range that is being changed.
You need to do something like the following:
```
Private Su... | [
0.15182740986347198,
-0.28910550475120544,
0.45741400122642517,
-0.17582198977470398,
0.18884389102458954,
-0.15206974744796753,
0.4018629789352417,
-0.26432302594184875,
-0.19679413735866547,
-0.5295789241790771,
-0.08229545503854752,
0.5117557644844055,
-0.29093682765960693,
0.3690745234... | |
Exit Sub
Else
rng.Offset(0, 1).Locked = ... whatever ...
End If
End Sub
```
Note that your target range can be more than one cell (e.g. when using copy/paste), so you need to handle and test this case.
Calling Intersect returns you the intersection of the target range and the range you are interested... | [
-0.0006052526296116412,
-0.22032460570335388,
0.40565621852874756,
-0.11471296101808548,
0.37806570529937744,
-0.015124384313821793,
0.3627394437789917,
-0.20786543190479279,
0.04628412425518036,
-0.7216103672981262,
-0.011929222382605076,
-0.036244481801986694,
-0.43314051628112793,
0.295... | |
I have a program that requires both x64 and x86 dlls (it figures out which ones it needs at run time), but when trying to create a setup, it complains:
> File AlphaVSS.WinXP.x64.dll' targeting 'AMD64' is not compatible with th project's target platform 'x86'
>
> File AlphaVSS.Win2003.x64.dll' targeting 'AMD64' is... | [
0.6092766523361206,
0.14585094153881073,
0.044316232204437256,
-0.07957692444324493,
-0.15491081774234772,
-0.11102000623941422,
0.05858124420046806,
-0.3348626494407654,
-0.061262693256139755,
-0.785052478313446,
-0.10775808990001678,
0.6874362826347351,
-0.5506721138954163,
-0.0327452123... | |
only target one platform at a time. Your option is to either make 2 MSI's, merge them together and make a custom setup boot strapper that choose between the two.
There are some 3rd party products,like [Advanced Installer](http://www.advancedinstaller.com) for example, that can do this for you. | [
0.3354329764842987,
-0.395381361246109,
0.11600285768508911,
0.22479131817817688,
0.0638468861579895,
0.03771161660552025,
0.08556792885065079,
-0.1373744159936905,
-0.15371330082416534,
-0.681969940662384,
-0.2017291784286499,
0.5079364776611328,
-0.29963111877441406,
-0.20481151342391968... | |
My extension method is:
```
public static IEnumerable<T> FilterCultureSubQuery<T>(this Table<T> t)
where T : class
{
return t;
}
```
I tried to use it in this query
```
var test = from p in t.Products
select new
{
Allo = p, | [
0.3038715720176697,
-0.44939523935317993,
0.4455567002296448,
-0.2810080349445343,
-0.06635917723178864,
-0.06197570264339447,
-0.04045851156115532,
-0.28201472759246826,
0.18039937317371368,
-0.750792920589447,
0.006645692978054285,
0.3288286030292511,
-0.46566036343574524,
0.081694230437... | |
Allo2 = (from pl in t.ProductLocales.FilterCultureSubQuery()
select pl)
};
```
What is supposed to be the signature of my method extension? I always get this error:
```
Method 'System.Collections.Generic.IEnumerable`1[ProductLocale] FilterCultureSubQuery[ProductLocale](System.Da... | [
0.1571047604084015,
-0.362602561712265,
0.4731789529323578,
-0.307386577129364,
-0.05156203359365463,
-0.036279674619436264,
0.0501876138150692,
-0.19905906915664673,
-0.20566393435001373,
-0.4414981007575989,
-0.3290528357028961,
0.32816022634506226,
-0.5951641201972961,
0.187125548720359... | |
}
```
And I got this error:
```
Method 'System.Linq.IQueryable`1[ProductLocale] FilterCultureSubQuery[ProductLocale](System.Data.Linq.Table`1[ProductLocale])' has no supported translation to SQL.
```
Thanks
When i use my extension method in a simple query, it's working, but when i use it in a sub query it's not w... | [
0.31416985392570496,
-0.002552105113863945,
0.3480932116508484,
-0.14868202805519104,
-0.06230165809392929,
0.23635640740394592,
0.3374607264995575,
-0.3052838146686554,
-0.019924011081457138,
-0.5615015029907227,
-0.3350869119167328,
0.3468537926673889,
-0.3722875416278839,
0.149153098464... | |
Allo2 = (from pl in t.ProductLocales.FilterCultureSubQuery()
select pl)
};
```
I create a new extension method and rewrite the expression tree of the query.
```
var test = (from p in t.Products
select new
{ | [
0.1446002572774887,
-0.3234430253505707,
0.24269162118434906,
-0.23179414868354797,
0.09922949969768524,
0.18513253331184387,
0.22191379964351654,
-0.5796976089477539,
0.10221793502569199,
-0.5755562782287598,
-0.4011273980140686,
0.2499566227197647,
-0.526925265789032,
-0.0882265865802764... | |
Allo = p,
Allo2 = (from pl in t.ProductLocales.FilterCultureSubQuery()
select pl)
}).ArrangeExpression();
```
LINQ-TO-SQL have difficulty to use extension method in subquery. With a rewrite expression extension method everyting working fine.
Any other soluti... | [
0.08270516246557236,
-0.3869830071926117,
0.568041980266571,
-0.24518392980098724,
0.25567975640296936,
0.1533447951078415,
-0.05504464730620384,
-0.13925719261169434,
-0.18867267668247223,
-0.5077207684516907,
-0.34720876812934875,
0.27926740050315857,
-0.5285711884498596,
-0.266111820936... | |
I found some code like this in a project I'm working on
```
public SqlDataReader SomeMethod(int someParam)
{
// ... some code goes here
SqlDataReader dataReader = m_command.ExecuteReader(CommandBehavior.CloseConnection);
return dataReader;
}
```
I was wondering what is better, the original or below... | [
-0.0009712162427604198,
0.06901761889457703,
0.20557530224323273,
0.0034112243447452784,
-0.16628104448318481,
-0.03220249339938164,
0.13487645983695984,
-0.0694088414311409,
-0.1067572832107544,
-0.5349448323249817,
0.011344444006681442,
0.6211974024772644,
-0.36155790090560913,
0.0524083... | |
reference. The example I give was what I found but it could be any variable type. One thing I can think of is during debugging, it's probably nice to look at what's in the variable.
Anybody like to contribute their 2 cents?
Debugging is probably the best reason. With the first way, it's easier to e.g. check if `dataRe... | [
0.38421010971069336,
0.29208311438560486,
-0.2192135900259018,
0.25351232290267944,
-0.27140358090400696,
0.03312496095895767,
0.4551168382167816,
0.03833002224564552,
-0.19511310756206512,
-0.418788343667984,
0.35651469230651855,
0.6691421866416931,
-0.2622710168361664,
0.2935755848884582... | |
I have an exercise to do where I need to code in C, commands equivalent to **cat** and **nl** using only system calls. The system calls given to us are open(), close(), read() and write().
I've already done the "cat" equivalent and it seems to be running fine, now I need to do the "nl" one but I'm having trouble with ... | [
0.2913222908973694,
0.2268936038017273,
0.3023589849472046,
-0.1551828533411026,
-0.16099612414836884,
0.2272309809923172,
0.2205502837896347,
0.14138929545879364,
-0.16056868433952332,
-0.9127258658409119,
0.03146176040172577,
0.6577169299125671,
-0.004189780913293362,
-0.0968448594212532... | |
find the '\n' position (let's call it X) then write X number of bytes to stdout.
But looping through all chars in the buffer searching for the end of the line doesn't feel right to me, but I have no idea how else could I do this...
**IMPORTANT EDIT:**
I think some of you are missing the point on my question... I ... | [
0.24218441545963287,
0.14054882526397705,
0.3234484791755676,
0.006832923740148544,
-0.14545713365077972,
0.15458142757415771,
0.3980953097343445,
0.13853147625923157,
-0.11596840620040894,
-0.5910301804542542,
0.011950992979109287,
0.27146995067596436,
-0.11712545901536942,
0.093335755169... | |
to loop through the buffer, file or whatever, char by char, to find the end of the line (no matter how). I'm not saying this is not the answer or that I'm not allowed to do this and that, I'm just talking about what I think. It just seems an odd way to do this, that's all... But if that's the way, than that's the answe... | [
0.7420434355735779,
-0.036625802516937256,
0.1802496612071991,
0.029713429510593414,
0.17136208713054657,
-0.011587606742978096,
0.3365255296230316,
0.22219127416610718,
-0.32335561513900757,
-0.23158235847949982,
0.09089470654726028,
0.24526068568229675,
-0.23509463667869568,
0.2578934729... | |
time in `read` and `write`.
Also, make sure you make the buffer sufficiently large. Don't call `read(file,&c,1)` as it will be incredibly slow. | [
0.11011108011007309,
0.15237024426460266,
0.211524099111557,
-0.003146238625049591,
0.5722994804382324,
-0.21739044785499573,
0.3476349413394928,
0.07341544330120087,
-0.18857771158218384,
-0.722740113735199,
0.06877794116735458,
0.6833781003952026,
0.11699791997671127,
-0.1435616016387939... | |
Given a list of points that form a simple 2d polygon oriented in 3d space and a normal for that polygon, what is a good way to determine which points are specific 'corner' points?
For example, which point is at the lower left, or the lower right, or the top most point? The polygon may be oriented in any 3d orientation... | [
0.3812885284423828,
-0.060070790350437164,
0.1330277919769287,
0.46757519245147705,
-0.11144048720598221,
-0.09696422517299652,
-0.19994913041591644,
0.20215822756290436,
-0.2646496891975403,
-0.29971206188201904,
-0.12159696966409683,
0.39886656403541565,
-0.23391427099704742,
0.106063626... | |
a Bounding box, keep 4 variables: MinX, MaxX, MinY, MaxY
Then loop through all of your points, checking the X values against MaxX and MinX, and your Y values against MaxY and MinY, updating them as needed.
When looping is complete, your box is defined as MinX,MinY as the upper left, MinX, MaxY as upper right, and so ... | [
0.278583824634552,
-0.5160625576972961,
0.5986256003379822,
0.1877117156982422,
0.03314005583524704,
0.22213178873062134,
-0.1661812961101532,
-0.3751620352268219,
0.01824052445590496,
-0.5736343860626221,
-0.2932339906692505,
0.23698319494724274,
-0.37526369094848633,
0.10464707762002945,... | |
points on any plane that you projected on to. | [
0.11459310352802277,
-0.10631567239761353,
0.2746940851211548,
0.474291056394577,
-0.20251347124576569,
0.13065293431282043,
-0.34214428067207336,
0.48830583691596985,
-0.2605639100074768,
-0.4999809265136719,
-0.13228334486484528,
-0.034468118101358414,
-0.2251473367214203,
0.249404326081... | |
I am fairly new to Linq To SQL but trying to run what should be a fairly simple SQL query and can't figure out how to make it play nice in LINQ.
```
SELECT Users.Id, Users.Id AS Expr1, Users.FirstName, Users.LastName,
User_x_Territory.UserID
FROM Users LEFT OUTER JOIN
User_x_Territory ON User... | [
0.27926546335220337,
0.3989647328853607,
0.5629847049713135,
-0.0892019271850586,
-0.08549346029758453,
-0.20196107029914856,
-0.1649855673313141,
-0.28960609436035156,
-0.07268121838569641,
-0.6393395662307739,
-0.004281667992472649,
0.16696283221244812,
0.08350381255149841,
0.27859815955... | |
way to tell if they have a territory is to check the user\_x\_territory gerrund.
I am able to get all of the users out of my DB with this:
```
var users = from u in db.Users
join uXt in db.User_x_Territories on u equals uXt.User into gerr
from users in gerr.DefaultIfEmpty()
select ... | [
0.07726290822029114,
0.14921119809150696,
0.40814661979675293,
-0.10132574290037155,
-0.34133297204971313,
-0.0929902046918869,
0.40490788221359253,
-0.2543952465057373,
-0.03803253918886185,
-0.7155935168266296,
0.0003440813161432743,
0.09555334597826004,
-0.2583480179309845,
0.3587010800... | |
to only show users with no territories.
Thanks for any help.
I suggest the following solution.
```
db.Users.Where(u => u.User_x_Territories.Count == 0)
``` | [
0.4269959330558777,
0.003635211382061243,
0.33054015040397644,
0.15083256363868713,
-0.07475697249174118,
-0.3465595841407776,
0.33601540327072144,
0.012030994519591331,
-0.22945141792297363,
-0.6013377904891968,
-0.16741475462913513,
0.01706768572330475,
-0.3592393398284912,
0.31612274050... | |
I'm writing a decorator for methods that must inspect the parent methods (the methods of the same name in the parents of the class in which I'm decorating).
Example (from the fourth example of [PEP 318](http://www.python.org/dev/peps/pep-0318/#examples "here")):
```
def returns(rtype):
def check_returns(f):
... | [
0.31265825033187866,
0.050372932106256485,
0.5327982902526855,
-0.2731221914291382,
-0.17081347107887268,
0.12447559088468552,
0.3468431234359741,
-0.8414449095726013,
0.04802130162715912,
-0.6820123791694641,
0.034196894615888596,
0.7584670186042786,
-0.20955796539783478,
-0.0584824830293... | |
"return value %r does not match %s" % (result,rtype)
return result
new_f.func_name = f.func_name
# here I want to reach the class owning the decorated method f,
# it should give me the class A
return new_f
return check_returns
class A(object):
@returns(int)
def c... | [
0.14016322791576385,
-0.0027175694704055786,
0.5777963995933533,
-0.2295103222131729,
-0.04018417000770569,
0.22460044920444489,
0.46063897013664246,
-0.2555542588233948,
-0.08216140419244766,
-0.4367228150367737,
-0.1348985731601715,
0.5827561020851135,
-0.24975639581680298,
0.23232816159... | |
value * 3
```
So I'm looking for the code to type in place of **# here I want...**
Thanks.
I couldn't believe this was causing the problem, but the whole issue boiled down to the fact that it appears that a dojo ItemFileReadStore *REQUIRES* the label property of the JSON to be "name". In the end this is all that it ... | [
0.1341789960861206,
-0.0978238582611084,
0.46227434277534485,
-0.21339309215545654,
-0.10617987811565399,
-0.10969085246324539,
0.40287888050079346,
-0.47261348366737366,
-0.0927882269024849,
-0.448123574256897,
-0.31008198857307434,
0.4879031181335449,
-0.6546962857246399,
0.3565737605094... | |
Zend form has been fixed as of ZF 1.8.4 | [
-0.14537422358989716,
-0.00019298738334327936,
0.3389260470867157,
-0.5706810355186462,
-0.3385545015335083,
-0.2020750492811203,
0.38186419010162354,
-0.33666375279426575,
0.053545013070106506,
-0.10342158377170563,
-0.38339629769325256,
0.3443473279476166,
-0.12889671325683594,
0.3895256... | |
Sadly, I have a legacy PHP4 system that I continuously need to add features to. It doesn't look like there will be resources to do a port to PHP5 for several months if not several years. Over the course of the past few years, one of the major things that has bothered me is not having the ability to throw exceptions cle... | [
0.47758880257606506,
0.5289597511291504,
0.02142460271716118,
0.018414650112390518,
-0.2522652745246887,
-0.15481682121753693,
0.6793872117996216,
0.1680532991886139,
-0.5139715671539307,
-0.525033712387085,
0.36438024044036865,
0.4088307321071625,
0.007475343532860279,
0.3786241114139557,... | |
handling in languages that have no exception model?
Joel has this to say regarding exceptions as noted in an answer:
<http://www.joelonsoftware.com/items/2003/10/13.html>
> They create too many possible exit points for a function. To write correct code, you really have to think about every possible code path through... | [
-0.39201614260673523,
-0.17790710926055908,
-0.35507315397262573,
0.3095511496067047,
-0.37210968136787415,
0.2986264228820801,
0.4197410047054291,
0.062350694090127945,
-0.3856370151042938,
-0.4288664758205414,
0.13350282609462738,
0.33207273483276367,
-0.017136434093117714,
-0.0486045144... | |
functions return error values when things go wrong, and to deal with these explicitly, no matter how verbose it might be. It is true that what should be a simple 3 line program often blossoms to 48 lines when you put in good error checking, but that's life, and papering it over with exceptions does not make your progra... | [
-0.21720726788043976,
0.14951634407043457,
0.06512195616960526,
0.21811744570732117,
-0.4861045181751251,
-0.06234244257211685,
0.7215808033943176,
-0.016547800973057747,
-0.370997816324234,
-0.2672485411167145,
-0.24871669709682465,
0.5636847615242004,
-0.3617814779281616,
-0.481659114360... | |
function that either produces a return value or returns an error.
However, a good exception model in a language makes the called function specify that it will in fact throw an exception. This implies that there are exaactly zero additional places for the function to exit from (the code would just return false instead ... | [
-0.008683806285262108,
-0.021297674626111984,
0.0054359445348382,
-0.11839822679758072,
0.01819447986781597,
-0.03299796208739281,
0.7286644577980042,
-0.0726192519068718,
-0.0614033117890358,
-0.35115402936935425,
-0.20227333903312683,
0.4583772122859955,
-0.23092667758464813,
-0.09510622... | |
take away a tool that can be used cleanly and efficiently.
In fact, any function can return a value that is out of range of the expected return values from the calling code. A good programmer is going to deal with all possible return values, including error codes and conditions. The exception model just gives him a wa... | [
0.11866352707147598,
-0.1278122514486313,
-0.21979378163814545,
0.01899312064051628,
-0.16366341710090637,
0.04831293225288391,
0.2517712414264679,
0.18682743608951569,
-0.06729283928871155,
-0.3202918469905853,
0.15744030475616455,
0.6135388612747192,
-0.15116119384765625,
0.3229301869869... | |
version of PHP. My immediate reaction is to suggest spending time writing a good error handler, and [register it](http://us3.php.net/manual/en/function.set-error-handler.php).
Then, in your application execution where you would normally throw exceptions, you can instead [trigger errors](http://us3.php.net/manual/en/fu... | [
0.06385455280542374,
0.13649220764636993,
0.4294114410877228,
-0.261971116065979,
-0.03665904328227043,
-0.12343034893274307,
0.630592405796051,
0.028686942532658577,
-0.28833436965942383,
-0.5443238019943237,
-0.14105544984340668,
0.49178484082221985,
-0.3395637273788452,
-0.0280232541263... | |
### Duplicates:
* [How do I convert coordinates to a Latitude & Longitude?](https://stackoverflow.com/questions/609379/)
* [How to convert from UTM to LatLng in python or Javascript2](https://stackoverflow.com/questions/343865/)
My current project is interfacing with a central geocoding service published by the local... | [
0.29229509830474854,
0.32189950346946716,
0.6774419546127319,
0.19526338577270508,
-0.016147814691066742,
0.3829870820045471,
0.04791169613599777,
0.02464657835662365,
-0.14016632735729218,
-0.9468768835067749,
0.12831047177314758,
0.11712528020143509,
-0.1759548783302307,
0.33009496331214... | |
texts describing the conversion; the most I've been able to find via Google is raw source code in the form of Excel Visual Basic and FORTRAN. I believe a useful general solution would be beneficial to the community at large.
You need a map projection library to do this.
There are many libraries available that are open... | [
0.295065313577652,
0.15697720646858215,
0.48461291193962097,
0.09001322835683823,
0.007060600910335779,
0.16279461979866028,
-0.12439045310020447,
-0.19366753101348877,
-0.159597709774971,
-1.102599024772644,
-0.1420043259859085,
0.4844748377799988,
-0.07566294819116592,
-0.333642095327377... | |
I have a templated function `fct` that uses some complex data structure based on the template parameter. It also calls some helper functions (templated on the same type) that are in a separate `helpers` namespace and use the same complex data structure. Now it gets really ugly because we cannot make one `typedef` for t... | [
0.07785163074731827,
0.15678972005844116,
0.5050826072692871,
-0.16530919075012207,
-0.14827674627304077,
-0.0061738514341413975,
0.05890413746237755,
-0.5087813138961792,
0.08774548768997192,
-0.9773731827735901,
-0.0558326430618763,
0.34845489263534546,
-0.6695548295974731,
0.27837872505... | |
I want to make it prettier, by using one typedef that all functions can use.
A templated `typedef` would be nice, but it's not allowed:
```
template<class T>
typedef std::vector< std::vector< std::map<T, std::set<T> > > > Bar;
```
Another solution would be, I think, to wrap all these functions in a templated `nam... | [
0.24454639852046967,
-0.13301973044872284,
0.19817064702510834,
-0.19326859712600708,
-0.18794630467891693,
0.3302418887615204,
-0.1000182256102562,
-0.04468219727277756,
0.050871916115283966,
-0.7649052143096924,
0.12520626187324524,
0.5271629691123962,
-0.3697914481163025,
0.043495073914... | |
a templated class where all member functions are `static`:
```
template<class T>
class All {
typedef std::vector< std::vector< std::map<T, std::set<T> > > > Bar;
static void fct(const Bar& bar){
// ...
h1(bar);
}
private:
static void h1(const Bar& bar){
// ...
}
};
```
My question is: It's ... | [
0.22765004634857178,
-0.09405279159545898,
0.0531935915350914,
0.015854373574256897,
-0.19319458305835724,
-0.16969341039657593,
0.19324393570423126,
-0.48204973340034485,
-0.2127678543329239,
-0.45626625418663025,
-0.4567480981349945,
0.251156210899353,
-0.8320878148078918,
0.107100479304... | |
other solutions/workaround that make the "templated typedef" / "templated namespace" possible?
[GOTW #79: Template Typedef](http://www.gotw.ca/gotw/079.htm)
[The New C++ Typedef Templates](http://www.ddj.com/cpp/184403850) (See Section 1: The Problem and Current Workarounds) | [
-0.042082324624061584,
-0.11874331533908844,
0.15881554782390594,
0.23339922726154327,
0.21619021892547607,
-0.013467204757034779,
0.3340456187725067,
-0.2158050239086151,
-0.421216756105423,
-0.5756872296333313,
-0.3777332305908203,
0.5831272006034851,
-0.28548914194107056,
-0.10335137695... | |
When I run my application locally it writes my log4net log to the location I've configured (i.e., `<file value="${LOCALAPPDATA}\TEST\Logs\debug.log" />`) without a problem. However, when I deploy my application via ClickOnce, the log file is not being written.
I know ClickOnce applications are limited in terms of whe... | [
0.06856083869934082,
0.18193574249744415,
0.4078912138938904,
-0.15249837934970856,
0.32451683282852173,
-0.08861376345157623,
0.3273046314716339,
0.1675378978252411,
-0.4258684515953064,
-0.7760308980941772,
-0.15035484731197357,
0.5812750458717346,
-0.23779627680778503,
0.216452598571777... | |
Ive never seen this.
I click into my textbox to type in a value and as soon as i release the mouse button focus jumps to the above dropdown list. No javascript on these items.
If i hold the mouse button down i can type in a value to the textbox.
Any idea?
I had my textbox inside the label tag by mistake - this was t... | [
0.41803574562072754,
0.24344374239444733,
0.40081605315208435,
-0.08665759861469269,
-0.014084070920944214,
-0.1755008101463318,
0.21026799082756042,
0.04425831884145737,
-0.16991744935512543,
-0.4571981430053711,
0.10443104803562164,
0.42604154348373413,
-0.2007630169391632,
0.37698787450... | |
What are the best resources for a C#/.NET 2.0 developer for learning .NET 3.5? I'm struggling to learn ASP.NET MVC and I feel that a lot of my stumbling blocks have to do with not ever having explicitly studied 3.5.
Note: I know there are already these questions, but they both seem to focus on ASP.NET
* [Learning C#,... | [
0.05141517519950867,
0.06091547757387161,
0.015448522754013538,
0.0747419223189354,
-0.13079096376895905,
-0.1639997810125351,
0.09122750163078308,
-0.1115175262093544,
-0.5657545924186707,
-0.5369983911514282,
0.16834454238414764,
0.45046451687812805,
0.10578122735023499,
0.03742747381329... | |
If Request.ServerVariables["HTTP\_X\_FORWARDED\_FOR"] returns multiple ip's, which one do I take and how would I do it in c#? It is my understanding that if it is blank or null, then the client computer is not going through a proxy and I can just get their ip from Request.ServerVariables["REMOTE\_ADDR"]. Is this a corr... | [
-0.15675920248031616,
-0.19780981540679932,
0.39347878098487854,
-0.0029006171971559525,
-0.3577714264392853,
0.020731529220938683,
-0.021832618862390518,
-0.13180682063102722,
-0.27491292357444763,
-0.6319248080253601,
0.0716143548488617,
0.3457212448120117,
-0.31099510192871094,
0.398194... | |
works.
According to [this](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For), the format of X-Forwarded-For HTTP header is:
```
X-Forwarded-For: client1, proxy1, proxy2, ...
```
So the IP address of the client that you want should be the first one in the list | [
0.16445188224315643,
0.27072373032569885,
0.543850302696228,
-0.007129067555069923,
-0.12987467646598816,
-0.17927275598049164,
-0.11970346421003342,
0.01811882108449936,
-0.3276633322238922,
-0.7638949155807495,
-0.14905045926570892,
0.3082655370235443,
-0.1487441211938858,
0.177409172058... | |
I need to write a web application that allows the client to download a file from the server, so far so good, but the file must be kind of encoded, so i need to decode it on the client and write it on a file on the client's PC.
Can i do this using Silverlight? and how?
If it is not possible, there is another way to do... | [
0.5224938988685608,
0.12956178188323975,
0.03642120212316513,
0.3333161175251007,
0.10063057392835617,
-0.1924310028553009,
0.2884502708911896,
0.1915871649980545,
-0.31471243500709534,
-0.8349122405052185,
0.10517630726099014,
0.809259831905365,
-0.21269598603248596,
-0.09492196142673492,... | |
case that that's not enough, is there a way to, with or without user interaction, to save the file outside of the isolated storage, for example emulating a new download for the user?
In Silverlight 3.0, you will have access to read and write files via the [OpenFileDialog](http://mtaulty.com/CommunityServer/blogs/mike_t... | [
0.18037837743759155,
0.05784564092755318,
0.27347680926322937,
-0.09347730129957199,
-0.12214358150959015,
-0.08327427506446838,
0.17106537520885468,
-0.004326170776039362,
-0.31101641058921814,
-0.5694888234138489,
-0.22596092522144318,
0.31371742486953735,
-0.43947339057922363,
0.0320101... | |
I have a process that reads raw data and writes this to a database every few seconds.
What is the best way to tell if the database has been written to? I know that Oracle and MS-SQL can use triggers or something to communicate with other services, but I was hoping there would be a technique that would work with more t... | [
0.8304200172424316,
0.09477616101503372,
-0.16323348879814148,
0.35941794514656067,
-0.1527518630027771,
-0.01899598352611065,
-0.10798779129981995,
-0.012122253887355328,
-0.15700365602970123,
-0.458927720785141,
0.37753960490226746,
0.4941750168800354,
-0.14749027788639069,
-0.0321381650... | |
a better method that is easier to maintain. For system-wide writes I'd investigate methods that detect changes in the transaction log. Unfortunately, each vendor implements this part differently, so one method that works for all vendors is not likely. That is, a method that works within the database server is unlikely.... | [
0.32665205001831055,
0.10687405616044998,
0.2426590472459793,
0.38661009073257446,
-0.16702952980995178,
-0.21989724040031433,
0.150581955909729,
-0.12191682308912277,
-0.12773562967777252,
-0.7967390418052673,
0.20457011461257935,
0.6991401314735413,
-0.14756105840206146,
0.07320789247751... | |
you have asked only to detect a db write. If you need to know what type of write it was then you'll need to get into the transaction log to see what is there. And that will definitely be vendor specific. | [
0.48139238357543945,
0.05766930431127548,
0.10591122508049011,
0.0022555002942681313,
-0.24261465668678284,
-0.3008935749530792,
0.019203118979930878,
-0.16544313728809357,
0.10296173393726349,
-0.515964150428772,
0.18530462682247162,
0.6248942613601685,
-0.10699008405208588,
0.21655720472... | |
What are the main differences between **SQLite** and **HSQLDB**? There are lots of applications using both of them, but I don't really see any major difference.
SQLite is implemented in C, HSQL is implemented in Java.
It should be more seamless and easy to integrate SQLite with an application project written in C or C... | [
0.25943851470947266,
0.2202225774526596,
0.41269156336784363,
0.06601109355688095,
-0.25272291898727417,
-0.10181907564401627,
-0.28995177149772644,
0.3415060341358185,
-0.13920575380325317,
-0.7437219619750977,
0.13805627822875977,
0.6105138659477234,
-0.23408356308937073,
0.0595209747552... | |
I am currently using the code below within a VB.Net application to find specific text in a Word document. The text is surrounded by symbols represented by the character codes in the .Text statement. The code below is working fine. The issue now is that sometimes the desired text within a document has been marked for de... | [
0.2022012174129486,
0.16876836121082306,
0.35489922761917114,
-0.1172589659690857,
0.1948060840368271,
-0.228366881608963,
0.30267542600631714,
0.028942393139004707,
-0.2479245960712433,
-0.8981095552444458,
-0.19884119927883148,
0.2556287348270416,
-0.1864398717880249,
0.43521249294281006... | |
xSelection.Find.ClearFormatting()
xSelection.Find.Replacement.ClearFormatting()
With xSelection.Find
.Text = ChrW(65000) & "( \[*)" & ChrW(65001)
.Replacement.Text = ""
.Forward = True
.Wrap = Word.WdFindWrap.wdFindContinue
.Format = False
.MatchCase = False
... | [
-0.15661704540252686,
0.29835695028305054,
0.5105482339859009,
-0.28523772954940796,
-0.0418325774371624,
0.11820981651544571,
0.3533046543598175,
-0.7343252301216125,
-0.10412120819091797,
-0.40130460262298584,
-0.479596346616745,
0.5198842883110046,
-0.33844801783561707,
0.19040398299694... | |
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchFuzzy = False
.MatchWildcards = True
End With
xSelection.Find.Execute(Replace:=Word.WdReplace.wdReplaceNone)
Do While xSelection.Find.Found
........Execute additional code here
Loop
```
You need to supply a False... | [
0.047591112554073334,
0.1887216866016388,
0.6991128921508789,
-0.2714923024177551,
0.10693817585706711,
-0.10838419944047928,
0.4033052325248718,
-0.5863837599754333,
0.2543967366218567,
-0.6778534650802612,
-0.39810964465141296,
0.6157578825950623,
-0.5834055542945862,
-0.0191023387014865... | |
Filename, RouteWorkbook)
>
>
> expression Required. An expression
> that returns one of the above objects.
>
>
> SaveChanges Optional Variant. If
> there are no changes to the workbook,
> this argument is ignored. If there are
> changes to the workbook and the
> workbook appears in other open
> windows, this ... | [
0.01981889270246029,
-0.3065586984157562,
0.49246862530708313,
-0.12754403054714203,
0.19116206467151642,
0.0922449380159378,
0.18310554325580597,
-0.2972926199436188,
-0.21867741644382477,
-0.8315302133560181,
-0.24938473105430603,
0.5746759176254272,
-0.36581143736839294,
-0.076478265225... | |
the changes
> to the workbook. If there is not yet a
> file name associated with the
> workbook, then FileName is used. If
> FileName is omitted, the user is asked
> to supply a file name. False Does not
> save the changes to this file.
> Omitted Displays a dialog box asking
> the user whether or not to save
>... | [
0.012023555114865303,
-0.30458348989486694,
0.9533348679542542,
-0.13182619214057922,
0.30500930547714233,
0.27493107318878174,
0.017460213974118233,
-0.13886208832263947,
-0.3076164424419403,
-0.89380943775177,
-0.3336714804172516,
0.16261456906795502,
-0.25103625655174255,
0.211700677871... | |
it has no
> routing slip or has already been
> routed), this argument is ignored.
> Otherwise, Microsoft Excel routes the
> workbook as shown in the following
> table.
>
>
> Value Meaning True Sends the workbook
> to the next recipient. False Doesn't
> send the workbook. Omitted Displays a
> dialog box asking... | [
-0.055966567248106,
0.01063025463372469,
0.457474946975708,
-0.048554711043834686,
-0.1158369928598404,
0.029262900352478027,
0.27104657888412476,
-0.29394397139549255,
0.17053775489330292,
-0.7838466167449951,
-0.2933962643146515,
0.2605638802051544,
-0.5402441024780273,
-0.25380071997642... | |
I have been tasked with setting up a server for running JBoss presumably the latest version. I was wondering if anyone had any recommendations for setting up the disk partitions for a Linux (Red Hat) system? Currently they are running the lab with everything on one partition, and I would like to avoid that going into p... | [
0.3685808777809143,
0.20940148830413818,
0.20269854366779327,
0.07323544472455978,
0.014753853902220726,
-0.25169259309768677,
-0.02651333063840866,
-0.12314852327108383,
-0.11474812775850296,
-0.6413404941558838,
-0.10521092265844345,
0.6421809792518616,
-0.16293422877788544,
0.1351957321... | |
Help:
> Close method as it applies to the
> Workbook object.
>
>
> Closes the object.
>
>
> expression.Close(SaveChanges,
> Filename, RouteWorkbook)
>
>
> expression Required. An expression
> that returns one of the above objects.
>
>
> SaveChanges Optional Variant. If
> there are no changes to the workboo... | [
-0.532380223274231,
0.02982107549905777,
0.8689834475517273,
-0.005230323877185583,
0.07716009765863419,
0.11526834219694138,
0.38647982478141785,
-0.1823040097951889,
0.025344138965010643,
-0.9108065366744995,
-0.5472842454910278,
0.5097014307975769,
-0.4529348909854889,
-0.19505977630615... | |
specifies whether changes should be
> saved, as shown in the following
> table.
>
>
> Value Action True Saves the changes
> to the workbook. If there is not yet a
> file name associated with the
> workbook, then FileName is used. If
> FileName is omitted, the user is asked
> to supply a file name. False Does n... | [
-0.021894996985793114,
-0.21170057356357574,
0.6655101776123047,
-0.20772713422775269,
0.22422698140144348,
0.2111140489578247,
0.0020424320828169584,
-0.44581708312034607,
-0.18576191365718842,
-0.7581835985183716,
-0.2435237020254135,
0.44206905364990234,
-0.2613660395145416,
-0.00221613... | |
>
> RouteWorkbook Optional Variant. If
> the workbook doesn't need to be routed
> to the next recipient (if it has no
> routing slip or has already been
> routed), this argument is ignored.
> Otherwise, Microsoft Excel routes the
> workbook as shown in the following
> table.
>
>
> Value Meaning True Sends the... | [
0.04567984864115715,
0.025812026113271713,
0.5363784432411194,
-0.14372099936008453,
-0.18758857250213623,
0.06500522792339325,
0.22481350600719452,
-0.23810306191444397,
0.17804954946041107,
-0.8208236694335938,
-0.24453237652778625,
0.2741597294807434,
-0.5563846230506897,
-0.20879010856... | |
I have a model that has an ordering field under its Meta class. When I perform a query and get back a QuerySet for the model it is in the order specified. However if I have instances of this model that are in a list and execute the sort method on the list the order is different from the one I want. Is there a way to so... | [
0.14220008254051208,
-0.03133687376976013,
0.0733041763305664,
0.1298850178718567,
-0.10691943764686584,
0.20990076661109924,
-0.04913773015141487,
-0.27575403451919556,
-0.3155595064163208,
-0.6222683787345886,
0.15004296600818634,
0.5550370216369629,
-0.5030734539031982,
0.26289087533950... | |
a comparator function (or **cmp** method on the model class) that can compare two model instances according to the relevant attribute. For instance:
```
class Dated(models.Model):
...
created = models.DateTimeField(default=datetime.now)
class Meta:
ordering = ('created',)
def __cmp__(self, other):
tr... | [
-0.29110777378082275,
-0.2671300172805786,
0.382075697183609,
0.05858080834150314,
-0.07358799129724503,
0.5209271311759949,
0.03835250437259674,
-0.20038023591041565,
-0.2958469092845917,
-0.506963312625885,
-0.03457345440983772,
0.41699331998825073,
-0.345451682806015,
0.4752500951290130... | |
Ok, so here's the skinny:
```
# models.py
class Article( models.Model ):
title = models.CharField( max_length = 255 )
author = models.ForeignKey( User )
published_at = models.DateTimeField( auto_now_add = True )
body = models.TextField( )
def __unicode__( self ):
... | [
0.1438429355621338,
0.06785625219345093,
0.3002285361289978,
-0.02302923984825611,
0.03832761198282242,
0.12496787309646606,
-0.09464777261018753,
-0.24156229197978973,
-0.030328940600156784,
-0.3896174132823944,
-0.08993522822856903,
0.7622470259666443,
-0.24396982789039612,
0.00218002893... | |
django import forms
from django.forms import widgets
class ArticleAdminForm( forms.ModelForm ):
title = forms.CharField( max_length = 255, required = True )
body = forms.CharField( required = True, widget = widgets.Textarea )
class ArticleAdmin( admin.ModelAdmin ):
fields = [ 'title', 'body' ]
... | [
0.14212080836296082,
0.5030238628387451,
0.35061579942703247,
-0.21073853969573975,
-0.22068244218826294,
-0.28086861968040466,
0.31638845801353455,
-0.1941492110490799,
0.05711185187101364,
-0.30934691429138184,
-0.0636267140507698,
0.6452169418334961,
-0.3232409656047821,
-0.172717824578... | |
for the last hour to no avail.
Thanks in advance.
From the [Django Docs](https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.save_model):
```
ModelAdmin.save_model(self, request, obj, form, change)
```
> The `save_model` method is given the `HttpRequest`, a model instance, a `Mo... | [
0.09954226762056351,
0.14603927731513977,
0.9456916451454163,
-0.01715156063437462,
0.0480591356754303,
0.11559680849313736,
-0.04083958640694618,
-0.30057793855667114,
-0.1538795828819275,
-0.6017643213272095,
-0.1818562000989914,
0.70240718126297,
-0.11179926991462708,
-0.031947158277034... | |
Take the Following code:
```
DESCryptoServiceProvider des = new DESCryptoServiceProvider();
des.Key = new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};
ICryptoTransform encryptor = des.CreateEncryptor();
// encrypt
byte[] x = UTF8Encoding.UTF8.GetBytes("thisIsATEST");
byte[] enc = encryptor.TransformFinalB... | [
0.13857580721378326,
-0.08890582621097565,
0.4183219075202942,
0.03547273576259613,
0.10779686272144318,
0.015705903992056847,
0.6900411248207092,
-0.576566755771637,
-0.29454565048217773,
-0.8459720611572266,
-0.30814826488494873,
0.776309072971344,
-0.13190723955631256,
0.464126020669937... | |
It is not throwing an exception it just isn't converting the string correctly.
Unless you are using something like ECB mode, the decryptor needs the initialization vector used by the encryptor. | [
-0.028571002185344696,
-0.03759646788239479,
0.11518603563308716,
0.10658300668001175,
0.003900291630998254,
-0.30619603395462036,
0.31158098578453064,
-0.4238737225532532,
-0.024471944198012352,
-0.340800017118454,
-0.26618772745132446,
0.37561139464378357,
-0.44160062074661255,
-0.020253... | |
I've poured over the docs and haven't been able to figure this out. Is it even possible?
[Please see this](http://developer.android.com/reference/com/google/android/maps/MyLocationOverlay.html)
It looks like the correct mechanism to do this is to extend MyLocationOverlay then override the drawMyLocation() protected me... | [
0.010392282158136368,
-0.017899561673402786,
1.0166112184524536,
-0.12191678583621979,
0.06793009489774704,
0.24619601666927338,
0.18810130655765533,
-0.34776976704597473,
0.029998717829585075,
-0.6119070649147034,
-0.33242499828338623,
0.6228508949279785,
-0.35472771525382996,
0.217572197... | |
mContext = context;
}
@Override
protected void drawMyLocation(Canvas canvas, MapView mapView, Location lastFix, GeoPoint myLocation, long when) {
// translate the GeoPoint to screen pixels
Point screenPts = mapView.getProjection().toPixels(myLocation, null);
// create a rotated co... | [
-0.032447926700115204,
-0.1350635141134262,
0.9648702144622803,
0.007283040788024664,
0.10286343097686768,
0.34948959946632385,
0.17152193188667297,
-0.6569817066192627,
-0.2962181568145752,
-0.698051393032074,
-0.1651320457458496,
0.40543144941329956,
-0.5331757664680481,
0.11197458952665... | |
Matrix();
matrix.postRotate(mOrientation);
Bitmap rotatedBmp = Bitmap.createBitmap(
arrowBitmap,
0, 0,
arrowBitmap.getWidth(),
arrowBitmap.getHeight(),
matrix,
true | [
0.10653010755777359,
-0.12998704612255096,
0.6483854055404663,
-0.25153669714927673,
-0.043074652552604675,
0.3542236387729645,
0.27510473132133484,
-0.4287134110927582,
-0.19152505695819855,
-0.09391874819993973,
-0.13584846258163452,
0.4098537266254425,
-0.2541906535625458,
0.07206527888... | |
);
// add the rotated marker to the canvas
canvas.drawBitmap(
rotatedBmp,
screenPts.x - (rotatedBmp.getWidth() / 2),
screenPts.y - (rotatedBmp.getHeight() / 2),
null
); | [
0.30767980217933655,
-0.2951273024082184,
0.68248450756073,
-0.20964625477790833,
-0.17647598683834076,
0.30145931243896484,
-0.013102785684168339,
-0.24689292907714844,
-0.0993066057562828,
-0.4857196807861328,
-0.26512980461120605,
0.27447235584259033,
-0.4621810019016266,
-0.14591051638... | |
}
public void setOrientation(float newOrientation) {
mOrientation = newOrientation;
}
}
``` | [
0.16433890163898468,
-0.009399143978953362,
0.026171762496232986,
-0.23142866790294647,
0.29930660128593445,
-0.21990978717803955,
0.3690877854824066,
-0.2282467484474182,
0.09066116064786911,
-0.1041095182299614,
-0.4395900070667267,
0.754093587398529,
-0.2615472674369812,
0.2151284664869... | |
### Duplicate:
> [Confused about hashes](https://stackoverflow.com/questions/745549/confused-about-hashes)
---
How can SHA encryption create unique 40 character hash for any string, when there are n infinite number of possible input strings but only a finite number of 40 character hashes?
To elaborate on jdigital's ... | [
-0.40833714604377747,
0.2897151708602905,
0.08342821151018143,
0.04514218121767044,
-0.3731602430343628,
-0.18631434440612793,
0.1888427734375,
-0.09217143803834915,
-0.3157680034637451,
-0.47416138648986816,
-0.0006188445258885622,
0.2732059061527252,
-0.36517733335494995,
0.5816252827644... | |
I have the following code that throws an exception:
```
ThreadPool.QueueUserWorkItem(state => action());
```
When the action throws an exception, my program crashes. What is the best practice for handling this situation?
---
Related: [Exceptions on .Net ThreadPool Threads](https://stackoverflow.com/questions/66826... | [
0.14832733571529388,
0.06170588731765747,
0.04024277627468109,
-0.19801881909370422,
0.2358151525259018,
0.0022754124365746975,
0.3081153333187103,
-0.025246765464544296,
-0.4555663764476776,
-0.555432140827179,
-0.09863170236349106,
0.3139744997024536,
-0.5852784514427185,
0.2563512921333... | |
I have a .net cf 3.5 Windows Mobile application that my client wants to have autoupdate features.
Here is what I have so far:
1. create a CAB using the Smart Device CAB Project (is this good enough, or should I be doing something else here)
2.Get the application version number
```
Assembly.GetExecutingAssembly().Ge... | [
0.6825804710388184,
0.17056627571582794,
0.6676226258277893,
0.04115266725420952,
-0.21599017083644867,
-0.32183870673179626,
0.5204734206199646,
-0.2266305387020111,
0.1452692151069641,
-0.747482419013977,
0.4329281449317932,
0.9663633108139038,
-0.6097834706306458,
0.09213604778051376,
... | |
update you to prevent the file-sharing issue. This is usually handled by having a dedicated "updater" app that you launch. It might be the target of the app icon and therefore does updates with every launch, or it may be launched via a "check for updates" type of menu item. Regardless, you have to launch it and make su... | [
0.4083546996116638,
-0.36210137605667114,
0.514421820640564,
0.36139896512031555,
-0.06196217983961105,
-0.383217990398407,
0.3556824028491974,
0.03586059808731079,
-0.059431061148643494,
-0.550363302230835,
-0.1627766638994217,
0.9198644757270813,
-0.5369051098823547,
-0.17994509637355804... | |
in the end (you may want to update just a single file, assembly or whatever) so starting with the logic of pulling down individual files is going to make you way more extensible.
An old, but still very valid, resource is Alex Feinman's [MSDN article on creating self-updating applications](http://msdn.microsoft.com/en-... | [
0.01367727480828762,
0.22071923315525055,
-0.046994224190711975,
0.1566612422466278,
0.2615797221660614,
-0.24393053352832794,
0.1419544816017151,
-0.16592472791671753,
-0.21658781170845032,
-0.40139174461364746,
-0.13572993874549866,
0.4698077440261841,
-0.06446380168199539,
0.17965924739... | |
How do I use the JavaScript DOM to apply `onclick` events to links inside of an `iframe`?
Here's what I'm trying that isn't working:
```
document.getElementById('myIframe').contentDocument.getElementsByTagName('a').onclick = function();
```
No errors seem to be thrown, and I have complete control of the stuff in th... | [
0.23731985688209534,
0.30355939269065857,
0.5292901992797852,
-0.10334666073322296,
-0.15219296514987946,
-0.05189011991024017,
0.33042794466018677,
-0.5019554495811462,
-0.09462172538042068,
-0.8397297263145447,
-0.30552202463150024,
0.3550071716308594,
-0.17422418296337128,
0.04465771839... | |
website on a different domain.
Being able to access content on other domains would represent a security vulnerability to the user and so it is not possible to do this via Javascript.
For this reason, you can not attach events in your page to content within an iFrame. | [
0.2425510585308075,
-0.10674908012151718,
0.2720387279987335,
0.23069456219673157,
-0.2319711595773697,
-0.5189577341079712,
0.5015270113945007,
0.17244942486286163,
-0.6208858489990234,
-0.8976739048957825,
-0.19874009490013123,
0.0682535246014595,
-0.48794636130332947,
0.3729089796543121... | |
My GUI locks up because I need to update it through the EDT, however, I need to also pass a variable that is being updates with the GUI:
```
while ((message = this.in.readLine()).startsWith("NUMPLAYERS"))
{
numOfPlayers = Integer.parseInt(message.split(":")[1]);
numPlayers.setText("There are currently " + numO... | [
-0.02286030352115631,
-0.09508422017097473,
0.695061206817627,
-0.11716612428426743,
0.19736985862255096,
-0.2639071047306061,
0.24798910319805145,
0.010312291793525219,
-0.2276744842529297,
-0.8931414484977722,
-0.13656160235404968,
0.6728610992431641,
-0.4535940885543823,
0.3224450647830... | |
variable:
```
final int currentNumOfPlayers = numOfPlayers;
EventQueue.invokeLater(new Runnable() {
public void run() {
numPlayers.setText("There are currently " +
currentNumOfPlayers + " players in this game");
}
});
``` | [
0.039136871695518494,
-0.644807755947113,
0.613770604133606,
-0.1045735776424408,
0.2773948311805725,
-0.2542303204536438,
0.0805223360657692,
-0.03920649737119675,
-0.2846742868423462,
-0.3710273206233978,
-0.3366662859916687,
0.660057008266449,
-0.38891029357910156,
0.5170535445213318,
... | |
the following script works fine if I type it line-by-line in debug. When I copy it to a file called script.txt, it hangs up after "enter 3 numbers". I run it like so:
D:>debug < script.txt
the file is:
```
a
mov cx, 3
jmp 0119
db 0d,0a,"enter 3 numbers",0d,0a,"$"
mov dx, 0105
mov ah, 09
int 21h
mov ah, 01
int 21h
an... | [
0.016062617301940918,
0.2634810507297516,
0.4854004979133606,
-0.1367010921239853,
0.1752229481935501,
0.07627696543931961,
0.7440443634986877,
-0.1914890557527542,
-0.01956833340227604,
-0.6938136219978333,
-0.004999553319066763,
0.7024298906326294,
-0.2929415702819824,
-0.181341707706451... | |
so debug is never receiving your keystrokes The program is hanging, waiting for more data to come in from the script.
If you put 3 numbers after the 'g' in the script, it should continue | [
0.2868379056453705,
-0.040425147861242294,
0.38802117109298706,
-0.057318586856126785,
0.23016467690467834,
-0.05771791562438011,
0.3859536051750183,
0.0336715430021286,
-0.49769917130470276,
-0.09288819134235382,
-0.08722149580717087,
0.41144663095474243,
-0.4075821042060852,
0.2065642476... | |
Is there any way to increase the time a drop-down menu created stays on screen? The drop down menu just appears and disappears as I touch the cursor. The drop-down was created using Prototype.
Use a different drop down menu:
Here's over 25 that might better suit your needs:
* <http://www.noupe.com/css/multilevel-drop... | [
0.09531187266111374,
-0.36373937129974365,
0.5235400199890137,
0.3276534974575043,
0.06657420843839645,
0.3576553463935852,
-0.012642273679375648,
0.14300216734409332,
-0.30317771434783936,
-0.6141083836555481,
0.12813785672187805,
0.42479267716407776,
-0.12851856648921967,
-0.176328033208... | |
UPDATE: All of these problems was for converting a Website application to a Web Project in Visual Studio. Once I dug in and I found the solution, as I marked as answer below.
Basically, if you are wanting to upgrade/move your Website project to a Web Project, you will run into a number of errors. The short how-to is i... | [
0.3123457729816437,
0.03434158116579056,
0.2334984540939331,
0.061944328248500824,
-0.05557586997747421,
-0.11187366396188736,
0.18200282752513885,
-0.030128030106425285,
-0.18839962780475616,
-0.9641100168228149,
-0.06935219466686249,
0.6062770485877991,
-0.12206174433231354,
0.0042267465... | |
regular code here
}
```
Long story short...
I have been converting a project that was outsourced overseas. Over 20,000 files in the 'web' project alone, for such a simple website (shakes head). It was written in vs2005 using VB.NET and C# (yes, both complilations). It was originally a Website applicaiton. I have con... | [
0.48556435108184814,
0.20849213004112244,
0.5393129587173462,
-0.13762912154197693,
-0.17578797042369843,
-0.10669270157814026,
0.4291747212409973,
0.20461440086364746,
-0.49039727449417114,
-0.7436537742614746,
0.0711992010474205,
0.5432093739509583,
-0.45659899711608887,
-0.0154291270300... | |
am alerted to a huge number of errors. I fix these by wrapping the codebehind files in a Namespace, and updating the usercontrol to use the new namespace.
But... 5000+ errors to go... Help!
[alt text http://eduncan911.com/blog/thumbnail/4-15-2009.6-00-13.PM.png](http://eduncan911.com/blog/thumbnail/4-15-2009.6-00-13.... | [
0.17786286771297455,
0.24757812917232513,
0.45490264892578125,
0.24626606702804565,
0.2529553771018982,
-0.14207707345485687,
0.5513752102851868,
-0.14535564184188843,
-0.2336980402469635,
-0.6129211783409119,
-0.0636025220155716,
0.37835296988487244,
-0.26355624198913574,
0.30087623000144... | |
ASPX file. The aspx page has in the header:
```
<%@ Page Title="My Posts" Language="C#"
MasterPageFile="~/MasterPages/Main.master" AutoEventWireup="true"
CodeFile="MyPosts.aspx.cs"
Inherits="MyHomepage_MyStuff_MyPosts" %>
```
Maybe there is a way I can reference this page elsewhere? Without changing it to t... | [
0.0851321667432785,
0.1312122941017151,
0.6469551920890808,
0.11539328098297119,
-0.151069775223732,
0.09518381208181381,
0.38109615445137024,
-0.21020235121250153,
-0.4079740345478058,
-0.8553657531738281,
-0.12468434125185013,
0.18461614847183228,
-0.14827778935432434,
0.0852374583482742... | |
[file].aspx.designer.cs auto-generated file. This got rid of 99% of my errors, as it was because the codebehind could not find a reference to the control (see screenshot in my question above).
This also re-writes the <%@ Page %> decleration in your aspx file to to inherit from the code behind's new name/namespace.
Al... | [
0.6325699090957642,
0.045521754771471024,
0.2286769300699234,
0.2780076563358307,
0.2744770348072052,
-0.125971257686615,
0.2462880164384842,
-0.2619837522506714,
-0.08694933354854584,
-0.4622099697589874,
0.032544322311878204,
0.38806912302970886,
-0.26816537976264954,
0.21972860395908356... | |
select Convert to Web Application. Closely inspect the error and warning log. Re-convert at will once you fix things.
If any aspx or ascx files do not have a designer.cs file, then the conversion failed on that file. Fix the references, namespace, etc and re-convert.
**Tip #1**: Make sure you have all references adde... | [
0.7015420794487,
-0.09462260454893112,
0.6832497119903564,
0.155404195189476,
-0.26513662934303284,
-0.25099796056747437,
0.2570643424987793,
-0.6151030659675598,
-0.0514984168112278,
-1.1774951219558716,
-0.01044572051614523,
0.6838059425354004,
-0.11135489493608475,
-0.2747768759727478,
... | |
can re-convert any sub-directory, or any file, any number of times. Say you had multiple errors in #2 you were working to fix, you can re-convert that file or directory multiple times until you fix it. Re-converting does not hurt the existing application. | [
0.3053833842277527,
-0.05856052041053772,
0.3487466275691986,
0.27051877975463867,
0.006725276820361614,
0.04138040915131569,
0.6077749133110046,
-0.106722392141819,
-0.3524477183818817,
-0.8747205138206482,
-0.23295427858829498,
0.730294942855835,
-0.2282935380935669,
0.2189052253961563,
... | |
I want to program a chess engine which learns to make good moves and win against other players. I've already coded a representation of the chess board and a function which outputs all possible moves. So I only need an evaluation function which says how good a given situation of the board is. Therefore, I would like to ... | [
-0.06786025315523148,
0.18683068454265594,
-0.0986499935388565,
0.12356416881084442,
0.16169029474258423,
0.6073189377784729,
0.06656073778867722,
-0.45045098662376404,
-0.20875057578086853,
-0.5469247698783875,
0.025381021201610565,
0.38149720430374146,
-0.14548882842063904,
0.14433693885... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.