text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
this programm would be: ``` door is open closing door door is closed opening door door is open door is open ```
[ -0.2627705931663513, 0.40709105134010315, 0.4562058746814728, -0.48485609889030457, -0.11319735646247864, -0.042632538825273514, 0.530594527721405, -0.1553897261619568, -0.3836979568004608, -0.32467976212501526, -0.6692625284194946, 0.371075302362442, 0.044620662927627563, 0.46610897779464...
``` $a = '{ "tag": "<b></b>" }'; echo json_encode( json_decode($a) ); ``` This outputs: ``` {"tag":"<b><\/b>"} ``` when you would think it would output exactly the input. For some reason json\_encode adds an extra slash. Because it's part of the JSON standard <http://json.org/> > char > > > > ``` > any-Un...
[ -0.1024809181690216, -0.2088521122932434, 0.18027359247207642, -0.22471663355827332, -0.03487027809023857, 0.12676650285720825, 0.1559319794178009, -0.5406818985939026, -0.2404291033744812, -0.3164948523044586, -0.5223497748374939, 0.23797205090522766, -0.44446155428886414, -0.220577612519...
Part of the series of controls I am working on obviously involves me lumping some of them together in to composites. I am rapidly starting to learn that this takes consideration (this is all new to me!) :) I basically have a `StyledWindow` control, which is essentially a glorified `Panel` with ability to do other bits...
[ 0.3534298241138458, -0.17265130579471588, 0.5647497177124023, 0.2638688385486603, 0.30257850885391235, -0.009331334382295609, -0.12232483178377151, -0.2816593647003174, -0.19505511224269867, -0.5281237363815308, 0.13855211436748505, 0.132940873503685, 0.001292500295676291, 0.34420415759086...
_panel = new Panel(); if (_editable != null) _editable.InstantiateIn(_panel); _regions = new List<IAttributeAccessor>(); _regions.Add(_panel); } ``` The problems came today when I tried nesting a more complex control within it. This control uses a reference to the page since ...
[ -0.24547404050827026, -0.06680398434400558, 0.5577578544616699, -0.038446247577667236, -0.2741672694683075, 0.015089768916368484, 0.3336504399776459, -0.35030579566955566, -0.35575103759765625, -0.7777923941612244, -0.16773980855941772, 0.5419256687164307, -0.5051018595695496, 0.0035571521...
causing "object null" errors, but I localized this down to the render method, which was of course trying to call the method against the [null] `Page` object. What's confusing me is that the control works fine as a standalone, but when placed in the `StyledWindow` it all goes horribly wrong! **So, it looks like I am m...
[ 0.26965266466140747, 0.11884721368551254, 0.07681840658187866, 0.27737957239151, 0.46665650606155396, 0.06921487301588058, 0.37400439381599426, -0.018255094066262245, -0.11612216383218765, -0.4974386394023895, -0.19837959110736847, 0.39191219210624695, 0.08280979096889496, 0.28751355409622...
`Controls` (I got this from a guide somewhere): ``` Panel _panel; // Sub-Control to store the "Content". public override ControlCollection Controls { get { EnsureChildControls(); return _panel.Controls; } } ``` I hope that helps clarify things. Apolo...
[ -0.368270605802536, 0.0903029590845108, 0.5182462930679321, 0.4210192561149597, 0.29457929730415344, -0.07647036015987396, 0.0898285061120987, -0.17349334061145782, -0.3430078327655792, -0.46726107597351074, -0.1216944009065628, 0.3710819482803345, 0.12691377103328705, 0.07710117846727371,...
playing with the control, placing one within the composite, and one outside. I then got the status of Page at event major event in the control Lifecycle and rendered it to the page. The standalone is working fine and the page is inited as expected. However, the one nested in the Composite is different. It's `OnLoad` e...
[ 0.18403343856334686, -0.18234898149967194, 0.33935219049453735, 0.20284207165241241, -0.12325503677129745, 0.16402146220207214, -0.10128847509622574, -0.24238340556621552, -0.24476778507232666, -0.42603614926338196, 0.3887515068054199, 0.730484664440155, -0.3185047507286072, -0.04531234875...
obviously isn't is it?!) :D Thanks for your help guys, appreciated :) Solved! ======= Right, I was determined to get this cracked today! Here were my thoughts: * I thought the use of `Panel` was a bit of a hack, so I should remove it and find out how it is really done. * I didn't want to have to do something like `M...
[ 0.23773348331451416, -0.18160849809646606, 0.4122365117073059, 0.10410286486148834, -0.2781314551830292, 0.0937659963965416, 0.03975255414843559, 0.2948872447013855, -0.09626822918653488, -0.790939450263977, -0.1269235461950302, 0.4633922278881073, -0.09045791625976562, 0.16003593802452087...
Nice! So, I ripped out the use of `Panel` and pretty much followed the artcle and took it as gospel, making notes as I went. Here's what I have now: * I learned I was using the wrong term. I should have been calling it a ***Templated Control***. While templated controls are technically composites, there is a distinc...
[ 0.3794679045677185, -0.10181781649589539, 0.22038841247558594, 0.1956021785736084, -0.2087738811969757, 0.24437758326530457, -0.09071119129657745, 0.012004539370536804, -0.36547601222991943, -0.8514347672462463, 0.38789528608322144, 0.5871936082839966, -0.047104306519031525, 0.024202458560...
ensure I fully understand it all, then get a blog post up :) * A "Template" control is used to specify the interface for templated data. For example, here is the ASPX markup for a templated control: ``` <cc1:TemplatedControl ID="MyCtl" runat="server"> <Template> <!-- Templated Content Goes Here --> </...
[ 0.6178538203239441, -0.043341267853975296, 0.49531054496765137, 0.13243216276168823, -0.016822446137666702, -0.446771502494812, 0.0007925911340862513, -0.2302854359149933, -0.0670117512345314, -0.6857065558433533, -0.02353011444211006, 0.4804149866104126, -0.36776041984558105, 0.0449649803...
ITemplate _template; // Surrogate to hold the controls instantiated from // within the template. DummyWebControl _owner; protected override void CreateChildControls() { // Note we are calling base.Controls here // (you will see why in a min). base.Controls.Clear(); ...
[ 0.4058627784252167, -0.34696292877197266, 0.46103373169898987, -0.0528356172144413, 0.16377146542072296, 0.04729929938912392, 0.23377551138401031, -0.657637357711792, -0.1748049110174179, -0.3024507462978363, -0.18145518004894257, 0.25910061597824097, -0.18368954956531525, 0.04666025936603...
ITemplate template = _template; if (template == null) template = new StyledWindowDefaultTemplate(); template.InstantiateIn(_owner); base.Controls.Add(_owner); ChildControlsCreated = true; } ``` Then, to provide easy access to the Controls of the [Surrogate] Object: (t...
[ 0.3357682228088379, -0.07349459826946259, 0.598853349685669, -0.009880452416837215, 0.29853442311286926, 0.20265887677669525, 0.2732195556163788, -0.7192746996879578, -0.04318401962518692, -0.32758182287216187, -0.17083969712257385, 0.19791510701179504, -0.1673097312450409, 0.3639965057373...
get { EnsureChildControls(); return _owner.Controls; } } ``` And that is pretty much it, easy when you know how! :) **Next:** Design Time Region Support!
[ -0.016791079193353653, -0.16255654394626617, 0.47145065665245056, 0.1315266489982605, 0.45714071393013, -0.37084561586380005, 0.37719467282295227, -0.1501491218805313, 0.03356247395277023, -0.9025571346282959, -0.40809381008148193, 0.664142906665802, 0.07008743286132812, -0.088728353381156...
I'm having a little problem and I don't see why, it's easy to go around it, but still I want to understand. I have the following class : ``` public class AccountStatement : IAccountStatement { public IList<IAccountStatementCharge> StatementCharges { get; set; } public AccountStatement() { new A...
[ 0.1605807989835739, -0.059436358511447906, 0.6929357051849365, -0.2311035692691803, 0.20001712441444397, 0.27229607105255127, 0.3376583456993103, -0.20900774002075195, -0.3124830424785614, -0.5458251237869263, -0.09903758019208908, 0.6437686681747437, -0.011220837011933327, 0.2688087522983...
new Date(period.PeriodStartDate); EndDate = new Date(period.PeriodEndDate); AccountID = accountID; } public void AddStatementCharge(IAccountStatementCharge charge) { StatementCharges.Add(charge); } ``` } (note startdate,enddate,accountID are automatic property to...) If I u...
[ 0.3081650733947754, 0.0390283428132534, 0.6531105041503906, -0.41351598501205444, 0.36689919233322144, 0.05637621507048607, 0.1681862771511078, -0.2240140736103058, -0.38880831003189087, -0.35908812284469604, -0.2700262665748596, 0.5446605682373047, 0.15477921068668365, 0.374840646982193, ...
StartDate = new Date(2007, 1, 1), EndDate = new Date(2007, 1, 31),
[ 0.10083567351102829, -0.10233174264431, 0.6349208950996399, 0.20289677381515503, -0.1275051236152649, 0.08885667473077774, 0.3174418807029724, 0.13120676577091217, -0.41798263788223267, -0.35955336689949036, -0.21520835161209106, -0.11139912158250809, 0.09970087558031082, 0.638606786727905...
StartingBalance = 125.05m }; ``` When I try to use the method "AddStatementCharge: I end up with a "null" StatementCharges list... In step-by-step I clearly see that my list get a value, but as soon as I quit de instantiation line, my list become "null" This code: ``` publi...
[ -0.0007118918583728373, 0.14462237060070038, 0.3268521726131439, -0.19224511086940765, -0.026181397959589958, -0.04785606637597084, 0.1809658259153366, -0.3697921931743622, -0.3529936671257019, -0.1890891194343567, 0.20090465247631073, 0.5839084386825562, -0.33005380630493164, 0.2323288321...
new AccountStatement(new Period(new NullDate().DateTime,newNullDate().DateTime), 0); } ``` is undoubtedly not what you wanted. That makes a second instance of AccountStatement and does nothing with it. I think what you meant was this instead: ``` public AccountStatement() : this(new Period(new NullDate().DateTime, ...
[ 0.11891226470470428, 0.04113097861409187, 0.6274344325065613, -0.18183621764183044, 0.29388055205345154, -0.1105821281671524, 0.09058588743209839, 0.16662806272506714, -0.45852458477020264, -0.4785643219947815, -0.24021553993225098, 0.5440608859062195, -0.21968510746955872, 0.3462365269660...
We are writing a search application that saves the search criteria to session state and executes the search inside of an asp.net updatepanel. Sometimes when we execute multiple searches successively the 2nd or 3rd search will sometimes return results from the first set of search criteria. Example: our first search we...
[ 0.4023094177246094, 0.08892222493886948, 0.10007866472005844, 0.09430750459432602, 0.22032657265663147, 0.17011480033397675, 0.368315190076828, -0.22432763874530792, -0.34186702966690063, -0.8083749413490295, -0.20315350592136383, 0.5895517468452454, -0.3364824652671814, -0.168852537870407...
inside of the ajax request to format the DB query. When we put break points in VS everything behaves as normal, but without them we get the original search criteria and results. My guess is because they are saved in session, that the ajax request somehow gets its own session and saves the criteria to that, and then re...
[ 0.20387738943099976, -0.1351238489151001, 0.22369053959846497, 0.1825476437807083, -0.1566917896270752, -0.12982554733753204, 0.08078005909919739, -0.24935282766819, -0.0024126407224684954, -0.8280743360519409, 0.09759540110826492, 0.5073330998420715, -0.2166723757982254, 0.032197155058383...
saved and read. EDIT::: To elaborate more, there was a suggestion of appending the search criteria to the query string which normally is good practice and I agree thats how it should be but following our requirements I don't see it as being viable. They want it so the user fills out the input controls hits search and ...
[ 0.37322962284088135, 0.14164212346076965, 0.4807497262954712, 0.1491391360759735, 0.04119262844324112, -0.023432210087776184, 0.19186927378177643, -0.20265795290470123, -0.20984342694282532, -0.9335785508155823, 0.14312444627285004, 0.564132809638977, -0.05409278720617294, 0.08788412809371...
would have to do another request causing the whole page to load, which depending on the search criteria can take a really long time. This is why we are using an ajax call to perform the search and why we aren't causing another full page request..... I hope this clarifies the situation. There are not multiple sessions b...
[ 0.18004140257835388, -0.10006136447191238, 0.2708236873149872, 0.2513626515865326, -0.3023218512535095, -0.2556954026222229, 0.25786498188972473, -0.001446170499548316, -0.47080257534980774, -0.6066775918006897, -0.07252620160579681, 0.677485466003418, -0.05616769194602966, -0.006736032664...
to shuffle it around, since it will be available throughout the entire page lifecycle anyway. Finally, concerning your requirements... Using an UpdatePanel does *not* fulfill the requirement that your users should be able to use other functionality on the page if that functionality also raises partial postbacks. Only ...
[ 0.3916860520839691, -0.03913426026701927, 0.5819242596626282, 0.18080513179302216, 0.26775485277175903, -0.33933958411216736, 0.20834994316101074, 0.052831731736660004, -0.3728210926055908, -0.5800032615661621, -0.07830973714590073, 0.45151853561401367, 0.015126700513064861, 0.200846910476...
don't usually plug my own site, but I think a couple of my posts are exactly relevant to what you're doing: You could use a user control to render the search results through a web service (very much faster than an UpdatePanel): <http://encosia.com/2008/02/05/boost-aspnet-performance-with-deferred-content-loading/> Or...
[ 0.1756153255701065, 0.10935946553945541, 0.3326995074748993, -0.02036312036216259, -0.3368721306324005, -0.20362083613872528, 0.07574859261512756, 0.02832319587469101, -0.10767709463834763, -0.6097937822341919, -0.1491556614637375, 0.6784339547157288, 0.0070083788596093655, -0.161374181509...
I have a Publishing Portal site and I need to add some announcements to some of the pages. I've read an article which says that i have to create an announcement list to be able add an announcement web part but i can't seem to find any resources on how i can add an announcement list. Any help will be greatly appreciate...
[ 0.6072317361831665, 0.023883873596787453, -0.02525501511991024, -0.013234550133347511, -0.10268011689186096, -0.47398144006729126, 0.5879827737808228, -0.13118308782577515, -0.21275421977043152, -0.30276331305503845, 0.06092168763279915, 0.6156031489372253, -0.056464433670043945, 0.2052127...
a dashboard listing all of the SharePoint lists that have been provisioned for the current site. Click on the Create button to create a new SharePoint list. [Create new SharePoint List http://friendfeed.s3.amazonaws.com/6c0b244801826f8b3ee01811211b88668ba8f713](http://friendfeed.s3.amazonaws.com/6c0b244801826f8b3ee018...
[ 0.20834127068519592, -0.03155778720974922, 0.5996547937393188, 0.18205204606056213, -0.13329491019248962, -0.0788378044962883, 0.28396570682525635, 0.0027578393928706646, -0.19703355431556702, -0.6041281223297119, -0.052474625408649445, 0.6818470358848572, -0.06315123289823532, 0.009688575...
a web part listed with the same name as your Announcements list that you just created. Select that web part to add it to the page and display. Hope that helps. If this isn't the answer to your problem leave a comment or update your question with clarification and I will try to help.
[ 0.5307015776634216, -0.1406293660402298, 0.1299796849489212, 0.6895937919616699, -0.24986127018928528, -0.14698389172554016, 0.06369497627019882, 0.45599794387817383, -0.046594273298978806, -0.6158854961395264, -0.0356929711997509, 0.2024553120136261, -0.10452987253665924, -0.0135087762027...
I get this error when I do an `svn update`: > Working copy XXXXXXXX locked Please > execute "Cleanup" command When I run cleanup, I get > Cleanup failed to process the > following paths: XXXXXXXX How do I get out of this loop? One approach would be to: 1. Copy edited items to another location. 2. Delete the fold...
[ 0.5239525437355042, -0.04418393224477768, 0.289084792137146, 0.16935080289840698, -0.08145396411418915, -0.25011733174324036, 0.741944432258606, -0.11579091101884842, -0.3398052752017975, -0.585976243019104, -0.015598115511238575, 0.5503013134002686, -0.444670706987381, 0.3885946571826935,...
I've been aware of Steve Yegge's advice to [swap Ctrl and Caps Lock](http://steve.yegge.googlepages.com/effective-emacs#item1) for a while now, although I don't use Emacs. I've just tried swapping them over as an experiment and I'm finding it difficult to adjust. There are several shortcuts that are second nature to me...
[ 0.15596941113471985, 0.17078271508216858, 0.3099055588245392, -0.10379907488822937, 0.10814385116100311, 0.39610883593559265, 0.17164893448352814, -0.26821184158325195, -0.26952043175697327, -0.5643225312232971, -0.06825772672891617, 0.5393812656402588, -0.3540070950984955, 0.1633753180503...
which finger to put on `Z`, as it feels awkward with either my ring, middle or index finger. Is this something I'll get used to the same way I've got used to the original position and I should just give it time or **is this arrangement not suited to windows keyboard shortcuts**. I'd be interested to hear from people w...
[ 0.12900173664093018, -0.14379625022411346, 0.6424471735954285, -0.11233090609312057, 0.2594952881336212, -0.0395783968269825, -0.028076373040676117, -0.03704081475734711, -0.39450228214263916, -0.60428386926651, 0.2834773659706116, 0.7187584042549133, 0.39224815368652344, -0.08917734026908...
have any tips for finger positions or typing training to speed up the transition. I ended up taking the advice in Zach's answer, but I also made `Caps Lock` behave as an `ESC` key if it was held and released on it's own using the AutoHotKey script in this gist: [CapsLockCtrlEscape.ahk](https://gist.github.com/sedm0784/...
[ -0.1856670081615448, -0.032165538519620895, 0.7754658460617065, -0.058510757982730865, 0.21147681772708893, -0.05937984585762024, 0.14666134119033813, -0.32072871923446655, -0.2582225799560547, -0.15837207436561584, -0.10453531891107559, 0.7289379239082336, -0.11156172305345535, -0.1435027...
SQL is not my forte, but I'm working on it - thank you for the replies. I am working on a report that will return the completion percent of services for indiviudals in our contracts. There is a master table "Contracts," each individual Contract can have multiple services from the "services" table, each service has mul...
[ 0.4345713257789612, 0.16276466846466064, 0.298968642950058, 0.2428034245967865, -0.19504867494106293, -0.0628497526049614, 0.059217605739831924, 0.09629921615123749, -0.15738020837306976, -0.6561912298202515, 0.39807364344596863, 0.49396443367004395, 0.057680703699588776, 0.201260983943939...
this: Contract           Service           Percent complete --- abc Company   service 1        98% abc Company   service 2      100% xyz Company   service 1        50% Here's what I have so far: ``` SELECT Contract_ServiceId, (SUM(CompletionPercentage)/COUNT(CompletionPercentage)) * 100 as "Percen...
[ 0.32652997970581055, 0.14722220599651337, 0.6811697483062744, -0.3320862948894501, 0.0284102875739336, 0.13360990583896637, 0.1631171703338623, -0.6480194330215454, 0.4685562551021576, -0.6571429371833801, -0.3367454707622528, 0.5761504769325256, 0.09186097234487534, -0.01612037792801857, ...
standResp.StandardReportId WHERE Contract_ServiceId = '[an id]' GROUP BY Contract_ServiceID ``` This gets me too: Contract\_serviceid      Percent Complete --- [an id]                        100% EDIT: Tables didn't show up in post. I'm not sure if I understand the problem, if the result is ok for a service\_c...
[ 0.1128712147474289, 0.30343881249427795, 0.7439793944358826, -0.31967854499816895, 0.0017187162302434444, -0.0252346433699131, 0.39731189608573914, -0.5883476138114929, -0.08033803850412369, -0.6428009271621704, -0.25480833649635315, 0.4384492039680481, 0.031307652592659, 0.165543690323829...
INNER JOIN dbo.Contract_Service conSer ON sta.ServiceId = conSer.ServiceId INNER JOIN dbo.Contract con ON con.ContractId = conSer.ContractId LEFT OUTER JOIN dbo.StandardResponse standResp ON sta.StandardId = standResp.StandardId AND conSer.StandardReportId = standResp.StandardReportId G...
[ -0.13469812273979187, 0.33766821026802063, 0.6217168569564819, -0.6035920977592468, -0.37817397713661194, 0.22471606731414795, 0.4244531989097595, -0.7121326327323914, -0.023236693814396858, -0.6039677262306213, -0.47715795040130615, 0.33933761715888977, -0.19197343289852142, -0.1502827107...
We have a project that generates a code snippet that can be used on various other projects. The purpose of the code is to read two parameters from the query string and assign them to the "src" attribute of an iframe. For example, the page at the URL <http://oursite/Page.aspx?a=1&b=2> would have JavaScript in it to rea...
[ 0.5238025188446045, 0.1608765870332718, 0.1419113576412201, 0.13890397548675537, -0.054106902331113815, -0.20063436031341553, 0.02762659639120102, -0.11750150471925735, -0.04897527024149895, -0.5909032225608826, 0.03237863630056381, 0.050396136939525604, -0.3692244589328766, 0.079233631491...
has come stating that we need to use JavaScript, and that it can't use any third-party JavaScript tools (such as jQuery or Prototype). One way I know of is to replace any instances of "<", single quote, and double quote from the parameters before using them, but that doesn't seem secure enough to me. One of the param...
[ 0.45930835604667664, 0.41781291365623474, 0.6526116132736206, -0.0961572453379631, -0.07472671568393707, -0.19199542701244354, 0.2710828185081482, 0.036518026143312454, -0.19411343336105347, -0.6394741535186768, -0.23891492187976837, 0.1847366988658905, -0.2837497293949127, 0.2250659018754...
which exposes query parameters via the [*searchParams*](https://developer.mozilla.org/en-US/docs/Web/API/URL/searchParams) property. You need to supply a base URL even if you just want to get URL parameters from a relative URL, but it's better than rolling your own. ``` let searchParams/*: URLSearchParams*/ = new URL(...
[ 0.07005391269922256, 0.1498851776123047, 0.5734362006187439, 0.0018554237904027104, -0.1878621131181717, 0.284829318523407, -0.026222407817840576, -0.6205700635910034, -0.251124769449234, -0.3787175714969635, -0.3356906771659851, 0.28006523847579956, -0.31768864393234253, 0.155565828084945...
is mentioned multiple time as in `/path?foo=bar&foo=baz`. --- Don't use escape and unescape, use decodeURIComponent. E.g. ``` function queryParameters(query) { var keyValuePairs = query.split(/[&?]/g); var params = {}; for (var i = 0, n = keyValuePairs.length; i < n; ++i) { var m = keyValuePairs[i].match(/...
[ -0.1423315852880478, -0.12475856393575668, 0.7290874123573303, -0.017834769561886787, 0.061747752130031586, 0.3018733561038971, 0.4841086268424988, -0.6474884152412415, -0.4445918798446655, -0.45506906509399414, -0.5843499898910522, 0.23446878790855408, -0.2956973612308502, 0.3317525982856...
be safely injected into HTML without allowing script to run. Make sure you escape the following <, >, &, and ". It will not guarantee that the parameters were not spoofed. If you need to verify that one of your servers generated the URL, do a search on URL signing.
[ 0.15265204012393951, -0.07892346382141113, 0.3503052592277527, 0.17007288336753845, -0.17368480563163757, -0.5372961163520813, 0.5693437457084656, 0.03764079511165619, -0.09773029386997223, -0.6930264234542847, -0.1381322741508484, 0.44951462745666504, -0.14021089673042297, -0.171921074390...
I have a Java process that opens a file using a FileReader. How can I prevent another (Java) process from opening this file, or at least notify that second process that the file is already opened? Does this automatically make the second process get an exception if the file is open (which solves my problem) or do I have...
[ 0.1467239111661911, 0.3578815758228302, 0.024569304659962654, -0.13222000002861023, -0.1971733123064041, -0.30847078561782837, 0.28683847188949585, -0.23815707862377167, -0.30601176619529724, -0.615551233291626, -0.14149907231330872, 0.41759949922561646, -0.34293925762176514, 0.18666008114...
other. The processing of each file consists of reading it and doing some calculations based on the contents and it takes about 2 minutes. I also have another Java app that does the same thing but instead writes on the file. What I want is to be able to run these apps at the same time so the scenario goes like this. Rea...
[ 0.3654908835887909, 0.04179365932941437, 0.3624586760997772, 0.12733332812786102, 0.29622912406921387, -0.09504973143339157, 0.17296048998832703, -0.1865854114294052, -0.22272156178951263, -0.7271358370780945, 0.12810002267360687, 0.6381977200508118, -0.20633672177791595, -0.25252309441566...
an exception or whatever way) and goes to file B. ReadApp finishes file A and continues to B. It sees that it is open and continues to C. It is crucial that WriteApp doesn't write while ReadApp is reading the same file or vice versa. They are different processes. FileChannel.lock is probably what you want. ``` try ( ...
[ 0.11692007631063461, -0.3231484591960907, 0.8104057312011719, -0.026978759095072746, 0.17514292895793915, -0.17039494216442108, 0.41904714703559875, -0.3541766405105591, -0.3829863965511322, -0.8684577941894531, -0.07978779822587967, 0.5916474461555481, -0.30769675970077515, 0.138566806912...
for FileLock](https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/nio/channels/FileLock.html#pdep).
[ 0.20975865423679352, -0.22683203220367432, 0.38751858472824097, 0.056394439190626144, 0.40308719873428345, 0.15808850526809692, -0.22183872759342194, -0.1708049178123474, -0.526767909526825, -0.3639967143535614, -0.27081915736198425, 0.5999505519866943, -0.5344732403755188, 0.0567678324878...
What do you think the benefits of functional programming are? And how do they apply to programmers today? What are the greatest differences between functional programming and OOP? The style of functional programming is to describe what you want, rather than how to get it. ie: instead of creating a for-loop with an ite...
[ 0.44405826926231384, 0.09291975945234299, -0.367899090051651, 0.12229572981595993, -0.2835482656955719, 0.03313880041241646, 0.2634798586368561, -0.14911946654319763, -0.23950187861919403, -0.47816815972328186, -0.22624419629573822, 0.5035204887390137, -0.4489598274230957, -0.2190477550029...
comprehensions and caching. The biggest benefit of Functional programming is brevity, because code can be more concise. A functional program doesn't create an iterator variable to be the center of a loop, so this and other kinds of overhead are eliminated from your code. The other major benefit is concurrency, which ...
[ -0.12320534884929657, -0.11092731356620789, 0.03639966994524002, 0.39820703864097595, -0.4384898841381073, -0.09032553434371948, 0.29382747411727905, -0.057795196771621704, -0.46253740787506104, -0.5870500206947327, -0.18501710891723633, 0.7843848466873169, -0.42328593134880066, -0.2380301...
program is written, because most functional languages and extensions support lazy evaluation. In Haskell you can say "this label represents an array containing all the even numbers". Such an array is infinitely large, but you can ask for the 100,000th element of that array at any moment without having to know--at array...
[ -0.19426457583904266, -0.19364190101623535, 0.18218892812728882, 0.2114541083574295, -0.03438706696033478, 0.10389687120914459, 0.22318203747272491, 0.09685099124908447, -0.21530623733997345, -0.33410680294036865, -0.22169555723667145, 0.33554142713546753, -0.29251691699028015, -0.16644015...
I find my self having a repeater control which is being databound to an xml document. My client is now requesting that the Textbox's which are being repeater can be either a Textbox or a Checkbox. I cannot seem to find an easyway to essentially do the following: ``` if ((System.Xml.XmlNode)e.Item.DataItem.Attributes[...
[ 0.0029131402261555195, -0.014276983216404915, 0.7221739292144775, 0.04666993394494057, -0.15112432837486267, 0.1526855230331421, 0.33663809299468994, -0.4331328272819519, 0.014273627661168575, -0.4220462441444397, 0.39482080936431885, 0.47411519289016724, -0.2578659951686859, 0.35355061292...
to this in your markup in each the textbox and checkbox controls? > ``` > Visible=<%= Eval("type").tostring() == "text") %> > > ```
[ -0.10329925268888474, 0.0444413423538208, 0.423657089471817, -0.1647576242685318, 0.1278422325849533, 0.16232092678546906, 0.21874083578586578, -0.2062704861164093, -0.07586101442575455, -0.5644341707229614, -0.2734147906303406, 0.47903913259506226, -0.2808261811733246, -0.2432893812656402...
Given an `Item` that has been appended to a `Form`, whats the best way to find out what index that item is at on the Form? `Form.append(Item)` will give me the index its initially added at, but if I later insert items before that the index will be out of sync. This was the best I could come up with: ``` private int g...
[ -0.0679749920964241, -0.24134540557861328, 0.6304879784584045, -0.12099256366491318, -0.07687565684318542, 0.0421648845076561, 0.30945688486099243, -0.5653099417686462, 0.11143545806407928, -0.6398910880088806, -0.08836209774017334, 0.4786992073059082, -0.36472684144973755, 0.2080495357513...
i; } } return -1; } ``` I haven't actually tested this but it should work, I just don't like having to enumerate every item but then there should never be that many so I guess its ok.
[ 0.09838799387216568, 0.18953962624073029, 0.12641969323158264, -0.029676517471671104, 0.07966751605272293, -0.2885269522666931, 0.06332574784755707, 0.06960639357566833, 0.30687543749809265, -0.46615853905677795, -0.04032513126730919, 0.5603044033050537, -0.2708928883075714, 0.237999930977...
The Database Tuning Advisor is recommending that I create a bunch of statistics in my Database. I'm something of a SQL n00b, so this was the first time I'd ever come across such a creature. The entry in MSDN was a little obtuse - could someone explain what exactly this does, and why it's a good idea? [Cost Based Query ...
[ 0.6632300019264221, -0.38237303495407104, -0.041144318878650665, 0.24279186129570007, -0.11981746554374695, -0.08231611549854279, -0.17747332155704498, -0.350140780210495, 0.01708538644015789, -0.3292361795902252, 0.2571355998516083, 0.5220100283622742, -0.2614428997039795, 0.0029601489659...
uses heuristics to estimate the costs. It then selects the cheapest query plan. Statistics are used by the query optimiser to calculate the cost of the query plans. If the statistics are missing or out of date it does not have correct data to estimate the plan. In this case it can generate query plans that are moderat...
[ 0.07814116775989532, -0.19125321507453918, 0.24857845902442932, 0.5557544231414795, 0.1533227264881134, -0.015780270099639893, -0.20842604339122772, -0.20020820200443268, 0.03880269080400467, -0.6111717820167542, 0.02492455579340458, 0.65703946352005, 0.02767985500395298, -0.15563274919986...
be added for.
[ 0.3110344409942627, 0.017135312780737877, 0.04630512371659279, -0.14981451630592346, 0.02081308700144291, 0.20107416808605194, 0.06046989560127258, -0.2549395263195038, 0.048549920320510864, -0.36807841062545776, -0.3191523253917694, 0.3229459226131439, -0.1743442565202713, -0.291639178991...
My program generates relatively simple PDF documents on request, but I'm having trouble with unicode characters, like kanji or odd math symbols. To write a normal string in PDF, you place it in brackets: ``` (something) ``` There is also the option to escape a character with octal codes: ``` (\527) ``` but this o...
[ 0.007677044253796339, 0.18482032418251038, 0.1667017638683319, 0.2173336148262024, -0.033391278237104416, -0.08840931951999664, 0.28613802790641785, -0.10407495498657227, -0.08973849564790726, -0.7216611504554749, -0.1778704822063446, 0.3818293809890747, -0.24696511030197144, -0.2080853134...
the job for me. The one I'm currently using is a version of gnujpdf (which I've fixed several bugs in, since the original author appears to have gone AWOL), that allows you to program against an AWT Graphics interface, and ideally any replacement should do the same. The alternatives seem to be either HTML -> PDF, or a...
[ 0.4593210220336914, 0.031668853014707565, 0.2783522605895996, -0.019650418311357498, -0.027904950082302094, -0.19800807535648346, 0.27754318714141846, 0.038590624928474426, -0.20196686685085297, -0.873309314250946, -0.08086001873016357, 0.8469332456588745, -0.25991982221603394, -0.27709248...
realise before, but the iText library has a Graphics2D API and seems to handle unicode perfectly, so that's what I'll be using. Though it isn't an answer to the question as asked, it solves the problem for me. --- **Edit 3:** iText is working nicely for me. I guess the lesson is, when faced with something that seems ...
[ 0.22738762199878693, -0.009172141551971436, 0.4337413012981415, 0.07732211798429489, -0.2743586301803589, -0.20230115950107574, 0.028289593756198883, 0.19653324782848358, -0.26920920610427856, -0.7177889347076416, -0.32136255502700806, 0.6474573016166687, 0.013239637017250061, -0.303225338...
the mechanisms of text display. I implemented all of the PDF support for my company, and handling text was by far the most complex part of exercise. The solution you discovered — use a 3rd party library to do the work for you — is really the best choice, unless you have very specific, special-purpose requirements for y...
[ 0.06524449586868286, 0.1383431851863861, 0.3385907709598541, 0.317116379737854, -0.07236584275960922, -0.11305928230285645, 0.034076038748025894, -0.20998872816562653, -0.06804145872592926, -0.5428279638290405, -0.25981444120407104, 1.0465980768203735, 0.027039898559451103, -0.408079177141...
I'm using the Crystal Reports included with VisualStudio 2005. I would like to change the image that is displayed on the report at runtime ideally by building a path to the image file and then have that image displayed on the report. Has anyone been able to accomplish this with this version of Crystal Reports? At work...
[ 0.6498105525970459, -0.09733062982559204, 0.5707785487174988, 0.16973543167114258, -0.41731777787208557, 0.04936451464891434, -0.04349609836935997, -0.1513519287109375, -0.47541967034339905, -0.7031493186950684, 0.5639308094978333, 0.6137610077857971, -0.007070040330290794, -0.083270505070...
hack at best. I really wish that image parameters were a possibility with CR. **Edit:** It's worth noting, if you are binding your crystal report to plain old objects you want to expose a byte[] property for the report to treat that as an image.
[ 0.5447341203689575, 0.252329558134079, 0.09847605228424072, 0.3743571639060974, -0.40967366099357605, -0.3994772732257843, 0.26124417781829834, 0.308240681886673, -0.5489752292633057, -0.4755675792694092, -0.14257898926734924, 0.6386655569076538, 0.05655664578080177, 0.2774806618690491, ...
Is there a way to view a SVG from either a file or webpage dynamically using Silver light or flash? **Edit:** I am currently converting them on the server using inkscape. The only trouble with this is the time it takes to make all 60+ pages of the catalog is a little slow. It take 5 min to make it, and some customers ...
[ 0.5426816344261169, 0.06792683899402618, 0.73482346534729, 0.08703187853097916, -0.3402438461780548, -0.1376919001340866, 0.1541077345609665, -0.23618273437023163, -0.31529682874679565, -0.8407167792320251, 0.23976755142211914, 0.4232846200466156, -0.18874786794185638, -0.06208731606602669...
answer -- No, Silverlight does not interpret SVG directly. I'm not sure about Flash though.
[ 0.30813702940940857, 0.07576622068881989, 0.22744633257389069, 0.2624583840370178, -0.4867308735847473, -0.24980203807353973, 0.12514358758926392, 0.11245816946029663, -0.17257273197174072, -0.28174519538879395, 0.0920509621500969, 0.2838490307331085, -0.02418275736272335, -0.0882761180400...
We are using SQL Server 2005, but this question can be for any [RDBMS](http://en.wikipedia.org/wiki/Relational_database_management_system). Which of the following is more efficient, when selecting all columns from a view? ``` Select * from view ``` or ``` Select col1, col2, ..., colN from view ``` NEVER, EVER U...
[ -0.1259889006614685, 0.24115681648254395, 0.6294503211975098, -0.10368205606937408, -0.05995311588048935, -0.09220919013023376, -0.04636804759502411, -0.045867983251810074, -0.3195716142654419, -0.5542829036712646, -0.07380413264036179, 0.590783953666687, -0.524092435836792, 0.088098406791...
if your select \* query was only meant to return those 3 fields for the calling code, then you're pulling much more data from the database than you need. Another reason is performance. In query design, don't think about reusability as much as this mantra: TAKE ALL YOU CAN EAT, BUT EAT ALL YOU TAKE.
[ 0.23893031477928162, -0.01650548353791237, -0.40320277214050293, 0.07980182766914368, -0.0025027417577803135, 0.025997208431363106, 0.14836226403713226, 0.19746729731559753, -0.15604090690612793, -0.7112483382225037, 0.1384173482656479, 0.5894815921783447, -0.4301544725894928, 0.0568844750...
Suppose we have a 3D Space with a plane on it with an arbitrary equation: ax+by+cz+d=0 now suppose that we pick 3 random points on that plane: (x0, y0, z0) (x1, y1, z1) (x1, y1, z1) now I have a different point of view(camera) for this plane. I mean I have a different camera that will look at this plane from a differe...
[ 0.0263642780482769, -0.20150701701641083, 0.28800997138023376, 0.041905082762241364, -0.13209111988544464, 0.5693134665489197, 0.009444265626370907, -0.4431667625904083, -0.17116907238960266, -0.6228524446487427, -0.08352209627628326, 0.18499910831451416, -0.2473582774400711, 0.24315938353...
the new camera point of view. I want to pick a point for example (X,Y) from the new camera point of view and tell where it will be on that plane. All I know is that 3 points and their locations on 3D space and their projection locations on the new camera view. --- Do you know the coefficients of the plane-equation a...
[ 0.30747902393341064, 0.3590829074382782, 0.88590407371521, 0.11465813964605331, -0.07640352845191956, 0.22914403676986694, -0.1340370625257492, -0.5444691181182861, -0.13444553315639496, -0.5500693321228027, 0.07228989154100418, 0.5639793872833252, -0.40445008873939514, 0.34021395444869995...
(0,0,0) point of view. and then we have the camera that can only see the points! So the only thing that camera sees is 3 points and also it knows their locations in 3D space (and for sure their locations on 2D camera view plane). and after all I want to look at camera view, pick a point (for example (x1, y1)) and tell ...
[ -0.1411866992712021, 0.09929398447275162, 0.7372304797172546, 0.29024407267570496, -0.24297650158405304, -0.0628739520907402, 0.06028871610760689, -0.16075481474399567, -0.12511831521987915, -0.5363572835922241, 0.029384607449173927, 0.47426971793174744, -0.21038079261779785, 0.19037587940...
to a backing store. But what happened in the WinForms world was that people often used them for everything that required a multi-element scrolling list. Souped-up third-party DataGrids soon became available that allowed columns and fields to contain buttons and ComboBoxes and icons, etc. The DataGrid became a workho...
[ 0.13412028551101685, -0.2756574749946594, 0.4297511875629425, 0.39797234535217285, -0.2130075991153717, -0.12504731118679047, 0.006488606799393892, 0.1935139000415802, -0.3280569314956665, -0.4091910719871521, 0.04605035483837128, 0.4170083999633789, -0.20349743962287903, 0.024693131446838...
programmers like me were still thinking in this fashion, and sought out WPF ports of the DataGrid concept.
[ 0.1717948019504547, -0.0953657254576683, -0.09149990230798721, 0.28998449444770813, -0.27989158034324646, -0.3065711557865143, 0.0676434189081192, 0.21993382275104523, -0.31723982095718384, -0.5439207553863525, 0.10617783665657043, 0.3544977009296417, -0.06398386508226395, -0.0599538050591...
I've just updated my ruby installation on my gentoo server to ruby 1.8.6 patchlevel 287 and have started getting an error on one of my eRuby apps. The error given in the apache error\_log file is: ``` [error] mod_ruby: /usr/lib/ruby/1.8/cgi.rb:774: superclass mismatch for class Cookie (TypeError) ``` The strange thi...
[ 0.2880899906158447, 0.30718427896499634, 0.029262268915772438, -0.19022627174854279, -0.11617603898048401, -0.15819929540157318, 0.863329291343689, 0.011285148561000824, -0.2982288599014282, -0.6839621663093567, -0.054936159402132034, 0.6523926854133606, -0.36859673261642456, 0.23177772760...
If I have a subclass that has yet to implement a function provided by the base class, I can override that function and have it throw a `NotSupportedException`. Is there a way to generate a compile-time error for this to avoid only hitting this at runtime? Update: I can't make the base class abstract. [Obsolete("This s...
[ 0.4294372797012329, 0.14151586592197418, -0.11832457035779953, -0.1671534925699234, -0.006711849942803383, -0.3288673758506775, 0.9693026542663574, -0.0395774282515049, 0.12882420420646667, -0.4727940559387207, -0.14074654877185822, 0.8167920708656311, -0.2015783041715622, 0.10372010618448...
I have a new application written in WPF that needs to support an old API that allows it to receive a message that has been posted to a hidden window. Typically another application uses FindWindow to identify the hidden window using the name of its custom window class. **1) I assume to implement a custom window class I...
[ 0.41807520389556885, -0.003237373661249876, 0.06577692925930023, -0.11160007119178772, -0.1749027818441391, -0.16529473662376404, 0.33682820200920105, 0.03526526317000389, -0.13112474977970123, -0.7716706991195679, 0.0844995304942131, 0.4409840404987335, -0.22721028327941895, 0.17940723896...
unmanaged code. I have tried inheriting from System.Windows.Interop.HwndHost and using System.Runtime.InteropServices.DllImport to pull in the above API methods. Doing this I can successfully host a standard win32 window e.g. "listbox" inside WPF. However when I call CreateWindowEx for my custom window it always retu...
[ 0.2784242033958435, -0.009167124517261982, 0.17006468772888184, 0.06924476474523544, -0.1673959642648697, -0.21648259460926056, 0.47483718395233154, -0.2723163068294525, -0.37064266204833984, -0.8082415461540222, 0.17147327959537506, 0.7192708253860474, -0.3920868933200836, 0.2390454560518...
that will create a custom window class in c# - useful for supporting old APIs you might have that rely on custom window classes. It should work in either WPF or Winforms as long as a message pump is running on the thread. EDIT: Updated to fix the reported crash due to early collection of the delegate that wraps the c...
[ 0.17714715003967285, -0.15180525183677673, 0.21097882091999054, 0.15755631029605865, 0.02229337766766548, -0.11500920355319977, 0.14592841267585754, -0.27925604581832886, -0.4834652841091156, -0.5077387094497681, -0.06584295630455017, 0.5914916396141052, -0.488962858915329, 0.3030983507633...
wParam, IntPtr lParam); [System.Runtime.InteropServices.StructLayout( System.Runtime.InteropServices.LayoutKind.Sequential, CharSet = System.Runtime.InteropServices.CharSet.Unicode )] struct WNDCLASS { public uint style; public IntPtr lpfnWndProc; public int cbCls...
[ -0.12709684669971466, -0.21406833827495575, 0.5112746953964233, -0.1556215137243271, -0.23471584916114807, 0.3089306354522705, 0.40628355741500854, -0.39044511318206787, -0.1956830471754074, -0.6560694575309753, -0.6401896476745605, 0.415606826543808, -0.3711957335472107, 0.249799221754074...
public IntPtr hCursor; public IntPtr hbrBackground; [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] public string lpszMenuName; [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] public s...
[ -0.33490705490112305, 0.11194885522127151, 0.42345893383026123, 0.1454990804195404, 0.1939576417207718, 0.06387698650360107, 0.17906859517097473, -0.549961268901825, -0.41547128558158875, -0.33649057149887085, -0.4909219443798065, 0.49506378173828125, -0.41647812724113464, 0.31701090931892...
UInt32 dwExStyle, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] string lpClassName, [System.Runtime.InteropServices.MarshalAs(System.Runtime.InteropServices.UnmanagedType.LPWStr)] string lpWindowName, UInt32 dwStyle, Int32 x, ...
[ -0.2094428390264511, -0.03877677768468857, 0.4235524535179138, 0.016719162464141846, 0.22234196960926056, 0.47442519664764404, -0.01824636571109295, -0.20855554938316345, -0.3387667238712311, -0.5987739562988281, -0.2918814718723297, 0.279187947511673, -0.4405434727668762, 0.19465820491313...
IntPtr hInstance, IntPtr lpParam ); [System.Runtime.InteropServices.DllImport("user32.dll", SetLastError = true)] static extern System.IntPtr DefWindowProcW( IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam ); [System.Runtime.InteropServices.DllImport("user32.dll", SetLastError =...
[ 0.1712670773267746, 0.0281070563942194, 0.32302531599998474, -0.1895383596420288, 0.3405362665653229, -0.024635963141918182, 0.6848232746124268, -0.3349412679672241, -0.16314342617988586, -0.41193822026252747, -0.55716472864151, 0.6974505186080933, -0.43333449959754944, 0.28323864936828613...
Dispose() { Dispose(true); GC.SuppressFinalize(this); } private void Dispose(bool disposing) { if (!m_disposed) { if (disposing) { // Dispose managed resources }
[ 0.31656405329704285, -0.20117026567459106, -0.08786418288946152, -0.3189087510108948, 0.3409430980682373, -0.28814032673835754, 0.272215873003006, -0.38110238313674927, -0.2775263488292694, -0.5131511092185974, -0.2610796391963959, 0.8202223181724548, -0.3438045084476471, 0.447950720787048...
// Dispose unmanaged resources if (m_hwnd != IntPtr.Zero) { DestroyWindow(m_hwnd); m_hwnd = IntPtr.Zero; } } } public CustomWindow(string class_name){ if (class_name == null) throw
[ 0.31376945972442627, -0.27053263783454895, -0.1472555547952652, -0.07341340184211731, 0.27166369557380676, -0.0805184543132782, 0.4864480793476105, -0.49848923087120056, -0.16922812163829803, -0.5359261631965637, -0.0009438959532417357, 0.8012661933898926, -0.15212644636631012, 0.487964570...
new System.Exception("class_name is null"); if (class_name == String.Empty) throw new System.Exception("class_name is empty"); m_wnd_proc_delegate = CustomWndProc; // Create WNDCLASS WNDCLASS wind_class = new WNDCLASS(); wind_class.lpszClassName = class_name; wind_class...
[ -0.4043104350566864, -0.25506168603897095, 0.5550512671470642, -0.10177042335271835, 0.23369550704956055, 0.0853118896484375, 0.3499933183193207, -0.49942755699157715, -0.6456034183502197, -0.7433640360832214, -0.4520795941352844, 0.24128080904483795, -0.2196662575006485, 0.426429331302642...
if (class_atom == 0 && last_error != ERROR_CLASS_ALREADY_EXISTS) { throw new System.Exception("Could not register window class"); } // Create window m_hwnd = CreateWindowExW( 0, class_name, String.Empty,
[ 0.011336078867316246, -0.18498171865940094, 0.23866157233715057, -0.17700353264808655, 0.19389669597148895, -0.1280919909477234, 0.49163147807121277, -0.10498145967721939, 0.016296712681651115, -0.8082475066184998, -0.25237590074539185, 0.2794562876224518, -0.19670361280441284, 0.315371572...
0, 0, 0, 0, 0, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero,
[ -0.27417895197868347, 0.022632800042629242, 0.4929129481315613, 0.025096043944358826, -0.160885751247406, 0.6936261653900146, -0.12422901391983032, -0.3390582799911499, -0.1274801641702652, -0.3580230176448822, 0.09640069305896759, 0.04041096195578575, -0.2601815164089203, 0.46973100304603...
IntPtr.Zero ); } private static IntPtr CustomWndProc(IntPtr hWnd, uint msg, IntPtr wParam, IntPtr lParam) { return DefWindowProcW(hWnd, msg, wParam, lParam); } private WndProc m_wnd_proc_delegate; } ```
[ -0.10265100002288818, -0.28726571798324585, 0.39445075392723083, -0.1741257905960083, 0.2872124910354614, 0.07600666582584381, 0.2669954299926758, -0.24669697880744934, -0.21986304223537445, -0.366860568523407, -0.5113925337791443, 0.6989585161209106, -0.45552772283554077, 0.30118206143379...
I'm trying to get the contents of a XML document element, but the element has a colon in it's name. This line works for every element but the ones with a colon in the name: ``` $(this).find("geo:lat").text(); ``` I assume that the colon needs escaping. How do I fix this? Use a backslash, which itself should be esca...
[ 0.03520800545811653, 0.24128718674182892, 0.2392076849937439, -0.1259339153766632, 0.30297696590423584, 0.008861035108566284, 0.08540678024291992, 0.02435583807528019, -0.04608318209648132, -0.6370983719825745, -0.44587233662605286, 0.3702336251735687, -0.6251519322395325, -0.0775551199913...
Are there any methods/systems that you have in place to incentivize your development team members to write "good" code and add comments to their code? I recognize that "good" is a subjective term and it relates to an earlier question about [measuring the maintainability of code](https://stackoverflow.com/questions/1273...
[ 0.6581596732139587, 0.4682294428348541, -0.0006803411524742842, 0.3307642638683319, -0.2887759804725647, -0.32800495624542236, 0.31912291049957275, 0.11672919988632202, -0.24289846420288086, -0.2344403862953186, 0.13773539662361145, 0.9154633283615112, 0.22879807651042938, -0.1632245630025...
code has large areas that fall in the realm of opinion and almost any system can be gamed. At all the jobs I have had, the good developers were intrinsically motivated to write good code. Chicken and egg, feedback, catch 22, call it what you will, the best way to get good code is to hire motivated developers. Creating...
[ 0.7507562637329102, 0.2715092897415161, -0.30091413855552673, 0.32002899050712585, -0.07933393865823746, -0.02615363895893097, 0.5498501062393188, 0.400372177362442, -0.0033826474100351334, -0.8414556384086609, -0.08896245807409286, 0.724053144454956, 0.015425192192196846, -0.1763916611671...
have found that one part of creating an environment where good developers want to work includes ensuring situations where developers talk about code. I don't know a skilled programmer that doesn't appreciate a good critique of his code. This helps the people that like to be the best get better. As a smaller sub-part of...
[ 0.5087175965309143, 0.5122749209403992, -0.22578644752502441, 0.2043033093214035, -0.36244997382164, -0.38027459383010864, 0.5059094429016113, 0.045924294739961624, -0.2782062888145447, -0.5904848575592041, -0.06231633946299553, 0.8921747803688049, 0.29213836789131165, -0.06800518929958344...
code. It was less formal and allowed people to show off new techniques, tools, features. Critiques were made, kudos were given publicly, and most developers didn't seem to mind speaking in front of a small developer group where they knew everyone. If management cannot see the benefit in this, spring for sammiches and c...
[ 0.6941735148429871, -0.2278742790222168, -0.3638324737548828, 0.3504742980003357, -0.5374540090560913, -0.48494669795036316, 0.37353330850601196, 0.2935428023338318, -0.17948751151561737, -0.2877306044101715, -0.12446313351392746, 0.6193249225616455, -0.08918138593435287, -0.36017370223999...
for a while and gets people talking in an even more relaxed environment. Most devs will also show up if you offer to pick up a round or two of drinks afterwards. Wait a second, I noticed another theme. Free food! Seriously though, the point is to create an environment where people that already write good code and thos...
[ 0.9161184430122375, -0.11906493455171585, -0.1212344840168953, 0.24371296167373657, -0.10102607309818268, -0.5403742790222168, 0.512199878692627, 0.5594862699508667, -0.38751348853111267, -0.20308524370193481, 0.103785939514637, 0.472087562084198, -0.08709131926298141, -0.07105758786201477...
I'm looking for a way to visualize a piece of GML I'm receiving. What is the best freely available java library to use for this task? [GeoTools](http://geotools.codehaus.org/) provides a library for reading GML files. They also provide UI components for displaying geospatial formats their library supports.
[ 0.5406385660171509, 0.14495804905891418, 0.30293989181518555, 0.14100107550621033, -0.06767402589321136, -0.04019300639629364, -0.2344091236591339, 0.23118071258068085, -0.46610090136528015, -0.7794629335403442, -0.06472279131412506, 0.013565396890044212, -0.04559795930981636, 0.1983142346...
For customer service week this year, I have the privileged task of creating a technology themed gift basket. I'm trying to keep the basket under $50 as I have a bluetooth keyboard/mouse combo that I'll be adding to it. Besides canned air and monitor wipes, are there any other recommendations for a PC based basket? I wa...
[ 0.36516839265823364, -0.03518658131361008, 0.3706260919570923, 0.5116901993751526, 0.01602195017039776, -0.048395298421382904, 0.06081767752766609, 0.2489849179983139, -0.3441693186759949, -0.42596369981765747, 0.21939067542552948, 0.40213367342948914, 0.17665080726146698, 0.02928295731544...
I'd like to set a cookie via Django with that has several different values to it, similar to .NET's [HttpCookie.Values](http://msdn.microsoft.com/en-us/library/system.web.httpcookie_members(VS.80).aspx) property. Looking at the [documentation](http://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpR...
[ 0.5617311596870422, 0.26459094882011414, 0.19267331063747406, 0.0384184829890728, -0.029393497854471207, -0.06584884971380234, 0.04847779870033264, -0.25050628185272217, -0.26970934867858887, -0.5440611839294434, 0.16420090198516846, 0.3964678645133972, -0.2733675539493561, 0.1023735553026...
not use lots of cookies, because that would get annoying. .NETs multi-value cookies work exactly the same way as what you're doing in django using a separator. They've just abstracted that away for you. What you're doing is fine and proper, and I don't think Django has anything specific to 'solve' this problem. I will...
[ 0.8089598417282104, 0.20418453216552734, -0.1386365294456482, 0.2752968966960907, 0.033823855221271515, -0.35986998677253723, 0.4513358771800995, 0.11153165996074677, -0.2143041044473648, -0.632962703704834, 0.22732144594192505, 0.7477335333824158, -0.24627837538719177, -0.3420184850692749...
How would I go about spawning a separate process using a SQL Server 05/08 trigger? Ideally, I would like to spawn the process and have SQL Server not wait on the process to finish execution. I need to pass a couple parameters from the insert that is triggering the process, but the executable would take care of the rest...
[ 0.3536621034145355, 0.03411541134119034, 0.20431053638458252, -0.15589231252670288, -0.10182468593120575, 0.0027553867548704147, -0.004774949979037046, -0.21864847838878632, -0.12498721480369568, -0.17005766928195953, 0.15398161113262177, 0.6421836018562317, -0.16281206905841827, -0.033506...
I have a user reporting that when they use the back button to return to a web page that they come back as a different person. It seems like they may be accessing a different users profile. Here are the important parts of the code: ``` //here's the code on the web page public static WebProfile p = null; protected vo...
[ 0.36892107129096985, -0.0697941854596138, 0.6135168075561523, -0.1044505313038826, 0.11871014535427094, -0.0018547107465565205, 0.14362172782421112, -0.021320411935448647, -0.20746491849422455, -0.9985845685005188, -0.20090438425540924, 0.5028398036956787, -0.268138587474823, 0.25042948126...
(probably misnamed) public static WebProfile GetWebProfile() { //get shopperID from cookie string mscsShopperID = GetShopperID(); string userName = new tpw.Shopper(Shopper.Columns.ShopperId, mscsShopperID).Email; p = WebProfile.GetProfile(userName); return p; } ``` I'm using static methods...
[ 0.12810330092906952, -0.1530492901802063, 0.3973401188850403, -0.009466137737035751, -0.01686638966202736, -0.03849964216351509, 0.3175983726978302, 0.06652552634477615, -0.3749260902404785, -0.6824261546134949, -0.2287946194410324, 0.53437739610672, -0.647094190120697, 0.34285449981689453...
because I need to access the profile object within a `[WebMethod]` (called from javascript on the page). * Is there a way to access a profile object within a `[WebMethod]`? * If not, what choices do I have? In Perl: ``` #!/usr/local/bin/perl -w if (@ARGV != 2) { print "Usage: watchit.pl <cmd> <str>\n"; exit...
[ 0.42438533902168274, 0.0155266635119915, 0.7891696691513062, -0.23287823796272278, 0.2958652079105377, -0.013808473013341427, 0.4822366535663605, -0.1265990287065506, 0.013291730545461178, -0.8292736411094666, -0.2579663097858429, 0.5203571915626526, -0.2540692985057831, 0.2417163848876953...
} } ``` Example: ``` [bash$] ./watchit.pl ls stop watchit.pl watchit.pl~ watchit.pl watchit.pl~ ... # from another terminal type "touch stop" stop watchit.pl watchit.pl~ ``` You might want to add a sleep in there, though.
[ 0.2519606351852417, -0.18421946465969086, 0.39282849431037903, -0.3063931167125702, 0.6083575487136841, -0.279526025056839, -0.057223591953516006, 0.4497765600681305, -0.1110207587480545, -0.8652983903884888, -0.05045077204704285, 0.7546426057815552, -0.2713202238082886, -0.122098162770271...
I'm working on a web app that is somewhere between an email service and a social network. I feel it has the potential to grow really big in the future, so I'm concerned about scalability. Instead of using one centralized MySQL/InnoDB database and then partitioning it when that time comes, I've decided to create a sepa...
[ 0.3340195119380951, 0.2178398072719574, 0.3855867385864258, -0.016780659556388855, 0.1269029825925827, 0.3284395635128021, -0.1452294886112213, 0.014969339594244957, -0.3416111171245575, -0.605434000492096, 0.1723419725894928, 0.441994845867157, -0.03663436695933342, 0.20491816103458405, ...