text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
1558 | 1557
25 | | 92 | | 1559 | 1556 | 1553
26 | | 45 | | 1584 | 1582 | 1581
27 | | 37 | | 1608 | 1606 | 1605
28 | | 96 | | 1607 | 1604 | 1601
29 | | [
-0.603510320186615,
-0.038908619433641434,
0.28913334012031555,
-0.41715264320373535,
-0.5437425374984741,
0.680370569229126,
0.6079297661781311,
-0.15023598074913025,
-0.29745447635650635,
0.06874681264162064,
-0.24309353530406952,
0.267204612493515,
-0.705708920955658,
-0.082493424415588... | |
| 90 | | 1632 | 1630 | 1629
30 | | 53 | | 1631 | 1628 | 1625
31 | | 57 | | | |
32 | | 64 | | | |
33 | | 79 | | [
-0.650305986404419,
0.4599379003047943,
0.3158271908760071,
-0.4736741781234741,
-0.24313123524188995,
0.8701357841491699,
0.7046789526939392,
-0.11878591030836105,
-0.48984041810035706,
-0.057023100554943085,
-0.08481507748365402,
0.3556135892868042,
-0.4311278462409973,
-0.15970955789089... | |
| | |
34 | | 37 | | | |
35 | | 60 | | | |
36 | | 75 | | | |
37 | | [
-0.08966100960969925,
0.523557186126709,
0.13675640523433685,
-0.3352150619029999,
-0.08853106200695038,
0.5570234656333923,
0.724831223487854,
-0.2709774076938629,
-0.03584558144211769,
-0.08903171867132187,
-0.07294239103794098,
0.326673686504364,
-0.586294949054718,
-0.03717926889657974... | |
| 34 | | | |
38 | | 87 | | | |
39 | | 43 | | | |
(20 rows)
Time: 91.139 ms
``` | [
-0.3643036484718323,
0.4787556231021881,
0.31284475326538086,
-0.14866939187049866,
0.15398621559143066,
0.4020865559577942,
0.5334485769271851,
0.11661586165428162,
-0.46085265278816223,
-0.520196795463562,
0.014524012804031372,
0.06518092751502991,
-0.12372426688671112,
0.430577605962753... | |
how to Generate xml file in sql server 2005 using tsql
Stored proc exec DBName.dbo.Table
is
```
select * from table for xml path
SET @SQL= 'bcp "exec DBName.dbo.Table" queryout c:\myfile.xml -w -r -t -SServerName -T'
EXEC Master..xp_CmdShell @SQL
``` | [
-0.27456939220428467,
0.008586172945797443,
0.3533683121204376,
0.2197820395231247,
-0.21527540683746338,
-0.1416124552488327,
0.10629468411207199,
-0.395997017621994,
-0.10279474407434464,
-0.4749664068222046,
-0.008801908232271671,
0.1731530874967575,
-0.17396172881126404,
-0.08379723876... | |
Basically I would like to know the difference between
`Int32^ i = gcnew Int32();`
and
`Int32* i2 = new Int32();`
I have written the following code:
```
#include <stdio.h>
#using <mscorlib.dll>
using namespace System;
int main(void) {
Int32^ i = gcnew Int32();
Int32* i2 = new Int32();
pri... | [
-0.1786108911037445,
-0.18465833365917206,
0.3854304552078247,
-0.20982110500335693,
0.19531093537807465,
0.13237810134887695,
0.00910365954041481,
-0.15741227567195892,
-0.38881567120552063,
-0.6128650307655334,
-0.05207638442516327,
0.47085922956466675,
-0.29862380027770996,
0.3848266601... | |
directly on the stack?
In managed C++ *new* allocates on unmanaged heap, *gcnew* - on managed heap. Objects in the managed heap are eligible for garbage collection, while objects in the unmanaged heap are not. Pointers with *^* work like C# references - the runtime tracks them and uses for garbage collection, pointers ... | [
0.06029730290174484,
-0.004250465426594019,
0.03631404787302017,
0.1501213163137436,
-0.07920198887586594,
0.03798668831586838,
-0.08692684769630432,
-0.11321313679218292,
-0.24917541444301605,
-0.5768125057220459,
-0.40788426995277405,
0.11080246418714523,
-0.26030224561691284,
0.03658872... | |
The use of symbol literals is not immediately clear from what I've read up on Scala. Would anyone care to share some real world uses?
Is there a particular Java idiom being covered by symbol literals? What languages have similar constructs? I'm coming from a Python background and not sure there's anything analogous i... | [
0.1674768179655075,
0.08302169293165207,
-0.02483593486249447,
0.19919724762439728,
-0.27999094128608704,
-0.055535200983285904,
0.021939005702733994,
-0.19096535444259644,
-0.028523530811071396,
-0.7670499682426453,
0.1430726945400238,
0.4354358911514282,
-0.36804649233818054,
-0.04653530... | |
`'abcd eq 'abcd` will return true, while `"abcd" eq "abcd"` might not, depending on JVM's whims (well, it should for literals, but not for strings created dynamically in general).
Other languages which use symbols are Lisp (which uses `'abcd` like Scala), Ruby (`:abcd`), Erlang and Prolog (`abcd`; they are called atom... | [
0.4037838280200958,
0.16113197803497314,
-0.003732765093445778,
-0.08504980802536011,
-0.35827362537384033,
-0.22966846823692322,
0.123104527592659,
-0.07821773737668991,
0.1361904889345169,
-0.4626997411251068,
-0.26828065514564514,
0.5311080813407898,
-0.6059670448303223,
0.0209252238273... | |
"price" is "r", or about concatenating column names; so a database library in Scala could reasonably use symbols for table and column names. | [
0.021800223737955093,
-0.2284432351589203,
0.08457310497760773,
0.12478049844503403,
-0.2259025126695633,
0.3081546723842621,
-0.539169192314148,
-0.48443272709846497,
0.04271555691957474,
-0.3531661629676819,
-0.1918555051088333,
0.415377676486969,
-0.04578469693660736,
0.0848570466041565... | |
It's of course nice to give users friendly URLs for their content on your site. But how best to do that? There are a lot of advantages to something like foo.com/users/alice, most importantly that you aren't cluttering up your root namespace. But I think simplicity for users trumps all that. A lot of big sites seem to a... | [
0.49365749955177307,
0.22112323343753815,
0.2770327031612396,
0.07178886234760284,
-0.31026411056518555,
-0.3960610628128052,
0.20011793076992035,
0.509435772895813,
-0.38664183020591736,
-0.33895143866539,
0.12416062504053116,
0.46067604422569275,
-0.1779966503381729,
0.26293882727622986,... | |
foo.com/bob) they should reach foo.com/createnew?user=bob.
The user of course should never see the ugly "real" URLs above, just foo.com/alice or foo.com/bob. And note that the root namespace is shared. For example, foo.com/help should not get translated to foo.com/userpage?user=help.
Presumably I'm asking for some si... | [
0.442373663187027,
0.28179043531417847,
0.5412818193435669,
-0.10822500288486481,
-0.12881405651569366,
-0.1024743840098381,
0.6267588138580322,
0.14242306351661682,
-0.15041664242744446,
-0.6705554723739624,
-0.14173176884651184,
0.4546223282814026,
-0.3486812710762024,
-0.044459540396928... | |
in other questions but it seems to be tricky to search for. Pointers welcome! As well as additional keywords to make this more searchable, of course. Keywords: userspace, global namespace, URL namespace.
The following rules rewrite a URL of the form foo.com/bar to foo.com/userpage?user=bar conditional on bar not alread... | [
-0.007647808641195297,
0.32807138562202454,
0.8225706815719604,
-0.1727326363325119,
0.2976962924003601,
0.10317867994308472,
0.2937318682670593,
-0.20498907566070557,
-0.23771849274635315,
-0.638982355594635,
-0.235749289393425,
0.2256089746952057,
-0.3814007341861725,
0.3764610290527344,... | |
in the above code -- I have only proved it correct, not tried it. I'll update this answer when I've actually confirmed it works.) PS: CONFIRMED! | [
0.34966138005256653,
0.25233200192451477,
0.4201461374759674,
0.3031822741031647,
0.330606609582901,
-0.26968875527381897,
0.6607251167297363,
-0.030182253569364548,
0.22465072572231293,
-0.17723652720451355,
-0.10305038839578629,
0.3492431640625,
-0.08373060077428818,
0.05023816227912903,... | |
What's the optimal buffer size to use with a stream from HttpWebResponse.GetResponseStream()?
Online examples vary from 256b to as much as 5Kb. What gives? I guess buffer sizes might be situational. If so what are the situations to use what type of buffer size?
Thanks.
Really, it doesn't matter very much.
Sure, if y... | [
0.1921696811914444,
-0.13596820831298828,
0.2121739685535431,
0.2710634171962738,
-0.10516943782567978,
0.07482291013002396,
0.31824183464050293,
0.19703590869903564,
-0.4278610050678253,
-0.6861480474472046,
0.1965324431657791,
0.37477564811706543,
-0.1168173998594284,
-0.0462863147258758... | |
memory and introduce some fragmentation. Since you're obviously doing IO here, any time you gain by tweaking the buffers is going to be dominated by the IO time.
As a general rule, I go with a power of two between 2048 (2k) and 8192 (8k). Just make sure you know what you're doing if you go with a buffer equal to or la... | [
-0.0031717868987470865,
0.038282547146081924,
0.47884654998779297,
-0.045126765966415405,
0.055395036935806274,
0.012164916843175888,
0.08255161345005035,
-0.10728783905506134,
-0.5452688336372375,
-0.5444442629814148,
-0.049717120826244354,
0.4518285393714905,
0.2482566386461258,
0.157031... | |
very good at dealing with very short-lived objects (Gen 0 collections are fast), or very long-lived objects (Gen 2). Objects that live long enough to get to Gen 1 or 2 before being freed are comparatively more costly, and usually much more worth your time worrying about than how big the buffer is.
One final note: if y... | [
0.09170699119567871,
-0.06926799565553665,
0.01342527661472559,
0.28245195746421814,
-0.06635317951440811,
-0.18375982344150543,
0.21362823247909546,
0.17627577483654022,
-0.46159693598747253,
-0.8037526607513428,
-0.085334412753582,
0.4672602117061615,
0.07442574203014374,
-0.047082144767... | |
buffers. | [
-0.050274480134248734,
-0.13471412658691406,
0.4297899603843689,
0.023601219058036804,
0.10223491489887238,
0.32156383991241455,
-0.3189789056777954,
-0.2113986313343048,
-0.12169637531042099,
-0.45259472727775574,
-0.2529152035713196,
0.15375985205173492,
-0.40718981623649597,
-0.05520796... | |
I want to be able to store variables that are accessible to all of the other files in my ASP.net project but can be modified programatically. What I am looking for is something akin to being able to pull information from the web.config file for say the database connection strings (ex System.Configuration.ConfigurationM... | [
0.3646083474159241,
0.008701096288859844,
0.24958081543445587,
0.21691551804542542,
-0.015675580129027367,
0.07892458885908127,
-0.010195360518991947,
0.11164198815822601,
-0.36103758215904236,
-0.7230295538902283,
0.09994702786207199,
0.35149815678596497,
-0.22674749791622162,
0.255054771... | |
I need help in how to create a custom file extension in my C# app. I created a basic notes management app. Right now I'm saving my notes as .rtf (note1.rtf). I want to be able to create a file extension that only my app understands (like, note.not, maybe)
File extensions are an arbitrary choice for your formats, and it... | [
0.4805409908294678,
0.1996472179889679,
0.6479107737541199,
-0.005810879170894623,
-0.014309178106486797,
-0.1382281631231308,
0.16464419662952423,
0.06654416769742966,
-0.4923119843006134,
-0.9056859612464905,
-0.11012521386146545,
0.26875749230384827,
-0.14825724065303802,
-0.02368197776... | |
can parse. It can either be in plain text or binary, and it can even use XML or whatever format, the point is your app should be able to parse it easily. | [
0.370032399892807,
0.30601614713668823,
0.08236736059188843,
0.47267764806747437,
0.15504811704158783,
-0.15416128933429718,
0.25318384170532227,
0.2689453661441803,
-0.028159011155366898,
-0.7098525166511536,
-0.5214936137199402,
0.4157143831253052,
-0.18632495403289795,
-0.19137167930603... | |
I've got a string from an HTTP header, but it's been escaped.. what function can I use to unescape it?
```
myemail%40gmail.com -> myemail@gmail.com
```
Would urllib.unquote() be the way to go?
I am pretty sure that urllib's [`unquote`](http://docs.python.org/library/urllib.html#urllib.unquote) is the common way of d... | [
0.15256495773792267,
0.2866177260875702,
0.6889528632164001,
-0.036446522921323776,
-0.10064228624105453,
-0.19067338109016418,
0.4856919050216675,
-0.2634197175502777,
-0.04180160537362099,
-0.7374622225761414,
-0.36731699109077454,
0.21716070175170898,
-0.2798044979572296,
0.060895550996... | |
How can I cut the string before '(' sign with php
For example:
$a = "abc dec g (gold)";
How can I cut the string become only "abc dec g"??
I tried to used this strstr($a, '(', true) but error display.
You could do this, using [`explode`](http://www.php.net/explode):
```
list($what_you_want,) = explode('(', $str, 2... | [
0.513914167881012,
0.08125953376293182,
0.060791026800870895,
-0.17571388185024261,
-0.01723448745906353,
-0.005645092576742172,
0.4308232367038727,
-0.39012885093688965,
-0.37390628457069397,
-0.348815381526947,
-0.28641369938850403,
0.7223818898200989,
-0.38544797897338867,
0.21815724670... | |
I'm trying to "Add Service Reference" to SharePoint web services (e.g., "<http://cogent-moss/_vti_bin/Webs.asmx>"), but am having trouble. I seem to always get this error:
> The document at the url
> <http://cogent-moss/_vti_bin/Webs.asmx>
> was not recognized as a known document
> type. The error message from each... | [
0.23486542701721191,
0.3769906163215637,
0.325329452753067,
-0.18973630666732788,
-0.01953423023223877,
-0.3342217206954956,
0.3622630536556244,
-0.19002197682857513,
-0.2616475820541382,
-0.6131559610366821,
-0.2777051627635956,
0.3650880455970764,
-0.37281230092048645,
0.2344065755605697... | |
(the
> content type is 'text/html;
> charset=utf-8').'.
> - Report from 'XML Schema' is 'The document format is not recognized (the
> content type is 'text/html;
> charset=utf-8').'. Metadata contains a
> reference that cannot be resolved:
> '<http://cogent-moss/_vti_bin/Webs.asmx>'.
> The HTTP request is unaut... | [
-0.2346428483724594,
0.14995431900024414,
0.44592294096946716,
0.02667318470776081,
-0.009801923297345638,
0.027497079223394394,
0.5793481469154358,
-0.4398490786552429,
-0.15703658759593964,
-0.7447494268417358,
-0.21636919677257538,
0.5822793841362,
-0.23581255972385406,
0.25219583511352... | |
solutions to this, and most of them are solutions to run-time problems. I merely want to get Visual Studio 2008 to generate the proxy classes for me.
What's strange to me is that if I try the very same thing, except pointed at "<http://cogent-moss:8888/_vti_bin/Webs.asmx>", it all works fine. Both of these IIS Virtual... | [
-0.16458211839199066,
-0.07602794468402863,
0.3094320297241211,
0.010392195545136929,
-0.007389065809547901,
-0.18423929810523987,
0.3119131922721863,
-0.16525964438915253,
-0.29854270815849304,
-0.773328959941864,
0.06940732896327972,
0.46704810857772827,
-0.35858795046806335,
0.058404788... | |
SharePoint where port 80 is extended to port 8888 and port 80 allows anonymous but port 8888 requires Windows Authentication. Have you checked in IIS Manager to see if that is the case? | [
-0.06206827610731125,
-0.15327458083629608,
0.003071902086958289,
-0.04494933784008026,
0.12654277682304382,
-0.5218780040740967,
0.49352893233299255,
-0.017161741852760315,
-0.0572633296251297,
-0.8085164427757263,
0.09744098782539368,
0.4665263891220093,
-0.4666375517845154,
0.2071078121... | |
I have a controller and I would like to require Authorization for all actions by default except a couple. So in the example below all actions should require authentication except the Index. I don't want to decorate every action with the Authorize, I just want to override the default authorization in certain circumstanc... | [
0.07131770998239517,
-0.5805912017822266,
0.40021705627441406,
-0.058776501566171646,
0.25096145272254944,
-0.21415317058563232,
0.3250793516635895,
-0.19861990213394165,
-0.2572166919708252,
-0.34135204553604126,
-0.16887959837913513,
0.6885267496109009,
-0.43300577998161316,
-0.011772991... | |
}
public ActionResult About()
{
// This action will require authorization
return View();
}
}
```
Ok, this is what I did. If there is a better way let me know.
```
public class NotAuthorizeAttribute : FilterAttribute
{
// Does nothing, just used for decoration
}
public class BaseContr... | [
0.32949087023735046,
-0.5426124930381775,
0.447988897562027,
-0.032093871384859085,
0.25211435556411743,
-0.30511096119880676,
0.3516668975353241,
-0.3436216711997986,
-0.29550549387931824,
-0.46912261843681335,
-0.13956061005592346,
0.5561358332633972,
-0.48864710330963135,
-0.00950821768... | |
object[] attributes = filterContext.ActionDescriptor.GetCustomAttributes(true);
if (attributes.Any(a => a is NotAuthorizeAttribute)) return;
// Must login
if (!filterContext.HttpContext.User.Identity.IsAuthenticated)
{
filterContext.Result = new HttpUnauthorizedResult();
... | [
-0.19770142436027527,
-0.33562877774238586,
0.620420515537262,
-0.17092889547348022,
0.05172190070152283,
-0.1160847395658493,
0.4485219120979309,
-0.3169870674610138,
-0.26606881618499756,
-0.6732801198959351,
-0.29360270500183105,
0.6752871870994568,
-0.4817343056201935,
-0.0404016301035... | |
How do you debug lua code embedded in a c++ application?
From what I gather, either I need to buy a special IDE and link in their special lua runtime (ugh). Or I need to build a debug console in to the game engine, using the [lua debug API](http://www.lua.org/manual/5.1/manual.html#3.8) calls.
I am leaning toward wri... | [
0.6256102323532104,
-0.006506445351988077,
0.15607662498950958,
0.10945332795381546,
0.18416407704353333,
-0.05133190378546715,
0.009301473386585712,
-0.08718946576118469,
-0.10331524908542633,
-0.49181127548217773,
-0.10098128020763397,
0.6085485219955444,
-0.10465598106384277,
0.16486345... | |
plugin, there is a SciTE debugger extension in Lua for Windows, and there is the Kepler project's [RemDebug](http://www.keplerproject.org/remdebug/index.html), as well as their [LuaEclipse](http://luaeclipse.luaforge.net/).
RemDebug may be on the track of what you need, as it was built to allow for debugging CGI scri... | [
0.1684223860502243,
-0.3695836663246155,
0.20543693006038666,
0.3060334026813507,
0.25978991389274597,
-0.21191541850566864,
-0.06871692091226578,
0.0922231674194336,
-0.34547266364097595,
-0.6039981842041016,
-0.21192586421966553,
0.4769248962402344,
-0.39804840087890625,
0.07139759510755... | |
control over the engine, then that won't be as big an issue.
This isn't currently possible for developers of Adobe Lightroom plugins, for example, because Lightroom does not expose `require` inside the plugin's sandbox.
A surprise to me has been how rarely I have felt a need for a debugger when working with Lua. I'v... | [
0.17451836168766022,
0.03384867310523987,
0.334486722946167,
0.10074207931756973,
-0.0371737964451313,
-0.55601567029953,
0.00048068154137581587,
-0.5321857929229736,
-0.11624101549386978,
-0.46618151664733887,
-0.19870851933956146,
0.8527024388313293,
-0.17771761119365692,
-0.188242897391... | |
I am using CreateProcess to create a cmd.exe process that is passed a parameter that it executes and quits, this makes command prompt flash up on the screen.
I tried to avoid this by setting STARTUPINFO struct wShowWindow to SW\_HIDE but this parameter seems to affect the calling window, not the window for the proces... | [
0.5321037769317627,
0.06161516159772873,
0.22181446850299835,
-0.2613421082496643,
0.06371700763702393,
-0.4038931429386139,
0.1533115953207016,
-0.026246914640069008,
-0.06109916791319847,
-0.5328876972198486,
-0.12242539972066879,
0.7567129135131836,
-0.31807440519332886,
0.2491278648376... | |
I have repository class that is used by at least 2 other classes. This repository class needs to be initialized - which is high in cost (querying database). Now, I create separate instances of repository wherever I need it. The thing is, that everytime I create repository it has to be initialized. How to design such re... | [
0.16889800131320953,
-0.03384270519018173,
-0.3117353916168213,
0.39823630452156067,
-0.07984798401594162,
-0.20615170896053314,
0.03264034539461136,
-0.024861913174390793,
-0.18362389504909515,
-0.5513538718223572,
0.014392247423529625,
0.03108387067914009,
-0.10871533304452896,
0.4156502... | |
by yourself. | [
0.5706143975257874,
0.3195842504501343,
0.06208599731326103,
0.3107030391693115,
-0.20969611406326294,
-0.35927316546440125,
0.20850114524364471,
0.042506393045186996,
-0.6257471442222595,
0.09044753015041351,
-0.24377182126045227,
-0.0401589572429657,
-0.49789711833000183,
-0.349852800369... | |
I am a bit rusty on generics, trying to do the following, but the compiler complains:
```
protected List<T> PopulateCollection(DataTable dt) where T: BusinessBase
{
List<T> lst = new List<T>();
foreach (DataRow dr in dt.Rows)
{
T t = new T(dr);
lst.Add(t);
}
return lst;
}
```
So a... | [
0.2456454336643219,
0.03836393728852272,
0.11182215809822083,
-0.38530609011650085,
-0.14399072527885437,
-0.10224136710166931,
0.22843129932880402,
-0.24969622492790222,
-0.05824815854430199,
-0.5129954814910889,
-0.1628187894821167,
0.3817399740219116,
-0.5621110796928406,
0.269605964422... | |
collection. it complains that T is not a type or namespace it knows about and that I can't use where on a non-generic declaration.
Is this not possible?
There are two big problems:
* You can't specify a constructor constraint which takes a parameter
* Your method isn't currently generic - it should be `PopulateCollec... | [
0.17197521030902863,
-0.2983173727989197,
0.426215261220932,
0.39260706305503845,
-0.17703895270824432,
-0.1471039205789566,
-0.15051838755607605,
-0.1393902450799942,
-0.5216048359870911,
-0.3217560052871704,
-0.0778782069683075,
0.5061907172203064,
-0.5926806926727295,
0.4886662364006042... | |
where T: BusinessBase, new()
{
List<T> lst = new List<T>();
foreach (DataRow dr in dt.Rows)
{
T t = new T();
t.PopulateFrom(dr);
lst.Add(t);
}
return lst;
}
```
If you're using .NET 3.5, you can make this slightly simpler using the extension method in [`DataTableExtensions`... | [
-0.032782770693302155,
-0.4244191348552704,
0.8332122564315796,
-0.10183649510145187,
0.13990268111228943,
0.2370751053094864,
-0.11777304857969284,
-0.31985270977020264,
-0.3051414489746094,
-0.6028074026107788,
-0.45028141140937805,
0.6128658652305603,
-0.4341234862804413,
0.273199796676... | |
T t = new T();
t.PopulateFrom(dr);
}.ToList();
}
```
Alternatively, you could make it an extension method itself (again, assuming .NET 3.5) and pass in a function to return instances:
```
static List<T> ToList<T>(this DataTable dt, Func<DataRow dr, T> selector)
where T: BusinessBase
{
return dt.A... | [
0.127674400806427,
-0.45924991369247437,
0.40734508633613586,
-0.27446168661117554,
-0.15677489340305328,
0.1429574191570282,
0.2523948550224304,
-0.3224371075630188,
-0.16218359768390656,
-0.6836289167404175,
-0.37288668751716614,
0.7813771367073059,
-0.623153567314148,
0.233103409409523,... | |
it but does mean you can't work generically without also having the "factory" function. | [
0.6299933195114136,
0.03262123093008995,
0.05324593931436539,
-0.14591875672340393,
0.1088728979229927,
-0.0011604530736804008,
0.25264570116996765,
0.09560715407133102,
-0.104352205991745,
-0.14048631489276886,
-0.28704768419265747,
0.4544391334056854,
-0.07999294996261597,
0.397978276014... | |
I want to play around with some graphics stuff. Simple animations and things. I want to fool around with raytracing too. I need help finding a library that will help me do these things. I have a few requirements:
* Must be able to do raytracing
* Must be for a high level language (python, .NET, etc.). Please no C/C++
... | [
0.8584787845611572,
0.122713103890419,
-0.19410453736782074,
0.2981398105621338,
0.017817683517932892,
-0.4016231894493103,
-0.17401649057865143,
0.3173935115337372,
-0.20448529720306396,
-0.6448522806167603,
0.2717444598674774,
0.6723381876945496,
-0.1295137107372284,
0.09830836951732635,... | |
[Bespoke Software » Ray Tracing - Materials](http://www.bespokesoftware.org/wordpress/?p=22) | [
0.7190138101577759,
-0.1823345571756363,
0.543273389339447,
0.25071027874946594,
0.1375354528427124,
0.08160930126905441,
-0.17409878969192505,
-0.0007110267179086804,
-0.32031458616256714,
-0.06617944687604904,
-0.3792422115802765,
0.2892604470252991,
-0.2513701021671295,
0.13487061858177... | |
```
typedef pair<double, double> dd;
const double epsilon = 1e-6;
struct sort_by_polar_angle {
dd center;
// Constuctor of any type
// Just find and store the center
template<typename T> sort_by_polar_angle(T b, T e) {
int count = 0;
center = dd(0,0);
while(b != e)... | [
0.13556310534477234,
-0.10851214826107025,
0.6367126703262329,
-0.03268377482891083,
0.08809997141361237,
-0.03306404501199722,
0.014537101611495018,
-0.4303392767906189,
0.03591660410165787,
-0.5320589542388916,
-0.2421087622642517,
0.308693528175354,
-0.44084978103637695,
0.1624076813459... | |
center.first += b->first;
center.second += b->second;
b++;
count++;
}
double k = count ? (1.0/count) : 0;
center.first | [
-0.10263196378946304,
-0.11456077545881271,
0.19018538296222687,
-0.2307496964931488,
-0.11099372059106827,
0.2344377040863037,
0.07853534817695618,
-0.4970107972621918,
-0.2540495991706848,
-0.39871668815612793,
-0.3514345586299896,
-0.12100919336080551,
-0.3594679832458496,
0.33190175890... | |
*= k;
center.second *= k;
}
// Compare two points, return true if the first one is earlier
// than the second one looking by polar angle
// Remember, that when writing comparator, you should
// override not ‘operator <’ but ‘operator ()’
bool operator () (const dd& a, const dd& b) ... | [
-0.0672874003648758,
-0.12792262434959412,
0.5839473009109497,
-0.3729129135608673,
-0.0777798593044281,
0.38086166977882385,
0.15416309237480164,
-0.47039687633514404,
-0.09277641773223877,
-0.21534186601638794,
-0.2993808686733246,
0.3860413432121277,
-0.1682884693145752,
-0.164058715105... | |
double p2 = atan2(b.second-center.second, b.first-center.first);
return p1 + epsilon < p2;
}
};
// ...
vector < dd > points;
sort(all(points), sort_by_polar_angle(all(points)));
```
When sort\_by\_polar\_angle() is called, is it function as a construnctor?
How the overloaded operator () correc... | [
-0.19311262667179108,
-0.3371104300022125,
0.702660858631134,
-0.2276068925857544,
-0.20616203546524048,
0.136660635471344,
-0.1295773684978485,
-0.32585325837135315,
-0.22649987041950226,
-0.3596721589565277,
-0.32275885343551636,
0.20094841718673706,
-0.6276673674583435,
-0.2090777605772... | |
i need a free control for my asp.net pages which would display pdf documents,so that the client can view pdf files without the need of installing any pdf. i tried searching in google but all i get is for windows application.
thanks in advance
Unfortunately there's no way around this. UAC is actually intended specifica... | [
0.4988099932670593,
0.14897441864013672,
0.3608110547065735,
0.12193530052900314,
-0.04425264149904251,
-0.3497236371040344,
0.32663118839263916,
0.13537821173667908,
-0.12145080417394638,
-0.5970353484153748,
-0.01986096426844597,
0.5489175319671631,
-0.21870854496955872,
0.29041889309883... | |
I can display a PDF file from `byte[]` in asp.net.
The problem is that it contains hyperlinks and I want to disable or remove these hyperlink events.
You can libraries like [this one](http://www.pdfsharp.com/PDFsharp/) to open and modify the PDF file and convert every hyperlink object to simple text. | [
0.40307387709617615,
0.11307449638843536,
0.39266300201416016,
0.05180688202381134,
-0.26513907313346863,
-0.24363361299037933,
0.01695994660258293,
0.06611492484807968,
-0.2385648936033249,
-0.836811900138855,
-0.21802231669425964,
0.5284920930862427,
-0.060838405042886734,
0.212612062692... | |
On Page\_Init I create a table of dynamically created controls based on a couple of database tables. One of the controls is an ImageButton for moving an list item up the list. What this event handler does is to update the SortOrder column in the database for the affected items.
Now the problem is that since the contro... | [
-0.2772470712661743,
-0.0738440454006195,
0.5051581859588623,
0.0710042342543602,
-0.13180914521217346,
0.22105702757835388,
-0.04661795496940613,
-0.1006581038236618,
-0.2488977462053299,
-0.8417410254478455,
0.2384653091430664,
0.44793763756752014,
-0.6927633881568909,
0.0787817612290382... | |
ImageButton command event does not work any more.
* Should I implement a method for updating the data in the table without recreating it?
* Should I reload the page in code after the event has fired?
What's your preferred way for solving this problem?
Page events such as `Init` and `Load` will always fire before the... | [
0.17154407501220703,
-0.2105291783809662,
0.4278653562068939,
-0.19381171464920044,
-0.39273601770401,
0.06248711049556732,
0.3017369210720062,
-0.0964163988828659,
-0.4890720248222351,
-0.6848450303077698,
-0.07078304141759872,
0.5930175185203552,
-0.6204280853271484,
-0.23150838911533356... | |
should call a procedure (let's call it `BindData()` for illustration) that handles the creation of the table based on database data. This method would be similar to a binding method that binds to the database data and renders UI elements on the basis of that binding. IOW, you should remove the table creation code from ... | [
0.16161516308784485,
-0.11409373581409454,
0.5138042569160461,
0.1807483583688736,
-0.046775124967098236,
-0.3291093409061432,
-0.28136008977890015,
-0.19286756217479706,
-0.30053290724754333,
-0.6848273277282715,
-0.1465473175048828,
0.6154919266700745,
-0.5605621337890625,
-0.08011157065... | |
for the control to the event to fire on subsequent postback.
b. When your `ImageButton_Click` method executes, it calls the `BindData()` method to recreate the table and it's bindings but with new sort order rules.
So, the order of execution on first load is:
1. `Page_Init`
2. `BindData()`
The order of execution on... | [
-0.1031886488199234,
-0.1820971816778183,
0.6620330214500427,
-0.22816826403141022,
-0.13005812466144562,
-0.004566458519548178,
-0.022142933681607246,
-0.39155134558677673,
-0.44275426864624023,
-0.6915450096130371,
-0.49411365389823914,
0.4519188702106476,
-0.5502811074256897,
-0.1179782... | |
For a [bipartite graph](http://en.wikipedia.org/wiki/Bipartite_graph), you can substitute the [adjacency matrix](http://en.wikipedia.org/wiki/Adjacency_matrix) with what is called its [biadjacency matrix](http://en.wikipedia.org/wiki/Adjacency_matrix#Adjacency_matrix_of_a_bipartite_graph):
> The adjacency matrix A of ... | [
-0.2783259153366089,
0.03372504562139511,
0.05043133720755577,
-0.12460601329803467,
-0.6995978355407715,
0.2953021228313446,
0.2704397141933441,
-0.3018042743206024,
-0.059743478894233704,
-0.609975278377533,
-0.533746063709259,
-0.05429260432720184,
-0.7281498908996582,
0.216020703315734... | |
the sets U and V being nodes that are on an odd or even topological level, respectively.
This means, that for a DAG with n nodes, I only need a (n/2)2 matrix (on average) instead of a n2 matrix. Problem is, I don't know how to construct it. Any hints?
I believe you can't construct a biadjacency matrix for a DAG, becau... | [
-0.11877653002738953,
-0.14081190526485443,
0.30613160133361816,
-0.018470052629709244,
-0.5895874500274658,
0.1537218987941742,
0.20987270772457123,
-0.37005460262298584,
-0.2446732074022293,
-0.41583526134490967,
-0.12706878781318665,
0.08035511523485184,
-0.6400284767150879,
0.035116292... | |
The graph is clearly a DAG, since it is directed and there are no cycles (A->B->C<-A isn't a cycle). However, the graph is not bipartite: there is no way to divide A, B and C to two disjoint sets, where there are no edges between vertices in the same set.
The conclusion is that there graphes which are DAGs but not bi... | [
-0.4316311776638031,
-0.2610503137111664,
0.14418426156044006,
0.04149146005511284,
-0.732641339302063,
-0.04322834685444832,
0.15817871689796448,
0.012449015863239765,
-0.3519064486026764,
-0.7558703422546387,
-0.4526224434375763,
-0.22167575359344482,
-0.7303811311721802,
-0.023763479664... | |
I'm working on a project that requires Visual Studio 2005 and I've been trying to find a legitimate download site for Visual Studio 2005 Express, but it seems like Microsoft only wants people to download the 2008 version instead.
Anyone knows why it's like this and if there is some link somewhere where Visual Studio 2... | [
-0.07279618084430695,
0.13672196865081787,
0.08713242411613464,
-0.09498687088489532,
-0.5510262250900269,
0.00044395288568921387,
0.21568715572357178,
0.13632704317569733,
-0.17040881514549255,
-0.4653896391391754,
0.008850691840052605,
0.41705623269081116,
0.0074837650172412395,
0.026774... | |
I am kind of confused on how `Flush` ( and `NHibernate.ISession`) in NHibernate works.
From my code, it seems that when I saved an object by using `ISession.Save(entity)`, the object can be saved directly to the database.
However, when I update and object using `ISession.SaveOrUpdate(entity)` or `ISession.Update(ent... | [
-0.04383457079529762,
0.09519053250551224,
0.2448183298110962,
0.1346265971660614,
0.07499726116657257,
0.003988884389400482,
-0.1623239666223526,
0.0306034404784441,
-0.25617051124572754,
-0.7151259779930115,
-0.054861828684806824,
0.569958508014679,
-0.29519131779670715,
0.25284361839294... | |
`myCar` is not updated to database. However, if I call `ISession.Flush` afterwards, then it is updated.
When to use `Flush`, and when not to use it?
In many cases you don't have to care when NHibernate flushes.
**You only need to call flush if you created your own connection** because NHibernate doesn't know when y... | [
-0.09245982021093369,
-0.09383393079042435,
0.5502580404281616,
0.19474585354328156,
-0.1454063206911087,
0.006316513754427433,
-0.37227675318717957,
0.25934118032455444,
-0.5577832460403442,
-0.8580616116523743,
0.23335495591163635,
0.5583763718605042,
-0.24642343819141388,
0.255534946918... | |
have to care when NHibernate updates data in the database unless it is committed. It is not visible to anyone anyway.
NHibernate flushes if
* you call commit
* before queries to ensure that you filter by the actual state in memory
* when you call flush
Example:
```
using (session = factory.CreateSession())
using (s... | [
-0.10819566249847412,
0.12734439969062805,
0.5004569888114929,
-0.24611321091651917,
0.09083022177219391,
0.08465513586997986,
0.3647797703742981,
-0.365497350692749,
-0.4338635206222534,
-0.7971574068069458,
0.07418002188205719,
0.6141600608825684,
-0.5050442218780518,
0.3521295487880707,... | |
changes outside of the session. (This means with a detached entity, that is an entity that is not known by the session).
---
**Notes on performance:** Flush not only performs the required SQL statements to update the database. It also searches for changes in memory. Since there is no dirty flag on POCOs, it needs to ... | [
0.21960021555423737,
-0.1229073777794838,
0.2420262098312378,
0.2559862732887268,
0.04855000227689743,
-0.27468034625053406,
0.4377707540988922,
-0.10638050734996796,
-0.5622732043266296,
-0.7009252905845642,
0.05291523039340973,
0.6920192837715149,
-0.08459953218698502,
-0.103939019143581... | |
objects (serialization is required to check for changes)
* Use [read-only entities](http://nhibernate.info/doc/nhibernate-reference/readonly.html) when appropriate
* Set [mutable = false](http://nhibernate.info/doc/nhibernate-reference/mapping.html#mapping-declaration-class) when appropriate
* When using custom types i... | [
-0.2178686410188675,
0.08166343718767166,
0.22426053881645203,
0.2516030967235565,
-0.326158344745636,
0.02210072986781597,
0.08124256879091263,
-0.3766917884349823,
-0.22209571301937103,
-0.7102506756782532,
-0.19145835936069489,
0.482153058052063,
-0.2737821936607361,
0.14204177260398865... | |
I've got a static class member which is some container, like
(Foo.h)
```
class Foo
{
...
private:
static list<string> s_List;
}
```
I need to populate the list with a number of specific values. Actually it should be also **const**, but that might overcomplicate the problem further.
All the class member functi... | [
0.05346643924713135,
0.17411859333515167,
0.40606802701950073,
-0.1353270411491394,
-0.007672039791941643,
-0.011069790460169315,
0.06885051727294922,
-0.21528290212154388,
-0.271199494600296,
-0.443168044090271,
-0.10555300116539001,
0.28885596990585327,
-0.48708316683769226,
0.2496122568... | |
other method is like Neil Butterworth suggested. | [
0.29828232526779175,
-0.04975814372301102,
-0.08851008117198944,
0.2877514064311981,
0.025482751429080963,
0.11136077344417572,
0.0752498209476471,
-0.07992416620254517,
-0.18005390465259552,
-0.43493303656578064,
0.05278521776199341,
0.38440296053886414,
-0.06273817270994186,
-0.088623046... | |
In my win app - I want to display an information (or db icon) if the database server is not reachable. But i dont want to wait the 30sec timeout. The user can configure server, user, pw in my options dialog.
So, is there a way in subsonic to check very fast if an db connection works?
In the current revision (521) there... | [
0.012687149457633495,
0.14239105582237244,
0.5764787793159485,
0.03802917152643204,
-0.13531692326068878,
0.024733370169997215,
0.44019705057144165,
-0.22677895426750183,
0.031073229387402534,
-0.6338255405426025,
-0.14012748003005981,
0.6371995806694031,
-0.1742226481437683,
-0.0050079347... | |
Is there any other site for studying critieria queries like <http://www.hibernate.org/hib_docs/nhibernate/1.2/reference/en/html/querycriteria.html>
See if you can find existing users of the packages either through people you actually know or through forums online. See what the pain points and advantages are. Also, you ... | [
0.6305551528930664,
-0.07167678326368332,
0.12603463232517242,
0.30659207701683044,
-0.20892678201198578,
-0.033558450639247894,
-0.015871373936533928,
0.094978928565979,
-0.14435414969921112,
-0.2750064432621002,
0.29022812843322754,
0.6147258281707764,
0.060359399765729904,
0.02127691172... | |
My server (ubuntu 8.04) LAMP running drupal 6, when there is high traffic, it stops serving pages. A restart of apache2 will not work, so I have to restart the service.
I found this message in the apache2 error.log
> [notice] caught SIGWINCH, shutting
> down gracefully
Also I notice that the process id of the apach... | [
0.03765925392508507,
0.1486489176750183,
0.7358483672142029,
0.027525415644049644,
-0.3607575595378876,
-0.22958557307720184,
0.6616800427436829,
0.1242528185248375,
-0.27662694454193115,
-0.6890960335731506,
-0.15006646513938904,
0.3610181212425232,
-0.31683021783828735,
0.060466550290584... | |
raising the MaxClients setting" error, but fixed that.
Regarding the PID, my installation has [prefork module](http://httpd.apache.org/docs/2.0/mod/prefork.html) installed, so after [MaxRequestPerChild](http://httpd.apache.org/docs/2.0/mod/mpm_common.html#maxrequestsperchild) is reached, it recycles the child process.... | [
-0.09190864115953445,
-0.287505567073822,
0.9410457611083984,
0.10782327502965927,
-0.2821880280971527,
0.07155046612024307,
0.28274133801460266,
-0.30583974719047546,
-0.32627543807029724,
-0.3172280490398407,
0.03685848042368889,
0.540891706943512,
-0.16796515882015228,
0.135137766599655... | |
01:50:07 2009] [notice]
> Apache/2.2.8 (Ubuntu)
> PHP/5.2.4-2ubuntu5.3 with
> Suhosin-Patch configured -- resuming
> normal operations
>
>
> [Fri Apr 24 17:13:35 2009] [error]
> [client 195.70.62.131] client sent
> HTTP/1.1 request without hostname (see
> RFC2616 section 14.23):
> /w00tw00t.at.ISC.SANS.DFind:... | [
-0.5486901998519897,
0.08751882612705231,
0.7080637216567993,
-0.19874568283557892,
-0.27112677693367004,
0.04602036625146866,
0.8271316289901733,
-0.10155901312828064,
-0.05572102963924408,
-0.6200844645500183,
-0.5069273710250854,
0.47923022508621216,
-0.2390296906232834,
0.2083681225776... | |
found or unable to stat:
> /usr/lib/cgi-bin/twiki
>
>
> [Sat Apr 25 20:05:12 2009] [error]
> [client 84.243.222.12] script not
> found or unable to stat:
> /usr/lib/cgi-bin/wiki
>
>
> [Sat Apr 25 20:05:12 2009] [error]
> [client 84.243.222.12] script not
> found or unable to stat:
> /usr/lib/cgi-bin/wikis
> ... | [
-0.5023724436759949,
0.29503336548805237,
0.4972505569458008,
0.16214565932750702,
0.1139029860496521,
0.08858153969049454,
0.6408626437187195,
0.12447464466094971,
-0.22662106156349182,
-0.7326387166976929,
-0.43444007635116577,
0.2597174346446991,
-0.1562950760126114,
0.30799558758735657... | |
[notice]
> Graceful restart requested, doing
> restart
Well, SIGWINCH is used in some situations when starting and stopping Apache on Ubuntu. If I do `sudo apache2ctl graceful-stop` on my Ubuntu 8.10 server, I get this in my log:
```
[Fri Apr 24 22:41:15 2009] [notice] caught SIGWINCH, shutting down gracefully
```
... | [
-0.3486137390136719,
-0.10735130310058594,
0.4254221022129059,
0.020121416077017784,
-0.1797693818807602,
-0.3740144968032837,
0.5064172744750977,
0.24087058007717133,
-0.44226008653640747,
-0.21477657556533813,
-0.1583009660243988,
0.34155160188674927,
-0.08751043677330017,
0.045865364372... | |
problem at all.
Try posting more of the logfile if you can, it'll be a lot easier to analyse :) | [
-0.025547271594405174,
0.018726114183664322,
0.3123907744884491,
0.403379887342453,
0.17758809030056,
-0.06098764389753342,
0.28612226247787476,
0.3115222454071045,
-0.5608396530151367,
-0.5270920395851135,
0.03180372714996338,
0.6016570925712585,
-0.21787092089653015,
0.002772969659417867... | |
I was wondering how to get the number of items stored in a TBucketList. As far as I can see there is only the number of buckets and the bucket array available, so all I can think of is
```
Count := 0;
for I := 0 to BucketList.BucketCount - 1 do
Inc (Count, BucketList.Buckets [I].Count);
```
That does work but it s... | [
0.072476826608181,
-0.06635212898254395,
0.25793153047561646,
-0.025689899921417236,
-0.01396803930401802,
0.21066276729106903,
0.25291478633880615,
-0.18716862797737122,
-0.3413930833339691,
-0.5818694233894348,
0.3560439348220825,
0.5268054008483887,
-0.3015865385532379,
0.22500994801521... | |
provide a Count member like the other containers?
Thanks!
Libraries are never complete. But you can extend them.
If you need this value often, you can write a class helper for that.
```
TBucketListHelper = class helper for TBucketList
function GetCount: Integer;
end;
function TBucketListHelper.GetCount: Integer;
... | [
-0.03118394874036312,
-0.18200451135635376,
0.29687732458114624,
-0.1557452529668808,
0.193386971950531,
-0.006095431745052338,
0.37211674451828003,
-0.4600083827972412,
-0.11777576804161072,
-0.5869113206863403,
0.017252013087272644,
0.46093234419822693,
-0.5013480186462402,
0.11423793435... | |
Is there a tool like Reflector for COM libraries? I would like to open a COM library and browse the classes and interfaces just like in Reflector. I would rather not install Visual Basic 6.0 in order to do this, if possible.
Not in the same way however there are number of tools that allow you to examine the type librar... | [
0.5245326161384583,
-0.09550681710243225,
0.1518806666135788,
0.27485954761505127,
-0.2589726746082306,
-0.09634903818368912,
-0.06354542821645737,
0.1451229602098465,
-0.12956786155700684,
-0.9171478748321533,
0.24379324913024902,
0.552863359451294,
-0.31419461965560913,
0.218562707304954... | |
the assembly. | [
-0.037704579532146454,
-0.0010916758328676224,
0.12344497442245483,
0.06094745919108391,
-0.3495343029499054,
0.09566695243120193,
-0.2074282467365265,
0.04958563670516014,
-0.41543447971343994,
-0.5060605406761169,
-0.4446291923522949,
0.14958223700523376,
-0.13792268931865692,
0.21420331... | |
Is there a method that returns all the keys for an object conforming to the NSKeyValueCoding protocol?
Something along the lines of `[object getPropertyKeys]` that would return an NSArray of NSString objects. It would work for any KVC-compliant object. Does such a method exist? I haven't found anything in searching th... | [
-0.06461905688047409,
-0.1973799765110016,
0.3703964054584503,
0.0818357914686203,
0.2155265361070633,
-0.03569468483328819,
0.40507784485816956,
-0.35288912057876587,
-0.3250769078731537,
-0.48665279150009155,
-0.41780146956443787,
0.7456773519515991,
-0.36332008242607117,
0.1854252815246... | |
const char *propType = getPropertyType(property);
NSString *propertyName = [NSString stringWithUTF8String:propName];
NSString *propertyType = [NSString stringWithUTF8String:propType];
}
}
free(properties);
``` | [
0.07367090880870819,
-0.15030629932880402,
0.2489207684993744,
-0.2199854701757431,
0.1653565615415573,
-0.07866858690977097,
0.5393400192260742,
-0.5950359106063843,
0.030505504459142685,
-0.4802078902721405,
-0.5539583563804626,
0.8178591728210449,
-0.31763413548469543,
0.345572769641876... | |
I need a code snippet for reading the mainboard uuid in c (in Windows XP and Windows Vista if there is a difference, else just for Windows).
[This MSDN example](http://msdn.microsoft.com/en-us/library/aa394072.aspx) shows how to use Windows Management Instrumentation APIs to read information about the local computer. I... | [
0.23592181503772736,
0.01073000393807888,
0.4342257082462311,
0.12538495659828186,
0.23170970380306244,
-0.1300496608018875,
0.2681512236595154,
0.030044397339224815,
-0.2584213614463806,
-0.6745069622993469,
0.033257581293582916,
0.3586236536502838,
0.036274395883083344,
0.429760932922363... | |
As I was reading this ([Find the most common entry in an array](https://stackoverflow.com/questions/278488/puzzle-find-the-most-common-entry-in-an-array)), the [Boyer and Moore's Linear Time Voting Algorithm](http://www.cs.utexas.edu/users/moore/best-ideas/mjrty/index.html) was suggested.
If you follow the link to th... | [
-0.2728329598903656,
0.09119407087564468,
0.25620153546333313,
0.13344986736774445,
-0.3490842282772064,
0.1113089770078659,
-0.07671952247619629,
-0.40503790974617004,
-0.25431162118911743,
-0.5800644755363464,
-0.02111855335533619,
-0.01910698413848877,
-0.3437436521053314,
0.36175140738... | |
counter
> according to whether e is the current
> candidate.
>
>
> When we are done, the current
> candidate is the majority element, if
> there is a majority.
If I use this algorithm on a piece of paper with `AAACCBB` as input, **the suggested candidate would become B** what is obviously wrong.
As I see it, t... | [
-0.031120678409934044,
0.060971662402153015,
0.5055667161941528,
-0.12415443360805511,
-0.1271183341741562,
-0.21921518445014954,
0.21726225316524506,
-0.4052027463912964,
-0.25917571783065796,
-0.400637686252594,
-0.1664377897977829,
0.28326791524887085,
-0.39072561264038086,
0.4590142071... | |
to touch anything involving logic.
Note: Here is a a [C++ implementation of the algorithm](http://www.cis.rit.edu/~njs8030/coding/majority.C) from Niek Sanders. I believe he correctly implemented the idea and as such it has the same problem (or doesn't it?).
The algorithm only works when the set has a majority -- more... | [
-0.05203242972493172,
0.0850771963596344,
-0.04260682687163353,
-0.14165984094142914,
-0.08293352276086807,
0.07790093868970871,
0.4094114601612091,
-0.1541953831911087,
-0.39315590262413025,
-0.3363369107246399,
-0.09492291510105133,
0.14860820770263672,
-0.18149781227111816,
0.0279487855... | |
What are the advantages of using boost.any library ? Could you please give me some real life examples ? Why the same functionality couldn't be achieved by having some generic type in the root of object's hierarchy and creating containers with that base type ?
I consider that Boost.Variant should always be preferred as ... | [
0.39297062158584595,
0.04909959062933922,
0.11618582159280777,
0.42163515090942383,
-0.3165876865386963,
-0.21143540740013123,
-0.015552127733826637,
0.007652110420167446,
-0.2008669078350067,
-0.3951932191848755,
0.05830906331539154,
0.586955189704895,
-0.27335864305496216,
-0.03606179729... | |
In VS2008 (and earlier if I'm not mistaking) I have dropdown that lets me choose between Debug and Release mode. All well.
When I switch VS to Release, the debug attribute in my web.config files isn't set to false at all though.
Is this the way it is supposed to be? I am bound to forget to set it to the correct v... | [
0.1946197897195816,
-0.17593570053577423,
0.5963087677955627,
0.06163228675723076,
-0.1809958666563034,
-0.5238895416259766,
0.6684426665306091,
-0.0871700644493103,
-0.46336835622787476,
-0.5188737511634827,
0.1495918482542038,
0.8419111967086792,
-0.3729633390903473,
0.1409919112920761,
... | |
I am looking at quite a monstrosity of an application that uses several tables to represent a reporting hierarchy, but eacvh of these tables is identical. The table at the bottom of the hierarchy has the most records, each of which has a ParentID to the rollup table above it, eventually all adding up to only one total ... | [
0.1990278959274292,
0.561424195766449,
0.0961500033736229,
0.32857614755630493,
-0.03776763007044792,
-0.045474518090486526,
0.15679927170276642,
0.15164582431316376,
-0.052214089781045914,
-0.4243464171886444,
0.04377710819244385,
0.0035569907631725073,
-0.06905361264944077,
0.47492244839... | |
row, instead of one table for each level, for all these levels, or at least several views on the same table. The latter because the database was designed to be used in MSAccess, which doesn't allow aliased sub-queries AFAIK.
Are the tables all the same in their semantics or just in their form? If the tables are identic... | [
0.07980924099683762,
0.02515275776386261,
0.25451740622520447,
0.5199241042137146,
-0.11106552928686142,
0.12502634525299072,
0.0908023938536644,
-0.002290141535922885,
-0.4913557767868042,
-0.501948356628418,
0.07756851613521576,
0.3806997835636139,
-0.3766940236091614,
0.0894262567162513... | |
enough and stable enough so that a variety of techniques will work.
The simplest technique goes by the name "adjacency list" model. In this model, there are two columns one of which refers to the other. I'll call them MyTable(ID, ParentID). In a real case, Mytable will have other columns. ParentID references ID in a d... | [
0.18962985277175903,
-0.13438226282596588,
0.28114768862724304,
0.09648414701223373,
-0.1149878203868866,
0.1559639275074005,
-0.1928686648607254,
-0.4042317867279053,
-0.3364483118057251,
-0.8914554119110107,
0.019346941262483597,
0.2168712466955185,
-0.23737381398677826,
0.17070767283439... | |
have two columns (lft and rgt) that show where the row fits into the hierarchy, because lgt and rgt are nested inside the lft and rgt of all the ancestors of the node in question. This technique is hard to update. It's easy to do rollups, and to find subtrees, and ancestor paths, and lots of other types of queries.
A ... | [
-0.19602613151073456,
-0.3018794059753418,
0.1583009660243988,
0.06711946427822113,
0.059675537049770355,
0.33309924602508545,
0.14067713916301727,
-0.1740109622478485,
-0.30210480093955994,
-0.6006706953048706,
0.0522024929523468,
-0.25586748123168945,
-0.15899135172367096,
0.433839827775... | |
have MyTable (ID, Division, Department, Group, Team). Division, Department, Group and Team are all levels of the hierarchy. This is ultimately easy for users who access the data via a point and click drill down interface, because there's nothing for them to learn, if the column names are chosen well. It requires a name... | [
0.19560925662517548,
-0.037395965307950974,
0.36406657099723816,
0.2986425757408142,
-0.15969979763031006,
0.07634781301021576,
-0.23160159587860107,
-0.08587183058261871,
-0.02970578894019127,
-0.5676162838935852,
-0.03188150376081467,
0.20815688371658325,
0.10817168653011322,
0.373656481... | |
good alternative to separate tables for every level in the hierarchy. | [
-0.09942249208688736,
-0.10037622600793839,
0.14965113997459412,
0.4986812174320221,
-0.07574588805437088,
0.06556913256645203,
0.05998992174863815,
0.07486336678266525,
-0.2736874222755432,
-0.5879857540130615,
0.2109704166650772,
0.32185712456703186,
0.13361164927482605,
-0.2260998636484... | |
Let's suppose I have a large middleware infrastructure mediating requests between several business components (customer applications, network, payments, etc). The middleware stack is responsible for orchestration, routing, transformation and other stuff (similar to the Enterprise Integration Patterns book by Gregor Hoh... | [
0.1521589308977127,
0.33414900302886963,
0.12288973480463028,
0.12098792940378189,
0.07643011957406998,
0.2651456594467163,
0.04694094508886337,
-0.2120816558599472,
-0.32681864500045776,
-0.47843384742736816,
-0.23126369714736938,
0.3885956108570099,
-0.24296866357326508,
0.01759760640561... | |
for 'facilitating' and providing an interface that receives *customer ids* and internally fetches the *other parameter*?
I realize this is not a simple question (because of the definition of business logic), but I was wondering if it is a general approach or some guidelines.
This is the "Composite Application" pattern... | [
0.3833078444004059,
0.09130683541297913,
0.2153434455394745,
0.04451334476470947,
0.06030518561601639,
0.07043826580047607,
-0.06129245460033417,
-0.06193475425243378,
-0.4612388014793396,
-0.5878345966339111,
0.18651393055915833,
0.41839316487312317,
-0.1933378279209137,
0.025316197425127... | |
the routing.
Hint. Look at getting a good ESB before going too much further. This rapidly gets out of control and having some additional support is helpful. Even if you don't buy something like Sun's [JCAPS](http://www.sun.com/software/javaenterprisesystem/javacaps/) or [Open ESB](https://open-esb.dev.java.net/), you'... | [
0.23108617961406708,
-0.187892347574234,
0.11462145298719406,
0.15725262463092804,
-0.1005011722445488,
-0.4331895709037781,
0.018517257645726204,
0.11083447188138962,
-0.3671621084213257,
-0.9550235271453857,
0.0753016397356987,
0.10749270766973495,
-0.1365809142589569,
-0.189058586955070... | |
I'm trying to use the page control's collection with LINQ.
Whereas this works:
```
dim l = Me.Controls.OfType(Of TextBox).AsQueryable()
```
the following return an ArgumentExceptionError:
```
dim l = Me.Controls.AsQueryable()
```
I need *all* the controls. Any help?
Thanks
This is the "Composite Application" patt... | [
0.0307367742061615,
0.2341616153717041,
0.5787835717201233,
0.012142588384449482,
-0.1199386715888977,
0.09818129986524582,
-0.0017179009737446904,
-0.22003455460071564,
-0.20162241160869598,
-0.8293800354003906,
0.07768737524747849,
0.5174502730369568,
-0.37438759207725525,
-0.03864805400... | |
rapidly gets out of control and having some additional support is helpful. Even if you don't buy something like Sun's [JCAPS](http://www.sun.com/software/javaenterprisesystem/javacaps/) or [Open ESB](https://open-esb.dev.java.net/), you'll be happy you learned what it does and how they organize complex composite applic... | [
-0.5671557188034058,
-0.03175857290625572,
0.3530389666557312,
0.1468261182308197,
0.4432304799556732,
-0.38954296708106995,
0.009034099988639355,
0.4012461006641388,
-0.7203858494758606,
-0.8180109858512878,
-0.060210514813661575,
-0.0547107458114624,
0.08395302295684814,
-0.0221310164779... | |
I'm so tired of having to learn yet another Java web framework every other day.
JSP, Struts, Wicket, JSF, JBoss Seam, Spring MVC to name just a few - all this countless frameworks out there try to address the same issues. However, none of them really solves the fundamental problems - that's why there are still comin... | [
0.3930746018886566,
0.4096073508262634,
-0.022984493523836136,
0.2542010247707367,
0.06022554636001587,
0.014581266790628433,
0.20256732404232025,
0.34422236680984497,
-0.1771385669708252,
-0.8324857354164124,
-0.024826858192682266,
0.5218188166618347,
-0.22260470688343048,
-0.023437911644... | |
is running into problems.
Often the frameworks don't provide any help but are hindering one and limiting the options by forcing things to be implemented according to the frameworks own logic and environment.
In short, I see the following disadvantages when using a framework:
1. There mostly is a steep learning c... | [
0.30486416816711426,
0.38319218158721924,
-0.11891169846057892,
0.5071325898170471,
0.16255338490009308,
-0.5001844167709351,
0.5761670470237732,
-0.036508362740278244,
-0.03008410707116127,
-0.7233554124832153,
-0.0662689059972763,
0.45181313157081604,
-0.2056199312210083,
0.0781997218728... | |
versions or all of this together and often doesn't provide any helpful examples.
3. The framework consist of zillions of classes which makes it practically impossible to understand the intended use only by browsing the sources.
4. Therefore you need to buy some "XYZ in action for dummies in 21 days" kind of books which... | [
0.43978628516197205,
-0.2086917757987976,
0.25671541690826416,
0.2720140218734741,
-0.18619297444820404,
-0.2649129033088684,
0.4207648038864136,
0.14448167383670807,
-0.16135942935943604,
-0.5545944571495056,
-0.23316794633865356,
0.2083299309015274,
-0.22912484407424927,
0.01252420432865... | |
classes and method names until your head is full of stupid and useless information you can't use for anything else.
6. There is a big overhead, slowing down your applications performance and making your brain feeling numb when try to understand what really is going on.
7. In the real world there is usually no time to g... | [
0.26965001225471497,
-0.3285335600376129,
0.0629165843129158,
0.6973150968551636,
-0.10219503194093704,
-0.5415812730789185,
0.6097631454467773,
0.16452430188655853,
-0.1390918493270874,
-0.5084919333457947,
0.14101220667362213,
0.3204970061779022,
0.2932715117931366,
-0.007531102746725082... | |
possibilities.
8. The argument that following a standard would allow people who are new to a project to quickly get started is not valid in my view because every project uses a different framework even within the same company (at least in my case).
It seems to me that the following quote from Albert Einstein fits here... | [
0.4988734722137451,
0.20419305562973022,
-0.03482791408896446,
0.2438339740037918,
0.0843575969338417,
-0.20242218673229218,
0.21960952877998352,
-0.19325953722000122,
-0.3385085165500641,
-0.4490159749984741,
0.2783527076244354,
0.3668006956577301,
-0.2430063933134079,
0.11490768939256668... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.