text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
current design. It would help to know how these objects are meant to be used. Let me give you an example of how a similar task is accomplished in Java's database library (JDBC):
The system has a DriverManager which knows about JDBC drivers. The drivers have to be registered somehow (the details aren't important); once... | [
-0.10228471457958221,
-0.003196246922016144,
0.17912735044956207,
0.1567574143409729,
-0.20301881432533264,
-0.02220352739095688,
-0.05237041041254997,
-0.01507637556642294,
-0.3866606652736664,
-0.7188475728034973,
0.03657359629869461,
0.3950296640396118,
-0.29392123222351074,
0.357301950... | |
type PreparedStatement; except that it's really an OraclePreparedStatement or MSSQLPreparedStatement. This is transparent to the client because the factory for Statements is in the Connection, and the factory for Connections is in the DriverManager.
If your classes are similarly related you may want to have a function... | [
0.2472754269838333,
-0.12370062619447708,
-0.17496544122695923,
0.057031404227018356,
-0.4174915850162506,
0.1227969229221344,
0.29514914751052856,
-0.41473472118377686,
-0.2958233058452606,
-0.42411622405052185,
0.20117005705833435,
0.41552257537841797,
-0.3800160884857178,
0.134646862745... | |
if this isn't proper C++):
```
class CClassFactory
{
public:
virtual CBaseClass* CreateBase() { return new CBaseClass(); }
virtual CFooBaseClass* CreateFoo() { return new CFooBaseClass();}
}
class CAImplClassFactory : public CClassFactory
{
public:
virtual CBaseClass* CreateBase() { return new CAImplB... | [
0.30830395221710205,
0.30203691124916077,
0.6844538450241089,
-0.12394136935472488,
-0.05125623568892479,
-0.05081130936741829,
0.5135722756385803,
-0.585952877998352,
-0.06374794989824295,
-0.9863090515136719,
0.09179554879665375,
0.4053861200809479,
-0.6437942981719971,
0.294660449028015... | |
so go ahead and use classes instead of interfaces wherever it makes sense. Pure Interfaces may be more flexible in the long run but maybe not. Without more details about your class hierarchy it's impossible to say. | [
0.5822592377662659,
-0.20021100342273712,
-0.3834863305091858,
0.5342472195625305,
-0.26724371314048767,
-0.022270815446972847,
0.30323031544685364,
0.3913155496120453,
-0.02983688749372959,
-0.7982620000839233,
0.2627966105937958,
0.5673940777778625,
-0.07695860415697098,
-0.0079561332240... | |
I have a bunch of pretty large CSV (comma separated values) files and I want to analyze them. SQL queries are ideal for this. So far I have been using MS Access to import the CSV files and execute queries on them. However, in addition to having a very bad SQL editor and having stupid arbitrary rules about when a query/... | [
0.31798055768013,
0.2831500172615051,
0.09555765241384506,
0.16556063294410706,
0.08706866204738617,
-0.02504201978445053,
0.29056060314178467,
0.19873329997062683,
-0.3104357421398163,
-0.7042334079742432,
0.35113421082496643,
0.2175084352493286,
-0.13280561566352844,
0.20549646019935608,... | |
minutes, or try to scroll.
Are there any better (free) tools for the job? (I would be willing to manually write a script to transform the CSV into something else if required)
Thanks!
Edit:
Thanks for all the answers! I'm going to try out SQL Server and if it works out, I'll accept that answer. Just a clarification: ... | [
0.47307848930358887,
-0.01008574478328228,
0.3063448369503021,
0.43877074122428894,
0.1651228964328766,
-0.2525670528411865,
0.02348811738193035,
0.0856672003865242,
-0.3594207763671875,
-0.5971026420593262,
-0.039739783853292465,
0.43293988704681396,
0.1429765522480011,
-0.077346004545688... | |
because first of all I don't know any .NET languages and second of all, I had the data in Java, but I thought analyzing it would be a lot easier with SQL. Thanks for the answer though!
there's also an Oracle Express Edition.
I guess it depends on where you are already proficient. Or maybe where you **want to be** pro... | [
0.30199724435806274,
0.23839585483074188,
-0.4314219355583191,
0.2438499480485916,
-0.12974442541599274,
-0.07979748398065567,
0.3542628288269043,
0.3101404011249542,
0.09085047990083694,
-0.3469986617565155,
0.19127842783927917,
0.5746282339096069,
0.11117036640644073,
-0.5292550921440125... | |
I have NUnit installed on my machine in "C:\Program Files\NUnit 2.4.8\" but on my integration server(running CruiseControl.Net) I have it installed in "D:\Program Files\NUnit 2.4.8\". The problem is that on my development machine my NAnt build file works correctly because in the task I'm using the path "C:\Program File... | [
-0.09243965148925781,
-0.02946886606514454,
0.563858151435852,
-0.11757257580757141,
-0.21841078996658325,
0.18643885850906372,
0.5633564591407776,
-0.23036836087703705,
-0.13960212469100952,
-0.722553014755249,
0.31609776616096497,
0.7505714893341064,
-0.06364911794662476,
0.1281868815422... | |
me. Are there any better ones? What is the general solution to this kind of problem?
Typically I distribute NUnit and any other dependencies with my project, in some common location (for me that's a *libs* directory in the top level).
```
/MyApp
/libs
/NUnit
/NAnt
/etc...
/src
/etc...
```
I then ... | [
0.6519551277160645,
0.20250052213668823,
0.2896196246147156,
0.05753922089934349,
-0.340871125459671,
-0.05332113057374954,
0.0611281618475914,
0.10231811553239822,
0.00804385356605053,
-0.7543416619300842,
-0.1919095665216446,
0.4740632474422455,
-0.1738050878047943,
0.1805194914340973,
... | |
I'd like to learn how FireFox works behind the scenes. I'd like to understand the source code and the different components but the code-base is rather large and I'm not sure where to start.
I'm wondering if there is some sort of walk though written up by anybody either from the firefox team or from outside the commun... | [
0.7224324941635132,
0.46658697724342346,
-0.4783148765563965,
0.06936479359865189,
-0.09940331429243088,
-0.17758792638778687,
0.1831626296043396,
0.5319798588752747,
-0.05488278344273567,
-0.5528943538665771,
-0.028466103598475456,
0.2679923176765442,
0.1440233588218689,
-0.11461041867733... | |
Check out some of these links:
[Real World Mozilla](http://zenit.senecac.on.ca/wiki/index.php/Real_World_Mozilla)
[Fall 2008 Weekly Schedule](http://zenit.senecac.on.ca/wiki/index.php/DPS909_and_OSD600_Fall_2008_Weekly_Schedule)
Some labs if you want to dive right in:
[Lab: Learning Collaborative Development (Fall... | [
0.26489219069480896,
0.24112482368946075,
-0.21868357062339783,
0.12162862718105316,
0.06307470798492432,
-0.19811801612377167,
0.11348260939121246,
0.11334506422281265,
-0.22990714013576508,
-0.6586354970932007,
-0.075492724776268,
0.3793012797832489,
-0.2685023844242096,
-0.0831008926033... | |
Seneca, people from Mozilla, and others) are in this channel, the purpose is to educate developers about open source in general and the Mozilla project specifically.
Good luck! | [
0.6797131299972534,
0.18982040882110596,
-0.10379642993211746,
0.17586998641490936,
0.10401272028684616,
-0.3460048735141754,
0.4430381655693054,
0.6690366864204407,
-0.42518147826194763,
-0.649747908115387,
0.14034385979175568,
0.5376052260398865,
0.575783371925354,
0.1352120190858841,
... | |
Normally I create web application projects and use code-behind, but I have a requirement to create an small throwaway demo app using code-inline.
I added a global.asax file to the app, but for some odd reason, Visual Studio 2008 SP1 won't let me edit any of the code between the script tags i.e. add code to the event h... | [
0.18135346472263336,
0.1806596964597702,
0.07205002009868622,
-0.07762857526540756,
-0.41434407234191895,
-0.08891855925321579,
0.23525398969650269,
0.013843057677149773,
-0.1279488503932953,
-0.7995648384094238,
0.21461674571037292,
0.5884161591529846,
-0.3832331895828247,
-0.079928092658... | |
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
}
void Application_End(object sender, EventArgs e)
{
// Code that runs on application shutdown
}
void Application_Error(object sender, EventArgs e)
{
// Code that runs... | [
-0.22034543752670288,
-0.007536445278674364,
0.23979869484901428,
-0.1343301236629486,
0.34552469849586487,
0.020126907154917717,
0.5275276303291321,
0.036372214555740356,
-0.043481163680553436,
-0.6340064406394958,
-0.4767345190048218,
0.6409825086593628,
-0.5393703579902649,
0.2258672863... | |
void Session_Start(object sender, EventArgs e)
{
// Code that runs when a new session is started
}
void Session_End(object sender, EventArgs e)
{
// Code that runs when a session ends.
// Note: The Session_End event is raised only when
// the sessionstate mode
... | [
-0.0028511779382824898,
-0.08201364427804947,
0.3480421304702759,
-0.21135765314102173,
0.32491838932037354,
-0.2588919699192047,
0.4010734260082245,
0.047803230583667755,
-0.3342072367668152,
-0.39780643582344055,
-0.6043019890785217,
0.7558985352516174,
-0.293526291847229,
0.197927176952... | |
in the Web.config file.
// If session mode is set to StateServer
// or SQLServer, the event is not raised.
}
</script>
```
Ok, so here is the answer:
You can see part of the explanation [here](http://support.microsoft.com/default.aspx/kb/937095) and [here](http://www.dotnetjunkies.com/WebLog/dav... | [
0.07342107594013214,
-0.2301635891199112,
0.4305886924266815,
-0.005261749029159546,
0.06538935005664825,
-0.35220155119895935,
0.4424474835395813,
0.28023219108581543,
-0.3871897757053375,
-1.0141650438308716,
-0.1282012164592743,
0.5013665556907654,
-0.5940431356430054,
0.045367702841758... | |
What is the difference between MySQL unique and non-unique index in terms of performance?
Let us say I want to make an index on a combo of 2 columns, and the combination is unique, but I create a non-unique index. Will that have any significant effect on the performance or the memory MySQL uses?
Same question, is th... | [
0.036580801010131836,
-0.06582336872816086,
0.032110024243593216,
0.4321906566619873,
-0.3010862469673157,
0.10564786195755005,
0.08655400574207306,
-0.13031235337257385,
-0.1888076663017273,
-0.6712546348571777,
0.1218905970454216,
0.4204101264476776,
-0.2335585206747055,
0.08562893420457... | |
cost of tracking down and correcting unintentional duplicates when (not if) they occur.
Indexes are usually more effective if there you have a high *selectivity*. This is the ratio of number of distinct values to the total number of rows.
For example, in a column for Social Security Number, you may have 1 million ro... | [
0.10053973644971848,
-0.2539036273956299,
0.18734225630760193,
0.513624906539917,
0.10661514848470688,
0.21843193471431732,
0.44827044010162354,
-0.10875391215085983,
-0.4531538784503937,
-0.80162113904953,
0.07077939808368683,
0.15015526115894318,
-0.1552136391401291,
0.06983475387096405,... | |
with a UNIQUE or PRIMARY KEY constraint is guaranteed to have a selectivity of 1.0, so it will always be as effective as an index can be.
You asked about the difference between a primary key and a unique constraint. Chiefly, it's that you can have only one primary key constraint per table (even if that constraint's de... | [
-0.17676937580108643,
-0.04888313263654709,
0.30546820163726807,
0.30069786310195923,
-0.15575534105300903,
-0.08285941928625107,
-0.004858463536947966,
-0.21288274228572845,
-0.39878442883491516,
-0.6376294493675232,
-0.24945594370365143,
0.34517598152160645,
-0.35169821977615356,
0.20155... | |
asked in a comment about whether to use MyISAM or InnoDB. In MySQL, they use the term *storage engine*. There are bunch of subtle differences between these two storage engines, but the chief ones are:
* InnoDB supports transactions, so you can choose to roll back or commit changes. MyISAM is effectively always autocom... | [
-0.36869192123413086,
-0.06351514160633087,
0.25964611768722534,
0.22641275823116302,
0.14683973789215088,
-0.04262590780854225,
-0.013000193051993847,
0.2070842981338501,
-0.4877617061138153,
-0.7670410871505737,
0.035492829978466034,
0.4852572977542877,
-0.24151186645030975,
-0.275862634... | |
so it depends on what your application's mix of selects, updates, concurrent queries, indexes, buffer configuration, etc.
See <http://www.mysqlperformanceblog.com/2007/01/08/innodb-vs-myisam-vs-falcon-benchmarks-part-1/> for a very thorough performance comparison of the storage engines. InnoDB wins over MyISAM frequen... | [
-0.19086416065692902,
0.03659932315349579,
0.3248964548110962,
0.4119415581226349,
0.15885639190673828,
0.20446668565273285,
-0.04960129037499428,
-0.2536567151546478,
-0.28273651003837585,
-0.5674178004264832,
0.0752153992652893,
0.7092822194099426,
0.11831043660640717,
-0.213526457548141... | |
I need to find a reg ex that only allows alphanumeric. So far, everyone I try only works if the string is alphanumeric, meaning contains both a letter and a number. I just want one what would allow either and not require both.
```
/^[a-z0-9]+$/i
^ Start of string
[a-z0-9] a or b or c or ... z or 0 or 1 or ...... | [
0.10084811598062515,
0.260975182056427,
0.3980357348918915,
-0.324483722448349,
0.0575689896941185,
0.06697550415992737,
0.4274146854877472,
0.050069648772478104,
-0.08619694411754608,
-0.562612771987915,
-0.20378737151622772,
0.45366427302360535,
-0.2930692434310913,
0.2828851342201233,
... | |
/i case-insensitive
```
**Update (supporting universal characters)**
if you need to this regexp supports universal character you can find [list of unicode characters here.](https://en.wikipedia.org/wiki/List_of_Unicode_characters)
for example: `/^([a-zA-Z0-9\u0600-\u06FF\u0660-\u0669\u06F0-\u06F9 _.-]+)$/`
... | [
-0.3981834948062897,
0.25856053829193115,
0.28886494040489197,
-0.18803371489048004,
-0.1273743063211441,
0.18678425252437592,
0.0794975534081459,
0.05214818939566612,
-0.017592674121260643,
-0.6081143617630005,
-0.4452819228172302,
0.31928929686546326,
-0.44127315282821655,
0.036305483430... | |
I have an ASP.NET site that I'm developing. The layout is pretty basic. The master page has a header with a horizontal menu beneath the banner taking the entire width. On the left is a Navigation pane, 150 pixels wide with a picture and a few external links. The remainder of the width is the ContentPlaceholder. Beneath... | [
0.36809417605400085,
-0.26134076714515686,
0.6651262640953064,
0.33368587493896484,
-0.12323738634586334,
0.010150427930057049,
-0.1656639277935028,
0.13887764513492584,
-0.09954211115837097,
-0.8076802492141724,
-0.1197618767619133,
0.35386207699775696,
0.01110257301479578,
-0.09292085468... | |
up with the appropriate "float: left;" and "float: right;" so that the left 'column' of content was the News, then FAQ under it and the right column was the deadlines and chart. If the user narrowed the browser too much, the deadlines and chart would get pushed under the News and FAQs.
Now I'm directed to change the b... | [
0.37940800189971924,
-0.04501895233988762,
0.9230109453201294,
0.1318729966878891,
-0.07834567129611969,
0.027767831459641457,
0.08404890447854996,
-0.02598072960972786,
-0.4169673025608063,
-0.7642048001289368,
0.10425425320863724,
0.32605308294296265,
-0.046021413058042526,
0.07485490292... | |
overall content div would do that, but the "float: right" on the content div ends up pushing the whole content section under the navigation pane when I narrow the browser and when I narrow it further, the Deadlines and Chart divs are STILL getting pushed under the News and FAQs.
I know I'm missing something simple - l... | [
0.3622483015060425,
0.2710687518119812,
0.5995089411735535,
0.1451149582862854,
-0.2299024909734726,
-0.2625707983970642,
0.10232190042734146,
0.19309185445308685,
0.019822919741272926,
-0.6188864707946777,
-0.14822538197040558,
0.5076188445091248,
0.09048202633857727,
0.2519409656524658,
... | |
Start of string
[a-z0-9] a or b or c or ... z or 0 or 1 or ... 9
+ one or more times (change to * to allow empty string)
$ end of string
/i case-insensitive
```
**Update (supporting universal characters)**
if you need to this regexp supports universal character you can find [list of unico... | [
-0.36716124415397644,
0.2251744419336319,
0.4483891427516937,
-0.17164824903011322,
-0.035373128950595856,
0.06550175696611404,
0.20045329630374908,
0.05265137925744057,
-0.13649199903011322,
-0.46490514278411865,
-0.5884608626365662,
0.21024832129478455,
-0.4235565662384033,
0.03465530648... | |
One-to-one relations within nhibernate can be lazyloaded either "false" or "proxy". I was wondering if anyone knows a way to do a lazy one-to-one mapping.
I worked out a hack to achieve the same result by using a lazy set mapped to a private field, and having the public property return the first result of that set. It... | [
-0.007368043996393681,
-0.22059237957000732,
0.11604662984609604,
-0.047511350363492966,
-0.48169782757759094,
-0.13703586161136627,
0.15325205028057098,
0.019215313717722893,
0.03583991900086403,
-0.3476018011569977,
-0.059543974697589874,
0.5123308897018433,
-0.7049553990364075,
0.116576... | |
to go to the database. Since you've already taken the database hit, you might as well load the full object.
While there are cases where hitting the DB just to see if the related object exists without actually loading the object makes sense (if the related object is very "heavy"), it isn't currently supported in NHiber... | [
0.1088758111000061,
-0.1763896644115448,
0.001314434572122991,
0.0669650286436081,
-0.5009041428565979,
-0.4016962945461273,
0.18428726494312286,
-0.12903910875320435,
-0.19815489649772644,
-0.3001405894756317,
0.04158175364136696,
0.5872783660888672,
-0.4454747438430786,
0.183417394757270... | |
I want to write a program in C/C++ that will dynamically read a web page and extract information from it. As an example imagine if you wanted to write an application to follow and log an ebay auction. Is there an easy way to grab the web page? A library which provides this functionality? And is there an easy way to par... | [
0.4828077256679535,
-0.11230549216270447,
0.41785892844200134,
-0.09316033124923706,
0.06976597011089325,
-0.1464761197566986,
0.12341706454753876,
-0.2913195788860321,
-0.029946399852633476,
-0.613703727722168,
-0.12618479132652283,
0.3685932159423828,
-0.5010181665420532,
0.1612055301666... | |
curl_easy_setopt(curl, CURLOPT_URL, "curl.haxx.se");
res = curl_easy_perform(curl);
/* always cleanup */
curl_easy_cleanup(curl);
}
return 0;
}
```
BTW, if C++ is not strictly required. I encourage you to try C# or Java. It is much easier and there is a built-in way. | [
0.12997423112392426,
-0.31995174288749695,
0.455585241317749,
-0.40350914001464844,
-0.07000347971916199,
-0.517363429069519,
0.10075109452009201,
-0.2193026840686798,
-0.28703072667121887,
-0.6420561671257019,
-0.6203823089599609,
0.8575763702392578,
-0.5594069957733154,
-0.64029896259307... | |
In the past, I have used XSD.exe to create c# classes from an xsd. Today, I added an XSD to VS.NET 2008 SP1 and it automatically generated a dataset from my xsd, slick but I don't want a dataset. Is there a way to have vs.net automatically execute xsd.exe each time I modify my xsd.
I believe your best bet would be to r... | [
0.29149192571640015,
-0.06283348798751831,
0.26077163219451904,
0.21116922795772552,
-0.4342116117477417,
-0.399599552154541,
0.16886113584041595,
0.002976000774651766,
-0.14582231640815735,
-0.5688371658325195,
0.2628735899925232,
0.9122933149337769,
-0.3452395498752594,
-0.08736433833837... | |
I have seen:
* `http://www...`
* `ftp://blah.blah...`
* `file://blah.blah...`
* `unreal://blah.blah...`
* `mailto://blah.blah...`
What is that first section where you see `http` and the like called?
Can I register my own?
The portion with the `HTTP://`,`FTP://`, etc are called [URI Schemes](https://www.iana.org/assi... | [
0.4748682379722595,
0.11571364849805832,
0.6155866384506226,
-0.0864458903670311,
-0.15148194134235382,
-0.0683031752705574,
0.00978801865130663,
-0.27921420335769653,
-0.29791975021362305,
-0.6563169956207275,
-0.006423758342862129,
0.279611200094223,
-0.07970506697893143,
0.2044802159070... | |
Is it possible in Delphi to have a class method invoke an inherited instance method with the same name? For example, I tried something like this:
```
//... Skipped surrounding class definitions
function TSomeAbstractDialogForm.Execute: Boolean;
begin
Result := ShowModal = mrOk;
end;
```
I had a couple of speciali... | [
0.09114708751440048,
-0.1623033732175827,
0.2957087755203247,
-0.2478940635919571,
-0.04707813262939453,
-0.062176212668418884,
0.4993642270565033,
-0.38622573018074036,
-0.09766380488872528,
-0.26460298895835876,
-0.14079588651657104,
0.48364681005477905,
-0.6162703633308411,
-0.062760293... | |
method of the base class, kept calling the factory method over and over again (resulting in a pile of created forms).
Of course, the obvious solution was to change the name of the factory method (I named it CreateAndShow), but it made me curious. How come the compiler didn't warn me about the hidden method? And is the... | [
0.20835669338703156,
-0.09042615443468094,
-0.18846742808818817,
0.12293501198291779,
-0.1829993724822998,
0.0014656574930995703,
0.5210795402526855,
-0.08934955298900604,
-0.1156417578458786,
-0.39683008193969727,
0.22595635056495667,
0.22157636284828186,
-0.46565836668014526,
0.374860703... | |
(I think the compiler will give a warning for that). You can access this with a hard cast. But there is no way to distinguish between an instance method and a class method.
```
function TSomeAbstractDialogForm.Execute: Boolean;
begin
Result := ShowModal = mrOk;
end;
class function TSomeInheritingDialogForm.Execute:... | [
0.07104427367448807,
0.14164476096630096,
0.5198953151702881,
-0.17652775347232819,
0.05980077013373375,
-0.07376762479543686,
0.5446222424507141,
-0.31946659088134766,
-0.06694266200065613,
-0.5232177972793579,
-0.2522623538970947,
0.41832539439201355,
-0.49646806716918945,
0.227117568254... | |
This seems to go against every design guideline.
A static method that accepts a single argument of type T should usually just be a member method.
It's so bizzare I actually had to post a [StackOverflow question](https://stackoverflow.com/questions/389100/is-there-a-built-in-islowercase-in-net) to understand IsUpper ex... | [
-0.12934112548828125,
-0.04137943312525749,
0.4510074257850647,
-0.0751369446516037,
-0.23211053013801575,
-0.07316931337118149,
0.15412747859954834,
-0.19973811507225037,
-0.3602524995803833,
-0.2881118655204773,
0.0439106822013855,
0.12657277286052704,
-0.4234180152416229,
0.190936312079... | |
the other hand **are**.
Static methods receive a copy of the structure, instance methods a managed pointer. Accessing data through a pointer is not a tread safe operation and can easily lead to race conditions.
That's why most methods on structures/primitives are static and not instance.
Se here a similar question. ... | [
-0.13210080564022064,
-0.03497005254030228,
-0.06347228586673737,
0.24985529482364655,
-0.17975911498069763,
-0.29872992634773254,
0.14553014934062958,
-0.11713803559541702,
-0.41900092363357544,
-0.1594342142343521,
-0.1434503048658371,
0.276281476020813,
-0.42157942056655884,
0.409510493... | |
Is there a way to update more than one Database having same schema using single ObjectDataSource in C#???
i.e Just by providing more than one connection string is it some how possible to update more than one Database? I need to update/insert same record in multiple Database with same schema using ObjectDataSource in C... | [
0.4144364595413208,
-0.30564364790916443,
0.12354843318462372,
0.29903069138526917,
-0.013032151386141777,
-0.0819748267531395,
0.09740118682384491,
-0.24090799689292908,
-0.31626373529434204,
-0.7315378785133362,
0.18176883459091187,
0.8621166348457336,
-0.3488183319568634,
-0.05819272249... | |
an operation that could be passed a connection to ensure that you don't have duplicate code sitting everywhere.
**NOTE**
You CANNOT do this thought via a single connection, you must do two fully separate database actions.
**Example**
Per the comment there was a request for more detail.
Basically inside each of ... | [
0.12007780373096466,
-0.34928059577941895,
0.4446272850036621,
0.12696164846420288,
0.07318005710840225,
-0.20703551173210144,
0.43757468461990356,
-0.24279582500457764,
-0.1793735772371292,
-0.7847166657447815,
-0.13710027933120728,
0.4764203131198883,
-0.5687809586524963,
0.4357313215732... | |
myCommand.CommandText = "DELETE FROM myTable where myid = " + objectId.ToString();
connectionOne.Open();
myCommand.ExecuteNonQuery();
connectionOne.Close();
myCommand.Connection = connectionTwo;
connectionTwo.Open();
myCommand.ExecuteNonQuery();
connectionTwo.Close();
}
```
Obviously the u... | [
-0.20396541059017181,
-0.06332225352525711,
0.5042887926101685,
-0.20059259235858917,
0.33223241567611694,
-0.18291732668876648,
0.3535505533218384,
-0.07042063027620316,
-0.15446294844150543,
-0.512313723564148,
-0.4762774109840393,
0.5354591012001038,
-0.25498253107070923,
0.410319387912... | |
I'm writing this question from the standpoint of an ASP.NET application. However I realize it may be suited to other contexts as well.
There are so many approaches to developing the common elements of an ASP.NET website. Here are a few I have come across:
* LLBLGen
* SubSonic
* LINQ to SQL
* Entity Framework
* CodeSm... | [
0.5699899792671204,
0.12600673735141754,
0.1942071169614792,
0.0532367080450058,
-0.0961272269487381,
0.048719845712184906,
-0.05331120640039444,
-0.11277385801076889,
-0.04928653687238693,
-0.7214608788490295,
0.017129989340901375,
0.28769388794898987,
0.12156757712364197,
-0.074435755610... | |
I use
[n-tier architecture](http://en.wikipedia.org/wiki/Multitier_architecture)? Is that still the gold standard and the above tools just utilize that concept? I'm pretty sure I want to hold off on MVC until a future (or final) release.
\*\*\*\*\*Edit: I have removed the portion of the question which deals with pat... | [
0.6719508767127991,
0.1829902082681656,
0.23661652207374573,
-0.20238083600997925,
-0.07911315560340881,
-0.00014732904674019665,
0.3598657548427582,
-0.2278578281402588,
-0.4954572916030884,
-0.5967174172401428,
-0.09353071451187134,
0.3781116008758545,
-0.2722053825855255,
0.268949866294... | |
architecture.*
---
**Question:** What steps do I take as a first step, when I have sat down in front of a blank canvas (solution file) with all my pre-written documentation and system requirements in hand ? Where do I go from there?
I think each of the methods you have outlined has its merits and its downsides. Which... | [
0.4521673619747162,
0.3591809570789337,
0.3343003988265991,
0.02590644173324108,
0.14463816583156586,
0.07067941874265671,
0.24167901277542114,
-0.22678188979625702,
-0.14505848288536072,
-0.6737855076789856,
-0.08861883729696274,
0.484310507774353,
0.14093399047851562,
0.01940386742353439... | |
example.. the best thing you can do there is try a few and get to know them.
As for patterns, they help solve specific and recurring problems in a proven way. They also aid familiarisation for developers who didn't write the code. As above, it is worth trying a few to get a feel for what they do and when to use them -... | [
0.37080830335617065,
0.31494462490081787,
-0.10835982114076614,
0.4049416780471802,
0.03864769637584686,
0.0018397208768874407,
0.26969343423843384,
-0.14977678656578064,
-0.35892266035079956,
-0.7912904620170593,
0.03363216295838356,
0.47977110743522644,
-0.07461869716644287,
-0.009960907... | |
the logic / business layer
* Create the presentation layer
I would typically split Data Access and Business Objects, Business Logic and Presentation (web site / winforms) into their own projects, plus anything that I might want to re-use at a later date also goes in its own project. I also have a Base project containi... | [
0.42037340998649597,
0.2083674967288971,
0.2868066728115082,
0.3293091654777527,
-0.16967472434043884,
-0.1353430151939392,
0.03847559913992882,
-0.1486891806125641,
-0.02748703956604004,
-0.4364687204360962,
-0.36819663643836975,
0.4294907748699188,
0.013949676416814327,
0.193326532840728... | |
switch your backing store and all you need to do is write a new Data Access layer with all of your logic and presentation code remaining unchanged.
I think it's important not to get too hung up on **three** versus **n** tier - if you separate your concerns properly extending your system across multiple tiers at later ... | [
0.7599700689315796,
-0.06531762331724167,
0.3895498514175415,
0.19633489847183228,
0.16838572919368744,
0.011604651808738708,
0.08668670058250427,
-0.1071782335639,
-0.26807206869125366,
-0.48891374468803406,
0.2454591691493988,
0.686648428440094,
0.039373382925987244,
0.06012462079524994,... | |
I've been watching Douglas Crockford's talks at YUI Theater, and I have a question about JavaScript inheritance...
Douglas gives this example to show that "Hoozit" inherits from "Gizmo":
```
function Hoozit(id) {
this.id = id;
}
Hoozit.prototype = new Gizmo();
Hoozit.prototype.test = function (id) {
return th... | [
-0.0760309174656868,
0.48775893449783325,
-0.24849064648151398,
0.12356001138687134,
-0.021285731345415115,
-0.030566208064556122,
-0.03651076555252075,
-0.08489292860031128,
0.046233389526605606,
-0.29134103655815125,
-0.11292935162782669,
0.22346363961696625,
-0.4748687148094177,
0.48549... | |
then leaves Gizmo alone. | [
-0.14153291285037994,
0.7104224562644958,
0.22758978605270386,
0.18852880597114563,
0.41418272256851196,
-0.5311763882637024,
0.08383369445800781,
0.13340067863464355,
0.43845880031585693,
-0.06358838081359863,
-0.4443172812461853,
0.580020010471344,
0.11906459927558899,
0.3482487797737121... | |
I have a little python script that pulls emails from a POP mail address and dumps them into a file (one file one email)
Then a PHP script runs through the files and displays them.
I am having an issue with ISO-8859-1 (Latin-1) encoded email
Here's an example of the text i get: =?iso-8859-1?Q?G=EDsli\_Karlsson?= and ... | [
0.16463559865951538,
0.2484617382287979,
0.5611665844917297,
-0.21485096216201782,
-0.16082052886486053,
0.07516805827617645,
0.3514743447303772,
-0.04717160016298294,
-0.4507220387458801,
-0.31050434708595276,
-0.024197177961468697,
0.18477681279182434,
-0.48653528094291687,
0.12314209342... | |
body = file.readlines()
f = open(str(random.randint(1,100)) + ".email", "w")
f.write(msg["From"] + "\n")
f.write(msg["Subject"] + "\n")
f.write(msg["Date"] + "\n")
for b in body:
f.write(b)
```
I have tried probably all combinations of encode / decode within python and php.
You can use t... | [
0.3960973918437958,
0.07226895540952682,
0.4136059582233429,
-0.08253734558820724,
-0.32923269271850586,
0.030717309564352036,
0.2335507720708847,
-0.6690439581871033,
-0.10541409254074097,
-0.47765690088272095,
-0.06684396415948868,
0.525051474571228,
-0.4400951564311981,
-0.1366457641124... | |
out_file = StringIO()
message_gen = Generator(out_file, mangle_from_=False, maxheaderlen=60)
message_gen.flatten(message)
message_text = out_file.getvalue()
filename = "%s.email" % random.randint(1,100)
email_file = open(filename, "w")
email_file.write(message_text)
email_file.close()
```
... | [
-0.0661371648311615,
0.14543886482715607,
0.3999214172363281,
-0.4476170241832733,
-0.13017329573631287,
0.19742320477962494,
0.44151848554611206,
-0.28724029660224915,
-0.1910376399755478,
-0.7333235740661621,
-0.1863761842250824,
0.5719135999679565,
-0.42990902066230774,
-0.0257820226252... | |
it should work just fine. | [
0.5440971255302429,
0.2231622338294983,
0.06283076852560043,
0.2668900191783905,
0.15451106429100037,
0.13016188144683838,
0.04751857370138168,
0.006973318289965391,
0.035162001848220825,
-0.24683737754821777,
0.27076563239097595,
0.5679547786712646,
0.0691639706492424,
-0.0405660308897495... | |
I'm looking into writing a simple synchronization ability into my app and one of the concerns that has popped up is synchronization of time between two remote computers, each with their own clock (in particular concerning the modification dates of files/objects).
I'm sure a lot of research has been done on this topic ... | [
0.48644155263900757,
0.033735811710357666,
0.37655889987945557,
0.38393810391426086,
0.32729795575141907,
0.015208935365080833,
0.0970231369137764,
0.30737894773483276,
-0.1978958249092102,
-0.7046104669570923,
0.3200850784778595,
0.32634225487709045,
-0.06541544944047928,
0.12233555316925... | |
have exactly the same system time. Luckily the work I'm doing isn't very fine-grained, so it's not a terribly important concern, but I'm still curious nonetheless.
One solution would be to always use the same clock on both ends, such as a global time server, rather than the local system clock. Presumably this (combine... | [
0.47484034299850464,
0.021859468892216682,
0.5287584662437439,
0.16126345098018646,
0.46892181038856506,
0.10376498103141785,
-0.03456198424100876,
0.1903795599937439,
-0.5305294394493103,
-0.6199134588241577,
0.3817903399467468,
0.3985368013381958,
-0.2540113031864166,
0.15167869627475739... | |
system clock with a global time server. This would only need to be done occasionally as the offset itself would not likely change greatly over a short period of time.
**Update:** Let me just add that I'm not interested in actually synchronizing the system clocks of two computers--I'll presume that the operating system... | [
0.3145599961280823,
0.047421883791685104,
0.4370989501476288,
0.3231407105922699,
0.1932687908411026,
-0.005164997652173042,
0.21655063331127167,
0.27454695105552673,
-0.2832717299461365,
-0.7206150889396667,
0.31089791655540466,
0.6303118467330933,
-0.23967981338500977,
-0.057943854480981... | |
NTP for your application as others have recommended is the easy fudge. The correct approach is to use Lamport's distributed clock synchronization algorithm. It is explained in his classic 1978 paper [Time, clocks, and the ordering of events in a distributed system](http://research.microsoft.com/en-us/um/people/lamport/... | [
-0.20001575350761414,
-0.11552790552377701,
0.7030203342437744,
-0.2175106406211853,
-0.21609555184841156,
0.1501680314540863,
-0.07258503884077072,
-0.30795779824256897,
-0.4683576226234436,
-0.3696120083332062,
-0.2089676707983017,
0.38459083437919617,
-0.7494657039642334,
-0.04610091447... | |
I have a page which has a rectangular area with text and icons in it and the whole thing is clickable. The anchor tag is set to display: block. One of the icons has an onclick handler. If a person clicks on an icon, I just want the icon's onclick handler to run and not to actually activate the containing anchor tag.
F... | [
0.08917269855737686,
0.06256771087646484,
0.4639601409435272,
-0.19410957396030426,
0.21788066625595093,
-0.06558410823345184,
0.4139883816242218,
-0.2939063012599945,
-0.14840321242809296,
-0.5145341753959656,
-0.20384883880615234,
0.751160740852356,
-0.6111671924591064,
-0.12766952812671... | |
work so then I thought maybe it's actually the onmouseup or onmousedown events that trigger the anchor tag so I added a clickSwallow method to onmouseup and onmousedown methods:
```
function clickSwallow(evt){
if (!evt) evt = window.event;
if (evt.stopPropagation) evt.stopPropagation();
evt.cancelBubble = true;
... | [
0.1589646190404892,
-0.25539013743400574,
0.43714070320129395,
-0.24942460656166077,
0.2021525800228119,
0.03884994983673096,
0.35745200514793396,
-0.17631827294826508,
-0.12749959528446198,
-0.23901408910751343,
-0.2240714281797409,
0.9883198142051697,
-0.3654743432998657,
-0.133440271019... | |
I have data bound `DataGridView` in a desktop app with columns that have their `ToolTipText` property set, yet no tool tip is displayed when I hover over grid view (cells or cell headers).
The `ShowCellToolTips` property of the grid view is `true`, and I have verified using break points that it is not changed programm... | [
0.3442186713218689,
-0.015856727957725525,
0.46818825602531433,
0.023687882348895073,
0.026219932362437248,
-0.273612380027771,
0.33176156878471375,
-0.16913706064224243,
-0.028840186074376106,
-0.7296686768531799,
0.09898559749126434,
0.335634708404541,
-0.20544812083244324,
0.04981342330... | |
to show it appropriately. Not optimal, but it works around the odd behaviour we were experiencing. | [
0.507601797580719,
0.008657783269882202,
-0.025391321629285812,
0.1340426802635193,
-0.190290167927742,
0.33580562472343445,
0.510790228843689,
-0.04957776144146919,
0.019894294440746307,
-0.3121587932109833,
0.14176025986671448,
0.3449741005897522,
-0.19261395931243896,
-0.089425027370452... | |
I have two websites, let's say they're `example.com` and `anotherexample.net`.
On `anotherexample.net/page.html`, I have an `IFRAME SRC="http://example.com/someform.asp"`. That IFRAME displays a form for the user to fill out and submit to `http://example.com/process.asp`. When I open the form ("`someform.asp`") in its ... | [
0.43086108565330505,
0.3556744456291199,
0.3556406497955322,
-0.48121199011802673,
-0.2823562026023865,
0.003185733687132597,
0.4197871685028076,
0.01079530082643032,
-0.24641242623329163,
-1.0056270360946655,
0.24149633944034576,
0.32559022307395935,
0.10098680108785629,
-0.01229943428188... | |
I force IE to save those cookies?**
Results of sniffing the HTTP traffic: on GET /someform.asp response, there's a valid per-session Set-Cookie header (e.g. `Set-Cookie: ASPKSJIUIUGF=JKHJUHVGFYTTYFY`), but on POST /process.asp request, there is no Cookie header at all.
Edit3: some AJAX+serverside scripting is apparen... | [
0.4069197177886963,
-0.002023546025156975,
0.40743201971054077,
-0.21155385673046112,
-0.3465157747268677,
-0.18077638745307922,
0.7996869683265686,
-0.15931367874145508,
-0.07424741983413696,
-0.6939635276794434,
-0.15429538488388062,
0.6296634674072266,
-0.365818053483963,
-0.12821383774... | |
bit complex, so bear with me.
What's happening
================
As it is, Internet Explorer gives lower level of trust to IFRAME pages (IE calls this "third-party" content). If the page inside the IFRAME doesn't have a Privacy Policy, its cookies are blocked (which is indicated by the eye icon in status bar, when you... | [
0.16831649839878082,
0.13040843605995178,
0.471603125333786,
-0.1138034462928772,
-0.14139766991138458,
0.021523550152778625,
0.6642239689826965,
-0.07069744169712067,
-0.30072107911109924,
-0.5874852538108826,
-0.11390945315361023,
0.7072964906692505,
-0.4473918080329895,
0.12632898986339... | |
from POST variables. **This would have worked**, but for political reasons I couldn't do that.)
It is possible to make the page inside the IFRAME more trusted: **if the inner page sends a P3P header with a privacy policy that is acceptable to IE, the cookies will be accepted**.
How to solve it
===============
Creat... | [
0.14426743984222412,
0.005118211731314659,
0.13504214584827423,
0.0030336063355207443,
-0.29335036873817444,
-0.16007214784622192,
0.13880419731140137,
-0.010026702657341957,
-0.10412497073411942,
-0.7898567914962769,
0.04371877387166023,
0.23780223727226257,
-0.24395598471164703,
-0.13576... | |
actually need to find out if your site has a privacy policy, and if not, create it - whether it collects user data, what kind of data, what it does with it, who has access to it, etc. You need to find this information and *think* about it. **Just slapping together a few tags will not cut it.** This step cannot be done ... | [
0.8822391033172607,
0.14617475867271423,
0.2104761302471161,
0.47511568665504456,
0.2084071934223175,
-0.6084772944450378,
0.08618245273828506,
0.02603773958981037,
-0.19098247587680817,
-0.16095170378684998,
-0.15666592121124268,
0.5479901432991028,
0.0026747877709567547,
-0.0573056973516... | |
and only for the following purposes, the data is stored only as long as necessary, only our company has access to it, etc. etc.").
(When editing with this tool, it's possible to view errors/omissions in the policy. Also very useful is the tab "HTML Policy": at the bottom, it has a "Policy Evaluation" - a quick check ... | [
0.17795149981975555,
0.07286597788333893,
0.7202229499816895,
0.12155914306640625,
0.05060971528291702,
-0.30446991324424744,
-0.3381631076335907,
-0.1683044731616974,
-0.22848759591579437,
-0.6504429578781128,
-0.5360509157180786,
0.49041828513145447,
-0.1479925960302353,
-0.1206291764974... | |
was needed (an index of privacy policies the site uses):
```
<META>
<POLICY-REFERENCES>
<POLICY-REF about="/w3c/example-com.p3p#policy1">
<INCLUDE>/</INCLUDE>
<COOKIE-INCLUDE/>
</POLICY-REF>
</POLICY-REFERENCES>
</META>
```
The `<INCLUDE>` shows all URIs that will use this policy (in my case,... | [
-0.0019395595882087946,
0.03404673933982849,
0.8582900166511536,
0.023938538506627083,
-0.131675124168396,
-0.1504422128200531,
-0.07622691988945007,
-0.39057138562202454,
-0.3317262828350067,
-0.6158468127250671,
-0.28317373991012573,
0.36100295186042786,
-0.20065470039844513,
0.276751339... | |
relative URI to the Policy Reference file (which in turn references the privacy policies), `CP` is the compact policy representation. **Note that the combination of P3P headers in the example may not be applicable on your specific website; your P3P headers MUST truthfully represent your own privacy policy!**
Profit!
=... | [
0.27612292766571045,
-0.005723770707845688,
0.7216612100601196,
0.12773889303207397,
0.14378833770751953,
-0.3269311189651489,
0.06171545758843422,
-0.05803781375288963,
-0.3643987774848938,
-0.5561554431915283,
-0.1224055141210556,
0.6823596954345703,
-0.3050757646560669,
0.05401661247014... | |
bunch of bits, they have **real world meanings**, and their use gives you **real world responsibilities**!
For example, pretending that you never collect user data might make the browser happy, but if you actually collect user data, the P3P is conflicting with reality. Plain and simple, **you are purposefully lying t... | [
0.7784191966056824,
-0.2264503389596939,
0.1659528762102127,
0.44472065567970276,
-0.2731451392173767,
-0.50628262758255,
0.4702213406562805,
-0.1311381459236145,
-0.4513151943683624,
0.0731297954916954,
-0.12196896225214005,
0.2743847966194153,
-0.4380171000957489,
-0.13517969846725464,
... | |
data collection (\*\*\*\*\* Analytics, anyone?), you **must** acknowledge it in your P3P)
* **STP**: Information is retained to meet the stated purpose. This requires information to be discarded at the earliest time possible. Sites MUST have a retention policy that establishes a destruction time table. The retention po... | [
0.4809163212776184,
0.03683844208717346,
0.33916038274765015,
0.642223060131073,
0.3964444100856781,
-0.45742809772491455,
0.06502882391214371,
-0.0029574220534414053,
-0.5413562655448914,
-0.05367206782102585,
-0.31463536620140076,
0.30655011534690857,
0.00040603356319479644,
0.0714681372... | |
*really* legally binding or if you can promise your users anything without actually willing to honor your promises. | [
1.0182504653930664,
0.08267650753259659,
0.0683426633477211,
0.23995313048362732,
-0.07961182296276093,
-0.4069940447807312,
0.41268444061279297,
0.17268489301204681,
-0.0484522320330143,
-0.22886666655540466,
-0.13697168231010437,
0.27734455466270447,
0.006128740031272173,
0.0238644350320... | |
I am trying to write operator overload for custom class and don't know how to handle null comparison.
```
Class Customer
{
int id;
public static bool operator ==(Customer a, Customer b)
{
//When both a and b are null don't know how to compare as can't use == in here as
//it will fall into ... | [
-0.0409855879843235,
-0.0328085795044899,
0.14406070113182068,
-0.216216579079628,
-0.0008928251918405294,
0.10719791054725647,
0.2225547730922699,
-0.11468763649463654,
0.099156454205513,
-0.5647322535514832,
-0.035417623817920685,
0.6726660132408142,
-0.39722102880477905,
0.1189901754260... | |
using ==.
```
if (Object.ReferenceEquals(a,b))
return true;
```
ReferenceEquals() checks if they are pointing to the exact same object (or if they are both null)
(As a general rule, it's good to start an Equals() method with a call to ReferenceEquals, particularly if the rest of the method is complicated. It wi... | [
-0.033785101026296616,
0.2580718696117401,
0.45380449295043945,
0.04050257429480553,
-0.003349528182297945,
-0.12619103491306305,
0.36653709411621094,
-0.49994567036628723,
0.058914151042699814,
-0.24676240980625153,
-0.006570910569280386,
0.654629111289978,
-0.4584154486656189,
0.02339082... | |
So, I've had a fair amount of experience programming database driven web apps using php and coldfusion (not together, at different times) and I'm starting to look into the asp.net world (I have a project coming up at work that is all asp.net/c#.)
My question is: there seems to be *a lot* of stuff to get mired in and i... | [
0.6120744347572327,
0.35207900404930115,
-0.22342635691165924,
0.1938016265630722,
-0.17385941743850708,
-0.2011963576078415,
0.060512904077768326,
0.5227885842323303,
-0.3273950517177582,
-0.5145636200904846,
0.34614309668540955,
0.4853315055370331,
-0.004270181991159916,
0.15951876342296... | |
used too much by the development community. In reading some books (ASP.net 3.5 step by step and ASP.net 3.5 unleashed) I'm finding some area's where a topic will be explained but at the end of the chapter it'll say "this stuff is cool but not for use in multi-tiered applications..."
The topics I've looked at so far (t... | [
0.5037705898284912,
0.0545957125723362,
-0.019117897376418114,
0.27003249526023865,
-0.3224751651287079,
-0.3669607937335968,
0.1402047723531723,
0.11245262622833252,
-0.21368388831615448,
-0.5432083606719971,
0.0582447275519371,
0.5847903490066528,
-0.30933454632759094,
-0.052342217415571... | |
on the big picture.
To get started with a WebForms application, you *must* understand the page lifecycle and the application lifecycle. This is your first priority. The model used by ASP.NET is based on Windows form-based programming and this has implications for how you think about the entire software production proc... | [
0.5607941746711731,
0.041104648262262344,
0.29170575737953186,
0.08311804383993149,
-0.12305571138858795,
-0.18375837802886963,
-0.06299415975809097,
0.23670771718025208,
-0.3447420001029968,
-1.0641306638717651,
-0.09769749641418457,
0.6510001420974731,
0.018036700785160065,
0.03552424535... | |
MVC isn't a part of WebForms, it is an alternative to it.
Next, you have some decisions. Will you be using standard data access (e.g. SQLClient) tools, rolling your own data access layer (or using DAL), or using linq to SQL? I say "decisions" because everyone on the team will have to be together on this one. I heartil... | [
0.37884560227394104,
-0.02632608264684677,
0.6942658424377441,
0.08841584622859955,
-0.0007979559595696628,
-0.3727985620498657,
-0.23813967406749725,
-0.2055262178182602,
-0.2816794812679291,
-0.43356165289878845,
-0.04206128418445587,
0.5666123628616333,
-0.18657132983207703,
-0.00810937... | |
in a separate Class Library (DLL). Visual Studio / ASP.NET make it trivially easy to create your own Class Library and to fold it into your solution. Learn how to do this and you'll be a better developer for years. People usually argue for this on the basis that it will insulate your UI from your data access. While tru... | [
0.3231703042984009,
-0.3009519577026367,
-0.13868625462055206,
0.5402582883834839,
-0.16251780092716217,
-0.3928074836730957,
0.040544066578149796,
-0.09665754437446594,
-0.1346559375524521,
-0.5980231761932373,
-0.22031335532665253,
0.2665761411190033,
-0.13714571297168732,
0.026103820651... | |
road.
At this point, you can (A) build web pages and (B) show dynamic, database-based content in them. Make sure that you master the GridView and the ObjectDataSource objects used to fill them. Note: the ObjectDataSource is what shuttles data from your Business Class Library to your UI. If you don't use a Business Lay... | [
0.27096474170684814,
0.26216211915016174,
0.409527063369751,
0.2335337996482849,
-0.19610007107257843,
-0.14846405386924744,
0.18577495217323303,
0.09926221519708633,
0.031786803156137466,
-0.9783548712730408,
0.13873708248138428,
0.6825253963470459,
0.22373805940151215,
0.2685793042182922... | |
navigation, UI, etc. but can save you loads of time if appropriate.
Once you know if you'll be using these and you have had a chance to get used to them, then I would recommend getting familiar with Master Pages. I use them extensively and they are great for standardizing the overall look and feel of the site.
Finall... | [
0.2860502302646637,
-0.003550158580765128,
0.28730282187461853,
0.21796348690986633,
-0.3097785413265228,
-0.16634558141231537,
0.34823209047317505,
-0.04938101768493652,
-0.30677467584609985,
-0.7623188495635986,
-0.12797164916992188,
0.5946387052536011,
0.10346987843513489,
0.01535005867... | |
a type-safe manner. The derived page class is responsible for providing the sessionObj instance so that *every* page can access it without any additional work.
Now you are ready to begin building an enterprise class web app! | [
0.3573031425476074,
0.09053607285022736,
0.25458037853240967,
0.008728548884391785,
-0.12642551958560944,
-0.4323618412017822,
0.5853670835494995,
0.20423832535743713,
-0.30490538477897644,
-0.6472910642623901,
-0.3993941843509674,
0.45242708921432495,
-0.22581681609153748,
0.0407266356050... | |
I have a listview that is binded to a ThreadSafeObservableCollection. The background of each of these items is set to an enum that is run through a color converter, here's the code for these 2 settings.
```
<UserControl.Resources>
<EncoderView:EncoderStatusToColorConverter x:Key="ColorConverter"/>
<Style x:Key... | [
0.26526424288749695,
-0.3176233172416687,
0.7611393928527832,
-0.2857394814491272,
0.17737621068954468,
0.11941983550786972,
-0.013646534644067287,
-0.3352828919887543,
-0.1284613460302353,
-1.048485279083252,
-0.02550678886473179,
0.3682546317577362,
-0.4110698997974396,
0.157053798437118... | |
enum value. Which is updated based on business logic rules. This is currently working, but only for the initial display of the item. When I make a change to the "Status" property of the object that the listItemView is bound to, the background does not update. If I remove the object from the collection, change the statu... | [
0.27982717752456665,
-0.32481202483177185,
0.4625104069709778,
0.22146287560462952,
0.032451242208480835,
-0.019243478775024414,
0.14276693761348724,
-0.1812405288219452,
-0.41826656460762024,
-0.6332412958145142,
0.01268691010773182,
0.44563180208206177,
-0.247038796544075,
0.266243547201... | |
do in order to get the background of a listview item to update. I'm also open for other ideas on how to solve this problem, thanks.
here's the XAML for the ListView.
EncoderService.Encoders is my ThreadSafeObservableCollection of Encoder objects.
```
<ListView AutomationProperties.AutomationId="FinishScreen" ... | [
0.07090184837579727,
0.03617912158370018,
0.8433130383491516,
-0.05334211885929108,
0.10015729814767838,
-0.14070889353752136,
-0.028208483010530472,
-0.3309144675731659,
-0.3922417461872101,
-0.7349896430969238,
-0.06815031170845032,
0.3384988009929657,
-0.3023476004600525,
0.151197403669... | |
ItemContainerStyle="{StaticResource ItemContStyle}"
Background="Azure">
<ListView.View>
<GridView>
<GridViewColumn Header="MAC">
<GridViewColumn.CellTemplate> | [
-0.24963848292827606,
-0.46640998125076294,
0.4407627582550049,
0.17560651898384094,
0.07447005808353424,
0.10875833034515381,
-0.016231004148721695,
-0.3275904953479767,
-0.2063463032245636,
-0.5378228425979614,
-0.15200768411159515,
0.22629794478416443,
-0.2601185142993927,
-0.1176128089... | |
<DataTemplate>
<ContentControl Content="{Binding Path=MAC}" ToolTip="{Binding Path=MAC}"/>
</DataTemplate>
</GridViewColumn.CellTemplate> | [
-0.24279488623142242,
-0.2217414677143097,
0.4966340661048889,
-0.11284994333982468,
0.30451804399490356,
-0.004589349962770939,
-0.4338400661945343,
-0.3001265227794647,
-0.04174572229385376,
-0.8110442757606506,
-0.023389827460050583,
0.23887453973293304,
-0.273214191198349,
-0.108222022... | |
</GridViewColumn>
<GridViewColumn Header="IDF">...
```
The issue is that the Binding to Background is taking the entire Encoder object, which doesn't change unless you remove and add it. Even if Encoder implements INotifyPropertyChanged, the Binding is still looking at the whole Encoder object and has ... | [
0.2591659724712372,
-0.02107134647667408,
0.5554115772247314,
0.07443838566541672,
0.27096638083457947,
-0.11731334030628204,
-0.34572020173072815,
-0.17270556092262268,
-0.29371094703674316,
-0.8435938358306885,
-0.06605804711580276,
0.4162074327468872,
-0.45243582129478455,
0.12043109536... | |
EncoderStatusToColorConverter. Any properties in the Path of your Binding will be watched for updates. So, for example, if you only need Status:
```
<Style x:Key="ItemContStyle" TargetType="{x:Type ListViewItem}">
<Setter Property="Background" Value="{Binding Path=Status, Converter={StaticResource ColorConverter}}... | [
0.20403975248336792,
-0.4697694480419159,
0.8150922060012817,
-0.16442358493804932,
0.21272946894168854,
-0.33492377400398254,
0.09967581927776337,
-0.36568260192871094,
-0.09360819309949875,
-1.0172282457351685,
-0.1299566924571991,
0.4092799425125122,
-0.42840129137039185,
0.056524071842... | |
I am making a configuration page, that splits a category tree over 3 columns for easy browsing like:
```
**Column 1** **Column 2** **Column3**
Category1 Category3 Category5
*SubCategory1* Category4 | [
-0.21346083283424377,
-0.061732903122901917,
0.31025224924087524,
-0.046136993914842606,
-0.171355739235878,
0.16890932619571686,
-0.04770173132419586,
-0.18936075270175934,
-0.4060218632221222,
-0.6839733719825745,
-0.1519181728363037,
0.19929297268390656,
-0.22120605409145355,
0.04755549... | |
*SubCategory5*
Category2 *SubCategory4* *SubCategory6*
*SubCategory2* etc.
*SubCategory3*
```
I am using jsp, jquery, and struts2.
What I am trying to do is configure the order in which categories/subcategories are displayed.
Now I show the structure like that, and I am... | [
-0.18051749467849731,
0.06558378040790558,
0.2848266065120697,
-0.1304669827222824,
-0.4249955713748932,
0.030795132741332054,
0.06524984538555145,
-0.31298285722732544,
-0.3219486176967621,
-0.475556343793869,
-0.21851514279842377,
0.4163971245288849,
-0.3220043182373047,
-0.0197890568524... | |
another, sort the categories of a column and sort the subcategories, using jquery and modifying directly the HTML, but I don't realize how to get the data of the modified structure to persist it over my DB.
I recently had to do something similar on a personal project of mine, but never ended up actually using the featu... | [
0.02016914077103138,
-0.3606387972831726,
0.5249061584472656,
-0.047175608575344086,
-0.0966612845659256,
-0.0159046221524477,
-0.06011851131916046,
-0.3911936283111572,
-0.15974101424217224,
-0.9364780783653259,
0.17026346921920776,
0.38637691736221313,
-0.37053173780441284,
0.07522314786... | |
li:not(.target) > span');
return {
column: $(i).children('span').text(),
merged: jQuery.map(jQuery.makeArray(merged), function(mi) { return { column: mi.innerText }; })
};
});
var xml = '<columns>';
jQuery.each(mappedArray, function(index, item) {
xml += '\n\... | [
-0.23526793718338013,
-0.5505319833755493,
0.802135705947876,
-0.1630116105079651,
0.09168672561645508,
0.4243757724761963,
0.0483088344335556,
-0.34898486733436584,
-0.14531588554382324,
-0.902227520942688,
-0.4838372468948364,
0.3510306179523468,
-0.43341588973999023,
-0.0820807293057441... | |
if (item.merged.length > 0) {
xml += '\n\t\t\t<merged>';
jQuery.each(item.merged, function(mindex, mitem) {
xml += '\n\t\t\t\t<name>' + mitem.column + '</name>';
});
xml += '\n\t\t\t</merged>';
} | [
-0.29927241802215576,
-0.25220561027526855,
0.4308212399482727,
0.004317984450608492,
0.061102494597435,
0.21384362876415253,
-0.21261902153491974,
-0.3381526470184326,
-0.005291076377034187,
-0.7529234886169434,
-0.468474805355072,
0.16418080031871796,
-0.2666813135147095,
0.1318093985319... | |
xml += '\n\t</column>';
});
xml += '\n</columns>';
$('div#result').load('/Tools/Csv/Refactor', { mapping: xml });
}
```
Basically, the user would use the UI to drag and drop as they please to create the structure they want. Then, they click a button which executes this method.
The $('ul#remapped') query... | [
-0.05122336745262146,
0.04791005328297615,
0.7984219789505005,
-0.166233092546463,
-0.28997692465782166,
0.07420727610588074,
-0.17374151945114136,
-0.3266771137714386,
-0.21987119317054749,
-0.5639854669570923,
-0.1079934760928154,
0.6111557483673096,
-0.36484670639038086,
0.3167212605476... | |
what you need, but I'm hoping its close enough that you can modify it for what you need. | [
0.3868567645549774,
-0.15796642005443573,
0.09047035872936249,
0.08094703406095505,
0.40663057565689087,
0.08951136469841003,
-0.25258636474609375,
0.16264057159423828,
0.12315677851438522,
-0.38582348823547363,
0.30108746886253357,
0.3797655701637268,
0.09764382243156433,
0.02471028268337... | |
I need to query a table for values given a string. The table is case sensitive but I want to do a ToLower() in the comparison.
Suppose I have a classes table with the following data.
```
class teacher
-----------------
Mat101 Smith
MAT101 Jones
mat101 Abram
ENG102 Smith
```
My query should be something ... | [
0.023007722571492195,
0.3731887936592102,
0.20212139189243317,
0.15186992287635803,
-0.3015902638435364,
0.3563022017478943,
-0.012334495782852173,
-0.330580472946167,
-0.005108572542667389,
-0.7853259444236755,
0.16336536407470703,
0.568378746509552,
-0.21372006833553314,
0.37000840902328... | |
represents these seemingly meaningless variations of class (and probably an associated lookup table to get the ID). Use the ID column in the where clause and you should be hitting an indexed numeric column.
If that's no an option, consider a function-based index on lower(class).
If that's not an option, and the quest... | [
-0.316325306892395,
-0.10116159170866013,
0.03223075345158577,
0.1618436574935913,
-0.1336354911327362,
0.07077742367982864,
0.3169151246547699,
-0.18400342762470245,
-0.07091706246137619,
-0.6225561499595642,
-0.03358137235045433,
0.4735468626022339,
-0.2550715208053589,
-0.31275880336761... | |
then the answer is "maybe".
In any case, you can't call it best if you haven't tested indexing of the column. | [
-0.04228392615914345,
-0.00803823210299015,
0.3067069947719574,
0.13169673085212708,
0.07676870375871658,
0.08759231865406036,
0.18739333748817444,
0.00873587653040886,
0.13055790960788727,
-0.4789794385433197,
0.034656986594200134,
0.5473535656929016,
0.31295478343963623,
-0.1298202127218... | |
Can anyone explain exactly how the Strategy Pattern relates to Inversion of Control?
When you use the strategy pattern, you want your other classes to depend on the interface rather than a concrete strategy. One way to do this is to have the concrete strategy injected into a class that uses it as the interface rather t... | [
0.2258329540491104,
-0.28910768032073975,
-0.563058078289032,
0.403670996427536,
-0.055540237575769424,
-0.2169603854417801,
-0.0018567000515758991,
-0.13439807295799255,
-0.13744410872459412,
-0.5759441256523132,
0.18321077525615692,
0.4792327880859375,
-0.43795034289360046,
-0.1785315424... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.