text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
in the way configured I'd like a single the news item to be shown (for example different portlets around it)
Is there a generic solution to link to page B and say to the news-Detail-Portlet that it should show item XYZ?
The quick and dirty solution would be to configure the target link via edit mode of the news-list-... | [
0.3836018145084381,
0.013235269114375114,
0.6080714464187622,
0.25686222314834595,
-0.31185269355773926,
-0.20333516597747803,
0.06858731061220169,
-0.10988491028547287,
-0.14695776998996735,
-0.7895025610923767,
-0.05622807890176773,
0.5212618708610535,
-0.4421212673187256,
0.255682289600... | |
massive efforts and maybe changes in the targeted portlets, which is not always possible if you use 3rd party portlets.
My solution would look like this: (draft!)
Portlets register at a central service with their portlet IDs and when a portlet wants to link to a portlet it can do a lookup based on a symbolic name. Th... | [
0.17736683785915375,
-0.07228393107652664,
0.3425865173339844,
0.12942470610141754,
0.0809086486697197,
-0.2764343023300171,
0.44239628314971924,
-0.1812410205602646,
-0.33920788764953613,
-0.9894096851348877,
-0.1795015186071396,
0.5811800956726074,
-0.2685627043247223,
0.3297739624977112... | |
call to the portlet that generates the URL as a whole with injected parameters and returns it.
For portlets that you can't change you have to append the parameters and hope that it works. :-/
Any suggestions? Are there simpler solutions? existing solutions?
Thanks!
Patrick
As far as I know Portlet Specification does... | [
0.2787210941314697,
0.06447497010231018,
0.31289467215538025,
0.03723609074950218,
-0.28203412890434265,
-0.2276793271303177,
0.3614252209663391,
0.16155393421649933,
-0.25833359360694885,
-0.525915265083313,
-0.029729455709457397,
0.7264655232429504,
-0.49281975626945496,
0.18171003460884... | |
I am facing a strange problem while sorting a list of strings with integer values. However some values could be prefixed with some characters.
e.g.
```
// B1, 5, 50, A10, 7, 72, B3, A1, A2
```
There are basically page numbers and should be sorted like:
```
// A1, A2, A10, B1, B3, 5, 7, 50, 72
```
But if I use de... | [
-0.14682237803936005,
0.22597448527812958,
0.19827890396118164,
-0.17240549623966217,
-0.012317118234932423,
0.36541786789894104,
0.2700580358505249,
-0.031091097742319107,
-0.3347204327583313,
-0.8262521028518677,
0.006204810459166765,
0.3240942060947418,
-0.26080843806266785,
0.175276130... | |
What ready available algorithms could I use to data mine twitter to find out the degrees of separation between 2 people on twitter.
How does it change when the social graph keeps changing and updating constantly.
And then, is there any dump of twitter social graph data which I could use rather than making so many API... | [
0.6060969829559326,
-0.02294773794710636,
0.06461501866579056,
0.2515602707862854,
0.03022676333785057,
0.18401479721069336,
0.06884705275297165,
0.2586909830570221,
-0.3398358225822449,
-0.47367551922798157,
0.625461995601654,
0.26791244745254517,
-0.24312257766723633,
0.2459508180618286,... | |
social\_graph api methods as they give the most info with the least API calls. | [
0.3059849143028259,
-0.109537772834301,
0.1647678166627884,
0.3264146149158478,
-0.10153869539499283,
-0.02360379882156849,
0.20138752460479736,
0.20293718576431274,
-0.3028389513492584,
-0.8771963119506836,
-0.14843416213989258,
0.5113675594329834,
-0.3766658306121826,
-0.1540435403585434... | |
here is two samples with two different approaches to naming variables:
```
decimal amountDue = 1000;
decimal amountPaid = 800;
```
vs.
```
decimal dueAmount = 1000;
decimal paidAmount = 800;
```
Which one would you usually prefer and why?
You should use which ever one reads better as an english sentence. Such a... | [
0.13950812816619873,
-0.039526283740997314,
0.3116838335990906,
0.09606124460697174,
-0.1595093309879303,
0.42679253220558167,
-0.4435228109359741,
0.10730531066656113,
-0.14285416901111603,
-0.52933669090271,
0.27818360924720764,
0.7620731592178345,
0.1850043684244156,
0.3457076847553253,... | |
For example, can an experienced coder with limited C#.NET experience be successfully paired with an experienced C#.NET coder with the secondary aim of getting the former up to speed with C#.NET?
Absolutely. Sharing knowledge is one of the points of pair-programming (along with the useful dynamic of having one person ty... | [
0.44405245780944824,
-0.08230218291282654,
-0.2284592241048813,
0.1636258214712143,
-0.16911271214485168,
-0.16242076456546783,
0.11320758610963821,
-0.3592126667499542,
-0.002299431012943387,
-0.4964866638183594,
0.11729823052883148,
0.8366901874542236,
-0.13530747592449188,
-0.4855989515... | |
to do the entire job). | [
0.30985692143440247,
0.09064304083585739,
0.2932153046131134,
-0.07207952439785004,
0.17596101760864258,
0.1101214587688446,
0.33926627039909363,
-0.3772541582584381,
-0.22005832195281982,
0.10178597271442413,
-0.2701053023338318,
0.6013537645339966,
-0.13365939259529114,
-0.13772648572921... | |
I am working on an MVC ASP .NET application. I am relatively new to both.
In a controller I am trying to get the current log on user, for which there seem to be two ways of doing this:
```
System.Web.HttpContext.Current.User.Identity.Name
```
Or
```
HttpContext.User.Identity.Name
```
What is the difference betwe... | [
0.18024151027202606,
-0.1262822151184082,
0.65621417760849,
0.001941551105119288,
-0.1353568285703659,
-0.184613898396492,
-0.06857456266880035,
-0.042122699320316315,
-0.3073548674583435,
-0.9541968107223511,
0.13694928586483002,
0.42466607689857483,
-0.2183663696050644,
0.635976433753967... | |
I have a basic page layout, and wanted to arrange information in columns.
I have managed to do this, but I feel I have done this in a very poor way.
I have made a layer and style called 'leftlayer', which floats to the left. Then 2 layers with a style called 'leftlayer2' which also floats to the left, to preserve the... | [
0.2713804244995117,
0.03234853968024254,
0.5721092224121094,
-0.08652889728546143,
-0.11633585393428802,
-0.32689499855041504,
0.15351755917072296,
-0.17029471695423126,
0.04549055173993111,
-0.9046863317489624,
-0.016226794570684433,
0.21364310383796692,
-0.15662060678005219,
0.1262314170... | |
align="left">A menu</h3>
<div align="left">
<ul class="BLUE">
<li><a href="#">item 1</a></li>
<li><a href="#">item 2</a></li>
</ul>
</div>
</div>
<div id="Layer2">
<h1>Artcile heading</h1>
<div id="leftlayer" class="leftlayer">
<p><strong>Random info 1: </strong>blah
</p>
<p><strong>Random info 2: </strong>blah blah
</... | [
0.3020365238189697,
-0.45044150948524475,
0.23450756072998047,
0.23974157869815826,
-0.5149054527282715,
0.04001125693321228,
-0.048232730478048325,
-0.7590391635894775,
-0.10745744407176971,
-0.7307981848716736,
0.257429301738739,
0.4935576915740967,
-0.3530539572238922,
-0.30463874340057... | |
value="test2" type="radio">test</p>
<p><input name="radiobutton" value="test3" type="radio">Test</p>
<p><input name="radiobutton" value="test4" type="radio">test</p>
<input name="Submit" value="Update" type="submit">
</form>
</div>
<div id="rightlayer">
<a href="#">
<img src="img.jpg" height="300" width="199">
</a>
<p>... | [
-0.04656153544783592,
0.0915197804570198,
0.4144812524318695,
-0.23555108904838562,
-0.39093875885009766,
0.03951200470328331,
0.34686580300331116,
-0.9313163161277771,
-0.10033828765153885,
-0.5454678535461426,
-0.1417759209871292,
0.6077755689620972,
-0.14057646691799164,
-0.145417436957... | |
Helvetica, sans-serif;
font-size:12px;
line-height: 1.6em;
text-align:justify;
text-decoration:none;
}
h1 {
font-size:2.5em;
text-align: center;
color:#ccc;
padding-top:15px;
}
h3 {
font-size:14px;
color:#999;
}
.leftlayer {
float: left;
left: 20%;
width: 20%;
height: 100%;
margin-right: 10%;
}
.leftlaye... | [
0.048832979053258896,
-0.04586317017674446,
0.755460262298584,
0.029094602912664413,
-0.1625201255083084,
0.08980917185544968,
0.43978333473205566,
-0.4389050006866455,
-0.3076503574848175,
-0.43122512102127075,
-0.2681949734687805,
0.3279736638069153,
-0.3366914987564087,
-0.1992946714162... | |
it's hard to read like that | [
0.2532297968864441,
0.2755351960659027,
-0.23336297273635864,
0.14622862637043,
0.07028849422931671,
-0.29285234212875366,
0.13904902338981628,
0.513154923915863,
-0.08737656474113464,
-0.2902759611606598,
-0.03502187505364418,
0.18048317730426788,
-0.11407072842121124,
-0.1404061317443847... | |
I am playing back audio in C# using the `waveOut` functions with the callback method where messages are sent back to a window handle. I am creating a Windows Form with an overidden `WndProc` function to listen for the `MM_WOM_DONE` messages.
```
result = WaveInterop.waveOutOpen(out hWaveOut, devNumber, waveStream.Wav... | [
0.09416364133358002,
0.06816645711660385,
0.9682170748710632,
-0.19023065268993378,
-0.07740353047847748,
-0.2723541855812073,
0.13956543803215027,
-0.2761618196964264,
-0.08763734996318817,
-0.5618918538093567,
0.127565398812294,
1.2548385858535767,
-0.056614723056554794,
0.28072854876518... | |
was not being serviced, but even if I put the following code in before the `waveOutOpen`, it still doesn't work.
```
waveOutWindow.Show();
Debug.Assert(waveOutWindow.IsHandleCreated, "Handle not created!");
Debug.Assert(waveOutWindow.Created, "Window not created!");
```
I should say that the call to `waveOutOpen` is... | [
0.26783671975135803,
-0.15066073834896088,
0.682937502861023,
-0.2805916666984558,
-0.16564668715000153,
-0.15375377237796783,
0.6234298348426819,
-0.43697237968444824,
-0.23013712465763092,
-0.4854530394077301,
0.18094758689403534,
0.8550742268562317,
-0.44458118081092834,
0.1445551961660... | |
I have a winform data entry and retrieval program called CaseNotes. This has a form that that fill in. On the form there are multiple dropdown,checkbox controls that I are data-bound to a tblCNMaintItem. The structure of that table is -->
*ItemID | CategoryID | ItemDescription | OrderID | IsActive*
There is a seperat... | [
-0.21445147693157196,
-0.011155200190842152,
0.4436211585998535,
0.11096932739019394,
-0.10364872962236404,
0.1290442943572998,
0.03243468329310417,
-0.21906782686710358,
0.06826664507389069,
-0.5968818664550781,
0.05314381793141365,
0.3521553575992584,
-0.1742246001958847,
0.2983834147453... | |
need to get the corresponding ItemID instead. How can I accomplish this? Should I create a dictonary for each category(Control)? Should I Enumerate the ItemID/ItemDescription combo?
2. ***EDIT*** Forget #2 as I have found my answer.
Thanks!
EDIT
----
Okay, for some reason I have failed to state this clearly and it i... | [
-0.12245198339223862,
0.1959989070892334,
0.5831061005592346,
0.2801348567008972,
-0.058592479676008224,
0.20768064260482788,
0.3110772967338562,
-0.376893550157547,
0.057466860860586166,
-0.8062269687652588,
-0.16794584691524506,
0.05904905125498772,
-0.26483115553855896,
0.19934022426605... | |
like so-->
*CategoryID = 3, CatgoryName = Contact Location, IsActive = True*
In **tblCNMaintItem** there are 2 entries like so -->
*ItemID=51, CategoryID=2, ItemDescription=Office, OrderID=0, IsActive=True
ItemID=52, CategoryID=2, ItemDescription=Member's Home, OrderID=0, IsActive=True*
In **tblCaseNote** there w... | [
-0.01703617163002491,
-0.11517813056707382,
0.6093543767929077,
0.0952855572104454,
0.1786593198776245,
0.06415459513664246,
0.3335255980491638,
-0.2448653280735016,
-0.2738102674484253,
-0.7668588161468506,
-0.21859021484851837,
0.22775481641292572,
-0.13310648500919342,
-0.03567915782332... | |
save the data?"
If that is your question, then yes your dictionary idea would work.
It's been a long time since I've done any CRUD work, but I recall that you could store the ID in the drop down box along with the text. Then when you do your update, you would use the ID instead of the text. This option may be easier ... | [
0.7162127494812012,
-0.07960960268974304,
0.07163668423891068,
0.4479118287563324,
0.300396203994751,
0.13347718119621277,
0.03597242385149002,
-0.08844213932752609,
0.20082204043865204,
-0.5363155603408813,
0.4520820677280426,
0.8099350333213806,
-0.1627267748117447,
-0.2103385031223297,
... | |
I am investigating a port of an app to the iPhone. My existing business logic is C# in a class library dll. It does some processing as well as sommunicating with web sites.
I understand that Objective-C is the best thing to develop with on the iPhone and I'm prepared to dive in, but if possible I want to avoid re-writ... | [
0.6222545504570007,
0.2957569360733032,
-0.05813247337937355,
0.22080130875110626,
-0.043763916939496994,
0.0065972162410616875,
0.2892533838748932,
-0.057797037065029144,
-0.2867853045463562,
-0.3645769953727722,
0.005659754388034344,
0.6701328158378601,
-0.11496765166521072,
-0.099073506... | |
to develop C# for the iPhone. Here is a link to some details on how to accomplish this
* <http://arstechnica.com/open-source/news/2009/01/open-source-mono-framework-brings-c-to-iphone-and-wii.ars> | [
0.4827888607978821,
0.10933785140514374,
-0.01996152102947235,
0.22653836011886597,
-0.14012928307056427,
-0.0725419670343399,
0.36871492862701416,
-0.07106465101242065,
-0.27467218041419983,
0.11462784558534622,
-0.204232856631279,
0.4727311134338379,
-0.31105223298072815,
-0.318776249885... | |
I recently answered a [question](https://stackoverflow.com/questions/784895/persuade-boss-dump-terrible-architecture/784927#784927) with a proposition that the asker should improve his resistant-to-change boss's legacy system by coding the alternative in his spare time and then presenting it as an alternative approach ... | [
0.47616714239120483,
-0.052874259650707245,
0.165163055062294,
-0.24748727679252625,
0.24592098593711853,
0.45648878812789917,
0.08790228515863419,
-0.3810373842716217,
-0.12894491851329803,
-0.5340779423713684,
-0.016989223659038544,
0.2394188940525055,
0.04372502490878105,
-0.07901854813... | |
of your own? The real answer is an indicated of how much you have "signed up" to the project. I give two examples
1) A brilliant project where we did 6 impossible things before breakfast. The PM managed to get us all (and I mean everyone) to work an all nighter, then do a long day, then home and restart at 4.00AM in t... | [
0.8175307512283325,
-0.24135643243789673,
0.3082040548324585,
0.24602678418159485,
0.19835615158081055,
0.21705090999603271,
0.6760749220848083,
-0.2349957972764969,
-0.43991488218307495,
-0.09130679816007614,
0.07210127264261246,
0.1138138696551323,
0.027490373700857162,
-0.10041100531816... | |
long lunches, google, and CV work. No work on out of hours time at all.
It all depends on the project. | [
0.8083930611610413,
0.05111360922455788,
0.3329789340496063,
0.2485567033290863,
0.4464655816555023,
0.0487196184694767,
0.23352012038230896,
0.25567424297332764,
-0.11684901267290115,
-0.4839699864387512,
0.04255993664264679,
0.5884098410606384,
0.4656088948249817,
-0.26041164994239807,
... | |
I am trying to get a user's email address in AD without success.
```
String account = userAccount.Replace(@"Domain\", "");
DirectoryEntry entry = new DirectoryEntry();
try {
DirectorySearcher search = new DirectorySearcher(entry);
search.PropertiesToLoad.Add("mail"); // e-mail addressead
SearchResult r... | [
0.14817048609256744,
0.2778611183166504,
0.6383572816848755,
-0.35502052307128906,
0.10988514125347137,
0.10401113331317902,
0.5272736549377441,
-0.40027666091918945,
0.2742718458175659,
-0.7575921416282654,
-0.22553935647010803,
0.4351899027824402,
-0.448419988155365,
0.41169339418411255,... | |
direction?
**Disclaimer:** This code doesn't search for a [single exact match](https://social.technet.microsoft.com/wiki/contents/articles/22653.active-directory-ambiguous-name-resolution.aspx), so for `domain\j_doe` it may return `domain\j_doe_from_external_department`'s email address if such similarly named account a... | [
-0.1847686916589737,
-0.031657878309488297,
1.1207035779953003,
-0.21972961723804474,
0.13151071965694427,
0.16087761521339417,
0.13042795658111572,
-0.527279794216156,
-0.13380911946296692,
-0.46986982226371765,
-0.05322287976741791,
0.5276026725769043,
0.045512519776821136,
0.14604246616... | |
// last name
search.PropertiesToLoad.Add("mail"); // smtp mail address
// perform the search
SearchResult result = search.FindOne();
``` | [
-0.10499826073646545,
-0.09487052261829376,
0.3749777674674988,
-0.20864129066467285,
0.26744145154953003,
-0.11497696489095688,
0.5220299363136292,
-0.07807624340057373,
-0.3176450729370117,
-0.4813515543937683,
-0.2924112379550934,
0.07258134335279465,
-0.19928906857967377,
0.62344598770... | |
We are trying to get WCF and Java talking to each other using SAML tokens issued from an STS. Despite the fact that both sides are compliant with the standards, WS-Security, WS-Trust, WS-Policy, etc., they don't seem to talk to each other and one or the other will throw cryptic exceptions or ignore security headers.
W... | [
0.5499229431152344,
-0.16521307826042175,
0.22350694239139557,
-0.20420019328594208,
-0.3310806155204773,
-0.2988693118095398,
0.2600056529045105,
-0.13731953501701355,
-0.16550220549106598,
-0.6588318347930908,
0.08271093666553497,
0.3890112042427063,
-0.4470071792602539,
0.03932986408472... | |
Axis2 failed my WS-\* compliance tests (specifically WS-AT, WS-Coordination).
Have a look at "Project Metro". Sun and Microsoft collaborated on getting WCF and JAX-WS interop "right".
<https://metro.dev.java.net/> | [
-0.02854670025408268,
-0.7977216243743896,
0.27054011821746826,
0.38454845547676086,
-0.09903499484062195,
-0.06425651162862778,
-0.01959868334233761,
0.02841896004974842,
-0.2179994434118271,
-0.44044503569602966,
0.10061021894216537,
0.24014535546302795,
-0.32932841777801514,
-0.15105609... | |
Say i'm trying to evaluate the Polynomial:
```
x^2 + 1
```
Using the Fast Fourier transform method for evaluating co-efficients. Now i can change this into matrix/vector form using the co-effcient as inputs for the fast fourier transform:
so:
```
x^2 + 1 = <1, 0, 1, 0>
```
This is done by using the coefficient v... | [
-0.20543888211250305,
0.08309449255466461,
0.30194389820098877,
-0.24568574130535126,
-0.19888663291931152,
0.1478867530822754,
0.01121498178690672,
-0.5556650161743164,
-0.04349638149142265,
-0.6264661550521851,
0.05174300819635391,
0.5595917105674744,
-0.5072499513626099,
0.0139393666759... | |
i
```
The output of
```
fft(1,0,1,0)
```
is
```
(2,0,2,0)
```
Now thats the step i don't quite understand, how did we use that matrix to get (2,0,2,0)?
First, your Vandermonde matrix is incorrect. The (4,3) entry should be -1, not 1, since the fourth row should be (-i)0, (-i)1, (-i)2, (-i)3. Note in particular ... | [
-0.18693183362483978,
0.058370139449834824,
0.5656687617301941,
-0.2652651071548462,
-0.1039532721042633,
0.2792242169380188,
0.1603332906961441,
-0.7955780625343323,
-0.11025869846343994,
-0.6402496695518494,
-0.004871792159974575,
0.5064724087715149,
-0.3449989855289459,
0.07460554689168... | |
In C++ classes, why the semi-colon after the closing brace? I regularly forget it and get compiler errors, and hence lost time. Seems somewhat superfluous to me, which is unlikely to be the case. Do people really do things like:
```
class MyClass
{
.
.
.
} MyInstance;
```
I get it from a C compatibility point of vie... | [
0.1808726191520691,
0.22803939878940582,
-0.13325731456279755,
-0.0870472863316536,
-0.22503654658794403,
-0.07771222293376923,
0.35271841287612915,
0.2802716791629791,
-0.13614149391651154,
-0.39857831597328186,
-0.14939962327480316,
0.45447224378585815,
-0.29042425751686096,
0.0066275759... | |
trap this before compilation.
The semi-colon after the closing brace in a type declaration is required by the language. It's been that way since the earliest versions of C.
And yes, people do indeed do the declaration you just put up there. It's useful for creating scoped types inside of methods.
```
void Example()... | [
0.5894508957862854,
0.1600784957408905,
0.10423509031534195,
-0.23409749567508698,
0.03523800149559975,
-0.10395026952028275,
0.5517186522483826,
-0.26539346575737,
-0.1517539620399475,
-0.16890007257461548,
-0.2608557939529419,
0.6079817414283752,
-0.5788368582725525,
-0.1517261117696762,... | |
My *guess* is that it's historical and was done to make writing the compiler easier. | [
0.43546003103256226,
0.6083170175552368,
-0.15183521807193756,
0.08903572708368301,
0.3267269730567932,
0.32070112228393555,
0.12442351877689362,
0.22251996397972107,
0.033602625131607056,
-0.42683303356170654,
0.06925629079341888,
-0.008817843161523342,
-0.048851169645786285,
0.0430694967... | |
Using ASP.NET, how can I strip the HTML tags from a given string reliably (i.e. not using regex)? I am looking for something like PHP's `strip_tags`.
### Example:
`<ul><li>Hello</li></ul>`
### Output:
"Hello"
I am trying not to reinvent the wheel, but I have not found anything that meets my needs so far.
If it is ... | [
-0.00016863099881447852,
-0.33285608887672424,
0.5021425485610962,
-0.04269229993224144,
-0.27781444787979126,
-0.12768034636974335,
0.22078020870685577,
-0.09018122404813766,
-0.4255742132663727,
-0.8462313413619995,
-0.31924253702163696,
0.3759380280971527,
-0.2482965588569641,
-0.165947... | |
HTML and XML allow `>` in attribute values. This solution *will* return broken markup when encountering such values.
2. The solution is technically safe, as in: The result will never contain anything that could be used to do cross site scripting or to break a page layout. It is just not very clean.
3. As with all thing... | [
0.26367950439453125,
0.07980342209339142,
0.42016810178756714,
0.1816113442182541,
-0.12739518284797668,
-0.6911906003952026,
0.5459339022636414,
-0.4681546092033386,
-0.07272538542747498,
-0.7590165138244629,
-0.3050295114517212,
0.49463605880737305,
-0.3188243508338928,
-0.42182493209838... | |
Ok, this may seem like a silly question, but it is seriously bugging me. Hoping some fellow programmer has a good word for it!
Thing is, I am making an ExpressionBuilder class to help me build up expressions to use with LinqToSQL. And my problem is about how word myself when describing what two methods. And it kind of... | [
0.552944540977478,
0.13649338483810425,
-0.0428658165037632,
-0.10360515862703323,
-0.44546064734458923,
-0.1417171210050583,
0.41070878505706787,
0.1974111646413803,
-0.2312564104795456,
-0.20051372051239014,
-0.10978731513023376,
0.6355284452438354,
-0.3320995271205902,
0.020142897963523... | |
`||` / `OrElse`. So for example like this:
```
A = A && B;
```
Alright. So, what did you just do there? What is the verb for what you did with B to A? If you think in a series of this stuff, like `A = A && B && C && D && E && ...`, you could sort of say that you then "add" `F` to that series. But that wouldn't reall... | [
0.1748005449771881,
0.2803192138671875,
0.041803278028964996,
-0.3376767039299011,
-0.41311606764793396,
0.16010040044784546,
0.12882477045059204,
-0.21037140488624573,
-0.21645693480968475,
-0.12307567894458771,
-0.2043248414993286,
0.6054340600967407,
-0.2574206590652466,
0.1514308005571... | |
"or" it to/with `A`. But can "and" and "or" be used as a verb?? Is that considered ok? Feels like incredibly bad English... but maybe it is ok in a programming environment? Or?
In logic AND is the [conjunction operator](http://en.wikipedia.org/wiki/Logical_conjunction), so you are conjoining A and B. OR is disjoining. | [
0.08810112625360489,
-0.023409683257341385,
0.37227383255958557,
-0.15789537131786346,
-0.45044004917144775,
0.013146722689270973,
0.3851715326309204,
0.1611969918012619,
-0.21138572692871094,
-0.10037676244974136,
-0.3068064749240875,
0.38278988003730774,
-0.11156857013702393,
-0.12034131... | |
I am looking for the Windows Look and Feel Design Guidelines ([but not the one for Windows Vista!](http://msdn.microsoft.com/en-us/library/aa511258.aspx)) that details the ideal gap between elements, etc. I found the document originally a few years back on MSDN but now I can't find it.
I've started a new job the same... | [
0.14864934980869293,
0.17725718021392822,
0.6680482029914856,
-0.08175080269575119,
0.23717869818210602,
0.11112087965011597,
0.34179532527923584,
-0.15965405106544495,
-0.41359442472457886,
-0.9757010340690613,
-0.025244345888495445,
0.17336711287498474,
-0.05443677306175232,
0.3188486695... | |
Development](https://learn.microsoft.com/en-us/windows/win32/windows-application-ui-development)
* [Windows User Experience Interaction Guidelines](https://developer.microsoft.com/en-us/windows/desktop)
+ [Guidelines](https://web.archive.org/web/20161014152858/https://msdn.microsoft.com/en-us/library/aa511440.as... | [
-0.23242323100566864,
-0.07613397389650345,
0.7506424188613892,
-0.0570216067135334,
-0.19965216517448425,
0.47061190009117126,
0.06169610843062401,
-0.6944001913070679,
-0.48290276527404785,
-1.0525654554367065,
-0.4582751393318176,
0.32941198348999023,
0.1894732564687729,
-0.220636889338... | |
>
> Relative Pixels: 75 x 23
>
>
> Spacing
> -------
>
>
> The following table lists the recommended spacing between common UI elements (for 9 pt. Segoe UI at 96 dpi).
>
>
> **Dialog box margins**
>
> [](https://i.stack.imgur.com/RSrxg.jpg)
>
> (source: [microsoft.c... | [
-0.2647954821586609,
-0.07643448561429977,
0.6921788454055786,
0.05907650291919708,
-0.19417007267475128,
0.39128750562667847,
0.0842457190155983,
-0.598832905292511,
0.026444653049111366,
-0.9271248579025269,
-0.1416366696357727,
0.3791629672050476,
-0.04512956738471985,
-0.14279569685459... | |
Relative Pixels: 5 down from the top of the control
---
There's also the page that explains what Dialog Units are: [Layout, Device Independent Layout](http://msdn.microsoft.com/en-us/library/bb847924):
 | [
-0.10770997405052185,
-0.22211897373199463,
0.7495158910751343,
0.2788296341896057,
-0.07118929177522659,
0.36871275305747986,
0.07220261543989182,
-0.1912926286458969,
-0.2900438904762268,
-0.6497769951820374,
0.08394824713468552,
0.4386213421821594,
-0.19663767516613007,
-0.1834970265626... | |
Let say I got this function :
```
void int Calculate(double[] array) {}
```
And in my main I got this array:
```
double[,] myArray = new double[3,3];
```
How can I call Calculate(...) ?
I try (that's don't compile) :
```
double[] mySingleArray = myArray[0];
```
What I want to avoid is unnecessary loop (for).... | [
0.22732852399349213,
0.17488837242126465,
0.4436669945716858,
-0.3836093842983246,
-0.3352241814136505,
-0.001389156561344862,
0.3316471576690674,
-0.1098749041557312,
-0.02771044336259365,
-0.39561280608177185,
0.2843917906284332,
0.6016442179679871,
-0.33796972036361694,
0.10600642114877... | |
is good enough. The main thing is that this will let us use the `yield` keyword to slice up your array in an efficient way:
```
public static IEnumerable<T> Slice(this T[,] values)
{
return Slice(values, 0, 0);
}
public static IEnumerable<T> Slice(this T[,] values, int index)
{
return Slice(values, 0, index);... | [
0.06717069447040558,
-0.4230089783668518,
0.6894528269767761,
-0.27524739503860474,
0.00021858529362361878,
-0.12175454199314117,
0.14167018234729767,
-0.5081357955932617,
0.10948833078145981,
-0.8672420978546143,
-0.28175726532936096,
0.639032244682312,
-0.1476069837808609,
-0.18400821089... | |
i = 0; i < length; i++)
{
point[dimension] = i;
yield return (T)values.GetValue(point);
}
}
```
It still needs some work because it only works with rank 2 arrays, but it should be fine for the example you posted.
Now you can call your calculate function like this:
```
Calculate(myArray.Sli... | [
0.167887881398201,
-0.379308819770813,
0.5423606038093567,
-0.2552048861980438,
-0.32613590359687805,
-0.046959903091192245,
0.2755625545978546,
-0.4231349229812622,
-0.12120130658149719,
-0.6177919507026672,
0.2085685282945633,
0.40078529715538025,
-0.21644562482833862,
0.0541229993104934... | |
Calculate method, and even there runs in a "just-in-time" fashion so that the whole algorithm remains O(n).
It gets even more interesting when you share what your Calculate method is doing. You might be able to express it as a simple Aggregate + lambda expression. For example, let's say your calculate method returned ... | [
-0.02205723710358143,
-0.1651543229818344,
0.32759979367256165,
-0.013319557532668114,
-0.17388175427913666,
0.3642254173755646,
-0.14113980531692505,
-0.44686469435691833,
-0.21099315583705902,
-0.5069402456283569,
0.29640427231788635,
0.2088467925786972,
-0.2724402844905853,
-0.008700067... | |
I have a standard GWT application, and it of course uses a Java servlet on the backend. This servlet is deployed on Tomcat and Windows Server.
I know it's against the rules / suggestions, but I have one thread in this servlet that get's started when the servlet initializes (the "init" method of the servlet). The thre... | [
0.3051817715167999,
0.08263222128152847,
0.49023711681365967,
0.0630423054099083,
-0.06279671937227249,
-0.22513672709465027,
0.005115601234138012,
0.07472782582044601,
-0.2170829474925995,
-0.5224707126617432,
-0.10472320020198822,
0.38388150930404663,
-0.437855064868927,
0.25998407602310... | |
deployed. Right now what I've been doing is, everytime there is an upgrade to the application, I drop the war into the right directory, then I have to "login" to the application GWT application so that its "init" method is called. I would like for the servlet's init method to be called as soon as the war is updated so ... | [
0.24899627268314362,
0.037415552884340286,
0.3026546239852905,
-0.13011637330055237,
0.056949928402900696,
-0.12070734798908234,
0.1709783375263214,
-0.2971343398094177,
-0.4499324858188629,
-0.7362316846847534,
-0.21542988717556,
0.7944480776786804,
-0.6088913083076477,
0.1432535946369171... | |
public void contextInitialized(ServletContextEvent sce) {
// start the thread
}
public void contextDestroyed(ServletContextEvent sce) {
// stop the thread
}
}
```
then add:
```
<listener>
<description>ServletContextListener</description>
<listener-class>MyListener</listener-cla... | [
-0.23726457357406616,
-0.1673019975423813,
0.5185909271240234,
-0.08179154992103577,
-0.01476722490042448,
-0.059969574213027954,
0.15443719923496246,
-0.025687837973237038,
-0.3292047381401062,
-0.6153058409690857,
-0.40928545594215393,
0.38400477170944214,
-0.3638608753681183,
0.60416501... | |
Is there a way to generically retrieve process stats using Perl or Python? We could keep it Linux specific.
There are a few problems: I won't know the PID ahead of time, but I *can* run the process in question from the script itself. For example, I'd have no problem doing:
`./myscript.pl some/process/I/want/to/get/st... | [
0.3122520446777344,
-0.11214488744735718,
0.04988384246826172,
0.24683327972888947,
-0.07218960672616959,
0.101119264960289,
-0.08825945109128952,
-0.04663713276386261,
-0.44242721796035767,
-0.5913040041923523,
0.23347187042236328,
0.4215897023677826,
0.06775439530611038,
-0.0361607857048... | |
on the processes in the system. Call the "fields" method to get a list of details that you can extract from each process.
I recently discovered the above module which has just about replaced the Process module that I had written when writing a Perl kill program for Linux. You can have a look at my script [here](http:/... | [
0.688829243183136,
-0.19173984229564667,
0.32941749691963196,
-0.007823964580893517,
-0.17044487595558167,
0.09898611158132553,
0.1209523156285286,
0.054554812610149384,
-0.2975105047225952,
-0.8745606541633606,
0.042147740721702576,
0.4619623124599457,
-0.37172695994377136,
0.072364374995... | |
passing that PID to it like so,
```
my $psTable = Process->new();
# Get list of process owned by 'root'
for my $pid ( $psTable->getbyuser("root") ) {
$psDetail = $psList->getdetail( $pid );
# Do something with the psDetail..
}
``` | [
0.1599080115556717,
-0.3309558629989624,
0.6243797540664673,
-0.18103580176830292,
0.11231523752212524,
-0.1120646521449089,
0.14828801155090332,
-0.11306706815958023,
-0.10610557347536087,
-0.787182092666626,
-0.1114286258816719,
0.14592908322811127,
-0.3508321940898895,
0.165151596069335... | |
I have been having a lot of trouble figuring out how I can access the content within an iframe in Air. Here is some example jquery code that I have been testing with.
```
$(document).ready(function(){
$("#frame").ready(function(){
air.trace($("#frame").contents().find("body").html());
air.trace(wi... | [
0.25863903760910034,
0.3512352406978607,
0.6466501951217651,
0.03774239867925644,
0.2561919093132019,
-0.2028116136789322,
0.2764950394630432,
-0.6456990838050842,
-0.07495277374982834,
-0.9210910797119141,
-0.4583732485771179,
0.3225560188293457,
-0.1878792941570282,
-0.04101942107081413,... | |
missing something that is preventing me from accessing the content of the iframe? Any suggestions would be greatly appreciated.
The solution was here <http://help.adobe.com/en_US/AIR/1.1/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7f08.html>
Here is an example of how I got it working.
```
<iframe src="http://goo... | [
0.05839744582772255,
0.2947121262550354,
0.6519345045089722,
-0.1372186541557312,
-0.13733810186386108,
-0.011681883595883846,
-0.012085309252142906,
-0.16144923865795135,
-0.23858334124088287,
-0.5593525171279907,
-0.07263179868459702,
0.2532448470592499,
-0.2693038582801819,
0.1741200387... | |
i'm trying to control the VLC Media Player from C#. I tried getting a handle on the window with the FindWindow() command from .Net but as i found out the name of the window changes every time a file is played. The biggest problem i have is sending wm\_commands to vlc..This approach worked with Winamp and Windows Media ... | [
0.4678395688533783,
-0.17657668888568878,
0.5374481678009033,
0.03940539434552193,
-0.2339213788509369,
-0.4365844130516052,
0.10761556774377823,
0.11916369944810867,
-0.3172549903392792,
-0.709352970123291,
-0.0005867384024895728,
0.9244961142539978,
-0.5714744329452515,
0.654603660106658... | |
and if i call them from my code somehow...and the user changes them..bummer...
i'm a little bit stuck..any help would be fantastic...
Sorin
I have some code that is able to [control it using sockets](http://gist.github.com/101357) on the [RC interface](http://getluky.net/2006/04/19/vlcs-awesome-rc-interface/). This wo... | [
0.3596114218235016,
-0.29030558466911316,
0.43291646242141724,
0.15183337032794952,
-0.2884935140609741,
-0.5357462167739868,
0.0006863789167255163,
-0.09627152979373932,
-0.45719993114471436,
-0.35202184319496155,
-0.06572631746530533,
1.082152247428894,
-0.29260608553886414,
0.0453888438... | |
could use vlc.
Write an interop wrapper for *libvlc*, recently the VLC team split out `libvlccore` from `libvlc` so to the best of my knowledge all the [interop](http://forum.videolan.org/viewtopic.php?f=32&t=52021&sid=5b966dc2463cb3b0dbeb5efdbbdb72f4&start=90) is out of date. Once you write a wrapper you could embed... | [
0.5593405365943909,
-0.35612979531288147,
0.546019971370697,
-0.0036745574325323105,
-0.21998196840286255,
-0.2510785460472107,
-0.050243526697158813,
0.06344283372163773,
-0.4888932406902313,
-0.7065065503120422,
-0.04018779098987579,
0.33372077345848083,
-0.48936840891838074,
0.375815212... | |
Is there any good erlang library for creating / accessing SOAP web services?
Maybe also handling plain XML is quite difficult.
Is Json a good alternative? Any lib for that?
My goal is interop with existing .Net web services.
Thanks
Yaws (an Erlang Web Server) has a [Soap module](http://yaws.hyber.org/soap_intro.yaw... | [
0.4096643030643463,
0.15775981545448303,
0.016361268237233162,
0.09526107460260391,
-0.35815101861953735,
-0.08057153224945068,
0.3204869031906128,
-0.030028603971004486,
-0.14945335686206818,
-0.916783332824707,
0.10991606116294861,
0.47863808274269104,
-0.27357035875320435,
-0.2132643908... | |
I need to write a webpage which starts with a blank map of the US and colors the states according to data it receives from various Ajax requests. The map needs to change over time without the page reloading, and the user can click on various controls to instantly change how the map is colored. This all needs to be done... | [
0.5612059235572815,
0.16976481676101685,
0.2742898464202881,
0.23574863374233246,
0.18109634518623352,
-0.010948020964860916,
0.11458966881036758,
0.248321995139122,
-0.16159886121749878,
-0.9924354553222656,
0.26469165086746216,
0.16427180171012878,
-0.18758557736873627,
0.228343218564987... | |
implement this?
I would take a plugin like this just change it to do "highlighting" based on your dynamic data:
* <http://plugins.jquery.com/project/maphilight>
* Demo of plugin: <http://davidlynch.org/js/maphilight/docs/demo_usa.html>
Currently it highlights on mouseover, but highlighting using data given should be ... | [
0.2608732581138611,
-0.2950309216976166,
0.20369797945022583,
0.09862068295478821,
0.07782486826181412,
-0.5224518775939941,
0.19376198947429657,
-0.09827921539545059,
-0.28495171666145325,
-0.7597358822822571,
0.2651617228984833,
0.40178269147872925,
-0.2792882025241852,
-0.12024144083261... | |
We are using an asynchronous HttpHandler in ASP.NET 3.5 under IIS 6, and in our code we're wanting to perform an external API call if we're not under too much load. We've defined "too much load" meaning that if we have more than X requests hitting this API at the same time, we'll just skip calling the API.
To accompli... | [
0.6143965721130371,
-0.2437155395746231,
0.4250282645225525,
-0.06162269786000252,
-0.00839207787066698,
-0.2902625799179077,
0.27890142798423767,
0.105887770652771,
-0.24730363488197327,
-0.6101251244544983,
-0.2293824702501297,
0.2733854353427887,
-0.3490075170993805,
0.13776209950447083... | |
being called.
The code is this:
```
static Semaphore requestLimiter = new Semaphore(500, 500);
...
String GetResultFromAPI() {
if (!requestLimiter.WaitOne(0)) return null;
try
{
// ... code to perform API call, with a timeout specified on the HttpWebRequest
return result;
} catch { ... | [
0.21647389233112335,
-0.32952284812927246,
1.0373899936676025,
-0.05938417837023735,
0.16974075138568878,
0.09269742667675018,
0.27520647644996643,
-0.568642795085907,
0.014136821031570435,
-0.4962036609649658,
-0.4137495756149292,
0.5002526640892029,
-0.35159412026405334,
0.14984251558780... | |
HttpWebRequest does time out, so we're puzzled as to how this code could result in the requestLimiter semaphore getting down to 0 and never recovering.
Has anyone encountered this? Is there any way an asynchronous HttpHandler can have a request interrupted without an exception?
Edit
====
Apparently ThreadAbortExcept... | [
0.18967434763908386,
-0.11935266852378845,
0.4617023766040802,
-0.03402089700102806,
-0.10011390596628189,
-0.3461092710494995,
0.6284817457199097,
0.17635035514831543,
-0.3533691465854645,
-0.589345395565033,
0.021209267899394035,
0.4444713592529297,
-0.12428847700357437,
0.39477565884590... | |
column is often the most useful.
See if during the slow operations a lot of memory gets released - this will indicate that the collector hasn't bothered doing much work for a while and then has had to kick in a do a larger clean up. | [
-0.009265683591365814,
0.10368288308382034,
0.40658921003341675,
0.5294055938720703,
-0.06123267859220505,
-0.014131337404251099,
-0.07666390389204025,
0.17877596616744995,
-0.37656494975090027,
-0.35265010595321655,
0.036503251641988754,
0.14384862780570984,
0.19105635583400726,
-0.066798... | |
Something that's confused me - an example:
Thing.java:
```
import java.util.Date;
class Thing {
static Date getDate() {return new Date();}
}
```
(same package) TestUsesThing.java:
```
// not importing Date here.
public class TestUsesThing {
public static void main(String[] args) {
System.out.p... | [
0.15193523466587067,
-0.12239332497119904,
0.40597647428512573,
-0.1418514847755432,
0.11026543378829956,
-0.05216298997402191,
0.25680530071258545,
-0.2436167150735855,
-0.32113346457481384,
-0.4184631109237671,
-0.24055929481983185,
0.4566057622432709,
-0.37109652161598206,
0.25404447317... | |
`Date` is if you type
```
Date date = new Date();
```
Importing is not like `#include` in C/C++; all types on the classpath are *available*, but you `import` them just to keep from having to write the fully qualified name. And in this case, it's unnecessary. | [
0.27469444274902344,
-0.1830463409423828,
0.21430930495262146,
-0.3794487416744232,
0.16905689239501953,
-0.34785929322242737,
-0.01796639710664749,
0.02451147884130478,
-0.07717622071504593,
-0.37964868545532227,
-0.4800621271133423,
0.41787976026535034,
-0.36231687664985657,
0.2442843317... | |
How would I store a pdf in my Rails app so that users can access/download them?
In my migration, would i i use the datatype `t.binary`?
Then in my controller/view, how should I present this data?
The answer here is probably it depends. Depends on the size and number of PDFs, where users have to be logged in to view t... | [
0.18691883981227875,
-0.11064144223928452,
0.6048415899276733,
0.3640832006931305,
0.023430652916431427,
-0.05107157677412033,
-0.2078794538974762,
-0.06477124989032745,
-0.302842378616333,
-0.891272783279419,
0.11827235668897629,
0.45661547780036926,
0.014330676756799221,
0.07436062395572... | |
the database, then using a binary column is the way to go.
If users don't have to be logged in to download the PDF's, then you could just place them into the public folder (inside a subfolder) and generate links to them for download - then your controller would only need to generate a link to a static PDF file, and th... | [
0.22969242930412292,
-0.2202945500612259,
0.46747976541519165,
0.6325715780258179,
0.023728065192699432,
-0.3124636709690094,
-0.15417838096618652,
0.131765678524971,
-0.25218790769577026,
-0.49406349658966064,
0.02079606056213379,
0.37665271759033203,
-0.25164154171943665,
0.1779517084360... | |
I need to use OGNL for reading some properties from Java object. OGNL is completely new thing to me. The documentation available for OGNL is OGNL's website is really confusing to me.
So anyone can provide a simple `HelloWorld` example for using OGNL (or any link to a tutorial is also helpful).
Try this:
```
Dimen... | [
0.05845092236995697,
0.1800418198108673,
0.6394939422607422,
-0.1603812724351883,
-0.1905340552330017,
-0.14282970130443573,
0.16264905035495758,
-0.06539858877658844,
-0.06303290277719498,
-0.800902247428894,
-0.07161612063646317,
0.6979846358299255,
-0.4873174726963043,
0.000778271816670... | |
I have several domains that I would like to have wildcard subdomains enabled for through mod\_vhost\_alias
Included in my httpd.conf I have the following generalized rules:
```
<VirtualHost [ip here]:80>
ServerName domain1.com
ServerAlias www.domain1.com
DocumentRoot /home/user1/public_html
</VirtualHos... | [
0.09630002081394196,
0.15129366517066956,
0.6901446580886841,
0.12693876028060913,
-0.15790195763111115,
-0.46280768513679504,
0.2931162714958191,
-0.3511877655982971,
-0.25224778056144714,
-0.6610333919525146,
0.09332495927810669,
0.3709859549999237,
-0.16762936115264893,
0.33700004220008... | |
request for test.domain1.com or test.domain2.com will just show the contents of /home/user1/public\_html (the default rule according to apache).
Some other information:
-----------------------
`/home/user1/subdomains/test` and `/home/user2/subdomains/test` both exist and have files in them
All my domains have a wi... | [
0.19019845128059387,
-0.11567489057779312,
0.4584854245185852,
0.2782900333404541,
0.06333364546298981,
-0.1860426515340805,
0.21362760663032532,
-0.23200148344039917,
0.0547846257686615,
-0.7454946637153625,
0.11796427518129349,
0.0738331601023674,
-0.03747376799583435,
0.5101718306541443... | |
port 80 namevhost domain1.com (/etc/httpd/sites/user1:1)
port 80 namevhost *.domain1.com (/etc/httpd/sites/user1:14)
port 80 namevhost domain2.com (/etc/httpd/sites/user2:1)
port 80 namevhost *.domain2.com (/etc/httpd/sites/user2:14)
Syntax OK
```
```
# httpd -M
Loaded Modules:
core_module ... | [
-0.17305664718151093,
0.1851816326379776,
0.8291999101638794,
-0.34923025965690613,
-0.06492339819669724,
-0.12508565187454224,
0.28212931752204895,
-0.24995388090610504,
-0.6363747119903564,
-0.5620213150978088,
-0.14124725759029388,
0.9152079820632935,
-0.3962852656841278,
0.332283139228... | |
such a noob, it was a real simple solution.
`ServerName` does not allow wildcards, but `ServerAlias` does, so I just duplicated the servername again.
Here is the final minimized config for domains anyone who happens to find this answer (I hate it when you search on google and find questions but no answers):
```
<Vir... | [
-0.31803399324417114,
0.0019040716579183936,
0.6663258075714111,
0.19781088829040527,
0.13315752148628235,
-0.25035756826400757,
-0.0035269581712782383,
0.047700732946395874,
-0.4431966245174408,
-0.4091486930847168,
0.0936490073800087,
0.26191428303718567,
-0.424923300743103,
0.3387342095... | |
I have a Perl script that outputs text. I want to import this text into vim, edit it, save it and then exit. On exit, I want the original Perl script to process the edited file.
E.G. how `crontab -e` works when you add a new job.
Thanks :)
Sounds like a very plain case to use [system](http://perldoc.perl.org/function... | [
0.5026094913482666,
0.17626158893108368,
0.5016486644744873,
-0.08352289348840714,
-0.1498943716287613,
0.10547775030136108,
0.06522485613822937,
0.12612706422805786,
-0.16251294314861298,
-0.6449894905090332,
-0.056398920714855194,
0.5763158202171326,
-0.32374027371406555,
0.2747081220149... | |
I'm working on an ASP.NET project that replaces many existing paper forms. One of the requirements is that the user can save the form in any state, i.e. they could create a new blank form and immediately save it with no data or with partial data. I'm validating for data type on every save but validation for required fi... | [
0.6375932693481445,
0.17091116309165955,
0.12212351709604263,
0.08870166540145874,
-0.06209256500005722,
-0.27831900119781494,
0.22610671818256378,
0.046244461089372635,
-0.1542113572359085,
-0.6805124282836914,
-0.0350676029920578,
0.20848654210567474,
-0.053594619035720825,
0.03495118021... | |
that may not have data. This feels like the "correct" approach but it requires that almost every database field allow nulls and I have to code around a lot of nullable types. Also, when the form is finalized none of the required fields are enforced in the database.
2. Populate my business objects with meaningful defaul... | [
0.4055592715740204,
0.1966743916273117,
0.23506705462932587,
0.18497881293296814,
-0.02336914651095867,
-0.2726436257362366,
0.44261428713798523,
0.011804328300058842,
-0.11685427278280258,
-0.5236006379127502,
-0.061003148555755615,
0.46100443601608276,
-0.3273262679576874,
-0.02147394232... | |
such as splitting the tables.
Edited to add: I wanted to expand on this a bit since I accepted a response. The primary reason that I'm not interested in splitting the tables is that once a project is submitted, the data on the forms is used to generate data for another system that is the system of record. At that poin... | [
0.5566750168800354,
-0.09608205407857895,
-0.17710375785827637,
0.22333218157291412,
-0.2561868131160736,
-0.3957816958427429,
0.01730138063430786,
-0.3025571405887604,
-0.4152100682258606,
-0.2212371528148651,
-0.04052814468741417,
0.39070212841033936,
-0.32942983508110046,
0.131666094064... | |
verify that they are not null when completed... well, if you don't want to split the table there isn't much you can do (short of using a `CHECK` constraint, or an `INSTEAD OF` trigger to run validation). But the DB isn't the *only* place responsible for data validation. Your app logic can do that too. | [
0.31764811277389526,
0.22460311651229858,
-0.06419094651937485,
0.3329712450504303,
-0.04139259085059166,
-0.277975857257843,
0.44373586773872375,
-0.22036638855934143,
-0.047423578798770905,
-0.23600636422634125,
-0.014625017531216145,
0.5260342955589294,
-0.16265498101711273,
-0.23755039... | |
I have asked a [similar question](https://stackoverflow.com/questions/780236/limit-the-return-of-non-unique-values) before and while the answers I got were spectacular I might need to clearify.
Just like [This question](https://stackoverflow.com/questions/104971/sql-query-help-selecting-rows-that-appear-a-certain-numb... | [
0.14834661781787872,
0.21107791364192963,
0.30559003353118896,
0.09480996429920197,
-0.3843417465686798,
0.10338281840085983,
0.02917531691491604,
-0.05558911710977554,
-0.37112388014793396,
-0.5959463119506836,
0.28386908769607544,
0.19694718718528748,
-0.13869675993919373,
0.181725084781... | |
to one post so if a post has 20 comments then I just want to return the last three. What makes this somewhat tricky is I want to do it in one query and not a "limit 3" query per blog post which makes rendering a page with a lot of posts very query heavy.
```
SELECT *
FROM replies
GROUP BY post_id
HAVING COUNT( post_id... | [
0.43247848749160767,
-0.014864676631987095,
0.5033197402954102,
-0.11776451021432877,
-0.2994409501552582,
0.4204995334148407,
0.06543461233377457,
-0.20321860909461975,
0.026914510875940323,
-0.8412175178527832,
0.3003007173538208,
0.38399842381477356,
-0.6141956448554993,
-0.001283291378... | |
COALESCE(
(
SELECT id
FROM replies li
WHERE li.post_id = dlo.post_id | [
0.014214297756552696,
-0.27551743388175964,
0.2752777338027954,
0.06509601324796677,
0.35842186212539673,
0.02700841799378395,
0.36970043182373047,
-0.4106915593147278,
0.11503434926271439,
-0.8735045194625854,
-0.39253175258636475,
0.125449538230896,
-0.33441591262817383,
0.12819831073284... | |
ORDER BY
li.post_id, li.id
LIMIT 2, 1
), CAST(0xFFFFFFFF AS DECIMAL)) AS mid
FROM (
SELECT DISTINCT post_id | [
-0.21565517783164978,
-0.01638835296034813,
0.7026756405830383,
-0.21446549892425537,
0.28374794125556946,
0.27907583117485046,
-0.11950640380382538,
-0.37125757336616516,
0.2517467141151428,
-0.3102673590183258,
-0.5735703706741333,
0.19832879304885864,
-0.09059683233499527,
0.47262096405... | |
FROM replies dl
) dlo
) lo, replies l
WHERE l.replies >= lo.replies
AND l.replies <= lo.replies
AND l.id <= lo.mid
```
Having an index on `replies (post_id, id)` (in this order) will greatly improve this query.
Note the usage of `l.replies >= lo.replies AND l.replies <= l... | [
-0.11003895848989487,
-0.28501614928245544,
0.5608901977539062,
-0.1590154469013214,
0.13548868894577026,
0.51012122631073,
-0.38835960626602173,
-0.20448459684848785,
-0.14334949851036072,
-0.6788750886917114,
-0.49171480536460876,
0.4556924104690552,
-0.28340181708335876,
0.0644097849726... | |
to make the index to be usable.
See the article in my blog for details:
* [**Advanced row sampling**](http://explainextended.com/2009/03/06/advanced-row-sampling/) (how to select `N` rows from a table for each `GROUP`) | [
-0.036323245614767075,
0.1640373170375824,
0.06078425422310829,
0.12482259422540665,
0.11351530253887177,
0.1567286103963852,
0.032714661210775375,
-0.39351123571395874,
-0.10305093228816986,
-0.5642452239990234,
0.2951439321041107,
0.14813610911369324,
-0.31186577677726746,
0.039143890142... | |
How to use [jQuery](http://en.wikipedia.org/wiki/JQuery) to get the checked checkboxes values, and put it into a textarea immediately?
Just like this code:
```
<html>
<head>
</head>
<body>
<div id="c_b">
<input type="checkbox" value="one_name" checked>
<input type="checkbox" value="one_name1">
... | [
-0.019200695678591728,
-0.020627804100513458,
0.3935549259185791,
-0.029139051213860512,
0.010707654058933258,
-0.19410434365272522,
0.13818882405757904,
-0.2540532350540161,
-0.021230431273579597,
-0.853496789932251,
-0.1312336027622223,
0.5984581708908081,
-0.2771689295768738,
-0.4499676... | |
var allVals = [];
$('#c_b :checked').each(function() {
allVals.push($(this).val());
});
$('#t').val(allVals);
}
$(function() {
$('#c_b input').click(updateTextArea);
updateTextArea();
});
```
Update
------
Some number of months later another question was asked in regards to how to kee... | [
0.14434735476970673,
-0.2344205379486084,
0.5214213132858276,
-0.3949994146823883,
0.05079607293009758,
0.10650220513343811,
0.4096566140651703,
-0.3992234766483307,
0.006600219756364822,
-0.5912802219390869,
-0.23971182107925415,
0.790436863899231,
-0.44769760966300964,
0.2101353257894516... | |
I have a complex UI with several nested tables, a repeater control and several other HTML controls that have their disable attribute set based on business logic in JQuery.
I need a way to disable the entire table (including nested controls, UI elements etc) and re-enable them when a user toggles a button.
I could it... | [
0.07036018371582031,
-0.0928759053349495,
0.4144887328147888,
0.08301384001970291,
-0.04709158092737198,
0.018346678465604782,
0.46118712425231934,
-0.1324995458126068,
0.1562761813402176,
-0.7391749024391174,
-0.05465244874358177,
0.43757450580596924,
-0.3409035801887512,
0.10723821073770... | |
explained in para 1)
All I need is a way to leave the initial UI alone and overlay the disable/enable functionality on the UI.
Is there a easy way of accomplishing this?
checkout the [blockUI](http://malsup.com/jquery/block/) plugin. you can put a grey div over the entire table with it.
This will have the same effec... | [
0.40672725439071655,
0.21649400889873505,
0.08352820575237274,
0.08372894674539566,
0.09622880071401596,
-0.2011593133211136,
0.3294801712036133,
-0.1109347864985466,
-0.13492533564567566,
-0.6847955584526062,
-0.14747774600982666,
0.1411008983850479,
-0.5721582174301147,
0.196184247732162... | |
I am trying to make my application more customizable by allowing users to pick a color from a Color Picker dialog, and then changing the style of the application in real time (with `DynamicResource`)
**How do I go about in changing specific resources that reside in the `app.xaml` ?**
---
I have tried something like ... | [
0.2131749987602234,
-0.2999454140663147,
0.8987319469451904,
-0.1427673101425171,
-0.00289078033529222,
0.3849754333496094,
0.24101722240447998,
-0.44203758239746094,
-0.13522841036319733,
-0.7740892767906189,
0.08586177974939346,
0.6068283319473267,
-0.5921450257301331,
0.0872408896684646... | |
<GradientStop Color="#82cb01" Offset="0.2"/>
<GradientStop Color="#629a01" Offset="0.5"/>
</LinearGradientBrush>
</Application.Resources>
```
**What is the best way to allow this form of customizability (basically just changing some colors) to an application?**
---
**[Update]**
I just found [this answe... | [
-0.3014070689678192,
-0.3621956706047058,
0.682780385017395,
-0.07779385894536972,
0.08040019869804382,
0.2906663715839386,
0.24572044610977173,
-0.33397287130355835,
0.10000088065862656,
-0.46676623821258545,
0.2766706347465515,
0.17046776413917542,
-0.34001240134239197,
-0.07954724878072... | |
<GradientStop Color="Black" Offset="1" />
</GradientBrush.GradientStops>
</LinearGradientBrush>
```
*C#:*
```
LinearGradientBrush myBrush = FindResource("MainBrush") as LinearGradientBrush;
myBrush.GradientStops[0].Color = Colors.Red;
```
It looks like you're trying to do some sort of skinning?
I'd recommend d... | [
-0.1696719527244568,
-0.27224084734916687,
0.7646663188934326,
-0.08929651230573654,
0.20360812544822693,
0.3670509159564972,
0.375014066696167,
-0.1400935798883438,
0.04642326384782791,
-0.8562527298927307,
0.10848890990018845,
0.7674675583839417,
-0.19381950795650482,
-0.0032307554502040... | |
for changing an entire interface quickly. | [
-0.1375841498374939,
0.0037049190141260624,
0.06507303565740585,
0.5413891673088074,
0.05112823471426964,
0.08039963245391846,
0.027713308110833168,
-0.03600728511810303,
-0.3777434825897217,
-0.6350923776626587,
-0.13195431232452393,
0.4305763244628906,
0.22333423793315887,
-0.38894143700... | |
Basically, I have this code:
```
DirectoryInfo dir = new DirectoryInfo(@"\\MYNETWORK11\ABCDEFG\ABCDEFGHIJKL\00806\");
FileInfo[] files = dir.GetFiles("200810*");
```
I expect it to match any files starting with 200810. However, it's matching files named
*20070618\_00806.bak and 20070817\_00806.bak* (the stars aren... | [
-0.17734675109386444,
0.1984824687242508,
0.4504829943180084,
-0.17279431223869324,
-0.04118287190794945,
-0.22075708210468292,
0.26073452830314636,
0.21082355082035065,
-0.022054046392440796,
-0.6370917558670044,
0.11287911236286163,
0.8721694350242615,
-0.30411073565483093,
0.25758889317... | |
> "Because this method checks against
> file names with both the 8.3 file name
> format and the long file name format,
> a search pattern similar to "`*1*.txt`"
> may return unexpected file names. For
> example, using a search pattern of
> "`*1*.txt`" will return
> "`longfilename.txt`" because the
> equivalent ... | [
0.19175584614276886,
-0.24188144505023956,
0.24071474373340607,
-0.3941216766834259,
0.2516852915287018,
0.030110608786344528,
0.4254572093486786,
0.12086685001850128,
-0.30147120356559753,
-0.18119536340236664,
-0.4116758406162262,
0.36784419417381287,
-0.42675814032554626,
0.514428913593... | |
I want to rotate a `gluSphere` around a fixed point in a circular motion, like a planet going around the sun.
Would it be best to use glRotatef or glTranslate? If so, in which order should I call them?
You'll have to do a little of both:
* Make sure the `gluSphere` is "facing" the fixed point, so that translating for... | [
0.1338578760623932,
0.22386516630649567,
0.6192664504051208,
-0.04234877601265907,
-0.3886341154575348,
0.2264917492866516,
-0.2233794927597046,
0.033569201827049255,
-0.1960185468196869,
-0.7099704146385193,
-0.16079051792621613,
0.33315369486808777,
-0.19302259385585785,
0.31807202100753... | |
as you went forward
That way, your sphere stays the same distance from the center, but gets translated "around" in a nice orbit. | [
0.06816481053829193,
-0.3673381507396698,
0.6015892028808594,
-0.12682752311229706,
-0.4496546685695648,
-0.14929267764091492,
-0.20202220976352692,
0.15297679603099823,
-0.43881985545158386,
-0.45247429609298706,
0.2493196576833725,
-0.05675899237394333,
0.2424655258655548,
0.339671254158... | |
I feel like this might be a crazy question, and if anyone has a better idea of how to do it, by all means please let me know.
I have a .Net C# project at work that validates certain tables against the company standards they must adhere to. The tables can be on SQL Server or DB2. When a table is initially added to the... | [
0.5008962750434875,
0.243515282869339,
0.35284170508384705,
0.18336986005306244,
0.3207719326019287,
-0.20753014087677002,
-0.15322273969650269,
0.010216373950242996,
-0.258621484041214,
-0.6569162011146545,
-0.002223934279754758,
0.23220475018024445,
-0.08241895586252213,
0.06845397502183... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.