text stringlengths 0 30.5k | title stringclasses 1
value | embeddings listlengths 768 768 |
|---|---|---|
framework you are using, which you don't mention. Usually it is a matter of creating a new email object, and just doing something along the lines of:
```
email.from = "From Name <fromemailaddress@example.com>";
```
You can set the specific from address to your user's, if you like, it is not at all uncommon though I p... | [
0.5651398301124573,
0.1600552499294281,
0.2069149911403656,
-0.029342176392674446,
-0.13894584774971008,
-0.16759730875492096,
0.31932333111763,
-0.04517466947436333,
-0.1918245106935501,
-0.7438722252845764,
0.22467459738254547,
0.3697810471057892,
-0.25218310952186584,
0.2306791096925735... | |
**Similar to:** [Request Windows Vista UAC elevation if path is protected?](https://stackoverflow.com/questions/17533/request-vista-uac-elevation-if-path-is-protected#17544)
I have a .NET Client Application installed in c:\Program Files (Windows Vista). This application should update itself, but it doesn't because of ... | [
0.13401749730110168,
0.16604453325271606,
0.6551625728607178,
-0.0969223901629448,
0.19836314022541046,
-0.12986458837985992,
0.25278106331825256,
-0.29817065596580505,
-0.19530215859413147,
-0.6731157898902893,
-0.058720946311950684,
0.6737743020057678,
-0.2682923376560211,
0.174401462078... | |
seconds? Is it possible to pop a UAC window? I am pretty sure that there a workaround... Otherwise, how Firefox would be able to update itself?
Thanks in advance for the help and ideas!
Could you use a Click Once deployment method? We use this for an internal application and users have no problems with permissions whe... | [
0.36346057057380676,
-0.32207396626472473,
0.3440410792827606,
0.3561091125011444,
0.10527612268924713,
-0.15950024127960205,
0.1582823097705841,
0.06215565651655197,
-0.07273916155099869,
-0.4569741487503052,
-0.25040706992149353,
0.4099082052707672,
-0.22295822203159332,
-0.3530180454254... | |
As far as I can see **Solutions Architect** is just a different "marketing" term for **Applications Architect**. Is that correct or are the roles actually different somehow? If so, how?
And yes, I have searched for this both on StackOverflow and on Google.
**Update 1/5/2018** - over the last 9 years, my thinking has e... | [
0.4731120467185974,
0.3787475824356079,
0.3712673783302307,
-0.049038928002119064,
0.005474437028169632,
0.39016154408454895,
0.45926138758659363,
0.08301085233688354,
-0.3505482077598572,
-0.8469582796096802,
0.06669975817203522,
0.7589496374130249,
0.5343765020370483,
0.36423513293266296... | |
application, to solution, to enterprise, at multiple companies large and small. I've come to the conclusion that **the future in our technology industry is one mostly without architects**. If this sounds crazy to you, wait a few years and your company will probably catch up, or your competitors who figure it out will c... | [
0.5815390944480896,
0.39411839842796326,
0.2240922898054123,
0.34457123279571533,
0.13052715361118317,
0.06952311098575592,
0.10611835867166519,
-0.11690456420183182,
-0.2709673047065735,
-0.739228367805481,
-0.23443901538848877,
0.5195398330688477,
-0.03649435192346573,
0.4046414494514465... | |
say. It doesn't say "builder". Creating a career path / hierarchy that implicitly tells people "building" is lower than "deciding", and "deciders" are not directly responsible (by the difference in title) for "building". People who are still hanging on to their architect title will chafe at this and protest "but I am h... | [
0.8148435950279236,
0.29180482029914856,
0.19975633919239044,
-0.026771510019898415,
0.14888858795166016,
-0.1050657406449318,
0.1251402348279953,
0.05087258666753769,
-0.07016672194004059,
-0.5558370351791382,
0.03482199087738991,
0.5414678454399109,
0.12803632020950317,
0.264911472797393... | |
"engineer" means deciding and building.
**Original answer**:
For people who have never worked in a very large organization (or have, but it was a dysfunctional one), "architect" may have left a bad taste in their mouth. However, it is not only a legitimate role, but a highly strategic one for smart companies.
* When... | [
0.515320360660553,
0.2839888036251068,
-0.29592156410217285,
0.04522332549095154,
0.2320406585931778,
0.10345456749200821,
0.3157757818698883,
-0.044817451387643814,
-0.2592933177947998,
-0.6934866905212402,
-0.37713485956192017,
0.47636353969573975,
0.2106972634792328,
0.20487365126609802... | |
When an organization has so many applications and infrastructure inter-dependencies that it is a full-time job to ensure their alignment and strategy without being involved in the code of any of them, that is a **solution architect**. Solution architect can sometimes be similar to an application architect, but over a s... | [
0.1031300500035286,
0.0889250859618187,
-0.018688788637518883,
0.17346376180648804,
0.3078795075416565,
-0.009595001116394997,
0.007744469679892063,
-0.10719598084688187,
-0.5305154323577881,
-0.7638099193572998,
-0.6193272471427917,
0.26071593165397644,
-0.07895214855670929,
0.25126892328... | |
architects typically work at an executive level, advising the CxO office and its support functions as well as the business as a whole.
*There are also infrastructure architects, information architects, and a few others, but in terms of total numbers these comprise a smaller percentage than the "big three".*
**Note**:... | [
0.9190807938575745,
0.4579576849937439,
0.11388017237186432,
0.16681261360645294,
-0.06021444872021675,
0.12101773917675018,
0.29130804538726807,
0.002586216200143099,
-0.2760375142097473,
-0.559478759765625,
-0.5961347818374634,
0.7430006861686707,
0.23590023815631866,
0.27693137526512146... | |
architect is someone who is technically useless, hasn't coded in years but still throws around their weight in the business, making life difficult for developers
These misconceptions come from a lot of architects doing a pretty bad job, and organizations doing a terrible job at understanding what an architect is for. ... | [
0.3094177544116974,
0.3739283084869385,
-0.252744197845459,
0.4331118166446686,
-0.055710744112730026,
-0.05409212037920952,
0.6297339797019958,
-0.05432697385549545,
-0.040715619921684265,
-0.5867416262626648,
-0.4105764925479889,
0.7166902422904968,
-0.039837151765823364,
0.0127182612195... | |
the IT industry; a **better** understanding of **business needs and strategies** than a developer needs to have; excellent **communication skills** and often some project management and business analysis skills. It is essential for architects to keep their hands dirty with code and to stay sharp technically. Good ones ... | [
0.5711197853088379,
0.47192689776420593,
-0.2343488335609436,
0.25315025448799133,
-0.055912844836711884,
0.07435407489538193,
0.38302692770957947,
0.05241331458091736,
-0.11146867275238037,
-0.5827933549880981,
-0.3824436068534851,
1.085787296295166,
0.4581877887248993,
-0.089054353535175... | |
I'm dealing with an outsourcing firm that refuses to provide a written letter of offer prior to my first day of work. To confound this problem, it's necessary for me to relocate for this position. Given the current employment market, I feel compelled to act, but it's starting to look like I should be searching for work... | [
0.3760995864868164,
-0.09545618295669556,
0.41908785700798035,
-0.20782077312469482,
0.45585763454437256,
0.17047199606895447,
0.10623887181282043,
-0.011089678853750229,
-0.20805232226848602,
-0.6409372091293335,
-0.04927654564380646,
0.41669097542762756,
0.30925363302230835,
0.1292316019... | |
and worked in my case.
> Given the current employment market, I feel compelled to act...
By all means act, but *act rationally*. No contract == no job! Act in your own best interests - tell them you'd be happy to accept the position as soon as you have a formal offer in writing with specific relocation reimbursement/e... | [
0.6487680077552795,
0.1043710932135582,
0.15576598048210144,
0.04801628738641739,
0.2690657079219818,
0.23875118792057037,
0.36974281072616577,
-0.20566125214099884,
-0.28999149799346924,
-0.3868063688278198,
0.05919867753982544,
0.49784842133522034,
0.2651420533657074,
0.01885828003287315... | |
hotel for the first 2 weeks (or do it yourself, weekly efficiencies are about $150/week in some areas) and see how it goes. You may *hate* this job, especially if they are so disorganized or disrespectful as to not make a formal offer.
If you still feel that you absolutely must accept this job, go ahead - but don't re... | [
0.3783227503299713,
0.13002543151378632,
0.4643496870994568,
0.13038389384746552,
0.36750322580337524,
-0.4736459255218506,
0.6113855838775635,
-0.09055593609809875,
0.01011036429554224,
-0.48550310730934143,
-0.3685089945793152,
0.8375105261802673,
0.11590257287025452,
-0.1979339867830276... | |
In the Stack Overflow podcast #36 (<https://blog.stackoverflow.com/2009/01/podcast-36/>), this opinion was expressed:
Once you understand how easy it is to set up a state machine, you’ll never try to use a regular expression inappropriately ever again.
I've done a bunch of searching. I've found some academic papers an... | [
0.05353366583585739,
0.05696374177932739,
0.21386770904064178,
0.08632755279541016,
0.059820592403411865,
0.02678457647562027,
0.5075258016586304,
-0.06866907328367233,
-0.25451093912124634,
-0.47722136974334717,
-0.14143052697181702,
0.683131754398346,
-0.22000154852867126,
0.116329923272... | |
a typical identifier (must start with alpha and can have any number of alphanumeric and undescore characters following, including none). The following pseudo-code shows how this can be done with a finite state machine:
```
state = FIRSTCHAR
for char in all_chars_in(string):
if state == FIRSTCHAR:
if ch... | [
-0.1814315915107727,
-0.06027851998806,
-0.25293660163879395,
-0.08081260323524475,
-0.12598024308681488,
-0.01860443502664566,
0.26502081751823425,
-0.4345923066139221,
0.1050005555152893,
-0.4887618124485016,
-0.36884480714797974,
0.14236024022102356,
-0.3659091293811798,
0.2871517241001... | |
next char
if state == SUBSEQUENTCHARS:
if char is not in the set "A-Z" or "a-z" or "0-9" or "_":
error "Invalid subsequent character"
state = SUBSEQUENTCHARS
next char
```
Now, as I said, this is a very simple example. | [
-0.5278938412666321,
-0.026522981002926826,
0.159080371260643,
-0.41896092891693115,
0.0868775025010109,
0.03797124698758125,
0.3095153868198395,
-0.1501474231481552,
0.09202273190021515,
-0.5953856706619263,
-0.15766537189483643,
0.41686388850212097,
0.06068943068385124,
0.105427615344524... | |
It doesn't show how to do greedy/nongreedy matches, backtracking, matching within a line (instead of the whole line) and other more esoteric features of state machines that are easily handled by the RE syntax.
That's why REs are so powerful. The actual finite state machine code required to do what a one-liner RE can d... | [
0.4130648374557495,
-0.004851828329265118,
0.2330538034439087,
0.41242238879203796,
-0.11239073425531387,
-0.2259206473827362,
0.5344036221504211,
-0.1096871942281723,
0.10283070802688599,
-0.3492105305194855,
-0.14888548851013184,
0.406437486410141,
-0.11054207384586334,
0.359926879405975... | |
read by humans, they're supposed to be looking at the lex/yacc code) but it may give you a better idea as to how they work. | [
0.7600333094596863,
-0.04176057502627373,
0.27123066782951355,
0.37535372376441956,
0.021130701526999474,
-0.3326086401939392,
0.18089590966701508,
0.27762773633003235,
-0.14650964736938477,
-0.27013155817985535,
-0.018534228205680847,
0.6345407962799072,
-0.014424258843064308,
-0.20937947... | |
I'm using the following code to get the members of a group on my domain:
```
Dim de As New DirectoryEntry("LDAP://" & GroupDN)
For Each user As String In CType(de.Properties("member"), IEnumerable)
GroupCollection.Add(Username, Username)
Next
```
My problem is that when GroupDN (the distinguishedn... | [
-0.04775292053818703,
0.09099891036748886,
0.5424728989601135,
-0.15313473343849182,
0.13181617856025696,
-0.2724785804748535,
0.10524314641952515,
-0.07909423857927322,
-0.2016061544418335,
-0.6391850709915161,
0.038389675319194794,
0.32281559705734253,
-0.3462831974029541,
0.495628684759... | |
contain nobody.
I've checked, and the group lists everybody correctly in my Windows AD tools. Is there something obvious that I'm missing here? On a side note, is there a better way to get all the members of a group?
Unless you change the primary group id of a user, the user is not stored in the member attribute of th... | [
0.4257465600967407,
0.1633106768131256,
0.3075008690357208,
0.14519102871418,
0.02903568372130394,
-0.4470978379249573,
0.3591919541358948,
-0.012840946204960346,
-0.5345859527587891,
-0.2969481348991394,
-0.4192616045475006,
0.31536948680877686,
-0.5397207736968994,
0.20470911264419556,
... | |
that you make some changes to the default Active Directory implementation for this to not be the case.
> The Domain Users group uses a
> "computed" mechanism based on the
> "primary group ID" of the user to
> determine membership and does not
> typically store members as
> multi-valued linked attributes. If the
>... | [
-0.02679578959941864,
-0.07119999080896378,
0.40917932987213135,
0.04542919993400574,
0.046367574483156204,
-0.21990138292312622,
0.054204054176807404,
-0.14094796776771545,
-0.20765745639801025,
-0.47623440623283386,
-0.14757852256298065,
0.46333345770835876,
-0.2843806743621826,
-0.01953... | |
Windows Server 2003.
[Reference](http://support.microsoft.com/kb/322692) | [
-0.4268001616001129,
0.1196131557226181,
0.24590635299682617,
-0.003138443222269416,
-0.3484940230846405,
-0.0665293037891388,
0.20561783015727997,
0.2858108878135681,
-0.2776080071926117,
-0.238388791680336,
-0.46650785207748413,
0.4174497723579407,
-0.3445885181427002,
-0.036213643848896... | |
I'm getting a bit tired of having to code explicitly for multicore if I want more speed, particularly when I'm just writing a one-off script. My dev box already has 8 cores and that number is going up a lot faster than the clock speed. Functional languages seem to offer a potential escape hatch, but I haven't put in th... | [
0.3972139358520508,
0.3427644371986389,
-0.01382108312100172,
0.16665098071098328,
-0.20385746657848358,
0.2612980306148529,
0.31750959157943726,
0.34752383828163147,
-0.3843834400177002,
-0.8448125123977661,
0.1840161681175232,
0.5836855173110962,
0.1319659948348999,
0.031171273440122604,... | |
Thanks!
This (long, but very good) video gives both an intro to [F#](http://msdn.microsoft.com/en-us/fsharp/default.aspx) and a compelling demo of how easy it is to parallelize code in the language:
<http://channel9.msdn.com/pdc2008/TL11/> | [
0.04918479546904564,
-0.09824126958847046,
0.4034176170825958,
0.3428030014038086,
0.26489266753196716,
-0.2344970554113388,
0.14983205497264862,
0.26575663685798645,
-0.2794873118400574,
-0.48321208357810974,
-0.08418653905391693,
0.49115198850631714,
0.3939659893512726,
-0.19053496420383... | |
I'm looking for a cross-platform database engine that can handle databases up hundreds of millions of records without severe degradation in query performance. It needs to have a C or C++ API which will allow easy, fast construction of records and parsing returned data.
Highly discouraged are products where data has to... | [
0.2344154417514801,
0.27005213499069214,
-0.1086188480257988,
0.5089234113693237,
0.20885801315307617,
-0.4036819338798523,
-0.06924498081207275,
0.0906166285276413,
-0.25541412830352783,
-0.6012607216835022,
-0.07345815002918243,
0.34798663854599,
-0.21828535199165344,
0.2839580178260803,... | |
a direct API. Not wishing to be rude, but I can use Google - please assume I've found most mainstream products and I'm asking because it's often hard to work out just what direct API they offer, rather than just a C wrapper around SQL.
It does not need to be an RDBMS - a simple ISAM record-oriented approach would be s... | [
0.6757156252861023,
0.1516449749469757,
0.2352665364742279,
0.13527491688728333,
-0.13167804479599,
-0.253860205411911,
-0.16780133545398712,
0.06145277991890907,
-0.08819689601659775,
-0.18397600948810577,
-0.34898167848587036,
0.5469648838043213,
-0.283095121383667,
0.09933681786060333,
... | |
from a small company. It must not be GPL or LGPL.
you might consider [C-Tree](http://en.wikipedia.org/wiki/C-tree) by [FairCom](http://www.faircom.com/) - tell 'em I sent you ;-) | [
0.8346887230873108,
0.2392503172159195,
0.35330629348754883,
0.08532415330410004,
0.1599310338497162,
-0.0657479465007782,
-0.165923610329628,
0.06353434920310974,
-0.15648119151592255,
0.006898755207657814,
-0.15525180101394653,
0.48556122183799744,
-0.07913466542959213,
0.111519195139408... | |
I'm mapping a legacy database with nhibernate and having some problems with mapping a relation.
The two classes look like this
```
public class Questionnaire
{
public int Id {get; set;}
public string FormCode {get; set;}
public IList<Question> Questions {get; set;}
}
public class Question
{
public in... | [
-0.0963347777724266,
-0.06161786988377571,
0.3727681040763855,
0.017273016273975372,
-0.4300716519355774,
0.07973158359527588,
-0.08096031099557877,
-0.5322268009185791,
0.09692224860191345,
-0.8030343055725098,
-0.12731346487998962,
0.4165146052837372,
-0.2688008248806,
0.1338994950056076... | |
the formcode column.
My current mapping is like this
```
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="QDesign.Core.Models" assembly="QDesign.Core">
<class name="Questionnaire" table="_questionnaire_list">
<id column="Id" name="Id">
<generator... | [
-0.29496872425079346,
-0.09233511239290237,
0.8060863018035889,
-0.13683226704597473,
-0.2261902540922165,
-0.001572339446283877,
-0.26832661032676697,
-0.3218035399913788,
-0.09893348067998886,
-1.138728380203247,
-0.03614664077758789,
0.1935206651687622,
-0.1436590701341629,
0.1341924965... | |
</bag>
</class>
</hibernate-mapping>
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="QDesign.Core.Models" assembly="QDesign.Core">
<class name="Question" table="_questionnaire_items">
<id column="ID" name="Id" unsaved-value="-1">
<generator class... | [
-0.14045339822769165,
-0.057644326239824295,
0.3119513690471649,
-0.03412632271647453,
-0.19969233870506287,
0.0893528014421463,
0.01460298802703619,
-0.38409045338630676,
-0.22210945188999176,
-0.8304947018623352,
-0.2054664045572281,
0.2609182298183441,
-0.30992940068244934,
0.0620466358... | |
map this and any help would be greatly appreciated.
Your relationship is an m:n relationship without an intermediate entity. It's a classic mistake to define m:n relationships this way, because it cuts out a pk side, which leads to the situation where there are two tables with the same attribute/field and they happen t... | [
-0.40474733710289,
0.016862982884049416,
0.47806310653686523,
0.3167168200016022,
-0.08573222160339355,
0.01816316694021225,
0.04602014273405075,
-0.0778612270951271,
-0.2984657883644104,
-0.6604918241500854,
0.22477135062217712,
-0.07539760321378708,
-0.1589866429567337,
0.392398238182067... | |
side gets the PK side of the relationship as FK fields, and for m:n relationships, you need two m:1 relationships originating from the intermediate entity. That's *it*, there's no exception.
So although you want to map this the way you propose, it can't be done as the o/r mapper can't guarantee correctness because th... | [
-0.12021513283252716,
-0.16378162801265717,
0.6025720834732056,
0.1414036750793457,
-0.31809037923812866,
0.11020246148109436,
-0.004784765187650919,
-0.2343425154685974,
-0.0593259297311306,
-0.2204311192035675,
0.06886988133192062,
-0.10383181273937225,
-0.04253525659441948,
0.4213708043... | |
I am using an LdapContext in java to query an LDAP server (I think the server is Sun server version 5.2).
I use the LdapContext.search(String name, String filter, SearchControls cons) method for the regular querys, but I don't know how to run a query equivalent to sql's "select count(\*)".
Any idea? Performance is impo... | [
0.10472550988197327,
-0.05603760480880737,
0.23707842826843262,
-0.09039300680160522,
-0.29426687955856323,
-0.3660874664783478,
-0.006998728960752487,
-0.13488157093524933,
-0.04761512577533722,
-0.8083862662315369,
0.11034385859966278,
0.5339182615280151,
-0.6404146552085876,
-0.07881411... | |
of nodes in there.
To my knowledge there is nothing in the LDAP command set that allows this, therefore if you happened to find such a feature in an LDAP server you would have to test to see if it worked anywhere else, if you cared about cross server compatibility. | [
0.19231192767620087,
-0.14141088724136353,
0.16377335786819458,
0.2016228437423706,
0.10734269767999649,
-0.2892181873321533,
0.13560570776462555,
0.38595935702323914,
-0.19206072390079498,
-0.6755132079124451,
0.0696495920419693,
0.511989176273346,
-0.5839201211929321,
0.09809423238039017... | |
**Background:** I'm trying to create a pure D language implementation of functionality that's roughly equivalent to [C's memchr](http://en.cppreference.com/w/c/string/byte/memchr) but uses arrays and indices instead of pointers. The reason is so that std.string will work with compile time function evaluation. For those... | [
0.2877381443977356,
0.028828613460063934,
0.13873957097530365,
0.02274460904300213,
-0.1958615481853485,
-0.08441533893346786,
0.2248252034187317,
-0.2768977880477905,
-0.04849995672702789,
-0.5558571815490723,
-0.162082239985466,
0.6199801564216614,
-0.17202861607074738,
-0.04216371849179... | |
under the hood to perform as fast as it does? On Win32, anything that I've been able to create in pure D using simple loops is at least 2x slower even w/ obvious optimization techniques such as disabling bounds checking, loop unrolling, etc. What kinds of non-obvious tricks are available for something as simple as find... | [
0.47662097215652466,
-0.16563749313354492,
0.1596851795911789,
0.11146004498004913,
-0.26517659425735474,
-0.3443189263343811,
0.3250772953033447,
-0.300576776266098,
0.19986370205879211,
-0.308947890996933,
0.06797417998313904,
1.001131534576416,
-0.23551474511623383,
-0.33109480142593384... | |
of machine specific tricks.
The [x86-64 SSE2 version](https://github.com/lattera/glibc/blob/master/sysdeps/x86_64/memchr.S) combines the results from [`pcmpeqb`](http://www.felixcloutier.com/x86/PCMPEQB:PCMPEQW:PCMPEQD.html) on a whole cache-line of data at once (four 16B vectors), to amortize the overhead of the earl... | [
0.11012774705886841,
0.14022107422351837,
0.0763092190027237,
-0.05103149637579918,
0.13100585341453552,
-0.029140064492821693,
0.4247778654098511,
-0.4810299873352051,
-0.31885939836502075,
-0.20283319056034088,
-0.07411911338567734,
0.3490905165672302,
-0.43227365612983704,
0.24961996078... | |
I have a generic class, but I want my type to be forced to inherit from either one or the other interface. For example:
```
public class MyGeneric<T> where T : IInterface1, IInterface2 {}
```
The above will force T to inherti from both IInterface1 and IInterface2 but can I force T to inhert from IInterface1 OR IInte... | [
0.2198731005191803,
-0.07767211645841599,
0.1288193315267563,
0.03664470091462135,
-0.08627783507108688,
-0.264981746673584,
0.12586848437786102,
-0.2247968167066574,
0.15315915644168854,
-0.6666625142097473,
0.05022488534450531,
0.4393440783023834,
-0.45727023482322693,
0.5452390313148499... | |
not any of the existing ones in the framework.
```
public interface BaseInterface
{
}
public interface Interface1 : BaseInterface
{
void SomeMethod();
}
public interface Interface2 : BaseInterface
{
void SomeOtherMethod();
}
public class MyGenericClass<T> where T : BaseInterface
{
...
}
var myClass1 = ... | [
0.1522791087627411,
-0.11580078303813934,
0.6066531538963318,
0.02112848311662674,
-0.15529006719589233,
0.22679144144058228,
0.2683863937854767,
-0.07499780505895615,
-0.04860246926546097,
-0.8735653162002563,
0.03422807902097702,
0.42297643423080444,
-0.4433044493198395,
0.06704843044281... | |
Using extension syntax I'm trying to create a left-join using LINQ on two lists that I have. The following is from the Microsoft help but I've modified it to show that the pets list has no elements. What I'm ending up with is a list of 0 elements. I assume that this is because an inner-join is taking place. What I want... | [
-0.0930970162153244,
0.022778762504458427,
0.39458104968070984,
-0.23214547336101532,
-0.03939919173717499,
0.06049750745296478,
0.45312321186065674,
-0.2222965806722641,
-0.36902543902397156,
-0.5902568697929382,
-0.19749711453914642,
0.10423339158296585,
-0.6093157529830933,
0.0506178140... | |
};
Person terry = new Person { Name = "Adams, Terry" };
Person charlotte = new Person { Name = "Weiss, Charlotte" };
//Pet barley = new Pet { Name = "Barley", Owner = terry };
//Pet boots = new Pet { Name = "Boots", Owner = terry };
//Pet whiskers = new Pet { Name = "Whiskers", Owner = charlotte };
//Pet daisy = new P... | [
-0.10598307102918625,
0.08774738758802414,
0.41558602452278137,
-0.28649720549583435,
0.09090813249349594,
0.8149111866950989,
0.026367085054516792,
-0.6013874411582947,
-0.5666730403900146,
-0.41296133399009705,
-0.34947726130485535,
0.010479329153895378,
-0.5936875939369202,
0.4739551544... | |
each element is an anonymous type that contains a
// Pet's name and the name of the Person that owns the Pet.
var query =
people.Join(pets,
person => person,
pet => pet.Owner,
(person, pet) => | [
-0.029360800981521606,
-0.17332737147808075,
0.35802164673805237,
0.23222249746322632,
0.3682110905647278,
0.16250412166118622,
-0.11955933272838593,
-0.5186629295349121,
0.20322546362876892,
-0.16356830298900604,
-0.22661122679710388,
0.14951950311660767,
-0.597587525844574,
0.29603835940... | |
new { OwnerName = person.Name, Pet = pet.Name }).ToList();
```
I think if you want to use extension methods you need to use the [GroupJoin](http://msdn.microsoft.com/en-us/library/bb534805.aspx)
```
var query =
people.GroupJoin(pets,
person => person,
pet => pet.Owner,
... | [
-0.041244011372327805,
-0.21129411458969116,
0.645063042640686,
-0.28742778301239014,
0.3368375897407532,
0.06636490672826767,
0.1208578497171402,
-0.6478502750396729,
-0.3824975788593292,
-0.8829421997070312,
-0.5004416704177856,
0.441128671169281,
-0.3019850552082062,
0.43430864810943604... | |
new { OwnerName = person.Name,
Pet = PetCollection.Select( p => p.Name ) | [
-0.08535706251859665,
-0.47229066491127014,
0.3667070269584656,
-0.05439578369259834,
0.48258253931999207,
0.22961781919002533,
0.19708453118801117,
-0.513217031955719,
-0.28672724962234497,
-1.0110855102539062,
-0.30802908539772034,
0.3180765211582184,
-0.32050764560699463,
0.410821884870... | |
.DefaultIfEmpty() }
).ToList();
```
You may have to play around with the selection expression. I'm not sure it would give you want you want in the case where you have a 1-to-many relationship.
I think it's a little easier with the LINQ Query syntax
```
var query = (from person in context.People
... | [
-0.06257174164056778,
-0.22965273261070251,
0.548637866973877,
-0.07582763582468033,
0.23109446465969086,
-0.04555369168519974,
0.1774826943874359,
-0.4100290536880493,
-0.18197672069072723,
-0.40095874667167664,
-0.20299017429351807,
0.8530853390693665,
-0.5673633813858032,
0.126546323299... | |
into tempPets
from pets in tempPets.DefaultIfEmpty()
select new { OwnerName = person.Name, Pet = pets.Name })
.ToList();
``` | [
0.27529722452163696,
-0.3347376883029938,
0.5439906120300293,
-0.04069538041949272,
0.5284448266029358,
0.04424149915575981,
0.3766712248325348,
-0.2865595519542694,
0.020647158846259117,
-0.4476962685585022,
-0.2996455430984497,
0.48415958881378174,
-0.49062496423721313,
0.285000354051589... | |
I'd like a daemonizer that can turn an arbitrary, generic script or command into a [daemon](http://en.wikipedia.org/wiki/Daemon_(computer_software)).
There are two common cases I'd like to deal with:
1. I have a script that should run forever. If it ever dies (or on reboot), restart it. Don't let there ever be two co... | [
0.6539583206176758,
-0.1523997187614441,
0.06427019834518433,
0.07887085527181625,
-0.051003213971853256,
-0.17933723330497742,
0.3994685113430023,
0.21671652793884277,
-0.2988207936286926,
-0.8600795269012451,
0.09268137067556381,
0.18752828240394592,
-0.4162168502807617,
0.44357419013977... | |
running at once.
Of course it's trivial to write a "while(true)" loop around the script in case 2 and then apply a solution for case 1, but a more general solution will just solve case 2 directly since that applies to the script in case 1 as well (you may just want a shorter or no pause if the script is not intended t... | [
0.3059462904930115,
-0.1406167447566986,
0.23243257403373718,
0.10038198530673981,
0.15809133648872375,
-0.10715476423501968,
0.5051249265670776,
0.05134231969714165,
-0.22016848623752594,
-0.4130259156227112,
-0.06471987068653107,
0.5672929883003235,
-0.32508227229118347,
0.04879438132047... | |
a program "daemonize" that I can run like
```
% daemonize myscript arg1 arg2
```
or, for example,
```
% daemonize 'echo `date` >> /tmp/times.txt'
```
which would keep a growing list of dates appended to times.txt. (Note that if the argument(s) to daemonize is a script that runs forever as in case 1 above, then d... | [
0.1058490201830864,
-0.07659471780061722,
0.3945905864238739,
-0.04990590363740921,
0.014034735038876534,
0.054010435938835144,
0.5776026248931885,
0.24920611083507538,
-0.1918928474187851,
-1.00205397605896,
-0.14040613174438477,
0.08250141888856888,
-0.26493021845817566,
0.43026217818260... | |
so that if the same command string is daemonized again it does not launch a second copy.
Also, the solution should ideally work on both OS X and linux but solutions for one or the other are welcome.
EDIT: It's fine if you have to invoke it with `sudo daemonize myscript myargs`.
(If I'm thinking of this all wrong or ... | [
0.12154236435890198,
-0.2046433687210083,
0.22115328907966614,
0.18513138592243195,
-0.3260788023471832,
-0.33347615599632263,
0.6349537968635559,
0.07724858820438385,
-0.3241576850414276,
-0.7229812145233154,
-0.3513765335083008,
0.21952123939990997,
-0.40163251757621765,
0.01300523336976... | |
script:
You can daemonize any executable in Unix by using nohup and the & operator:
```
nohup yourScript.sh script args&
```
The nohup command allows you to shut down your shell session without it killing your script, while the & places your script in the background so you get a shell prompt to continue your session... | [
0.169510617852211,
0.139137864112854,
0.24995866417884827,
-0.20387469232082367,
-0.18658481538295746,
-0.12463661283254623,
0.5967308282852173,
0.0071792867965996265,
-0.0681498572230339,
-0.7678728699684143,
-0.023972520604729652,
0.6588841080665588,
-0.26519066095352173,
0.3682236671447... | |
your choice and standard error to a different file of your choice. If you want to use just one file for both standard out and standard error you can us this:
```
nohup yourScript.sh script args >script.out 2>&1 &
```
The 2>&1 tells the shell to redirect standard error (file descriptor 2) to the same file as standard... | [
0.21168285608291626,
-0.12240847200155258,
0.32523319125175476,
-0.2925264537334442,
-0.14369267225265503,
0.1738438457250595,
0.3033252954483032,
-0.5240810513496399,
-0.04072064533829689,
-0.7592135667800903,
0.04772154614329338,
0.7931215763092041,
-0.39803749322891235,
-0.0275466125458... | |
$# < 1 ]]; then
echo "No command given."
exit
fi
echo "Checking pid in file $PIDFILE."
#Check to see if process running.
PID=$(cat $PIDFILE 2>/dev/null)
if [[ $? = 0 ]]; then
ps -p $PID >/dev/null 2>&1
if [[ $? = 0 ]]; then
echo "Command $1 already running."
exit
fi
fi
# Write our... | [
0.5447512269020081,
-0.07881798595190048,
0.6761578321456909,
-0.4846723675727844,
0.17913351953029633,
0.16980157792568207,
0.6231842637062073,
-0.7313100695610046,
0.024915749207139015,
-0.31068599224090576,
-0.15896345674991608,
0.64683598279953,
-0.5670851469039917,
0.06509730219841003... | |
sleep 10 # if command dies immediately, don't go into un-ctrl-c-able loop
done
```
The first argument is the name of the pid file to use. The second argument is the command. And all other arguments are the command's arguments.
If you name this script restart.sh this is how you would call it:
```
nohup restart.sh pi... | [
0.2679332494735718,
-0.11529756337404251,
0.6758410930633545,
-0.331458181142807,
0.31887415051460266,
-0.01661306992173195,
0.08726436644792557,
0.07410282641649246,
-0.05628428980708122,
-0.7038577198982239,
-0.2826346158981323,
0.690881073474884,
-0.3078824281692505,
-0.0642139166593551... | |
Honestly I'm very bad at CSS and not good at dealing with color / design.
Are there any helpful sites for things like pre-made, nicely skinned component, or layout of the whole site?
Thanks!
Here are a few:
<http://www.oswd.org/>
<http://openwebdesign.org/>
<http://www.solucija.com/free-templates>
<http://www.ope... | [
0.7087633609771729,
-0.02365986257791519,
0.15283913910388947,
-0.04527479410171509,
-0.03226904943585396,
0.2527649700641632,
0.12804314494132996,
0.2441040426492691,
-0.35262995958328247,
-0.6923336386680603,
0.23477309942245483,
0.34181246161460876,
0.24588431417942047,
-0.0281097590923... | |
Is it possible to execute a proc within the context of another object?
I know that normally you'd do proc.call(foo), and then the block should define a parameter. I was wondering though whether I could get "self" to bind to foo so that it's not necessary to have a block parameter.
```
proc = Proc.new { self.hello }
... | [
-0.13734391331672668,
-0.0003880318836309016,
0.24280956387519836,
-0.4033985733985901,
0.11639333516359329,
0.06809140741825104,
0.27756401896476746,
-0.14685620367527008,
-0.05218428373336792,
-0.22990185022354126,
-0.3262018859386444,
0.6050777435302734,
-0.5546983480453491,
-0.13442075... | |
proc into a block for use with the method call. | [
-0.14547637104988098,
-0.07771565765142441,
0.05765838176012039,
-0.22483743727207184,
0.004699430428445339,
-0.0499546118080616,
-0.09430018067359924,
-0.2473374903202057,
0.13318157196044922,
-0.18148556351661682,
-0.42044731974601746,
0.10211511701345444,
-0.33581122756004333,
-0.210327... | |
I've been trying to embed an icon (.ico) into my "compyled" .exe with py2exe.
Py2Exe does have a way to embed an icon:
```
windows=[{
'script':'MyScript.py',
'icon_resources':[(1,'MyIcon.ico')]
}]
```
And that's what I am using. The icon shows up fine on Windows XP or lower, but doesn't show at all on Vista... | [
-0.01031338982284069,
0.22438110411167145,
0.5369222164154053,
0.09644068032503128,
0.010774081572890282,
0.2549345791339874,
0.10820304602384567,
0.06339173763990402,
-0.3663506805896759,
-0.9033746719360352,
0.1785629391670227,
0.5307385921478271,
-0.17124509811401367,
-0.056143172085285... | |
than py2exe - I've tried [this command-line utility](http://www.rw-designer.com/compile-vista-icon) to embed it, but it always corrupts my exe and truncates its size for some reason.
Vista uses icons of high resolution *256x256* pixels images, they are stored using *PNG-based* compression. The problem is if you simply ... | [
-0.09449582546949387,
0.014705059118568897,
0.542229950428009,
0.48440518975257874,
0.2489599734544754,
-0.1439637839794159,
0.14981766045093536,
-0.10003983974456787,
-0.12844602763652802,
-0.879357099533081,
0.04306624084711075,
0.4439297914505005,
-0.2948608994483948,
0.5641511678695679... | |
1 or more `PNG`'s and handles multiple sizes etc. And I guess XP would have no problem with that. | [
-0.01736297830939293,
0.10584171116352081,
0.4802665710449219,
0.19432295858860016,
-0.2001066356897354,
-0.005214343313127756,
-0.29111719131469727,
0.01572507992386818,
-0.3818471431732178,
-0.531305193901062,
-0.2237948626279831,
0.32324495911598206,
-0.1620747148990631,
-0.031995806843... | |
I'm reading **The C Programming Language** and learned how to make a reverse Polish calculator using a stack. Here is one of the exercises that follow it:
> **Exercise 4-4.** Add the commands to print the top elements of the stack without popping, to duplicate it, and to swap the top
> two elements. Add a command to ... | [
0.3975563049316406,
0.15397684276103973,
0.3381136357784271,
-0.06508401781320572,
0.12801939249038696,
0.21068494021892548,
0.05444963648915291,
-0.09000611305236816,
-0.4524126946926117,
-0.5064742565155029,
-0.09556461870670319,
0.3427238464355469,
0.010370737873017788,
-0.2308629304170... | |
makes more sense to duplicate an *individual* element on the top of the stack. I suspect "print the top elements" was a typo that should have been the singular "print the top element".
The *reason* this is a far more likely case is because printing the "top elements" makes no sense on its own. If it was some subset of... | [
0.22532008588314056,
-0.02929595671594143,
-0.013438130728900433,
0.4274735152721405,
-0.20599707961082458,
-0.23487959802150726,
-0.04352947697043419,
-0.13402453064918518,
-0.40128293633461,
-0.33838722109794617,
-0.45195168256759644,
0.2768521010875702,
-0.24774125218391418,
-0.04592939... | |
refers to "the top element of the stack", not "the stack".
So if your stack is:
```
[1,2,3,4,5]
```
with `1` being the *first* element pushed and `5` the last, duplicating would give you:
```
[1,2,3,4,5,5].
```
---
Assuming you have the basic operations `push` and `pop` already, you probably need to add `count`... | [
-0.08655013144016266,
-0.2095472514629364,
0.37370219826698303,
-0.2560770511627197,
0.1508239060640335,
-0.0603935606777668,
0.17323575913906097,
-0.4530198574066162,
-0.3681831657886505,
-0.36591094732284546,
-0.4307279884815216,
0.4522336423397064,
-0.4775691628456116,
-0.14620767533779... | |
= stack.pop()
two = stack.pop()
stack.push(one)
stack.push(two)
def clear(stack):
while stack.count() > 0:
junk = stack.pop()
```
That's probably the *simplest* way to implement them, though there may be efficiency gains if you write the functions assuming you have more power than just callin... | [
0.18190006911754608,
-0.322855144739151,
0.22299954295158386,
-0.4086780846118927,
0.20153947174549103,
-0.18057146668434143,
0.18148669600486755,
-0.47833314538002014,
-0.2613610029220581,
-0.3531684875488281,
-0.4472573399543762,
0.5175676345825195,
-0.4341755509376526,
-0.23846656084060... | |
raise error
temp = stack.data[_count - 2]
stack.data[_count - 2] = stack.data[_count - 1]
stack.data[_count - 1] = temp
``` | [
0.1474270075559616,
0.5311891436576843,
0.09152492880821228,
0.03451365604996681,
-0.19768498837947845,
0.29269975423812866,
0.41299617290496826,
-0.3019793629646301,
-0.40698328614234924,
-0.5612233281135559,
-0.0021036029793322086,
0.7198268175125122,
-0.3649682402610779,
-0.146928682923... | |
I have a database table with a list of products (clothing). The products belong to categories and are from different stores.
Sample categories: tops, bottoms, shoes
Sample stores: gap.com, macys.com, target.com
My customers can request to filter products in the following ways:
* all products (no filter)
* by catego... | [
0.9367345571517944,
-0.06328143179416656,
0.33837828040122986,
-0.05678870528936386,
-0.025355111807584763,
0.4636082351207733,
0.10785035043954849,
-0.08892778307199478,
-0.2260877639055252,
-0.6854144334793091,
0.015338697470724583,
0.23749631643295288,
-0.19337162375450134,
0.3844129443... | |
I call this function:
```
Products.GetProducts(FilterBy.Category, "tops", "");
```
I have the last parameter empty because it's the string that contains the "store" to filter by but in this case there is no store. However, if the user wants to filter by category AND store I'd call the method this way:
```
Product.... | [
0.14268890023231506,
-0.1343984305858612,
0.4037207067012787,
-0.17027170956134796,
0.040989793837070465,
0.009129764512181282,
-0.1018812358379364,
-0.05043335258960724,
-0.2536889314651489,
-0.6728156805038452,
-0.1403656005859375,
0.6711974740028381,
-0.6055259704589844,
0.1715739071369... | |
problem that people are repeatedly solving (filtering products in various ways)
According to Eric Evan's "Domain Drive Design" you need the specification pattern. Something like this
```
public interface ISpecification<T>
{
bool Matches(T instance);
string GetSql();
}
public class ProductCategoryNameSpecification... | [
-0.08764919638633728,
-0.27267029881477356,
0.400388240814209,
-0.002423273166641593,
-0.016913464292883873,
-0.03501474857330322,
-0.1430216282606125,
-0.12616533041000366,
-0.46162351965904236,
-0.657536506652832,
-0.25919169187545776,
0.5114825963973999,
-0.485377699136734,
0.4624511897... | |
specifications
```
var specifications = new List<ISpecification<Product>>();
specifications.Add(
new ProductCategoryNameSpecification("Tops"));
specifications.Add(
new ProductColorSpecification("Blue"));
var products = ProductRepository.GetBySpecifications(specifications);
```
You could also create a generic Comp... | [
0.2797030806541443,
0.06305384635925293,
0.7225468754768372,
-0.0713442862033844,
0.2366955280303955,
0.31093084812164307,
-0.11950065195560455,
-0.692785918712616,
-0.17079541087150574,
-0.5541731119155884,
-0.33631861209869385,
0.626160204410553,
-0.38264602422714233,
0.132056325674057,
... | |
query = Enumerable.Where(YourDataContext.Products, predicate);
foreach(Product currentProduct in query)
meh(currentProduct);
```
Probably wont compile because I have typed it directly into the browser, but I believe it is generally correct.
**Another update** :-)
```
List<Product> products = new List<Product>();... | [
-0.33167269825935364,
-0.03661523759365082,
0.7676310539245605,
-0.16908405721187592,
0.14824853837490082,
0.24678461253643036,
0.03576153889298439,
-0.3332725465297699,
-0.18758869171142578,
-0.7044612765312195,
-0.5450939536094666,
0.399739146232605,
-0.31183746457099915,
0.2414933592081... | |
is a List, but if your source was a data context that supported Linq2SQL for example I **think** this would evaluate using SQL.
You could still use the Specification pattern in order to make your concepts explicit.
```
public class Specification<T>
{
IEnumerable<T> AppendToQuery(IEnumerable<T> query);
}
```
The ... | [
0.22359547019004822,
-0.03670632094144821,
0.33895087242126465,
0.09329336136579514,
-0.2497870922088623,
-0.2615155279636383,
-0.0951094850897789,
-0.4478303790092468,
-0.2676273584365845,
-0.8320222496986389,
-0.11944857984781265,
0.4433009624481201,
-0.204824298620224,
-0.02235662192106... | |
in C do return -1 when i want to cancel the download in either the header or the write function. In pycurl i get this error
```
pycurl.error: invalid return value for write callback -1 17
```
I dont know what the 17 means but what am i not doing correctly?
from pycurl.c:
```
else if (PyInt_Check(result)) {
lon... | [
-0.116855688393116,
-0.02610473893582821,
0.5953789949417114,
-0.4045524597167969,
-0.018445052206516266,
-0.11148583889007568,
0.3604546785354614,
-0.18590101599693298,
-0.01209309883415699,
-0.0816640704870224,
-0.5920306444168091,
0.8589993119239807,
-0.35266852378845215,
-0.17196965217... | |
}
```
this would mean 17 is the total\_size - is this possible ? and -1 (result) is what your callback is returning. | [
-0.17627955973148346,
0.11189094185829163,
0.3221878707408905,
-0.3675587475299835,
0.10991217195987701,
0.08505167067050934,
0.04443371668457985,
-0.2776227295398712,
-0.11211284250020981,
-0.35169854760169983,
-0.30152013897895813,
0.8170536756515503,
-0.3154465854167938,
0.0823947489261... | |
What would your own (I assume perfect) programming language look like? Give a small example and explain your **novel** ideas!
I'm really interested in the syntax.
Jon is right in saying that “[d]ifferent tasks suit different languages and paradigms.” However, there are a few considerations that are largely independen... | [
0.400683730840683,
0.2872996926307678,
-0.1642950177192688,
0.25231418013572693,
-0.007839185185730457,
0.07772514224052429,
0.32415154576301575,
0.22475393116474152,
-0.16452527046203613,
-0.48734766244888306,
-0.09861500561237335,
0.5514760613441467,
-0.10866949707269669,
-0.267463237047... | |
first is quite uncontroversial: semicolons are unnecessary. Take the following code; the grammar is completely unambiguous and easy to parse for a compiler. Neither semicolons nor explicit line continuations are necessary.
```
answer = 42
fraction = answer * 2 /
(answer + 1)
Console.WriteLine(
"Some fun... | [
-0.12977634370326996,
0.19536283612251282,
0.06130850687623024,
-0.136184960603714,
-0.35141029953956604,
0.0013189625460654497,
0.13318327069282532,
-0.149399533867836,
0.07432281970977783,
-0.546698272228241,
-0.33520105481147766,
0.3451928496360779,
-0.15387172996997833,
-0.134462520480... | |
implicit variable declarations. Instead of announcing clearly “I'm declaring a `variable` of type `Foo`,” all they whisper shyly is “`Foo var`”. Since `Foo` isn't even a reserved word in most cases, the programmer isn't offered a single visual hint here. I prefer VB's explicit `Dim var As Foo`, even thought he keyword ... | [
0.2639557719230652,
0.1679929494857788,
0.3201422691345215,
-0.38236942887306213,
-0.5891221165657043,
-0.06690744310617447,
0.3456662893295288,
0.2422013133764267,
-0.12816748023033142,
-0.17903968691825867,
-0.04274927079677582,
0.7176345586776733,
-0.40386343002319336,
0.121579386293888... | |
typing *has* its uses but they are surprisingly rare. Even most “scripting languages” wouldn't really need them. I think that this is often confused with *implicit* typing which has rather more uses. Take (again) the example of Python. Why doesn't it offer static typing? It's already strongly typed, statical type check... | [
0.2579646408557892,
-0.016933003440499306,
0.002085194457322359,
0.005212030373513699,
-0.26249584555625916,
-0.12310782819986343,
0.29012101888656616,
0.0924021527171135,
-0.1828426867723465,
-0.6575923562049866,
0.07839524745941162,
0.5754880905151367,
-0.3523320257663727,
-0.40286529064... | |
explicit line continuations à la VB
* Explicit variable declarations
* Static typing
Furthermore, I'm a huge fan of certain C++ concepts, such as general-purpose templates, RAII (i.e. avoiding garbage rather than collecting it), immutability and the concept of value ranges defined via iterators. I've stated elsewhere ... | [
0.14877501130104065,
-0.19054068624973297,
0.6315608024597168,
-0.19882169365882874,
-0.23951935768127441,
0.4735874831676483,
0.357192724943161,
0.03572067990899086,
0.14537398517131805,
-0.41205012798309326,
0.05712037533521652,
0.9186029434204102,
-0.42097020149230957,
-0.07253418117761... | |
cout << *i << endl;
```
Of course I'm aware that the above syntax is offered by many languages. But they all only offer watered-down versions of C++' powerful iterator concept (to use C++ terminology, the only kind of iterators that most languages know are input iterators, which are basically the least powerful itera... | [
-0.05829709395766258,
0.2569926977157593,
0.507045328617096,
0.06402456015348434,
0.04368264228105545,
-0.038991544395685196,
0.16465988755226135,
0.05956052243709564,
-0.04348770156502724,
-0.2610282301902771,
-0.28678977489471436,
0.30249810218811035,
-0.5496000647544861,
0.1121230795979... | |
When my program starts, the main window places itself where it was when it was last closed. I want to modify this behavior some so if the window is off-screen (or partially off-screen) it moves itself to fully on screen.
I've got this working perfectly. Here's the code:
```
int x = gameConfig.windowX;
int ... | [
0.12025494873523712,
-0.16458754241466522,
0.7730700373649597,
-0.3054097890853882,
0.19143792986869812,
-0.22067144513130188,
0.020494520664215088,
0.09067371487617493,
-0.1287546157836914,
-0.9594727158546448,
-0.35407695174217224,
0.7130994200706482,
0.09112256020307541,
0.2379873842000... | |
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
if( x + width > screenSize.width ) x = screenSize.width - width;
if( y + height > screenSize.height ) y = screenSize.height - height;
if( width > screenSize.width ) width = screenSize.width;
if( height > screenSize.height ) height = s... | [
-0.009546281769871712,
-0.4992716610431671,
0.9146538972854614,
-0.0668204128742218,
0.10921761393547058,
-0.16539263725280762,
0.21731248497962952,
-0.42504000663757324,
-0.10752946883440018,
-0.7421298623085022,
-0.3743196725845337,
0.7860921025276184,
0.1283733993768692,
-0.037891287356... | |
it doesn't account for taskbars. On windows, if the window is past the bottom of the screen, this code will correct it, but it still leaves a piece of the window blocked by the taskbar.
I'm not sure how to do this. Is there someway to ask java about any taskbars in the system, and what their width/height is?
---
Tha... | [
0.11126550287008286,
0.0051697175949811935,
0.46231281757354736,
-0.20037490129470825,
-0.3329089879989624,
-0.014829935505986214,
0.28450751304626465,
-0.05232101306319237,
-0.5300742983818054,
-0.9852341413497925,
0.3582620918750763,
0.45650115609169006,
-0.09215199202299118,
-0.02638656... | |
API suggests that GraphicsConfiguration.getBounds() would do the trick, but that still returns the rectangle {0, 0, 1600, 1200}.
Use getScreenInsets (Java 4+):
```
static public Insets getScreenInsets(Window wnd) {
Insets si;
try {
if(wnd==null) { si=Toolkit.getDefaultTool... | [
0.20416133105754852,
-0.3534177541732788,
0.718806266784668,
-0.04620594531297684,
-0.2233523279428482,
0.10533679276704788,
0.192667156457901,
-0.3114319145679474,
-0.3073340654373169,
-0.9206165075302124,
-0.13848306238651276,
0.3703021705150604,
-0.2307746708393097,
-0.16516545414924622... | |
.getScreenInsets(wnd.getGraphicsConfiguration()); }
} catch(NoSuchMethodError thr) { si=new Insets(0,0,0,0); }
return si;
}
```
(This method allows for multiple screens, and older JVM's that don't support the API).
And, always remember the task bar may be on any edge of the screen, not just t... | [
0.23260340094566345,
-0.36056381464004517,
0.740271270275116,
0.004517183173447847,
0.05504148080945015,
-0.11599740386009216,
0.38938069343566895,
-0.0997970774769783,
-0.40991073846817017,
-1.0795987844467163,
-0.030658572912216187,
0.406050443649292,
-0.03675513714551926,
-0.06561627238... | |
In my company we develop a software product. Until now we haven't had any testers, so basically the developers were the testers, and of course the customer and users (not good).
Our team now consists of 4 developers and we work mainly with Cruisecontrol, Flex, ASP.NET, IIS, MSSQLServer and WebORB. I am urging the mana... | [
0.7921710014343262,
0.09684779495000839,
0.2435702383518219,
0.014268893748521805,
0.28618326783180237,
0.0699210911989212,
-0.13592272996902466,
-0.034559547901153564,
-0.14983154833316803,
-0.48360785841941833,
0.08235259354114532,
0.7628434896469116,
0.2809920608997345,
-0.0291352905333... | |
week?
3. Where can you find good testers (I suppose there isn't a degree in software development testing)?
4. Is it the task of the project manager of technical teamlead to test everything?
thx, Lieven Cardoen
ps: Thx, Vinay, we do have Unit Tests but indeed, Unit Tests can't cover what Testers can.
1) Are testers ne... | [
0.6119484901428223,
0.05392879247665405,
0.08106229454278946,
0.052875567227602005,
-0.16355226933956146,
-0.16897818446159363,
0.149821937084198,
-0.1474834382534027,
-0.29562535881996155,
0.09786003082990646,
0.09139171242713928,
0.42700257897377014,
0.2470533549785614,
-0.15276050567626... | |
designer to test half of the week?
Testers often do customer support work or work with the customer to develop requirements. The testers can act as internal voices for the customers... and if they interact with the customer enough should feel a sense of responsibility for getting a suitable quality product out of deve... | [
1.0664045810699463,
-0.02300270088016987,
-0.1544070541858673,
0.19959205389022827,
-0.18254102766513824,
0.10112007707357407,
0.2516174614429474,
-0.16450442373752594,
-0.25106850266456604,
-0.6551036834716797,
0.282754123210907,
0.8294346332550049,
0.18788692355155945,
0.134189173579216,... | |
industry before they go back for their final year at uni.
4) Is it the task of the project manager of technical teamlead to test everything?
Not necessarily. It depends how big the team is, if it's small, then yes, someone can double up and do both roles. For bigger projects though, these are different people.
---
... | [
0.9432671666145325,
0.069979727268219,
0.056479379534721375,
0.22333276271820068,
0.20005516707897186,
-0.37370678782463074,
0.07601605355739594,
0.13898028433322906,
-0.48297402262687683,
-0.15541818737983704,
-0.003982746507972479,
0.9433277249336243,
0.2649405002593994,
0.00662902183830... | |
a tester for not finding it. | [
0.23614248633384705,
0.05831919610500336,
-0.380248099565506,
0.4593750536441803,
-0.21724185347557068,
-0.01650307886302471,
0.13931190967559814,
-0.2198137640953064,
-0.09885771572589874,
0.03461762145161629,
-0.24487213790416718,
0.2676219642162323,
-0.14277146756649017,
-0.011604668572... | |
I'm writing an app in Perl with several modules. I want to write some global constants that will be visible from everywhere, like this:
```
#Constants.pm
$h0 = 0;
$scale = 20;
```
And then use them without qualifying with `main::` or `Constants::` in several modules. However, if I write `use Constants;` in more than... | [
0.195364311337471,
0.10836374759674072,
0.5963618755340576,
0.0387566052377224,
-0.03707505017518997,
-0.018701547756791115,
0.27057084441185,
-0.09596265107393265,
-0.3085329830646515,
-0.5108133554458618,
-0.18297341465950012,
0.7289232611656189,
-0.504791796207428,
-0.16154509782791138,... | |
define will be in an empty namespace:
```
$::x
```
Note that using `package` with no namespace is discouraged, and will apparently be deprecated in some versions of Perl. See the quote below.
---
Quoting from `man perlfunc`:
```
package NAMESPACE
package Declares the compilation unit as being in th... | [
0.21495935320854187,
-0.12143945693969727,
-0.10316106677055359,
-0.35714423656463623,
0.03490839898586273,
-0.37221094965934753,
0.34877803921699524,
-0.36494386196136475,
0.13864217698574066,
-0.40110287070274353,
-0.45128652453422546,
0.7215943932533264,
-0.3643133044242859,
-0.12340782... | |
of the
enclosing block, file, or eval (the same as the "my"
operator). All further unqualified dynamic identifiers
will be in this namespace. A package statement affects
only dynamic variables--including those you've used | [
-0.0037687490694224834,
-0.15459951758384705,
0.11718502640724182,
-0.1068660244345665,
0.042255040258169174,
-0.22496137022972107,
0.19419105350971222,
-0.07609284669160843,
-0.11401396989822388,
-0.1384032964706421,
-0.6408556699752808,
0.547234296798706,
-0.5224817395210266,
-0.01632850... | |
"local" on--but not lexical variables, which are cre?
ated with "my". Typically it would be the first decla?
ration in a file to be included by the "require" or
"use" operator. You can switch into a package in more | [
0.2838185727596283,
-0.41825222969055176,
0.1705118715763092,
0.1442563235759735,
0.1055598333477974,
0.20613768696784973,
-0.10425354540348053,
0.23062804341316223,
-0.019752273336052895,
-0.30518460273742676,
-0.5339277982711792,
0.7730730175971985,
-0.018573777750134468,
0.0780565142631... | |
than one place; it merely influences which symbol table
is used by the compiler for the rest of that block.
You can refer to variables and filehandles in other
packages by prefixing the identifier with the package
name and a double colon: | [
0.3831717073917389,
-0.1663823127746582,
-0.15386030077934265,
0.2576918601989746,
0.036852020770311356,
-0.19410042464733124,
-0.05660919100046158,
-0.2223704606294632,
-0.16209663450717926,
-0.29496702551841736,
-0.20229540765285492,
0.14520317316055298,
-0.2445659041404724,
0.2627371847... | |
$Package::Variable. If the
package name is null, the "main" package as assumed.
That is, $::sail is equivalent to $main::sail (as well
as to $main'sail, still seen in older code).
If NAMESPACE is omitted, then there is no current pack? | [
0.22193221747875214,
-0.2703251242637634,
0.20783831179141998,
-0.3577192425727844,
-0.08992588520050049,
-0.11173678934574127,
0.1932956427335739,
-0.28052759170532227,
-0.2537384331226349,
-0.2500096261501312,
-0.21127082407474518,
0.39342930912971497,
-0.31166067719459534,
0.06515240669... | |
age, and all identifiers must be fully qualified or
lexicals. However, you are strongly advised not to
make use of this feature. Its use can cause unexpected
behaviour, even crashing some versions of Perl. It is | [
0.3029817044734955,
0.1015869677066803,
0.4790205955505371,
-0.02277546003460884,
0.12277556955814362,
-0.44648340344429016,
0.2903335988521576,
0.2033473551273346,
-0.18140166997909546,
-0.2729727029800415,
-0.19256548583507538,
0.0950004830956459,
0.15406449139118195,
0.1288548856973648,... | |
deprecated, and will be removed from a future release.
```
---
**Edit:** This question might be helpful as well: [How do I use constants from a Perl module?](https://stackoverflow.com/questions/193020/how-do-i-use-constants-from-a-perl-module "How do I use constants from a Perl module?") | [
0.29063037037849426,
0.00397488521412015,
0.34280017018318176,
0.08123524487018585,
0.10381189733743668,
-0.20827923715114594,
0.25573983788490295,
0.04286137595772743,
-0.3392692506313324,
0.012406128458678722,
-0.1312599927186966,
0.5662803649902344,
-0.3988792896270752,
0.20043426752090... | |
When I run my unit tests in my project I am seeing a result "Not executed" for every one. I have restarted my computer so I doubt this is some kind of hung process issue.
Google has revealed nothing. Does anyone have any ideas?
What a PITA! The IDE doesn't show any errors. In order to determine the error you have to d... | [
0.7713035941123962,
0.10584151744842529,
-0.046968378126621246,
-0.016281310468912125,
-0.2071864902973175,
0.020633505657315254,
0.6355658173561096,
0.05281945317983627,
-0.13918103277683258,
-0.5910372138023376,
0.01121992152184248,
0.604759931564331,
-0.05959725379943848,
-0.00018059748... | |
my case it was the following:
Failed to queue test run 'Peter Morris@PETERMORRIS-PC 2009-02-09 10:00:37': Test Run deployment issue: The location of the file or directory 'C:\SomePath\SomeProject.Tests\bin\Debug\Rhino.Mocks.dll' is not trusted.
Now if VS had told me this in the IDE I could have fixed it in minutes! A... | [
0.1242174282670021,
0.3441016376018524,
0.3456698954105377,
-0.18793034553527832,
0.20174361765384674,
0.08770070970058441,
0.5573894381523132,
-0.08117011189460754,
-0.14225375652313232,
-0.3958662450313568,
0.07101962715387344,
0.771989107131958,
-0.05688032507896423,
0.09771911799907684... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.