text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
s
End Function
End Class
```
I.L. - Notice the string "test this function"
```
{
.maxstack 8
L_0000: ldarg.0
L_0001: call instance void [mscorlib]System.Object::.ctor()
L_0006: nop
L_0007: ldarg.0
L_0008: ldstr "test this function"
L_000d: stfld string ClassLibrary1.Class1::s
... | [
-0.276866614818573,
0.06821446865797043,
0.5467538833618164,
-0.07291603833436966,
0.09104723483324051,
-0.0013549409341067076,
0.36180904507637024,
-0.3117472529411316,
-0.05557160824537277,
-0.2797936201095581,
-0.1890173703432083,
0.3622124493122101,
-0.3711847960948944,
0.1116596758365... | |
I am adapting a little rmi client-server application. I have written several things :
```
HelloInterface -> A Hello World interface for RMI
Server -> The server app'
Client -> The client app'
```
Nothing special, but... I have put my hands in a new RMISecurityManager, which calls a JNI method and checks the permissi... | [
0.2114420086145401,
0.01558434497565031,
0.4653056859970093,
-0.14075975120067596,
-0.05713200196623802,
-0.034869998693466187,
0.6121188402175903,
-0.5945550203323364,
-0.053232211619615555,
-0.6765573620796204,
-0.02347291260957718,
0.5052990317344666,
-0.5149604678153992,
0.215800300240... | |
du constructeur avec user.
*/
private NativeRMISecurityManager()
{
super();
}
public NativeRMISecurityManager (final String user)
{
super();
String OS = System.getProperty("os.name").toLowerCase();
unix = (OS.compareTo("windows") != 0); /* Assume that if not | [
-0.17531172931194305,
-0.33209940791130066,
0.34998151659965515,
0.055125873535871506,
0.2193862944841385,
0.04188840463757515,
0.631497859954834,
-0.19629207253456116,
-0.1728331297636032,
-0.47622883319854736,
-0.44951319694519043,
0.7446304559707642,
-0.06411045044660568,
0.504685580730... | |
* windows, then "UNIX/POSIX"
*/
/*
* ThreadLocal's user : Each thread is considered
* to have different access rights to the machine
*/
NativeRMISecurityManager.user.set(user); | [
0.08874763548374176,
-0.11457831412553787,
0.31218913197517395,
-0.06302759796380997,
0.1612621545791626,
-0.07680966705083847,
0.06399842351675034,
0.33452051877975464,
-0.25192803144454956,
-0.5315433144569397,
-0.16644664108753204,
0.21863703429698944,
-0.16290968656539917,
0.6025933027... | |
if (!unix)
{
System.out.println("Systeme : "+OS);
}
}
public void checkRead(String file)
{
super.checkRead(file);
/*
* If we are on a **IX platform we want to check that
* | [
0.17011870443820953,
-0.10142063349485397,
0.3106616139411926,
0.14447493851184845,
0.11030204594135284,
-0.10138130187988281,
0.08809792250394821,
0.1955709159374237,
-0.07538685947656631,
-0.683830201625824,
-0.24553069472312927,
0.6107848882675171,
-0.17889904975891113,
0.27551361918449... | |
the _user_ has access rights.
*/
if (unix)
{
String str_user = (String)NativeRMISecurityManager.user.get();
if (file == null)
{
throw new SecurityException("file = NULL !!!"); | [
-0.05921533703804016,
0.01451640110462904,
0.4738937020301819,
-0.15225686132907867,
0.28902971744537354,
-0.3896372318267822,
0.30193978548049927,
-0.21555674076080322,
-0.08100976794958115,
-0.43212831020355225,
-0.5027132034301758,
0.6891359686851501,
-0.17812982201576233,
0.43056011199... | |
}
if (str_user == null)
{
throw new SecurityException("user = NULL in the ThreadLocal!!!");
}
int ret = c_checkRead(
file, | [
0.06414024531841278,
-0.20170843601226807,
0.32409292459487915,
-0.3488636612892151,
0.44901588559150696,
0.05068647488951683,
0.6383911371231079,
-0.22883687913417816,
-0.10116156935691833,
-0.30762094259262085,
-0.2413482666015625,
0.6681111454963684,
-0.36663973331451416,
0.368804395198... | |
str_user
);
if (ret != 0)
{
throw new SecurityException("Access error: " + file); | [
-0.24521346390247345,
-0.05004114285111427,
0.4138563275337219,
-0.4766820967197418,
0.2757062315940857,
0.08045876026153564,
0.7167335152626038,
-0.46851399540901184,
0.08035475015640259,
-0.3993064761161804,
-0.5441376566886902,
0.7806171178817749,
-0.30358514189720154,
0.192237585783004... | |
}
}
}
public native int c_checkRead(String file, String user);
}
```
In the Server class I'm doing that :
```
String user = "my_user";
System.setSecurityManager(new NativeRMISecurityManager(user));
```
This class seems to work in the Server's main thread. Now the problem is when I try and connect... | [
-0.08272571861743927,
0.08849681168794632,
0.46739840507507324,
-0.23135875165462494,
0.15897010266780853,
-0.07635880261659622,
0.3913848400115967,
-0.2596800923347473,
-0.38590458035469055,
-0.6319360136985779,
0.01371501013636589,
0.47290927171707153,
-0.42989230155944824,
0.37570831179... | |
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.SecurityException: user = NULL dans le ThreadLocal!!!
at rmi.NativeRMISecur... | [
-0.4522678852081299,
0.029959077015519142,
0.3033657670021057,
-0.1513395607471466,
-0.033570364117622375,
0.0003977103915531188,
0.6498568654060364,
-0.19538715481758118,
-0.7565726041793823,
-0.6651574373245239,
-0.24583317339420319,
0.1649905890226364,
-0.6545083522796631,
0.30562844872... | |
at java.lang.System.loadLibrary(System.java:993)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.server.MarshalInputStream.<clinit>(MarshalInputStream.java:97)
... 5 more
```
IMHO the meani... | [
-0.0030383134726434946,
0.09671647846698761,
-0.03845551982522011,
0.07611097395420074,
0.13951966166496277,
-0.2629808485507965,
0.5161736607551575,
-0.3321665823459625,
-0.5174749493598938,
-0.6492459774017334,
-0.030647490173578262,
0.3967670202255249,
-0.4347931444644928,
0.10610690712... | |
to do with the use of ThreadLocal. The key property of a ThreadLocal is that every calling thread has its own value. In this case "user" is being set by (and for) the thread that initializes the NativeRMISecurityManager and sets it as the System Security Manager (presumably the main thread).
However, some other thread... | [
0.007744625676423311,
-0.13068808615207672,
0.2985140085220337,
0.09737422317266464,
-0.0071121626533567905,
-0.2006036788225174,
0.1876135617494583,
0.03606446832418442,
-0.09701338410377502,
-0.26038017868995667,
0.04855154827237129,
0.3347986042499542,
-0.3527851104736328,
0.40488615632... | |
one from your example - I would recommend making the "user" field a) a String, not a ThreadLocal and b) non-static. That should solve your null value problem.
However, presuming that it is a requirement / design constraint, the trouble with the current architecture is that only the thread that instantiates the NativeR... | [
-0.031201321631669998,
-0.17062288522720337,
0.010219700634479523,
0.1800534874200821,
-0.12915292382240295,
-0.24416431784629822,
0.27013641595840454,
0.17662616074085236,
-0.31535017490386963,
-0.49418145418167114,
0.0564805343747139,
0.500449538230896,
-0.40568459033966064,
0.2344967275... | |
Java's Security Architecture. However I will do my best working under a few assumptions:
1. Threads created by the system are assumed to be trusted
2. Threads created by your code must specify a user
3. Children threads should inherit the user of the creating thread
Potential implementation:
```
public class NativeR... | [
0.048816047608852386,
-0.06576616317033768,
0.3249225616455078,
-0.05979682505130768,
0.24221573770046234,
-0.1965133547782898,
0.5139703750610352,
-0.343171626329422,
-0.1486966907978058,
-0.697875440120697,
-0.08694713562726974,
0.5413582921028137,
-0.251193106174469,
0.29911866784095764... | |
* windows, then "UNIX/POSIX"
*/
}
protected static | [
-0.06631190329790115,
-0.10226297378540039,
0.07456608861684799,
-0.00882562343031168,
0.03738979995250702,
-0.1308441013097763,
-0.11941581219434738,
0.5348049402236938,
0.005255536641925573,
-0.3068057894706726,
-0.41924163699150085,
0.8473840355873108,
-0.3429659903049469,
0.24667395651... | |
InheritableThreadLocal<String> user =
new InheritableThreadLocal<String>();
public static setThreadUser(String username) {
user.set(username);
}
public NativeRMISecurityManager(String initialUser) {
super();
// Set the user for the thread that constructs the security manage... | [
-0.05202721059322357,
-0.39647918939590454,
0.06117143854498863,
-0.02049458771944046,
0.1976308375597,
-0.20473413169384003,
0.06387218087911606,
-0.48112761974334717,
-0.3962521553039551,
-0.5102593302726746,
-0.19302403926849365,
0.3758353888988495,
-0.56643146276474,
0.4761340618133545... | |
a child of that thread will have a 'null' user
setThreadUser(initialUser);
}
public void checkRead(String file) {
super.checkRead(file);
/*
* If we are on a **IX platform we want to check that
* the _user_ has access rights.
*/
if (UNIX) | [
0.07146535813808441,
-0.019436538219451904,
0.25970691442489624,
0.03407111391425133,
0.09339694678783417,
-0.040969204157590866,
0.13463906943798065,
0.11267202347517014,
-0.09548233449459076,
-0.7231836318969727,
-0.11284095048904419,
0.42368561029434204,
-0.29798591136932373,
0.67136549... | |
{
if (file == null)
{
throw new SecurityException("file = NULL !!!");
}
String str_user = NativeRMISecurityManager.user.get();
if (str_user != null) | [
-0.17585930228233337,
-0.23734760284423828,
0.10028503090143204,
-0.2513740360736847,
0.21500730514526367,
-0.10997231304645538,
0.7211962342262268,
-0.49282902479171753,
-0.06793974339962006,
-0.32855355739593506,
-0.484795480966568,
0.6071675419807434,
-0.26400724053382874,
0.25552809238... | |
{
// Note: sanitize input to native method
int ret = c_checkRead(file, str_user);
if (ret != 0)
{ | [
-0.0622231587767601,
-0.050363607704639435,
0.0707302987575531,
-0.24744826555252075,
0.22767199575901031,
0.2007056176662445,
0.6580551266670227,
-0.6281667351722717,
0.17455050349235535,
-0.5260109901428223,
-0.344225138425827,
0.3963617980480194,
-0.38387933373451233,
0.2910612225532532... | |
throw new SecurityException("Access error: " + file);
}
}
// Assume a system thread and allow access
}
}
public native int c_checkRead(String file, String user);
}
``` | [
-0.03211366385221481,
-0.016107479110360146,
-0.1124284416437149,
-0.13686232268810272,
0.11819171160459518,
-0.21512000262737274,
0.49253302812576294,
-0.09797133505344391,
0.11538674682378769,
-0.536638081073761,
-0.3374834954738617,
0.6016145348548889,
-0.30280691385269165,
0.4409762620... | |
I would like to begin developing for the Blackberry platform and, specifically, the Bold and also the Storm device which is coming out soon. Do I need to get into Java and J2ME or can I develop sites in ASP.NET and just keep utilizing the skills I already have?
I am completely new to mobile platform development and h... | [
0.4989953339099884,
-0.02138405852019787,
0.13216844201087952,
0.03818580508232117,
0.3141571879386902,
0.013152606785297394,
0.2709266245365143,
0.12417040765285492,
-0.3482549786567688,
-0.8060656785964966,
0.18260931968688965,
0.506218671798706,
0.02365289442241192,
0.030023202300071716... | |
For both .NET Winforms and Windows Presentation Foundation, if I have a text box that the user has just entered text into, and a button, if the user clicks the button the "LostFocus" event fires before the button click event fires. However if the user uses a keyboard shortcut for the button (e.g. Button's text is "&But... | [
0.12921729683876038,
-0.19634726643562317,
0.38731899857521057,
0.0022400133311748505,
0.19349636137485504,
-0.2630142271518707,
0.3552369177341461,
-0.06166714057326317,
0.07650969177484512,
-0.7581365704536438,
-0.026852982118725777,
1.0799187421798706,
-0.13865163922309875,
-0.030853778... | |
not the lost focus logic has occured before firing the button logic. You shouldn't really have code directly in the handler anyway. You could do something like this:
```
public partial class Form1 : Form
{
private Boolean _didLostFocusLogic;
public Form1()
{
InitializeComponent... | [
0.26492542028427124,
-0.5525819659233093,
0.5188176035881042,
-0.19931672513484955,
0.21271991729736328,
-0.16946348547935486,
0.40977194905281067,
0.024045271798968315,
0.12584403157234192,
-0.5249561667442322,
-0.3559279441833496,
0.6756576299667358,
-0.4241795241832733,
-0.1449544280767... | |
{
LostFocusLogic();
}
private void button1_Click(object sender, EventArgs e)
{
ButtonClickLogic();
}
private void LostFocusLogic()
{
/* Do stuff */ | [
0.45869919657707214,
-0.44185397028923035,
0.5992079973220825,
0.010816432535648346,
0.5919190645217896,
-0.11305535584688187,
0.6181919574737549,
0.12839804589748383,
-0.15904511511325836,
-0.23759964108467102,
-0.27598837018013,
0.7291175127029419,
-0.5426092743873596,
-0.012856307439506... | |
_didLostFocusLogic = true;
}
private void ButtonClickLogic()
{
if (!_didLostFocusLogic)
LostFocusLogic();
_didLostFocusLogic = false; // Reset for next time.
/* Do | [
0.11569952219724655,
-0.33108165860176086,
0.6356844902038574,
-0.06219692900776863,
0.7228491902351379,
0.034298717975616455,
0.7245203256607056,
0.019894476979970932,
-0.28275495767593384,
-0.44239509105682373,
-0.07385609298944473,
0.6906593441963196,
-0.3042227327823639,
0.076852992177... | |
stuff */
}
}
``` | [
0.5017905831336975,
0.6907768845558167,
0.1477390080690384,
0.08939743787050247,
0.39645901322364807,
-0.3012743890285492,
0.17573297023773193,
0.6700224876403809,
-0.15161198377609253,
-0.3454483151435852,
-0.4086090624332428,
0.37791481614112854,
-0.12885728478431702,
0.4633651673793793,... | |
This is a bit of a strange one, but I've been struggling for a few hours now and I can't understand what is happening.
I was wondering if anyone else has experienced this problem, and can perhaps explain it. I'm building a simple Winforms app and trying to use many of the built in controls.
Basically, I've got a for... | [
0.42741143703460693,
0.016444029286503792,
0.4047085642814636,
0.23544830083847046,
0.1829603612422943,
-0.13174916803836823,
0.02228340320289135,
-0.32415902614593506,
0.12216760218143463,
-0.6200790405273438,
0.03405742347240448,
0.4092574715614319,
-0.19451768696308136,
0.16102658212184... | |
Product class to the BindingSource and the class contains a property of `ProductType`. For simplicity I also added a `List<ProductType>` ProductTypes to the Product Class which loads itself when queried, which means I can just use the same bindingSource and choose the `ProductTypes` Data Member as the Datasource for th... | [
0.32748788595199585,
0.040710434317588806,
0.4655253291130066,
-0.23661701381206512,
-0.2233378291130066,
-0.05195971950888634,
0.10431043803691864,
-0.49943289160728455,
0.009059972129762173,
-0.7581925988197327,
-0.10726547986268997,
0.46546733379364014,
-0.4669022262096405,
0.3651862740... | |
soon as I make sure that the drop down modifies the instance of the Product by binding to the Bindings-SelectedValue, and then run the form, the list still gets populated perfectly and I can tab through the controls as long as I don't make a selection from the dropdown. If I make a selection from the dropdown then the ... | [
0.41812267899513245,
-0.09879586845636368,
0.898672342300415,
0.07343737781047821,
0.11638291925191879,
-0.054169245064258575,
-0.007115195505321026,
-0.13637545704841614,
-0.10583212971687317,
-0.4341067671775818,
-0.011977780610322952,
0.5633752942085266,
-0.1436660885810852,
0.045282710... | |
or dropdown. This affects all three dropdowns as soon as a selection is made.
Anyone have any ideas what I'm missing?
I have tried changing a few things and had some success by feeding the dropdown values a string[] instead of a member of an object. That seems to work, but defeats the object of using databinding does... | [
0.4884527325630188,
-0.1817869395017624,
-0.05029270425438881,
0.2955702543258667,
-0.14186638593673706,
-0.22020642459392548,
0.153903067111969,
-0.044825997203588486,
-0.6653181910514832,
-0.04206276684999466,
-0.002131218556314707,
0.42970070242881775,
-0.2950509190559387,
0.05419761687... | |
aren't explicitly, try setting CausesValidation to False to see if there's any sort of validation going on behind the scenes, that might at least give you a hint. | [
0.9994105696678162,
0.060645539313554764,
0.015666183084249496,
0.3028540313243866,
-0.1443716585636139,
-0.2306424230337143,
0.32133179903030396,
0.13320735096931458,
-0.07826138287782669,
-0.3659188449382782,
0.03993353620171547,
0.5251220464706421,
-0.2606604993343353,
-0.11519014835357... | |
When considering using performance counters as my companies' .NET based site, I was wondering how big the overhead is of using them.
Do I want to have my site continuously update it's counters or am I better off to only do when I measure?
The performance impact is negligible in updating. Microsoft's intent is that yo... | [
0.5071660876274109,
0.0806669145822525,
0.24724340438842773,
0.3548104763031006,
-0.23145316541194916,
-0.08239497244358063,
0.22492937743663788,
-0.0998108834028244,
-0.14485493302345276,
-0.5468681454658508,
0.15912798047065735,
0.5977266430854797,
0.05748570337891579,
0.0350018478929996... | |
only "doing it when you measure." | [
0.7065338492393494,
0.17285464704036713,
-0.17063583433628082,
-0.004948033485561609,
-0.4389273226261139,
0.2397487461566925,
0.48188409209251404,
-0.18425048887729645,
-0.24154804646968842,
-0.03417875990271568,
0.22849084436893463,
0.4227975308895111,
0.15331262350082397,
-0.66926968097... | |
I'm facing this problem again and again, but can't find any solution (except mine, which is not as a good one I guess).
Don't know why, sometimes Flex Builder executes old source codes after making changes. While debugging I see how it steps through a source (e.g. changing local variables) which does not exist (even i... | [
0.40854278206825256,
0.12135732918977737,
0.1492515206336975,
-0.04838027060031891,
-0.18888597190380096,
0.01961783692240715,
0.6517404317855835,
-0.16641487181186676,
-0.34277021884918213,
-0.8193023204803467,
0.18122273683547974,
0.7134994864463806,
0.036290716379880905,
0.2190119922161... | |
work, but this way is not as comfortable, especially if sources are on a remote machine and you need to configure .net back-end.
Anyone knows how to solve?
I ran into this problem as well. What you can do is this:
1. Execute the clean command in Flex builder.
2. Close the project with the problem.
3. Go to your proje... | [
0.5023493766784668,
-0.0531902052462101,
0.1897163689136505,
0.06144644320011139,
-0.06449740380048752,
-0.46231570839881897,
0.6214317679405212,
-0.3969830870628357,
-0.18801328539848328,
-0.8125303387641907,
-0.30172067880630493,
0.9258446097373962,
-0.06730756908655167,
-0.0893868207931... | |
I'm having a problem with a administrative app I'm working on. I'm build an interface for stopping, starting and querying various services across 40 or so servers.
I'm looking at service.controller and have been successful in stopping and starting various services with button events but now I'm trying to figure out a... | [
0.5492170453071594,
0.005079022608697414,
0.31619787216186523,
0.2898283898830414,
0.14859947562217712,
0.06891833245754242,
0.49332329630851746,
0.19985218346118927,
-0.4980868101119995,
-0.5269482135772705,
0.27252906560897827,
0.5841383934020996,
-0.09093146026134491,
0.0159538704901933... | |
can run your service queries on the Elapsed event.
```
private void t_Elapsed(object sender, ElapsedEventArgs e)
{
// Check service statuses
}
```
As for displaying statuses in a text box, you should be able to use the ToString() method on the service status and display that in a regular text box... | [
0.1690242737531662,
-0.0874701589345932,
0.2822880148887634,
0.1399189531803131,
0.08446450531482697,
-0.02152581885457039,
0.38342833518981934,
-0.16460298001766205,
-0.24996507167816162,
-0.6821944117546082,
-0.2814099192619324,
0.7327885031700134,
-0.3300692141056061,
0.2781886458396911... | |
void TextUpdateHandler(string updatedText);
private void UpdateServerStatuses(string statuses)
{
if (this.InvokeRequired)
{
TextUpdateHandler update = new TextUpdateHandler(this.UpdateServerStatuses);
this.BeginInvoke(update, statuses);
}
else
{
... | [
-0.15748541057109833,
-0.24965634942054749,
0.4927491843700409,
-0.26984676718711853,
0.20777012407779694,
0.15566881000995636,
0.5354244709014893,
-0.07005491107702255,
-0.11147835850715637,
-0.5614048838615417,
-0.5029674172401428,
0.9072167277336121,
-0.477948933839798,
-0.1368470638990... | |
}
}
``` | [
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,
... | |
My teams evolution of TDD includes what appear to be departures from traditional oop.
1. Moving away from classes that are self sufficient
We still encapsulate data where appropriate. But in order to mock any helper classes, we usually create some way to externally set them via constructor or mutator.
2. We don't use... | [
0.4225233197212219,
-0.15442410111427307,
-0.21261639893054962,
0.3871889114379883,
-0.532626211643219,
-0.08495470881462097,
0.23539449274539948,
0.07097015529870987,
0.1128317192196846,
-0.5575733184814453,
0.21446764469146729,
0.5164379477500916,
-0.13403664529323578,
-0.058931108564138... | |
paradigm among many possible. It's not a goal in itself, it's a means to an end. You don't have to program object-oriented, not if other paradigms are better suited for you.
And countless clever people before you have remarked that unit testing tends to be a lot easier in function-oriented languages than object-orient... | [
0.3042641282081604,
-0.23939120769500732,
-0.43922749161720276,
0.6101125478744507,
-0.4163918197154999,
0.07027842104434967,
0.4654518663883209,
0.08247773349285126,
-0.14451947808265686,
-0.5465641617774963,
0.04273269698023796,
0.35931214690208435,
-0.12448009103536606,
0.04108883813023... | |
it (obviously), and if you can't test it, how can you tell that it works?
So if you have to choose one extreme or the other, I'd certainly choose testability.
But an obvious question is, do you really need to test every private method? These are not part of the public contract of a class, and may not be meaningful in ... | [
0.42753952741622925,
-0.06182584539055824,
-0.32307082414627075,
0.5857688188552856,
-0.006587318144738674,
-0.15558840334415436,
0.2720498740673065,
-0.006021009758114815,
-0.0836363211274147,
-0.29969432950019836,
0.04020151495933533,
0.45584923028945923,
-0.1436687558889389,
0.082729160... | |
may not be. (Who cares what a private method does? It's not part of the class contract)
Perhaps a better solution would be to just refactor some of the otherwise private stuff out into separate classes. Perhaps the need for testing private methods isn't as big as you've been thinking.
On a different note, other mocki... | [
0.5388994812965393,
-0.1866816133260727,
-0.1872713416814804,
0.5285617113113403,
-0.2755831480026245,
-0.41976380348205566,
0.6125773191452026,
0.2381354421377182,
-0.3965429663658142,
-0.3062131106853485,
0.09068058431148529,
0.27580201625823975,
-0.14757119119167328,
0.30783918499946594... | |
at all times. It must be impossible for external code to bring your class into an invalid state. That's not just OOP, it's also common sense. Private methods are simply to allow you finer granularity internally in the class, factoring some tasks out across multiple methods and such, but they generally *do not* preserve... | [
-0.005356565583497286,
-0.005928730592131615,
-0.0669889748096466,
0.4768810570240021,
0.016226064413785934,
-0.08695877343416214,
0.5786044001579285,
0.11826296895742416,
-0.4495534300804138,
-0.5192164778709412,
-0.28131869435310364,
0.17327196896076202,
-0.04463106393814087,
0.069454386... | |
invariant, all is well.
So while yes, you make the private methods testable by turning them public, you also introduce a source of bugs which can *not* be caught easily by unit tests. You make it possible to use the class "wrong". A well designed class always maintains its invariant, no matter how it's used by externa... | [
0.13154645264148712,
-0.1565839648246765,
-0.04614046961069107,
0.4447995126247406,
0.05361185222864151,
-0.3271997570991516,
0.43950343132019043,
-0.16905935108661652,
-0.34888142347335815,
-0.33198225498199463,
-0.11691932380199432,
0.46671855449676514,
-0.3272797465324402,
0.32598283886... | |
So I'd say you risk introducing a much bigger source of errors than you might have expected.
Of course, given this above definition of private members (those that don't preserve the class invariant), it might be possible to safely turn a lot of other methods public, because they *do* preserve the invariant, and so the... | [
0.2709875702857971,
0.05148908868432045,
-0.5010464787483215,
0.3659975230693817,
-0.0861530676484108,
-0.2731456756591797,
0.5456255674362183,
-0.0086477380245924,
-0.5384886264801025,
-0.32685092091560364,
0.05179934203624725,
0.3688600957393646,
-0.031295932829380035,
0.0723954811692237... | |
I'm programming in FORTRAN and C on an SGI running Irix 6.5, but this should be applicable to all Unix-like systems. How do I find which library I need to link to my program when I get an "unresolved text symbol" link error? Here's an example of what I'm seeing from the linker:
```
ld32: ERROR 33 Unresolved text symb... | [
0.03798025846481323,
0.1174050122499466,
0.2752021551132202,
0.10420288890600204,
0.21688944101333618,
-0.15207792818546295,
0.18587574362754822,
0.07221830636262894,
-0.3311050534248352,
-0.6534114480018616,
0.0284720566123724,
0.6136500835418701,
-0.43186914920806885,
0.12094691395759583... | |
shared library:
```
nm -D /lib/libc.so.6
```
and then `grep` for the symbol you are looking for. Omit the -D for static libraries. You can use this in a loop or with xargs to scan multiple libraries.
I usually just use google (assuming the symbol is from a publicly available library). | [
0.2342177778482437,
0.09958010166883469,
0.05905425176024437,
0.3333631753921509,
-0.04142222926020622,
-0.3031781315803528,
0.16423296928405762,
0.4272432327270508,
-0.27039510011672974,
-0.8021281957626343,
-0.1337408423423767,
0.045935217291116714,
-0.2682378888130188,
0.434867769479751... | |
I might be one anal programmer, but I like code that looks good from a distance. I just found myself lining up a CSS style so that instead of this:
```
#divPreview {
text-align: center;
vertical-align: middle;
border: #779 1px solid;
overflow: auto;
width: 210px;
height: 128px;
background-c... | [
0.10090211778879166,
0.24216067790985107,
0.5931742787361145,
-0.27081170678138733,
-0.175893634557724,
0.02562660723924637,
0.15529640018939972,
-0.04932692274451256,
-0.16514500975608826,
-0.6767050623893738,
-0.4133724272251129,
0.6078202128410339,
-0.08472063392400742,
-0.0860365852713... | |
border: #779 1px solid;
background-color: #fff";
}
```
I will almost always write numerical comparisons in order of size like
```
if (0 < n && n < 10)
```
instead of
```
if (0 < n && 10 > n)
```
and finally I will tend to arrange if-then-else code so that the THEN part is smaller than the ELSE part (cause t... | [
0.09279810637235641,
0.1030266061425209,
0.6042045950889587,
-0.13343937695026398,
0.05278850719332695,
-0.038893360644578934,
0.3051115870475769,
-0.4615854322910309,
-0.4102567434310913,
-0.6588096022605896,
-0.11846844106912613,
0.4386427104473114,
-0.0002415742928860709,
0.011714368127... | |
alone in my neurosis here? What's your coding kink?
**Any code style that makes you reorder things when code changes is bad.**
It would screw up diffs. You are using a version control system right?
There's a few other things that would make your code prettier, but screw up diffs.
Imagine this code:
```
int foo = 42... | [
0.38062575459480286,
0.1445375680923462,
0.14548958837985992,
0.04690378159284592,
-0.07898250967264175,
0.34206536412239075,
0.42756855487823486,
-0.28683242201805115,
-0.2682604193687439,
-0.3846224844455719,
0.25062382221221924,
0.611504852771759,
-0.4647540748119354,
0.2814822196960449... | |
= 1024;
String nowLetsBeEvil = 6400;
```
Now if you did a diff, all 3 lines have changed, when only the last one did.
**And there's more, lining up params between methods is bad**
```
sqrt(x + y, x - z);
sqrt(x , x );
```
The comma and semi-colon are nicely lined up, but if you ever change the code, you'll ... | [
-0.05105387791991234,
-0.042839717119932175,
0.7594782114028931,
-0.05111362412571907,
-0.4048604667186737,
0.18292494118213654,
0.5881436467170715,
-0.26365214586257935,
-0.35320860147476196,
-0.5349168181419373,
-0.33340901136398315,
0.27598443627357483,
-0.2635219991207123,
-0.040930539... | |
a code style where the format will change when your code did not**
EDIT:
As stated in the comments, some diff tools can ignore whitespaces within lines. This is great, but not all diff tools can do this. If you are aligning fields or params, make sure you are:
1. Not doing it manually
2. Your diff tool can ignore th... | [
0.40627333521842957,
-0.20999954640865326,
0.12048552930355072,
0.14765581488609314,
-0.26159319281578064,
-0.3690274655818939,
0.4727245569229126,
-0.13067181408405304,
-0.2290218025445938,
-0.48080065846443176,
-0.004539745859801769,
0.46454042196273804,
-0.5959377884864807,
-0.126423776... | |
Let's say I have a table:
```
i j
---
a 1
a 2
a 3
a 4
b 5
b 6
b 7
b 8
b 9
```
Obvoiusly `SELECT a, GROUP_CONCAT(b SEPARATOR ',') GROUP BY a` would give me
```
a 1,2,3,4
b 5,6,7,8,9
```
But what if I want to get only a LIMITED number of results, like 2, for example:
```
a 1,2
b 5,6
```
Any ideas?
Best wa... | [
-0.3532053232192993,
0.293986439704895,
0.2466030865907669,
-0.24058884382247925,
-0.15188530087471008,
0.16015507280826569,
-0.08286640793085098,
-0.4563368260860443,
-0.27257901430130005,
-0.3898458778858185,
-0.1347435563802719,
0.3214091658592224,
-0.3260699510574341,
0.043311055749654... | |
The basics have already been answered [here](https://stackoverflow.com/questions/257125/human-language-of-a-document). But is there a pre-built PHP lib doing the same as Lingua::Identify from CPAN?
There's a PEAR package [`Text_LanguageDetect`](http://pear.php.net/package/Text_LanguageDetect) that I've used before. Get... | [
-0.03001113422214985,
0.1683126538991928,
0.26782745122909546,
0.001101446570828557,
-0.1913365125656128,
0.12666703760623932,
0.4767637252807617,
0.2578451335430145,
-0.10643208771944046,
-0.3932478129863739,
0.07449046522378922,
0.5031907558441162,
0.15368013083934784,
-0.537967801094055... | |
<rant-mode>
Have you ever seen a programming language that does not allow to add comments to the code? Welcome to the world of RTML (may it burn in hell)!
</rant-mode>
Question
--------
> What is the best technique (if any) you've adopted to comment your RTML code?
Thank you!
To create a comment in RTML, click on yo... | [
0.5664167404174805,
0.13020335137844086,
0.0724579393863678,
0.04212874919176102,
-0.6297271251678467,
-0.25356364250183105,
0.5255687236785889,
0.10145806521177292,
-0.09140253067016602,
-0.5225012898445129,
-0.2565666139125824,
0.8506328463554382,
-0.6642162799835205,
-0.0779101178050041... | |
nil` will never be executed.
```
WHEN nil
MULTI
TEXT @a-random-variable
``` | [
0.2414618581533432,
0.09417911618947983,
-0.08060728758573532,
0.11199571937322617,
-0.18468770384788513,
-0.11891413480043411,
0.34015151858329773,
0.30506253242492676,
-0.03342827409505844,
-0.5619595646858215,
-0.16699880361557007,
0.5289888381958008,
-0.5429722666740417,
0.615406513214... | |
Is there a WMI event you can subscribe to that will fire when a remote machine boots up and comes online, or goes offline?
My application needs to be able to monitor machines for their availability, and ideally, I'd like something that can work via events instead of continuous polling.
Subscribing to a shutdown event ... | [
0.3413800895214081,
-0.24714775383472443,
0.24180395901203156,
0.16920483112335205,
0.14477074146270752,
-0.29465869069099426,
0.25072747468948364,
0.06860753148794174,
-0.26974281668663025,
-0.2430066019296646,
-0.061125192791223526,
0.4837629497051239,
-0.439487099647522,
0.2694156169891... | |
But wait! It may be problematical to receive this via WMI. Why? It may be that the WMI service itself shuts down prior to EventLog so it might be a Catch 22. You could potentially look for another message that occurs earlier during shutdown on the servers you are monitoring, and watch for that.
A boot up event carries... | [
0.26487597823143005,
-0.4191891551017761,
0.24652577936649323,
0.31738242506980896,
0.09297630935907364,
-0.5402745008468628,
0.21846166253089905,
0.22441931068897247,
-0.5147225856781006,
-0.4650489389896393,
-0.35116833448410034,
0.44526544213294983,
-0.36519065499305725,
0.4500178694725... | |
what events you want. In order to receive a boot up event, you'd have to "magically" know to open said connection and issue said query prior to the event being fired.
Years ago I wrote a service that collected Event Log entries from remote servers for a network monitoring application. Just the logic to detect when the... | [
0.41057705879211426,
-0.32131457328796387,
0.382172554731369,
0.21659748256206512,
0.0491197369992733,
-0.1931876391172409,
0.0593716986477375,
0.25100502371788025,
-0.5248855352401733,
-0.09283420443534851,
-0.030211683362722397,
0.39984819293022156,
-0.1566392183303833,
0.116631731390953... | |
information to know when to rebuild our DCOM connections. | [
0.1521138995885849,
-0.21534180641174316,
0.30461007356643677,
0.47985726594924927,
0.1524592489004135,
-0.1692844182252884,
-0.109868623316288,
0.2647945284843445,
0.036832064390182495,
-0.4631620943546295,
-0.008107339963316917,
0.4244442284107208,
0.26640740036964417,
-0.259813785552978... | |
In C++, is it possible to have a base plus derived class implement a single interface?
For example:
```
class Interface
{
public:
virtual void BaseFunction() = 0;
virtual void DerivedFunction() = 0;
};
class Base
{
public:
virtual void BaseFunction(){}
};
class Derived : public Base,... | [
0.07622435688972473,
-0.31613442301750183,
0.29973623156547546,
-0.0883411094546318,
-0.28234806656837463,
-0.007271760609000921,
0.08305305242538452,
-0.31726735830307007,
0.2008087933063507,
-0.3337087333202362,
-0.050354793667793274,
0.4243398606777191,
-0.4293510615825653,
0.1096439883... | |
concerned Interface::BaseFunction is never defined.
So far the only solution I've found would be to declare a pass through function in Derived
```
class Derived : public Base, public Interface
{
public:
void DerivedFunction(){}
void BaseFunction(){ Base::BaseFunction(); }
};
```
Is there any be... | [
-0.0007799735176376998,
-0.25314971804618835,
0.9179501533508301,
-0.040044575929641724,
0.11364579200744629,
0.06165687367320061,
-0.1718328595161438,
-0.514979898929596,
-0.02312442474067211,
-0.6948372721672058,
0.20079177618026733,
0.9016098976135254,
-0.6907069087028503,
-0.0995205342... | |
to use the methods specific to MyDialog, but also needs to call CDialog::SetParent. I just solved it by creating MyDialog::SetParent and having it pass through to CDialog::SetParent, but was wondering if there was a better way.
C++ doesn't notice the function inherited from Base already implements `BaseFunction`: The f... | [
0.08008508384227753,
-0.09259967505931854,
0.4704299569129944,
-0.14641791582107544,
0.05042281001806259,
-0.02848028391599655,
0.1435774713754654,
-0.17199325561523438,
0.08115582168102264,
-0.6390900611877441,
0.06720764935016632,
0.4814688563346863,
-0.6221268177032471,
0.18163253366947... | |
virtual void BaseFunction(){}
};
class Derived : public Base
{
public:
virtual void DerivedFunction(){}
};
int main()
{
Derived derived;
}
```
If you want to be able to get away with only implementing one of them, split `Interface` up into two interfaces:
```
class DerivedInterface
{
public:
... | [
0.15261682868003845,
-0.3219250440597534,
0.30968672037124634,
0.02670985274016857,
-0.023681769147515297,
0.176651731133461,
0.20251157879829407,
-0.2561216652393341,
0.03850465267896652,
-0.472974568605423,
0.002437570597976446,
0.5527514815330505,
-0.3897991180419922,
0.2470665723085403... | |
virtual void BaseFunction(){}
};
class Derived : public DerivedInterface
{
public:
virtual void DerivedFunction(){}
};
class Both : public DerivedInterface, public Base {
public:
virtual void DerivedFunction(){}
};
int main()
{
Derived derived;
Base base;
Both both;
}
```
No... | [
-0.10537312179803848,
-0.4518418610095978,
0.10682771354913712,
0.13496173918247223,
0.0566394105553627,
-0.07210840284824371,
0.18845941126346588,
0.21303872764110565,
0.013893461786210537,
-0.1902589201927185,
-0.21196052432060242,
0.5561097264289856,
-0.002295644488185644,
0.43644171953... | |
I'm trying to completely automate my builds and part of it is applying SQL scripts to the SQL Server.
I've created a batch file that calls SQL Server utility (OSQL.EXE) to apply scripts and it works if I call it directly on the SQL server.
But I cannot use it on my build machine because it does not have SQL Serve... | [
-0.0009829431073740125,
0.3139983117580414,
0.1819133460521698,
-0.1602863073348999,
-0.1459556668996811,
0.0693451464176178,
0.5220017433166504,
-0.31401526927948,
-0.38184699416160583,
-0.5080219507217407,
0.14441248774528503,
0.5434302091598511,
-0.19488225877285004,
0.14948245882987976... | |
> and then you can use that to run any scripts or anything else from C#.
> so you could create a project that does the stuff with SMO and use it in your build setup.
> * Microsoft SQL Server 2005 Command Line Query Utility: installs just SQLCMD and do stuff with that. | [
0.13371075689792633,
0.017308736220002174,
0.18556222319602966,
-0.059014976024627686,
-0.3441237807273865,
-0.45814985036849976,
0.21247468888759613,
0.05748295411467552,
-0.04669629782438278,
-0.4508391320705414,
0.06549572199583054,
0.36004653573036194,
-0.31784504652023315,
-0.18222990... | |
Writing the code for the user authentication portion of a web site (including account registration, logins, and password resets) is pretty simple, but what do you need to make a really *good* user authentication setup? For example, I'd consider not storing plaintext passwords to be a bare minimum requirement for a web ... | [
0.6884718537330627,
0.41526156663894653,
-0.06249872222542763,
0.2350018471479416,
0.1631225049495697,
-0.3398300111293793,
0.3304769992828369,
-0.028146423399448395,
0.1099575087428093,
-0.37818482518196106,
0.08185096085071564,
0.5989092588424683,
-0.131911039352417,
-0.39459744095802307... | |
should they be email addresses? Any pitfalls for the user registration portion? (CAPTCHAs are probably worth a whole topic by themselves.) Any pitfalls for the password reset portion? Anything else?
### Edit:
Somewhat duplicated here : [best-practices-for-login-pages](https://stackoverflow.com/questions/243957/best-p... | [
0.5227476954460144,
0.23722095787525177,
0.3846535086631775,
0.19058409333229065,
-0.29272910952568054,
-0.3581579029560089,
0.13041645288467407,
0.02579345367848873,
-0.24013419449329376,
-0.333298921585083,
0.2448348104953766,
0.4907270669937134,
0.1176435574889183,
-0.3260994553565979,
... | |
anywhere else that were miraculously found by spammers. When a spammer has flooded your site with zillions of identical posts about viagra you'll regret not taking the extra 20 mins to install a captcha. [reCaptcha](http://recaptcha.net/) has some [plugins](http://recaptcha.net/resources.html) that make installing it p... | [
0.5426704287528992,
-0.024258259683847427,
0.4347825050354004,
0.28116869926452637,
0.0659111887216568,
-0.5661880373954773,
0.6029992699623108,
0.10869960486888885,
-0.3054731488227844,
-0.45727646350860596,
0.034158941358327866,
0.6333121061325073,
-0.12828564643859863,
-0.06492823362350... | |
passwords straight away.
**Emails**
DON'T bother trying to implement complex regex's that cover all possible email addresses. Do a simple check for an @ and then let the user click on a link sent to their email address to verify. This is common practice these days but I still come across people trying to get 'clever... | [
0.41770344972610474,
0.22696377336978912,
0.2938438355922699,
0.2657448649406433,
0.1978568732738495,
-0.34093737602233887,
0.24780218303203583,
0.10715122520923615,
-0.36459824442863464,
-0.6926258206367493,
-0.06690571457147598,
0.5915238857269287,
0.24005913734436035,
-0.269472271203994... | |
is acceptable, etc. Users can get frustrated by having to re-submit registration forms several times.
**Authentication itself**
It's nice to let people log in with either their username or email address as people are more likely to remember email addresses than usernames, especially if they haven't been to your site... | [
0.5198734998703003,
0.0006549747195094824,
0.46056780219078064,
0.136252298951149,
0.08825003355741501,
-0.4861346483230591,
0.4285874664783478,
-0.10356524586677551,
-0.08552249521017075,
-0.6460933089256287,
-0.10272414237260818,
0.03833429142832756,
0.14685828983783722,
-0.1569861024618... | |
considerably more difficult to brute force passwords. | [
-0.417399138212204,
0.03668608516454697,
-0.235494464635849,
0.36157336831092834,
-0.003027150873094797,
-0.08075911551713943,
0.3359115719795227,
-0.0041963509283959866,
0.09990343451499939,
-0.6989962458610535,
-0.42396992444992065,
0.6524789929389954,
0.02687925100326538,
-0.11655747890... | |
Does anyone have any experience migrating from one DBMS to another? If you have done this, why did you do it? Features? Cost? Corporate Directive?
At times, I've worked with DBAs who insisted that we not use features specific to a DBMS (for example, CLR Stored Procedures in SQL Server.) The DBAs point is, if we use th... | [
0.7872851490974426,
0.14018315076828003,
-0.06143651530146599,
0.15286920964717865,
0.18973805010318756,
-0.3511415719985962,
0.012858097441494465,
0.11924897134304047,
-0.45163780450820923,
-0.6061015129089355,
0.0030258395709097385,
0.6236860156059265,
-0.18694038689136505,
0.41592818498... | |
DBMS regardless of how many features you use is going to be difficult. There are minute differences between the systems (like some record Date and some record date and time) that will cause a huge headache to change. There is no such thing of just switching to a new dbms.
From a business perspective there is a lot of... | [
0.5259429812431335,
0.1417512595653534,
0.44868388772010803,
0.19255690276622772,
0.012467626482248306,
-0.2564753592014313,
0.2524021565914154,
-0.020275704562664032,
-0.3135809898376465,
-0.7503571510314941,
-0.06685091555118561,
0.545189619064331,
-0.29567068815231323,
0.302424013614654... | |
switch like that on an enterprise system takes months if not years. The last place I worked had to change dbs, and it took us a solid 11 months to do it and about 2 million dollars for consultants, hardware, software, and employee salaries. It's a big deal. If someone is saying not to use features, because that "may" h... | [
0.6189025640487671,
-0.16757985949516296,
0.15821896493434906,
0.48526912927627563,
0.5825347900390625,
-0.1124347448348999,
0.16190901398658752,
0.1498180329799652,
-0.2986653447151184,
-0.5934270024299622,
-0.17905351519584656,
0.5839830040931702,
0.14845146238803864,
0.0625789612531662,... | |
will save time and money now buy using those features, then that is the best course of action.
We did it because the systems we had running on the old dbms were too big. There was too much data, and we needed something a lot more powerful. Plus, it wasn't supported anymore. | [
0.20020686089992523,
0.03799434006214142,
0.138742133975029,
0.4743839502334595,
0.3354039490222931,
-0.3145500123500824,
0.3856939375400543,
0.08277899026870728,
0.1369582712650299,
-0.45194724202156067,
0.16545064747333527,
0.5462133884429932,
-0.08544473350048065,
0.12820255756378174,
... | |
I have a Windows forms project (VS 2005, .net 2.0). The solution has references to 9 projects. Everything works and compiles fine on one of my computers. When I move it to a second computer, 8 out of the 9 project compile with no problem. When I try to compile the 9th project (the main project for the application - pro... | [
0.3155289590358734,
0.287733256816864,
0.6087557673454285,
-0.2974901795387268,
0.20354406535625458,
0.26222723722457886,
0.5207975506782532,
-0.098746158182621,
-0.25816816091537476,
-1.0263473987579346,
-0.1352217197418213,
0.342041015625,
-0.30979123711586,
-0.04482858628034592,
0.156... | |
properties and all of the projects are set to build in Debug mode, none of them are supposed to be signed. In the project that is failing, the only assembly that it references that is not in any of the other projects is Microsoft.VisualBasic (a .net 2.0 assembly). So I am at a loss to find what ids causing this error (... | [
0.2376144975423813,
0.24469755589962006,
0.12376914173364639,
0.2735311686992645,
0.15727728605270386,
-0.2904074192047119,
0.4683665931224823,
-0.031246239319443703,
-0.2909635603427887,
-0.6016219258308411,
0.03416582942008972,
0.664024829864502,
-0.1320665180683136,
0.304779052734375,
... | |
the dev environments between the dev environment where this worked and the current one is that the first was XP and this is Vista64. However, a colleague of mine who is using XP is getting the same error.
**Third-party assemblies being used:**
* ComponentFactory.Krypton.Toolkit
* ComponentFactory.Krypton.Navigator
* ... | [
0.37468039989471436,
0.004648071248084307,
0.31333085894584656,
-0.006027524825185537,
-0.35177451372146606,
-0.05209577456116676,
0.4624106287956238,
0.00510060042142868,
-0.21722374856472015,
-0.954521656036377,
0.08765488862991333,
0.49269747734069824,
-0.4954817295074463,
0.24840551614... | |
the following:
There had been a licenses file in the Properties of the project in question. After deleting the file (it was no longer needed) the project was able to build successfully. So it looks like that was the culprit. | [
0.24982912838459015,
0.07748106122016907,
-0.1419609785079956,
0.36286062002182007,
0.4263955056667328,
-0.5352602005004883,
0.2244957983493805,
0.2173929661512375,
-0.06136951595544815,
0.0973130315542221,
0.21697381138801575,
0.3884384334087372,
-0.0043367743492126465,
0.5175836086273193... | |
I'm working on an online tool for students in my faculty to calculate their final grade for their degrees, and for a while I've had little problems. Students seem to like using the new UI and I've suffered no criticism for a while. Now, I need to add some functionality to the program, meaning the UI will have to chance... | [
0.4333510994911194,
0.06523265689611435,
0.6125255227088928,
0.00758675392717123,
0.09139622002840042,
-0.057575445622205734,
0.15985263884067535,
0.1572532206773758,
-0.30400264263153076,
-0.7212978601455688,
0.24669235944747925,
0.34695863723754883,
0.4434042274951935,
0.1701644062995910... | |
whether a UI should ever really be changed if users seem to like it. Should a UI be updated after a number of years to keep users interested/be more efficient? Should features be held back in sake of a clean UI?
Funny. I'm in that very spot right now. Our web-based system has a UI that was designed around solid usabili... | [
0.6773340702056885,
-0.02916513755917549,
0.3940387964248657,
0.09336192905902863,
-0.0163388941437006,
0.004998720716685057,
0.14186090230941772,
0.27779439091682434,
-0.28968802094459534,
-0.5291134119033813,
0.10652908682823181,
0.5534921884536743,
-0.03901506960391998,
0.15398490428924... | |
user feedback, they are perhaps marketing to the wrong audience if only "sizzle" will win them over, but still...
I let them loose withing some carefully chosen parameters to redesign the main UI (menu look and feel, logo placement), and if it does not negatively affect the usability, then I make the changes. As I sai... | [
0.5297381281852722,
0.1301458328962326,
0.6996464133262634,
0.14678293466567993,
-0.12288901954889297,
-0.027698678895831108,
0.2186857908964157,
0.3609895408153534,
-0.17927123606204987,
-0.40800318121910095,
0.05546490475535393,
0.4097616374492645,
0.1578504890203476,
0.03309902548789978... | |
positively to the changes as well. They feel as if we're "keeping current" each time we change, but always mention that they LOVE the fact that we don't tamper with the working of the site.
Cheers,
-R | [
0.7954339385032654,
0.07371952384710312,
0.6435280442237854,
0.0979333147406578,
-0.0481608621776104,
-0.2466299682855606,
0.42777252197265625,
0.07571512460708618,
-0.23345772922039032,
-0.22028686106204987,
-0.2030266523361206,
0.6808384656906128,
0.5178009867668152,
0.052489232271909714... | |
The JUnit framework contains 2 `Assert` classes (in different packages, obviously) and the methods on each appear to be very similar. Can anybody explain why this is?
The classes I'm referring to are: [`junit.framework.Assert`](http://junit.org/junit/javadoc/4.5/junit/framework/Assert.html) and [`org.junit.Assert`](ht... | [
0.17440490424633026,
0.08463376015424728,
0.2111777812242508,
-0.060251470655202866,
-0.7185400128364563,
-0.14292611181735992,
0.37289273738861084,
-0.3612654209136963,
0.3235534727573395,
-0.5788084268569946,
0.14170235395431519,
0.49605995416641235,
-0.015980621799826622,
0.060653876513... | |
of the new `Assert` class. That's why all the assert methods in the new class are static methods. So you can import it this way:
```
import static org.junit.Assert.*;
```
After this static import, you can use this methods without prefix.
At the redesign they also moved to the new package `org.junit` that follows be... | [
0.004794910550117493,
-0.10465948283672333,
0.23736786842346191,
-0.09245298057794571,
-0.5830080509185791,
-0.10860120505094528,
0.19717508554458618,
-0.07885268330574036,
-0.12189598381519318,
-0.5129116773605347,
-0.07491861283779144,
0.7883866429328918,
-0.20424334704875946,
0.27070075... | |
I ask this because at work I am supposed to develop a web-application that is used in an intranet, by two people. It's an application that should keep some states in a workflow. So I have to keep data in a session and have to care about concurrency. It would be so much easier to develop a normal desktop-application. Bu... | [
0.7127213478088379,
0.26504620909690857,
0.205533966422081,
0.05324820801615715,
0.035069022327661514,
0.08357656002044678,
-0.062156882137060165,
-0.2543085515499115,
-0.32935240864753723,
-0.4438489079475403,
0.2376929521560669,
0.3459842801094055,
-0.20666930079460144,
0.131219610571861... | |
it on the computers of them.
So I want to know: What are the reasons, why webapps are so popular these days? Is it a hype and in two years the clients will demand more desktop-applications? Or is there something about webapps that makes them especially sexy/appealing?
Your point in general is false: web applications a... | [
0.5845215320587158,
0.11170098185539246,
0.28071820735931396,
0.5265910625457764,
-0.0024790174793452024,
-0.1284865140914917,
0.153554305434227,
0.4372987449169159,
-0.7863540649414062,
-0.6404510736465454,
0.11002473533153534,
0.4711172878742218,
-0.06605757772922516,
0.176924929022789,
... | |
you happen to disagree with their evaluation, you could try to persuade them that your experience suggests that a web app is not the best fit for this.
Or perhaps you should consider exploring continuation-based web frameworks, such as [Seaside](http://www.seaside.st/). They make persisting state through stateless int... | [
0.2354889065027237,
-0.2712695300579071,
0.2872881293296814,
0.20574155449867249,
0.2570306360721588,
-0.09511713683605194,
0.688450276851654,
0.22061078250408173,
-0.4845825135707855,
-0.21015363931655884,
-0.22491860389709473,
0.4705897867679596,
0.08359634876251221,
0.14611245691776276,... | |
I'm evaluating Microsoft Team Foundation Server for my customer, who currently uses Visual SourceSafe and nothing else. They have explicitly expressed a desire to implement a more rigid and process-driven environment as their application is in production and they have future releases to consider.
The particular areas ... | [
0.08596737682819366,
0.20098835229873657,
0.00968882068991661,
0.04464147984981537,
-0.28916823863983154,
-0.13170532882213593,
0.10504802316427231,
-0.3656322956085205,
-0.09065432101488113,
-0.5858545899391174,
-0.06402801722288132,
0.6319100260734558,
0.07353780418634415,
-0.45407965779... | |
well, but it's expensive and complex to maintain, and the inexpensive Workgroup edition doesn't scale. We don't get TFS as part of our MSDN subscription.
Those problems can be overcome, but before I tell my customer to go the TFS route, which in itself isn't a terrible thing, I wanted to evaluate the alternatives. I k... | [
0.45830386877059937,
-0.08653120696544647,
0.0787244588136673,
0.27199921011924744,
-0.06674829125404358,
-0.37576234340667725,
0.175429567694664,
0.14720022678375244,
-0.21038316190242767,
-0.4454469084739685,
0.07391238212585449,
0.5973643660545349,
-0.25818371772766113,
0.00101763766724... | |
TFS since we're already invested in the Microsoft stack?
Good question(s). I've never used TFS but all this certainly is possible with a number of tools. The biggest hurdle is the culture and mindset of the company and developers.
I am pro SVN. (But TFS would work I am sure)
I'd suggest very light intrusion on daily... | [
0.46413904428482056,
0.053871121257543564,
0.10903068631887436,
-0.00020717848383355886,
-0.3306346833705902,
-0.35842958092689514,
0.1392485499382019,
-0.04382973164319992,
-0.14113228023052216,
-0.632477343082428,
-0.2174888551235199,
0.6629303693771362,
-0.21923497319221497,
0.031906116... | |
is basically defined by the project team and can be helped with simple tools or just enforced by policy.
Release management is also policy based and uses the existing framework/tools (SVN)
Most any of the popular defect/issue tracking systems will handle the Incident and Document management - think wiki with trac or ... | [
0.4860980808734894,
-0.06503237038850784,
0.15936557948589325,
0.2585054636001587,
-0.11382156610488892,
-0.3240866959095001,
0.03508748486638069,
-0.16846834123134613,
-0.04336422681808472,
-0.1598963737487793,
-0.09852806478738785,
0.680112898349762,
-0.014941184781491756,
-0.28236988186... | |
you have more than enough tools in any scenario to satisfy this
I am not sure what you really need as far as integration with 2008. In any case this not much can be as as tightly coupled as TFS, but I don't see that as a problem.
(I think you answered your own question.) This may end up being a religious war between... | [
0.3038996458053589,
0.008256752043962479,
0.43643128871917725,
0.23939210176467896,
-0.2817517817020416,
-0.11177095025777817,
0.3717852532863617,
-0.036069463938474655,
-0.25675585865974426,
-0.6574889421463013,
0.27644261717796326,
0.4461234509944916,
-0.36781826615333557,
0.032172713428... | |
the competition is quite up to the task and I think those tools translate well for other jobs.
As for tools to consider - I think searching Stack overflow for nant, msbuild, cruisecontrol, etc will give you more content than you can shake a stick at... | [
-0.08069910109043121,
-0.16823703050613403,
0.4906740188598633,
0.26910117268562317,
-0.04827463999390602,
-0.2828967869281769,
-0.13263295590877533,
0.19982825219631195,
-0.6145705580711365,
-0.48230835795402527,
0.0937495008111,
0.5930778980255127,
0.33235636353492737,
-0.035145848989486... | |
I have a form that contains a bunch of checkboxes. Before submitting the form, I'd like to grab the values of the checkboxes and stick them into a text field, then submit that.
So I might have:
Red
Orange
X Yellow
Blue
X Green
And I'd like my textfield to end up with the content "Yellow, Green" .
This doesn't se... | [
0.48910385370254517,
0.029466917738318443,
0.4959009289741516,
-0.006407334469258785,
-0.1014825627207756,
0.08276430517435074,
0.13050499558448792,
0.05777100846171379,
0.07657646387815475,
-0.8544700145721436,
0.06755281239748001,
0.4483233690261841,
-0.24593254923820496,
-0.107335433363... | |
var serializedCheckboxes = '';
$("input[type=checkbox]").each(function() {
if($(this).attr("checked")) {
serializedCheckboxes += (serializedCheckboxes != '' ? ', ' : '') + $(this).attr("value");
}
});
$("input[name=allchecks]").attr("value", serializedCheckboxes);
... | [
-0.12434537708759308,
-0.2474650740623474,
0.9179832339286804,
-0.11252208054065704,
-0.3482070565223694,
-0.07679963111877441,
0.5074959397315979,
-0.641563355922699,
-0.07266590744256973,
-0.7536578178405762,
-0.2730875313282013,
0.4925488531589508,
-0.5987809300422668,
0.326446622610092... | |
I'm trying to get the following SQL statement to work:
```
UPDATE myschema.tableA update_tableA
SET field_id =
( SELECT src.field_id
FROM myschema.srcTable src
INNER JOIN myschema.tableB tableB ON
update_tableA.id = tableB.id
AND SDO_ANYINTERACT( tableB.shape, src.sh... | [
0.2612634301185608,
0.23437418043613434,
0.37732842564582825,
-0.3506912887096405,
0.08017018437385559,
-0.2591671347618103,
0.5456723570823669,
-0.2846762537956238,
0.11019960045814514,
-0.4041561782360077,
-0.014425838366150856,
0.7800224423408508,
-0.38934436440467834,
-0.03002840839326... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.