text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
Consider these 2 examples...
```
$key = 'jim';
// example 1
if (isset($array[$key])) {
// ...
}
// example 2
if (array_key_exists($key, $array)) {
// ...
}
```
I'm interested in knowing if either of these are better. I've always used the first, but have seen a lot of people use the second example on th... | [
0.06892558932304382,
0.06737411022186279,
0.018838075920939445,
-0.3780684769153595,
-0.18474210798740387,
-0.22473332285881042,
0.3125079274177551,
-0.27805688977241516,
0.004973098635673523,
-0.5286300778388977,
-0.1937326192855835,
0.5844110250473022,
-0.52274090051651,
-0.2154815942049... | |
I've been looking at the SqlPubWiz.exe command to write a batch file so that I can keep my script up to date in my source control. But what I need is for the command line tool to allow me to pick specific tables to include (and that I can exclude others).
I think SqlPubWiz.exe won't do that for me (let me know if I'm w... | [
0.41659343242645264,
0.09504937380552292,
0.02557584084570408,
-0.08668209612369537,
-0.2111046463251114,
-0.18596650660037994,
0.19267652928829193,
0.10596560686826706,
-0.31763872504234314,
-0.688297688961029,
0.272551953792572,
0.40471088886260986,
-0.11738552898168564,
0.02509786188602... | |
an article showing off a free tool - however, it will only script ALL objects from your database: [Eric Moreau's blog](http://www.emoreau.com/Entries/Articles/2009/02/Scripting-your-Microsoft-SQL-Server-database-objects.aspx).
If you want to "roll your own", have a look at the Server Management Objects (SMO) - those a... | [
0.17933011054992676,
0.19515317678451538,
0.2506304383277893,
0.2291218787431717,
-0.18944646418094635,
-0.2721068561077118,
0.27936720848083496,
0.14695234596729279,
-0.3275695741176605,
-0.4079338610172272,
-0.1280680000782013,
0.3245137631893158,
-0.2543535530567169,
-0.1032977923750877... | |
I have got a form which a user can use to create a new store and to edit an existing one. When this form is being used to edit a store there are certain fields that I want the user to see but not edit eg. store\_id. I have explored the different Zend\_Form\_Elements hoping to find some kind of static element but with n... | [
0.6080061793327332,
0.049813248217105865,
0.2957369387149811,
-0.04802669212222099,
0.08800924569368362,
0.04683908820152283,
0.12795618176460266,
0.031174518167972565,
-0.06969679892063141,
-0.5503899455070496,
0.2907011806964874,
0.6161245107650757,
-0.20831921696662903,
0.33440110087394... | |
to the formNote helper eg. $element->helper = 'formNote'. The result of this was that the value gets displayed as straight text instead of being inside a form element.
Thanks for your answers. | [
0.058004654943943024,
-0.08957603573799133,
0.6426929235458374,
0.401122123003006,
-0.17897599935531616,
-0.26738327741622925,
0.2799048125743866,
0.057668618857860565,
-0.08338671177625656,
-0.45972752571105957,
-0.28612589836120605,
0.23651476204395294,
-0.07085359841585159,
-0.416199296... | |
I have a structure that has an array of pointers. I would like to insert into the array digits in string format, i.e. "1", "2", etc..
However, is there any difference in using either sprintf or strncpy?
Any big mistakes with my code? I know I have to call free, I will do that in another part of my code.
Many thanks ... | [
0.13440103828907013,
0.25674980878829956,
0.33414286375045776,
-0.2113495171070099,
0.009906535968184471,
0.10284607857465744,
0.40206825733184814,
-0.2435617446899414,
-0.2322523295879364,
-0.662615180015564,
-0.04393785819411278,
0.5898623466491699,
-0.4021593928337097,
0.094036281108856... | |
allocate memory */
ports[port].collect_digits[marker] = (char*) malloc(sizeof(digit)); /* sizeof includes 0 terminator */
// sprintf(ports[port].collect_digits[marker++], "%s", digit);
strncpy(ports[port].collect_digits[marker++], digit, sizeof(ports[port].collect_digits[marker]));
}
```
Yes, your code has... | [
-0.28504157066345215,
0.024884970858693123,
0.18262118101119995,
0.03759763389825821,
0.18808551132678986,
0.07816482335329056,
0.11279001832008362,
-0.21426041424274445,
-0.32086312770843506,
-0.45768308639526367,
-0.35133352875709534,
0.4513949751853943,
-0.21224480867385864,
-0.20276287... | |
be changed, or is it controlled by a static variable?
Do you want to store only single digits per slot in the array, or multiple-digit numbers?
Here's how that function could look, given the declaration:
```
/* Initialize the given port position to hold the given number, as a decimal string. */
static void g_store_d... | [
0.250644713640213,
-0.3636687994003296,
0.4667418599128723,
-0.24636201560497284,
0.39349856972694397,
0.4913451075553894,
-0.1130656898021698,
-0.39900729060173035,
-0.5178759694099426,
-0.5297423601150513,
-0.14130260050296783,
0.7001285552978516,
-0.6674085855484009,
0.17205318808555603... | |
I know there is a Wizard control available but what I want is so simplistic I cannot figure out where I started veering off the deep end here. When a user puts in their name and hits next I want the calendar control to become selecatable for a start date. I have the ability to mark the start date as green. I want them ... | [
0.1104532852768898,
-0.18076449632644653,
0.43652138113975525,
0.025475412607192993,
0.08540543168783188,
-0.14689500629901886,
0.10444164276123047,
0.1494445949792862,
-0.44221606850624084,
-0.3749001622200012,
-0.05297737941145897,
0.6289477944374084,
-0.06690766662359238,
0.083704851567... | |
want them to be able to do that. Once they hit next I want them to be able to chose and end date over and over until they hit next. Then I want them to confirm their coices. I guess the logic isn't so simple ... The code I wrote is so bad. :(. Even the proper fixes hurt my head because StartDateStartPart and EndDateSta... | [
0.1232055276632309,
0.06265496462583542,
0.9294800758361816,
-0.149510458111763,
0.33563512563705444,
-0.10421370714902878,
0.4294404089450836,
-0.10273470729589462,
-0.09767793118953705,
-0.7017389535903931,
-0.19036833941936493,
0.500738263130188,
-0.046278517693281174,
0.236303001642227... | |
sender, EventArgs e)
{
if (iPutName == 0)
{
Label1.Text = TextBox1.Text + " you will be slecting your start and end dates.";
LabelInstructions1.Text = "Please select a begin date and hit next";
Calendar1.SelectionMode = System.Web.UI.WebControls.CalendarSelectionMode.Day;
iPutName = 1;
ViewState... | [
-0.05963027849793434,
-0.46221938729286194,
0.766598105430603,
-0.16063179075717926,
-0.10385608673095703,
0.10031957924365997,
0.2095811367034912,
-0.1156371533870697,
-0.2993485927581787,
-0.4817412197589874,
-0.3380545675754547,
0.32873496413230896,
-0.18458203971385956,
0.1660685241222... | |
"You have not selected a start date please do so.";
}
else if (iSelectedStart < 99)
{
iSelectedStart = 99;
Label1.Text = TextBox1.Text + " you will be slecting your start and end dates.";
LabelInstructions1.Text = "Please select an end date and hit confirm";
ViewState["begin"] = begi... | [
0.11948005110025406,
-0.09528477489948273,
0.8510178327560425,
-0.20339101552963257,
0.40465280413627625,
-0.23501448333263397,
0.2869807779788971,
0.055098988115787506,
-0.02236732840538025,
-0.3576298654079437,
-0.3322478234767914,
0.310884028673172,
-0.0465836301445961,
0.20922859013080... | |
if (iSelectedEnd = 0)
{
LabelInstructions1.Text = "You have not selected a start date please do so.";
}
}
}
}
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
if (iSelectedStart < 99)
{
iSelectedStart++;
begin = Calendar1.SelectedDate;
ViewState["iSelec... | [
0.08809348195791245,
-0.42878830432891846,
0.5791799426078796,
-0.22472158074378967,
0.19625960290431976,
0.1005689948797226,
0.012709149159491062,
-0.002261153422296047,
-0.3727509677410126,
-0.4084900915622711,
-0.2910572588443756,
0.34551191329956055,
-0.14102299511432648,
0.16702903807... | |
"Error you cannot select the same start and end date";
LabelInstructions1.ForeColor = System.Drawing.Color.Red;
}
else
{
end = Calendar1.SelectedDate;
iSelectedEnd = 0;
ViewState["end"] = end;
}
}
}
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
if... | [
-0.2067897915840149,
-0.13341961801052094,
0.2664242386817932,
-0.15444909036159515,
0.19215422868728638,
0.2572009265422821,
0.6183203458786011,
-0.006307522300630808,
-0.3066820800304413,
-0.5084781050682068,
-0.33383259177207947,
0.42187416553497314,
-0.4338553547859192,
0.2689503133296... | |
if (ViewState["iPutName"] != null)
iPutName = (int)ViewState["iPutName"];
if (ViewState["Label1_Text"] != null)
Label1.Text = ViewState["Label1_Text"].ToString();
if (ViewState["LabelInstructions1_Text"] != null)
LabelInstructions1.Text = ViewState["LabelInstructions1_Text"].ToString();
if (ViewSta... | [
-0.10015321522951126,
-0.19320891797542572,
0.4953903257846832,
-0.11494681239128113,
-0.10594110190868378,
-0.35374748706817627,
0.4391193091869354,
-0.31669557094573975,
-0.25301188230514526,
-0.5599182844161987,
-0.31709644198417664,
0.7888216972351074,
-0.3643874228000641,
-0.037080395... | |
then hide or reveal the various panels on postback. It's not as fun or cool as the AJAX approach, but if it's really just a simple little wizard then this is a quick and easy way to do that.
The web form might look something like this:
```
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inh... | [
0.31265556812286377,
-0.15212127566337585,
0.34852880239486694,
0.024234957993030548,
-0.22963273525238037,
-0.31929725408554077,
-0.0173494890332222,
-0.378080815076828,
-0.24875931441783905,
-0.6010245084762573,
-0.19569019973278046,
0.4049365520477295,
0.05295794457197189,
-0.1862115263... | |
<asp:TextBox ID="txtName" runat="server" OnTextChanged="TextBox1_TextChanged"></asp:TextBox></asp:Panel>
</div>
<asp:Panel ID="wizForm2" runat="server" Height="50px" Width="125px" Visible="False">
<asp:Calendar ID="calStart" runat="server"></asp:Calendar>
</asp:Panel>
<asp:Butto... | [
0.08297335356473923,
-0.23436643183231354,
0.709524393081665,
-0.06700851768255234,
0.04190142825245857,
0.1375146359205246,
0.18974611163139343,
-0.44243350625038147,
-0.2960185110569,
-0.8084855079650879,
-0.21644657850265503,
0.7380382418632507,
-0.08348073810338974,
-0.2577276825904846... | |
System.Web.UI.Page
{
protected void btnContinue_Click(object sender, EventArgs e)
{
// validate controls according to business logic
//...
// Hide and reveal panels based on the currently visible panel.
if (wizForm1.Visible) | [
0.06774048507213593,
-0.5017140507698059,
0.4027429223060608,
0.18706215918064117,
0.4538774788379669,
-0.177158921957016,
0.44666939973831177,
-0.15456607937812805,
-0.3821377158164978,
-0.6799136400222778,
-0.4041954576969147,
0.41124990582466125,
-0.37381717562675476,
0.0935754626989364... | |
{
wizForm1.Visible = false;
wizForm2.Visible = true;
}
else if (wizForm2.Visible)
{
// and so on... | [
0.5344522595405579,
-0.5808913707733154,
0.43004876375198364,
-0.2877979874610901,
-0.14700564742088318,
-0.13717098534107208,
0.6166447401046753,
-0.008423810824751854,
0.09283509105443954,
-0.6568204760551453,
-0.07845260202884674,
0.6278902888298035,
0.10079945623874664,
-0.015516152605... | |
}
}
}
}
``` | [
-0.016344990581274033,
0.4495171308517456,
0.23163163661956787,
-0.18499617278575897,
0.39558660984039307,
-0.21481190621852875,
0.08800963312387466,
0.4133334159851074,
0.23730628192424774,
-0.5074179768562317,
-0.3644443452358246,
0.5587084293365479,
-0.3209930658340454,
0.33781036734580... | |
I'm trying to do the simplest thing, to show an alert popup through javascript from my code-behind of a user control (ascx.cs).
I've tried
```
protected void btnSave_Click(object sender, EventArgs e)
{
ScriptManager.RegisterStartupScript(btnSave, GetType(), "uniqueID", "alert('hello');", true);
}
```
as well a... | [
0.2163199782371521,
0.034762345254421234,
0.3836929500102997,
-0.09868229180574417,
-0.24744519591331482,
-0.07364595681428909,
0.2921796143054962,
-0.15625900030136108,
-0.265666127204895,
-0.6950770616531372,
0.032326966524124146,
0.3122255802154541,
-0.3530513346195221,
-0.0680650994181... | |
RadAjaxPanel. I just had to set the EnableOutsideScripts to true on them, like so:
```
<telerik:RadAjaxPanel ID="ajaxpanel" runat="server" LoadingPanelID="ajaxLoadingPanel" EnableOutsideScripts="true">
```
And then I could use the following code:
```
ScriptManager.RegisterStartupScript(btnSave, GetType(), "uniqueID... | [
0.23252001404762268,
0.13476742804050446,
0.40440160036087036,
-0.26113182306289673,
-0.001953585771843791,
-0.09657016396522522,
0.7020700573921204,
-0.19291195273399353,
0.08952514082193375,
-0.5808196663856506,
-0.0031115550082176924,
0.6545703411102295,
-0.199900820851326,
-0.224935740... | |
Genesys is a contact center platform that provides software for working with both hard and soft PBXs. There are also a number of ancillary services they provide to support the wider contact center business.
I'm aware of the .NET and Java SDKs that Genesys supply on a first hand basis. Is there SDK support for any othe... | [
0.51544588804245,
0.03709801286458969,
-0.2794663608074188,
0.19641417264938354,
0.2439386248588562,
0.13179653882980347,
-0.38273435831069946,
0.5305089354515076,
-0.23154467344284058,
-0.8805920481681824,
0.1320924609899521,
0.4036913216114044,
-0.22731350362300873,
0.016591299325227737,... | |
While Mahjong (the actual game, not Mahjong solitare) is fairly simple in terms of basic rules and gameplay, setting objectives for the AI to transition to aim for certain end game goals seems fairly complex.
Is anyone aware of any papers, research, or other materials related to this topic?
I think this could be what... | [
-0.655410885810852,
0.15010249614715576,
0.20492225885391235,
-0.23183487355709076,
0.11059404909610748,
0.04222145676612854,
0.6136773228645325,
-0.1982041448354721,
-0.3653745949268341,
0.09024029970169067,
-0.14497023820877075,
0.23864838480949402,
-0.04236185923218727,
-0.5570272803306... | |
I have a form and up the top it contains four different radio buttons - the rest of the form changes depending on which of these radio buttons are selected. Currently each 'part' of the form is in its own fieldset and I'm hiding/showing these with Jquery.
How can I only submit the data that is relevant to which part o... | [
0.49111104011535645,
0.4949134588241577,
0.35253509879112244,
-0.017284205183386803,
0.049074627459049225,
-0.10833121836185455,
-0.10309779644012451,
-0.4487203359603882,
0.08065273612737656,
-0.25573036074638367,
0.02553601562976837,
0.6405194401741028,
0.024274466559290886,
-0.006783068... | |
thesis written at the Department of Information Technology
>
>
> by Daniel Hellsson
>
>
> with supervisors Jan Eric Larsson and Bengt Öhman
>
>
> 1 September, 2000
<http://www.it.lth.se/janeric/mastersprojects/past/hellsson/mother.pdf> | [
-0.45905613899230957,
0.3074541687965393,
0.19642159342765808,
0.0677708312869072,
0.2153703272342682,
0.6035579442977905,
0.28922516107559204,
-0.21943821012973785,
-0.2823004424571991,
-0.0747702345252037,
-0.0034110748674720526,
0.5395337343215942,
0.44582128524780273,
0.075457260012626... | |
I'm trying to pass ViewData to my asp.net mvc masterpage for an mvc usercontrol that I keep on a masterpage. For example, I created a dropdownlist of names as an mvc usercontrol and I put that in my masterpage.
The problem I am running into is passing the ViewData to the masterpage. I found this article from Microsoft... | [
0.355363667011261,
-0.06350469589233398,
0.30360177159309387,
0.026135999709367752,
-0.173188716173172,
-0.19224052131175995,
0.16800613701343536,
0.19524803757667542,
-0.4688474237918854,
-0.8037011623382568,
0.010966142639517784,
0.37959155440330505,
-0.2835061550140381,
0.58326083421707... | |
The problem I am looking at is the fact that if I place a user control in my masterpage that relies on ViewData, I have to **REPEATEDLY** include that ViewData for every single page that uses said masterpage. It's possible the solution in the link above is the best solution but I was hoping there were other alternative... | [
0.12528234720230103,
0.20014269649982452,
0.3449694514274597,
0.33379071950912476,
0.07045569270849228,
-0.19901563227176666,
0.21594303846359253,
0.2475271224975586,
-0.40522244572639465,
-0.6643842458724976,
-0.05206207185983658,
0.5017532706260681,
-0.3253447115421295,
0.435480505228042... | |
put the object on the cache so your database isn't called for every controller initialisation. | [
0.33578357100486755,
-0.2634742856025696,
0.031351830810308456,
0.46677008271217346,
0.21372482180595398,
-0.33897721767425537,
0.008565220050513744,
0.015679175034165382,
-0.03581273928284645,
-0.49325934052467346,
-0.11868380010128021,
0.3658512532711029,
-0.017439881339669228,
0.1618531... | |
We are looking at implementing a card-reader program for a integrated computer. The computer is a touch-screen with an embedded computer, running Windows XP, and a cardreader integrated into the screen.
The reader is a USB device, but unfortunately integrated so tightly into this screen/computer that I cannot detach i... | [
0.24822945892810822,
0.045551370829343796,
0.6095963716506958,
0.25756460428237915,
0.2777446508407593,
-0.25393977761268616,
-0.2862445116043091,
-0.07480883598327637,
0.12806089222431183,
-0.7079339027404785,
0.04497000202536583,
0.7560020685195923,
-0.13885074853897095,
0.10958825796842... | |
a .NET application we need to reimplement it using P/Invoke.
Thus, testing this will be a pain since I will probably have to continously copy new files onto the machine and have a ton of logging to figure out what goes wrong.
Or do I? What else can I do? Running Visual Studio on that machine will be a bigger pain tha... | [
0.711608350276947,
-0.13320139050483704,
0.24399782717227936,
0.34948524832725525,
-0.1078675240278244,
-0.3663698434829712,
0.455093652009964,
0.012666335329413414,
-0.213074192404747,
-0.6963303685188293,
0.13202445209026337,
0.7589719295501709,
0.013079297728836536,
0.08577391505241394,... | |
or advice anyone can give?
Take a look at [USB Over Network](http://www.fabulatech.com/usb-over-network.html) or a similar program. You can make the remote USB port appear as a virtual port on your dev machine and do your debugging locally. | [
0.7083364725112915,
-0.1464480608701706,
0.11080155521631241,
0.426539808511734,
0.10567005723714828,
-0.3606804609298706,
0.22654429078102112,
0.4766428768634796,
-0.14379574358463287,
-0.6641114950180054,
0.20064568519592285,
0.7494046092033386,
-0.04716157913208008,
0.2316415160894394,
... | |
I'm working on a WinForms SmartClient application, which uses a lot of RichTextBox controls - some in place of the regular TextBox for various reasons. Unfortunately the RichTextBox draws the ugly Win95 3D border instead of the themed XP or Vista style border.
Does anyone know of a way to apply the themed border to th... | [
0.5331026911735535,
-0.09695442020893097,
0.49202612042427063,
0.30250975489616394,
-0.034504834562540054,
-0.2995414435863495,
0.26616695523262024,
0.22409892082214355,
-0.11002510786056519,
-0.7850678563117981,
0.11175570636987686,
0.5887637138366699,
-0.264406681060791,
0.10412916541099... | |
set the BorderStyle to none. Then set the Dock property of the RichTextBox to Fill.
This will give you a RichTextBox with a flat border. | [
0.11529898643493652,
-0.3380741477012634,
0.6465417742729187,
-0.03702035918831825,
0.16128282248973846,
-0.31926190853118896,
-0.012167747132480145,
-0.02607770450413227,
-0.20968793332576752,
-0.8504391312599182,
-0.047459010034799576,
0.534176766872406,
-0.3364952504634857,
-0.046559717... | |
I want to give users access to WebDav using Apache, but I want to autenticate them first and give each user access to a specific folder. All authentication must be done against a Django-based database. I can get the Django-authentication working myself, but I need help with the part where I authenticate each user and p... | [
0.5930773019790649,
0.29923126101493835,
0.2880134582519531,
-0.057938266545534134,
-0.17097888886928558,
-0.39828765392303467,
0.27503323554992676,
-0.3527495265007019,
0.08514679223299026,
-0.5535730123519897,
0.005970156751573086,
0.4415459632873535,
-0.2127418965101242,
0.1431370973587... | |
you are trying to protect:
```
<Directory /usr/www/myhost/private>
# other config ere
# mod_authn_dbd SQL query to authenticate a user
AuthDBDUserPWQuery \
"SELECT password FROM authn WHERE user = %s"
</Directory>
```
Strictly speaking, this means you're authenticating against Django's database... | [
0.42545509338378906,
0.4124482572078705,
0.19370003044605255,
-0.0028753001242876053,
-0.11547878384590149,
-0.4602964520454407,
0.28536152839660645,
-0.22437992691993713,
-0.08975327759981155,
-0.2840980291366577,
-0.0352354496717453,
0.6471421718597412,
-0.13253246247768402,
-0.090193711... | |
need to fuss around a bit to make sure the hashing mechanisms used are the same in both apache and django.
If this doesn't suit, consider moving your authentication out of the django database into, say, an LDAP server. With a custom authentication backend (there are existing LDAP implementations for django out there),... | [
0.19667455554008484,
0.1465916782617569,
0.20090314745903015,
0.20652110874652863,
-0.31913113594055176,
-0.6425015330314636,
-0.10712330788373947,
-0.14384634792804718,
-0.09504459798336029,
-0.6303065419197083,
-0.03542640805244446,
0.5138670802116394,
-0.3566829562187195,
-0.15772056579... | |
I want to add a simple kind of MAC to some of my URL parameters. This is *only* intended as an additional line of defense against application bugs and caching related problems/bugs, and not intended as any form of replacement of the actual login security in the application. A given business-object-id is already protect... | [
0.07382751256227493,
0.3560025990009308,
0.7737672328948975,
0.15473206341266632,
0.2467283457517624,
0.03179679065942764,
0.232455775141716,
0.05755157023668289,
-0.09347444772720337,
-0.44028010964393616,
-0.15747131407260895,
0.7334914207458496,
-0.23818181455135345,
-0.0301686376333236... | |
= hash, but I am open to suggestions.
The primary intention is to stop id guessing, and to make sure that url's are fairly distinct per logged on user. I also *don't* want something big and clunky like an MD5.
Since you aren't looking for cryptographic quality, maybe a 24-bit CRC would fit your needs. While MD5 is "fa... | [
0.012756191194057465,
0.17082595825195312,
0.21399922668933868,
-0.0823260247707367,
-0.054043181240558624,
-0.05620678514242172,
0.09054027497768402,
-0.17963577806949615,
-0.2754910886287689,
-0.47421780228614807,
-0.21698784828186035,
0.5001057386398315,
-0.21164461970329285,
0.09984919... | |
(int octets = 0; octets < data.length; ++octets) {
crc ^= (data[octets] & 0xFF) << 16;
for (int i = 0; i < 8; ++i) {
crc <<= 1;
if ((crc & 0x1000000) != 0)
crc ^= 0x1864CFB;
}
}
byte[] b = new byte[3];
for (int shift = 16, idx = 0; shift >= 0; shift -= 8) {
b[idx++] = (byte) (c... | [
-0.08056775480508804,
0.11949814110994339,
0.760593831539154,
-0.37952619791030884,
0.03884812816977501,
0.40483710169792175,
0.1215825304389,
-0.7090951204299927,
-0.37746429443359375,
-0.28844019770622253,
-0.45796048641204834,
0.47957468032836914,
-0.3207013010978699,
0.1490137279033661... | |
return b;
}
```
I would hash a secret key (which is known only by the server), together with whatever you want to protect—probably the combination of object identifier and user identifier. | [
-0.05055677145719528,
0.18647252023220062,
0.047887276858091354,
-0.21878214180469513,
-0.01981622353196144,
-0.06945667415857315,
0.16897422075271606,
0.09873761236667633,
0.2631528973579407,
-0.3706203103065491,
-0.20846344530582428,
0.34262987971305847,
-0.2759253978729248,
0.3219957649... | |
Ok it might sounds dumb, but I couldn't figure out a way to pass int/char into this system call
here is how I would like it to work
```
system ("cal %d %d", month, year);
```
I expect this will give me the following command on terminal "`cal 3 2009`"
and the terminal will show me the calendar of March 2009.
But... | [
0.07259925454854965,
0.13274022936820984,
0.8095320463180542,
-0.25323566794395447,
-0.03501719608902931,
0.030821900814771652,
0.2228241264820099,
0.18066337704658508,
0.07507574558258057,
-0.6002375483512878,
0.21570803225040436,
0.8093869686126709,
-0.0638129860162735,
0.248742267489433... | |
it for you:
```
char cmd[64];
snprintf(cmd, sizeof cmd, "cal %d %d", month, year);
system(cmd);
```
The usual caveats about [buffer overflow](http://en.wikipedia.org/wiki/Buffer_overflow) apply, although in this particular case when both arguments are integers you should be fairly safe. | [
-0.013632062822580338,
0.05397262051701546,
0.5878662467002869,
-0.19703936576843262,
0.2395370453596115,
-0.03370190039277077,
0.194419264793396,
0.12183073908090591,
-0.17299069464206696,
-0.17014572024345398,
-0.3199470043182373,
0.5653123259544373,
-0.09506506472826004,
-0.120954275131... | |
I have a JTree that implements multi selection logic.
This works great when I do all my selections using the mouse + Ctrl key pressed. If user makes selections with the Ctrl key unpressed it breaks my logic.
I can't really see why it breaks but I think that a possible solution is to always indicate the TreeSelectionM... | [
-0.08478248119354248,
-0.21533969044685364,
0.3664149343967438,
-0.037188947200775146,
-0.01071830652654171,
0.08968938142061234,
-0.04006180539727211,
-0.380849689245224,
-0.38006800413131714,
-0.718982994556427,
0.03786563500761986,
0.577707052230835,
-0.5091575384140015,
-0.122703835368... | |
+ path + ")");
addSelectionPath(path);
return;
//super.setSelectionPath(path);
}
@Override
public void setSelectionPaths(TreePath[] paths) {
System.out.println("MLDebugJTree: setSelectionPaths(" + paths + ")");
addSelectionPaths(paths);
return;
}
@Override
public void setSelectionRow(int ... | [
-0.3224886655807495,
-0.16459642350673676,
1.077713966369629,
-0.2638702690601349,
0.05743798986077309,
0.3275459110736847,
0.2346685826778412,
-0.6435593366622925,
-0.36583828926086426,
-0.5993590950965881,
-0.480435848236084,
0.6193693280220032,
-0.3237336277961731,
-0.07596740871667862,... | |
long serialVersionUID = -4270031800448415780L;
@Override
public void addSelectionPath(TreePath path) {
// Don't do overriding logic here because addSelectionPaths is ultimately called.
super.addSelectionPath(path);
}
@Override
public void addSelectionPaths(TreePath[] paths) {
if(paths != null) {
f... | [
0.09962666034698486,
-0.35505080223083496,
0.7506417632102966,
-0.08235204219818115,
0.043158404529094696,
0.04972534626722336,
0.46500203013420105,
-0.23947948217391968,
-0.46035802364349365,
-0.19692766666412354,
-0.030769603326916695,
0.7191690802574158,
-0.40243765711784363,
0.19806148... | |
// If path has been previously selected REMOVE THE SELECTION.
super.removeSelectionPaths(toAdd);
} else {
// Else we really want to add the selection...
super.addSelectionPaths(toAdd);
} | [
0.07190296053886414,
-0.4813782274723053,
0.2862749993801117,
-0.08823148161172867,
0.07736670970916748,
0.06101084500551224,
0.3417154550552368,
-0.16378280520439148,
-0.3034636974334717,
-0.661903440952301,
-0.13368842005729675,
0.5430416464805603,
-0.6334208250045776,
-0.022615354508161... | |
}
}
}
```
HTH. | [
-0.28258591890335083,
0.5030141472816467,
0.32937106490135193,
-0.27421554923057556,
0.33191272616386414,
-0.12146361172199249,
-0.04636280983686447,
-0.05583818256855011,
0.27746444940567017,
-0.512707531452179,
-0.2692289650440216,
0.5537704825401306,
-0.30043846368789673,
0.223948076367... | |
I can't use shared\_ptr in my project, no boost :(
So, I'm having a class roughly similar to the one below:
```
class MyClass
{
private:
std::auto_ptr<MyOtherClass> obj;
};
```
Now, I want to store the instances of above class in std::vector. Is it safe? I've [read here](https://stackoverflow.com/questions/111478... | [
0.08310456573963165,
-0.07741051912307739,
0.014808817766606808,
0.13969358801841736,
0.09118977189064026,
-0.3529246151447296,
0.35072144865989685,
0.03206993639469147,
-0.27760982513427734,
-0.44526955485343933,
-0.016411028802394867,
0.6084766387939453,
-0.45525750517845154,
0.090078771... | |
will happen when it is added to a vector) the copy constructor of the auto\_ptr will be used. This has the weird behaviour of tranferring ownership of the thing being copied to the copy and, so the thing being copied's pointer is now null.
It is possible, though unlikely, that you actually want this behaviour, in whic... | [
0.25438329577445984,
-0.09814465790987015,
0.32837727665901184,
0.08966857939958572,
0.13221338391304016,
-0.21060816943645477,
0.1487845629453659,
0.03075934574007988,
-0.2540145516395569,
-0.5230748057365417,
-0.09977815300226212,
0.7317925691604614,
-0.4045037031173706,
0.03136789053678... | |
of the boost smart pointers | [
-0.3579402565956116,
0.2215043157339096,
0.16840523481369019,
0.3960818648338318,
-0.10297524183988571,
-0.12093126773834229,
0.033775534480810165,
-0.06828100234270096,
0.18631719052791595,
-0.3690256178379059,
0.05372193083167076,
0.8176720142364502,
-0.20594456791877747,
-0.377774059772... | |
Using [feedparser](http://packages.python.org/feedparser/) or some other Python library to download and parse RSS feeds; how can I reliably detect `new` items and `modified` items?
So far I have seen new items in feeds with publication dates earlier than the latest item. Also I have seen feed readers displaying the sa... | [
0.7108141779899597,
0.018892278894782066,
0.14041753113269806,
0.20907200872898102,
-0.3219209611415863,
-0.3004893660545349,
0.21990007162094116,
-0.24161863327026367,
0.023227063938975334,
-0.5246160626411438,
0.1946246176958084,
0.5683309435844421,
-0.510756254196167,
0.0684947073459625... | |
RSS and ATOM sources. For an example, see eg feedparser's [ATOM docs](http://feedparser.org/docs/common-atom-elements.html). Though .id will cover most cases, it's conceivable that a source might publish multiple items with the same id. In that case, you don't have much choice but to hash the item's content. | [
0.557567834854126,
-0.0359373465180397,
-0.05600860342383385,
0.20595042407512665,
-0.18162231147289276,
-0.6347501873970032,
-0.2890176773071289,
-0.10643959790468216,
-0.43738582730293274,
-0.4389082193374634,
-0.030102510005235672,
0.27210232615470886,
-0.7330371737480164,
0.09176152199... | |
I've looked around, and not found much documentation on this, so I thought I'd ask where all the experts hang out.
I would like to create a new start page, with bug tracking and source control interfaces, rather than the standard MSDN feed. I seem to remember that one can do more than just supply a different URL, but ... | [
0.7617906928062439,
-0.10553677380084991,
-0.11448303610086441,
0.27832722663879395,
-0.19152696430683136,
-0.3897225260734558,
0.1112767681479454,
0.3317238986492157,
-0.20850005745887756,
-0.5446857810020447,
-0.028725558891892433,
0.5778308510780334,
-0.004361480474472046,
0.10014280676... | |
user control)](http://blogs.msdn.com/hlong/archive/2005/09/30/475887.aspx) and host your controls there, then its pretty easy to create an addin that will show the tool window as a document at runtime. (The same way that the start-up page looks) | [
-0.1964947134256363,
-0.11839094758033752,
0.6642184853553772,
0.3124072551727295,
0.21643607318401337,
-0.2431899458169937,
-0.0007953386520966887,
-0.09611925482749939,
-0.2066732943058014,
-0.58843594789505,
-0.18714697659015656,
0.6361404061317444,
-0.29473236203193665,
0.1009931415319... | |
It's often the case when I need to check a method's arguments for not being null, something like:
```
public static bool operator <=
(ApplicationVersion i_app1, ApplicationVersion i_app2)
{
if (i_app1 == null) throw new ArgumentNullException("i_app1");
if (i_app2 == null) throw new ArgumentNullException(... | [
0.11456959694623947,
0.06865236163139343,
0.39599254727363586,
-0.07878579944372177,
-0.06527291238307953,
0.04942873492836952,
0.5524803996086121,
-0.21810652315616608,
-0.2122550904750824,
-0.531451940536499,
-0.3590952455997467,
0.5067276358604431,
-0.4948255121707916,
0.159770503640174... | |
`phpinfo` (because chanes were high that I get a `phpinfo()` page that shows the `$_SERVER['HTTP_REFERER']` variable) to show you how the `Http-Referer` will look like:
```
$_SERVER['HTTP_REFERER'] = "http://www.google.de/search?hl=de&q=phpinfo&btnG=Google-Suche&meta="
```
As you see, you can also extract the search... | [
0.1866695135831833,
0.15744388103485107,
0.7316488027572632,
0.10051757842302322,
-0.33901742100715637,
-0.1291968822479248,
0.2644041180610657,
0.08145629614591599,
-0.0348026342689991,
-0.47237637639045715,
-0.012898941524326801,
0.50295090675354,
-0.3484804928302765,
0.03158647939562797... | |
I am trying to install VMWare ESXi 3.5 on a DELL GX280 machine which has SATA configurations. As ESXi doesn't support SATA, i am not able to proceed.
I could able to install on IDE (which is also not supported) by making some changes.
Is there a way to install on SATA as well??
Please let me know if anyone has tried ... | [
0.26982617378234863,
0.19124169647693634,
0.3605861961841583,
0.07968398183584213,
-0.0947381779551506,
-0.2082808017730713,
0.61142897605896,
0.07339616119861603,
0.029588351026177406,
-0.7865522503852844,
0.006013575475662947,
0.666793167591095,
-0.40174171328544617,
0.26627498865127563,... | |
get a `phpinfo()` page that shows the `$_SERVER['HTTP_REFERER']` variable) to show you how the `Http-Referer` will look like:
```
$_SERVER['HTTP_REFERER'] = "http://www.google.de/search?hl=de&q=phpinfo&btnG=Google-Suche&meta="
```
As you see, you can also extract the search term used in the google query (or detect i... | [
0.1804673671722412,
0.1068381741642952,
0.6157491207122803,
0.23865067958831787,
-0.09523618221282959,
-0.19237716495990753,
0.23039311170578003,
0.0018632180290296674,
-0.08099110424518585,
-0.47825896739959717,
-0.23400460183620453,
0.5162572264671326,
-0.3508118987083435,
-0.01846150495... | |
I struggle to show a second form above the main form without losing focus.
I have tried `ShowWindow(second.handle, SW_SHOWNOACTIVATE)`, but the mainform loses focus.
If I set `Visible := false` on the second window, the call to `ShowWindow` does not activate the second form, but the windows is empty when shown...
Doe... | [
0.19022347033023834,
-0.23473982512950897,
0.6518487334251404,
-0.4354803264141083,
-0.2684914469718933,
-0.24253107607364655,
0.9005285501480103,
-0.08515525609254837,
0.07271362841129303,
-0.7891008257865906,
-0.3985920250415802,
0.5684006214141846,
-0.40248340368270874,
0.04558463022112... | |
Form2.Visible := True;
end;
```
Be careful to use **`Visible`**, not **`Show`** ! Otherwise it'll override the `SW_SHOWNOACTIVATE`. | [
0.007368035614490509,
0.01126061286777258,
0.4113459587097168,
-0.49653375148773193,
-0.1813749074935913,
-0.5140576958656311,
0.728060245513916,
-0.05609691143035889,
0.005034145899116993,
-0.5763813257217407,
-0.49393460154533386,
0.4339894652366638,
-0.30326488614082336,
-0.043793845921... | |
I tried sqlite,
by using multi-thread, only one thread can update db at the same time..
I need multi-thread updating the db at same time.
Is there are any DB can do the job?
ps: I use delphi6.
---
I found that sqlite can support multi-threading,
But in my test of asgsqlite, when one thread inserting, others will... | [
0.22503548860549927,
0.07289832830429077,
0.21695266664028168,
0.02543279156088829,
-0.17599600553512573,
-0.02238563261926174,
0.32985764741897583,
-0.26250943541526794,
-0.36937689781188965,
-0.6773419380187988,
0.0958705022931099,
0.5039939284324646,
-0.5512016415596008,
0.1328285485506... | |
second thread to retry for x milliseconds before failing. I think ASqlite surfaces this parameter in the database component (I think I actually wrote that bit of code, all 3 lines, but it was a couple of years ago).
Setting the timeout to a larger value than 0 will allow multiple threads to update the database. Howeve... | [
0.13777633011341095,
-0.21240200102329254,
0.4574529826641083,
-0.053474850952625275,
-0.05223546177148819,
0.09934601932764053,
0.6120144128799438,
-0.14399561285972595,
-0.039366789162158966,
-0.7824634909629822,
0.3471464216709137,
0.45918476581573486,
-0.12405489385128021,
0.0130005059... | |
How can I make my C# application the default "Print Screen" handler in Windows?
I wrote a screen capturing utility and I want to, ideally, have it replace the default print-screen handler, or otherwise have a unique key combination that would trigger it.
I know how to do it in C++ using global hooks, etc., but it's n... | [
0.4465201795101166,
-0.1646169126033783,
0.31403395533561707,
0.08425533026456833,
0.13161882758140564,
-0.2112450748682022,
0.20922459661960602,
-0.1388118863105774,
-0.26703229546546936,
-0.6325973272323608,
-0.05461796373128891,
0.8743630051612854,
-0.4838133752346039,
-0.03558621183037... | |
reason you can't do this in C#. It's one of the few global hooks that can be used in managed code because it doesn't require a DLL to be injected into every target process. Instead the context will switch back to the originating application for processing.
Adam's blog has a great post on how to setup such a hook in C... | [
0.4559746980667114,
-0.15531298518180847,
0.20794062316417694,
0.0564282089471817,
0.2691040337085724,
-0.21786341071128845,
0.2836107611656189,
-0.1969301402568817,
-0.28941968083381653,
-0.5443490743637085,
0.239065483212471,
0.295829176902771,
-0.5634088516235352,
-0.05472627282142639,
... | |
* linux: `$HOME/.config`
* windows: `%APPDATA%`
* mac os: `$HOME/.config`
It can be set using <http://qt-project.org/doc/qt-4.8/qsettings.html#setPath>, but it seems as I am not able to retrieve it.
<http://qt-project.org/doc/qt-4.8/qlibraryinfo.html#location> `QLibraryInfo::LibrariesPath` returns the system wide set... | [
0.038359012454748154,
-0.018477201461791992,
0.37718164920806885,
-0.1663559377193451,
0.12350054830312729,
0.019769733771681786,
0.18875880539417267,
0.047632113099098206,
-0.14593790471553802,
-0.7881571650505066,
0.021059352904558182,
0.5450648069381714,
-0.3802148699760437,
0.257035493... | |
Using top it's easy to identify processes that are hogging memory and cpu, but ocasionally I see my computer's network activity spike, but I'm unable to determine which process is generating the activity. Where is the right place to look for this information?
You can also take a look at "NetHogs": <http://nethogs.sourc... | [
0.3897882103919983,
-0.13144023716449738,
0.15764407813549042,
0.5535190105438232,
0.10074225068092346,
-0.476763516664505,
0.06421338021755219,
0.17561429738998413,
-0.7213707566261292,
-0.6507318615913391,
0.032635755836963654,
0.6199686527252197,
-0.17995063960552216,
-0.112053692340850... | |
I'm a guy used to mootools' way of chaining selectors, and I can't seem to find anywhere how to do the same in jQuery.
Suppose I have a *select element* in the `selectObj` variable. What I need is to get the last option in that select.
In mootools I would have done something like:
```
var option = $(selectObj).getElem... | [
0.19151388108730316,
-0.15610244870185852,
0.15918178856372833,
-0.06078186258673668,
0.4150557816028595,
0.28528720140457153,
-0.12876130640506744,
-0.07757148891687393,
-0.10629542917013168,
-0.6733699440956116,
-0.05955202504992485,
0.5490719079971313,
0.06723010540008545,
0.21330092847... | |
have the resulting element.
```
var option = $(selectObj).children(":last");
```
will return the last child of any element | [
-0.31773775815963745,
-0.22472862899303436,
0.11395437270402908,
-0.17912806570529938,
0.5202040076255798,
0.3382239043712616,
0.1529923975467682,
-0.18342849612236023,
0.08752795308828354,
-0.44469109177589417,
-0.48589539527893066,
0.2880852222442627,
-0.25377029180526733,
0.170571550726... | |
I want to open All external link into new window/tab through php without touching every external link code. and i don't want to this without target="blank".
I can do this through javascript but i want to know if there is a PHP solution.
This job cannot be done with PHP. PHP is on the server side while your problem req... | [
0.3499375581741333,
0.24625661969184875,
0.6160913109779358,
-0.14363858103752136,
-0.13478457927703857,
-0.12128850072622299,
0.2872477173805237,
-0.10699428617954254,
-0.2788774371147156,
-0.827345073223114,
0.010161331854760647,
0.7818238139152527,
-0.26281145215034485,
0.24076913297176... | |
$('a[rel="external"]').click(function() {
window.open(this.href, '_blank');
return false;
});
});
``` | [
0.08354874700307846,
0.1309329718351364,
0.47822046279907227,
-0.6310667991638184,
0.27790752053260803,
-0.007211124058812857,
0.7466980814933777,
-0.17835797369480133,
0.014512709341943264,
-0.41671106219291687,
-0.7242226004600525,
0.9211099147796631,
-0.49793103337287903,
0.535349071025... | |
I am trying to replicate a database from SQL server 2000 to 2005 they are located on two different servers both running Windows Server 2003 R2. Im am using SERVER1(SQL2000) as the Transactional publisher and distributor and SERVER2(SQL2005) is the subscriber. I can set up the publication and subscription but when I try... | [
0.1665210723876953,
0.3572840392589569,
0.7873386144638062,
-0.10598950833082199,
-0.27700161933898926,
0.03832482546567917,
0.03259569779038429,
-0.05931050330400467,
-0.04014435037970543,
-0.35308510065078735,
0.16392754018306732,
0.1321820467710495,
-0.3590744137763977,
0.82280242443084... | |
and that you're not allowed to query active directory user information. Likely, the sql server service account does not have proper domain privileges to perform look ups in AD. This could be caused by an account password simply being expired and therefore not enabling SQL to validate against AD or some other issue like... | [
0.4345966875553131,
0.45150429010391235,
0.2874165177345276,
0.10808975994586945,
-0.007959356531500816,
-0.30336037278175354,
0.07599610090255737,
-0.1797093152999878,
0.020900744944810867,
-0.25855761766433716,
0.15872517228126526,
0.3683355450630188,
-0.2749464809894562,
0.3957892358303... | |
I have a multilanguage website and need automate the process of updating textlayers in psd-files from a csv-source.
I know that there might be glitches in the psp because of changed widths, but anyway it would help a lot to have the text inside the documents.
What are my options?
EDIT:
Murmelschlurmel has a working... | [
0.34375208616256714,
0.13610902428627014,
0.7006078958511353,
-0.026417192071676254,
-0.10395944863557816,
0.12059246748685837,
0.28473612666130066,
-0.24865911900997162,
-0.25030264258384705,
-0.6994237303733826,
0.08629227429628372,
0.6203376054763794,
-0.31194227933883667,
-0.1358937919... | |
nice if you have a couple of templates (buttons) that need changed text. Here is my script in python that might get you startet.
You need to have an excel file with columns:
TemplateFileName, TargetFileName, TargetFormat, Text
(ie template.psd, button1 , gif , NiceButton) .
The first row of the sheet is not used.
The ... | [
0.06426273286342621,
-0.35824501514434814,
0.9278074502944946,
-0.03291973099112511,
-0.19683797657489777,
-0.004144772421568632,
0.05531870946288109,
-0.38826993107795715,
-0.02266964130103588,
-0.8364929556846619,
-0.18709293007850647,
0.612148642539978,
-0.47137248516082764,
-0.57362240... | |
template = sheet.row(rowIndex)[0].value
targetFile = sheet.row(rowIndex)[1].value
targetFileFormat = sheet.row(rowIndex)[2].value
textTranslated = sheet.row(rowIndex)[3].value
psApp.Open(r"D:\Design\Produktion\%s" % template )
doc = psApp.Application.ActiveDocument
for... | [
0.10973823815584183,
-0.2269689291715622,
0.51447993516922,
-0.16497233510017395,
0.043693892657756805,
-0.06224375218153,
0.29879114031791687,
-0.5283375382423401,
-0.1667962670326233,
-0.9977251887321472,
-0.2884855270385742,
0.12314373254776001,
-0.4908989667892456,
0.04259616509079933,... | |
layer.TextItem.Contents = textTranslated
if(targetFileFormat == "gif"):
doc.SaveAs(r"D:\Design\Produktion\de\%s" % targetFile, gifSaveOptions, True, 2)
if(targetFileFormat == "jpg"):
doc.SaveAs(r"D:\Design\Produktion\de\%s" % targetFile, jpgSaveOp... | [
-0.05851338058710098,
-0.18077045679092407,
0.41884613037109375,
0.0715809315443039,
0.008471800945699215,
-0.35836416482925415,
0.10889831930398941,
0.003228005487471819,
-0.15341076254844666,
-1.0255542993545532,
-0.4206971228122711,
0.3329973816871643,
-0.13617075979709625,
-0.057745546... | |
this. There is also a concept of [data driven design](http://en.wikipedia.org/wiki/Data-driven_design) in computer science, but as far as I can see this is not not related to the use of the word in Photoshop.
Here is how to proceed:
Load your image in Photoshop and define your variables with **Image > Variable > Defi... | [
0.5152552723884583,
0.07525628060102463,
0.44510844349861145,
0.15961936116218567,
-0.30202022194862366,
-0.1815524697303772,
0.080166295170784,
-0.20630864799022675,
-0.178238183259964,
-0.6841758489608765,
0.10406943410634995,
0.5132690072059631,
-0.292226642370224,
-0.01566026359796524,... | |
provide enough details. I searched the Internet for **photoshop "data set"** and found some good tutorials, e.g. this one from [digitaltutors](http://www.digitaltutors.com/free_tutorials/video_d.php?vid=716). | [
0.7744274735450745,
-0.3517616391181946,
0.45635786652565,
0.45284417271614075,
0.2139563262462616,
-0.20385558903217316,
-0.1985381543636322,
-0.03213367611169815,
-0.4711495041847229,
-0.3575424551963806,
-0.049979329109191895,
0.260783851146698,
0.15050780773162842,
-0.09613484889268875... | |
I've seen "[The Coolest Server Names](https://stackoverflow.com/questions/262657/the-coolest-server-names-closed)," and I've seen another [smaller-ish question](https://stackoverflow.com/questions/631220/good-server-naming-convention) related to mine, which was unfortunately closed.
It's a serious question though, as ... | [
0.5507165789604187,
0.4390489161014557,
0.23766547441482544,
0.13440068066120148,
0.14430376887321472,
-0.20801788568496704,
0.025939075276255608,
0.22772592306137085,
-0.4727506637573242,
-0.2888505756855011,
-0.17228913307189941,
0.4761441648006439,
0.1807350516319275,
-0.084204398095607... | |
external servers versus intranet-esque servers)
* In different physical locations (California office versus New York, etc.)
* In multiple deployment tiers (production, staging, testing, dev)
* Have one or many functions (web server, DB server, mail server, app server)
* Load-balanced or not
* Standby (for disaster reco... | [
0.5287442207336426,
-0.12386380881071091,
0.29013752937316895,
0.3283693194389343,
0.10917767137289047,
-0.02962976135313511,
0.2031266689300537,
0.26118338108062744,
-0.45871245861053467,
-0.5204446315765381,
-0.21287786960601807,
0.2119004726409912,
0.0017197394045069814,
-0.001848178333... | |
"sharepoint-IPC-1 is down" could be parsed into "the internal production SharePoint web server in the California datacenter that's the first node in the load balancing is down!"...but that seems overly complicated at first glance.
Another thing in the back of my mind is that an old mail relay server is getting decommi... | [
0.40118569135665894,
0.3894195258617401,
0.05289243161678314,
0.17936621606349945,
0.4075160026550293,
-0.24552790820598602,
-0.06131172180175781,
0.046161338686943054,
-0.18326714634895325,
-0.6797506213188171,
0.10735789686441422,
0.20792312920093536,
-0.31871768832206726,
0.214461594820... | |
time, and you don't want to have to do too much work if you change from an IBM server, to a Sun server, to a Dell server.
* **Location** Equipment and even entire server rooms can be moved based on business requirements or technical issues.
* **Intended Use** As your product evolves, so too may the intended use of each... | [
0.8274522423744202,
0.05086411535739899,
0.11928600072860718,
0.20528919994831085,
0.384701132774353,
-0.08201880007982254,
-0.10951163619756699,
-0.056917332112789154,
-0.43413612246513367,
-0.8011354804039001,
-0.2550409734249115,
0.08348158746957779,
-0.03789529576897621,
0.665498793125... | |
can move, and so can subnets. One of the main goals of DNS is to free you from being tied to a specific IP address, so why tie yourself down needlessly?
Now, some suggestions for the situation you described...
* **Machines spread across a region** This is what subdomains are for in DNS. You could have "west.company.c... | [
0.42478615045547485,
-0.21559715270996094,
0.18579068779945374,
0.48266974091529846,
0.07754245400428772,
-0.015276122838258743,
-0.13123869895935059,
0.16661471128463745,
-0.5435212254524231,
-0.7194998860359192,
-0.42807161808013916,
0.10610838234424591,
-0.11540712416172028,
0.440223693... | |
server. Worst case, look it up in a spreadsheet.
* **Load-balanced or not** You can take two approaches. You could have a unique name per node behind the load balancer, or you could do something like athena-1.east, athena-2.east, etc. Either way, a load balancer will (hopefully) free you from worrying too much about wh... | [
0.4633879065513611,
-0.2423510104417801,
0.024521106854081154,
0.3420504927635193,
-0.058342095464468,
0.07005725800991058,
0.09332822263240814,
0.11605849117040634,
-0.5534247756004333,
-0.4226694405078888,
-0.2730792164802551,
0.31534627079963684,
-0.30719247460365295,
0.2051466703414917... | |
base the names on any of the criteria I mentioned above (intended use, location, etc.)
Trying to do anything *more* than that will be more trouble than it's worth. | [
0.8355149626731873,
0.29845094680786133,
-0.037912268191576004,
0.16090407967567444,
0.10175023227930069,
-0.22684843838214874,
0.35015669465065,
-0.1601799875497818,
-0.19710223376750946,
-0.4326232373714447,
-0.1016569659113884,
0.27410435676574707,
-0.044913969933986664,
0.0868843495845... | |
Today, I found myself coding something like this ...
```
public class LocalEnums {
public LocalEnums() {
}
public void foo() {
enum LocalEnum {
A,B,C
};
// ....
// class LocalClass { }
}
}
```
and I was kind of surprised when the compiler reported an er... | [
0.22506998479366302,
-0.010251419618725777,
-0.2007395625114441,
-0.12337267398834229,
0.21832327544689178,
0.034511785954236984,
0.25142425298690796,
0.3200800120830536,
-0.1857168823480606,
-0.5903404355049133,
0.05053380876779556,
0.4339474141597748,
-0.492293119430542,
0.25146931409835... | |
member enum LocalEnum cannot be
> local
Why can't **enums** be declared local like **classes**?
I found this very useful in certain situations. In the case I was working, the rest of the code didn't need to know anything about the `enum`.
Is there any *structural/design* conflict that explains why this is not possi... | [
-0.09006861597299576,
-0.2503291666507721,
0.23118004202842712,
-0.0635315552353859,
-0.24781233072280884,
-0.20075395703315735,
0.31560415029525757,
0.09681261330842972,
-0.600633442401886,
-0.5806923508644104,
-0.3934296667575836,
-0.10145078599452972,
-0.309829980134964,
0.2905198633670... | |
be local** now.
To quote JEP 395:
> The ability to declare local record classes, local enum classes, and local interfaces was introduced.
>
>
> …
>
>
> The addition of local record classes is an opportunity to add other kinds of implicitly-static local declarations.
>
>
> Nested enum classes and nested interfac... | [
0.2346908152103424,
-0.454039067029953,
0.026185596361756325,
0.022045036777853966,
0.18315191566944122,
0.1029958501458168,
0.13046962022781372,
0.03902243822813034,
-0.1902122050523758,
-0.958325207233429,
-0.24605116248130798,
0.8735234141349792,
-0.5252602696418762,
0.04541074857115745... | |
System.out.println( Color.PURPLE );
}
```
In this screenshot, we can see how the local enum exists only within its defining method. A sibling method cannot see that enum. Trying to call that enum from another method generates an error.
[ [IDE](https://en.wikipedia.org/wiki/Integrated_development_environment) reports error:
> Non-static variable 'x' cannot be referenced from a static context
As mentioned in the JEP 395 quote above, a local enum is impl... | [
-0.07180801779031754,
-0.048590037971735,
-0.10441876947879791,
0.13546007871627808,
0.33401569724082947,
0.03592416271567345,
0.23127254843711853,
0.07195157557725906,
-0.16322533786296844,
-0.6281079649925232,
-0.3798615634441376,
0.4725932478904724,
-0.4851832985877991,
0.41982373595237... | |
the enclosing method; in turn, this avoids capturing an immediately enclosing instance which would silently add state to the record class. The fact that local record classes are implicitly static is in contrast to local classes, which are not implicitly static. In fact, local classes are never static — implicitly or ex... | [
-0.11755969375371933,
0.014130047522485256,
-0.1762407273054123,
0.27897965908050537,
0.03957800567150116,
-0.17871765792369843,
0.30982837080955505,
0.3141559362411499,
-0.33366337418556213,
-0.4172308146953583,
-0.12870283424854279,
0.4004691243171692,
-0.5045549869537354,
0.343777954578... | |
I'm curious as to what sort of standards other teams make sure is in place before code ships (or deploys) out the door in major releases.
I'm not looking for specific answers to each, but here's an idea of what I'm trying to get an idea of.
* For server-based apps, do you ensure monitoring is in place? To what degree... | [
0.7678778767585754,
0.2635035216808319,
0.30008310079574585,
0.20509950816631317,
0.09602881222963333,
0.052650030702352524,
0.3693969249725342,
-0.2620271146297455,
-0.4984501302242279,
-0.5097518563270569,
-0.166545569896698,
0.6428641080856323,
-0.048706065863370895,
-0.5685299634933472... | |
scripts before code is released? Meaning, any dev can walk onto a new box, yank something from source control, and start developing? Given things like an OS and IDE, of course.
* How about automated deployment scripts, for server-based apps?
* What level of documentation do you require for a project to be "done?"
* Do ... | [
0.7411466240882874,
-0.029827149584889412,
-0.1914764791727066,
0.3753662407398224,
-0.27759885787963867,
-0.2924081087112427,
0.3315872550010681,
0.013238427229225636,
-0.39366835355758667,
-0.5468159914016724,
-0.09001259505748749,
0.7052111029624939,
-0.045590758323669434,
-0.4045880734... | |
for how your application's error logging is handled? How about error notification?
Again, not looking for a line-by-line punchlist of answers to anything above, necessarily. In short, **what non-coding items must a code release have completed before it's officially considered "done" for your team?**
The minimun:
1. u... | [
0.2909778356552124,
-0.14013463258743286,
0.49101436138153076,
0.07701554149389267,
0.0308554545044899,
-0.2531207203865051,
0.5538157820701599,
-0.4310159385204315,
-0.1195635125041008,
-0.5853502154350281,
-0.2721879184246063,
0.7996748685836792,
0.17117296159267426,
-0.2601976990699768,... | |
continuous integration server like [CruiseControl](http://cruisecontrol.sourceforge.net/) done by [ant](http://ant.apache.org/) or [maven](http://maven.apache.org/). When developing webservices, testing with [soapui](http://www.soapui.org/) works fine.
If a database used, automatic upgrade is done (with [liquibase](h... | [
-0.03822707757353783,
-0.277549684047699,
0.48932456970214844,
-0.0035440130159258842,
0.22726957499980927,
-0.07047901302576065,
0.12463107705116272,
-0.15767578780651093,
-0.17631927132606506,
-0.4932590126991272,
-0.08393160998821259,
0.6029512286186218,
0.01487721223384142,
-0.26912853... | |
owner wants? Make a live review with him on the test system before going further! | [
0.701811671257019,
-0.0077647981233894825,
0.4814551770687103,
0.1938379555940628,
0.13699427247047424,
-0.39096009731292725,
0.11909613013267517,
-0.12320035696029663,
-0.15010373294353485,
-0.18238133192062378,
0.05986475199460983,
0.6324837803840637,
-0.012608935125172138,
-0.0309346877... | |
What are the differences between jQuery and ASP.NET Ajax?
Albeit ASP.NET AJAX encompasses a client side framework it is perhaps best known/feared/loathed for its server side controls, particularly the UpdatePanel. What you get with ASP.NET AJAX is out-of-the-box AJAX for the **most basic stuff** without having to write... | [
0.017372123897075653,
-0.03738770633935928,
0.15069234371185303,
0.16219590604305267,
-0.5538333058357239,
-0.491616427898407,
0.13295458257198334,
0.20094354450702667,
-0.2321784943342209,
-0.8226720690727234,
0.08568158745765686,
0.5807779431343079,
0.09391409903764725,
-0.31425857543945... | |
job of hiding the ugly JavaScript stuff away, so apart from a small learning curve it comes pretty natural (particularly if you are on home-stretch in CSS selectors).
Main problem in using jQuery with ASP.NET can be if you mess too much with the DOM you might get ViewState/Event validation problems. | [
0.1167052760720253,
-0.20811326801776886,
0.09381096065044403,
0.2722108066082001,
-0.18908843398094177,
-0.3458368480205536,
0.35310423374176025,
0.13804404437541962,
-0.14410358667373657,
-0.5951088666915894,
0.1332491934299469,
0.7381428480148315,
-0.032818980515003204,
-0.1029221490025... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.