text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I'm currently quite curious in how other programmers organise data into files.
Can anyone recommend any good articles or books on best practices for creating file structures?
For example, if you've created your own piece of software for whatever purpose, do you leave the saved data as plain text, serialize it, encode ... | [
0.5468642115592957,
-0.03138894960284233,
-0.3079865872859955,
0.41254401206970215,
0.13372403383255005,
-0.41213661432266235,
-0.10338491201400757,
0.3237074613571167,
-0.3750267028808594,
-0.5769731998443604,
-0.25574013590812683,
0.416409969329834,
-0.26302334666252136,
-0.0222831517457... | |
":" delimiters because the GCOS field can contain blanks.)
If your data needs a lot more structure, then ask yourself "what tools can I use easily?" Python and Ruby have JSON and YAML, for example.
XML is basically useful if you have lots of XML-based stuff already, OR you expect to transform the XML to a displayable... | [
0.31758973002433777,
0.0914328396320343,
-0.07608291506767273,
0.3297148048877716,
-0.16832232475280762,
-0.41673317551612854,
-0.1516674906015396,
0.09123813360929489,
-0.3283500075340271,
-0.742926836013794,
-0.28026720881462097,
0.6006780862808228,
-0.04542868584394455,
-0.2376586794853... | |
I want to use the mail() function from my localhost. I have WAMP installed and a Gmail account. I know that the SMTP for Gmail is smtp.gmail.com and the port is 465 ([more info from gmail](http://mail.google.com/support/bin/answer.py?answer=78799)).
What I need to configure in WAMP so I can use the mail() function?
Th... | [
0.2860846519470215,
0.3513626456260681,
0.7112508416175842,
-0.14931993186473846,
-0.3235500454902649,
-0.10023194551467896,
0.8004202842712402,
0.054593801498413086,
-0.11020039021968842,
-0.6899181008338928,
-0.10221065580844879,
0.44249632954597473,
-0.27198734879493713,
0.1504399627447... | |
to Send Email from a PHP Script Using SMTP Authentication](http://email.about.com/od/emailprogrammingtips/qt/et073006.htm) (using `PEAR::Mail`)
* [Send email using PHP with Gmail](http://deepakssn.blogspot.com/2006/06/gmail-php-send-email-using-php-with.html) (using *phpMailer*)
* [Mailing](https://doc.nette.org/en/2.3... | [
0.09830281883478165,
-0.12662360072135925,
0.20302192866802216,
-0.17600956559181213,
-0.37556591629981995,
0.053485721349716187,
0.5185312032699585,
-0.12753288447856903,
-0.16258107125759125,
-0.2674958407878876,
-0.09466521441936493,
0.3569808900356293,
-0.2608167827129364,
-0.084215685... | |
I'm quite familiar with UML for modeling object-oriented applications. However, I'm not familiar with anything specifically designed for designing and/or modeling procedural, functional, or any other paradigm. How do you design or model applications written in a non-object-oriented language?
Oh golly, there's a blast f... | [
0.06893397867679596,
-0.08960579335689545,
0.2674461305141449,
0.32548788189888,
-0.3543044626712799,
-0.09904180467128754,
-0.28940317034721375,
0.060990411788225174,
-0.412601113319397,
-0.6149643063545227,
-0.02659550867974758,
0.2313801348209381,
-0.3884657919406891,
0.1166323497891426... | |
Right now I have a navigation partial that looks like this (x10 buttons)...
```
<% if current_controller == "territories" %>
<li><%= link_to "Territories", {:controller => 'territories'}, :class => 'active' %></li>
<% else %>
<li><%= link_to "Territories", {:controller => 'territories'} %></li>
<% end %>
<% ... | [
-0.18365149199962616,
-0.15836049616336823,
0.725196361541748,
0.14659997820854187,
0.27374207973480225,
-0.00031922588823363185,
-0.19066166877746582,
-0.07082773000001907,
-0.25751587748527527,
-1.0024586915969849,
0.1685481071472168,
0.3429203927516937,
-0.2945745885372162,
0.3155897855... | |
%>
<li>
<%= link_to target.humanize,
{ :controller => target },
class => ('active' if current_controller == target)) %>
</li>
<% end %>
``` | [
-0.3005076050758362,
-0.33806559443473816,
0.6714185476303101,
-0.08260799199342728,
0.3012726306915283,
-0.07015907019376755,
0.03729464113712311,
-0.12346251308917999,
0.06919446587562561,
-0.7678020596504211,
-0.3516058921813965,
0.2974856495857239,
-0.49634966254234314,
0.2877863645553... | |
Can anyone give me any pointers to resources detailing the structures and algorithms used "under the hood" of the [.NET DataSet](http://msdn.microsoft.com/en-us/library/system.data.dataset.aspx) class?
I'm currently working in a language that doesn't have an implementation of a generic in-memory data structure like th... | [
0.7776504158973694,
0.36263740062713623,
-0.06845889985561371,
0.3517097532749176,
-0.08087041974067688,
-0.3318150043487549,
0.6047254204750061,
-0.19038575887680054,
-0.39256346225738525,
-0.5233229994773865,
-0.3763830363750458,
0.6529329419136047,
-0.29315847158432007,
-0.0234510898590... | |
to the source... | [
0.1267894059419632,
0.16039302945137024,
0.10439054667949677,
-0.0535857230424881,
0.08990392088890076,
0.14904719591140747,
0.2516065537929535,
0.3008175194263458,
0.20506912469863892,
-0.6333913207054138,
-0.212646946310997,
0.37805941700935364,
0.011390445753932,
0.05664811655879021,
... | |
I was wondering what you do when developing a new application in terms of estimating database size.
E.g. I am planning to launch a website, and I am having a hard time estimating what size I could expect my database to grow. I don't expect you to tell me what size my database will be, but I'd like to know if there are... | [
0.3985500931739807,
0.20043212175369263,
0.025583798065781593,
0.2823052406311035,
0.3104799687862396,
-0.08409946411848068,
-0.05803556740283966,
0.058347057551145554,
-0.5900267362594604,
-0.4092283546924591,
0.32256799936294556,
0.4712621569633484,
-0.1111629530787468,
0.33443483710289,... | |
preferably don't want to shoot myself in the foot by not purchasing enough SQL Server space (they charge a premium for this).
If you have a database schema, sizing is pretty straightforward ... it's just estimated rows \* avg row size for each table \* some factor for indexes \* some other factor for overhead. Given th... | [
0.22238968312740326,
0.1672118902206421,
0.3671747148036957,
0.22555601596832275,
-0.10291348397731781,
0.04384838044643402,
-0.21496781706809998,
-0.08679857105016708,
-0.41502541303634644,
-0.5641115307807922,
0.20382201671600342,
0.2931908071041107,
0.12214850634336472,
-0.2060209214687... | |
table that will grow
* col 2: estimated column size in bytes
* col 3: estimated # of rows (per year or max, depending on application)
* col 4: index factor (I always set this to 2)
* col 5: overhead factor (I always set this to 1.2)
* col 6: total column (col 2 X 3 X 4 X 5)
The sum of col 6 (total column), plus the in... | [
-0.05677641183137894,
0.026191987097263336,
1.0020829439163208,
-0.0370616689324379,
0.09122364223003387,
0.33166205883026123,
-0.18175211548805237,
-0.11246967315673828,
-0.49202486872673035,
-0.7260923385620117,
0.0649123266339302,
0.23251181840896606,
-0.033994972705841064,
0.3968504965... | |
I have a few nested divs:
```
<div id="wrapper">
<div id="header">
<!-- a bunch of float divs here -->
</div>
<div id="body">
<div id="content">
<!-- a bunch of html controls here -->
</div>
</div>
</div>
```
* wrapper style: `width: 780px; margin:
20px auto; border: solid black 5px;`
* he... | [
-0.06410415470600128,
0.1210574209690094,
0.5624244213104248,
0.05849514156579971,
-0.08938340842723846,
0.23668977618217468,
0.20108014345169067,
-0.35959458351135254,
0.05457542464137077,
-0.8238794803619385,
-0.12871624529361725,
0.10015231370925903,
-0.07454009354114532,
-0.03544209524... | |
the header and the content div hangs out on its own if I don't set a fixed height for the body div. The only float elements I have are in the header.
**EDIT**:
If I remove the content div (and drop the html elements directly in body) the body div stops collapsing! Trying to understand why - guess it's due to the posi... | [
0.3457523286342621,
0.1647852510213852,
0.6689391136169434,
0.17396646738052368,
-0.13699157536029816,
-0.2662794888019562,
0.40258604288101196,
-0.16375447809696198,
-0.24225790798664093,
-0.431659996509552,
-0.16410385072231293,
0.4699453115463257,
-0.08216987550258636,
0.056796327233314... | |
to use absolute or relative positioning in this case.
The following achieves what you need with a minimal amount of css wrangling.
Colours becuase I like colour, and so should you!
```
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head... | [
0.10118729621171951,
-0.2710580825805664,
0.8322107791900635,
-0.21710997819900513,
-0.10219179838895798,
0.1391265094280243,
0.06017560884356499,
-0.38062652945518494,
-0.12648361921310425,
-0.743039608001709,
-0.16846616566181183,
0.7049999237060547,
-0.04034082964062691,
-0.185663148760... | |
20px auto;
border: solid black 5px;
}
#header {
min-height: 125px;
overflow:hidden;
}
#body {
background-color:red;
}
#content {
margin-left: 50px;
margin-top: 0px;
background-color:pink; | [
-0.06518235802650452,
-0.177350714802742,
0.6433443427085876,
0.14291878044605255,
0.0018237949116155505,
0.15975627303123474,
-0.002346520312130451,
-0.18454894423484802,
0.027788762003183365,
-0.35209447145462036,
-0.4819552004337311,
0.2840038239955902,
0.0807347446680069,
-0.2320743203... | |
}
.floatie { float:left; width:40px; height :40px;
margin:5px; background-color:#fe0;}
</style>
</head>
<body>
<div id="wrapper">
<div id="header">
<div class="floatie"></div>
<div class="floatie"></div>
<div | [
0.09068544954061508,
-0.2547663152217865,
0.501826822757721,
-0.019828449934720993,
0.022329356521368027,
0.13680408895015717,
-0.08949009329080582,
-0.617607593536377,
0.07551522552967072,
-0.49755197763442993,
-0.21699252724647522,
0.3169640302658081,
-0.27378207445144653,
-0.03989078849... | |
class="floatie"></div>
<div class="floatie"></div>
<div class="floatie"></div>
<div class="floatie"></div>
<div class="floatie"></div>
</div>
<div id="body"> | [
0.2035614550113678,
-0.1763705462217331,
0.07031761854887009,
0.10502690821886063,
-0.24223250150680542,
0.17992626130580902,
-0.1190289705991745,
-0.5591819882392883,
0.04891379550099373,
-0.35222089290618896,
0.02059931680560112,
0.337647944688797,
-0.14368169009685516,
-0.01889376528561... | |
<div id="content">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit,
sed do eiusmod tempor incididunt ut labore et dolore
magna aliqua. Ut enim ad minim veniam, quis nostrud | [
0.0029770771507173777,
-0.016189979389309883,
0.4379149079322815,
-0.08703286200761795,
0.18968746066093445,
0.3981304168701172,
0.1786196082830429,
0.0760108157992363,
-0.0002172594831790775,
-0.3895946443080902,
-0.2880702614784241,
0.6283985376358032,
-0.011683102697134018,
-0.135354012... | |
exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat | [
-0.21164768934249878,
-0.2054692804813385,
0.44973018765449524,
-0.1824328601360321,
0.0865078940987587,
0.6130452752113342,
0.31458693742752075,
-0.09617500007152557,
0.07191958278417587,
-0.31875672936439514,
-0.07233752310276031,
0.5589295029640198,
-0.4495723247528076,
-0.1934404671192... | |
cupidatat non proident, sunt in culpa qui officia
deserunt mollit anim id est laborum.</p>
</div>
</div>
</div>
</body>
</html>
``` | [
0.21785491704940796,
-0.23000887036323547,
0.39470043778419495,
0.12997110188007355,
-0.03481731191277504,
0.3494361340999603,
-0.011274187825620174,
-0.005845281295478344,
-0.07822869718074799,
-0.4364839494228363,
-0.037910643965005875,
0.17518775165081024,
-0.3759768605232239,
-0.019922... | |
I have two tables with a 1:n relationship: "content" and "versioned-content-data" (for example, an article entity and all the versions created of that article). I would like to create a view that displays the top version of each "content".
Currently I use this query (with a simple subquery):
```
SELECT
t1.id,
... | [
0.16693991422653198,
0.09598461538553238,
0.801110565662384,
0.005254280753433704,
-0.02365473471581936,
-0.04826287925243378,
0.04047992452979088,
-0.1644030660390854,
-0.31579649448394775,
-0.3828333020210266,
-0.10251294821500778,
0.5024677515029907,
-0.08988408744335175,
0.540964245796... | |
WHERE (fk_idothertable = t1.fk_idothertable)))
```
The subquery is actually a query to the same table that extracts the highest version of a specific item. Notice that the versioned items will have the same fk\_idothertable.
In SQL Server I tried to create an **indexed view** of this query but it seems I'm not able s... | [
-0.41613662242889404,
0.039795275777578354,
0.3706417381763458,
0.10279783606529236,
-0.3538666069507599,
0.02529946155846119,
-0.03064584545791149,
-0.30023911595344543,
-0.317052960395813,
-0.3885054886341095,
0.19544744491577148,
-0.03547930344939232,
-0.31520718336105347,
0.36768800020... | |
tables
* HAVING clauses
I'm desperate. Any other ideas are welcome :-)
Thanks a lot!
This probably won't help if table is already in production but the right way to model this is to make version = 0 the permanent version and always increment the version of OLDER material. So when you insert a new version you would sa... | [
0.0694083645939827,
0.20460669696331024,
0.6048504114151001,
-0.015513187274336815,
-0.08663751184940338,
-0.010873418301343918,
0.19347243010997772,
-0.02695823274552822,
-0.36668315529823303,
-0.6821944713592529,
-0.16600091755390167,
0.5638319253921509,
-0.4010280668735504,
0.2134300619... | |
current version is. You never have to select max(version) in order to insert the new record. | [
0.48770231008529663,
-0.3147779405117035,
0.6363043189048767,
0.5042039752006531,
0.5128757357597351,
-0.20073378086090088,
0.04663808271288872,
-0.08051656931638718,
-0.2695169448852539,
-0.3538176119327545,
0.06530577689409256,
0.545569658279419,
-0.20904609560966492,
0.2778084874153137,... | |
I need to create a class library in VB.NET that will connect to an Oracle database.
I would then be executing some functions to retrieve informations from a database.
I would then need to utilize this class in ASP.Net 2.0 project.
Would someone care to point me in the right direction in achieving this?
Thanks.
When... | [
0.6206239461898804,
-0.22227512300014496,
-0.11945294588804245,
0.33527183532714844,
-0.1430712193250656,
-0.1696987897157669,
-0.0670921802520752,
0.18393376469612122,
-0.13451263308525085,
-0.6413462162017822,
0.08931613713502884,
0.14440827071666718,
0.10056424140930176,
0.0945915952324... | |
many ways to achieve what you are looking for.
Usually DAL is independent of where it is being used so that you can use it in ASP.NET, or WinForms or WPF, etc.
And also you can write DAL in a way that you don't have to worry about whether you are connecting to Oracle or other RDBMS.
Anyways, the keyword here is **DAL... | [
0.4718901515007019,
-0.19368158280849457,
-0.10350491106510162,
0.0912519171833992,
-0.31957051157951355,
-0.23159679770469666,
-0.15062716603279114,
-0.012341458350419998,
-0.15109214186668396,
-0.5131558179855347,
-0.10349495708942413,
0.039586927741765976,
-0.19868971407413483,
-0.13442... | |
I am new to .NET, and I'm can't seem to figure out something that should be simple. I want to insert a row into a table, and initialize it with values that aren't bound to data controls. Specifically, I have a CreateUserWizard control on a page. In the CreatedUser method, I want to insert a row into a databse I created... | [
0.2317364364862442,
-0.016635026782751083,
0.43477317690849304,
-0.11012822389602661,
0.07169108092784882,
-0.20254574716091156,
0.05659724771976471,
0.033900484442710876,
-0.013029422610998154,
-0.8884546160697937,
0.1831432431936264,
0.08070783317089081,
-0.21144579350948334,
0.480131596... | |
sqlDataSource control in a way that they can access data that is not bound to data controls. Can anyone explain a way for me to do this?
You are on the wrong track - you won't use the sqlDataSource control at all. You'll go for a more direct interaction with the database from code. For example:
```
SqlConnection conn... | [
-0.040547583252191544,
-0.03840303793549538,
0.48842674493789673,
0.3035750687122345,
0.0380529947578907,
-0.1057119071483612,
0.1613590568304062,
-0.16908060014247894,
0.018012380227446556,
-0.3777964413166046,
0.15180805325508118,
0.6929271817207336,
-0.2291484773159027,
0.08251626044511... | |
building a Data Access Layer that makes sense to you. You'll be glad that you did. | [
0.3879457414150238,
0.10852250456809998,
0.00006812372157583013,
0.3146926164627075,
0.041201524436473846,
-0.07159684598445892,
-0.08250697702169418,
0.17296290397644043,
-0.32582032680511475,
-0.7600735425949097,
0.15272456407546997,
0.30194219946861267,
0.24087481200695038,
-0.116052202... | |
I am using SVN to manage a copy of my web site. The site runs a typo3 installation, which uses PHP to create the backend.
The problem is, all the stupid .SVN folders show up in the directory listing of PHP. I DO NOT mean the build in apache listing. I mean a directoy listing created by the PHP backend.
So, is there a... | [
0.9716587066650391,
0.4814084470272064,
0.12146344035863876,
-0.011376719921827316,
-0.1411030888557434,
-0.4220910370349884,
0.19325314462184906,
0.051682230085134506,
-0.4120748043060303,
-0.2289360910654068,
0.04746109992265701,
0.39707139134407043,
-0.3037947416305542,
0.00706751504912... | |
not want to setup a svn export --> web\_root just to get rid of the files. And I know that I can prevent apache from serving the .SVN directories, I did that. But they still show up in the backend, when browsing the directory tree (which is created by PHP). And they are very annoying...
This is difficult, since you wil... | [
0.20664061605930328,
0.216618612408638,
0.41172030568122864,
-0.031309738755226135,
-0.09082876145839691,
-0.31090518832206726,
0.542311429977417,
0.31178656220436096,
-0.44572529196739197,
-0.6686432361602783,
-0.16605080664157867,
0.5580054521560669,
-0.37208086252212524,
0.1983933597803... | |
SVN. Changing Typo3 is not an option for you, and changing PHP has many other major undesirable consequences that you should avoid. So, what you have left is to insert something in between OS→PHP or PHP→Typo3.
The first case is actually possible, depending on what operating system you use, and if you have administrato... | [
0.009102273732423782,
-0.4285699427127838,
0.6359815001487732,
0.038310013711452484,
0.09418156743049622,
-0.4210011661052704,
0.019628772512078285,
-0.16116966307163239,
-0.507355809211731,
-0.97109454870224,
-0.2646419107913971,
0.625424325466156,
-0.4813631772994995,
-0.1199401915073394... | |
create a filesystem that mirrors your SVN checkout directory, filtering the `.svn` directories. | [
0.22081825137138367,
-0.1277419924736023,
0.07462355494499207,
0.27571073174476624,
-0.0026690210215747356,
-0.3057493269443512,
-0.041464533656835556,
0.13046564161777496,
-0.24125154316425323,
-0.8898143768310547,
-0.2695135772228241,
0.49218517541885376,
-0.21248804032802582,
0.06753614... | |
So...
I teach formal methods in software engineering. I also teach "agile methodologies". Most people seem to think this is contradictory. I think it makes a lot of sense... I also work for a company, where we need to actually get things done :) While I can apply my earned skill points on "specification" in a day-to-d... | [
0.6206783652305603,
0.28358638286590576,
-0.3135455548763275,
0.36154061555862427,
0.06534533202648163,
-0.2639552652835846,
0.3687879145145416,
-0.05303340032696724,
-0.010504490695893764,
-0.50142902135849,
-0.31321191787719727,
1.0260002613067627,
0.22820627689361572,
0.0909291356801986... | |
this was due to the fact that most people in the formal community are not engineers, but mathematicians or computer scientists. Nowadays, I wonder if it just because the formal-methods community hide behind some kind of "obfuscation" law to use all the available UNICODE symbols, actively develop rude, unesthetic tools,... | [
0.5950212478637695,
0.6816747188568115,
-0.2029542177915573,
0.2003597617149353,
-0.19390270113945007,
-0.21909736096858978,
-0.03289913758635521,
0.13211646676063538,
-0.0350862555205822,
0.053323131054639816,
0.03019632026553154,
0.24602623283863068,
-0.05391842871904373,
-0.077757336199... | |
fog of mathematics from people's fears and incite them to use formal methods? What do you think current tools are lacking for a more general usage?
The key to getting people to buy into *any* methods or methodologies is to show them how it solves problems they are having. If they can see it will make their lives better... | [
0.5929946899414062,
0.235831618309021,
0.2770881950855255,
0.6583159565925598,
0.009967518039047718,
-0.2150280624628067,
0.018263552337884903,
0.08040384203195572,
-0.07982009649276733,
-0.16374053061008453,
0.2987324297428131,
0.2998538613319397,
-0.2227177619934082,
0.513144850730896,
... | |
to get anywhere. And perhaps you shouldn't.
Over the decades there have been a great many methodologies. Newer ones always address the shortcomings of the old ones, yet projects still get in trouble and fail. Why? Because the rock stars that come up with new methodologies are rock stars, and have made a new methodolog... | [
0.5248397588729858,
0.0546959787607193,
-0.1028738021850586,
0.6193545460700989,
0.5887418985366821,
-0.36360281705856323,
0.6191278696060181,
0.2768622636795044,
-0.08982311189174652,
-0.2672184705734253,
-0.2930268347263336,
0.26942673325538635,
0.03111388348042965,
-0.003601189237087965... | |
attempt to deal with those problems. The differences in companies, projects, and teams is so great that no one methodology can be applied successfully to all combinations. Learning to choose an appropriate tool and apply it well is crucial. | [
0.43990230560302734,
0.1936158835887909,
-0.2776464819908142,
0.3522650897502899,
0.35427072644233704,
0.1476074457168579,
0.4011077880859375,
-0.23136503994464874,
-0.06513034552335739,
-0.9047964215278625,
-0.2780650854110718,
0.616818368434906,
-0.027287855744361877,
-0.2347345799207687... | |
I do a lot of Python quick simulation stuff and I'm constantly saving (:w) and then running (:!!). Is there a way to combine these actions?
Maybe a "save and run" command.
**Option 1:**
Write a function similar to this and place it in your startup settings:
```
function myex()
execute ':w'
execute ':!!'
endfun... | [
0.2758723795413971,
-0.1293552666902542,
-0.03239121288061142,
0.023948654532432556,
0.26564279198646545,
-0.013502530753612518,
0.40756893157958984,
-0.0569537878036499,
-0.19415858387947083,
-0.7592235803604126,
0.04673074930906296,
0.8618544936180115,
-0.16293823719024658,
-0.2941741347... | |
figure out how to replace that with the current file?
```
:map <F2> <Esc>:w<CR>:!filename.py<CR>
```
After mapping that, you can just press `F2` in command mode.
imap, vmap, etc... are mappings in different modes. The above only applies to command mode. The following should work in insert mode also:
```
:imap <F2>... | [
-0.08462613821029663,
-0.17301616072654724,
0.5368126630783081,
0.008256474509835243,
0.19901897013187408,
-0.24296921491622925,
-0.14082199335098267,
-0.1892857700586319,
-0.3171629011631012,
-0.9486221671104431,
-0.2712109684944153,
0.9044289588928223,
-0.20744813978672028,
-0.0433105118... | |
I have recently been building very small and simple apps using Locomotive 2.0.8. Until now it has been the ideal solution, but recently the application has slowed to absolute crawl. It takes literally 10 minutes to boot up, 5 minutes to add an existing or new project - and often these creations don't even work correctl... | [
0.31384000182151794,
0.04222659394145012,
0.11693267524242401,
0.29792478680610657,
-0.02243041805922985,
0.056960467249155045,
0.8545933961868286,
0.3089766204357147,
-0.17890992760658264,
-0.5640466213226318,
0.1672913283109665,
0.3576771020889282,
-0.13913358747959137,
0.434712558984756... | |
essentially format my dev environment to start anew?
Object detection's greatest strength is that you only use the objects and features that are available to you by the client's browser. In other words given the following code:
```
if (document.getFoo) {
// always put getFoo in here
} else {
// browsers who do... | [
0.5418422222137451,
0.05210431292653084,
0.19828175008296967,
0.07485233247280121,
-0.2573528587818146,
-0.4756852984428406,
0.37627938389778137,
0.14244532585144043,
-0.12156752496957779,
-0.9566347599029541,
-0.13638129830360413,
0.7532923817634583,
-0.3152637779712677,
0.127813756465911... | |
browsers you have never heard of. If you target user agent strings find the browser then you only can support the browsers you know.
Also if a browser that previously did not support `getFoo` gets with the program and releases a new version that does, you don't have to change your code at all to allow the new browser ... | [
0.31112000346183777,
-0.09515807032585144,
0.31709885597229004,
0.31395241618156433,
0.05011499673128128,
-0.3625982701778412,
0.3617118000984192,
0.5337854623794556,
-0.2914714515209198,
-1.0261255502700806,
-0.35841456055641174,
0.49234724044799805,
-0.5346564650535583,
0.013887105509638... | |
I'm implementing a LINQ clone in Lua, but that's not too relevant here, and I've got most features done (enumerable/queryable, not the precompiler yet), but can't think of a smart way to implement OrderBy's ThenBy.
Currently I sort once, then place in new lists and then sort those sub lists and finally merge the resu... | [
0.2982991933822632,
0.20538637042045593,
0.3162979185581207,
-0.1121368333697319,
0.20418956875801086,
0.09735488146543503,
0.059026435017585754,
0.1410352885723114,
-0.28331995010375977,
-0.8864368796348572,
-0.025378962978720665,
0.3334905505180359,
-0.15511749684810638,
0.13803112506866... | |
and Language constructs hopefully are not relevant here, I'm looking for the generalized algorithm, just as say a Binary Sort can be done in any language.
**Edit:** Currently I'm working on LINQ to Object, so any ideas how that would be done in particular would be great. I'm guessing OrberBy/ThenBy are 2 function call... | [
-0.22448627650737762,
0.15186776220798492,
0.05823923647403717,
0.08807708323001862,
-0.21609757840633392,
0.20390982925891876,
0.13612478971481323,
0.09549999237060547,
-0.28669893741607666,
-0.6144824028015137,
-0.12718161940574646,
0.27155670523643494,
-0.2761040925979614,
0.12493936717... | |
if (n1.LastName < n2.LastName) {
return -1;
} else if (n1.LastName > n2.LastName) {
return 1;
} else if (n1.FirstName < n2.FirstName) {
return -1;
} else if (n1.FirstName > n2.FirstName) {
return 1;
} else {
return 0;
}
}
```
The key point here is that we do... | [
-0.19071327149868011,
0.07944191992282867,
0.21018455922603607,
-0.2442121058702469,
0.42037302255630493,
-0.1769641935825348,
0.31136655807495117,
-0.24983729422092438,
-0.057448893785476685,
-0.4648607671260834,
-0.6367056965827942,
0.621344268321991,
-0.12041891366243362,
0.174524530768... | |
at the `FirstName` member unless we already know that the two `LastName` members are equal. | [
-0.38754546642303467,
-0.0005502316053025424,
0.49530941247940063,
-0.27649369835853577,
0.021768277511000633,
-0.04208262264728546,
0.08993051946163177,
-0.04766009375452995,
-0.21782737970352173,
-0.7005933523178101,
-0.43932604789733887,
0.4253692626953125,
0.21277616918087006,
0.083276... | |
SQLServer int field. Value sometimes null.
DataAdapter fills dataset OK and can display data in DatagridView OK.
When trying to retrieve the data programmatically from the dataset the Dataset field retrieval code throws a StronglyTypedException error.
```
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
... | [
-0.13465486466884613,
-0.14009875059127808,
0.34629106521606445,
-0.06801644712686539,
-0.32214391231536865,
0.010213954374194145,
0.35281094908714294,
-0.18615470826625824,
-0.12906186282634735,
-0.47926080226898193,
-0.10401839762926102,
0.5304804444313049,
-0.4207025468349457,
0.3754349... | |
catch (global::System.InvalidCastException e) {
throw new global::System.Data.StrongTypingException("The value for column \'curr_reading\' in table \'History\' is DBNull.", e);
}
```
Got past this by checking for DBNull in the get accessor and returning null but...
When the dataset structu... | [
0.19237273931503296,
-0.12482502311468124,
0.3113987445831299,
-0.23676739633083344,
-0.01795601285994053,
0.01670430786907673,
0.36619845032691956,
0.009219055995345116,
-0.271251916885376,
-0.5165051221847534,
-0.022156111896038055,
0.41097137331962585,
-0.46997737884521484,
0.3236014544... | |
attribute that can tell the auto code generator to leave the changes in place?
The dataset will have a boolean property to indicate null.
```
int curr_reading = ( Iscurr_readingColumnNull) ?
<default_value> : row.curr_readingColumn;
``` | [
-0.0824580192565918,
0.08375681936740875,
0.3352915048599243,
-0.23681025207042694,
0.22290918231010437,
0.08229899406433105,
0.11180862039327621,
-0.11625727266073227,
0.09141352772712708,
-0.5172057747840881,
-0.2608898878097534,
0.710741400718689,
-0.47841358184814453,
0.079222247004508... | |
I have a page that displays two objects and then the user picks one of these. I record the preference and the combination in a MSSQL database and end up storing data like this:
```
UserId=1, BetterObjectId=1, WorseObjectId=2
```
Now I would like to avoid showing that combination of objects (1,2 / 2,1) ever again.
*... | [
0.4763358235359192,
0.10224772989749908,
-0.12304682284593582,
-0.025438321754336357,
-0.0456593818962574,
0.3059002161026001,
0.11459973454475403,
-0.11285290867090225,
-0.19691500067710876,
-0.8749660849571228,
0.16232930123806,
0.40908515453338623,
-0.46908432245254517,
-0.1739798784255... | |
calls to this function would have to be wrapped in a check to see if the user has already rated as many times as nCr where n is the item count and r is 2):
```
public List<Item> GetTwoRandomItems(int userId)
{
Item i = null, i2 = null;
List<Item> r = null;
while (i == null || i2 == null)
{
r =... | [
-0.1276622861623764,
-0.1299409568309784,
0.5029036998748779,
-0.1775331348180771,
0.010809777304530144,
0.0974620059132576,
0.60782790184021,
-0.771655261516571,
-0.24460461735725403,
-0.18886882066726685,
-0.44664254784584045,
0.755761444568634,
-0.5873196721076965,
0.35416749119758606,
... | |
if (GetRating(i.Id, i2.Id, userId) != null) /* Checks if viewed */
{
i = null;
i2 = null;
}
}
return r;
}
private List<Item> GetTwoRandomItemsRaw()
{
return Items.ToList().OrderBy(i => Guid.NewGuid()).Take(2).ToList();
}
```
**Edits**
Using some SQL I can generate... | [
0.07956959307193756,
-0.11199133843183517,
0.48114556074142456,
-0.3283337652683258,
-0.08642473071813583,
-0.08519915491342545,
0.5554844737052917,
-0.7056918740272522,
-0.2332678735256195,
-0.5426387190818787,
-0.26315227150917053,
0.5864008069038391,
-0.48502761125564575,
0.226191729307... | |
item that the user hasn't seen) but I don't think is particularly useful.
I can also imagine generating every possible combination and eliminating already viewed ones before picking 2 random items but this is a another terrible solution.
A possibility (memory intensive for large n) is to generate all possible combina... | [
-0.16676315665245056,
-0.192874938249588,
0.44595789909362793,
0.2171754091978073,
-0.1683507263660431,
0.29685449600219727,
0.25714340806007385,
-0.4334110617637634,
-0.2825830578804016,
-0.7063526511192322,
-0.080690898001194,
0.3590538799762726,
-0.39445871114730835,
0.03601228818297386... | |
in the Rating table, you only have to check the Rating table once.
```
var pair = db.Items.Join(db.Items,
i1 => i1.ItemId,
i2 => i2.ItemId,
(i1, i2) => new {i1, i2}
) //produce all pairs
.Where(x => x.i1.ItemId < x.i2.ItemId) //filter diagonal to unique pairs
.Where(x =>
!db.Ratings
.Where(r => r.UserId ==... | [
0.10591982305049896,
-0.09679020196199417,
0.4635083079338074,
-0.12534473836421967,
-0.1971767693758011,
0.2511948347091675,
0.18960440158843994,
-0.7794556617736816,
-0.22090379893779755,
-0.6854560375213623,
-0.08536742627620697,
0.5778599381446838,
-0.3573788106441498,
0.21206468343734... | |
"random" translated into the database. | [
0.1728370636701584,
-0.09838499128818512,
-0.17302639782428741,
0.29877763986587524,
-0.10096149146556854,
-0.023198315873742104,
-0.19001096487045288,
0.06989998370409012,
-0.07933592051267624,
-0.38160234689712524,
-0.24441611766815186,
0.11640189588069916,
-0.1935715526342392,
0.2337923... | |
I have Java classes with the following structure (the class names do not imply anything, I was just making them up).
```
package test;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.ann... | [
0.3482775390148163,
0.3182222843170166,
0.12275024503469467,
-0.1858692169189453,
-0.17376597225666046,
0.039685096591711044,
0.5656375885009766,
-0.5942646265029907,
0.10479453951120377,
-0.7804660797119141,
-0.19343017041683197,
0.474450945854187,
-0.4144411087036133,
-0.0167522206902503... | |
Threshold t = new Threshold();
}
@XmlAccessorType(XmlAccessType.FIELD)
static class Threshold
{
RateThreshold load = new RateThreshold();
}
@XmlAccessorType(XmlAccessType.FIELD)
static class RateThreshold
{
@XmlAccessorType(XmlAccessType.FIELD)
static class Rate... | [
0.2874932885169983,
-0.5608367919921875,
0.4921530783176422,
-0.09838976711034775,
-0.33540722727775574,
-0.028998393565416336,
-0.05989037826657295,
-0.8436710834503174,
0.09413882344961166,
-0.6946421265602112,
0.08343585580587387,
0.4715054929256439,
-0.37042516469955444,
0.401799440383... | |
Period period = new Period();
}
@XmlAccessorType(XmlAccessType.FIELD)
private static class Period
{
@XmlAttribute
private String type = "second";
@XmlValue
private float period; | [
-0.016781413927674294,
-0.7996260523796082,
0.2418161928653717,
-0.08640685677528381,
0.0019647018052637577,
0.03421216085553169,
-0.11671417951583862,
-0.055638451129198074,
-0.20979534089565277,
0.03908562287688255,
-0.35927072167396545,
0.15120774507522583,
-0.1545819491147995,
0.437823... | |
}
Rate min = new Rate();
Rate max = new Rate();
}
@XmlElementWrapper(name="machines")
@XmlElement(name="machine")
List<Machine> machines = new ArrayList<Machine>();
public static void main(String[] args)
{
Machine m = new Machine();
Server s = new Server();
... | [
0.02026115357875824,
-0.41716060042381287,
0.7430440187454224,
-0.11674150079488754,
0.029442492872476578,
0.45258399844169617,
0.14832213521003723,
-0.20693007111549377,
-0.5181796550750732,
-0.6659867167472839,
-0.3889733850955963,
0.40375086665153503,
-0.28667375445365906,
0.54664433002... | |
s.t.load.min.count = 1;
m.servers.add(s);
Test t = new Test();
t.machines.add(m);
JAXBContext jaxbContext;
Marshaller marshaller;
try
{
jaxbContext = JAXBContext.newInstance(Test.class);
marshaller = jaxbContext.createMarshaller(); | [
0.4113385081291199,
-0.3778333067893982,
0.28687629103660583,
0.06439492851495743,
0.39275258779525757,
0.46268144249916077,
0.5190615653991699,
-0.47476980090141296,
-0.09599269926548004,
-0.6095032095909119,
-0.31956738233566284,
0.22043852508068085,
-0.2573838531970978,
0.59052139520645... | |
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
marshaller.marshal(t, System.out);
}
catch (JAXBException e)
{
e.printStackTrace();
}
}
}
```
The problem I am having is with the XML output generated by JAXB when marshalling a Test instance. T... | [
0.5379063487052917,
0.052296385169029236,
0.03174322098493576,
0.27557042241096497,
0.3136945366859436,
-0.10255947709083557,
-0.015052477829158306,
-0.6522653102874756,
-0.030937019735574722,
-0.4250553846359253,
0.0019410359673202038,
0.41873276233673096,
-0.27815690636634827,
0.22797213... | |
version="1.0" encoding="UTF-8" standalone="yes"?>
<test>
<machines>
<machine>
<servers>
<server>
<t>
<load> | [
0.006770602893084288,
-0.3281329870223999,
0.24892070889472961,
-0.2209329903125763,
-0.018904805183410645,
-0.09782136231660843,
0.13994775712490082,
0.05520540848374367,
-0.06503008306026459,
-0.5982047319412231,
-0.5034846663475037,
0.042776282876729965,
-0.6267057061195374,
0.071208342... | |
<min>
<count>1</count>
<period type="second">0.0</period>
</min>
<max>
<count>10</count>
<period type="second">0.0</period> | [
-0.08547212928533554,
-0.6112396121025085,
0.13662929832935333,
0.020181722939014435,
0.0824677124619484,
0.5438768267631531,
-0.06538397073745728,
0.0033709516283124685,
-0.20652012526988983,
-0.5369839072227478,
-0.12200178951025009,
0.14230334758758545,
0.3333393633365631,
0.23454996943... | |
</max>
</load>
</t>
</server>
</servers>
</machine>
</machines>
</test>
```
As you can see, some elements are not being indented properly (that is, the deepest elements, | [
0.266154408454895,
0.041065990924835205,
-0.03883672505617142,
0.21095043420791626,
0.3578144907951355,
-0.2103181928396225,
0.38157376646995544,
-0.29763197898864746,
-0.031116530299186707,
-0.7540245056152344,
-0.017171837389469147,
-0.13444127142429352,
-0.03409833461046219,
0.192887976... | |
count and period). Why is that? Is there something wrong with the way I created the JAXB context? Or is there a maximum limit to how many elements that can be indented recursively by JAXB? How could I fix this? Note that I have also set JAXB\_FORMATTED\_OUTPUT to true, but still get the improper indentation.
Thanks.
I... | [
0.11593396961688995,
-0.20531359314918518,
0.6072275638580322,
-0.36999306082725525,
0.1379566341638565,
-0.12451636046171188,
0.4588788151741028,
-0.4608125686645508,
-0.1806609034538269,
-0.30786508321762085,
-0.1600124090909958,
0.3895094692707062,
-0.12266158312559128,
0.05333615466952... | |
I am looking to do a specific copy in Fedora.
I have two folders:
* 'webroot': holding ALL web files/images etc
* 'export': folder containing thousands of PHP, CSS, JS documents that are exported from my SVN repo.
The export directory contains many of the same files/folders that the root does, however the root cont... | [
0.667212188243866,
0.13832345604896545,
0.26187410950660706,
-0.1330902874469757,
-0.20262748003005981,
0.00251401006244123,
0.08495442569255829,
0.002884398214519024,
-0.4042667746543884,
-0.6667868494987488,
0.09840372204780579,
0.3625958561897278,
-0.3814646005630493,
0.1293044537305832... | |
is overwritten (the export
version replacing the live version) \*NOTE I would like the webroots permissions/ownership maintained, but with export's contents
3. No prompting/stopping of the copy
of any kind (ie not verbose)
4. Recursive copy - obviously I
would like to copy all\* files
folders and subfolders found in
ex... | [
0.05449429899454117,
0.43738242983818054,
0.47233736515045166,
0.010746195912361145,
0.15158295631408691,
-0.36449405550956726,
0.20693933963775635,
0.007282733451575041,
-0.26327088475227356,
-0.501656174659729,
-0.2855603098869324,
0.5873726010322571,
-0.5979117751121521,
0.1077413633465... | |
can copy files from one host to another over an SSH connection, if you ever have a need to do that. Plus, it has a zillion options you can specify to tweak its behavior - look in the man page for details.
*EDIT*: with respect to your clarification about what you mean by preserving permissions: you'd probably want to l... | [
0.35721540451049805,
-0.11755107343196869,
0.21885980665683746,
0.44205692410469055,
0.3044911324977875,
-0.4834643304347992,
0.333173543214798,
0.2660309076309204,
-0.35467955470085144,
-0.7403921484947205,
-0.3566858768463135,
0.5414338707923889,
-0.18302416801452637,
0.24409140646457672... | |
Okay, so I've been trying to load a BufferedImage using this code:
```
URL url = this.getClass().getResource("test.png");
BufferedImage img = (BufferedImage) Toolkit.getDefaultToolkit().getImage(url);
```
This gives me a type cast error when I run it though, so how do I properly load a BufferedImage?
Use [`ImageIO.r... | [
0.28713181614875793,
-0.021774817258119583,
0.28337717056274414,
-0.21017009019851685,
-0.11583498120307922,
-0.184393972158432,
0.2038448303937912,
-0.1580699384212494,
-0.20128969848155975,
-0.6979354023933411,
-0.0283217690885067,
0.5247308015823364,
-0.48641330003738403,
-0.08759176731... | |
I need some help/guidance on WinForms data binding and I can't seem to get Google to help me with this one.
Here is my scenario. Consider the following classes which is similar to what I need:
```
public class Car
{
public string Name { get; set; }
public List<Tire> Tires { get; set; }
}
public class Tire
{
... | [
0.632412850856781,
0.17104674875736237,
0.19836583733558655,
0.09387478232383728,
0.06245679408311844,
0.3655013144016266,
-0.10198415070772171,
-0.2831260859966278,
-0.16714417934417725,
-0.779725193977356,
0.17926494777202606,
1.035672903060913,
-0.13073621690273285,
0.24311962723731995,... | |
here.
Now I want to data bind this to a Form containing five textboxes. One textbox with the name of the car and one textbox with each of the tires pressures.
Any idea on how to make this work? The designer in VS does not seem to allow me to set this up by assigning to list indexes like Tires[0].Pressure.
My current... | [
0.46992960572242737,
0.2508026659488678,
0.45935705304145813,
0.2186150848865509,
-0.33072203397750854,
0.3283543288707733,
-0.3562624752521515,
-0.1301887184381485,
-0.0014552376233041286,
-0.3727763295173645,
0.29218435287475586,
0.8738773465156555,
-0.04223477840423584,
0.44145554304122... | |
}
public string Name
{
get { return _car.Name; }
set { _car.Name = value; }
}
public double Tire1Pressure
{
get { return _car.Tires[0].Pressure; }
set { _car.Tires[0].Pressure = value; }
}
public double Tire2Pressure
{
get { return | [
0.4936942756175995,
-0.02870541624724865,
0.23006288707256317,
-0.1204223707318306,
0.10870710015296936,
0.54261714220047,
-0.04403194412589073,
0.09004140645265579,
0.09320329129695892,
-0.36239081621170044,
-0.07000043243169785,
1.0805577039718628,
-0.14782235026359558,
0.038844551891088... | |
_car.Tires[1].Pressure; }
set { _car.Tires[1].Pressure = value; }
}
public double Tire3Pressure
{
get { return _car.Tires[2].Pressure; }
set { _car.Tires[2].Pressure = value; }
}
public double Tire4Pressure
{
get { return _car.Tires[3].Pressure; }
set { ... | [
0.20272605121135712,
0.0680195689201355,
0.5734572410583496,
-0.19001665711402893,
0.09765684604644775,
0.4242812693119049,
0.19549104571342468,
-0.23394210636615753,
-0.21880097687244415,
-0.4822745621204376,
-0.19526804983615875,
0.9628205895423889,
-0.25705528259277344,
-0.0717978328466... | |
ugly when my lists contains 20 instead of 4 objects, and for each of those objects I want to bind against 6 properties. That makes a huge "BindableObject"!
While the WinForms designer may not let you do this, have you tried setting up the binding in code? I imagine there is no problem binding a textbox to someCar.Tires... | [
0.38738927245140076,
0.244575634598732,
0.2827850878238678,
0.03164788708090782,
-0.6367915868759155,
-0.21882562339305878,
0.5216144323348999,
-0.0005910229519940913,
-0.14068908989429474,
-0.6558542251586914,
0.20714132487773895,
0.5510814189910889,
-0.3666370213031769,
0.344813704490661... | |
Here's my situation: I'm building a small website where, when registring, you can select which days you're available for something.
Mondaymorning
Mondayafternoon
Tuesdaymorning
Tuesdayafternoon
etc...
All the way to sundayafternoon.
I'm formchecking this offcourse, in PHP, and I need to declare 14 variables and go o... | [
0.5791102647781372,
-0.17358390986919403,
0.8181002140045166,
0.12210457772016525,
-0.22598887979984283,
-0.06588324159383774,
0.2608751356601715,
0.30113160610198975,
-0.4258275330066681,
-0.4382794201374054,
0.24493283033370972,
0.4424923360347748,
0.07428500801324844,
0.0390576981008052... | |
can just add `[]` to the end of the names, just make sure that you set all their values differently.
```
<input type="checkbox" name="available[]" value="Mon AM" />
<input type="checkbox" name="available[]" value="Mon PM" />
```
Then just loop over the `$_POST['available']` array in your form-processing code. | [
0.305899977684021,
-0.08029588311910629,
0.15295301377773285,
0.08099639415740967,
0.412160724401474,
-0.06046149134635925,
0.005313191097229719,
-0.16885264217853546,
-0.23323272168636322,
-0.6294642090797424,
-0.35748785734176636,
0.683816134929657,
-0.08359803259372711,
0.03222983703017... | |
Im trying to change the thread priority in boost but im having no luck. Im getting a bad handle error (type 6) from the GetLastError function. I though native\_handle() returned the handle for the thread?
Any one know how to do this?
```
void baseThread::applyPriority(uint8 priority)
{
#ifdef WIN32
if (!m_pThrea... | [
-0.10714378952980042,
-0.24728044867515564,
0.6117925643920898,
-0.0525909885764122,
0.15429191291332245,
0.09668316692113876,
0.7708166241645813,
-0.5438085198402405,
-0.24724683165550232,
-0.48095402121543884,
-0.18602652847766876,
0.8574985265731812,
-0.08036486804485321,
0.418290257453... | |
HIGH : res = SetPriorityClass(th, HIGH_PRIORITY_CLASS); break;
case ABOVE_NORMAL : res = SetPriorityClass(th, ABOVE_NORMAL_PRIORITY_CLASS); break;
case NORMAL : res = SetPriorityClass(th, NORMAL_PRIORITY_CLASS); break;
case BELOW_NORMAL : res = SetPriorityClass(th, BELOW_N... | [
-0.16423463821411133,
-0.5893464088439941,
0.3271712362766266,
0.06477080285549164,
0.6194154620170593,
0.3946448862552643,
0.24743089079856873,
-0.12878809869289398,
-0.4190152585506439,
-0.3066263496875763,
-0.6428870558738708,
0.6418250203132629,
-0.26413553953170776,
0.4587096869945526... | |
break;
}
if (res == FALSE)
{
int err = GetLastError();
}
#endif
}
```
edit: Final code:
```
void baseThread::applyPriority(uint8 priority)
{
#ifdef WIN32
if (!m_pThread)
return;
BOOL res;
HANDLE th = m_pThread->native_handle();
switch (priority)
{
case REA... | [
-0.18150198459625244,
-0.39313074946403503,
0.6196039319038391,
-0.14799684286117554,
0.5554429292678833,
-0.025523416697978973,
0.5965883135795593,
-0.4789658486843109,
-0.3143010437488556,
-0.34306463599205017,
-0.5189142227172852,
0.7657698392868042,
-0.0228603333234787,
0.5497893095016... | |
: res = SetThreadPriority(th, THREAD_PRIORITY_HIGHEST); break;
case ABOVE_NORMAL : res = SetThreadPriority(th, THREAD_PRIORITY_ABOVE_NORMAL); break;
case NORMAL : res = SetThreadPriority(th, THREAD_PRIORITY_NORMAL); break;
case BELOW_NORMAL : res = SetThreadPriority(th, THREA... | [
0.0907328650355339,
-0.5492812395095825,
0.46737125515937805,
-0.09275366365909576,
0.607745349407196,
0.4826975166797638,
0.38699910044670105,
-0.14515316486358643,
-0.6273642778396606,
-0.28478574752807617,
-0.631877064704895,
0.5576445460319519,
-0.23451220989227295,
0.6641454100608826,... | |
break;
}
#endif
}
```
Use SetThreadPriority function to set the thread priority. SetPriorityClass is used to set the priority of the process. You also have to change the priority values, see documentation for [SetThreadPriority](http://msdn.microsoft.com/en-us/library/ms686277(VS.85).aspx) for details. | [
-0.040432415902614594,
-0.15354102849960327,
0.26755303144454956,
0.04841475561261177,
0.23906353116035461,
-0.1213933527469635,
0.21937179565429688,
-0.014477924443781376,
-0.5721957087516785,
-0.37717875838279724,
-0.3302316665649414,
0.19365578889846802,
-0.25052374601364136,
0.41589701... | |
And also the better counter part in sql server for mapping.
Decimal and Decimal :)
* .Net: <http://msdn.microsoft.com/en-us/library/system.decimal.aspx>
* SQL; <http://msdn.microsoft.com/en-us/library/ms187746.aspx> | [
-0.1196679174900055,
0.0554182305932045,
0.20888951420783997,
0.3838825225830078,
-0.09647036343812943,
0.2874218225479126,
-0.2282526195049286,
-0.09050804376602173,
-0.41028231382369995,
-0.268716961145401,
-0.2025555968284607,
0.1883961707353592,
0.3260314464569092,
0.1262514740228653,
... | |
I have an application that contains Menu and sub menus. I have attached Appliocation Commands to some of the sub menu items such as Cut, Copy and Paste.
I also have some other menu items that do not have application commands.
How could I add a custom command binding to those sub menu items?
I have gone through... | [
0.22243519127368927,
-0.07200528681278229,
0.29453355073928833,
0.0412200503051281,
-0.17851732671260834,
0.1497245877981186,
0.37326231598854065,
-0.07120013982057571,
-0.2902073264122009,
-0.7840033173561096,
-0.2419680505990982,
0.3622060716152191,
-0.31231242418289185,
0.34611654281616... | |
of the RoutedUICommand class:
```
public static class Command {
public static readonly RoutedUICommand DoSomething = new RoutedUICommand("Do something", "DoSomething", typeof(Window1));
public static readonly RoutedUICommand SomeOtherAction = new RoutedUICommand("Some other action", "SomeOtherAction", typeof(... | [
0.3706168830394745,
-0.22743351757526398,
0.7148692607879639,
-0.08546607941389084,
-0.21558219194412231,
-0.02063792757689953,
0.11213516443967819,
-0.5584268569946289,
-0.139491006731987,
-0.5200132131576538,
0.024395044893026352,
0.5495513081550598,
-0.44561973214149475,
-0.111388944089... | |
<CommandBinding Command="w:Command.SomeOtherAction" Executed="CommandBinding_SomeOtherAction" />
<CommandBinding Command="w:Command.MoreDeeds" Executed="CommandBinding_MoreDeeds" />
</Window.CommandBindings>
```
And use the bindings in a menu for example:
```
<MenuItem Name="Menu_DoSomething" Header="Do Somethin... | [
0.5500929951667786,
-0.07167941331863403,
0.40620291233062744,
-0.18641111254692078,
-0.1975855827331543,
-0.16438475251197815,
0.1748378872871399,
-0.41834014654159546,
-0.21490420401096344,
-0.6706874966621399,
0.0490383580327034,
0.5071004033088684,
-0.11172957718372345,
0.1693181544542... | |
I am looking to provide some convenience through reflection to programmers who will be using my code. To achieve my desired result I would like to get the class object for classes that extend my code. Even though they can't override the static method I wish to access the information from, it would be currently helpful.... | [
0.42674705386161804,
0.11187831312417984,
0.20195423066616058,
0.28157490491867065,
0.13162729144096375,
-0.142198383808136,
0.1771644651889801,
0.1254863440990448,
-0.19658266007900238,
-0.5864856839179993,
0.29482316970825195,
0.2880680561065674,
0.0641186535358429,
0.22330144047737122,
... | |
and extract the class name, then convert that into an actual instance of the class.
Any other suggestions?
Side note: the above approach is also the only way that I'm aware of getting the calling method.
When in the static method, what is the guarantee that some (any) class that has been extended from yours is on the... | [
0.23279955983161926,
-0.06145429611206055,
0.05614100769162178,
-0.07379037141799927,
0.2874319851398468,
-0.1813405454158783,
0.146651491522789,
-0.013814536854624748,
-0.3756340742111206,
-0.40173348784446716,
-0.0001362765033263713,
0.6559333801269531,
-0.4332923889160156,
0.16816619038... | |
if `create` is `protected` method? Then you could be pretty sure the caller is a `B`, you can even require that, throwing `UnsupportedOperation` or `IllegalState` if the caller is not assignable to `B`.
You can use `Thread.currentThread().getStackTrace()` | [
0.6749064922332764,
-0.025016997009515762,
0.08819160610437393,
0.04637375846505165,
0.2082299143075943,
-0.5862308144569397,
0.22529196739196777,
-0.039943765848875046,
-0.20857495069503784,
-0.26985347270965576,
-0.09759101271629333,
0.37616071105003357,
-0.5170493721961975,
0.5873652100... | |
I am having a hard time adding a Visual Studio Solution with multiple projects to my repo. I am using VisualSVN. Here is my directory structure
```
c:\-----
|
---Projects
|
--MyApp
|
---Project1 (The solution is in this project directory) | [
0.38581836223602295,
-0.030502181500196457,
0.5132460594177246,
-0.11822003126144409,
-0.3038841485977173,
0.09949780255556107,
0.14559616148471832,
0.23532983660697937,
-0.30612146854400635,
-0.7710816264152527,
-0.030549725517630577,
0.6064919233322144,
0.0005464376881718636,
0.115034252... | |
---Project2
---Project3
```
When I select "MyApp" as the working copy root, nothing is added. If I select one of the project folder, only 2 are added.
Here's the structure I use with success:
```
dev
|- Project root folder (solution file here is the key)
|- Class Project
|- Class Project
|... | [
0.03850332647562027,
-0.15337179601192474,
0.3799434304237366,
0.10171865671873093,
-0.01386891771107912,
-0.108362577855587,
0.2753129005432129,
0.008852695114910603,
-0.16687315702438354,
-0.7980818152427673,
-0.2774706482887268,
0.31835320591926575,
-0.08567222952842712,
0.2309828549623... | |
then import. | [
-0.08703505247831345,
0.1796131730079651,
-0.16888831555843353,
0.013707232661545277,
-0.2375151365995407,
0.4526090621948242,
-0.23199261724948883,
0.27783721685409546,
-0.10904545336961746,
-0.38589638471603394,
-0.08721429109573364,
0.5446156859397888,
-0.07901708036661148,
0.1321522295... | |
I have some existing code that I've used to write out an image to a bitmap file. One of the lines of code looks like this:
```
bfh.bfType='MB';
```
I think I probably copied that from somewhere. One of the other devs says to me "that doesn't look right, isn't it supposed to be 'BM'?" Anyway it does seem to work ok, ... | [
0.5671729445457458,
0.3167438507080078,
0.39066454768180847,
-0.04298129305243492,
-0.16321639716625214,
0.09215901792049408,
0.30080485343933105,
-0.12744830548763275,
-0.30231717228889465,
-0.5837342143058777,
0.0551302470266819,
0.2797493636608124,
-0.4444645643234253,
0.177600100636482... | |
the correct result? What does the multi-byte character constant mean anyway? Are they the same really?
All three are (probably) equivalent, but for different reasons.
```
bfh.bfType=0x4D42;
```
This is the simplest to understand, it just loads bfType with a number that happens to represent ASCII 'M' in bits 8-15 an... | [
0.00608260789886117,
0.25509288907051086,
0.31202465295791626,
-0.1782054603099823,
0.013501196168363094,
0.1325560361146927,
0.10127951949834824,
-0.45258331298828125,
-0.17931416630744934,
-0.2554665505886078,
-0.41722604632377625,
0.5568731427192688,
-0.42283302545547485,
-0.05310495942... | |
it will probably generate a value according to the endian-ness of the machine you compile on. If you compile and execute on a machine of the same endian-ness, then when you write the value out on the stream you should get 'B', 'M'.
```
bfh.bfType=*(WORD*)"BM";
```
Here, the "BM" causes the compiler to create a block... | [
0.10278403759002686,
0.12579002976417542,
0.11791912466287613,
-0.1815529465675354,
-0.0012028052005916834,
0.06365016102790833,
0.17858874797821045,
0.0027782164979726076,
0.03759235888719559,
-0.5378426909446716,
-0.16172531247138977,
0.28884652256965637,
-0.3911191523075104,
0.111906774... | |
Writing it out using the same endian-ness will obviously put 'B', 'M' on your stream. So long as you only use bfType to write out to the stream this is the most portable version. However, if you're doing any comparisons/etc with bfType then it's probably best to pick an endian-ness for it and convert as necessary when ... | [
0.30596739053726196,
-0.005699027329683304,
0.23440741002559662,
-0.11479596048593521,
-0.32242193818092346,
-0.08655611425638199,
0.17654013633728027,
-0.17092353105545044,
0.14635306596755981,
-0.5343486070632935,
0.15787234902381897,
0.39527183771133423,
-0.19511902332305908,
-0.2188720... | |
I'm attempting to implement a 'better' address book for IPhone and I just want to make additions to Apple's current address book interface. Do I have to re-implement everything from scratch (contacts divided by letter headers, all alphabet buttons on the right, and so on) or is there a way I can somehow use and modify ... | [
0.12226034700870514,
0.20449863374233246,
0.2791910767555237,
0.04092158004641533,
-0.06470241397619247,
0.1729211062192917,
0.4710528254508972,
-0.047032102942466736,
0.07145024836063385,
-0.7600362300872803,
-0.019300255924463272,
0.5428814888000488,
0.010308405384421349,
-0.275716692209... | |
what the regular
> "select a contact from a list" part of
> the addressbook does and then build
> upon that.
You basically have to implement sections and the index bar methods for a UITableView. (based on my shallow reading) the following methods need to be implemented:
```
- (NSArray *)sectionIndexTitlesForTableV... | [
-0.032793112099170685,
-0.049275729805231094,
0.8180784583091736,
0.00838136114180088,
-0.28940367698669434,
-0.21173961460590363,
0.34564125537872314,
-0.31585556268692017,
-0.07599959522485733,
-0.6636563539505005,
-0.20216840505599976,
0.45332205295562744,
-0.23553216457366943,
0.258366... | |
I need to write a very simple 3D physics simulator in Java, cube and spheres bumping into each other, not much more. I've never did anything like that, where should I start? Any documentation on how it is done? any libraries I could re-use?
[Physics for Game Programmers By Grant Palmer](http://books.google.com/books?id... | [
0.22734494507312775,
0.415820837020874,
-0.18455006182193756,
0.18292930722236633,
0.24287471175193787,
-0.14317741990089417,
0.10368968546390533,
0.006091540213674307,
-0.046347569674253464,
-0.4840388894081116,
-0.10361340641975403,
0.21372000873088837,
-0.25323542952537537,
-0.080686271... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.