text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
}
}
}
static void NameChange(object subject)
{
var person = subject as Person;
if (person == null) throw new ArgumentNullException("subject");
// You should avoid locking on strings, since they are immutable.
if (Monitor.TryEnter(person.Name, 30) == false)
{ | [
0.15339380502700806,
-0.4421265125274658,
0.07983621209859848,
-0.10428571701049805,
0.2656557559967041,
0.26467984914779663,
0.4563971757888794,
-0.22432678937911987,
-0.22306513786315918,
-0.44247645139694214,
-0.21095669269561768,
0.654994547367096,
-0.4650231897830963,
0.27250882983207... | |
Console.WriteLine("Failed to obtain lock on 50 year old Nancy, because Timewarp(object) locked on string \"Nancy Drew\".");
}
else Monitor.Exit(person.Name);
if (Monitor.TryEnter("Nancy Drew", 30) == false)
{
Console.WriteLine("Failed to obtain lock using 'Nancy Drew' litera... | [
-0.4928882122039795,
-0.2479572594165802,
0.40619170665740967,
-0.2190130203962326,
0.6600384712219238,
0.1218951940536499,
0.4861571490764618,
-0.01857808604836464,
0.24036464095115662,
-0.4906099736690521,
-0.4360525906085968,
0.4707832932472229,
-0.2871036231517792,
0.3967455327510834,
... | |
}
else Monitor.Exit("Nancy Drew");
if (Monitor.TryEnter(person.Name, 10000))
{
string oldName = person.Name;
person.Name = "Nancy Callahan";
Console.WriteLine("Name changed from '{0}' to '{1}'.", oldName, person.Name);
}
else Monitor.Exit(perso... | [
-0.16740189492702484,
-0.11032592505216599,
0.4258841574192047,
-0.18641796708106995,
0.550379753112793,
0.2046644240617752,
0.2351762354373932,
-0.02511911280453205,
-0.03717971220612526,
-0.6517659425735474,
-0.39745989441871643,
0.4505954384803772,
-0.33282339572906494,
0.41594865918159... | |
person is locked!
Nancy Drew is 16 years old.
'this' person is locked!
Nancy Drew is 17 years old.
Failed to obtain lock on 50 year old Nancy, because Timewarp(object) locked on string "Nancy Drew".
'this' person is locked!
Nancy Smith is 18 years old.
'this' person is locked!
Nancy Smith is 19 years old.
'this' person... | [
-0.3802033066749573,
0.2948755621910095,
0.48271819949150085,
-0.005033109802752733,
0.34436339139938354,
0.3135909140110016,
0.8234339356422424,
-0.3229868412017822,
-0.7741538286209106,
-0.3638056814670563,
-0.06411075592041016,
0.03789917379617691,
-0.22531037032604218,
0.72389745712280... | |
locked!
Nancy Smith is 24 years old.
Name changed from 'Nancy Drew' to 'Nancy Callahan'.
``` | [
0.20241516828536987,
0.24152611196041107,
0.649894118309021,
0.002099360339343548,
0.646111011505127,
0.03899151086807251,
0.3691100776195526,
-0.19133609533309937,
-0.5427643060684204,
-0.21348045766353607,
-0.07130264490842819,
0.15435342490673065,
-0.465180367231369,
0.6161240339279175,... | |
There are **two different** ways to create an empty object in JavaScript:
```
var objectA = {}
var objectB = new Object()
```
Is there any difference in how the script engine handles them? Is there any reason to use one over the other?
Similarly it is also possible to create an empty array using different syntax:
... | [
-0.03765401989221573,
0.13089115917682648,
0.21350450813770294,
-0.10899511724710464,
-0.2104434221982956,
-0.06577739864587784,
0.2346116602420807,
-0.1712849736213684,
-0.24961243569850922,
-0.7486816644668579,
-0.36836791038513184,
0.3888184428215027,
-0.3833905756473541,
0.019651325419... | |
inline - like so:
```
var myObject = {
title: 'Frog',
url: '/img/picture.jpg',
width: 300,
height: 200
};
```
Arrays
------
For arrays, there's similarly almost no benefit to ever using `new Array();` over `[];` - with one minor exception:
```
var emptyArray = new Array(1... | [
0.04671737179160118,
-0.015230344608426094,
0.5647597908973694,
0.20365388691425323,
-0.3098166882991791,
0.29513609409332275,
0.26317867636680603,
-0.13173016905784607,
-0.057665254920721054,
-0.5300498008728027,
0.13322891294956207,
0.4216424822807312,
-0.45309534668922424,
-0.0285808648... | |
'Batman!'`).
My recommendation
-----------------
1. Never use `new Object();` - it's clunkier than `{};` and looks silly.
2. Always use `[];` - except when you need to quickly create an "empty" array with a predefined length. | [
-0.014332632534205914,
-0.04620487615466118,
0.16790561378002167,
0.0033744287211447954,
-0.24279899895191193,
-0.48200181126594543,
0.6154420971870422,
-0.05311344936490059,
-0.483436644077301,
-0.4192759692668915,
-0.4905039966106415,
0.8958756327629089,
-0.22262006998062134,
-0.25311225... | |
I want to have a map that has a homogeneous key type but heterogeneous data types.
I want to be able to do something like (pseudo-code):
```
boost::map<std::string, magic_goes_here> m;
m.add<int>("a", 2);
m.add<std::string>("b", "black sheep");
int i = m.get<int>("a");
int j = m.get<int>("b"); // error!
```
I coul... | [
-0.012029530480504036,
0.08947031199932098,
0.2440592646598816,
-0.23747791349887848,
0.05042076110839844,
-0.024388525635004044,
0.4710714817047119,
-0.2929375171661377,
-0.15195736289024353,
-0.9613027572631836,
-0.2286071479320526,
0.5367383360862732,
-0.28963857889175415,
-0.0657567083... | |
m["a"] = 2;
m["b"] = static_cast<char const *>("black sheep");
int i = boost::any_cast<int>(m["a"]);
std::cout << "I(" << i << ")\n";
int j = boost::any_cast<int>(m["b"]); // throws exception
std::cout << "J(" << j << ")\n";
}
catch(...)
{
std::cout << "Ex... | [
-0.13567502796649933,
-0.09260688722133636,
0.04442284256219864,
-0.7674773335456848,
0.06856223940849304,
0.24583344161510468,
0.34544283151626587,
-0.4332106113433838,
-0.2457108199596405,
-0.19315044581890106,
-0.517084538936615,
0.48711198568344116,
-0.44946059584617615,
-0.17649824917... | |
}
}
``` | [
0.17493881285190582,
0.41805654764175415,
0.05209751054644585,
-0.04864929988980293,
0.437467485666275,
-0.15825650095939636,
0.13202530145645142,
0.5446501970291138,
0.35430577397346497,
-0.4846813380718231,
-0.2295716553926468,
0.546978771686554,
-0.3188462555408478,
0.2798506021499634,
... | |
Looking up LINQ and Or in google is proving somewhat difficult so here I am.
I want to so the following:
```
(from creditCard in AvailableCreditCards
where creditCard.BillToName.ToLowerInvariant().Contains(txtFilter.Text.ToLowerInvariant())
**or creditCard.CardNumber.().Contains(txtFilter.Text)**
orderby creditCard.... | [
0.0902373418211937,
0.19904209673404694,
0.9588202238082886,
-0.02548346109688282,
0.32642462849617004,
-0.13717778027057648,
-0.18821316957473755,
-0.36844387650489807,
-0.2692020833492279,
-0.4127133786678314,
-0.33696216344833374,
0.6688746809959412,
-0.14237482845783234,
-0.09137257933... | |
Is it possible to run the 32-bit version of Visual Studio 2008 Professional on a Windows Vista 64-bit system?
* Are there any known caveats that I would need to be aware of?
* Would have to install the x64 version of the .NET Framework?
* Would there be any issues on building software targeted for x86?
* Would there ... | [
0.29908496141433716,
0.34612372517585754,
0.31421729922294617,
0.02243504486978054,
-0.12037398666143417,
-0.3325514495372772,
0.2808215916156769,
-0.21146030724048615,
0.015539350919425488,
-0.21478614211082458,
0.21136492490768433,
1.0733894109725952,
-0.09105821698904037,
-0.13914406299... | |
I'm running the standard 32-bit version on Vista x64 Ultimate and it works fine. There really are no day-to-day issues that I've run across. You just install it and go. | [
0.33787399530410767,
0.15600095689296722,
0.2517990469932556,
-0.08807659894227982,
0.15677127242088318,
-0.38133347034454346,
0.32922273874282837,
0.5327446460723877,
0.1748683601617813,
-0.7963841557502747,
0.01137441024184227,
1.109557032585144,
-0.16777503490447998,
-0.0665204674005508... | |
I'm in the process of developing a multi-tiered financial processing application in Java using EJB3 (Hibernate + Glassfish for the app and web services layer, Lift on Glassfish for the web UI) and I'm struggling with the question of where to put my business logic.
When this project started, our first notion was to put... | [
0.2020847648382187,
0.3508317470550537,
0.125443696975708,
-0.1003246158361435,
-0.06889832019805908,
0.06848274171352386,
-0.1693534106016159,
0.020117800682783127,
-0.16303904354572296,
-0.4102898836135864,
0.01777096651494503,
0.5975666642189026,
-0.18158333003520966,
-0.038941703736782... | |
in the @PostConstruct method of the stateless session beans. This progress has led to fragmentation of our business logic between the session beans and the POJOs, and I'm trying to figure out an approach for correcting this.
Initially, we tried to have our web tier use the remote interfaces of the session beans to per... | [
0.04408642277121544,
-0.000028714246582239866,
0.09842806309461594,
0.12220251560211182,
0.1402178406715393,
-0.11108825355768204,
0.24255432188510895,
-0.03744743391871452,
-0.169809952378273,
-0.5536234974861145,
-0.07144661247730255,
0.4311387538909912,
-0.2868587374687195,
0.2596807181... | |
the detached entity graph to the persistence context turned out to be highly error-prone, so our solution was to start just passing object identifiers around and looking up the entities from the database wherever they were needed.
My basic question is this: what principles and guidelines can you suggest for deciding w... | [
0.10176889598369598,
-0.013674204237759113,
0.06240632012486458,
0.21834151446819305,
-0.3686007559299469,
-0.1661691963672638,
0.06385866552591324,
-0.12045616656541824,
-0.21440330147743225,
-0.1663694977760315,
0.24491843581199646,
0.453644722700119,
-0.2645948827266693,
-0.132798388600... | |
than holding lots of large entities in memory, I decided to only pass around their ids and never the entity itself.
Wicket and its concept of models had a lot to do with this decision. Their loadableDetachableModel cleans up entities when they are not in use, while still holding on to the id. A load() method is implem... | [
-0.224879652261734,
-0.25530269742012024,
-0.025477467104792595,
0.22816045582294464,
-0.00720443669706583,
-0.18847934901714325,
0.19925084710121155,
0.09066135436296463,
-0.4957316219806671,
-0.49535077810287476,
0.15023845434188843,
0.31777751445770264,
-0.33538883924484253,
0.287135094... | |
handles logic pertaining to display and input validation, and I only need to inject the ejb into the model classes. Perhaps you could create something similar in your app (I've got no idea what lift has to offer...).
This has worked out nicely for me, but I don't have particularly complex business logic and can isolat... | [
0.2644706070423126,
0.20548436045646667,
0.5421251058578491,
0.2012353241443634,
-0.28566452860832214,
0.10126941651105881,
0.028280291706323624,
-0.2772047221660614,
-0.2916439473628998,
-0.33773207664489746,
0.1356327086687088,
0.23142601549625397,
0.20487135648727417,
-0.090907767415046... | |
I need to echo a string containing angle brackets (< and >) to a file on a Windows machine. Basically what I want to do is the following:
`echo some string < with angle > brackets >>myfile.txt`
This doesn't work since the command interpreter gets confused with the angle brackets. I could quote the whole string like... | [
0.43844497203826904,
0.1639375239610672,
0.22637812793254852,
-0.2934243679046631,
-0.1511048525571823,
-0.05972276255488396,
0.40860846638679504,
-0.6608128547668457,
-0.0511791966855526,
-0.3382142186164856,
0.23299209773540497,
0.7311797738075256,
-0.578457236289978,
0.13470959663391113... | |
character is ^, for some reason.
```
echo some string ^< with angle ^> brackets >>myfile.txt
``` | [
-0.010087723843753338,
0.13810716569423676,
0.33925092220306396,
-0.14062067866325378,
0.08332061767578125,
0.5003430843353271,
-0.17299361526966095,
0.20535503327846527,
0.024354303255677223,
-0.717202365398407,
-0.07408256828784943,
0.24583221971988678,
-0.12489265203475952,
-0.272791653... | |
I have a bunch of \*.TBC files from a very old application that runs in MS-DOS called TURBOLAB. Anyone know which DB System use files with a TBC extension.
I've tried renaming the files to \*.dbf to check if they are dBase files with no luck.
Any idea?
Judging by the application and era (old MS-DOS) \*.tbc is probab... | [
0.8819270730018616,
0.11556078493595123,
-0.16425928473472595,
0.1924620121717453,
-0.1422356218099594,
-0.16937433183193207,
0.2155870944261551,
0.3131391108036041,
-0.029109548777341843,
-0.6017672419548035,
0.35236766934394836,
0.4695107638835907,
-0.5258062481880188,
0.4338015019893646... | |
to your needs. If you cannot you may need to determine field lengths and data types through trial and error.
Also, are there associated files for each \*.tbc? A paired file could indicate field lengths and data types (or that information could be stored at the top of a \*.tbc file itself). | [
0.654472827911377,
-0.08584404736757278,
-0.1648341864347458,
0.2669713795185089,
0.19482438266277313,
0.024008171632885933,
-0.21420706808567047,
-0.18858852982521057,
-0.13352355360984802,
-0.37737080454826355,
-0.00885110255330801,
0.46916237473487854,
-0.4128013253211975,
-0.0302915889... | |
ExtJS has Ext.each() function, but is there a map() also hidden somewhere?
I have tried hard, but haven't found anything that could fill this role. It seems to be something simple and trivial, that a JS library so large as Ext clearly must have.
Or when Ext really doesn't include it, what would be the best way to add... | [
0.04884231090545654,
-0.040728554129600525,
0.33331355452537537,
-0.26702046394348145,
-0.13783086836338043,
-0.10848257690668106,
0.34719881415367126,
-0.024087820202112198,
-0.049902863800525665,
-0.7670981287956238,
-0.22214201092720032,
0.47840195894241333,
-0.5442204475402832,
-0.3103... | |
2, 3].map( function(){ ... } );
```
Problem solved. | [
-0.7339078187942505,
-0.03395789861679077,
0.6875481009483337,
-0.25312110781669617,
0.06240054965019226,
0.13456128537654877,
0.16597211360931396,
-0.5619960427284241,
-0.23212431371212006,
-0.7349965572357178,
-0.5437110066413879,
0.7640319466590881,
-0.5971882939338684,
-0.1016053631901... | |
I have created a json object from ruby with cobravsmongoose, however the attributes have the **`@`** symbol in front of them. Whenever I try to access them with standard object notation in JavaScript, such as `object.object.object.@attribute` I get a *parse error*. Is there another way to access these objects?
I would ... | [
0.3891648054122925,
0.24557845294475555,
-0.06318823993206024,
-0.386142373085022,
-0.2989722192287445,
0.30285555124282837,
0.6063880324363708,
-0.06500428915023804,
-0.21269051730632782,
-0.42951369285583496,
0.22709807753562927,
0.45916947722435,
-0.2831157147884369,
0.25172972679138184... | |
time would be spent in delays between successive jobs.
Without creating any new objects, you can use the [DBMS\_ALERT](http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_alert.htm#CHDCFHCI) package to allow your DBA to send an alert that pauses the job. Your code could call the `DBMS_ALERT.WAITONE` metho... | [
0.3140321671962738,
-0.027609258890151978,
0.5187777876853943,
-0.37368085980415344,
0.07275845855474472,
0.2483772188425064,
0.29799947142601013,
0.04346431419253349,
-0.7582449913024902,
-0.11465757340192795,
-0.33848491311073303,
0.3404160141944885,
-0.2760984003543854,
0.29492604732513... | |
alert (i.e. the message could be a number of seconds to pause or a date to pause until, etc.)
Of course, you could do the same thing by creating a new table, having the DBA write a row to the table to pause the job, and reading from the table every N rows. | [
0.20200608670711517,
-0.29040324687957764,
0.3595859408378601,
-0.13721825182437897,
-0.11967522650957108,
-0.11416298896074295,
0.04821261391043663,
-0.006148924119770527,
-0.39668917655944824,
-0.4373398423194885,
-0.06939388066530228,
0.29276713728904724,
-0.351393461227417,
-0.14520260... | |
Does anybody knows how can I get the max and min value of the 2nd and 3rd columns in PHP?
```
$ar = array(array(1, 10, 9.0, 'HELLO'),
array(1, 11, 12.9, 'HELLO'),
array(3, 12, 10.9, 'HELLO'));
```
Output should be like:
max(12.9)
min(10)
```
<?php
$ar = array(array(1, 10, 9.0... | [
-0.13122613728046417,
0.4669818580150604,
0.6255205869674683,
-0.23654302954673767,
-0.2529599666595459,
0.6295797228813171,
0.41442182660102844,
-0.3130638599395752,
0.12183435261249542,
-0.026805736124515533,
0.23240943253040314,
0.5413936972618103,
-0.13286292552947998,
-0.0478619374334... | |
array(3, 12, 10.9, 'HELLO'));
function col($tbl,$col){
$ret = array();
foreach ($tbl as $row){
$ret[count($ret)+1] = $row[$col];
}
return $ret;
}
print (max(col($ar,2))."\n");
print (min(col($ar,1))."\n");
?>
```
is this what you look for? I guess its not the most efficient way. | [
-0.2964092493057251,
-0.10094659775495529,
0.6536918878555298,
-0.6019399166107178,
0.06836879253387451,
0.46338728070259094,
0.39683058857917786,
-0.32358577847480774,
-0.2166804075241089,
-0.3690263628959656,
-0.42307034134864807,
0.6667703986167908,
-0.5987009406089783,
0.10283816605806... | |
I have Perl code which relies on `Term::ReadKey` to get the terminal width. My installation is missing this module, so I want to provide a default if the module isn't present rather than throw an exception.
How can I conditionally use an optional module, without knowing ahead of time whether it is available.
```
# bu... | [
0.06648259609937668,
-0.018043097108602524,
0.5913853049278259,
-0.18428689241409302,
-0.007319606840610504,
-0.15327854454517365,
0.3604505658149719,
-0.36699026823043823,
-0.2719976007938385,
-0.26233696937561035,
-0.17808012664318085,
0.7703266143798828,
-0.3946652114391327,
0.017447942... | |
hope they're below this one! :-) that use `eval { use SomeModule }` are wrong because `use` statements are evaluated at compile time, regardless of where in the code they appear. So if `SomeModule` is not available, the script will die immediately upon compiling.
(A string eval of a `use` statement will also work (`ev... | [
0.3447342813014984,
0.3096371293067932,
0.17625544965267181,
-0.24421219527721405,
0.3988659083843231,
0.03761891648173332,
0.684520959854126,
-0.07679332047700882,
0.05993160605430603,
-0.7546037435531616,
-0.16739876568317413,
0.6313205361366272,
-0.09879601746797562,
0.04055145755410194... | |
of this example. In real code, you should use something like [Try::Tiny](http://search.cpan.org/dist/Try-Tiny/), or at least [be aware of the issues it addresses](http://search.cpan.org/dist/Try-Tiny/lib/Try/Tiny.pm#BACKGROUND). | [
0.16138505935668945,
-0.00014088736497797072,
-0.02138413116335869,
0.309219092130661,
0.5064330101013184,
-0.22091872990131378,
0.0812414363026619,
0.18428117036819458,
-0.5642027258872986,
-0.4787110388278961,
-0.41794052720069885,
0.3698503375053406,
-0.37598228454589844,
-0.43448242545... | |
I've set hibernate.generate\_statistics=true and now need to register the mbeans so I can see the statistics in the jmx console. I can't seem to get anywhere and this doesn't seem like it should be such a difficult problem. Maybe I'm making things overcomplicated, but in any case so far I've tried:
* I copied EhCacheP... | [
0.23156876862049103,
-0.23155148327350616,
0.2730598747730255,
-0.23352603614330292,
-0.15717539191246033,
-0.1366775631904602,
0.706507682800293,
-0.25140413641929626,
0.0938008651137352,
-0.8432714343070984,
0.2224433869123459,
0.6411085724830627,
-0.3600473701953888,
0.03668810799717903... | |
This approach was motivated by the methods used in [this liferay performance walkthrough.](http://www.kanonbra.com/index.php/projects/performance-testing/18-using-visualvm-on-liferay)
* I created my own MBean with a start method that ran similar code to [this example of registering ehcache's jmx mbeans](http://weblogs.... | [
0.3403322100639343,
-0.36033979058265686,
0.33700013160705566,
-0.30297142267227173,
-0.22587452828884125,
0.11473064124584198,
0.3626786768436432,
-0.2324308604001999,
-0.12003834545612335,
-0.5988584160804749,
0.4082724452018738,
0.6403120160102844,
-0.3412070572376251,
-0.24202628433704... | |
gone any better though; if I call getInstance() the CacheManager that's returned only has a copy of StandardQueryCache, but jboss logs show that many other caches have been initialized (one for each of the cached entities in our application.)
EDIT: Well I have figured out one thing...connecting via JConsole does revea... | [
0.1251811534166336,
-0.1358606368303299,
0.14390169084072113,
0.22625437378883362,
-0.1292182356119156,
-0.04047132283449173,
0.5964065194129944,
0.22814151644706726,
-0.6058711409568787,
-0.5588865280151367,
0.21335813403129578,
0.3654734492301941,
-0.14425194263458252,
0.1736152917146682... | |
was not seeing all the caches for my entities I suspected I was not getting the right SessionFactory instance. I started out with this line (see the example jmx registration code in the link I provided in the question):
```
SessionFactory sf = (new Configuration()).configure().buildSessionFactory();
```
The end resu... | [
0.02017606608569622,
0.3338594138622284,
0.3833714723587036,
-0.2402724325656891,
0.08781448751688004,
0.018323523923754692,
0.5243188142776489,
-0.24789462983608246,
-0.31868433952331543,
-0.6433809399604797,
0.04760189726948738,
0.6718191504478455,
-0.38938772678375244,
0.237341776490211... | |
options, I added a stateless bean (UtilMgr) to my application and let persistence inject the correct SessionFactory. Here's that bean:
```
import javax.ejb.Stateless;
import javax.persistence.PersistenceUnit;
import net.sf.ehcache.CacheManager;
import org.hibernate.SessionFactory;
@Stateless
public class UtilMgrBean ... | [
-0.12919117510318756,
0.16028578579425812,
0.3794797956943512,
-0.25267088413238525,
0.15511663258075714,
0.23516450822353363,
0.6115684509277344,
-0.22408005595207214,
-0.20590242743492126,
-0.840977132320404,
-0.10639645904302597,
0.7162340879440308,
-0.42992621660232544,
0.2631508708000... | |
mentioned walkthrough:
```
try {
// NOTE: lookupBean is a utility method in our app we use for jndi lookups.
// replace as necessary for your application.
UtilMgr utilMgr = (UtilMgr)Manager.lookupBean("UtilMgrBean", UtilMgr.class);
SessionFactory sf = utilMgr.getSessionFactory();
MBeanServer mbs ... | [
-0.04802003502845764,
0.061701010912656784,
0.8573997616767883,
-0.15149664878845215,
-0.03256739675998688,
-0.00874296110123396,
0.6146249175071716,
-0.3316241204738617,
-0.2613102197647095,
-0.7227336168289185,
-0.1280614584684372,
0.3119939863681793,
-0.38470590114593506,
0.000401298777... | |
on);
CacheManager cacheMgr = utilMgr.getCacheManager();
ManagementService.registerMBeans(cacheMgr, mbs, true, true, true, true);
} catch(Throwable t) {
throw new RuntimeException(t);
}
```
You can also use this getCacheManager() method of UtilMgr if you want to retrieve statistics manually (which is what... | [
0.2851587235927582,
0.01303334254771471,
0.2851179540157318,
0.125339537858963,
-0.06799497455358505,
-0.11219435930252075,
0.348926305770874,
-0.08192452788352966,
-0.3249359428882599,
-0.8035639524459839,
0.03467550128698349,
0.7206445336341858,
-0.24800081551074982,
0.16266581416130066,... | |
We've had an ongoing need here that I can't figure out how to address using the stock Maven 2 tools and documentation.
Some of our developers have some very long running JUnit tests (usually stress tests) that under no circumstances should be run as a regular part of the build process / nightly build.
Of course we ca... | [
0.6194239258766174,
0.1650627702474594,
-0.12328138947486877,
-0.02060043066740036,
0.19582325220108032,
-0.407551646232605,
0.22794267535209656,
-0.10722116380929947,
0.1285191923379898,
-0.30928778648376465,
-0.15938624739646912,
0.7717807292938232,
-0.15856927633285522,
-0.1804881989955... | |
set of tests:
run this with mvn -Pintegrationtest install
```
<profile>
<id>integrationtest</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> | [
0.07046026736497879,
0.061513036489486694,
0.21491330862045288,
-0.0357745923101902,
0.12044993788003922,
-0.2266077995300293,
0.43607309460639954,
-0.8222977519035339,
0.2654474675655365,
-0.7455304265022278,
0.03679906204342842,
0.5514736771583557,
-0.2204180210828781,
-0.188604786992073... | |
<configuration>
<argLine>-client -Xmx896m -XX:MaxPermSize=192m</argLine>
<forkMode>once</forkMode>
<includes> | [
-0.1814650148153305,
-0.2085716277360916,
0.37935417890548706,
-0.010110879316926003,
-0.17039945721626282,
0.2510014772415161,
-0.1273486316204071,
-0.23799555003643036,
-0.08925668150186539,
-0.44202885031700134,
0.00815689004957676,
0.7039675116539001,
-0.2776491641998291,
0.11543254554... | |
<include>**/**/*Test.java</include>
<include>**/**/*IntTest.java</include>
</includes>
<excludes> | [
0.5039425492286682,
0.12846696376800537,
-1.0059573650360107,
0.0008442744147032499,
-0.26341402530670166,
-0.09977064281702042,
0.3178904950618744,
-0.5615809559822083,
-0.17286548018455505,
-0.6312823295593262,
-0.1448279321193695,
0.06904294341802597,
-0.5879288911819458,
-0.08341625332... | |
<exclude>**/**/*SeleniumTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins> | [
0.18489782512187958,
-0.15421679615974426,
-0.5345447659492493,
-0.006308540236204863,
-0.1266929805278778,
-0.1567210853099823,
0.24742993712425232,
-0.22836926579475403,
0.2549678087234497,
-0.8589479923248291,
-0.2522052824497223,
-0.14743123948574066,
-0.38802337646484375,
0.0111610526... | |
</build>
<activation>
<property>
<name>integrationtest</name>
</property>
</activation>
</profile>
``` | [
0.045738425105810165,
0.09159783273935318,
-0.032173752784729004,
-0.046812985092401505,
0.12524491548538208,
-0.1324034482240677,
0.21083183586597443,
-0.2214238941669464,
0.19275394082069397,
-1.0458050966262817,
-0.307658314704895,
0.25120073556900024,
-0.22178220748901367,
0.1742134690... | |
I'm writing an application that uses renaming rules to rename a list of files based on information given by the user. The files may be inconsistently named to begin with, or the filenames may be consistent. The user selects a list of files, and inputs information about the files (for MP3s, they would be Artist, Title, ... | [
0.4311395287513733,
0.23626139760017395,
0.07694477587938309,
0.19605593383312225,
0.22706061601638794,
-0.09163618087768555,
0.03035854734480381,
-0.06366588175296783,
-0.23396508395671844,
-0.574373185634613,
-0.2520061135292053,
0.42421093583106995,
-0.16614623367786407,
0.5481045842170... | |
I'm having. What is the best way to do this?
Sample filenames:
```
Kraftwerk-Kraftwerk-01-RuckZuck.mp3
Kraftwerk-Autobahn-01-Autobahn.mp3
Kraftwerk-Computer World-03-Numbers.mp3
```
Rename Rule:
```
%Artist%-%Album%-%Track%-%Title%.mp3
```
The program should properly deduce the Artist, Track number, Title, and A... | [
0.09525494277477264,
0.20740164816379547,
0.43022286891937256,
-0.167852982878685,
-0.06579697877168655,
0.1475265622138977,
0.03618156537413597,
-0.5782703161239624,
-0.35555291175842285,
-0.4100986123085022,
-0.2491777092218399,
0.7261355519294739,
-0.2058943510055542,
0.2150418609380722... | |
Dictionary<string,string> tokens =
new Dictionary<string,string>();
for (int counter = 1; counter < match.Groups.Count; counter++)
{
string group_name = filename_re.GroupNameFromNumber(counter);
tokens.Add(group_name, m.Groups[counter].Value);
}
return tokens;
}
```
But if ... | [
0.26495543122291565,
-0.023290980607271194,
0.2849867045879364,
-0.22764462232589722,
-0.07652585953474045,
0.1890854388475418,
0.20433904230594635,
-0.4017411172389984,
-0.3114968538284302,
-0.48254311084747314,
-0.20985622704029083,
0.3599880337715149,
-0.32500529289245605,
0.27110967040... | |
The pattern wouldn't know where to split.
This could be solved if you know the format of certain fields, such as the track-number. If you translate `%Track%` to `(?<Track>\d+)` instead, the pattern would know that any digits in the filename must be the `Track`. | [
0.24957752227783203,
-0.18107128143310547,
-0.19935762882232666,
0.04935340955853462,
0.17839661240577698,
-0.03517087921500206,
-0.02835897170007229,
-0.12490067631006241,
-0.024222122505307198,
-0.34952181577682495,
-0.04411876201629639,
0.30152738094329834,
-0.3603629767894745,
0.137102... | |
I am developing a website using SQL Server Express on my development machine. My web hosting company is providing me with SQL Server 2005.
At the moment all I have is a database that I develop with and a database that is on the live server. I do not have the original scripts to generate the schema but I can auto gener... | [
0.3515070378780365,
0.36017709970474243,
0.13079114258289337,
-0.17806421220302582,
-0.15083853900432587,
0.09321470558643341,
0.26061636209487915,
-0.03973148763179779,
0.150436669588089,
-0.8512707352638245,
0.40860700607299805,
0.5433462858200073,
-0.27736228704452515,
0.076494313776493... | |
database is very small at the moment and it is not hard to maintain the two databases, but I am concerned that going forward but it will get out of hand. Do you have any tips for getting the live database in sync when deploying new code?
**EDIT** Any ideas as to what should go into source control? Should the DDL scrip... | [
0.6795721054077148,
-0.11412806808948517,
0.2675277292728424,
0.28764331340789795,
0.21719516813755035,
-0.27515333890914917,
0.07915081083774567,
0.07466572523117065,
-0.20344184339046478,
-0.8731177449226379,
0.10191962122917175,
0.8224050998687744,
-0.10552805662155151,
-0.0674502179026... | |
source control, including DDL scripts. | [
-0.1758900284767151,
-0.13347524404525757,
-0.007366975769400597,
0.2226550579071045,
-0.17713315784931183,
-0.10348201543092728,
-0.16521665453910828,
0.21346671879291534,
-0.1958252191543579,
-0.6921068429946899,
-0.638152003288269,
0.6769925951957703,
-0.0336480550467968,
0.237554743885... | |
I have a interface that defines some methods with attributes. These attributes need to be accessed from the calling method, but the method I have does not pull the attributes from the interface. What am I missing?
```
public class SomeClass: ISomeInterface
{
MyAttribute GetAttribute()
{
StackTrace stac... | [
-0.00653472263365984,
0.05211443081498146,
0.40114647150039673,
-0.18671666085720062,
0.06267179548740387,
-0.280380517244339,
0.26623985171318054,
-0.3815358877182007,
0.034724049270153046,
-0.5490323901176453,
-0.07175504416227341,
0.5731525421142578,
-0.2364460825920105,
0.2435494363307... | |
if (attributes.Count() == 0)
throw new Exception("could not find MyAttribute defined for " + methodBase.Name);
return attributes[0] as MyAttribute;
}
void DoSomething()
{
MyAttribute ma = GetAttribute();
string s = ma.SomeProperty;
}
}
```
The methodBase will be the... | [
0.104635089635849,
-0.17567068338394165,
0.427584707736969,
-0.28788357973098755,
0.2249765545129776,
-0.06659892201423645,
0.43738189339637756,
-0.5122601985931396,
-0.012660238891839981,
-0.44015955924987793,
-0.20737898349761963,
0.6882673501968384,
-0.26260513067245483,
0.2622605860233... | |
interface. In C# this is a little simpler (since it must be like-named), but you would need to consider things like explicit implementation. If you have VB code it will be trickier, since VB method "Foo" can implement an interface method "Bar". To do this, you would need to investigate the interface map:
```
using Sys... | [
0.019176863133907318,
-0.06660755723714828,
0.642652153968811,
-0.17709308862686157,
-0.26548516750335693,
0.1781841665506363,
0.12299542874097824,
-0.3564225137233734,
-0.0278841033577919,
-0.6246804594993591,
0.1863260120153427,
0.7280440926551819,
-0.8649916648864746,
0.0703090876340866... | |
void Main()
{
IFoo foo = new Foo();
foo.Bar();
}
void IFoo.Bar()
{
GetAttribute();
}
void GetAttribute()
{ // simplified just to obtain the [Description]
StackTrace stackTrace = new StackTrace();
StackFrame stackFrame = stackTrace.GetFrame(1);
... | [
0.1634976863861084,
-0.022729896008968353,
0.5627788305282593,
-0.4224126636981964,
0.277848482131958,
-0.028536921367049217,
0.4088129699230194,
-0.35854625701904297,
-0.07873991131782532,
-0.3909648060798645,
-0.25879722833633423,
0.4337158501148224,
-0.4654160439968109,
0.28926345705986... | |
stackFrame.GetMethod();
InterfaceMapping map = GetType().GetInterfaceMap(typeof(IFoo));
int index = Array.IndexOf(map.TargetMethods, classMethod);
MethodBase iMethod = map.InterfaceMethods[index];
string desc = ((DescriptionAttribute)Attribute.GetCustomAttribute(iMethod, typeof(Descripti... | [
-0.1537037342786789,
-0.16466553509235382,
0.523069441318512,
-0.058213505893945694,
0.16346143186092377,
0.05865718051791191,
0.4097912907600403,
-0.6732198596000671,
-0.23264069855213165,
-0.7068929076194763,
-0.13172169029712677,
0.7093203067779541,
-0.39870479702949524,
0.0632032155990... | |
I'm using Asp.Net 2.0. I have a scenario where i need to check a user input against any of two ranges. For e.g. I need to check a textbox value against ranges 100-200 or 500-600. I know that i can hook up 2 Asp.Net RangeValidators to the TextBox, but that will try to validate the input against both the ranges, an AND c... | [
0.35063469409942627,
-0.25895702838897705,
0.4324113428592682,
0.061141178011894226,
-0.0726265162229538,
0.002314165700227022,
0.447910338640213,
-0.4958292245864868,
-0.1944803148508072,
-0.840044379234314,
0.15323124825954437,
0.7864125967025757,
-0.26026299595832825,
-0.123589120805263... | |
for me is that range can vary. And also the different controls in the page will have different ranges based on some condition. I know i can hold these values in some js variable or hidden input element, but it won't look very elegant.
I extended the BaseValidator to achieve this. Its fairly simple once you understand h... | [
0.3624115586280823,
0.08857529610395432,
0.40467292070388794,
-0.2555054724216461,
0.0035845250822603703,
0.06775396317243576,
0.2177736759185791,
-0.45983514189720154,
0.027957376092672348,
-0.5716515183448792,
0.15049096941947937,
0.9709511399269104,
-0.3562620282173157,
-0.1422396153211... | |
protected override void AddAttributesToRender(System.Web.UI.HtmlTextWriter writer)
{
base.AddAttributesToRender(writer);
if (base.RenderUplevel)
{
string clientId = this.ClientID;
// The attribute evaluation funciton holds the name of client-side js function.
... | [
-0.07997117191553116,
-0.09486839920282364,
0.4311426877975464,
-0.2695530951023102,
0.14915484189987183,
0.08823632448911667,
0.5101948380470276,
-0.5419425368309021,
0.21004998683929443,
-0.25433021783828735,
-0.3191632926464081,
0.7338945269584656,
-0.3553243577480316,
0.055289231240749... | |
Page.ClientScript.RegisterExpandoAttribute(clientId, "Range1High", this.Range1High.ToString());
Page.ClientScript.RegisterExpandoAttribute(clientId, "Range2High", this.Range2High.ToString());
Page.ClientScript.RegisterExpandoAttribute(clientId, "Range1Low", this.Range1Low.ToString());
... | [
-0.35626229643821716,
0.014364667236804962,
0.8045259118080139,
-0.46676215529441833,
0.15374545753002167,
0.1369636356830597,
0.5635281801223755,
-0.5966416597366333,
0.01819450780749321,
-0.45943039655685425,
-0.658270537853241,
0.5993531942367554,
-0.4783363938331604,
-0.030555719509720... | |
(this.Range2Low <= 0))
throw new HttpException("The range values cannot be less than zero");
return base.ControlPropertiesValid();
}
// used to validation on server-side
protected override bool EvaluateIsValid()
{
int code;
if (!Int32.TryParse(base.GetControlValidat... | [
0.19260671734809875,
-0.3280520439147949,
0.5810578465461731,
-0.22549675405025482,
0.27874043583869934,
-0.0463704876601696,
0.8640428185462952,
-0.6167234182357788,
0.2409508228302002,
-0.3417252004146576,
-0.34273359179496765,
0.5076912045478821,
-0.26793596148490906,
0.0683271810412406... | |
this.Range1High && code > this.Range1Low) || (code < this.Range2High && code > this.Range2Low))
return true;
else
return false;
}
// inject the client-side script to page
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
if (b... | [
-0.3192734718322754,
-0.2862812578678131,
0.7877472043037415,
-0.47811269760131836,
0.31205517053604126,
0.09570667147636414,
0.7881513237953186,
-0.43949824571609497,
0.2998734414577484,
-0.6540520787239075,
-0.6075553894042969,
0.7664580941200256,
-0.2788941264152527,
0.01552615780383348... | |
{
this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "RangeValidatorEx", RangeValidatorExJs(),true);
}
}
string RangeValidatorExJs()
{
string js;
// the validator will be rendered as a SPAN tag on the client-side and it will passed to the validation f... | [
0.19439569115638733,
-0.03849800303578377,
1.0051764249801636,
-0.3963187634944916,
0.05978412926197052,
0.18413977324962616,
0.34631508588790894,
-0.7940067052841187,
-0.0197755079716444,
-0.45254409313201904,
-0.4684354066848755,
0.6639207005500793,
-0.3209732472896576,
-0.13324850797653... | |
+ " var code=document.getElementById(val.controltovalidate).value; "
+ " if ((code < rangeValidatorCtrl.Range1High && code > rangeValidatorCtrl.Range1Low ) || (code < rangeValidatorCtrl.Range2High && code > rangeValidatorCtrl.Range2Low)) return true; else return false;}";
return js;
}
public in... | [
-0.1975007951259613,
-0.059674181044101715,
0.8804115056991577,
-0.5669151544570923,
0.22098830342292786,
0.19414745271205902,
0.6347952485084534,
-0.6881104111671448,
0.0022315948735922575,
-0.35053348541259766,
-0.591844916343689,
0.6022387146949768,
-0.34600090980529785,
0.0080746849998... | |
!= null)
return System.Convert.ToInt32(obj2);
return 0;
}
set { this.ViewState["Range1Low"] = value; }
}
public int Range1High
{
get
{
object obj2 = this.ViewState["Range1High"]; | [
-0.33208590745925903,
-0.2793274223804474,
0.6101179718971252,
-0.5082163214683533,
0.0810631737112999,
0.19147102534770966,
0.7389031052589417,
-0.3252120316028595,
0.008844156749546528,
-0.5133922100067139,
-0.4372251331806183,
0.6790326833724976,
-0.47758638858795166,
0.0496036931872367... | |
if (obj2 != null)
return System.Convert.ToInt32(obj2);
return 0;
}
set { this.ViewState["Range1High"] = value; }
}
public int Range2Low
{
get
{ | [
-0.12335189431905746,
-0.49151745438575745,
0.6091119050979614,
-0.45320454239845276,
0.1888810098171234,
0.16618484258651733,
0.5536355376243591,
-0.27198174595832825,
0.038925766944885254,
-0.5413579344749451,
-0.27512118220329285,
0.8049622178077698,
-0.34514331817626953,
-0.03920060023... | |
object obj2 = this.ViewState["Range2Low"];
if (obj2 != null)
return System.Convert.ToInt32(obj2);
return 0;
}
set { this.ViewState["Range2Low"] = value; }
}
public int Range2High
{
get | [
-0.3044429421424866,
-0.2977193295955658,
0.6705409288406372,
-0.48959431052207947,
0.08034367114305496,
0.1895071268081665,
0.5664212107658386,
-0.28727251291275024,
-0.02345198206603527,
-0.4826326072216034,
-0.29684799909591675,
0.7543807625770569,
-0.42727455496788025,
0.07277132570743... | |
{
object obj2 = this.ViewState["Range2High"];
if (obj2 != null)
return System.Convert.ToInt32(obj2);
return 0;
}
set { this.ViewState["Range2High"] = value; }
}
}
``` | [
-0.4168684184551239,
-0.11436846107244492,
0.572742223739624,
-0.4526371955871582,
0.09592067450284958,
0.1606016457080841,
0.5153603553771973,
-0.23082268238067627,
-0.055043384432792664,
-0.5210455060005188,
-0.31895747780799866,
0.7347674369812012,
-0.5050477981567383,
0.218324229121208... | |
> **Possible Duplicate:**
>
> [Watermarked Textbox for Compact Framework](https://stackoverflow.com/questions/174796/watermarked-textbox-for-compact-framework)
Using Visual Studio 2008 SP1, the latest Compact framework and Windows Mobile 5.
I need to use DrawString to put a string over a TextBox. But as soon as I ... | [
-0.11019743978977203,
0.21814385056495667,
0.37696489691734314,
-0.057981766760349274,
-0.17907464504241943,
0.0633256658911705,
0.3017747104167938,
-0.25367212295532227,
-0.4051264524459839,
-0.7150310277938843,
0.18234243988990784,
0.3718324899673462,
-0.15061229467391968,
-0.15541815757... | |
have looked into subclassing TextBox and just having it paint my text. However, Paint events for the TextBox class are not catchable in the CompactFramework. If you know a way to be able to paint on the TextBox without the Paint events then I would love to subclass the TextBox class.
--End of Question--
Just in case ... | [
0.5177266001701355,
0.10870316624641418,
-0.09477266669273376,
-0.105048768222332,
-0.18151237070560455,
-0.1072181835770607,
0.21270805597305298,
-0.1393696814775467,
-0.19122551381587982,
-0.6243234276771545,
0.536596953868866,
0.4778122901916504,
-0.027261313050985336,
-0.06204085424542... | |
again. I would like to have a slightly grayed out text appear over the text box telling the user to re-enter.
I have tried using a label, a hyperlink label and another text box, but they obscure the text below (which has a default value that has to be partially visible).
If anyone knows a different way cue for re-ent... | [
0.198062926530838,
0.04200749844312668,
0.3802909851074219,
0.18281026184558868,
-0.020807094871997833,
-0.16035707294940948,
0.37985000014305115,
-0.047235626727342606,
-0.2717893123626709,
-0.5527251958847046,
0.0435490608215332,
0.7005835771560669,
-0.028538798913359642,
-0.147450402379... | |
like this:
```
gci
| ?{ !$_.PSIsContainer -and !$_.Name.EndsWith(".xyz") }
| %{ ren -new ($_.Name + ".txt") }
``` | [
0.12315715104341507,
-0.05374763533473015,
0.44778695702552795,
-0.12926454842090607,
0.4171985983848572,
0.03677565976977348,
-0.20095482468605042,
0.17416498064994812,
-0.10202321410179138,
-0.6092117428779602,
-0.3739808201789856,
0.5975039005279541,
-0.5362266302108765,
0.2812383770942... | |
I would like to search through all of my procedures packages and functions for a certain phrase.
Since it is possible to retrieve the code for compiled procedures using toad I assume that the full text is stored in some data dictionary table. Does anyone know where that would be?
Thanks a lot
You can do something lik... | [
0.3245341181755066,
0.30641084909439087,
0.09202100336551666,
0.0850745439529419,
-0.023062529042363167,
0.0797118991613388,
0.6188149452209473,
0.10711730271577835,
-0.12587741017341614,
-0.47781628370285034,
0.01622292585670948,
0.5434972643852234,
-0.15285484492778778,
-0.07597284018993... | |
I have a long running insert transaction that inserts data into several related tables.
When this insert is running, I cannot perform a select \* from MainTable. The select just spins its wheels until the insert is done.
I will be performing several of these inserts at the same/overlapping time. To check that the i... | [
0.1366674304008484,
0.054180823266506195,
0.28762951493263245,
-0.0021557610016316175,
0.1675117462873459,
-0.004597592167556286,
-0.34170448780059814,
-0.12733447551727295,
-0.2607526183128357,
-0.4395953416824341,
0.2981415390968323,
0.5364550948143005,
-0.08922421187162399,
0.4468843638... | |
table and also be able to tell if the specific row is currently being updated.
Any ideas on how to set this up in Microsoft SQL 2005? I am looking through the [SET TRANSACTION ISOLATION LEVEL](http://msdn.microsoft.com/en-us/library/ms173763.aspx) documentation.
Thank you,
Keith
**EDIT:** I do not think that the ... | [
0.21386751532554626,
0.3577934503555298,
0.2417459636926651,
-0.09105029702186584,
0.10446271300315857,
-0.17173448204994202,
-0.07164590805768967,
0.03004290722310543,
-0.5134401321411133,
-0.48534709215164185,
0.1771182417869568,
0.3512044847011566,
-0.2869146168231964,
-0.10951380431652... | |
a quick insert into the MainTable with the processed bit set false.
Is there a way to lock the row being updated instead of the entire table?
You may want to rethink your process before you use READ UNCOMMITTED. There are many good reasons for isolated transactions. If you use READ UNCOMMITTED you may still get dupli... | [
0.3142302930355072,
-0.07819437235593796,
-0.23865388333797455,
0.39210349321365356,
-0.06717934459447861,
-0.1070239245891571,
0.11762424558401108,
-0.09503648430109024,
-0.592171847820282,
-0.6081904172897339,
0.26930472254753113,
0.5219060182571411,
-0.509062647819519,
0.201740726828575... | |
will free up that table quicker but you still may get conflicts with the other tables.
ie
```
BEGIN TRANSACTION
SELECT @ProcessedBit = ProcessedBit FROM MainTable WHERE ID = XXX
IF @ProcessedBit = False
UPDATE MainTable SET ProcessedBit = True WHERE ID = XXX
COMMIT TRANSACTION
IF @ProcessedBit = False
BEGIN... | [
-0.12001471221446991,
-0.10875554382801056,
0.4440549612045288,
0.15358895063400269,
0.06811566650867462,
-0.050267044454813004,
-0.07509984821081161,
-0.32810279726982117,
-0.45991113781929016,
-0.4976179003715515,
-0.05741363391280174,
0.41612038016319275,
-0.3864443302154541,
0.04538429... | |
= XXX
COMMIT TRANSACTION
IF @ProcessedStatus = 'Not Processed'
BEGIN
BEGIN TRANSACTION
-- start long running process
...
IF No Errors
BEGIN
UPDATE MainTable SET ProcessedStatus = 'Processed' WHERE ID = XXX
COMMIT TRANSACTION
ELSE
ROLLBACK TRANSACTION
END
``` | [
0.014265037141740322,
-0.0830911323428154,
0.4118100106716156,
0.04987357556819916,
0.11956249922513962,
-0.03583022579550743,
-0.028911542147397995,
-0.11107134819030762,
-0.3458137512207031,
-0.45069628953933716,
-0.29667019844055176,
0.3255313038825989,
-0.29649606347084045,
0.258609563... | |
I am binding the dropdown with db entity.
```
ddlCustomer.DataSource = Customer.GetAll();
ddlCustomer.DataTextField = "CustomerName";
ddlCustomer.DataBind();
```
I want to add "SELECT" as the first itemlist in dropdown and bind then entity to the dropdown. How can i do this?
Add:
```
ddlCustomer.Items.Insert(0, "... | [
-0.031875014305114746,
-0.18196062743663788,
0.7703590989112854,
-0.2724981904029846,
0.0892973318696022,
-0.1264960765838623,
0.05966860055923462,
-0.4606069028377533,
0.017491180449724197,
-0.49709585309028625,
-0.5024242401123047,
0.6113081574440002,
-0.327638179063797,
0.41662049293518... | |
Imagine I have a property defined in global.asax.
```
public List<string> Roles
{
get
{
...
}
set
{
...
}
}
```
I want to use the value in another page. how to I refer to it?
You can access the class like this:
```
((Global)this.Context.ApplicationInstance).Roles
``` | [
-0.16238214075565338,
-0.04874140024185181,
0.1878589689731598,
-0.08033066242933273,
0.03025657683610916,
0.21711453795433044,
-0.1339910328388214,
0.0294091384857893,
-0.14561524987220764,
-0.8956530690193176,
0.07663051038980484,
0.5848721861839294,
-0.34067079424858093,
0.1616932153701... | |
Is there a difference between using a makefile and a Makefile?
gmake uses the first "make" file found using the following order:
GNUmakefile, makefile, Makefile
Otherwise, they are semantically equivalent. GNU recommends only using GNUmakefile if you are using GNU extensions.
[Source](http://www.gnu.org/software/mak... | [
0.6217074394226074,
-0.1909562051296234,
0.39906036853790283,
-0.07288335263729095,
0.0026380394119769335,
0.15318606793880463,
-0.1195506602525711,
-0.26293039321899414,
-0.23275770246982574,
-0.44471874833106995,
-0.20280811190605164,
0.5988190770149231,
-0.46368682384490967,
-0.05669175... | |
I'm trying to get my head around [AMQP](https://jira.amqp.org/confluence/display/AMQP/About+AMQP). It looks great for inter-machine (cluster, LAN, WAN) communication between applications but I'm not sure if it is suitable (in architectural, and current implementation terms) for use as a software bus within one machine.... | [
0.17272129654884338,
0.20448242127895355,
0.13795647025108337,
-0.11435416340827942,
0.02103276364505291,
-0.13461464643478394,
0.06584513932466507,
0.16208000481128693,
-0.259143590927124,
-0.9230499267578125,
0.04013834893703461,
0.4308825135231018,
-0.10505889356136322,
0.26040953397750... | |
concern than architecture.
War stories would be appreciated.
AMQP is not an RPC framework. It provides the building blocks to model things like shared queues, RPC, pubsub etc. but it does not mandate any specific way to use it.
If you want to partition your application (making it distributable on the way) and to wire... | [
0.3518928587436676,
0.08801580965518951,
0.001175234792754054,
0.11443747580051422,
-0.14757278561592102,
-0.29117369651794434,
-0.08517550677061081,
-0.008250854909420013,
-0.19589504599571228,
-0.6986498236656189,
0.16193470358848572,
0.3214901089668274,
-0.5950539112091064,
-0.002683365... | |
I have a program that, for the most part, operates in the background. Let's say it DoesWork(). Once a week, I want it to notify the user on some of the work it has completed over the past few days. It will be a basic status report, listing some files that have been downloaded.
Initially, I wanted to sent this status u... | [
0.6598764657974243,
0.1155049204826355,
0.4963838756084442,
-0.04329531267285347,
0.20466235280036926,
-0.3212808072566986,
0.3760680854320526,
0.16122883558273315,
-0.18517214059829712,
-0.3830588161945343,
0.002630632370710373,
0.524434506893158,
-0.1060582846403122,
-0.08704677224159241... | |
for release. Also, there would be issues with the same email account password being given out in each copy of the program, which as I understand it, is a risk even if the password is stored using encryption.
Then I thought maybe I could use the user's own email account to send email to his/her self. This has a couple ... | [
0.3161076307296753,
-0.03155139833688736,
0.4304564893245697,
0.23853302001953125,
0.12574458122253418,
-0.29050344228744507,
0.3577203154563904,
-0.1905619353055954,
-0.3044184148311615,
-0.28775498270988464,
-0.13450834155082703,
0.5159624218940735,
-0.3284902274608612,
0.372481346130371... | |
my program just to send emails. I don't think that's a good habit to promote.
Is there any way I could do this via email? Email was my first choice because it's a system of notification that users will already be checking. It's fairly non-intrusive.
Is it necessary to setup my own smtp server? If so, how can I do tha... | [
0.7047767043113708,
-0.06566440314054489,
0.21581126749515533,
-0.01325487345457077,
-0.1290857046842575,
-0.06555101275444031,
0.4043549597263336,
0.3373940885066986,
-0.346371591091156,
-0.4583495557308197,
0.2373599261045456,
0.37365850806236267,
-0.2539009749889374,
0.01343755517154932... | |
ready. I think this is totally doable, it's just overly instrusive and not my first choice. I want to piggyback on a system that the user is already using.
Thanks!
-greg
An alternative is to have the program generate an RSS feed and direct the user how to subscribe to it. Also, once a new update is generated, show the... | [
0.8692506551742554,
0.1787973791360855,
0.5988791584968567,
0.30595988035202026,
0.15011870861053467,
-0.39945751428604126,
0.15672510862350464,
0.006951142102479935,
-0.050454843789339066,
-0.6801578998565674,
-0.20617690682411194,
0.6956820487976074,
-0.04591910541057587,
-0.050530973821... | |
is not a good idea, as you would have to collect the user emails and deal with the privacy issues for that, you would be effectively DOSing any third party SMTP server or would have to invest in the infrastructure for your own. | [
0.25071585178375244,
-0.16159901022911072,
0.0937543734908104,
0.34953615069389343,
0.013721960596740246,
-0.4434179961681366,
0.34048232436180115,
0.009264122694730759,
-0.16730663180351257,
-0.07371627539396286,
0.12888911366462708,
0.17657843232154846,
-0.17284196615219116,
0.2114360034... | |
I'm looking for a broad overview of what I need to do and in what order to migrate a W2003 Server to a virtual server environment. Specifically:
How does it work in general?
Do I need to prepare my disks in any way?
What do I install first? The toolkit? Virtual Server?
Can I install linux later?
etc.
Any pointers we... | [
0.35311299562454224,
-0.008400840684771538,
0.3146599531173706,
0.19196143746376038,
0.1781792938709259,
-0.26031869649887085,
-0.03922333940863609,
0.1143835186958313,
-0.3767023980617523,
-1.0306347608566284,
-0.012749046087265015,
0.5876269340515137,
-0.019483841955661774,
0.37182196974... | |
software. So, there's no "conversion" necessary on your host OS.
Each Guest OS has some files associated with it in the Host OS. There's a file for the virtual disk drive, and a file for the virtual image. Your disk does not need to be specially partitioned or prepared in any way - you just need adequate space on the... | [
0.465162992477417,
0.17464475333690643,
0.1292475312948227,
0.4436647295951843,
0.30267685651779175,
-0.21242192387580872,
-0.045683227479457855,
0.03490622714161873,
-0.07085396349430084,
-0.8181361556053162,
-0.14424732327461243,
0.8207693696022034,
-0.07495684921741486,
0.16586039960384... | |
converting it into a Guest OS on my Virtual Server. I'll be trying that out for myself one of these days! | [
0.17560462653636932,
0.19835104048252106,
0.4951636791229248,
0.19543778896331787,
0.21780705451965332,
-0.0648961290717125,
0.26179924607276917,
0.6115478277206421,
-0.36166971921920776,
-0.6656238436698914,
-0.04579305276274681,
0.33583372831344604,
0.07108992338180542,
0.288728535175323... | |
I've been assigned the task of buying a digital certificate for my company to sign our code. We develop applications in the Microsoft space - mostly WPF or Web Based.
I've investigated options and found Comodo to be well priced and responsive, and we're ready to go ahead and purchase a cert through them.. however in t... | [
0.596112847328186,
0.16503030061721802,
0.42165058851242065,
0.33019736409187317,
0.021735573187470436,
-0.25593921542167664,
-0.25850793719291687,
-0.09644262492656708,
-0.11714590340852737,
-0.3437100648880005,
-0.14846399426460266,
0.3445080816745758,
0.2590167224407196,
-0.004795106593... | |
User Protected?
* Yes / No
Just wondering what all of this means, and what the best options are for our requirements? Any advice/ suggestions would be appreciated
thanks heaps
Greg
For "most purposes" the following options are recommended:
* Microsoft Base Cryptographic Provider
* Key Size: 2048
* Exportable: Yes
... | [
0.20656268298625946,
0.1564398854970932,
0.33270806074142456,
0.047055330127477646,
0.18110303580760956,
-0.3099144399166107,
0.2096196413040161,
-0.1979139894247055,
-0.2819580137729645,
-0.2814135253429413,
-0.40114274621009827,
0.44301384687423706,
0.08053369075059891,
-0.00237835827283... | |
backing it up!
* User Protected means that you must enter a password every time that you want to use the cert - highly recommended to prevent accidental or malicious signing of code with your certificate. | [
0.48426350951194763,
0.18640641868114471,
0.34660303592681885,
0.17111836373806,
0.21922722458839417,
-0.23505885899066925,
0.4206984341144562,
-0.06363768875598907,
-0.1238664984703064,
0.030704258009791374,
-0.12697476148605347,
0.42458656430244446,
0.21432100236415863,
-0.02471104823052... | |
I am using the following code to check if a variable is not nil and not zero
```
if(discount != nil && discount != 0)
...
end
```
Is there a better way to do this?
```
unless discount.nil? || discount == 0
# ...
end
``` | [
0.203120157122612,
0.09322032332420349,
-0.06037106737494469,
-0.21366769075393677,
0.03018142655491829,
-0.1561858206987381,
-0.10175219923257828,
-0.1465211659669876,
0.03475864231586456,
-0.340398907661438,
0.22569452226161957,
0.591221034526825,
-0.100433848798275,
0.4783647060394287,
... | |
My friend was given this free google website optimizer tshirt and came to me to try and figure out what the front logo meant.
[t-shirt](http://2.bp.blogspot.com/_iQVgmEEAit4/SPkKHA3e8fI/AAAAAAAAAB8/ugUerJjuBw8/s1600-h/GWO-tshirt.jpg)
So, I have a couple of guesses as to what it means, but I was just wondering if ther... | [
0.694983720779419,
0.18273769319057465,
0.15544123947620392,
0.22299924492835999,
-0.22111937403678894,
-0.06076112762093544,
0.2695939242839813,
0.40383514761924744,
-0.018401920795440674,
-0.39493271708488464,
0.26055607199668884,
0.03590457886457443,
0.03817309811711311,
0.0545473024249... | |
out if there is any deeper meaning, but to no avail. So, I'm here hoping that someone might be able to help.
I did though write a program to see if the blocks represent something in binary. I'll post the code below. My code tests every permutation of reading a block as 4 bits, and then tries to interpret these bits as... | [
0.8809473514556885,
0.2121211737394333,
0.13539829850196838,
0.14349587261676788,
-0.04725956916809082,
0.06200740486383438,
0.5977319478988647,
0.056077372282743454,
-0.06613057851791382,
-0.5389798283576965,
-0.12026595324277878,
-0.03314078971743584,
-0.17686274647712708,
0.128993898630... | |
or hex numbers, or ip addresses.
# I need more interpretations, maybe one will find a pattern
import string
#these represent the boxes binary codes from left to right top to bottom
boxes = ['1110', '1000', '1111', '0110', '0011', '1011', '0001', '1001']
#changing the ordering
permutations = ["1234", "1243", "1324",... | [
0.2029191106557846,
0.11201172322034836,
0.31038886308670044,
0.035706065595149994,
0.0324811115860939,
0.5482583045959473,
0.3109778165817261,
-0.29682135581970215,
-0.2651187777519226,
-0.428252637386322,
-0.36941292881965637,
-0.26105761528015137,
-0.4903722405433655,
0.1497438997030258... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.