text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I have an ASP.NET page where I need to figure out where the style for a textbox is coming from. There are several style sheets defined for the page and I want to be able to use some sort of tool / editor that will tell me what styles were used and from what file(s) to render the textbox.
Thank you.
Use Firefox with [F... | [
0.5826938152313232,
0.3708648383617401,
0.29020747542381287,
-0.08145378530025482,
-0.22063395380973816,
-0.0666101798415184,
0.09100844711065292,
-0.32527047395706177,
-0.31758424639701843,
-0.7571792006492615,
-0.029157966375350952,
0.45584312081336975,
-0.21618406474590302,
-0.314030200... | |
I found a couple of ways to handle recursion in Smarty, mostly based on including templates into themselves, which seems like ridiculous waste of resources. I found one solution, by Messju over at Smarty that seemed to be just right - but it is not supported and fails in the latest version of smarty :(
For people aski... | [
0.1392098367214203,
0.04542810842394829,
0.022230098024010658,
0.17671623826026917,
0.02498059906065464,
0.15589120984077454,
0.07367720454931259,
-0.02586747333407402,
-0.2892749011516571,
-0.5247081518173218,
0.15314336121082306,
0.1573752611875534,
-0.21801628172397614,
-0.0164678171277... | |
array(
'id'=>0,
'headline'=>"My parent headline",
'body' =>"My parent body",
'children'=>array(
array(
'id'=>1,
'headline'=>"My firstChild headline", | [
0.12601107358932495,
0.17741326987743378,
0.22286909818649292,
0.023211147636175156,
0.10714071989059448,
0.2726978361606598,
-0.22626422345638275,
0.026351911947131157,
0.06016474589705467,
-0.7360541224479675,
0.03878354653716087,
0.06423157453536987,
-0.08453032374382019,
0.208726793527... | |
'body' =>"My firstChild body",
'children'=>array()
),
array(
'id'=>2,
'headline'=>"My secondChild headline",
'body' | [
0.3274737000465393,
0.13462062180042267,
0.30878183245658875,
0.05400174856185913,
0.02779138833284378,
0.47721582651138306,
-0.05952049046754837,
-0.08961726725101471,
-0.022525839507579803,
-0.7710704803466797,
0.12001088261604309,
0.06732714176177979,
0.07959438115358353,
0.192752122879... | |
=>"My secondChild body",
'children'=>array()
)
)
),
);
```
The nested array has an arbitrary depth, and each entry will have an arbitrary number of children. To me this is something I want to do with within the scope of the template, as I consider it pure display logic. I do no... | [
0.19424860179424286,
0.2275419384241104,
0.2953792214393616,
-0.1193971261382103,
0.051975369453430176,
0.3731289803981781,
0.32820314168930054,
-0.3711986541748047,
-0.12292232364416122,
-0.7723107933998108,
-0.22122220695018768,
0.04837869107723236,
-0.022534703835844994,
0.1792629063129... | |
outside of the template.
I want smarty to print this as nested lists:
```
<ul>
<li>
<h1>My parent headline</h1>
<p>My parent body</p>
<ul>
<li>
<h1>My firstChild headline</h1>
<p>My firstChild body</p> | [
0.16206082701683044,
-0.07242901623249054,
0.2907033860683441,
-0.143003448843956,
-0.3141149878501892,
0.09409315139055252,
-0.2552739083766937,
-0.24149823188781738,
-0.16426903009414673,
-0.860165536403656,
-0.09128906577825546,
-0.04422540217638016,
-0.3833245038986206,
-0.076058082282... | |
</li>
<li>
<h1>My secondChild headline</h1>
<p>My secondChild body</p>
</li>
</ul>
</li>
</ul>
```
I'm starting to realize this might be a very case-by-case problem, so I figure I'll just write a smarty plugin to handle this specifically, although | [
-0.04101191833615303,
0.23982597887516022,
0.3929702639579773,
0.006221859250217676,
-0.19074203073978424,
0.06714338064193726,
0.08503802865743637,
0.1346580535173416,
0.17965655028820038,
-1.077866792678833,
-0.24515767395496368,
0.24623362720012665,
-0.20867778360843658,
0.0181178431957... | |
I'd rather have an all-around solution.
Is there a way?
"In order to understand recursion, you must first understand recursion..."
Just kidding. This should do what you want:
```
<?php
/*
* Smarty plugin
* ————————————————————-
* File: function.recurse_array.php
* Type: function
* Name: recurse_array
* P... | [
0.19904980063438416,
-0.21043162047863007,
0.39580434560775757,
0.1489575207233429,
0.18768341839313507,
0.2274865210056305,
-0.034268975257873535,
-0.4568328261375427,
-0.19136950373649597,
-0.29554885625839233,
-0.29692283272743225,
0.26196447014808655,
-0.40808427333831787,
-0.357508271... | |
'</h1>';
$markup .= '<p>' . $element['body'] . '</p>';
if (isset($element['children'])) {
$markup .= smarty_function_recurse_array(array('array' => $element['children']), $smarty);
}
$markup .= '</li>';
}
$markup.= '</ul>';
return $markup;
} else {
return 'not array';
... | [
0.015154565684497356,
-0.3848098814487457,
0.5313815474510193,
0.06128675490617752,
0.28887590765953064,
0.33511480689048767,
-0.29216691851615906,
-0.2712928056716919,
-0.15029799938201904,
-0.7455576062202454,
-0.5717837810516357,
0.5103663206100464,
-0.1654202789068222,
-0.2432835996150... | |
of the dependency that this example has on your underlying data structure. Also, keep in mind that an unusually long or deeply nested set of data could be really slow. Manage your complexity, keep things well documented, and you should be fine. Good luck! | [
0.24952907860279083,
-0.14503213763237,
0.0016495587769895792,
0.31956276297569275,
0.19410131871700287,
-0.3118141293525696,
0.579063892364502,
0.4957837164402008,
-0.565081775188446,
-0.5031490325927734,
0.12640881538391113,
0.6507364511489868,
0.1507733017206192,
-0.07209150493144989,
... | |
I have an NSWindow that I defined in interface builder. I want to make it so that when the user clicks a button, it opens a new instance that NSWindow. Do I have to subclass NSWindow or something?
If you created the window in IB and it's in your main nib file, you cannot create a "new instance" each time you press a bu... | [
0.3423493802547455,
-0.055377550423145294,
-0.07848462462425232,
-0.1115078404545784,
-0.12466409057378769,
0.2842058539390564,
0.2503933012485504,
0.09621831029653549,
-0.3580963611602783,
-0.8218368887901306,
0.3817659318447113,
0.2237485945224762,
-0.4947972893714905,
0.5994581580162048... | |
`auxWindow` on the same object that responds to your button click, and the action message is named `buttonClick`, you could do something like this to show it:
```
-(IBAction)buttonClick:(id)sender {
if(! [auxWindow isVisible] )
[auxWindow makeKeyAndOrderFront:sender];
}
```
This will cause the aux window... | [
-0.077132947742939,
-0.22309434413909912,
0.4180237352848053,
-0.15291374921798706,
-0.14573697745800018,
-0.06757236272096634,
0.5027675032615662,
-0.13031624257564545,
-0.24725258350372314,
-0.6362159848213196,
-0.28704193234443665,
0.833283007144928,
-0.44212964177131653,
0.093132220208... | |
access violation the next time you click the button.
This is a simple answer to your basic question, but window programming can be quite complicated and is usually very specific (for instance, do you really want a panel for what you're doing?)... so I strongly suggest that you read the [Window Programming Guide](https... | [
0.2590685486793518,
0.2796996235847473,
0.07143852859735489,
0.27335822582244873,
0.06943974643945694,
-0.39905375242233276,
0.1088891550898552,
0.17147739231586456,
-0.48963451385498047,
-0.5755779147148132,
-0.26369503140449524,
0.7755378484725952,
-0.14318718016147614,
0.031545877456665... | |
What is the most efficient way of testing an input string whether it contains a numeric value (or conversely Not A Number)? I guess I can use `Double.Parse` or a regex (see below) but I was wondering if there is some built in way to do this, such as javascript's `NaN()` or `IsNumeric()` (was that VB, I can't remember?)... | [
0.11280879378318787,
0.036770693957805634,
-0.041021931916475296,
-0.08675108850002289,
-0.12274399399757385,
-0.10791389644145966,
0.32088014483451843,
-0.2989063858985901,
-0.002954276744276285,
-0.25975367426872253,
0.043083831667900085,
0.5568500757217407,
-0.23321010172367096,
-0.0784... | |
a number
}
```
Incidentally, all of the standard data types, with the glaring exception of GUIDs, support TryParse.
**update**
secretwep brought up that the value "2345," will pass the above test as a number. However, if you need to ensure that all of the characters within the string are digits, then another appr... | [
0.33809882402420044,
0.029514802619814873,
0.2612321376800537,
-0.01361150573939085,
0.07118293642997742,
0.015607709996402264,
0.17789249122142792,
-0.2102423459291458,
-0.4463043510913849,
-0.3300023674964905,
-0.5492926239967346,
0.21603840589523315,
-0.24271096289157867,
0.130961388349... | |
2** ( from @stackonfire to deal with null or empty strings)
```
public Boolean IsNumber(String s) {
Boolean value = true;
if (s == String.Empty || s == null) {
value=false;
} else {
foreach(Char c in s.ToCharArray()) {
value = value && Char.IsDigit(c);
}
} re... | [
-0.0007378626032732427,
-0.1700555831193924,
0.3060513138771057,
-0.3164529502391815,
0.22384753823280334,
0.011566627770662308,
0.37380504608154297,
-0.36494335532188416,
-0.21232637763023376,
-0.3223441243171692,
-0.5335677862167358,
0.5263968110084534,
-0.42917296290397644,
0.1177438423... | |
I have a form which allows the user to create extra "rows" using JQuery (using .clone) so that they can decide how many of the same information they need to submit. My issue is that I cannot work out how to access these form items within my controller.
the form that is being submitted may look like this
```
<input ty... | [
0.19577962160110474,
-0.23078122735023499,
0.7055003643035889,
0.06520063430070877,
-0.10384571552276611,
0.11150866746902466,
-0.49874162673950195,
-0.5711569786071777,
-0.164245143532753,
-0.8534374833106995,
0.2750016152858734,
0.2643318176269531,
-0.1513613611459732,
0.3475636839866638... | |
name="Item">
<option value="1">Item 1"</option>
<option value="2">Item 2"</option>
<option value="3">Item 3"</option>
</select>
<input type="text" name="Amount" id="Amount">
<select name="Item">
<option value="1">Item 1"</option>
<option value="2">Item 2"</option>
<option... | [
-0.13274462521076202,
-0.6383434534072876,
0.6771937608718872,
0.007713233586400747,
-0.07579104602336884,
0.15899215638637543,
-0.30843281745910645,
-0.8751655220985413,
0.009469795972108841,
-0.46974173188209534,
-0.22947625815868378,
0.33581167459487915,
-0.12044750154018402,
0.14950813... | |
from there I am unsure how I can access the items that have been submitted. I thought of using a for loop and then accessing them via something like form["Amount"][i] but obviously that is not going to work.
Am I going about this the right way and if so, does anyone have any suggestions about how this might work?
Tha... | [
0.43672680854797363,
-0.18724651634693146,
0.4716504216194153,
0.0436733104288578,
-0.1446658968925476,
0.3142476975917816,
-0.012666098773479462,
0.2145146131515503,
-0.2363578975200653,
-0.6471378803253174,
0.08869263529777527,
0.22932308912277222,
0.13613814115524292,
0.3884072601795196... | |
able use JQuery to create form as Phil Haack's blog suggested.
Onto my next issue...! | [
0.38252073526382446,
-0.11545418947935104,
0.5848727226257324,
0.18885871767997742,
-0.18684060871601105,
-0.12657351791858673,
0.038549162447452545,
0.14914557337760925,
0.024269239977002144,
-0.7599002122879028,
-0.19813013076782227,
0.4831709563732147,
0.19691351056098938,
-0.3569539487... | |
I am working on a project that involves an embedded system which runs a non-microsoft OS with a C program for the application and am developing .NET software for its end user applications. For remote configuring with the .NET software (which can go across firewalls), I am considering using WCF. I know only a little abo... | [
0.5362633466720581,
0.23285582661628723,
0.16005122661590576,
0.02823740802705288,
0.09022541344165802,
-0.23527494072914124,
0.15488402545452118,
0.13849733769893646,
-0.027524806559085846,
-0.6922422647476196,
0.048262402415275574,
0.5245420932769775,
-0.22609788179397583,
0.084918044507... | |
know if it would be appropriate at all? If so please provide some advice or point me in the right direction.
Thanks!
WCF is interoperable because it's accessed over HTTP. Visual Studio can help you build client libraries very quickly for WCF, but client access to WCF doesn't require anything other than HTTP calls with... | [
0.40470725297927856,
0.026423422619700432,
0.20926961302757263,
0.19425922632217407,
-0.29930150508880615,
-0.39255261421203613,
0.10982917994260788,
0.12737978994846344,
-0.19410036504268646,
-0.879890501499176,
0.046725232154130936,
0.6119187474250793,
-0.02593853697180748,
0.05682801082... | |
I need to create a new process with redirected standard error stream to some file. The code from which child process is being created has no console available, so there are cases when GetStdHandle(any) will return 0. Child process will try to duplicate all of its standard IO handles for some reason (source code for chi... | [
0.2812337875366211,
0.03701157122850418,
0.11489865183830261,
0.1489131897687912,
0.08197468519210815,
0.34201058745384216,
0.11200851202011108,
-0.11901787668466568,
-0.13309752941131592,
-0.9474166035652161,
0.256657212972641,
0.3129381537437439,
-0.09101786464452744,
0.5827941298484802,... | |
is possibly good solution, but it will be too complex for me.
2. Open "nul" file with CreateFile("nul", ...) function call. No file is being created by this call, but this looks weird too me.
3. Use INVALID\_HANDLE\_VALUE. This works too, but I think there can be different problems with another child processes.
I beli... | [
0.2954173684120178,
0.001497622230090201,
0.12963895499706268,
-0.07891345024108887,
-0.056192122399806976,
-0.22237856686115265,
0.00986018218100071,
0.08064859360456467,
-0.053819552063941956,
-0.6250551342964172,
-0.09723669290542603,
0.4945034086704254,
-0.08528929948806763,
0.43441921... | |
see `/dev/null`.) It's perfectly valid, though.
But if you've found that `Invalid_Handle_Value` works, too, then go ahead and use that instead. It's certainly easiest. I wouldn't have expected it to work, initially, since I wouldn't expect it to be duplicable. | [
0.2143336534500122,
0.24722152948379517,
-0.005539777223020792,
0.18691666424274445,
-0.14728838205337524,
-0.33521658182144165,
0.3755078911781311,
-0.09339575469493866,
-0.0066184429451823235,
-0.0999695211648941,
-0.12861935794353485,
0.4095253646373749,
-0.09509045630693436,
0.03607539... | |
I am writing a custom Windows Workflow Foundation activity, that starts some process asynchronously, and then should wake up when an async event arrives.
All the samples I’ve found (e.g. [this one by Kirk Evans](http://blogs.msdn.com/kaevans/archive/2007/07/02/asynchronous-workflow-activities-implemented-asynchronous... | [
0.0492539145052433,
0.022859415039420128,
-0.05431726574897766,
-0.04951736330986023,
-0.08078645914793015,
-0.0916793942451477,
0.34371840953826904,
0.023946428671479225,
-0.2599400579929352,
-0.7012041807174683,
-0.1847938597202301,
0.08694673329591751,
-0.35665208101272583,
-0.150486826... | |
result of async operation).
I don't like this design, as this splits functionality into two pieces, and requires adding a service to a host when a new activity type is added. Ugly.
So I wrote the following generic service that I call from the activity’s async event handler, and that can reused by various async activi... | [
0.04727642238140106,
-0.22415606677532196,
0.3756137788295746,
-0.06341233849525452,
0.09283149987459183,
-0.03148818016052246,
0.40857964754104614,
-0.20698197185993195,
-0.26059162616729736,
-0.634944498538971,
-0.1375804841518402,
0.5947909355163574,
-0.43691399693489075,
0.311821371316... | |
reference to this service, start my async operation, an when it completes, use this service to post an event to my queue. The benefits of this - I keep all the activity-specific code inside activity, and I don't have to add new services for each activity types.
But seeing the official and internet samples doing it wil... | [
0.6594827175140381,
-0.21971173584461212,
0.30909761786460876,
0.1475423127412796,
-0.0699232965707779,
-0.4925103783607483,
0.29958510398864746,
0.27846604585647583,
-0.6090623140335083,
-0.6624426245689392,
-0.02549259550869465,
0.3679359555244446,
-0.1406807005405426,
0.0063647273927927... | |
be able to restart these workflows are not reloaded into memory until there is some external event that reloads them. As there they are responsible for triggering the event themselves but cannot until they are reloaded. And we have a catch 22 :-(
The proper way to do this is using an external service. And while this m... | [
0.4055028557777405,
-0.047316260635852814,
-0.009092852473258972,
0.33964189887046814,
0.44915568828582764,
-0.4829001724720001,
0.3229635953903198,
0.10187765210866928,
-0.3643558919429779,
-0.377880722284317,
-0.6009116768836975,
0.7442701458930969,
-0.07927422225475311,
-0.2468595504760... | |
done. That way you can change the how without changing the why and when part. | [
0.5840722918510437,
0.27398860454559326,
-0.07096530497074127,
0.16415567696094513,
0.19754593074321747,
-0.22183328866958618,
0.15161018073558807,
-0.22302651405334473,
-0.09443045407533646,
-0.33855167031288147,
0.1471729874610901,
0.45219674706459045,
0.5005329847335815,
0.1749305874109... | |
I have a process that using OleDb reads data from an excel file into a DataSet. Everything was working well until I started to see data with leading 0's in it. The text is formatted as General or Text.
I have set IMEX=1 in the OleDb connection, yet I still get a null value in the dataset for each entry with a leading ... | [
-0.01548863761126995,
0.3242243528366089,
0.4074265658855438,
-0.07759316265583038,
-0.41171160340309143,
-0.16734328866004944,
0.2884569466114044,
0.12543882429599762,
-0.006773329805582762,
-0.6954747438430786,
0.13404376804828644,
0.26598405838012695,
-0.39536479115486145,
0.47438541054... | |
zero is in row 11 and a null is returned. All other data on this specific sheet is numbers for this column.
There is a potential problem here with regard to workflow persistence.
If you create long running worklfows that are persisted in a database to the runtime will be able to restart these workflows are not reloade... | [
0.1966233104467392,
0.050319939851760864,
-0.01233087107539177,
0.03821094334125519,
0.16049690544605255,
-0.13157787919044495,
0.22268475592136383,
0.011151609942317009,
-0.3196201026439667,
-0.3387491703033447,
-0.07374519109725952,
0.45235130190849304,
-0.18399158120155334,
0.3651860356... | |
And while this might feel like dividing the code into two places it really isn't. The reason is that the workflow is responsible for the big picture, IE what should be done. And the runtime service is responsible for the actual implementation or how it should be done. That way you can change the how without changing th... | [
0.7024868726730347,
0.03612186759710312,
-0.08889143913984299,
0.3492541015148163,
0.10793807357549667,
-0.231990784406662,
0.1754176765680313,
-0.023461781442165375,
-0.10855846107006073,
-0.5579968094825745,
-0.49144887924194336,
0.5571067929267883,
-0.07948357611894608,
-0.0351673327386... | |
Right now I am using this to export a repeater (with multiple nested repeaters) to excel:
```
protected void ExportToExcel(object sender, EventArgs e)
{
Response.Clear();
Response.Buffer = true;
Response.AddHeader("content-disposition", "attachment;filename=finance.xls");
Response.Charset = "";
Response.Content... | [
0.1645912081003189,
-0.07350560277700424,
0.7411218881607056,
-0.09427817910909653,
-0.2369983196258545,
0.06524235755205154,
0.3895716071128845,
-0.4862743616104126,
-0.17300985753536224,
-0.6025473475456238,
-0.24704548716545105,
0.5476073026657104,
-0.3219378590583801,
0.092968419194221... | |
<td class="align_right ">$50,000,000.00</td>
<td class="align_right hidden">$0.00</td>
</tr>
<tr class="alt">
<td class='hidden'>LOR In Development</td>
<td>MOD</td>
<td>Air Force</td>
<td class="size1"></td>
<td>Precision Strike Mi-17 (block 20)</td>
<td>17-May-08</td>
<td class="align_right ">$20,100,000.00<... | [
0.19493944942951202,
-0.06188672408461571,
0.5487204790115356,
-0.003080920549109578,
-0.09584714472293854,
0.05773778632283211,
0.33795106410980225,
-0.8594746589660645,
-0.23738041520118713,
-0.3363513648509979,
-0.17694935202598572,
0.7559295892715454,
-0.06081995740532875,
-0.199314177... | |
Is there a nice way to split a collection into `n` parts with LINQ?
Not necessarily evenly of course.
That is, I want to divide the collection into sub-collections, which each contains a subset of the elements, where the last collection can be ragged.
A pure linq and the simplest solution is as shown below.
```
stati... | [
0.11644341796636581,
-0.326407790184021,
0.19771330058574677,
0.16635851562023163,
0.15008963644504547,
-0.14015880227088928,
-0.200625479221344,
-0.440085768699646,
-0.18939527869224548,
-0.32800745964050293,
-0.23228047788143158,
0.42209887504577637,
-0.33565229177474976,
-0.028615854680... | |
group item by i++ % parts into part
select part.AsEnumerable();
return splits;
}
}
``` | [
-0.38875213265419006,
-0.2498662769794464,
0.1422935575246811,
-0.02609574981033802,
-0.11218606680631638,
0.49677544832229614,
0.22854457795619965,
-0.570722222328186,
0.18867938220500946,
-0.4364774227142334,
-0.5790897607803345,
0.19984787702560425,
-0.26295632123947144,
0.1929541528224... | |
A *using* declaration does not seem to work with an enum type:
```
class Sample{
public:
enum Colour {RED, BLUE, GREEN};
}
using Sample::Colour;
```
does not work!
Do we need to add a *using* declaration for every enumerators of enum type? Like below:
```
using sample::Colour::RED;
```
A class does n... | [
0.4017854928970337,
0.005968818441033363,
-0.07323357462882996,
-0.3099290728569031,
-0.01564171351492405,
0.20429442822933197,
0.24886704981327057,
-0.33853384852409363,
-0.10733220726251602,
-0.521018922328949,
-0.34133803844451904,
0.36229461431503296,
-0.6631323099136353,
0.27276897430... | |
RED;
}
```
And to access it from outside the class:
```
void bar() {
Sample::Colour colour = Sample::RED;
}
``` | [
0.07379080355167389,
0.255725234746933,
0.028471006080508232,
-0.6496398448944092,
0.11483386904001236,
0.40091472864151,
0.2636295258998871,
-0.28842881321907043,
-0.024400796741247177,
-0.43947139382362366,
-0.5453017354011536,
0.33731135725975037,
-0.6599390506744385,
0.2498519718647003... | |
I have three applications that talk to each other using sockets. They can all live on their own machines but they can also share a machine. Right now I'm having two of them on the same and the third on its own machine. I'm trying to make my communication bullet proof so I unplug cables and kill the applications to make... | [
0.21171748638153076,
0.30852076411247253,
0.3998059630393982,
0.01076844334602356,
0.16839487850666046,
0.021605227142572403,
0.366838276386261,
0.23960037529468536,
-0.2743191123008728,
-0.6615937948226929,
-0.06988542526960373,
0.5714446306228638,
-0.5569649338722229,
0.329444020986557,
... | |
"App 1" on the socket that never gets to "App 2".
I have made a mechanism that discovers this and disconnects and then reconnects and after that I can unplug the cable all I want and "Con A" just keeps working. It's only that first time.
I have confirmed having communication through "Con A" before disconnecting "Con ... | [
0.12308401614427567,
0.11512404680252075,
0.5797372460365295,
0.08627786487340927,
-0.10176815092563629,
0.3079244792461395,
0.2818133533000946,
0.11425558477640152,
-0.3531770408153534,
-0.7188241481781006,
-0.040302641689777374,
0.635683536529541,
-0.7560467720031738,
0.01454972662031650... | |
message and expect a response every 10 seconds.
When I kill App 3, this does not happen, only when unplugging the cable.
What address are you using for "Con A"? If you are using an address that is bound to the external network adapter, even though you're talking to the same machine, then what you describe could happ... | [
0.3949907422065735,
-0.34039783477783203,
0.2942536175251007,
-0.09627725183963776,
-0.3228723108768463,
0.08470506221055984,
0.6790328025817871,
0.07905063778162003,
-0.09706465899944305,
-0.6269983053207397,
-0.07710295170545578,
0.7583282589912415,
-0.6824262142181396,
0.155376464128494... | |
How can NSNotification be used to check a the status of an NSTask? I know there are a couple of class methods inside the NSTask but don't really understand how to implement them in a Cocoa application. Can somebody help me?
Task will be stuck when you won't read what it is sending on stdout/stderr. That's why you need ... | [
0.20682969689369202,
-0.2512405812740326,
0.1973019391298294,
0.2475411295890808,
-0.2666841447353363,
-0.06498930603265762,
0.43200573325157166,
-0.10611680895090103,
-0.46327561140060425,
-0.9153624176979065,
0.20170116424560547,
0.501021683216095,
0.05121150240302086,
-0.044126015156507... | |
I need a simple function which will take a FileInfo and a destination\_directory\_name as input, get the file path from the fileinfo and replicate it in the destination\_directory\_name passed as the second parameter.
for ex. filepath is "d:\recordings\location1\client1\job1\file1.ext
the function should create the di... | [
0.2765648663043976,
-0.12088347971439362,
0.5907983779907227,
0.09670436382293701,
0.3527774214744568,
-0.10854610055685043,
0.1596667617559433,
-0.11031538993120193,
-0.13344071805477142,
-0.9583165645599365,
-0.003946916200220585,
0.461625874042511,
-0.3450448215007782,
0.582061767578125... | |
Hallo,
i need to write some javascript that gets the contents of a userfield in a sharepoint-website. I can get most fields with the javascript-function 'getTagFromIdentifierAndTitle' of [Using Javascript to Manipulate a List Form Field](http://blogs.msdn.com/sharepointdesigner/archive/2007/06/13/using-javascript-to-m... | [
-0.19441409409046173,
0.19389845430850983,
1.220304250717163,
0.09990859031677246,
-0.4287905991077423,
-0.14050224423408508,
0.06367285549640656,
-0.5804911255836487,
-0.2330476939678192,
-0.13893277943134308,
-0.054371800273656845,
0.30832237005233765,
-0.13241350650787354,
0.08142507821... | |
'<Entity Key="DOMAIN\\loginname" DisplayText="Display Name" IsResolved="True" Description="DOMAIN\\loginname">'+
'<ExtraData>'+
'<ArrayOfDictionaryEntry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">'+
'<DictionaryEntry><Key xsi:ty... | [
-0.25477802753448486,
0.21531431376934052,
0.8733007907867432,
-0.1835210919380188,
-0.27056050300598145,
0.14198490977287292,
-0.1045558899641037,
-0.5262706279754639,
-0.4152606129646301,
-0.5573828220367432,
-0.3114185929298401,
0.3559654653072357,
-0.10526758432388306,
0.28012615442276... | |
'<DictionaryEntry><Key xsi:type="xsd:string">PrincipalType</Key><Value xsi:type="xsd:string">User</Value></DictionaryEntry>'+
'</ArrayOfDictionaryEntry>'+
'</ExtraData>'+
'<MultipleMatches />'+
'</Entity>'+
'</Entities>';
EntityEditorCallback(xml,ctx);
```
Tricky part is ctx attribute ... | [
-0.0947035700082779,
0.08561192452907562,
0.8539237976074219,
0.011033198796212673,
-0.28168413043022156,
-0.08880385756492615,
0.08162639290094376,
-0.21226955950260162,
-0.004988440312445164,
-0.7539884448051453,
-0.2750278115272522,
0.3192470371723175,
-0.18767274916172028,
0.3284327387... | |
Given I have a canvas that contains many shapes, lets say rectangles for now.
Each shape has a location (inches), size(inches) and rotation angle(degrees).
When a mouse click event happen inside the canvas for a location (x,y) in pixels.
I want to check if the clicked mouse position is inside/within a specific shape... | [
0.2263338416814804,
-0.005665197502821684,
0.3860858380794525,
0.04462260752916336,
-0.11853287369012833,
0.05896736681461334,
0.05324077233672142,
-0.4090037941932678,
0.0160211231559515,
-0.9105706810951233,
0.06510898470878601,
0.5063022375106812,
0.10742630809545517,
0.1313769966363906... | |
if (angle == 0) return bounds.Contains(location);
using (Matrix matrix = new Matrix())
{
matrix.RotateAt(angle, Center(bounds));
using (GraphicsPath path = new GraphicsPath())
{ | [
0.07578044384717941,
-0.4270312786102295,
0.8751000761985779,
-0.16620884835720062,
0.09578145295381546,
0.08018320798873901,
-0.28446686267852783,
-0.4570962190628052,
-0.05367160588502884,
-0.712249755859375,
-0.06839586794376373,
0.6609585881233215,
-0.36456429958343506,
-0.204678580164... | |
path.AddRectangle(bounds);
path.Transform(matrix);
return path.IsVisible(location.X, location.Y);
}
}
}
``` | [
-0.22823765873908997,
-0.4446237087249756,
0.33809590339660645,
-0.16985265910625458,
0.15178322792053223,
-0.04352357238531113,
0.14527015388011932,
-0.20199699699878693,
-0.018055327236652374,
-0.8118417263031006,
-0.19968032836914062,
0.4904341697692871,
-0.422107458114624,
0.2496097832... | |
I've set up a one-to-many association in NHibernate:
```
Parent (1 -> ∞) Child
```
The problem I now face is that when I set Child.Parent, the Parent.Children collection doesn't automatically contain the new Child. Similarly, when I add a Child to the Parent.Children collection, the Child.Parent property is still nu... | [
0.238332599401474,
0.10821600258350372,
0.11455835402011871,
-0.053011924028396606,
-0.15153595805168152,
0.1797168254852295,
0.012608188204467297,
-0.24417565762996674,
-0.15039630234241486,
-0.4781968891620636,
0.017259469255805016,
0.2950153052806854,
-0.10497311502695084,
0.58008021116... | |
Children collection of the parent as a regular collection.
My Parent has a AddChild method, which adds the child to the collection, and sets the Parent property of the child.
Next to that, my Parent can return a ReadOnlyCollection of type 'Child'. | [
0.13289427757263184,
0.24576015770435333,
0.1292927861213684,
0.24534392356872559,
0.23970940709114075,
0.3673856258392334,
-0.17259564995765686,
-0.20229606330394745,
-0.36412519216537476,
-0.547057032585144,
-0.28668004274368286,
0.0823269784450531,
0.07362858951091766,
0.291034817695617... | |
Excuse me for not quite a programming question, but I need to burn a disc that would be autoplayed both on Windows and OSX. I read somewhere, that OSX disables autoplay feature by default (?) regarding to some security issues or wtf. However, posting the problem here in hope Stackoverflow knows how to hack / enable it.... | [
0.3629336655139923,
-0.16553685069084167,
0.5177518129348755,
0.3333493173122406,
-0.21792910993099213,
-0.472441166639328,
-0.029458697885274887,
0.1400061845779419,
-0.4523443281650543,
-0.22630152106285095,
-0.008386140689253807,
1.107961654663086,
-0.339991956949234,
-0.156939640641212... | |
.pas is the source code - been that way in all versions
* .dcu delphi compiled unit (compiled .pas file)
* .dfm delphi form
* .dpr Delphi project
* .res resource file
* .dpk delphi package
* .dcp compiled version of dpk
* .dpl/.bpl Windows DLL with Delphi specifics in it
* .BPG, .BDSGROUP Borland Project group
* .dcr c... | [
0.07320483773946762,
-0.0985448881983757,
0.5641925930976868,
0.03212738409638405,
-0.35847508907318115,
-0.0018485280452296138,
-0.06795394420623779,
-0.39523109793663025,
-0.3809814751148224,
-0.5962589979171753,
-0.5915773510932922,
0.10086382180452347,
-0.18863451480865479,
0.120333224... | |
file contains some standard country-specific formats for a TMaskEdit component
From my limited work with Prism it seems
* .pas is the source code - includes forms now
* .dproj Delphi project
* .resx resource file
* .vsproj delphi package | [
0.27909237146377563,
-0.3548540771007538,
0.3394751250743866,
0.06962163746356964,
-0.21462981402873993,
-0.09897942841053009,
0.18518942594528198,
-0.14158016443252563,
-0.15641388297080994,
-0.6258926391601562,
-0.5127074718475342,
-0.04329364001750946,
-0.19904828071594238,
-0.374461948... | |
I'm looking to handle image uploads on a site I'm building. All the behind the scenes stuff is fine, but creating an intuitive front-end is causing me head pains.
The problem with handling photos in a world where most people have asynchronous internet connections is the photos' size. I want each user to upload (at lea... | [
0.45892176032066345,
-0.27412712574005127,
0.3475607931613922,
0.3266385495662689,
0.048634935170412064,
-0.059186723083257675,
0.09171365201473236,
-0.18395686149597168,
-0.26879242062568665,
-0.5847868919372559,
0.3252076208591461,
0.45297661423683167,
-0.13393518328666687,
-0.2966227531... | |
So I need to do something about it.
I'm looking for a Flash/Java (no Silverlight, please) applet that can resize images on the **client-side** to a specified width and upload that much smaller file. If I can get images down to a few hundred KB, it might be a usable system.
Edit: This is for a personal project. The on... | [
0.8891099095344543,
-0.15490464866161346,
0.10069545358419418,
0.5525849461555481,
0.24282106757164001,
0.019910531118512154,
0.11748860776424408,
-0.041611429303884506,
-0.31843915581703186,
-0.4970446228981018,
0.18795503675937653,
0.46131882071495056,
-0.01913796365261078,
-0.2971040606... | |
We are in the process of migrating our bug tracking to Bugzilla from a really old version of track and I am running out of Advil.
We have a legacy application that has been around for a long time. Mix in the fact that our versioning management has been through a few iterations it generated a lot of different versions ... | [
0.5657256245613098,
0.0899139940738678,
0.19439299404621124,
0.2185335010290146,
0.4066862463951111,
0.01232383493334055,
0.3489620089530945,
0.1613759845495224,
-0.13174092769622803,
-0.32342591881752014,
0.2664678990840912,
0.6262152791023254,
-0.3973694443702698,
0.0815797969698906,
-... | |
another version number.
The end result is that the version combo box is ludicrously long. Lastly, for various reasons, we want to track three different version information :
the version in which the bug was found (version), the version in which we plan to fix (milestone) the bug and the version in which it has ultimat... | [
0.5108064413070679,
0.11742525547742844,
0.29148513078689575,
0.313953161239624,
0.23461464047431946,
0.02158859185874462,
0.1159931942820549,
0.33802399039268494,
-0.6132227182388306,
-0.3205192983150482,
0.26383012533187866,
0.6766993403434753,
-0.07104719430208206,
0.1746794879436493,
... | |
versions (found, planned and *multiple* fixed) in Bugzilla?**
**What are the best practices around linking versions and bug tracking ?**
---
Answers
=======
It seems that cloning the bug for each version is a good way to track, thus the target version is always tracked in the milestone as well as the fixed version... | [
0.48766621947288513,
-0.01005680300295353,
0.20519886910915375,
0.2357671558856964,
-0.10340052843093872,
-0.19902807474136353,
0.11285257339477539,
0.47550398111343384,
-0.5891913175582886,
-0.7167386412620544,
0.004369393922388554,
0.3583645820617676,
-0.625831127166748,
0.17050234973430... | |
versions (generally branches in the source code repository), the bug will be cloned for each branch so that all the commits and release status can be tracked separately. I think the only time we don't do this is when the change is not directly related to the codebase itself and cannot be fixed simply by updating our li... | [
0.42649948596954346,
0.03779091686010361,
0.41148221492767334,
0.12311980873346329,
0.2072387933731079,
-0.16534526646137238,
0.3900233209133148,
0.3947676122188568,
-0.5639729499816895,
-0.3699396848678589,
-0.3294233977794647,
0.4721166789531708,
-0.4818706512451172,
0.2504686415195465,
... | |
e.g. customer-specific deployments, then things are going to be harder to track. (Arguably this is going to cause headaches in general and it would be better to unify things to a more central version theme). | [
0.03757698833942413,
-0.08933825045824051,
0.4246845245361328,
0.04058288410305977,
0.20791324973106384,
-0.387520432472229,
0.12634176015853882,
0.28686991333961487,
-0.43320003151893616,
-0.4681641757488251,
-0.40171292424201965,
0.4112689793109894,
-0.24921409785747528,
-0.0288169458508... | |
How can I track the memory allocations in C++, especially those done by `new`/`delete`. For an object, I can easily override the `operator new`, but I'm not sure how to globally override all allocations so they go through my custom `new`/`delete`. This should be not a big problem, but I'm not sure how this is supposed ... | [
0.041407275944948196,
0.15805664658546448,
0.2812581956386566,
0.09670466184616089,
0.21864630281925201,
-0.17444273829460144,
0.1410587579011917,
-0.01980423554778099,
-0.4589582085609436,
-0.8500821590423584,
0.032042764127254486,
0.5024932026863098,
-0.014518924057483673,
0.092454537749... | |
application - check for allocations which have not been freed.
Well, this seems again like something that surely has been done several times at least, so any good library out there (preferably a portable one)?
I would recommend you to use `valgrind` for linux. It will catch not freed memory, among other bugs like writ... | [
-0.049404971301555634,
0.014014801941812038,
0.21515624225139618,
0.17252907156944275,
0.006112486589699984,
-0.27018964290618896,
0.14254829287528992,
0.18120792508125305,
-0.41233789920806885,
-0.679602324962616,
-0.04223205894231796,
0.7773224115371704,
-0.5780974626541138,
0.0337793864... | |
do it in principle, if you were to implement it yourself. Something like this (left out stuff calling the registered new\_handler and other details).
```
template<typename T>
struct track_alloc : std::allocator<T> {
typedef typename std::allocator<T>::pointer pointer;
typedef typename std::allocator<T>::size_t... | [
0.29924923181533813,
-0.13744011521339417,
0.23079727590084076,
-0.02043759450316429,
0.10139933973550797,
-0.05333199352025986,
0.13697996735572815,
-0.6170413494110107,
-0.27822190523147583,
-0.24464921653270721,
-0.20269885659217834,
0.5613539218902588,
-0.6051386594772339,
-0.408236712... | |
std::allocator<void>::const_pointer = 0) {
void * p = std::malloc(size * sizeof(T));
if(p == 0) {
throw std::bad_alloc();
}
return static_cast<pointer>(p);
}
void deallocate(pointer p, size_type) {
std::free(p); | [
0.0983915701508522,
-0.10838767141103745,
0.4639896750450134,
-0.6593274474143982,
0.12245852500200272,
0.10359852015972137,
0.11998361349105835,
-0.6178514361381531,
-0.14881998300552368,
-0.4490823447704315,
-0.6357277631759644,
0.5253853797912598,
-0.7367168664932251,
-0.031902015209198... | |
}
};
typedef std::map< void*, std::size_t, std::less<void*>,
track_alloc< std::pair<void* const, std::size_t> > > track_type;
struct track_printer {
track_type * track;
track_printer(track_type * track):track(track) {}
~track_printer() {
track_type::const_iterator it = track->be... | [
-0.012110278941690922,
-0.04123320057988167,
0.4969371557235718,
0.07332802563905716,
0.3039930462837219,
0.4528489112854004,
-0.183707132935524,
-0.34594476222991943,
-0.29448243975639343,
-0.46534574031829834,
-0.09178747236728668,
0.519569993019104,
-0.2351011484861374,
0.15077982842922... | |
<< it->second << " bytes\n";
++it;
}
}
};
track_type * get_map() {
// don't use normal new to avoid infinite recursion.
static track_type * track = new (std::malloc(sizeof *track))
track_type;
static track_printer printer(track);
return track;
}
void * operator new(std... | [
0.0753990188241005,
-0.2802598476409912,
0.45891013741493225,
-0.19251786172389984,
0.047653768211603165,
0.21918684244155884,
0.09414226561784744,
-0.211145281791687,
-0.4139140844345093,
-0.7239518761634827,
-0.187412828207016,
0.42467865347862244,
-0.35567909479141235,
0.093129053711891... | |
// we are required to return non-null
void * mem = std::malloc(size == 0 ? 1 : size);
if(mem == 0) {
throw std::bad_alloc();
}
(*get_map())[mem] = size;
return mem;
}
void operator delete(void * mem) throw() {
if(get_map()->erase(mem) == 0) {
// this indicates a serious bug
... | [
0.14289484918117523,
0.05236761271953583,
0.24871890246868134,
-0.2821849286556244,
0.6125925779342651,
0.21149942278862,
0.5440864562988281,
-0.02294880524277687,
-0.25271761417388916,
-0.5994772911071777,
-0.29607078433036804,
0.6687200665473938,
-0.40836045145988464,
0.10348628461360931... | |
<< mem << " wasn't allocated by us\n";
}
std::free(mem);
}
int main() {
std::string *s = new std::string;
// will print something like: TRACK: leaked at 0x9564008, 4 bytes
}
```
We have to use our own allocator for our map, because the standard one will use our overridden operator new, which woul... | [
0.10906518250703812,
0.028038427233695984,
0.13915182650089264,
0.1120547503232956,
0.3368166387081146,
0.024029478430747986,
0.37465721368789673,
-0.22065286338329315,
-0.3922537863254547,
-0.4682880938053131,
-0.02718743495643139,
0.3976992070674896,
-0.18744131922721863,
0.2778620123863... | |
forms of new will use that delete operator too, so it can become tricky if some code you don't know has overloaded operator new not using your map, because operator delete will tell you that it wasn't allocated and use `std::free` to free the memory.
Also note, as *Pax* pointed out for his solution too, this will onl... | [
0.34389835596084595,
-0.14096665382385254,
0.3296738564968109,
0.10171101242303848,
-0.020171839743852615,
-0.4400821626186371,
0.2149302065372467,
-0.620855987071991,
-0.49684420228004456,
-0.871537983417511,
0.034130897372961044,
0.3881242275238037,
-0.2991316318511963,
0.312720984220504... | |
This isn't quite as straight forward as one may think. I'm using a plugin called [jQuery MultiSelect](http://abeautifulsite.net/notebook.php?article=62 "jQuery MultiSelect") and multiple <select> options using XSLT as follows:
```
<xsl:for-each select="RootField">
<select id="{RootField}" multiple="multiple" size="3... | [
-0.17470680177211761,
-0.312404990196228,
0.6597566604614258,
-0.12134405225515366,
-0.005776956677436829,
0.18024639785289764,
-0.19252043962478638,
-0.23297138512134552,
-0.2577771246433258,
-0.6068124771118164,
-0.07435382902622223,
0.4156731069087982,
-0.14231617748737335,
0.1312733590... | |
ones anyway). I can't see anything wrong in my JavaScript to cause this issue as it would iterate over every single one. To make it more clear, the only lists that have that JavaScript applied to it are ones in position 2, 4, 6 and 8 (out of the 9 which are on the page).
Any ideas?
I'd not heard the 'Halloween problem... | [
0.2811930179595947,
-0.279988557100296,
0.5429404973983765,
0.06851764768362045,
0.12285351753234863,
0.1278722882270813,
0.5594773292541504,
-0.20522381365299225,
-0.6989133954048157,
-0.4443979561328888,
-0.19598320126533508,
0.48750799894332886,
-0.29310208559036255,
0.12430015206336975... | |
$(this).multiSelect();
});
``` | [
0.03337202966213226,
0.10798966884613037,
0.3181932270526886,
-0.4057081639766693,
0.2855778932571411,
-0.13610413670539856,
0.4836411774158478,
-0.1341402679681778,
-0.030873633921146393,
-0.4925086796283722,
-0.35703369975090027,
0.8041501045227051,
-0.5716812014579773,
0.336199343204498... | |
I'm using oracle(10).
I've got two tables as follows:
```
Table1 (uniq rows):
ID AMOUNT DATE
Table2:
ID AMOUNT1 AMOUNT2 ...AMOUNTN DATE
```
Table2 is connected many to one to Table1 connected via ID.
What I need is update-ing Table1.DATE with: the last (earliest) date from Table2 where Table1.AMOUNT - ... | [
0.06397490948438644,
0.1605527549982071,
0.6439499258995056,
-0.14371103048324585,
-0.1786314696073532,
0.16108472645282745,
-0.3699389696121216,
-0.30674463510513306,
-0.3717295825481415,
-0.920481264591217,
0.37868010997772217,
0.4590678811073303,
0.10894417762756348,
0.03043461591005325... | |
DATE:NULL
```
Table2 has (for ID: 1 so ID is not listed in here):
```
AMOUNT1 DATE
50 20080131
30 20080121
25 20080111
20 20080101
```
So in this case I need `20080111` as the DATE in Table1 as 50+30+25 => 100.
Based on your revised question, this is a case for using analyti... | [
-0.16017203032970428,
0.05175546929240227,
0.36612892150878906,
-0.17767149209976196,
-0.3341529369354248,
0.1277468055486679,
-0.007461299188435078,
-0.5782887935638428,
-0.21056050062179565,
-0.36824366450309753,
-0.030208535492420197,
0.16119584441184998,
0.2245892882347107,
0.211993992... | |
DATE to THEDATE since DATE is a reserved word in Oracle:
```
update table1 set thedate=
( select max(thedate) from
( select id, thedate,
sum(amount1) over (partition by id order by thedate desc) cumsum
from table2
) v
where v.cumsum >= 100
and v.id = table1.id
)
```
If the 100 means the curre... | [
0.2837844789028168,
-0.26795831322669983,
0.6685024499893188,
-0.08849463611841202,
0.017461439594626427,
0.18262378871440887,
-0.4373146891593933,
-0.2657209038734436,
0.22238892316818237,
-0.31499922275543213,
-0.06918651610612869,
0.21827539801597595,
0.15564104914665222,
0.333568751811... | |
From <http://projecteuler.net/index.php?section=problems&id=99>
> Comparing two numbers written in index
> form like 211 and
> 37 is not difficult, as any
> calculator would confirm that
> 211 = 2048 37 =
> 2187.
>
>
> However, confirming that
> 632382518061 >
> 519432525806 would be much
> more difficult, ... | [
0.044960953295230865,
0.001122969202697277,
0.36242881417274475,
0.20399029552936554,
-0.3143109381198883,
0.4171984791755676,
0.31343600153923035,
-0.39270374178886414,
-0.08823982626199722,
-0.6363650560379028,
0.06304339319467545,
-0.2629269063472748,
-0.02765674702823162,
-0.0549734756... | |
approach this?
Not a full solution, but some ideas. You can use the following formula:
> log(ax) = x\*loga
The log10 can easily be estimated as number of digits. The log2 can easily be estimated by counting right shifts.
Based on the above you could narrow the list significantly. For the remaining numbers, you would... | [
-0.08835732191801071,
-0.023195894435048103,
0.2575676441192627,
0.2225118726491928,
0.004995895549654961,
0.11024005711078644,
-0.0034341025166213512,
-0.3769482672214508,
-0.17003019154071808,
-0.595638632774353,
0.034606028348207474,
0.6568160057067871,
-0.2623499035835266,
-0.217201784... | |
I am working on Windows Server 2003 (IIS6), which has two asp.net sites running in seperate app pools. One of the sites has an ssl certificate installed and was running fine on https. The other site has no certificate and does not require https
The problem I have is that when I publish my app from vs2005 to the site w... | [
0.13179267942905426,
0.4642731249332428,
0.5581073760986328,
-0.22522595524787903,
-0.13544335961341858,
0.06522676348686218,
0.6141567826271057,
-0.1323334127664566,
-0.17271733283996582,
-0.7468676567077637,
-0.08944574743509293,
0.604231059551239,
-0.3759835958480835,
0.0623495057225227... | |
could be unavailable, dns is not reachable etc
The strange thing is the first time this happened, https eventually became available but I don't know what triggered the availability but when I published an updated assembly to the bin folder of the site which does not require https, the OTHER site became unavailable on ... | [
0.12659236788749695,
-0.07948167622089386,
0.5551560521125793,
-0.022487374022603035,
-0.47188273072242737,
-0.36573654413223267,
0.5874808430671692,
-0.2103455662727356,
-0.1467982977628708,
-0.7135432362556458,
-0.3269084692001343,
0.5630532503128052,
-0.4085264801979065,
0.1971299499273... | |
release];
```
should work. | [
0.3533141613006592,
0.12357420474290848,
0.05722068250179291,
0.19144538044929504,
0.22805148363113403,
-0.3223341405391693,
-0.026269862428307533,
-0.14334961771965027,
-0.04572521895170212,
-0.2286517471075058,
-0.3564406931400299,
0.7480868697166443,
-0.5128269791603088,
0.1878629177808... | |
I have a `DataSet` populated from Excel Sheet. I wanted to use SQLBulk Copy to Insert Records in `Lead_Hdr` table where `LeadId` is PK.
I am having following error while executing the code below:
> The given ColumnMapping does not match up with any column in the
> source or destination
```
string ConStr=Configurat... | [
-0.10141690075397491,
0.1268032193183899,
0.6820347309112549,
-0.2537979185581207,
0.25932881236076355,
-0.16504636406898499,
0.3961581885814667,
-0.2711280882358551,
-0.19002334773540497,
-0.6923813819885254,
-0.11900169402360916,
0.28107109665870667,
-0.3097240626811981,
0.35634157061576... | |
#region ColumnMapping
s.ColumnMappings.Add("ClientID", "ClientID");
s.ColumnMappings.Add("LeadID", "LeadID");
s.ColumnMappings.Add("Company_Name", "Company_Name");
s.ColumnMappings.Add("Website", "Website");
s.ColumnMappings.Add("EmployeeCount", "EmployeeCount");
s.ColumnMappings.Add("Revenue", ... | [
-0.26299744844436646,
-0.35684138536453247,
1.0610727071762085,
0.4075167179107666,
0.10469814389944077,
0.14598938822746277,
0.06176941096782684,
-0.06780465692281723,
-0.336532324552536,
-0.72090744972229,
-0.6104704737663269,
0.02365264855325222,
-0.20377443730831146,
0.1046657264232635... | |
s.ColumnMappings.Add("PipeLineStatusId", "PipeLineStatusId");
s.ColumnMappings.Add("SurveyId", "SurveyId");
s.ColumnMappings.Add("NextCallDate", "NextCallDate");
s.ColumnMappings.Add("CurrentRecStatus", "CurrentRecStatus");
s.ColumnMappings.Add("AssignedUserId", "AssignedUserId");
s.ColumnMappings.... | [
-0.18732059001922607,
-0.1549818068742752,
0.9580807685852051,
-0.05692293122410774,
0.03341227397322655,
0.015399675816297531,
0.2697538435459137,
-0.03018243983387947,
-0.07348629832267761,
-0.5646944046020508,
-0.4009743928909302,
0.3954364061355591,
-0.3800024688243866,
-0.010220807045... | |
mappings. I like to keep things simple - I tend to have a staging table that looks like the input on the server, then I `SqlBulkCopy` into the staging table, and finally run a stored procedure to move the table from the staging table into the actual table; advantages:
* no issues with live data corruption if the impor... | [
0.2508072555065155,
-0.019316276535391808,
0.5135883092880249,
0.21605165302753448,
0.09186233580112457,
-0.19628605246543884,
-0.15007932484149933,
-0.10999125987291336,
-0.47418054938316345,
-0.7169987559318542,
0.14202196896076202,
0.48568713665008545,
-0.1676151603460312,
-0.2935161888... | |
- if you are dealing with bulk data, you can get better throughput using `IDataReader` (since this is a streaming API, where-as `DataTable` is a buffered API). For example, I tend to hook CSV imports up using [CsvReader](http://www.codeproject.com/KB/database/CsvReader.aspx) as the source for a SqlBulkCopy. Alternative... | [
0.1554335653781891,
0.12117907404899597,
0.1840781718492508,
0.13361325860023499,
-0.386274129152298,
-0.08631351590156555,
-0.12614618241786957,
-0.08437521010637283,
-0.15793795883655548,
-0.7106812596321106,
-0.0842854231595993,
0.2548096179962158,
-0.1777247190475464,
0.176961585879325... | |
I am using this php code:
```
exec("unrar e file.rar",$ret,$code);
```
and getting an error code of illegal command ie 127 ... but when I am using this command through ssh its working ... because unrar is installed on the server ... so can anyone guess why exec is not doing the right stuff?
Try using the direct path... | [
0.1883050799369812,
0.3025358021259308,
0.3753010332584381,
-0.0849623754620552,
-0.09372328221797943,
-0.3305158317089081,
0.528993546962738,
0.05983847379684448,
-0.07115276902914047,
-0.525741696357727,
0.055907830595970154,
0.672430694103241,
-0.32003092765808105,
0.1319432556629181,
... | |
Suppose I have a class
```
public class MyClass {
private Set<String> set = new HashSet<String>();
//and many methods here
}
```
is there a possibility to make an eclipse debugger stop at every line where set member is used?
I haven't used Eclipse for a while, but from what I remember this was possible in... | [
0.2855323851108551,
-0.010662713088095188,
0.10981522500514984,
-0.14168259501457214,
0.024182409048080444,
-0.16993418335914612,
0.10990912467241287,
0.012692064978182316,
0.008323224261403084,
-0.5179271101951599,
-0.01436029002070427,
0.7151046395301819,
-0.25748106837272644,
-0.0085498... | |
Europa. It does work broadly as I thought; the breakpoint is called a *watch*point when you set it on a variable; and in the "Breakpoint Properties" page (accessible by right-clicking on the breakpoint's bauble in the margin, and possibly in other ways) you can determine whether the debugger should stop on "Field acces... | [
-0.19621437788009644,
-0.1824910044670105,
0.37215304374694824,
0.02634439989924431,
0.37194520235061646,
-0.14862361550331116,
-0.2786024212837219,
-0.05807778611779213,
-0.22069084644317627,
-0.350547730922699,
-0.5590282678604126,
0.4899568557739258,
-0.10163085162639618,
0.084562063217... | |
I have a dynamically created table and in some of the cells i have an image button associated with the redBall\_Click() handler
(here is the code behind)
```
TableCell cellOK = new TableCell();
cellOK.Style.Add(HtmlTextWriterStyle.TextAlign, "Center");
cellOK.Width = new Unit("3%");
ImageButton redBal... | [
-0.01662903092801571,
0.06734862923622131,
0.9431858062744141,
-0.1452558934688568,
0.14643143117427826,
0.11377637088298798,
0.28216105699539185,
-0.5145084261894226,
-0.39006415009498596,
-0.8702578544616699,
-0.09415135532617569,
0.31086382269859314,
-0.4742976725101471,
0.0108003560453... | |
: I can't use a static link because every ImageButton is associated with a specific ID that i must pass to the page i call (for example as a Session object)
I finally resolved (just yesterday).
I guess I was building my buttons too late: in the Page\_PreRender (after the event was to be fired) maybe if i put the creat... | [
0.014135423116385937,
0.11299407482147217,
0.5024417042732239,
-0.07874953746795654,
-0.08379487693309784,
-0.1859518140554428,
-0.0010889912955462933,
0.030779238790273666,
-0.4877568185329437,
-0.5694486498832703,
-0.04038604348897934,
0.26158276200294495,
-0.41610226035118103,
0.2831141... | |
cellOK = new TableCell();
cellOK.Style.Add(HtmlTextWriterStyle.TextAlign, "Center");
Image redBall = new Image();
redBall.ID = id; // useless
redBall.ImageUrl = "redball.gif";
HyperLink hl = new HyperLink();
hl.Controls.Add(redBall);
hl.NavigateUrl = MyPage + "?id=" + id;
cellOK.Controls... | [
-0.3839843273162842,
-0.16162420809268951,
0.9817886352539062,
0.033607810735702515,
-0.027898751199245453,
0.10981310904026031,
0.21572698652744293,
-0.5591269135475159,
-0.3913496732711792,
-0.844988226890564,
-0.32511842250823975,
0.36206692457199097,
-0.5981895923614502,
-0.08127093315... | |
So I've got basic example of jqgrid working in ASP.NET MVC, the javascript looks like this:
```
$(document).ready(function() {
$("#list").jqGrid({
url: '../../Home/Example',
datatype: 'json',
myType: 'GET',
colNames: ['Id', 'Action', 'Parameters'],
... | [
-0.15815748274326324,
-0.18577700853347778,
0.6732103228569031,
-0.3647960424423218,
0.19569514691829681,
-0.05669509992003441,
0.021533437073230743,
-0.1429709643125534,
-0.11416947841644287,
-0.6581103801727295,
-0.19697512686252594,
0.6371909379959106,
-0.4973877966403961,
0.04563222825... | |
{ name: 'id', index: 'id', width: 55, resizable: true },
{ name: 'action', index: 'action', width: 90, resizable: true },
{ name: 'paramters', index: 'parameters', width: 120, resizable: true}],
pager: $('#pager'), | [
-0.19869260489940643,
-0.15347880125045776,
0.4119853079319,
0.08874109387397766,
0.04053032770752907,
0.5482609272003174,
0.06507278233766556,
-0.54023677110672,
-0.2663382291793823,
-0.1893204152584076,
-0.41773638129234314,
0.5515444278717041,
-0.20221343636512756,
-0.12146718800067902,... | |
rowNum: 10,
rowList: [10, 20, 30],
sortname: 'id',
sortorder: 'desc',
viewrecords: true,
multikey: "ctrlKey",
imgpath: '../../themes/basic/images',
caption: 'Messages' | [
-0.6086908578872681,
-0.02786463126540184,
0.6456816792488098,
0.13062654435634613,
-0.011260870844125748,
0.5789574980735779,
-0.04397009685635567,
-0.038384728133678436,
-0.340524286031723,
-0.3274771273136139,
-0.505790650844574,
0.29929080605506897,
-0.35013091564178467,
0.091644622385... | |
});
```
Now I am trying to implement the search button that they have in the [jqgrid examples](http://www.trirand.com/jqgrid/jqgrid.html) (click on Manipulating/Grid Data). But I don't see how they implement it. I'm expecting e.g. a "search:true" and a method to implement it.
Has anyone implemented search on jqgrid... | [
0.022413527593016624,
-0.2004900425672531,
0.4172091484069824,
0.04617980122566223,
0.0077704391442239285,
-0.31237995624542236,
0.12195200473070145,
0.04163570702075958,
-0.2060258686542511,
-0.7492789030075073,
-0.0256031546741724,
0.8099418878555298,
-0.21824350953102112,
0.294640183448... | |
searchField, searchOper, and searchString parameters as those are missing from most of asp.net mvc examples I've seen). The javascript posts to the controller for both the initial load and for the search call. You'll see in the code that I'm checking whether the \_search parameter is true or not.
Below is the control... | [
0.02461068145930767,
-0.00010064517118735239,
0.5686027407646179,
-0.28079819679260254,
-0.20997671782970428,
0.06486081331968307,
0.25122305750846863,
-0.2446538507938385,
-0.4391706883907318,
-0.7295566201210022,
-0.47764110565185547,
0.6277005076408386,
-0.5080872774124146,
0.0048603941... | |
List<AppGroup> results;
if (_search)
results = groups.Where(x => x.Name.Contains(searchString)).ToList();
else
results = groups.Skip(page * rows).Take(rows).ToList();
int i = 1;
var jsonData = new
{
total = groups.Count / 20,
page = page,
records = groups.Coun... | [
-0.2226014882326126,
-0.3410957157611847,
0.6277238726615906,
-0.33060428500175476,
0.010341217741370201,
0.34986603260040283,
0.24445481598377228,
-0.5112708806991577,
-0.9097212553024292,
-0.5069013833999634,
-0.4747534394264221,
0.28970351815223694,
-0.6066619753837585,
-0.0140217244625... | |
from appgroup in results
select new
{
i = i++,
cell = new string[] {
appgroup.Name, | [
-0.20032784342765808,
-0.06670626252889633,
0.305711567401886,
-0.3916124701499939,
0.08720088750123978,
0.33452335000038147,
0.2685324251651764,
-0.3791753053665161,
-0.2705102562904358,
-0.590893030166626,
-0.3358412981033325,
0.2362322062253952,
-0.49498215317726135,
0.00279743922874331... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.