text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
I'm currently evaluating ivy, maven and buckminster to ease our build process. Conceptually buckminster seems the most advanced, but also to have quite a complexity.
I can't find so many first hand experiences to buckminster on the web, therefore my question to the Stackoverflow community.
We adopted buckminster for o... | [
0.40538814663887024,
-0.02931317314505577,
0.6541431546211243,
0.12177707999944687,
0.16182158887386322,
0.4035254418849945,
-0.025696981698274612,
-0.0822535902261734,
-0.19190678000450134,
-0.5717508792877197,
0.5754978656768799,
0.2693900763988495,
0.3548009693622589,
0.2595309913158417... | |
be* run off the metadata which we were writing already (manifest files, product files). It was just too easy to get the build and dev metadata out of synch.
* Building bundles and generating a product still is not easy to do by hand.
* New starters need to be up and running quickly. Two+ days to set up a dev environmen... | [
0.7740354537963867,
-0.13998691737651825,
0.061453137546777725,
0.0593513585627079,
-0.0949377790093422,
-0.03965570405125618,
0.32260662317276,
-0.2850918173789978,
0.17677104473114014,
-0.7325922846794128,
-0.007956668734550476,
0.7266908288002014,
-0.046894073486328125,
-0.0885648950934... | |
quite abstract.
However, buckminster absolutely *excelled* at solving the three problems detailed above.
Other additions:
* It can bootstrap itself, as in: it can check itself out, given a minimal core
* It seems to be under active development
* Support via the mailing list is terse, but generally helpful.
* It has... | [
0.33820363879203796,
0.2529289722442627,
0.26825186610221863,
0.0756235420703888,
0.23175744712352753,
-0.348699688911438,
0.4111405611038208,
-0.01953713782131672,
0.23494666814804077,
-0.49647367000579834,
-0.04828743636608124,
0.4782356023788452,
0.019527139142155647,
-0.144659042358398... | |
non-trivial and not easily made headless.
Overall, I would say that it took a while to bed in, but does an excellent job. I cannot compare it with Ivy or Maven, though Spring's adoption of OSGi may give critical mass in developer mindshare to Maven.
I have answered a [few questions](https://stackoverflow.com/search?q... | [
0.05080755800008774,
-0.11004910618066788,
0.22116640210151672,
0.06365185230970383,
0.04170304909348488,
0.06713184714317322,
-0.06397198885679245,
0.23126496374607086,
-0.15102054178714752,
-0.3484475612640381,
0.11492164433002472,
0.37168511748313904,
0.2928331196308136,
0.0517998151481... | |
I don't know if my mind is not working today or if this is actually harder than I think it should be.
I've got a DataGridView with a DataGridViewComboBoxColumn bound to a generic IList of CustomObjects. Here's a rough code sample of how I setup the column.
```
DataGridViewComboBoxColumn location = new DataGridViewCom... | [
0.0077316658571362495,
0.13515622913837433,
0.5917422771453857,
-0.07873179018497467,
0.18596148490905762,
0.00909060426056385,
0.0965295284986496,
-0.2961350977420807,
-0.31945279240608215,
-0.8790907859802246,
-0.03872707486152649,
0.5194187164306641,
-0.2187851518392563,
0.2774774432182... | |
want a reference to the actual Location object! I've tried not specifying a ValueMember but that appears to just use the DisplayMember.
I could iterate through all of the Location objects in the column DataSource and check for the matching ID property, however, it seems like the ComboBoxCell ought to be able to return... | [
0.16260603070259094,
0.12954726815223694,
0.5171226859092712,
0.3303416967391968,
0.3365296721458435,
0.19284293055534363,
-0.03498201444745064,
0.18399472534656525,
-0.18096914887428284,
-0.6436758637428284,
0.1400739997625351,
0.5730300545692444,
-0.07709510624408722,
0.21378223598003387... | |
having similar issues for a while with `ComboBox`es.
Something like the following ought to do the trick (off the top of my head and untested):
```
IList<KeyValuePair<String,MyObject>> comboData =
new IList<KeyValuePair<String,MyObject>>();
foreach(var o in GetMyLocations())
comboData.Add(new KeyValuePair<St... | [
-0.18806108832359314,
-0.37131452560424805,
0.7528533935546875,
-0.18041831254959106,
0.21509048342704773,
0.1305733621120453,
0.17340511083602905,
-0.37206417322158813,
-0.24253153800964355,
-0.9507215023040771,
-0.18559840321540833,
0.713440477848053,
-0.3279961943626404,
-0.021376168355... | |
[This question](https://stackoverflow.com/questions/352130/sql-reporting-services-restrict-export-formats) asks how to restrict for a whole server. I just want to do so for a single report. I found a code snippet but it doesn't provide any clues on how to implement:
```
foreach (RenderingExtension extension in this.r... | [
-0.08184802532196045,
-0.13798531889915466,
1.0302097797393799,
0.13313958048820496,
0.01611338183283806,
-0.14323964715003967,
0.4094650447368622,
-0.17776374518871307,
-0.1943449229001999,
-0.6026529669761658,
-0.31171733140945435,
0.5051997303962708,
-0.19633714854717255,
0.205191746354... | |
are, in the main, delighted with this product so wouldn't consider reinventing the wheel in order to implement a hack to produce what is, essentially a "would be nice" feature.
It still boggles the mind slightly that the report's available rendering options are not controllable at the report level. Ho hum.
Incidentall... | [
0.467576801776886,
0.23740723729133606,
0.21054203808307648,
0.10860681533813477,
0.07686346769332886,
-0.10653690993785858,
0.18780751526355743,
0.2941811680793762,
-0.2703242897987366,
-0.4245815873146057,
0.13415759801864624,
0.7014676332473755,
0.09366396069526672,
-0.07900737226009369... | |
idea than this within the next fortnight I'll mark this as the answer which basically sums up to:
You can only restrict functionality like this under certain conditions and by no means easily even when you do.
This seems like a clear failure in the wider fitness of SSRS for purpose as we have users who require Excel ... | [
0.10489489138126373,
-0.11950978636741638,
0.44044050574302673,
0.2435251772403717,
-0.05825994163751602,
-0.6145788431167603,
0.22943373024463654,
0.09838680177927017,
-0.19482660293579102,
-0.49934425950050354,
0.16283132135868073,
0.4091741740703583,
-0.2662982642650604,
0.2110766172409... | |
I'm new to C#, and am curious about best practice for using namespaces.
I have a solution that contains a single class library project, along with several, small console app projects. All the console app projects do is parse command-line arguments and call different classes within the library project. The library proj... | [
0.1486114263534546,
0.2943958044052124,
0.09225446730852127,
0.12011978030204773,
0.17202983796596527,
0.24115410447120667,
-0.05908826366066933,
0.1728387475013733,
0.04318411275744438,
-0.4396728277206421,
-0.17142082750797272,
0.37161311507225037,
-0.3259734511375427,
-0.005973548628389... | |
It is unnecessary. The only reason you would want to be using a namespace is if you are creating libraries for re-use in many programs. | [
0.35769256949424744,
0.284454345703125,
-0.2877339720726013,
0.38267821073532104,
0.08576202392578125,
-0.34864410758018494,
0.04180709272623062,
0.18369771540164948,
-0.2218497395515442,
-0.7468819618225098,
-0.07844842225313187,
0.29066821932792664,
-0.20568621158599854,
0.27098011970520... | |
Can someone give me 1 good reason why in C# the chained constructor is always called before any of the constructor body?
.NET allows you to call the chained constructor at any point within the constructor, so why does C# force you to do it before your constructor body executes?
I once wrote to Anders H and asked him ... | [
0.5123826861381531,
0.19249697029590607,
0.24853083491325378,
0.3118956983089447,
-0.2191128432750702,
-0.3094013035297394,
0.20783860981464386,
0.026091579347848892,
-0.3089970648288727,
-0.4651661515235901,
0.01548711583018303,
0.034413136541843414,
-0.31093841791152954,
-0.0026989073958... | |
I don't think there is a single good reason for this limitation, so hopefully I will be reeducated :-)
Just to clarify. The .NET CLR rule is that 1 constructor must be called, only 1 constructor, and only once. So in the CLR these are valid
```
public class Meh
{
public Meh()
{
Console.WriteLine("Meh()");
... | [
0.17912697792053223,
0.4043915867805481,
0.5893898606300354,
-0.10326126962900162,
0.34938520193099976,
-0.3525021970272064,
0.1910422295331955,
-0.058691296726465225,
0.019596943631768227,
-0.2713029086589813,
-0.37251222133636475,
0.7401672601699829,
-0.29427629709243774,
0.0717091783881... | |
by the CLR or other .NET languages. I can only conclude that the answer is one of those "Because it's always been this way" ones, and the restriction was probably just copied from C++ or something. | [
0.659018337726593,
0.10963202267885208,
0.21539250016212463,
0.05626658722758293,
-0.04568956419825554,
-0.6480960249900818,
0.0732669085264206,
0.390142560005188,
-0.3384901285171509,
0.195942223072052,
-0.28988203406333923,
0.26497793197631836,
-0.44300419092178345,
0.21305374801158905,
... | |
I have a file containing UNICODE-16 strings that I would like to read into a Linux program. The strings were written raw from Windows' internal WCHAR format. (Does Windows always use UTF-16? e.g. in Japanese versions)
I believe that I can read them using raw reads and the converting with wcstombs\_l. However, I cannot... | [
0.2924956679344177,
0.10220015048980713,
0.0413130447268486,
-0.002067841123789549,
-0.13233917951583862,
0.1409815102815628,
0.3219664990901947,
0.12240809202194214,
-0.18508514761924744,
-0.6132100820541382,
-0.1699897199869156,
0.2066941112279892,
-0.22811812162399292,
0.296216011047363... | |
do the conversion. I currently have it inside a class that makes the conversions into a one-line piece of code.
```
// Function for converting wchar_t* to char*. (Really: UTF-16LE --> UTF-8)
// It will allocate the space needed for dest. The caller is
// responsible for freeing the memory.
static int iwcstombs_alloc(c... | [
0.2024005651473999,
-0.041523635387420654,
0.6548561453819275,
-0.20174814760684967,
0.13458003103733063,
0.17844268679618835,
0.3499680459499359,
-0.5713189840316772,
-0.058541715145111084,
-0.7120628952980042,
-0.4890051484107971,
0.9187052845954895,
-0.3294079601764679,
0.21870589256286... | |
return(-1);
}
// How much space do we need?
// Guess that we need the same amount of space as used by src.
// TODO: There should be a while loop around this whole process
// that detects insufficient memory space and reallocates
// more space.
int len = sizeof(wchar_t) * (wcslen(src) + 1);
... | [
-0.00801042653620243,
-0.27404797077178955,
0.31848543882369995,
-0.06772927194833755,
0.19217684864997864,
0.2458881139755249,
0.3288390636444092,
-0.5761083364486694,
-0.4282475411891937,
-0.4675928056240082,
-0.40040454268455505,
0.6651586294174194,
-0.11253096908330917,
0.0612111240625... | |
NULL)
{
iconv_close(cd);
return -1;
}
// Convert
size_t inBufBytesLeft = len;
char *inBuf = (char *)src;
size_t outBufBytesLeft = destLen;
char *outBuf = (char *)*dest;
int rc = iconv(cd,
&inBuf,
&inBufBytesLeft,
&outBuf, | [
0.08729860186576843,
-0.18820416927337646,
0.6095471978187561,
-0.41449958086013794,
-0.06315269321203232,
0.38640832901000977,
0.5123177766799927,
-0.522430956363678,
-0.42166629433631897,
-0.23157039284706116,
-0.3485935628414154,
0.7254534959793091,
-0.4091552495956421,
0.13603243231773... | |
&outBufBytesLeft);
if (rc == -1)
{
printf("iconv() failed: %s\n", strerror(errno));
iconv_close(cd);
free(*dest);
*dest = NULL;
return -1;
}
iconv_close(cd);
return 0;
} // iwcstombs_alloc()
```
> (Does Windows always use UTF-16? e.g. in Japanese versions)
Yes, NT's WCHAR is always UTF... | [
0.08077525347471237,
0.004957634024322033,
0.8440276384353638,
-0.33775562047958374,
-0.12927424907684326,
-0.1297919899225235,
0.5119384527206421,
-0.40275830030441284,
-0.23738612234592438,
-0.41179296374320984,
-0.31830036640167236,
0.7993884086608887,
-0.43898385763168335,
0.3492451608... | |
guaranteed to be 16 bits and on Linux it won't be, UTF-32 (UCS-4) is used. So wcstombs\_l is unlikely to be happy.
The Right Thing would be to use a library like iconv to read it in to whichever format you are using internally - presumably wchar\_t. You *could* try to hack it yourself by poking bytes in, but you'd pro... | [
0.08287754654884338,
-0.007460996974259615,
0.18091845512390137,
-0.12146709859371185,
0.012445568107068539,
-0.056264329701662064,
0.32447710633277893,
0.30366748571395874,
-0.26115044951438904,
-0.6185721158981323,
-0.2295977622270584,
0.5006760954856873,
-0.5252488851547241,
0.213679775... | |
Suppose I have a variable "counter", and there are several threads accessing and setting the value of "counter" by using Interlocked, i.e.:
```
int value = Interlocked.Increment(ref counter);
```
and
```
int value = Interlocked.Decrement(ref counter);
```
Can I assume that, the change made by Interlocked will be ... | [
0.2192956507205963,
0.01101649645715952,
0.29864710569381714,
-0.08087348937988281,
0.16106651723384857,
0.058781083673238754,
0.21889911592006683,
-0.15611745417118073,
-0.3065376579761505,
-0.4203915596008301,
0.10200634598731995,
0.47381094098091125,
-0.38972508907318115,
0.387171655893... | |
a ref or out parameter".
InterlockedIncrement/Decrement on x86 CPUs (x86's lock add/dec) are automatically creating *memory barrier* which gives visibility to all threads (i.e., all threads can see its update as in-order, like sequential memory consistency). Memory barrier makes all pending memory loads/stores to be co... | [
-0.23994119465351105,
0.14507511258125305,
0.3278578817844391,
-0.14593148231506348,
-0.24892012774944305,
0.012012389488518238,
0.18493787944316864,
-0.20834925770759583,
-0.39700937271118164,
-0.35203173756599426,
-0.03721128776669502,
0.616766095161438,
-0.3286643326282501,
0.2801055610... | |
I'm using Linq2Entity for most of my database operations. However for database creation, table creation and initial data insertion I use plain SQL files. Therefore I need both an SqlConnection and an EntityConnection. Unfortunately the Entity Framework starts complaining that the Sql Server is not listening on the othe... | [
0.04101691395044327,
0.3166537582874298,
0.4401579797267914,
-0.0841749906539917,
0.22127659618854523,
0.0019290955970063806,
0.10263548046350479,
-0.14722391963005066,
0.020719880238175392,
-0.65237957239151,
0.3326713442802429,
0.484562486410141,
-0.34425973892211914,
0.34500038623809814... | |
EntityConnection for database maintenance purposes but I'm running into troubles. I can't use the EntityConnection to create databases and drop databases. The following syntax is unsupported for an EntityConnection but works fine for an SqlConnection to ms SQL express.
```
CREATE DATABASE silverfit ON ( NAME = silverf... | [
0.006704292260110378,
0.16545650362968445,
0.4579296112060547,
0.08363144099712372,
0.0771937146782875,
-0.1566135436296463,
0.3029681146144867,
0.09149195998907089,
-0.1333337426185608,
-0.5416651368141174,
0.20141397416591644,
0.409254789352417,
-0.5922921299934387,
0.2441622018814087,
... | |
a SqlConnection which you then pass to the constructor for your EntityConnection? One of the overloads for EntityConnection takes a MetadataWorkspace and a DbConnection (from which SqlConnection derives.) The slight drawback of this is that you must create your MetadataWorkspace manually, which gathers up the .csdl, .s... | [
0.04646660387516022,
-0.04316436126828194,
0.3496537506580353,
0.4377810060977936,
0.007566769141703844,
-0.4157232344150543,
0.012229351326823235,
-0.16254854202270508,
-0.022050252184271812,
-0.598831832408905,
-0.07112286984920502,
0.31661298871040344,
-0.35101717710494995,
0.3839130699... | |
I use Hudson to automate the testing of a very large important product. I want to have my testing-hosts able to run as many concurrent builds as they will theoretically support with the exception of excel-tests which must only run one per machine at any time. Any number of non-excel tests can run concurrently, however ... | [
0.4701833724975586,
0.3086337149143219,
-0.42219674587249756,
0.05945530906319618,
0.20199845731258392,
0.3381000757217407,
0.14534999430179596,
-0.14918626844882965,
0.033836085349321365,
-0.450145423412323,
0.40609756112098694,
0.6572425961494446,
-0.018706804141402245,
0.057717010378837... | |
which have been implemented in Excel.
You might think it crazy to implement a test in Excel - actually there's an important reason: Most of our users access our system via a Excel. Excel has it's own quirky ways of handling data so the only way to guarantee that our stuff works for Excel users is to literally impleme... | [
0.8163442015647888,
0.3194713592529297,
0.03285260125994682,
0.39577996730804443,
-0.10128670185804367,
0.0441788025200367,
0.042003873735666275,
-0.45261743664741516,
0.12955300509929657,
-0.41298696398735046,
0.09520558267831802,
0.4874245226383209,
-0.06082041934132576,
-0.1364134252071... | |
30 groups which need to be run for an end-to-end test. My tool converts the result of each of the tests into JUnit style XML which Hudson is able to understand. The tests use the pywin32com library to automate excel. When run on their own they are reliable.
I've got a group of computers which are dedicated to running... | [
0.26515838503837585,
0.014127600006759167,
-0.0026254907716065645,
0.2785555422306061,
-0.02603522129356861,
0.2553924024105072,
0.07839560508728027,
-0.36288946866989136,
0.07230357080698013,
-0.5859888792037964,
0.06031036004424095,
0.5639004707336426,
-0.19607947766780853,
-0.3563955128... | |
a 2nd build stars which tries to talk to Excel via COM it might interfere with the one which is already running and cause both tests to fail.
I can run as many other non-excel processes as the machine will allow but I need to find a way so that Hudson does not attempt to launch any more than 1 process which requires ... | [
-0.29267817735671997,
-0.013931876048445702,
0.2067023068666458,
0.04811942204833031,
0.06323869526386261,
0.10427241027355194,
0.3420904874801636,
-0.39244112372398376,
0.0821874737739563,
-0.6073561310768127,
0.3864953815937042,
0.7912561297416687,
-0.194975346326828,
-0.2513095140457153... | |
To validate data I am receiving I need to make sure that the length is not going to exceeded a database column length. Now all the length information is stored in the Hibernate mapping files, is there anyway to access this information programmatically?
You can get to it but it's not easy. You might want to do something... | [
0.33744266629219055,
-0.028879541903734207,
0.5342969298362732,
0.0781676322221756,
-0.19096429646015167,
-0.16390150785446167,
0.09700141847133636,
-0.42861106991767883,
-0.060605231672525406,
-0.4764231741428375,
0.14680548012256622,
0.6891032457351685,
-0.12115556746721268,
0.0484415292... | |
iter=configuration.getClassMappings(); iter.hasNext();) {
PersistentClass persistentClass = (PersistentClass)iter.next();
for (Iterator iter2=persistentClass.getPropertyIterator(); iter2.hasNext();) {
Property property = (Property)iter2.next();
String class = persistentClass.getClassName();
... | [
-0.38982751965522766,
-0.41454240679740906,
0.6287598013877869,
-0.1700187772512436,
0.2771254777908325,
0.26206085085868835,
0.25898483395576477,
-0.6173871159553528,
-0.6323879361152649,
-0.5188344717025757,
-0.48703446984291077,
0.756456732749939,
-0.10359886288642883,
0.525282323360443... | |
I've got a legacy application which is implemented in a number of Excel workbooks. It's not something that I have the authority to re-implement, however another application that I do maintain does need to be able to call functions in the Excel workbook.
It's been given a python interface using the Win32Com library. O... | [
0.22484111785888672,
0.216367706656456,
0.12874464690685272,
-0.22036246955394745,
0.06831932812929153,
0.12162220478057861,
-0.06378202885389328,
0.09999699890613556,
-0.3500024378299713,
-0.575164258480072,
0.17092934250831604,
0.5417525172233582,
-0.20670731365680695,
0.4050497114658355... | |
Excel at a time on the computer. If I were to try to run more than one instance of excel there would be no way of ensuring that the python layer is bound to a specific Excel instance.
I'd like to be able to run more than 1 of my excel applications on my Windows server concurrently. Is there a way to do this? For exam... | [
0.3757849335670471,
0.27036017179489136,
-0.04297824949026108,
0.036089301109313965,
-0.15085938572883606,
0.018060825765132904,
0.17063473165035248,
0.10675245523452759,
-0.28573647141456604,
-0.6867128014564514,
0.3087526261806488,
0.5678592324256897,
-0.3499111533164978,
-0.032974649220... | |
Excel is not a Single-Instance application, so you should be able to create as many instances of Excel as memory permits.
Using C# you can create multiple Excel Application instances via:
```
Excel.Application xlApp1 = new Excel.Application();
Excel.Application xlApp2 = new Excel.Application();
Excel.Application xlAp... | [
-0.04663526266813278,
0.3473336398601532,
0.6102028489112854,
-0.2113637775182724,
-0.4780888855457306,
0.037211693823337555,
0.16933637857437134,
-0.4369370639324188,
-0.11597151309251785,
-0.5283511877059937,
-0.20407025516033173,
0.548346996307373,
-0.5031608939170837,
-0.12545843422412... | |
I can't imagine?) then I would think that it's very do-able.
That said, the idea of having multiple instances of Excel acting as some kind of server for other operations sounds pretty dicy... I'd be careful to test what you are doing, especially with respect to how many instances you can have open at once without runn... | [
0.29288482666015625,
0.2044925093650818,
-0.10067497193813324,
0.3307437598705292,
-0.08192534744739532,
-0.1447686105966568,
0.19206155836582184,
0.12008348852396011,
-0.3149171769618988,
-0.34777963161468506,
0.03864426538348198,
0.4095359146595001,
-0.035932499915361404,
0.1753452420234... | |
I have an application in need of some caching, and for some of the semi-static data, I want them to stay in the cache a maximum amount of time (for instance 10 minutes) before being refreshed. My system merely retrieves data, never updates it, so I have no idea of when to flush the cache using the property. In the OSCa... | [
0.319803386926651,
0.06042424961924553,
0.4636811316013336,
0.0069215428084135056,
0.48583510518074036,
-0.21677091717720032,
0.3009338080883026,
-0.028987038880586624,
-0.22223292291164398,
-0.5740052461624146,
-0.17424015700817108,
0.5096201300621033,
0.2107241153717041,
0.03477542102336... | |
answer is hidden in ehcache's own configuration file. By setting the property "timeToLiveSeconds" to for instance "600", the element in the cache will expire after ten minutes. | [
0.11971482634544373,
-0.0465940460562706,
0.6054556369781494,
0.2223852276802063,
0.6462081670761108,
-0.19034726917743683,
0.10980688780546188,
-0.10938701778650284,
0.12220221757888794,
-0.3774481415748596,
-0.31519195437431335,
0.2059299498796463,
0.2750425934791565,
0.2622276246547699,... | |
I have an IIS7 web application which primarily serves web service requests. As part of our solution we have two web servers and a load balancer, and the load balancer requests a page from each of its load balanced boxes periodically. The page the load balancer loads is named "Health.aspx", it does *not* have a code beh... | [
0.3924398422241211,
0.26536911725997925,
0.5408763885498047,
0.004896136932075024,
0.25887709856033325,
0.0808759555220604,
0.2746047079563141,
0.1257183849811554,
-0.256348192691803,
-0.7384904026985168,
0.20594199001789093,
0.4819689393043518,
0.059644464403390884,
0.10421118885278702,
... | |
there are potentially a number of things which could be causing a problem here I wanted to start at the web boxes themselves and determine whether a nearly empty \*.aspx page with no code behind could cause periodic problems.
Turns out that the problem was just the sheer number of requests and an untimely response time... | [
0.2410207837820053,
-0.10019432008266449,
0.5217438340187073,
0.34568172693252563,
-0.06516927480697632,
0.07186466455459595,
0.5739707946777344,
-0.07152392715215683,
-0.4084336459636688,
-0.6116956472396851,
0.2783398926258087,
0.4836345613002777,
-0.016653548926115036,
0.091766774654388... | |
- based on carefully testing our hardware against load for our particular application - solved the problem. | [
-0.11623874306678772,
0.3329075276851654,
0.055860430002212524,
0.3637927174568176,
0.09861832857131958,
0.23853842914104462,
-0.10324876010417938,
-0.1804576963186264,
0.15443982183933258,
-0.04781075567007065,
0.002298202831298113,
0.3855690360069275,
0.08407147228717804,
-0.049427982419... | |
I'm trying to find out some matrix multiplication/inversion benchmarks online. My C++ implementation can currently invert a 100 x 100 matrix in 38 seconds, but compared to [this](http://www.google.com/url?sa=t&source=web&ct=res&cd=3&url=http%3A%2F%2Fwww.bluebit.gr%2Fmatrix%2Fbenchmarks.htm&ei=QyWLSdHaNoz40QWsl4ihBw&usg... | [
-0.06354999542236328,
0.02586909383535385,
0.6082894206047058,
-0.05619775503873825,
-0.10358577221632004,
0.18007060885429382,
0.5595648884773254,
-0.1821051388978958,
-0.5720159411430359,
-0.35750412940979004,
0.10043768584728241,
0.28144708275794983,
0.06376676261425018,
0.0670687630772... | |
seconds. It's still a lot of time, and any idea is welcome.
Thank you folks
This sort of operation is extremely cache sensitive. You want to be doing most of your work on variables that are in your L1 & L2 cache. Check out section 6 of this doc:
<http://people.redhat.com/drepper/cpumemory.pdf>
He walks you through o... | [
0.3974030911922455,
-0.09407979995012283,
-0.07079143822193146,
0.35707390308380127,
0.15221302211284637,
0.19036203622817993,
0.025032173842191696,
-0.02072928100824356,
-0.11329073458909988,
-0.6475725769996643,
0.024450771510601044,
0.38786718249320984,
-0.03563217446208,
0.022783491760... | |
Here's the proxy method that was created for the web service I'm trying to access. How would I go about modifying it to get the raw XML from the web service call?
```
/// <remarks/>
[System.Web.Services.Protocols.SoapHeaderAttribute("CallOptionsValue")]
[System.Web.Services.Protocols.SoapHeaderAttribut... | [
-0.23785950243473053,
0.0813225656747818,
0.7186141014099121,
0.06505466997623444,
0.030519923195242882,
0.06166226416826248,
0.2772035002708435,
-0.4757065773010254,
-0.140801802277565,
-0.38153454661369324,
-0.16088341176509857,
0.4362906813621521,
-0.10623237490653992,
0.222280189394950... | |
new object[] {
queryString});
return ((QueryResult)(results[0]));
}
```
Thanks for your help!
Fortunately there is a nice way to do it, just modify the generated proxy class so it inherits from different base. The alternative implementation comes from Web Services Enhancements 3.0 pack... | [
-0.20553842186927795,
-0.1709691286087036,
0.7694053053855896,
0.10009951889514923,
0.09042417258024216,
-0.15162082016468048,
0.21918347477912903,
-0.27184268832206726,
-0.35460132360458374,
-0.9127468466758728,
-0.13357891142368317,
0.5291922092437744,
-0.15917038917541504,
0.29286998510... | |
I found the following behavior at least *weird*:
```
def errors():
try:
ErrorErrorError
finally:
return 10
print errors()
# prints: 10
# It should raise: NameError: name 'ErrorErrorError' is not defined
```
The exception disappears when you use `return` inside a `finally` clause. Is that a b... | [
0.28729841113090515,
0.5360119342803955,
0.10158083587884903,
-0.033494703471660614,
0.010334664024412632,
-0.11547129601240158,
0.3210233747959137,
0.26998236775398254,
-0.5042767524719238,
-0.30224549770355225,
0.005487374030053616,
0.49018633365631104,
-0.3340059220790863,
0.13413912057... | |
no other behavior makes sense. A function can either return a value, or it can raise an exception; it can't do both. The purpose of a "finally" clause is to provide cleanup code that is "guaranteed" to be run, regardless of exceptions. By putting a return statement in a finally clause, you have declared that you want t... | [
0.16327960789203644,
-0.4318969249725342,
0.008797365240752697,
0.027084676548838615,
0.10580304265022278,
-0.16055747866630554,
0.4673730731010437,
0.060035426169633865,
-0.3979963958263397,
-0.1600630134344101,
-0.5925979614257812,
0.5622394680976868,
-0.5069483518600464,
-0.141895025968... | |
return). | [
-0.5442960858345032,
-0.24923358857631683,
0.44064024090766907,
0.018614230677485466,
0.04836789518594742,
0.4975355863571167,
0.12388671934604645,
-0.36682233214378357,
-0.02345641888678074,
-0.28522005677223206,
-0.5017150640487671,
0.4825802147388458,
-0.08598433434963226,
0.26247867941... | |
I have a another ASP.Net web project that I am working and I have approached error handling from different angles. I was just wondering if any seasoned and experienced developers out there had any recommendations.
Bonus points for discussions on a nice logging framework for ASP.net:)
I've used the ELMAH, (Error Loggin... | [
0.5874351859092712,
0.17197462916374207,
-0.1312127411365509,
0.027323029935359955,
-0.18620876967906952,
-0.2365630865097046,
0.46756646037101746,
-0.04703685641288757,
-0.16598951816558838,
-0.7023759484291077,
0.31621053814888,
0.651884913444519,
-0.13089224696159363,
-0.177195236086845... | |
I was going through a few queries I am maintaining, and a programmer had put in the queries "where 1=1" to me that always seems to evaluate to true.
Are there benefits to this?
**Duplicate:** [Why would someone use WHERE 1=1 AND in a SQL clause?](https://stackoverflow.com/questions/242822/why-would-someone-use-where-... | [
0.22870849072933197,
0.3441309928894043,
0.01684434339404106,
0.07183074951171875,
0.15145738422870636,
-0.10112767666578293,
0.15240970253944397,
-0.12129540741443634,
-0.3493609130382538,
-0.35866791009902954,
0.0075740693137049675,
0.2604474127292633,
-0.22117577493190765,
0.16943037509... | |
is unnecessary.
Was it dynamic queries? Sometimes that's helpful when building dynamic queries based on parameters that are optional. | [
-0.008496848866343498,
-0.06996913999319077,
-0.1553930640220642,
0.42399993538856506,
-0.16163630783557892,
0.09469775855541229,
0.08808008581399918,
0.12043138593435287,
-0.38580411672592163,
-0.2845819592475891,
0.19873063266277313,
0.5501688122749329,
-0.28438398241996765,
-0.144577071... | |
I am trying to build a Lisp grammar. Easy, right? Apparently not.
I present these inputs and receive errors...
```
( 1 1)
23 23 23
ui ui
```
This is the grammar...
```
%%
sexpr: atom {printf("matched sexpr\n");}
| list
;
list: '(' members ')' {printf("matched list\n");}
| '('')' ... | [
0.013669800944626331,
0.12998491525650024,
0.30698060989379883,
-0.18476292490959167,
-0.3963352143764496,
-0.05701560527086258,
0.5216982960700989,
-0.18890371918678284,
-0.0009534322307445109,
-0.4853582978248596,
-0.24155840277671814,
0.4660758376121521,
-0.9009138345718384,
-0.28095623... | |
{printf("members 1\n");}
| sexpr members {printf("members 2\n");}
;
atom: ID {printf("ID\n");}
| NUM {printf("NUM\n");}
| STR {printf("STR\n");} | [
0.005952708888798952,
-0.009365487843751907,
-0.028114240616559982,
-0.10930932313203812,
-0.10283123701810837,
-0.005010335240513086,
0.06198369339108467,
-0.3223818838596344,
-0.23907294869422913,
-0.3046107292175293,
-0.14242441952228546,
0.16695338487625122,
-0.5075274109840393,
0.1039... | |
;
%%
```
As near as I can tell, I need a single non-terminal defined as a program, upon which the whole parse tree can hang. But I tried it and it didn't seem to work.
edit - this was my "top terminal" approach:
```
program: slist;
slist: slist sexpr | sexpr;
```
But it allows problems such as:
```
( 1 1
```... | [
-0.04377928376197815,
0.003812605980783701,
0.4263927936553955,
-0.28080299496650696,
-0.23878121376037598,
0.3645596504211426,
0.24836209416389465,
-0.0514766126871109,
-0.09738069027662277,
-0.3773587942123413,
-0.08152138441801071,
0.5232014060020447,
-0.4505086839199066,
0.040851984173... | |
{ linenumber++; }
[0-9]+ { yylval = atoi(yytext); return NUM; }
\"[^\"\n]*\" { return STR; }
[a-zA-Z][a-zA-Z0-9]* { return ID; }
.
%%
```
An example of the over-matching...
```
(1 1 1)
NUM
matched sexpr
NUM
matched sexpr
NUM
matched sexpr
(1 1
NUM
matched sexpr
NUM
matched sex... | [
0.272817462682724,
-0.2795637845993042,
0.6011155247688293,
-0.318685382604599,
-0.11708985269069672,
0.34303393959999084,
0.17181454598903656,
-0.48338764905929565,
0.0711778849363327,
-0.41017091274261475,
0.029612625017762184,
0.6082156300544739,
-0.10716287046670914,
-0.044531181454658... | |
lexer, and don't show up as parentheses in the parser.
Add rules like
```
\) { return RPAREN; }
\( { return LPAREN; }
```
to the lexer and change all occurences of '(', ')' to LPAREN and RPAREN respectively in the parser. (also, you need to #define LPAREN and RPAREN where you define your token list)
Note: ... | [
-0.15062478184700012,
-0.17644381523132324,
0.31822094321250916,
-0.17012736201286316,
-0.02887481078505516,
0.15799221396446228,
0.020439039915800095,
-0.2580975592136383,
-0.047178950160741806,
-0.06135500594973564,
-0.2074379026889801,
0.8085498809814453,
-0.3429136872291565,
-0.2458381... | |
I'm sort of a biztalk newbie and we run 2006 here with plans to migrate to 2006 R2 in the future. I have a schema that I need to work with called Siri, which is public at:
~~[link text](http://www.kizoom.com/standards/siri/schema/1.0/siri-1.0.zip)~~ or ~~[link text](http://www.kizoom.com/standards/siri/schema/1.0/siri... | [
0.08109387755393982,
-0.040807537734508514,
0.5500645637512207,
-0.14208804070949554,
-0.49103790521621704,
0.15593118965625763,
0.3702031373977661,
0.12451376765966415,
-0.23674169182777405,
-0.7777953743934631,
0.17282196879386902,
0.0957242026925087,
-0.3576129972934723,
0.1936186254024... | |
then insert this data into a database table. After working with the schema in Biztalk I'm finding it difficult to promote elements in order to filter and create/work with mappings (haven't really got that far yet).
Can anyone point me in the right direction in some documentation/websites or basically how I should appr... | [
0.172826886177063,
0.013439789414405823,
-0.03319406881928444,
0.06366494297981262,
-0.31385716795921326,
-0.12893052399158478,
-0.030116846784949303,
-0.1672629863023758,
-0.126132071018219,
-0.4732663631439209,
0.13899767398834229,
0.3522140681743622,
-0.1364796757698059,
-0.184697210788... | |
error is really in the lexer. Your parentheses end up as the last "." in the lexer, and don't show up as parentheses in the parser.
Add rules like
```
\) { return RPAREN; }
\( { return LPAREN; }
```
to the lexer and change all occurences of '(', ')' to LPAREN and RPAREN respectively in the parser. (also, yo... | [
-0.11494896560907364,
0.115558922290802,
0.13064055144786835,
-0.2296721488237381,
0.19043798744678497,
0.2067531794309616,
0.4016871750354767,
-0.08194290101528168,
0.04126368463039398,
-0.25731781125068665,
0.01880890689790249,
0.9243809580802917,
-0.2831524908542633,
-0.2273943722248077... | |
I'm really anal about what I name my classes, and I need an adjective for both something that is only allowed to happen once, as well as something that is allowed to happen multiple times.
examples:
* *wordthatmeansitcanonlyhappenonce*Trigger
* *wordthatmeansitcanhappenmultipletimes*Trigger
OneShotTrigger and Recurri... | [
0.1344933807849884,
-0.043769754469394684,
0.20222686231136322,
0.011469507589936256,
-0.30130958557128906,
0.000189638085430488,
0.5415794849395752,
0.24178896844387054,
-0.3136160969734192,
-0.4428938925266266,
-0.015452000312507153,
0.28301191329956055,
0.054754745215177536,
0.093089595... | |
I'm creating a win service that monitors ftp logs, when a file has been uploaded I want to start an external application, like a powershell script, to do stuff with the file. my Question is do i want to spin this off into another thread when i do it or should I just wait until it finishes before moving on.
This proce... | [
0.6994689702987671,
0.010787834413349628,
0.17791970074176788,
0.19033092260360718,
0.19224676489830017,
-0.20517218112945557,
-0.05416923761367798,
0.20108811557292938,
-0.3045510947704315,
-0.6699867844581604,
0.3196166157722473,
0.39344149827957153,
-0.23815295100212097,
0.4697860181331... | |
of too much tinfoil in my hat.
Well, code it in a modular fashion and don't worry about threads. If, down the road, you find that your application will benefit from a multi-threaded approach then address it then. If you have build your components orthogonally then the threading part will fit more naturally.
Addressing... | [
0.7170606255531311,
0.35558658838272095,
0.14920607209205627,
0.05244443938136101,
-0.19842664897441864,
0.02552575059235096,
0.26833635568618774,
-0.12138117849826813,
-0.1957470029592514,
-0.6983391642570496,
0.17330434918403625,
0.5377062559127808,
-0.2659798562526703,
0.118291504681110... | |
with the potential for use by multiple threads - this is a defensive and intelligent practice in all applications. What I meant was don't worry so much about how the application will handle threads and how to set up the thread management of the application first. | [
0.5489562153816223,
-0.0017416237387806177,
0.003998864442110062,
-0.014403019100427628,
0.07440093904733658,
-0.18230316042900085,
0.339100182056427,
0.1110336184501648,
-0.4139310121536255,
-0.4429512917995453,
0.20185035467147827,
0.47619393467903137,
-0.2978498935699463,
-0.01249620504... | |
I have been tasked to write a device driver for an embedded device which will communicate with the micro controller via the SPI interface. Eventually, the USB interface will be used to download updated code externally and used during the verification phase.
My question is, does anyone know of a good reference design o... | [
0.3707377016544342,
0.2748371660709381,
0.6154224872589111,
0.152069553732872,
0.14074401557445526,
-0.20912384986877441,
-0.2320154756307602,
-0.01253689918667078,
-0.061438728123903275,
-0.6427605748176575,
0.18455131351947784,
0.7224282026290894,
0.11022573709487915,
-0.0045409542508423... | |
am using is a Freescale 9S12.
Mark
Based upon goldenmean's (-AD) comments I wanted to add the following info:
1) The embedded device uses a custom executive and makes no use of a COTS or RTOS.
2) The device will use interrupts to indicate data is ready to be retrieved from the device.
3) I have read through some... | [
0.2490978240966797,
0.4921775460243225,
0.519355833530426,
-0.04873236268758774,
0.29312747716903687,
-0.3554926812648773,
-0.14758063852787018,
-0.2484896034002304,
0.05074132978916168,
-0.46501070261001587,
-0.21346621215343475,
0.6526910662651062,
-0.11396688222885132,
0.105329811573028... | |
driver for the USB device then a USB protocol layer (I/O) would reside on top of the device driver to interpret the data. I would assume this would be the best approach, though I could be wrong.
Edit - A year later
I just wanted to share a few items before they vanish from my mind in case I never work on a USB device... | [
0.06762862950563431,
0.16198965907096863,
0.3817509114742279,
0.17545448243618011,
-0.24307358264923096,
-0.11295612156391144,
-0.06957908719778061,
0.037576958537101746,
-0.0721224769949913,
-0.6542466282844543,
0.5097171664237976,
0.7221022844314575,
-0.3918958008289337,
0.24424007534980... | |
in my case) was the host issues a Reset request. The USB device would reset and clear the interrupt enable flags. I didn't read the literature enough to know this was happening, thus I was never receiving the Set-Up Request Interrupt. It took me quite a while to figure this out.
The second problem I ran into was not h... | [
0.07354846596717834,
0.04479724168777466,
0.32900890707969666,
0.12872053682804108,
0.22972995042800903,
-0.14386993646621704,
0.302055686712265,
-0.03896644338965416,
-0.14838816225528717,
-0.33909913897514343,
-0.11061412841081619,
0.8054585456848145,
-0.744942843914032,
0.18981249630451... | |
a hardware USB protocol analyzer.
There were other issues that I ran into, but these were the two biggest ones that took me quite a while to figure out. The other issue I had to worry about is big-endian and little-endian, Freescale 9S12 vs USB data format (Intel), respectively.
I ended up building the USB device dr... | [
0.19214829802513123,
0.14175140857696533,
0.44510364532470703,
0.15286165475845337,
-0.1677151322364807,
-0.14134040474891663,
-0.26219478249549866,
-0.033421121537685394,
-0.17852358520030975,
-0.4664272665977478,
0.2651541531085968,
0.6860471963882446,
-0.31863874197006226,
0.37115445733... | |
MAX3420\_SETUP\_DATA\_AVAIL\_INT\_REQR 0x20), but I like them since it makes the code more readable for me. If anyone has questions regarding it please feel free to e-mail and I can try to give some insight to it. The book "USB Complete: The Developer's Guide" was helpful, so long as you knew what areas to concentrate ... | [
0.2931714653968811,
0.06630995124578476,
0.30109894275665283,
0.11966599524021149,
-0.2859925925731659,
-0.17644143104553223,
0.0060334051959216595,
-0.48859676718711853,
-0.19466625154018402,
-0.45997148752212524,
0.04395239055156708,
0.5505260229110718,
-0.117512546479702,
-0.09111960232... | |
project development, such as hardware design, device firmware, and host application software. | [
0.43607908487319946,
0.2749726474285126,
-0.26002776622772217,
0.2935048043727875,
0.3566717505455017,
0.18049542605876923,
-0.3520909547805786,
0.10689103603363037,
-0.13422150909900665,
-0.8097929954528809,
-0.7845459580421448,
0.5600619316101074,
0.27122586965560913,
0.17320844531059265... | |
I need a quick way to find out if a given port is open with Ruby. I currently am fiddling around with this:
```
require 'socket'
def is_port_open?(ip, port)
begin
TCPSocket.new(ip, port)
rescue Errno::ECONNREFUSED
return false
end
return true
end
```
It works great if the port is open, but the downs... | [
0.31464728713035583,
-0.0023479291703552008,
0.47066953778266907,
-0.07619331777095795,
0.06513845920562744,
-0.27289295196533203,
0.8739737868309021,
-0.24886897206306458,
-0.13708269596099854,
-0.7172579765319824,
-0.0995965525507927,
0.789594829082489,
-0.0877164751291275,
0.14112968742... | |
`false` if we get nothing back by then) or is there a better way to check if a given port is open on a given host?
**Edit:** Calling bash code is acceptable also as long as it works cross-platform (e.g., Mac OS X, \*nix, and Cygwin), although I do prefer Ruby code.
Something like the following might work:
```
require... | [
0.4184896647930145,
0.26846563816070557,
0.26008304953575134,
-0.2887265384197235,
-0.05303694307804108,
-0.43889254331588745,
0.7632638216018677,
-0.4431653618812561,
-0.0632629469037056,
-0.6571402549743652,
-0.2577405869960785,
0.8194121718406677,
-0.14568443596363068,
0.138719365000724... | |
true
rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH
return false
end
end
rescue Timeout::Error
end
return false
end
``` | [
-0.24790605902671814,
0.14847977459430695,
0.7422888875007629,
-0.10846809297800064,
0.23753994703292847,
0.20387138426303864,
0.8167076110839844,
-0.6610838174819946,
0.1187179684638977,
-0.37546202540397644,
-0.5167530179023743,
1.18593430519104,
-0.15332455933094025,
-0.3789877593517303... | |
im having trouble with the result of a webservice call. When the result comes in and kicks off the resultHandler function i set a break point so i can examine the result. I can see that there are 0 records in the array collection however i can see content so im assuming that the zero is just referring to the first inde... | [
-0.08771131932735443,
-0.06201126426458359,
0.2799762189388275,
-0.15854473412036896,
0.004732852801680565,
-0.2326686531305313,
0.32206156849861145,
-0.3869113326072693,
-0.2800782322883606,
-0.26743972301483154,
-0.18107807636260986,
0.689778208732605,
-0.3955628573894501,
0.186790540814... | |
value of null. Can anyone explain what could be happening here? thanks a lot
another thing i just noticed is that the result type is mx.utils.ObjectProxy, im expecting an array
Chetan is right -- the cast operation to ArrayCollection is failing, because the source object is not an ArrayCollection. Try this instead:
`... | [
0.2159135937690735,
-0.14102807641029358,
0.15575121343135834,
-0.17701829969882965,
-0.18956510722637177,
0.08923232555389404,
0.36823081970214844,
-0.4282245635986328,
-0.27307987213134766,
-0.29840701818466187,
-0.2579863965511322,
0.5025383830070496,
-0.38859546184539795,
0.29274919629... | |
(by surrounding it with `[]`), your ArrayCollection will be constructed properly, and you'll be able to retrieve the object normally:
```
var o:Object = ac.getItemAt(0) as Object;
trace(o.yourObjectProperty.toString());
```
Hope it helps! | [
-0.05039208382368088,
-0.10370541363954544,
0.5479055643081665,
-0.14491622149944305,
0.61087965965271,
-0.09976381808519363,
0.3757684528827667,
-0.20065808296203613,
-0.16740277409553528,
-0.4615967869758606,
-0.4014107286930084,
0.6427172422409058,
-0.13318078219890594,
-0.1643049418926... | |
Our clients sometimes don't get the emails that we send out. It's a BIG loss. How do I assure that they receive the emails so that if it's not received in the other end, the program can resend it or do something about it.
None of the suggestions above will work 100% of the time. Many email clients will (rightly so) ref... | [
0.8212239742279053,
0.277509868144989,
0.4807112514972687,
0.34164801239967346,
0.07831300050020218,
-0.26642003655433655,
0.35198062658309937,
0.22127705812454224,
-0.23173703253269196,
-0.3517627716064453,
0.10987216234207153,
0.4621637761592865,
-0.18994122743606567,
0.04359870776534080... | |
Or possibly an over-aggressive spam filter ate your message, so it arrived but was never seen by the end user. Plus there is the little matter of mail taking hours or days to reach the end user or bounce, and how do you correlate these late notifications or bounces with the mail you sent 4 days ago?
So basically, you ... | [
0.4037260115146637,
-0.19519193470478058,
0.10430808365345001,
0.29864850640296936,
-0.013546591624617577,
-0.07121153920888901,
0.4733155369758606,
0.28226742148399353,
-0.42341673374176025,
-0.140456423163414,
0.22977808117866516,
0.20921148359775543,
-0.22787131369113922,
-0.02055402472... | |
Does anyone know how to change the brush for a menu's background? This sounds simple, but I don't see any obvious way to do this. You'd think that the Background property would change it, but it doesn't.
Here's what my menu looks like (notice the default white background):
**Example Code:**
```
<Window x:Class="WpfA... | [
-0.14394129812717438,
-0.23020730912685394,
0.5697968006134033,
-0.18034273386001587,
-0.14087678492069244,
0.2531121075153351,
0.07731041312217712,
-0.19044089317321777,
-0.2962615191936493,
-0.5529425740242004,
0.3224100172519684,
0.7684160470962524,
-0.09869679063558578,
-0.084664255380... | |
menuItemBrush}"
Grid.ColumnSpan="2"
VerticalAlignment="Top">
<MenuItem x:Name="fileMenu"
Background="{DynamicResource menuItemBrush}"
Foreground="White"
Header="File">
<MenuItem x:Name="fileOpenMenuItem" | [
-0.4536048471927643,
-0.31272944808006287,
0.27030429244041443,
-0.38560548424720764,
0.34048324823379517,
0.17972539365291595,
0.14718808233737946,
-0.04530378431081772,
-0.2992108464241028,
-0.6134462356567383,
-0.5355415940284729,
0.5188610553741455,
-0.5891112089157104,
0.1922900527715... | |
Background="{DynamicResource menuItemBrush}"
Foreground="White"
Header="Open..." />
<MenuItem x:Name="fileSaveMenuItem" | [
-0.15576742589473724,
-0.22883033752441406,
-0.07337683439254761,
-0.24548004567623138,
0.39634788036346436,
0.1780882030725479,
0.21283340454101562,
0.2779701054096222,
-0.2957262396812439,
-0.6196337342262268,
-0.6483432054519653,
0.4106682240962982,
-0.5568109154701233,
0.08249567449092... | |
Background="{DynamicResource menuItemBrush}"
Foreground="White"
Header="Save" />
<MenuItem x:Name="fileSaveAsMenuItem"
Background="{DynamicResource menuItemBrush}" | [
-0.3082468807697296,
-0.3031424283981323,
-0.10746939480304718,
-0.22973723709583282,
0.3091740608215332,
0.2340603917837143,
0.2516421973705292,
0.14386969804763794,
-0.31631672382354736,
-0.4752136170864105,
-0.5980520248413086,
0.44358527660369873,
-0.6043527126312256,
-0.07318051904439... | |
Foreground="White"
Header="Save As..." />
<Separator Style="{DynamicResource menuItemSeperator}" />
<MenuItem x:Name="fileExitMenuItem"
Background="{DynamicResource menuItemBrush}" | [
-0.2846079170703888,
-0.18068230152130127,
0.30511021614074707,
-0.16756585240364075,
0.3576473295688629,
0.30444416403770447,
0.08494751155376434,
-0.213734433054924,
-0.1905650645494461,
-0.6454719305038452,
-0.48297932744026184,
0.6349268555641174,
-0.44173285365104675,
0.04267760366201... | |
Foreground="White"
Header="Exit" />
</MenuItem>
</Menu>
</Grid>
```
I'd suggest using a tool called kaxaml for writing styles. It includes several code snippets, a color picker and a nice way to instantly see what changes in the xaml code does. Here is a full menu style for what you a... | [
0.12643548846244812,
0.07284890115261078,
0.44917580485343933,
-0.19673016667366028,
-0.35851046442985535,
0.3642679750919342,
0.004860301967710257,
-0.5002564787864685,
-0.040318481624126434,
-0.7475701570510864,
0.13821569085121155,
0.3683599829673767,
-0.17541418969631195,
-0.0537984780... | |
<!--**************************
* STYLE: MenuItem
************************** -->
<SolidColorBrush x:Key="HighlightedBackgroundBrush" Color="#FF797878" />
<SolidColorBrush x:Key="MenuBackgroundBrush" Color="#FF505050" />
<SolidColorBrush x:Key="NormalBorderBrush" Color="#FFFFFFFF" />
<SolidColorBrush x:Ke... | [
-0.37576502561569214,
-0.08996528387069702,
0.8075966835021973,
0.11043760925531387,
-0.25422734022140503,
0.0484139584004879,
0.4313000738620758,
-0.7393515110015869,
0.047796543687582016,
-0.6572986245155334,
0.15702228248119354,
0.47674497961997986,
-0.09291964024305344,
0.1890449672937... | |
Background="{StaticResource MenuBackgroundBrush}"
BorderBrush="{StaticResource MenuBackgroundBrush}"
BorderThickness="1">
<StackPanel ClipToBounds="True" Orientation="Horizontal" IsItemsHost="True"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
... | [
-0.13871440291404724,
-0.37595829367637634,
0.6150383949279785,
-0.001412358833476901,
0.18174077570438385,
0.28352585434913635,
0.22749778628349304,
-0.4030519425868988,
-0.31374070048332214,
-0.5120720863342285,
0.12267842888832092,
0.3784312605857849,
-0.26989272236824036,
-0.1317996084... | |
<ControlTemplate TargetType="{x:Type MenuItem}">
<Border x:Name="Border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1">
<Grid> | [
-0.1176440641283989,
-0.6029191613197327,
0.5092372298240662,
0.17332009971141815,
-0.05391930043697357,
-0.03140654414892197,
0.1303686946630478,
-0.3077433705329895,
-0.06386862695217133,
-0.5788499712944031,
0.22361892461776733,
0.1556820124387741,
-0.306048721075058,
0.0988393053412437... | |
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="Col0" MinWidth="17" Width="Auto" SharedSizeGroup="MenuItemIconColumnGroup"/>
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuTextColumnGroup"/>
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIGTColumnGroup"/>... | [
-0.4234884977340698,
0.0034881269093602896,
0.10253789275884628,
-0.3917659521102905,
-0.18239563703536987,
0.40638428926467896,
-0.10110467672348022,
-0.19021575152873993,
-0.5382997393608093,
-0.6921941637992859,
-0.1980380117893219,
0.42771443724632263,
-0.2823016047477722,
-0.142546087... | |
<!-- ContentPresenter to show an Icon if needed -->
<ContentPresenter Grid.Column="0" Margin="4,0,6,0" x:Name="Icon" VerticalAlignment="Center" ContentSource="Icon"/>
<!-- Glyph is a checkmark if needed for a checkable menu -->
<Grid Grid.Column="0" Visibility="Hidden" Margin=... | [
-0.30531445145606995,
-0.18612641096115112,
0.647152841091156,
0.18755710124969482,
-0.05773321911692619,
0.3314822316169739,
-0.1884530931711197,
-0.18016882240772247,
-0.2896016836166382,
-0.8434380888938904,
-0.20781651139259338,
0.21727918088436127,
-0.17776665091514587,
-0.02290638349... | |
L7.1,0 L2.5,4.6 z" FlowDirection="LeftToRight"/>
</Grid>
<!-- Content for the menu text etc -->
<ContentPresenter Grid.Column="1"
Margin="{TemplateBinding Padding}" | [
-0.15841113030910492,
-0.33905673027038574,
1.0666651725769043,
-0.21733668446540833,
0.1301889270544052,
0.14904733002185822,
-0.20925921201705933,
-0.2905263602733612,
0.11691676825284958,
-0.723192036151886,
-0.3659416437149048,
0.37218165397644043,
-0.29897019267082214,
-0.058937739580... | |
x:Name="HeaderHost"
RecognizesAccessKey="True"
ContentSource="Header"/>
<!-- Content for the | [
0.16477781534194946,
0.32262271642684937,
0.1274840086698532,
0.2607561945915222,
-0.0692862793803215,
-0.6037948131561279,
0.17301985621452332,
-0.07069693505764008,
0.013461767695844173,
-0.4264208674430847,
-0.3961097002029419,
0.18976561725139618,
-0.16517232358455658,
0.20665556192398... | |
menu IGT -->
<ContentPresenter Grid.Column="2"
Margin="8,1,8,1"
x:Name="IGTHost" | [
-0.3113923966884613,
-0.2693304717540741,
0.5891485810279846,
0.14628468453884125,
-0.3603343665599823,
0.12107197195291519,
-0.07215723395347595,
0.31001681089401245,
-0.3451666235923767,
-0.7655032873153687,
-0.27962666749954224,
0.2863231301307678,
-0.3549656867980957,
0.297089636325836... | |
ContentSource="InputGestureText"
VerticalAlignment="Center"/>
<!-- Arrow drawn path which points to the next level of the menu -->
<Grid Grid.Column="3" Margin="4,0,6,0" x:Name="ArrowPanel" VerticalAlignment="Center"> | [
-0.6141454577445984,
-0.05791672319173813,
0.5289430022239685,
0.12480013072490692,
0.14152610301971436,
0.09595884382724762,
-0.13961830735206604,
0.20444738864898682,
-0.11690346896648407,
-0.7766103744506836,
-0.47144612669944763,
0.19672858715057373,
-0.054701052606105804,
-0.061024434... | |
<Path x:Name="ArrowPanelPath" HorizontalAlignment="Right" VerticalAlignment="Center" Fill="{TemplateBinding Foreground}" Data="M0,0 L0,8 L4,4 z"/>
</Grid>
<!-- The Popup is the body of the menu which expands down or across depending on the level of the item -->
<Popup IsOpen="... | [
-0.2841421067714691,
-0.4401894509792328,
0.9084697961807251,
0.16922546923160553,
0.1948896199464798,
0.41669315099716187,
-0.17625638842582703,
-0.1982107162475586,
-0.2721984386444092,
-0.7968454360961914,
-0.49589070677757263,
0.2540554106235504,
-0.2987860143184662,
0.0047073564492166... | |
<Border x:Name="SubMenuBorder" BorderBrush="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Menu}}}" BorderThickness="1" Padding="2,2,2,2">
<Grid x:Name="SubMenu" Grid.IsSharedSizeScope="True">
<!-- StackPanel holds children of the menu. This is set by... | [
-0.3508249521255493,
-0.3209989368915558,
0.839501142501831,
0.0117249870672822,
0.3179561197757721,
0.28789567947387695,
-0.08701784908771515,
-0.4158506691455841,
-0.22039705514907837,
-0.672659695148468,
0.10231392085552216,
0.3681860864162445,
-0.05250207334756851,
-0.13150466978549957... | |
</Grid>
</Border>
</Popup>
</Grid>
</Border>
<!-- These triggers re-configure the four arrangements of MenuItem to show different levels of menu via Role -->
<ControlTemplate.Triggers> | [
-0.0065683298744261265,
-0.29412057995796204,
0.3057469427585602,
0.20397339761257172,
0.050865739583969116,
0.35761967301368713,
0.02930058166384697,
-0.45127299427986145,
-0.2653585374355316,
-0.7414186000823975,
0.015459411777555943,
0.30090832710266113,
-0.2879910469055176,
-0.03154915... | |
<!-- Role = TopLevelHeader : this is the root menu item in a menu; the Popup expands down -->
<Trigger Property="Role" Value="TopLevelHeader">
<Setter Property="Padding" Value="6,1,6,1"/>
<Setter Property="Placement" Value="Bottom" TargetName="SubMenuPopup"/>
<Sette... | [
-0.5619999170303345,
-0.30831801891326904,
0.8323079943656921,
-0.16287781298160553,
0.17734003067016602,
0.4022008776664734,
-0.013468709774315357,
-0.15745624899864197,
-0.16813907027244568,
-0.7444069981575012,
-0.6012573838233948,
0.44721150398254395,
-0.07349099218845367,
0.0841495171... | |
<Setter Property="Width" Value="Auto" TargetName="Col3"/>
<Setter Property="Visibility" Value="Collapsed" TargetName="Icon"/>
<Setter Property="Visibility" Value="Collapsed" TargetName="GlyphPanel"/>
<Setter Property="Visibility" Value="Collapsed" TargetName="IGTHost"/>
... | [
-0.30523601174354553,
-0.11480195820331573,
0.17541058361530304,
-0.00883480254560709,
-0.27703502774238586,
0.4331277310848236,
0.35074275732040405,
-0.5263697504997253,
-0.4276081919670105,
-0.5425597429275513,
-0.3842178285121918,
0.48378807306289673,
-0.3729570508003235,
-0.23902960121... | |
: this is a child menu item from the top level without any child items-->
<Trigger Property="Role" Value="TopLevelItem">
<Setter Property="Padding" Value="6,1,6,1"/>
<Setter Property="Visibility" Value="Collapsed" TargetName="ArrowPanel"/>
</Trigger>
<!-... | [
-0.3588765561580658,
-0.25232675671577454,
0.3597796559333801,
0.11947797983884811,
0.027576712891459465,
0.35286542773246765,
0.2462751567363739,
-0.4021218717098236,
-0.08753699064254761,
-0.6373040676116943,
-0.4011245369911194,
0.22436532378196716,
-0.12048695236444473,
0.0852983966469... | |
have children -->
<Trigger Property="Role" Value="SubmenuHeader">
<Setter Property="DockPanel.Dock" Value="Top"/>
<Setter Property="Padding" Value="0,2,0,2"/>
</Trigger>
<!-- Role = SubMenuItem : this is a child menu item which has children-->
... | [
0.02592797391116619,
-0.21031707525253296,
0.37510037422180176,
0.15302804112434387,
0.42010414600372314,
0.485386461019516,
-0.20613819360733032,
-0.07580793648958206,
-0.29238343238830566,
-0.7002856135368347,
-0.2989068925380707,
0.3300796449184418,
0.030064230784773827,
-0.053641144186... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.