text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
files you later need to look in to find that request.
Then, the final question: *"that is fine and dandy in single-JVM solution, but how do you scale that to several JVMs, communicating over some network protocol?"*
As we use [Spring Remoting](http://static.springframework.org/spring/docs/2.0.x/reference/remoting.htm... | [
-0.01187990978360176,
-0.03501015529036522,
0.5260854959487915,
-0.010280843824148178,
-0.11216123402118683,
0.038244541734457016,
0.11913982033729553,
-0.5086402893066406,
-0.1648022085428238,
-0.6630527973175049,
-0.11652037501335144,
0.5899468660354614,
-0.07451729476451874,
0.169021129... | |
I would like to enable a ASP.NET classic (ASMX) web service for HTTP POST and GET requests. I realise this can be done on a machine or application level by adding ...
```
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
```
.. to the machine.c... | [
0.12351396679878235,
-0.16929180920124054,
0.35263821482658386,
0.10291337966918945,
-0.3913208544254303,
-0.08867581933736801,
0.19521969556808472,
0.008131592534482479,
-0.15810583531856537,
-0.7820039987564087,
-0.06946484744548798,
0.6081600189208984,
-0.2887982428073883,
-0.0043536103... | |
your method.
```
[ScriptMethod(UseHttpGet = true)]
public string HelloWorld()
{
return "Hello World";
}
``` | [
-0.09562094509601593,
0.05574055016040802,
0.42940133810043335,
-0.03432610630989075,
0.28898322582244873,
-0.22654643654823303,
0.650321364402771,
0.1857718676328659,
0.18238434195518494,
-0.5475444793701172,
-0.006518604699522257,
0.6669037938117981,
-0.5249704122543335,
0.28272631764411... | |
I have a function, which is to return an array of rows containg records from a database, selected based on a LIKE query. I want this query to be a prepared statement for security reasons. Apparently I can not use bound parameters and the query function as I am doing. I am unsure then, of how to keep me query as a prepa... | [
0.05529383197426796,
0.1232282891869545,
0.6114267110824585,
0.019499951973557472,
0.20026741921901703,
-0.1287612020969391,
0.05882731452584267,
0.09862937778234482,
-0.26978790760040283,
-0.6126956343650818,
0.062174297869205475,
0.5904591083526611,
-0.42654046416282654,
0.42285650968551... | |
ACCESSSTARTS, ARTICLE_NAME, date_format(str_to_date(ACCESSSTARTS, '%d/%m/%Y %k:%i:%s'), '%d %m %Y' ) AS shortDate FROM AUCTIONS WHERE upper(ARTICLE_NAME) LIKE '%?%' ORDER BY str_to_date(ACCESSSTARTS, '%d/%m/%Y %k:%i:%s')" . $max;
if ($getRecords = $con->prepare($recordsQuery)) {
$getRecords->bind_param("s",... | [
-0.2374829202890396,
-0.03231741487979889,
0.7871190905570984,
-0.1133400946855545,
0.24091069400310516,
0.13198043406009674,
0.2431214451789856,
-0.5685188174247742,
-0.3612132966518402,
-0.24013735353946686,
-0.6648587584495544,
0.4122031629085541,
-0.20411843061447144,
0.327283769845962... | |
$rows = array();
echo "test while";
while($row = $result->fetch_assoc()) {
$rows[] = $row;
}
}
return $rows;
} else {
print_r($con->error); | [
0.01572273299098015,
0.007193125318735838,
0.12437678128480911,
-0.46993735432624817,
0.02611883170902729,
0.26976245641708374,
0.6653052568435669,
-0.5881224274635315,
-0.0774250254034996,
-0.028824638575315475,
-0.2140948623418808,
0.7013728022575378,
-0.4379432201385498,
0.1029438748955... | |
}
}
```
The while loop is never entered at all.
Although tedious if you've got many columns, you could just do:
```
function getRowsByArticleSearch($searchString, $table, $max) {
$con = mysqli_connect("localhost", "x", "x", "x");
$recordsQuery = "SELECT ARTICLE_NO, USERNAME, ACCESSSTARTS, ARTICLE_NAME, date_for... | [
-0.06278735399246216,
0.008632238022983074,
0.8489457368850708,
-0.20676524937152863,
0.2759057283401489,
-0.1690320521593094,
0.20534314215183258,
0.13264569640159607,
-0.1472368985414505,
-0.38952377438545227,
-0.4566301703453064,
0.600562572479248,
-0.3116026222705841,
0.204645812511444... | |
$rows = array();
while ($getRecords->fetch()) {
$row = array(
'ARTICLE_NO' => $ARTICLE_NO,
'USERNAME' => $USERNAME,
...
); | [
-0.3555935025215149,
-0.08942049741744995,
0.7077715396881104,
-0.3080787658691406,
0.05708850547671318,
0.20646892488002777,
0.17302954196929932,
-0.41688603162765503,
-0.2747524678707123,
-0.35521912574768066,
-0.39241838455200195,
0.6172535419464111,
-0.5019506812095642,
0.2794163525104... | |
$rows[] = $row;
}
return $rows;
} else {
print_r($con->error);
}
}
```
Essentially you have to create your required associative array yourself, since you can't use `$result_set->fetch_assoc()`. | [
-0.03687799349427223,
-0.08064974844455719,
0.4636262357234955,
-0.17500491440296173,
-0.04840433597564697,
0.0994471088051796,
0.12848617136478424,
-0.5396327972412109,
-0.16096368432044983,
-0.4599580764770508,
-0.17770284414291382,
0.7524679899215698,
-0.4454812705516815,
-0.16674025356... | |
I would like to know the iteration order for the Array, Dictionary and Object types in AS3, for both the for-each and the for-in loops. Also what factors can change the iteration order of these loop type combinations?
For example I presume that using a for-each on an Array type always move from the first element to th... | [
0.34421420097351074,
-0.0529632568359375,
-0.1304178386926651,
-0.08461830019950867,
-0.3725624978542328,
0.2339026778936386,
0.3828158378601074,
-0.40012305974960327,
-0.22361180186271667,
-0.3021508753299713,
-0.05237334966659546,
0.15663333237171173,
-0.42501917481422424,
-0.16312502324... | |
defined in ECMA-262 edition 3 and E4X".
ECMA-262, section 12.6.4 state that "the order of enumeration is defined by the object" - in other words, it will depend on whether you're iterating through a list, a dictionary, an array etc.
I would *hope* that the documentation for most collections will explicitly state the ... | [
0.015487324446439743,
0.23873475193977356,
0.33033818006515503,
-0.15805113315582275,
0.09423784166574478,
-0.07978110760450363,
-0.057860054075717926,
-0.5550019145011902,
-0.4080843925476074,
-0.42941713333129883,
-0.4247954487800598,
0.3040784001350403,
-0.46921640634536743,
-0.04376593... | |
I read a lot of books about what practices work well or not in software development.
And I have NEVER heard about methodoly like ITIL or CMMI in any webcast or book or blogs in the development field.
I have heard about these methodologies in my school, and to me it seems to be bureaucratic practices.
However every bo... | [
0.5326693058013916,
0.2548348307609558,
-0.44361260533332825,
0.40247848629951477,
0.023219576105475426,
-0.24711431562900543,
0.08468936383724213,
0.2083514928817749,
-0.30291104316711426,
-0.48717066645622253,
0.04551363363862038,
0.6014406681060791,
0.1541006863117218,
0.054285310208797... | |
have great books or blogs which talk about some good ideas in these metodologies I can use on a development team ?
ITIL is more focused on the infrastructure and support side and not development, so discussion of ITIL is probably more appropriate on the "IT" focused version of StackOverflow that is supposedly in develo... | [
0.40021923184394836,
0.09300342202186584,
0.11133118718862534,
0.26704564690589905,
-0.11938677728176117,
-0.3871748149394989,
-0.250063955783844,
0.29739677906036377,
-0.3162514865398407,
-0.4514402747154236,
-0.21896106004714966,
0.5471544861793518,
0.22464823722839355,
-0.12631963193416... | |
Watts Humphrey and the Carnegie Mellon Software Engineering Institute. If you are committed to continuous improvement and believe that measurement is at the heart of any continuous improvement, then you will find value in CMMI.
It is very easy to do CMMI (and TSP) wrong or in a way that alienates developers and ultima... | [
0.3221290111541748,
0.27445414662361145,
0.10987240821123123,
0.32122164964675903,
-0.033592142164707184,
0.05158756300806999,
-0.08081156760454178,
-0.00004837231244891882,
-0.3287319540977478,
-0.3400411009788513,
-0.1453281193971634,
0.47207602858543396,
0.3639582395553589,
0.3210407495... | |
worked hard to get the certification, but the repeatable practices are simply not there for 95% of their organization.
The focus on time tracking (clock punching), defect tracking (bug quotas), lines of code (lots of ways to "game" if you are so inclined), and making your process repeatable (making a developer feel li... | [
0.9477900862693787,
0.3934965133666992,
-0.05587221682071686,
0.2175309658050537,
0.2687520980834961,
-0.20349062979221344,
0.5888635516166687,
-0.03229410573840141,
-0.31876763701438904,
-0.24627919495105743,
0.03866255283355713,
0.7830110192298889,
0.1418284922838211,
-0.2966248989105224... | |
where their opportunities to improve reside. For them, the process rigor and opportunity to make incremental improvements in quality through the self-awareness that repetition and measurement facilitate are valuable components of CMMI.
Done right, you get the same benefits from Agile methods like Scrum where again the... | [
0.22819532454013824,
-0.14384247362613678,
0.16044127941131592,
0.5818865895271301,
0.16616299748420715,
-0.01342298835515976,
0.4975435435771942,
0.02219637855887413,
-0.4332171678543091,
-0.7764384746551514,
0.13427671790122986,
0.6058247089385986,
0.2503688633441925,
-0.2033382505178451... | |
get, which is why you don't hear about it as much. | [
0.5111746788024902,
-0.17983248829841614,
0.21773788332939148,
0.28918689489364624,
-0.24443946778774261,
-0.3303004503250122,
0.20098179578781128,
0.28790542483329773,
-0.37063103914260864,
-0.192527636885643,
-0.1635255515575409,
0.4909205436706543,
0.2734527587890625,
0.0410551503300666... | |
In Silverlight, how can I stretch the width of a Line to fill the width of the StackPanel in which it is a child element? Prefer a XAML solution, not a code-behind.
Here is how I can do it in WPF:
```
<Line X1="0"
X2="{Binding Path=ActualWidth, ElementName=HolePatternStackPanel}"
Stroke="Gray"
Str... | [
0.0866815373301506,
-0.14824850857257843,
0.7019989490509033,
-0.31488651037216187,
0.002479175804182887,
0.06475434452295303,
-0.12674419581890106,
-0.6434267163276672,
-0.21901483833789825,
-0.6826066970825195,
0.033918291330337524,
0.2707749009132385,
-0.02109668403863907,
-0.1851515620... | |
Y1=0 X2=1 Y2=1 for diagonal from top left to bottom right, or reverse it for bottom left to top right.
Funky fresh. | [
0.4221923053264618,
-0.2425733506679535,
0.4512903690338135,
0.14893244206905365,
-0.010486787185072899,
-0.08317745476961136,
-0.10547919571399689,
0.05697845667600632,
-0.2329753190279007,
-0.38342809677124023,
0.11689572781324387,
0.24728386104106903,
-0.3139246702194214,
-0.32856070995... | |
What tools/methods do you recommend to diagnose and profile MySQL in live production server?
My goal to test alternative ways of scaling up the system and see their influence on read/write timing, memory, CPU load, disk access etc. and to find bottlenecks.
First of all you should set up some kind of monitoring with e... | [
0.5298015475273132,
-0.11022263765335083,
0.266998291015625,
0.2578742504119873,
-0.02936621755361557,
-0.011782134883105755,
0.11074763536453247,
-0.06532759219408035,
-0.29557621479034424,
-0.6922889947891235,
-0.2040836364030838,
0.7472631931304932,
-0.2171970158815384,
-0.1650090068578... | |
see wether your changes
made sense or not. | [
0.3085951507091522,
0.16287460923194885,
-0.21377712488174438,
0.006558466702699661,
-0.24468699097633362,
0.11399929225444794,
0.31501951813697815,
-0.14935430884361267,
-0.4164074957370758,
-0.42284223437309265,
0.2359556257724762,
0.3376789093017578,
-0.08473863452672958,
0.180979058146... | |
I have a select field within a form:
```
<form id="myform">
<select id="value" onchange="javascript: document.myform.submit()">
<option>....
</select>
</form>
```
After the form is submitted, it is impossible to use the 'back' button without resubmitting the form. However, if I use a regular 'submit' button, it ... | [
0.38458770513534546,
-0.09007580578327179,
0.7620565891265869,
-0.1720622479915619,
-0.1874830722808838,
-0.2707313895225525,
0.09857802838087082,
-0.532371997833252,
0.07910246402025223,
-0.8742833733558655,
-0.2150152027606964,
0.45427027344703674,
0.011029046960175037,
0.180557698011398... | |
specify `javascript:` outside of an `HREF` tag. | [
0.20645861327648163,
0.2012348175048828,
-0.20764803886413574,
-0.03340926021337509,
-0.2134675234556198,
-0.37831586599349976,
0.04517005383968353,
-0.11651308089494705,
0.30909642577171326,
-0.4603109657764435,
-0.7999089360237122,
0.4102540910243988,
-0.5843746662139893,
-0.272950798273... | |
In the code below, I would like the second method to be generic, too, but since I create the Calendar object inside the method, **because of [type erasure](http://java.sun.com/docs/books/tutorial/java/generics/erasure.html), I don't see how**. One possibility would be to pass in the Calendar object, but that would defe... | [
0.2672150433063507,
-0.1371377855539322,
0.29527685046195984,
-0.0008117393590509892,
-0.3409474790096283,
-0.07711013406515121,
0.13128730654716492,
0.026652485132217407,
-0.12147591263055801,
-0.8679634928703308,
0.17875666916370392,
0.4366646111011505,
-0.3551136553287506,
0.27149286866... | |
dt.setTimeZone(TimeZone.getTimeZone(DEFAULT_TZ_ID));
return new CalendarMatch<U>(dt);
}
public static CalendarMatch<GregorianCalendar> tpDailyGregorian(int h)
{
GregorianCalendar dt = new GregorianCalendar(TimeZone.getTimeZone(DEFAULT_TZ_ID));
dt.clear();
dt.set(Calendar.HOUR, h);
// this works be... | [
0.2648620903491974,
-0.21728092432022095,
0.6574900150299072,
-0.22658415138721466,
-0.0824560597538948,
0.12332919985055923,
0.3047109544277191,
-0.23156581819057465,
-0.16078689694404602,
-0.6559831500053406,
-0.2637749910354614,
0.8070486187934875,
-0.3992421627044678,
0.037659186869859... | |
tpFromCalendar(dt);
}
```
Where:
```
public interface CalendarFactory<U extends Calender {
U create(TimeZone timeZone);
}
``` | [
0.05591835081577301,
-0.4274693727493286,
0.4973892569541931,
-0.08403746783733368,
0.37458711862564087,
-0.0334790013730526,
0.07358570396900177,
0.11114571243524551,
-0.11938077211380005,
-0.7485629916191101,
-0.3378776013851166,
0.7042397260665894,
-0.251774400472641,
0.1285768002271652... | |
I have a small application that I have written that uses the MVP pattern as follows:
* I created an interface called IView
* I implemented this interface in the Form
* Passed in an instance of the form as type IView into the constructor of the presenter
The form contains a ListView component. The items that populates... | [
0.22090010344982147,
0.07824821770191193,
0.6134752035140991,
0.06312797963619232,
-0.44540539383888245,
-0.08670755475759506,
0.09985319525003433,
-0.17671014368534088,
-0.25524187088012695,
-0.7071782350540161,
0.11885096877813339,
0.16931279003620148,
-0.3708074986934662,
0.194548964500... | |
to be as lightweight as possible with no logic in it?
Edit: N.B. This is a Windows Form application
> I could create the ListViewItems in
> the form itself but doesn't the form
> need to be as lightweight as possible
> with no logic in it?
A simple loop, and simple objects creation is not assumed to be difficult. ... | [
0.24126601219177246,
-0.1663382202386856,
0.39238622784614563,
-0.205951526761055,
-0.18955570459365845,
-0.15961289405822754,
0.1611728072166443,
-0.2978143095970154,
-0.25708097219467163,
-0.5796363353729248,
-0.07493782788515091,
0.37191054224967957,
-0.3769989013671875,
-0.071377485990... | |
lvi.Text = dataItem.Text;
...
}
}
}
```
Also, you can use Binding (as others suggested). This will simplify SetData even more.
Try too keep View code such simple that you can "validate" it by fast code review :-) | [
0.34861528873443604,
-0.1533968150615692,
0.5484521985054016,
-0.08209198713302612,
-0.08713528513908386,
-0.38755327463150024,
0.012127448804676533,
-0.3974962830543518,
-0.05229469761252403,
-0.6070488691329956,
-0.07332555949687958,
0.6357976794242859,
-0.5597826242446899,
-0.0119402781... | |
I have a HashTable which I am keep track of colors (which are the keys) and count of colors which is the key.
I am trying to figure out how to increment the key when it the HashTable already contains the color. Here is a code snippet:
```
Hashtable htColors = new Hashtable();
if (htColors.Contains(color))
{
// W... | [
0.11521539837121964,
-0.039019424468278885,
0.6137624382972717,
-0.08668938279151917,
0.22070889174938202,
-0.09981083124876022,
0.004238477908074856,
-0.2944425940513611,
-0.2972668707370758,
-0.7799713015556335,
-0.2816121578216553,
0.48973968625068665,
-0.3084357976913452,
0.11150527000... | |
the Dictionary approach is much better because it is 1) type safe and 2) eliminates the boxing involved in this solution.
Having the line be the following won't affect the key, just the value
```
htColor[color] = (int)htColor[color] + 1;
``` | [
0.15311531722545624,
-0.0630299299955368,
0.5015321969985962,
-0.17091460525989532,
0.17395025491714478,
-0.05267928168177605,
0.17282529175281525,
-0.2557081878185272,
0.32406941056251526,
-0.4543141722679138,
-0.46902036666870117,
0.6117715835571289,
-0.4613066017627716,
-0.1849326789379... | |
In WPF, is there an easy to allow overwriting of text in an textbox?
Thanks
Tony
EDIT: I guess i wasn't to clear. Sorry.
I have a TextBox that the user is allowed to type 6 characters. If the user types 6 characters and then for whatever reason put the cursor at the start or somewhere in the middle of the 6 chara... | [
0.33942094445228577,
-0.1794334053993225,
0.47925442457199097,
-0.00150106695946306,
-0.31128230690956116,
-0.11187975853681564,
0.46665459871292114,
-0.34777891635894775,
-0.36610671877861023,
-0.7213165163993835,
0.13695339858531952,
0.6224202513694763,
-0.3903292417526245,
-0.1580998152... | |
get at it through reflection:
```
// fetch TextEditor from myTextBox
PropertyInfo textEditorProperty = typeof(TextBox).GetProperty("TextEditor", BindingFlags.NonPublic | BindingFlags.Instance);
object textEditor = textEditorProperty.GetValue(myTextBox, null);
// set _OvertypeMode on the TextEditor
PropertyInfo overty... | [
0.019922422245144844,
-0.2685798704624176,
0.5914462804794312,
0.12770240008831024,
-0.1736263930797577,
0.12976743280887604,
0.41893714666366577,
-0.1960359364748001,
0.05999536067247391,
-0.348520427942276,
-0.6543362140655518,
0.8190370798110962,
-0.30659788846969604,
-0.142465740442276... | |
I would like to launch a URL when an email arrives in Outlook. I setup a rule and have it trigger a script function. It looks like I want to call ShellExecute to launch the URL in a browser, but when I hit this line:
```
ShellExecute(0&, "open", URL, vbNullString, vbNullString, _
vbNormalFocus)
```
The method is... | [
0.1658693253993988,
0.06686215847730637,
0.49515968561172485,
-0.2213134765625,
-0.05525811016559601,
-0.40992724895477295,
0.08257739990949631,
0.21024693548679352,
-0.04689650610089302,
-0.4808369576931,
-0.020009556785225868,
0.6700105667114258,
-0.3276920020580292,
0.31828293204307556,... | |
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
```
The difference between your Shell solution and ShellExecute is that ShellExecute will use the default system handler for URLs to open the li... | [
0.28602683544158936,
0.06477014720439911,
0.6412122845649719,
-0.09171974658966064,
0.16589604318141937,
-0.2941009998321533,
-0.03907423093914986,
0.11769894510507584,
-0.1574411541223526,
-0.6985999345779419,
-0.14038138091564178,
0.7263684868812561,
-0.41037508845329285,
0.2452951371669... | |
the url in the run box in windows. | [
0.2762047052383423,
0.046738151460886,
0.1592240333557129,
0.04304029047489166,
-0.21239018440246582,
-0.30516549944877625,
0.07174716889858246,
0.41556763648986816,
0.008017927408218384,
-0.20105695724487305,
-0.16277554631233215,
0.36653032898902893,
-0.2467913180589676,
0.40849521756172... | |
Assume we have legacy classes, that can't be modified:
```
class Foo
{
public void Calculate(int a) { }
}
class Bar
{
public void Compute(int a) {}
}
```
I want to write a helper with such signature:
```
void Calc(object obj, int a);
```
Notice, that the first argument is of type 'object'. The test code... | [
0.09469889849424362,
0.14680548012256622,
0.2420438528060913,
-0.16720876097679138,
0.2725238800048828,
0.12663285434246063,
0.07558535039424896,
-0.24188843369483948,
-0.09159573167562485,
-0.576463520526886,
-0.16425710916519165,
0.6481595039367676,
-0.4516623318195343,
0.001921088085509... | |
((Foo)obj).Calculate(a);
else if (obj is Bar)
((Bar)obj).Compute(a);
}
}
// Using reflection
class Example2
{
private static Dictionary<Type, MethodInfo> _methods = new Dictionary<Type, MethodInfo>();
static Example2()
{
_methods.Add(typeof(Foo), typeof(Foo).GetMethod("Calc... | [
-0.14738164842128754,
0.14105269312858582,
0.44649139046669006,
-0.3124488294124603,
0.035648297518491745,
0.501380205154419,
0.3533303439617157,
-0.35351139307022095,
-0.0888652503490448,
-0.528569221496582,
-0.3471373915672302,
0.6813749670982361,
-0.562525749206543,
-0.11814277619123459... | |
_methods[obj.GetType()].Invoke(obj, new object[] { a });
}
}
// Using delegates
class Example3
{
private delegate void CalcDelegate(object obj, int a);
private static Dictionary<Type, CalcDelegate> _methods = new Dictionary<Type, CalcDelegate>();
static Example3()
{
_methods.Add(typeof(Fo... | [
-0.010882258415222168,
0.15221717953681946,
0.5835776329040527,
-0.0236736498773098,
0.07180538028478622,
0.514285683631897,
0.11026816070079803,
-0.5885331034660339,
-0.18074369430541992,
-0.6401435136795044,
-0.14470739662647247,
0.5887183547019958,
-0.6253666877746582,
0.211132526397705... | |
_methods[obj.GetType()](obj, a);
}
}
// Using Reflection + overloaded methods
class Example4
{
private delegate void CalcDelegate(object obj, int a);
public static void Calc(object obj, int a)
{
Type[] types = new Type[] {
obj.GetType(), typeof(int)
};
typeof(Exam... | [
0.30320316553115845,
0.08093301206827164,
0.40768030285835266,
-0.03724139556288719,
0.06671846657991409,
0.48062369227409363,
0.375169575214386,
-0.515274167060852,
-0.15021438896656036,
-0.5442864298820496,
-0.2762548327445984,
0.7033456563949585,
-0.7536158561706543,
0.2776195704936981,... | |
{
obj.Calculate(a);
}
public static void Calc(Bar obj, int a)
{
obj.Compute(a);
}
}
```
Thanks!
I would go for example 1, because its the simplest one and most obvious.
I would use Example 2 only if you expect new types of objects with one of these two methods, and example 3 only if... | [
-0.11498009413480759,
0.25806179642677307,
0.44307419657707214,
-0.30086302757263184,
-0.08731788396835327,
0.2845878303050995,
0.20008069276809692,
-0.16535484790802002,
-0.37471693754196167,
-0.7744424939155579,
-0.181465744972229,
0.5251674652099609,
-0.5514931082725525,
-0.062529087066... | |
are .Net 3 | [
0.10047455132007599,
-0.1347304880619049,
0.06925997883081436,
0.22705253958702087,
-0.5466196537017822,
-0.13411490619182587,
0.41948390007019043,
-0.19023829698562622,
-0.17951355874538422,
-0.6631425023078918,
-0.21510976552963257,
0.18781805038452148,
-0.4680324196815491,
0.11947675794... | |
I've come up against the unlikely scenario when I reference two external assemblies that both have the same namespace and type names. When I try to use the type, the compiler throws an error that it cannot resolve which one I want to use.
I see that C# offers a mechanism to use aliases for references. You can even spe... | [
0.4884956181049347,
0.4163859486579895,
-0.005772571545094252,
-0.18369652330875397,
-0.06154719367623329,
-0.25258588790893555,
0.3942117989063263,
0.02540096454322338,
-0.2504470646381378,
-0.49590426683425903,
0.16614782810211182,
0.7105591893196106,
-0.46966278553009033,
0.038602415472... | |
Alias not found`
The usual `.` operator fails as well.
In the output window I see that the compiler gets the alias passed correctly in its command line.
Any pointers on what I may be able to try next are greatly appreciated.
```
extern alias alias1;
using alias1::Namespace;
``` | [
0.07882978022098541,
-0.11032571643590927,
0.4091390371322632,
-0.04319135844707489,
0.20316682755947113,
-0.15149345993995667,
0.5254995822906494,
0.036063749343156815,
0.1934228539466858,
-0.7062551379203796,
-0.2832179367542267,
0.995069146156311,
-0.2797798216342926,
-0.155178844928741... | |
I have a MS SQL database that is getting replicated to mobile SQL CE databases.
My question is as follows:
Are the indexes getting propagated to the sqlce database tables as well?
Actually the answer is "it depends". Some are, and some are not. It also depends on how you provision the mobile database. The different s... | [
0.3414503037929535,
0.05293012410402298,
0.8247737288475037,
0.04950470104813576,
0.09509618580341339,
0.024611638858914375,
0.028007326647639275,
-0.027697009965777397,
-0.3111346662044525,
-0.875773549079895,
0.1302555650472641,
0.5534968972206116,
-0.29378455877304077,
0.304756313562393... | |
provisioned databases by default do not include all indexes. | [
-0.03572097048163414,
0.22617438435554504,
0.1691405028104782,
0.5633397102355957,
0.19208598136901855,
-0.012581204995512962,
-0.25206610560417175,
0.32040685415267944,
-0.28985077142715454,
-0.5605667233467102,
-0.46124669909477234,
0.2789033353328705,
-0.2433650940656662,
0.292352259159... | |
Lets say that i have this text:
```
$test = 'lorem';
$test2= 'ipsum';
```
and I want to copy lorem and paste into ipsum.
I tried to do `yi'` on lorem and then went on ipsum and did `ci'` but that replaced my pastebin with ipsum. and my previous copy was lost.
**yi'** on lorem, move to i of ipsum, **vep**? | [
0.30648359656333923,
0.27715349197387695,
0.4329795837402344,
0.16920705139636993,
-0.05402444303035736,
0.37558773159980774,
-0.06403183192014694,
-0.06590675562620163,
0.06287543475627899,
-0.6289568543434143,
0.031117362901568413,
0.15219610929489136,
-0.1701081097126007,
0.124232910573... | |
Is there a command that would be useful?
In the root of the working copy folder, do
```
svn export --force .
``` | [
0.12675125896930695,
0.17144587635993958,
0.31800520420074463,
-0.0849081501364708,
0.26842328906059265,
-0.11700436472892761,
0.0075017367489635944,
0.23014195263385773,
-0.1989140510559082,
-0.5340312123298645,
-0.3675309419631958,
0.671240508556366,
-0.32875365018844604,
0.0857566073536... | |
Given the following controller method:
```
[AcceptVerbs("POST","GET")]
public ActionResult apiMapInfo()
{
var x = new { Lat = "", Long = "", Name = ""};
var mapInfo = new DALServices.Models.MapInfo();
```
// Updates correctly
```
TryUpdateModel(mapInfo);
```
// Does not update... | [
-0.36540788412094116,
-0.6509197950363159,
0.9285941123962402,
0.07256969809532166,
0.13476355373859406,
0.1290571242570877,
0.053014740347862244,
-0.5586547255516052,
-0.5723469853401184,
-0.6099182963371277,
-0.37427687644958496,
0.4210400879383087,
-0.47579145431518555,
0.19443926215171... | |
return new ObjectResult<Result>(new Result(svc.errorCode, svc.errorMessage, svc.results), svc.ExtraTypesForSerialization);
}
```
The object x is not updated correctly by the TryUpdateModel method, but the mapInfo object is.
My assumption is that the TryUpdateModel method doesn't handle mapping to an anonymous ty... | [
-0.21785421669483185,
0.09414840489625931,
0.44203245639801025,
-0.06512415409088135,
0.14181622862815857,
-0.17909622192382812,
0.3973054885864258,
-0.1861640065908432,
-0.09972860664129257,
-0.8592031598091125,
-0.2938331961631775,
0.4939675033092499,
-0.30236920714378357,
0.252716153860... | |
I am attempting to launch the .NET CF installer from a VB6 app using the following code (for the sake of brevity I have replaced the full path to the installer with "(full path)"):
```
Shell "C:\WINDOWS\system32\msiexec.exe /fa ""(full path)\NETCFSetupv35.msi"""
```
I've run this on four machines so far. On two it w... | [
0.6638590097427368,
0.12195911258459091,
0.6398463249206543,
-0.320475310087204,
0.22811824083328247,
-0.2865148186683655,
0.2042924016714096,
0.07429966330528259,
0.06989886611700058,
-0.8478466868400574,
-0.11536887288093567,
0.98745197057724,
-0.3593686819076538,
-0.14613164961338043,
... | |
provides a text box to enter a path and a browse button to find it, so I provide the path, click the open button and get this error, "Error 1706.No valid source could be found for product Microsoft .NET Compact Framework 3.5. The Windows Installer cannot continue."
Can anyone tell me what's going wrong here? What is m... | [
0.49220526218414307,
0.2841251492500305,
0.16114404797554016,
0.1533990055322647,
0.07283695042133331,
-0.38988763093948364,
0.6609786748886108,
0.29986271262168884,
-0.06677012890577316,
-0.4864228665828705,
-0.0030575713608413935,
0.5388798713684082,
-0.18095915019512177,
0.1250084936618... | |
were advantages to putting your blog on a separate subdomain though. Links from your blog to your main site could help with your main site's page rank if your blog has a decent page rank.
However, it seems like that has changed. Here's an interesting post about setting up [blog subdomains vs. folders.](http://www.sear... | [
0.2586928606033325,
-0.3212968111038208,
0.5600817203521729,
0.34670621156692505,
-0.4423266351222992,
-0.26815032958984375,
0.2537948489189148,
0.30295562744140625,
-0.5502176284790039,
-0.3860650658607483,
-0.03205291926860809,
0.04278356581926346,
-0.15801532566547394,
0.338349908590316... | |
content and number & quality of incoming links, not on how much traffic you get. Which makes sense since Google really has no way of knowing how much traffic you get to your site other than perhaps the traffic they send there via Google searches. | [
0.42490193247795105,
0.10632981359958649,
0.774212658405304,
0.41518983244895935,
-0.2009427398443222,
-0.1350693553686142,
0.1525675654411316,
0.5944380760192871,
-0.5191377997398376,
-0.4958716630935669,
-0.08650975674390793,
0.3441108763217926,
0.025005385279655457,
0.15818455815315247,... | |
I've got a .net calendar up and running and bringing information from a database. By default the day number has a post back action applied to it.
What I'm trying to do is have that action apply to the whole cell so the user doesn't need to click on just the text link.
I'm the dayRenderer action i have the following l... | [
0.5214674472808838,
0.03754072263836861,
0.2972679138183594,
-0.26019832491874695,
-0.0755835697054863,
-0.022605229169130325,
0.3680437207221985,
-0.06522336602210999,
-0.4242648184299469,
-0.6131432056427002,
0.1333334743976593,
0.09008535742759705,
-0.2380245327949524,
0.106351174414157... | |
below. I hope this makes sense! I'm new to .NET so not very savvy with my terminology!
```
e.Cell.Attributes.Add("OnClick",
string.Format("javascript:__doPostBack('{0}','{1}')",
Calendar1.ClientID, ***ID_NEEDED_HERE***));
```
The parameter is the number of days since Jan 1 2000 for the first day of your cal... | [
0.5508734583854675,
0.25562965869903564,
0.7685795426368713,
0.024708356708288193,
-0.26603734493255615,
0.04119009152054787,
0.22514373064041138,
0.17572766542434692,
-0.49131038784980774,
-0.49977269768714905,
-0.027841003611683846,
0.40740689635276794,
0.15363049507141113,
0.18237270414... | |
I have 2 tables in SQL:
```
Table 1
Step Id
Step Name
Table 2
Profile Id
Step Id
Completed
```
I would like to return the following results even if there is not match in table 2:
```
Results
Table1.Step Id
Table1.Step Name
Table2.Profile Id
Table2.Completed
```
The way I am doing this in SQL is the following:
... | [
-0.357075035572052,
0.0027043966110795736,
1.0224330425262451,
-0.07733480632305145,
0.06626757979393005,
-0.15402790904045105,
0.09171353280544281,
-0.7661487460136414,
-0.20281626284122467,
-0.7983553409576416,
-0.06921690702438354,
0.4077243506908417,
-0.10613080859184265,
-0.1853345334... | |
join us in userStep
on s.Id equals us.StepId
select new UserCompletion
{
StepId = s.Id,
Headline = s.StepName,
ProfileId = us.ProfileId
Completed= us.Completed
}; | [
-0.1634264439344406,
-0.5654818415641785,
1.0022042989730835,
-0.019805215299129486,
0.23971092700958252,
0.10672946274280548,
0.6153943538665771,
-0.3987814784049988,
0.006004312541335821,
-0.8489711880683899,
-0.195290207862854,
-0.047480423003435135,
-0.18436060845851898,
0.056360714137... | |
return q.ToList();
}
```
It works but like a `JOIN` not a `left join`. I only get matching results back.
Also, `UserCompletion` is an object that I return from this method.
You could also try this (assuming us.Completed is boolean):
```
var q = from s in step
let us = (from i in userStep where s.Id = i.St... | [
-0.210038423538208,
-0.4553894102573395,
0.6184598207473755,
-0.22644329071044922,
0.07675709575414658,
0.0766051784157753,
0.4927796721458435,
-0.7990246415138245,
0.043818872421979904,
-0.764240562915802,
-0.16647864878177643,
0.3074764907360077,
-0.2838064134120941,
0.13231289386749268,... | |
Headline = s.StepName,
ProfileId = us.ProfileId
Completed = us == null ? false : us.Completed
};
```
This won't turn into a join in sql, but a nested select statement something like this:
```
select
StepId, Headline, ProfileId,
isnull((select top(1) Completed from userStep wh... | [
0.11191330850124359,
-0.37984561920166016,
0.7259254455566406,
-0.15357884764671326,
0.013019897975027561,
-0.16170218586921692,
0.3859577178955078,
-0.3819292485713959,
-0.17940983176231384,
-0.5626664161682129,
-0.006802349351346493,
0.05695362016558647,
-0.3093738853931427,
-0.030817441... | |
Can anyone provide some information on how to run an integration services package, on an SQL server 2005 instance, from Visual Basic 6?
Any help at all is much appreciated.
You need to have `xp_cmdshell` enabled, if it's not, execute: `sp_configure 'xp_cmdshell', '1'` in SSMS on your server.
Create a store procedure,... | [
-0.03063160926103592,
-0.056050002574920654,
0.39616456627845764,
-0.001453797915019095,
-0.049252256751060486,
-0.08353468775749207,
0.3262893557548523,
-0.49657413363456726,
-0.13654272258281708,
-0.7209144830703735,
0.05607796087861061,
0.559356153011322,
-0.4927618205547333,
-0.1173196... | |
/SET \Package.Variables[User::somevariable1].Properties[Value];"' + @variable_value1 + '"'
SET @cmd = @cmd + ' /SET \Package.Variables[User::somevariable2].Properties[Value];"' + @variable_value2 + '"'
SET @cmd = @cmd + ' /SET \Package.Variables[User::somevariable3].Properties[Value];"' + @variable_value3 + '"'
EXECUT... | [
0.369061678647995,
-0.007623971439898014,
0.5812085270881653,
0.04037179797887802,
-0.1695663332939148,
-0.1679508537054062,
0.38948071002960205,
-0.2712416350841522,
-0.23322823643684387,
-0.6127962470054626,
-0.1847597360610962,
0.696368396282196,
-0.059844933450222015,
0.043381053954362... | |
I have an aspx page which has a GridView and a Panel with Summary Data. The Summary Data is in a control and the GridView is on the aspx page. When someone clicks an item in the Summary Data, I want to rebind the GridView, but I can't figure out how to do it from the control.
I tried using FindControl, but probably di... | [
0.04998617619276047,
-0.15653657913208008,
0.5129899978637695,
0.011286892928183079,
-0.2439739853143692,
-0.041378676891326904,
-0.003529172856360674,
-0.11471699178218842,
-0.1440822035074234,
-0.9290107488632202,
0.07515526562929153,
0.57716965675354,
-0.32694998383522034,
0.14971989393... | |
I often need to execute custom sql queries in django, and manually converting query results into objects every time is kinda painful. I wonder how fellow Slackers deal with this. Maybe someone had written some kind of a library to help dealing with custom SQL in Django?
Since the issue is "manually converting query res... | [
0.683286726474762,
0.2297884076833725,
-0.07723821699619293,
0.30669280886650085,
-0.012311829254031181,
-0.16835808753967285,
0.2308855801820755,
0.11537663638591766,
-0.4273765981197357,
-0.3608926832675934,
0.14573423564434052,
0.6787838935852051,
-0.1178056001663208,
0.0408563055098056... | |
Here's a simplified version of my page:
```
<asp:UpdatePanel runat="server" ID="dateUpdatePanel" RenderMode="Inline">
<ContentTemplate>
<asp:Label runat="server" ID="lblDateFrom" Text="From:" />
<asp:TextBox runat="server" ID="txtDateFrom" />
<asp:ImageButton runat="server" ID="cmdDateFrom" ImageUrl="~/im... | [
-0.0611848384141922,
0.09909490495920181,
1.021685242652893,
-0.2784539461135864,
-0.28131601214408875,
0.014327245764434338,
0.053352728486061096,
-0.0923432782292366,
-0.2476039081811905,
-0.8593878746032715,
-0.12022246420383453,
0.5708228945732117,
-0.010896463878452778,
-0.33187139034... | |
on the calendar image button (cmdDateFrom) the "Run Report" button moves and is rendered on the next line down!
Can any CSS gurus help?
Since the issue is "manually converting query results into objects," the simplest solution is often to see if your custom SQL can fit into an ORM .extra() call rather than being a pu... | [
0.38450703024864197,
-0.05765393748879433,
0.5477997660636902,
0.28904107213020325,
-0.11081039905548096,
-0.09490818530321121,
0.24136249721050262,
0.3648684620857239,
-0.5714846253395081,
-0.6160688996315002,
0.09171167761087418,
0.540367603302002,
-0.1729244738817215,
-0.151562854647636... | |
I am trying to write to a file from Perl. I just want to write the data in a tab-delimited format. However, the data that I am writing has varying lengths and is not lining up.
For example, I am trying to write something like this:
```
Name Education Fav_Car MoneyInBank
josh High School Porche 500
SomeOtherNam... | [
0.46432462334632874,
0.5676370859146118,
0.3674181401729584,
0.07532913237810135,
0.09849818050861359,
0.4085572063922882,
0.02901635505259037,
0.402233749628067,
0.02874523401260376,
-0.42732512950897217,
0.17474864423274994,
0.39523258805274963,
0.20383083820343018,
-0.002855455502867698... | |
$sth->fetchrow_array) {
printf FILE ("%s>>>>>>>>>>>>>%40s%40s\n", $name, $ed, $car);
};
```
Tab-delimited data (where the fields are not consistent in length) does not line up when opened in a text editor.
Solutions:
* Open the file in a spreadsheet.
* Open it in a word processor, select all the text, and defi... | [
-0.16564098000526428,
-0.015773119404911995,
0.6940319538116455,
-0.10549284517765045,
-0.17542201280593872,
0.40802884101867676,
0.20339806377887726,
-0.11901775002479553,
-0.3611142039299011,
-0.5530453324317932,
-0.46263477206230164,
0.5612403154373169,
-0.2761351764202118,
0.0479809269... | |
the field to be left justified. Numbers (like money) are usually right-justified (which is the default). | [
-0.022662969306111336,
-0.2832775413990021,
-0.07068056613206863,
0.14077532291412354,
-0.2383977621793747,
-0.16581463813781738,
-0.004197847563773394,
-0.1843176633119583,
-0.2062271386384964,
-0.09080059081315994,
-0.534494161605835,
0.7738102674484253,
-0.27739861607551575,
-0.12354490... | |
**DUPLICATE**
[How to do version numbers?](https://stackoverflow.com/questions/615227/how-to-do-version-numbers)
---
Hello,
So I recently saw that **Groovy** was released to version **1.6** and while listening to the Java Posse Podcast they were commenting how there was so much packed into this release it should ha... | [
0.54295814037323,
0.19674654304981232,
0.22821664810180664,
0.07357863336801529,
-0.13885319232940674,
-0.15808285772800446,
0.16012944281101227,
0.3847465515136719,
-0.8804606795310974,
-0.44986143708229065,
0.198415145277977,
0.43748921155929565,
-0.30034804344177246,
0.05739380046725273... | |
your customers to think." In that case, a "major new version" should probably be accompanied by a major version number.
Also be aware that careful customers will be hesitant to use "major" new releases until time has passed and they've tried it in a test environment. A "build change" release is perceived as having bug... | [
0.5993099212646484,
0.14550557732582092,
0.14664392173290253,
0.16512110829353333,
0.43228551745414734,
-0.10004004091024399,
0.3441169261932373,
0.2577013373374939,
-0.34569889307022095,
-0.6091950535774231,
-0.39840272068977356,
0.7484041452407837,
-0.045808397233486176,
0.01533610187470... | |
mean lots of new bugs." Perhaps a new "build" number happens on every single compile. Perhaps nightly build tags by date are your version. You can base it on time, Scrum cycles, milestones, features, whatever! | [
0.6714338064193726,
0.2858217656612396,
0.0572970025241375,
0.2678264379501343,
0.3792478144168854,
-0.003457573475316167,
0.3425959646701813,
0.49970152974128723,
-0.610204815864563,
-0.47179099917411804,
0.09852495789527893,
0.5810865759849548,
-0.005134756211191416,
0.06745169311761856,... | |
I'd like to save the current single-repeat action (this is what happens when you press .), then run a macro, and then restore the . action (because macros usually change it).
Is this possible?
Alternatively, is it possible to write a macro without changing the current . action? I guess I could try to do everything i... | [
0.26561155915260315,
-0.3251567780971527,
0.2511795461177826,
-0.12985211610794067,
0.3420800268650055,
0.11041457206010818,
0.09591882675886154,
0.20493033528327942,
-0.22919265925884247,
-0.7479280829429626,
0.034959133714437485,
0.848496675491333,
-0.28421226143836975,
-0.15367215871810... | |
Currently, when you switch files using this function, your . action is overwritten, which is very unwelcome.
In VIM you can create a macro that will execute any edits you would typically do in `normal` mode without disturbing the redo `[.]` functionality by wrapping those edits in a user defined `:function` and then ex... | [
0.4017190933227539,
-0.31067290902137756,
0.5325573682785034,
-0.062140438705682755,
0.13236869871616364,
-0.10029131174087524,
0.06655753403902054,
0.07225003093481064,
-0.3349398374557495,
-0.9777042865753174,
-0.10139387100934982,
0.6270108819007874,
-0.3111265003681183,
0.1745578497648... | |
redo command `[.]`.
Here's how to do it:
1. Open a new vim window and execute the following commands:
```
:fu JL()
normal Ayyy
endfu
:map <F2> :call JL()<Enter>
```
2. Now add some text, let's say `xxx`, by typing `Axxx<Esc>`
3. Now press the `[F2]` key and you should see `xxxyyy`
4. Finally, press the `[.]... | [
0.2236742079257965,
-0.1285688430070877,
0.7456952929496765,
-0.17679136991500854,
-0.1196242943406105,
-0.04748501256108284,
0.2598622739315033,
-0.3997915983200073,
-0.17234976589679718,
-0.5014090538024902,
-0.31452199816703796,
0.9752200245857239,
-0.45647940039634705,
-0.1594860106706... | |
characters back into the keyboard buffer to re-execute them. Unfortunately, a simple `q` macro works the same way -- it stuffs characters into the buffer and by doing so overwrites the redo buffer. The `:normal` command does this as well, but when placed inside a user defined function we get around this limitation beca... | [
-0.21716296672821045,
0.11973486095666885,
0.41424915194511414,
-0.1600896567106247,
0.25943782925605774,
0.3020741641521454,
0.40250250697135925,
0.11897114664316177,
-0.09946445375680923,
-0.5971025824546814,
-0.23593859374523163,
0.5271125435829163,
-0.2855169475078583,
-0.0049156518653... | |
I'm trying to write a shell script to perform actions if a users home directory if over a certain size. Unfortionately when I try to use the read command to split up the `du -s` output I get 'command not found' since it tries to pass the number through to the shell, not into a variable like I want. Here's what I have s... | [
0.34254688024520874,
0.1493762880563736,
-0.003158381674438715,
-0.49868103861808777,
0.0006621228531002998,
-0.007371867541223764,
0.5570817589759827,
-0.14617858827114105,
-0.04586087912321091,
-0.5343351364135742,
0.02949923649430275,
0.7948653697967529,
-0.33296164870262146,
-0.0733682... | |
3284972: command not found
```
where 3284972 is the size of the directory.
I think you'll want something along the lines of
```
#!/bin/bash
for i in *
do
j=`du -s "$i" | cut -f 1`
echo $i size is $j
done
```
Reading into another variable, read, and playing with that seems redundant.
I believe a more elega... | [
0.01795506849884987,
0.09190971404314041,
0.0427347868680954,
-0.12139973044395447,
0.17251281440258026,
-0.03721856325864792,
0.40346288681030273,
-0.6133832335472107,
-0.26404300332069397,
-0.27740341424942017,
-0.09700408577919006,
0.7820162773132324,
-0.44872817397117615,
-0.0231161806... | |
From what I have seen and read on blogs, PyPy is a very ambitious project. What are some advantages it will bring to the table over its siblings (CPython, Jython, and IronPython)? Is it speed, cross-platform compatibility (including mobile platforms), the ability to use c-extensions without the GIL, or is this more of ... | [
0.23738420009613037,
-0.13072621822357178,
0.1989181935787201,
0.2184915691614151,
-0.09540581703186035,
0.3352500796318054,
-0.20677724480628967,
-0.023217687383294106,
-0.2527427673339844,
-0.6380841732025146,
-0.02867949567735195,
0.20667286217212677,
-0.2902972996234894,
-0.35683900117... | |
projects allow for *many* things.
* Maintaining Python in Python is much easier than maintaining it in C
* From a single codebase you can generate Python interpreters that run on the JVM, .NET and standalone - rather than having multiple slightly incompatible implementations
* Part of the compiler toolchain includes a... | [
0.44170311093330383,
0.010329650714993477,
-0.1585923731327057,
0.28381550312042236,
-0.24448959529399872,
0.02398485131561756,
0.35197681188583374,
-0.032816845923662186,
-0.2661152482032776,
-0.5275689959526062,
-0.007480039726942778,
0.15762117505073547,
-0.16592736542224884,
-0.2074804... | |
there are really a lot of reasons for PyPy to be exciting, and it is finally starting to live up to all its promises. | [
0.6794773936271667,
-0.24549847841262817,
0.4401342570781708,
0.48001956939697266,
0.13583551347255707,
-0.1684476137161255,
-0.1444520354270935,
0.6977845430374146,
-0.2869185507297516,
-0.3223268389701843,
0.15579526126384735,
-0.29424363374710083,
0.40730318427085876,
0.1624322831630706... | |
I'm working on a VB.NET DLL right now, and one of the functions I'm writing is supposed to take a file, and clip out an array of bytes (the method I've got works, and can be abstracted away here). What's the best way to pass a file to this function? Would passing a filename to it be best, or what would be the best way ... | [
0.3541969954967499,
-0.05115222558379173,
0.5761926770210266,
-0.042957089841365814,
0.10424928367137909,
-0.06794977188110352,
0.20178547501564026,
-0.21135292947292328,
-0.24395732581615448,
-0.6924548745155334,
-0.13049493730068207,
0.35412275791168213,
-0.2800169289112091,
0.3009976148... | |
I have a Web content form and need to access a control inside the content panel. I know of two ways to access the control:
1. `TextBox txt = (TextBox)Page.Controls[0].Controls[3].Controls[48].Controls[6]`
2. By writing a recursive function that searches through all controls.
Is there any other easier way, since `Page... | [
0.07273879647254944,
-0.019773012027144432,
0.3272324204444885,
0.25779399275779724,
0.10392846912145615,
-0.1513068825006485,
0.15461458265781403,
-0.19109223783016205,
0.05290529876947403,
-0.62663733959198,
-0.13074177503585815,
0.42499324679374695,
-0.2194734364748001,
0.20116950571537... | |
the control you are after lives in a template, it won't be found.
So we added the following extension methods to deal with this. If you are not using 3.5 or want to avoid the extension methods, you could make a general purpose library out of these.
You can now get the control you are after by coding:
```
var button ... | [
0.01975901983678341,
-0.2581859827041626,
0.6936559081077576,
-0.03223751112818718,
0.18606795370578766,
0.06312734633684158,
-0.11084380000829697,
-0.3038167953491211,
-0.24858738481998444,
-0.6403102278709412,
-0.20852437615394592,
0.6333395838737488,
-0.5192360877990723,
0.2137582153081... | |
controls,
Func<Control, bool> predicate)
{
List<Control> list = new List<Control>();
controls.Traverse(c => { if (predicate(c)) list.Add(c); });
return list;
}
public static void Traverse(this ControlCollection controls, Action<Control> action)
{
foreach (Control control in controls)
{
... | [
-0.24284833669662476,
-0.21816904842853546,
0.598124086856842,
-0.0874505490064621,
0.19265037775039673,
0.18392005562782288,
0.08864587545394897,
-0.5535967350006104,
-0.6700331568717957,
-0.3211820125579834,
-0.41282206773757935,
0.4341050088405609,
-0.43145185708999634,
0.04766009002923... | |
}
}
public static Control GetControl(this Control control, string id)
{
return control.Controls.Flatten(c => c.ID == id).SingleOrDefault();
}
public static IEnumerable<Control> GetControls(this Control control)
{
return control.Controls.Flatten();
}
``` | [
-0.22137337923049927,
-0.2699297368526459,
0.5260337591171265,
-0.034091971814632416,
0.3833288252353668,
-0.10518544167280197,
0.05632127448916435,
-0.06531653553247452,
-0.13675335049629211,
-0.5423054695129395,
-0.5658140182495117,
0.9001531004905701,
-0.3428180515766144,
0.236535266041... | |
I made an Unix command called macmac2unix, which converts a Word file from Mac to Unix.
How can I provide documentation for my command?
I want to read about my command with man
```
$man macmac2unix
```
I recommend [Perl's POD format](http://www.perl.com/doc/manual/html/pod/perlpod.html). Despite the name, you can us... | [
-0.09791356325149536,
0.005834825336933136,
0.2574727237224579,
-0.08147935569286346,
-0.04559953883290291,
0.11241985112428665,
0.03624940291047096,
-0.01128840446472168,
-0.06944629549980164,
-0.8708672523498535,
-0.2431778758764267,
0.5380682945251465,
-0.23629282414913177,
0.3059234321... | |
```
<a href="" id="someId" onclick="SomeMethod(self);"></a>
```
Where SomeMethod could have:
```
function SomeMethod(item)
{
item.setAttribute('name', item.id);
}
```
Instead of:
```
function SomeMethod(itemId)
{
var someItem;
someItem = document.getElementById(itemId);
someItem .setAttribute('name', som... | [
-0.03698155656456947,
0.12255699187517166,
0.17903445661067963,
-0.14908890426158905,
-0.03763139620423317,
-0.1338416039943695,
0.4113081395626068,
-0.18890295922756195,
0.1588968187570572,
-0.44211718440055847,
-0.23031951487064362,
0.3462080955505371,
-0.11476606130599976,
0.04397734627... | |
This is my log4net config file
```
<?xml version="1.0" encoding="utf-8" ?>
<log4net debug="true">
<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" >
<filter type="log4net.Filter.LevelRangeFilter">
<acceptOnMatch value="true" />
<levelMin value="DEBUG" />
<levelMax value... | [
-0.373386025428772,
0.098782978951931,
0.49492147564888,
-0.23460665345191956,
0.2688952386379242,
-0.3859812021255493,
0.3311196267604828,
-0.27513593435287476,
0.0024262035731226206,
-0.9434829354286194,
0.013594805262982845,
0.48665139079093933,
-0.34646856784820557,
0.00212046434171497... | |
<smtpHost value="smtp.x.com" />
<username value="admin" />
<password value="x" />
<bufferSize value="256" />
<lossy value="true" />
<evaluator type="log4net.spi.LevelEvaluator">
<threshold value="ERROR" />
</evaluator>
<layout type="log4net.Layout.PatternLayout">
<conversionPatte... | [
-0.4601288437843323,
-0.15067645907402039,
0.5430327653884888,
-0.1453944891691208,
0.020488275215029716,
0.18755090236663818,
0.25716930627822876,
-0.1367485523223877,
-0.6007395386695862,
-0.48507562279701233,
-0.2235902100801468,
0.2345937043428421,
-0.16700415313243866,
0.1053153201937... | |
<!--<rollingStyle value="Date" />-->
<filter type="log4net.Filter.LevelRangeFilter">
<acceptOnMatch value="true" />
<levelMin value="INFO" />
<levelMax value="FATAL" />
</filter>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [... | [
0.10822362452745438,
-0.014682183973491192,
0.48259681463241577,
-0.010296499356627464,
0.08473195880651474,
-0.15828312933444977,
0.23785075545310974,
-0.2249494045972824,
-0.41920071840286255,
-0.5002278685569763,
0.12807859480381012,
0.5328679084777832,
-0.013942161574959755,
0.15763546... | |
size while maintaining clarity, better conversion patterns? Any interesting hacks?
Edit: XMl file didnt get into the code block.Updating. Any sugggestions?
One suggestion for the RollingLogFileAppender is to use the minimal lockingModel. With this setting the log file isn't locked, rather it is opened and then closed... | [
-0.007789153140038252,
-0.07020081579685211,
0.40342533588409424,
0.07890164107084274,
0.13662515580654144,
-0.09733237326145172,
0.125804141163826,
0.12103646993637085,
-0.7678385376930237,
-0.6856982111930847,
-0.018223855644464493,
0.7187199592590332,
-0.20009005069732666,
-0.0541284866... | |
I'm trying to test out modes of failure for software that interacts with a web service, and I've already had reported issues where problems occur if the software doesn't get a timely response (e.g., it's waiting a minute or longer). I'd like to simulate this so that I can track down and fix issues myself, but unpluggin... | [
0.4573681056499481,
0.0854552686214447,
0.0517679862678051,
0.39198213815689087,
0.10523398220539093,
-0.05560619384050369,
0.3137040436267853,
0.18468500673770905,
-0.2031104415655136,
-0.5259447693824768,
0.047781094908714294,
0.5029798746109009,
-0.1657838225364685,
0.03466658666729927,... | |
for several minutes, without doing a `while (true) {}` type of loop?
How about letting the script sleep for some (very long) time? | [
0.7966184616088867,
-0.325446754693985,
0.16364766657352448,
0.08756360411643982,
0.3036451041698456,
-0.5209105610847473,
0.26821842789649963,
0.05817147716879845,
-0.07731130719184875,
0.02814570628106594,
0.11526237428188324,
0.2307242751121521,
0.22549600899219513,
0.07822850346565247,... | |
> **Possible Duplicate:**
>
> [Can anyone explain IEnumerable and IEnumerator to me?](https://stackoverflow.com/questions/558304/can-anyone-explain-ienumerable-and-ienumerator-to-me)
What are the differences between IEnumerator and IEnumerable?
[IEnumerable](http://msdn.microsoft.com/en-us/library/system.collection... | [
-0.048104189336299896,
0.05754736810922623,
0.21783959865570068,
0.13988102972507477,
0.1116434708237648,
-0.211514413356781,
0.11043134331703186,
-0.2500670552253723,
-0.4612102210521698,
-0.6001327633857727,
-0.46121737360954285,
0.3393796682357788,
-0.17250408232212067,
0.28041702508926... | |
The standard PHP way to test whether a string `$str` ends with a substring `$test` is:
```
$endsWith = substr( $str, -strlen( $test ) ) == $test
```
Is this the fastest way?
What Assaf said is correct. There is a built in function in PHP to do exactly that.
```
substr_compare($str, $test, strlen($str)-strlen($test)... | [
0.10280022025108337,
0.13865017890930176,
0.2548093795776367,
-0.06680936366319656,
-0.18430988490581512,
-0.17753052711486816,
0.5353793501853943,
-0.3268996775150299,
0.11859651654958725,
-0.21867233514785767,
-0.06052863970398903,
0.5289236307144165,
-0.12471777945756912,
-0.15213648974... | |
$testlen, $testlen) === 0;
}
``` | [
0.2559388279914856,
-0.009564035572111607,
0.04663214087486267,
-0.2325202077627182,
0.2598033845424652,
-0.13790357112884521,
0.456888347864151,
-0.051922038197517395,
0.16332988440990448,
-0.3550185561180115,
-0.11098034679889679,
0.7692885398864746,
-0.4816248118877411,
0.18961384892463... | |
I'm looking for a function that will determine the value of a place given a number and a base. For example,
**Given:**
> ```
> Whole Value: 1120
> Base: 10
> Place: Tens place
>
> ```
**Should return:** 2
Does anybody know the math for this?
Edit: The function is also expected to pass the whole value numerically,... | [
-0.07240377366542816,
0.13304533064365387,
0.36634814739227295,
-0.1267077773809433,
0.12048570066690445,
0.08666210621595383,
-0.07417622208595276,
-0.2746609151363373,
-0.1661682426929474,
-0.5156222581863403,
-0.04637918993830681,
0.06727461516857147,
-0.041522424668073654,
0.0455924570... | |
return number//base**(place-1) % base
``` | [
-0.018345339223742485,
0.3114279508590698,
0.013390026986598969,
-0.20603325963020325,
0.029516706243157387,
0.1967754364013672,
0.10377878695726395,
-0.1866900771856308,
0.3394005596637726,
-0.17677561938762665,
-0.34824317693710327,
0.19659219682216644,
-0.11400251090526581,
0.0841014087... | |
Was looking at some code earlier, and am thinking that there has to be a more elegant way of writing this....
(returnVar.Warnings is a string array, it could be returned as any size depending on the number of warnings that are logged)
```
For Each item In items
If o.ImageContent.ImageId = 0 Then
ReDim Preserv... | [
0.305774986743927,
0.036685358732938766,
0.8545389175415039,
-0.10462076216936111,
0.04774446785449982,
-0.025653721764683723,
0.4680713415145874,
-0.4387003481388092,
-0.5011457800865173,
-0.6182878613471985,
-0.2682866156101227,
0.6760187745094299,
-0.4110479950904846,
0.1560399085283279... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.