text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
height of the text area in a Javascript array using quotes around the value, like this: ``` somesetting: "somevalue", height:"420", ``` When tinyMCE tries to do arithmetic on the height value, it somehow turns into a string, when it should have been treated as an integer. The script debugger revealed the height bein...
[ 0.007394136395305395, 0.14947782456874847, 0.7103193998336792, -0.3471159338951111, -0.0069200946018099785, 0.18666031956672668, 0.31477195024490356, -0.3201729953289032, -0.12965340912342072, -0.384500116109848, -0.08348092436790466, 0.6171093583106995, 0.06908223778009415, -0.23364041745...
After git clone, the config in the new repo looks like: ``` remote.origin.url=<some url> remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* branch.master.remote=origin branch.master.merge=refs/heads/master ``` Then, I can execute "git pull" and "git push". But I'm interested in only do "git pull", because I wan...
[ 0.05375024676322937, -0.34673577547073364, 0.7539176940917969, -0.21327273547649384, -0.0070931450463831425, 0.29083505272865295, -0.15702463686466217, -0.10019484162330627, -0.143711119890213, -0.5497941374778748, -0.17537090182304382, 0.6073148250579834, -0.25419166684150696, 0.053752064...
be different from the default fetch/pull repo. Looks like ``` git config remote.origin.receivepack /bin/false ``` Makes push to remote origin fail.
[ -0.19831819832324982, -0.8202267289161682, 0.37602096796035767, 0.012213785201311111, -0.07648345082998276, 0.02746526710689068, 0.22579096257686615, 0.009317133575677872, 0.025902386754751205, -0.4108750522136688, -0.28546440601348877, 0.5594947338104248, -0.14754626154899597, 0.155336126...
Imagine the following scenario: I am using SQL Server 2005. I have a transaction that is calling, among other SQL statements, a stored procedure that also has a transaction inside. The outer transaction sometimes fails and it is rolled back after the stored procedure is called and committed successfully. My question ...
[ -0.2583640217781067, 0.07447779178619385, -0.06332134455442429, -0.15126274526119232, -0.14416538178920746, -0.10270599275827408, -0.016703393310308456, -0.15729373693466187, -0.23152165114879608, -0.478038489818573, 0.17527490854263306, 0.6433501839637756, -0.2555308938026428, 0.103086784...
I want to place my crossdomain.xml file in a different location than the root because it just creates to much dependency issues. How can i tell flex to look from my crossdomain.xml file somewhere other than the root?Do i add the loadPolicy code to the init method of my flex app? Does anyone have any good samples on t...
[ 0.4810461699962616, -0.04649052023887634, 0.5149707198143005, -0.005959067028015852, 0.017661064863204956, -0.10372155904769897, -0.018328983336687088, -0.3308916389942169, -0.26639047265052795, -0.8624057173728943, 0.13758543133735657, 0.41708648204803467, -0.29244327545166016, -0.0326990...
Good morning, I am currently writing a python library. At the moment, modules and classes are deployed in an unorganized way, with no reasoned design. As I approach a more official release, I would like to reorganize classes and modules so that they have a better overall design. I drew a diagram of the import dependen...
[ 0.6459804177284241, 0.14342066645622253, 0.08969619125127792, -0.06483301520347595, -0.1424170732498169, -0.363325834274292, 0.1253785938024521, 0.20572350919246674, -0.4001380503177643, -0.6946402192115784, -0.011220953427255154, 0.41209906339645386, -0.22998586297035217, -0.0454447977244...
? Thanks **Update:** I was indeed looking for a rule of thumb. For example, suppose this case happens (**init**.py removed for clarity) ``` foo/bar/a.py foo/bar/b.py foo/hello/c.py foo/hello/d.py ``` now, if you happen to have d.py importing bar.b and a.py importing hello.c, I would consider this a bad setting. A...
[ 0.10752987116575241, 0.15584050118923187, 0.4710722863674164, -0.11189305782318115, 0.1586785912513733, 0.03132179379463196, 0.017762865871191025, -0.18364346027374268, -0.453199177980423, -0.5691828727722168, -0.4296494126319885, 0.4994182884693146, -0.20882658660411835, -0.06174678727984...
for example because you want to keep it "private" into the bar package, I would preferentially go for 1). There are many other similar cases. My rule of thumb is to reduce the number of dependencies and crossings at a minimum, so to prevent a highly branched, highly interweaved setup, but I could be wrong. **"I drew a...
[ 0.4260891079902649, 0.002635458717122674, -0.12901760637760162, -0.2124096006155014, -0.28061819076538086, -0.32647812366485596, 0.4456577003002167, 0.16261392831802368, -0.3772985339164734, -0.35287970304489136, -0.40315672755241394, 0.5293624997138977, -0.4020569324493408, -0.35258144140...
clear, meaningful and obvious. Do not make arbitrary technical groupings of classes into modules and modules into packages. Make the modules and package obvious and logical so that the list of imports is obvious, simple and logical. **"Also, I was considering some modification to the classes so to reduce these depe...
[ 0.28886401653289795, 0.09379100799560547, -0.03186627849936485, 0.16721504926681519, 0.00802785623818636, -0.2587333619594574, 0.07947694510221481, -0.19189392030239105, -0.2888560891151428, -0.7061818242073059, -0.2827015817165375, 0.7536117434501648, -0.1857869029045105, 0.04843700304627...
You're aiming for modules that can be imported neatly and cleanly into your application. If you have many closely-related modules (or alternative implementations) then packages can be used, but used sparingly. The Python libraries are relatively flat; and there's some wisdom in that. --- **Edit** One-way dependency...
[ 0.6224321126937866, 0.05219775065779686, -0.023041965439915657, 0.009696549735963345, 0.18598179519176483, -0.3096373677253723, 0.0949786975979805, -0.20267373323440552, -0.25515279173851013, -0.9465179443359375, -0.46522316336631775, 0.7065292000770569, -0.33815720677375793, -0.4933911561...
a flat list of directories with the dependencies expressed only via `import` statements.
[ 0.020527787506580353, -0.08878760784864426, 0.2583443820476532, 0.06917358934879303, 0.013891015201807022, -0.03678475320339203, -0.020429134368896484, 0.17134428024291992, -0.2945765554904938, -0.26800909638404846, -0.7617204785346985, 0.45958855748176575, -0.3277435898780823, 0.005203578...
What is the difference between `InvokeRequired` and `somecontrol.InvokeRequired`? like this, ``` delegate void valueDelegate(string value); private void SetValue(string value) { if (InvokeRequired) { BeginInvoke(new valueDelegate(SetValue),value); } else { someControl.Text = value; } ...
[ 0.072104312479496, -0.15983663499355316, 0.4806876480579376, -0.1625739485025406, 0.1351846605539322, -0.2042699158191681, 0.2977261245250702, -0.2534462511539459, 0.005631943698972464, -0.28163257241249084, -0.4974691867828369, 0.9780303239822388, -0.23140297830104828, 0.21929852664470673...
value; } } ``` The first version checks the thread responsible for *this* control. The second version checks the thread responsible for `someControl`. (And ditto for which control's thread they then delegate the invocation to.) They could potentially be different - although they really *shouldn't* be if the two c...
[ 0.10472769290208817, -0.14263223111629486, 0.08893084526062012, -0.017324885353446007, 0.19084811210632324, -0.20116598904132843, 0.23181432485580444, -0.0024705573450773954, 0.031649913638830185, -0.5386647582054138, -0.06833456456661224, 0.5633941292762756, -0.3482455909252167, 0.1696892...
1. Which programming languages are not supported by Eclipse? 2. How do we change this fact? 1) I dont know.... BrainF\*\*k + whitespace, probably. But I think you really care about #2. 2) [Make your own](http://www.informit.com/articles/article.aspx?p=370625). There are a slew of articles if you google for "eclipse ...
[ 0.6773519515991211, 0.07475969195365906, 0.13621287047863007, 0.11260362714529037, 0.0443771667778492, -0.15378828346729279, 0.08301309496164322, 0.04715065658092499, -0.06536594778299332, -0.41132861375808716, 0.03873654082417488, 0.7529624104499817, -0.1924736350774765, -0.38277205824851...
I have Programming Erlang book already and I use <http://www.erlang.org/> site. But I can't find good reference site for BIFs and modules like **lists:duplicate**. I found brief explanation from the end of Programming Erlang book but I need more ;( (about parameters, example code.. etc) anybody can help me out ab...
[ 0.6499704718589783, 0.44090536236763, 0.1440010666847229, 0.14358770847320557, -0.27771109342575073, -0.39157041907310486, 0.18062318861484528, -0.2225310504436493, -0.5865336060523987, -0.6780479550361633, 0.07726587355136871, 0.5038866996765137, -0.35782483220100403, -0.08885924518108368...
**Scenario:** I have a Javascript-generated web page that someone else wrote a long time ago that I'd like to pretty up using jQuery. My goal is to clean up the Javascript generated html that someone else produces just by using some jQuery calls against that HTML, after it has been generated. This will be *much* simp...
[ 0.3948290944099426, 0.20997685194015503, 0.006850556470453739, -0.10749148577451706, -0.1538778394460678, 0.026269854977726936, 0.29811614751815796, 0.062371838837862015, -0.187466099858284, -0.7621752023696899, 0.18921148777008057, 0.4984223544597626, -0.0870179757475853, -0.2314961701631...
$(document).ready(function() { alert('the other stuff ran, now do the jquery cleanup'); $('.foobar').css("display","none"); $('.doobar').css("display","inline"); /// ... so on and so forth ... }); </script> ``` **Problem:** The above works just fine, but when I comment out the ...
[ 0.23111172020435333, 0.12664975225925446, 0.5312796235084534, -0.2964712381362915, 0.0932556614279747, -0.30567923188209534, 0.2600175142288208, -0.12150567024946213, -0.15874217450618744, -0.33970552682876587, -0.46396443247795105, 0.92415452003479, -0.4574775695800781, -0.088635720312595...
is great, but without the alert, the jQuery seems to run before the other javascript has finished its output. **Question:** Is there a way to get the jQuery clean-up code to run *after* the js-generator code, but without having to put an alert() box in there? You can delay your cleanup code upto some extend by using f...
[ 0.48742157220840454, -0.11163365840911865, 0.3405296206474304, 0.07432228326797485, 0.08162873238325119, -0.3865169882774353, 0.2756624221801758, -0.3148571848869324, -0.4153062105178833, -0.3815758526325226, -0.14643290638923645, 0.7202765345573425, -0.04272732883691788, -0.17202678322792...
I have managed to send out (and receive) binary SMSs, but what I want to accomplish is to send Access Point settings or bookmarks or Email settings etc. Currently I'm sending out messages like: ``` //udh=0605040B8423F0 //message=FD0601AE02056A0045C60C037777772E676F6F676C65...000101 //udh iMessage->Des().Appen...
[ -0.0439155176281929, 0.11224231868982315, 0.4308842718601227, -0.1414615511894226, -0.17542757093906403, 0.6108371615409851, 0.8297770619392395, -0.3449524939060211, -0.2650603950023651, -0.7120738625526428, -0.25779440999031067, 0.581940770149231, -0.6393564939498901, 0.0532098188996315, ...
to some different port and is shown correctly. Asked it also from Nokia and verdict was that I can't be done. :( It can be done when phone is used as a modem and commands are sent from the PC. If I could figure out the way how to emulate all that in phone, then it would be cool.
[ 0.12110066413879395, 0.003916665446013212, 0.38887685537338257, 0.15797346830368042, 0.051970794796943665, -0.09401662647724152, 0.44072628021240234, -0.14989539980888367, -0.031657032668590546, -0.3335253596305847, 0.07253682613372803, 0.6008725166320801, -0.10226030647754669, 0.120701096...
I'm working on an app that's using [System.Net.Mail.MailAddress](http://msdn.microsoft.com/en-us/library/system.net.mail.mailaddress.aspx) and friends for sending emails. Does that parser implement the full [RFC5322](http://www.ietf.org/rfc/rfc5322.txt) or a subset or what? The MSDN is not very forthcoming on this topi...
[ 0.12762032449245453, 0.1481800526380539, 0.4424843490123749, -0.17359007894992828, -0.020392850041389465, 0.21378561854362488, 0.4211462140083313, -0.1502126306295395, -0.1662089228630066, -0.7888371348381042, -0.1779482066631317, 0.35473617911338806, -0.4730422794818878, -0.08031896501779...
Console.WriteLine("MailAddress failed '{0}' ({1}): {2}", c, i, addr); } } ``` With the following results on 3.5 SP1: ``` MailAddress failed ' ' (32): par.t1 pa.r t2@example.com MailAddress failed '"' (34): par.t1"pa.r"t2@example.com MailAddress failed '(' (40): par.t1(pa.r(t2@example.com MailAddress failed ')' ...
[ -0.4389788508415222, 0.48084309697151184, 0.7943973541259766, -0.0547419972717762, 0.3494117558002472, 0.5511457324028015, 0.6453279852867126, -0.5470753908157349, 0.20460568368434906, -0.5279682278633118, -0.06394828855991364, 0.783660888671875, -0.03264633193612099, 0.007990704849362373,...
I've recently installed MbUnit version 2.4.2.355 on our build server which runs via Cruise Control.NET and NAnt, on a Windows Server 2003 machine with .NET Framework 3.5 SP1 installed. I've checked every nook and cranny of the build scripts, and the NAnt output report on CC.NET tells me that the test project builds fi...
[ -0.023648114874958992, 0.18667489290237427, 0.6043292284011841, -0.25034254789352417, 0.18269409239292145, 0.3243367075920105, 0.21084189414978027, -0.4105307459831238, -0.38131722807884216, -0.7491827607154846, 0.036101147532463074, 0.7943000197410583, -0.10312805324792862, 0.258424401283...
(Rebuild target(s)). [exec] Build > succeeded. [exec] > "C:\dev\PROJ3.1\trunk\src\PROJ\Customer\CustomerUnitTests\Company.CustomerUnitTests.csproj" > (Rebuild target) (1) -> What this means is that the build of the unit test assembly succeeded. Thing is, at the end of the NAnt outputs is this: > mbunit-tests: [mb...
[ 0.3069323003292084, 0.3282434642314911, 0.20816755294799805, -0.18068070709705353, -0.10312675684690475, 0.20278958976268768, 0.729751706123352, -0.542117178440094, -0.16105768084526062, -0.6393167972564697, 0.053459979593753815, 0.8075382113456726, -0.0047559430822730064, -0.0590280964970...
assemblies built in the build server running Windows Server 2003 weren't being recognized as test assemblies; I tried copying those files into my XP machine and they weren't recognized either. I'm now wondering: what is the difference between a test assembly and a non-test assembly? I'm sure it has something to do wit...
[ 0.47737979888916016, 0.4989183843135834, -0.1361968070268631, 0.0063164010643959045, -0.17426259815692902, -0.23452094197273254, 0.44449079036712646, -0.11030495911836624, -0.2468583732843399, -0.4185784161090851, 0.019466612488031387, 0.4321545660495758, -0.355001300573349, 0.134623020887...
target platform (project properties, build) to be "Any CPU". After this try to open assembly which is generated on your build machine using Reflector. May be generated files are corrupted. And also could you please try to build the project manually using VS and load generated tests in MbUnit.
[ 0.4534827172756195, -0.17564019560813904, 0.10621502995491028, 0.2571719288825989, -0.10586799681186676, -0.06820059567689896, -0.02824508212506771, -0.15904967486858368, -0.1358373910188675, -0.868733823299408, -0.0031242927070707083, 0.4660339653491974, -0.12357184290885925, -0.016002282...
I'm trying to animate some UIImageViews for a 2D game. Using [UiView begin/commit animation] is out of the question, since I need to determine the positions of all Image Views at all times. Instead I'm changing the frame.origin.x/y in my UIImageViews to manualy control my animations. My problem is that the framerate dr...
[ 0.2798456847667694, -0.22134241461753845, 0.4681064486503601, 0.10135062038898468, -0.45467984676361084, 0.18448081612586975, 0.18065936863422394, 0.07355593889951706, -0.12263695895671844, -1.0683937072753906, 0.22799670696258545, 0.41745349764823914, -0.09373759478330612, 0.2541212737560...
the graphics card), but you do need to use the begin / commit animation block to get smooth animation. Using that, you can retrieve the current position of the view by accessing the backing layer of the UIView and obtaining its presentation layer. Dustin Bachrach has a [post](http://dbachrach.com/blog/2008/04/07/instan...
[ -0.11641798168420792, -0.20260438323020935, 0.5381451845169067, 0.28860411047935486, 0.03234795108437538, 0.11860215663909912, -0.15476228296756744, -0.131393164396286, -0.22226625680923462, -0.6650275588035583, -0.22246573865413666, 0.5364501476287842, 0.11082940548658371, 0.0550809651613...
moving across the screen, so if you need to have the UIImageView respond to touches you may need to replace it with a CALayer, insert it as a sublayer of your main UIView's layer, and call the hitTest method on the presentationLayer of that main layer. That should return the presentationLayer of your moving layer if it...
[ 0.20537863671779633, -0.3471951186656952, 0.877427875995636, 0.042805127799510956, -0.341143935918808, 0.21791735291481018, -0.2526913285255432, 0.041778773069381714, -0.204066202044487, -1.015307068824768, 0.08614800125360489, 0.4801870286464691, -0.217290997505188, 0.10545260459184647, ...
able to animate 50 moving translucent layers at 60 FPS (100 at 30 FPS) using just UIViews and CALayers.
[ 0.27242857217788696, -0.44183385372161865, 0.5900842547416687, 0.3359420895576477, -0.12475253641605377, 0.06523612141609192, 0.190638467669487, -0.27702516317367554, 0.14541737735271454, -0.9982923865318298, -0.266531378030777, 0.2604328393936157, 0.18079368770122528, -0.2405276596546173,...
I am not sure whether I am missing something basic. But I am unable to understand why the compiler is generating the error for this code: ``` class A { }; class B { public: B(); A* get() const; private: A* m_p; }; B::B() { m_p = new A; } A* B::get() const { //This is compiling fine return m...
[ 0.06788821518421173, 0.2665836215019226, 0.02840397320687771, -0.2600758969783783, 0.06329359859228134, 0.03011815994977951, 0.7596380710601807, -0.4075535535812378, -0.31649699807167053, -0.5167561769485474, -0.2161974310874939, 0.8964325189590454, -0.4965718686580658, 0.06893901526927948...
'return' : cannot convert from 'const class A \*' to 'class A \*' Conversion loses qualifiers `const` in the function signature tells the compiler that the object's members may not be modified. Yet you return a non-`const` pointer to a member, thus allowing a violation of that promise. In your class `B`, you make/brea...
[ 0.015414903871715069, -0.04103805124759674, 0.1538626104593277, -0.07022687792778015, 0.1566721796989441, -0.1730993241071701, 0.6301463842391968, -0.17676465213298798, -0.013243922963738441, -0.29817819595336914, -0.5999637842178345, 0.432696670293808, -0.24598199129104614, 0.216935858130...
My user have a password field such as “0!ZWQ2” saved in the database. I must unscramble my User input password from “aA1234” to “0!ZWQ2” and compare it to data in a database. The 2 strings that I compare is: “abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 ” With “9setybcpqwiuvxr108daj5'-`~!@#$%^&\*()\...
[ -0.0003823789884336293, 0.5975090861320496, 0.6530444025993347, 0.1370876431465149, -0.1503218114376068, 0.1655212938785553, 0.613455593585968, -0.06499937176704407, -0.07283501327037811, -0.6569204330444336, -0.09200000017881393, 0.8521201610565186, 0.19318793714046478, 0.0823803469538688...
much better ways of handeling this. But please note that I am creating an ASP.NET application thats goign to be sitting inside SharePoint connecting to Cobol flat file data and not a proper database. Using Transoft to connect my ASP.NET (ODBC connector) to the Cobol flat files. So i have to stick with this code, and th...
[ 0.2947264015674591, 0.06456117331981659, 0.39951831102371216, -0.05595354363322258, -0.13060571253299713, -0.36801064014434814, 0.19938652217388153, -0.026630179956555367, -0.08337516337633133, -0.5249537825584412, -0.058257751166820526, 0.8806799054145813, -0.445636510848999, 0.1452211886...
char[] ScrambleChars = "9setybcpqwiuvxr108daj5'-`~!@#$%^&()+|}][{:.?/<>,;ZWQ2@#34KDART".ToCharArray(); string TextToTransfer = "Hello"; string NewText = ""; foreach (char c in TextToTransfer) { NewText = NewText + ScrambleChars[Array.IndexOf<char>(OriginalChars, c)].ToString(...
[ -0.547576904296875, -0.04855654761195183, 0.36589065194129944, -0.12687315046787262, 0.3729689121246338, 0.1878989189863205, 0.4341850280761719, -0.009850331582129002, -0.08562913537025452, -0.2155144065618515, -0.6012306809425354, 0.5984269380569458, -0.2647315561771393, 0.135272994637489...
Dim ScrambleChars() As Char = "9setybcpqwiuvxr108daj5'-`~!@#$%^&()+|}][{:.?/<>,;ZWQ2@#34KDART" Dim TextToTransfer As String = "Hello" Dim NewText As String = "" For Each c As Char In TextToTransfer NewText += ScrambleChars(Array.IndexOf(OriginalChars, c)) Next MsgBox(NewText) ```
[ -0.11508069932460785, -0.4294023811817169, 0.5984459519386292, -0.11872708797454834, 0.12031382322311401, 0.012756558135151863, 0.42891448736190796, -0.14223845303058624, -0.1107262670993805, -0.050016529858112335, -0.46788010001182556, 0.6990104913711548, -0.4805050492286682, 0.1838895827...
I've put together a WPF application using `ObservableCollection` and `Dependency Properties` which is cool because I just have to add an item to the `ObservableCollection` and it shows up automatically, e.g. I display the objects in the collection as boxes on the screen in a wrappanel, each box showing its `Title`. So...
[ 0.2731435000896454, 0.05472565069794655, 0.3791072368621826, 0.2581007480621338, -0.0875169187784195, -0.38325563073158264, 0.025078410282731056, -0.2349056899547577, -0.2993012070655823, -0.476382315158844, -0.17985787987709045, 0.1807594895362854, -0.01972506009042263, 0.3791699409484863...
text to my outgoing property, that that text is never seen? I have read that the value is actually "stored not in the object but in WPF" but I don't understand what that means. Why is the text **this text will NOT be seen** never output by the dependency object? ``` public class ApplicationItem : DependencyObject { ...
[ 0.16593961417675018, -0.054712191224098206, 0.7966346144676208, -0.1375640481710434, 0.22817246615886688, -0.2893235385417938, 0.5704571604728699, 0.009342190809547901, 0.018453244119882584, -0.4328271448612213, -0.42092305421829224, 0.9189010858535767, -0.3932845890522003, 0.3109288215637...
} set { SetValue(TitleProperty, "this text will be seen: " + value); } } } ``` TitleProperty is not a normal property but a dependency property so if you want to retrieve the value of your TitleProperty you have to do : ``` var title = (string)GetValue(TitleProperty); ``` In ...
[ 0.06634317338466644, -0.05914228409528732, 0.7470502853393555, -0.00819746870547533, 0.5057958960533142, -0.5123090147972107, 0.36424145102500916, -0.1333887279033661, 0.12862800061702728, -0.3785320222377777, -0.5922268033027649, 0.8435611128807068, -0.10563795268535614, 0.444142937660217...
the binding engine (not necessary). This public property is only used by your code behind. So you MUST not add code logic inside your public property. But you can use a FrameworkPropertyMetadata when you register your DP and provide a CoerceValueCallback to change the setted value. You can also use a IValueConverter ...
[ 0.022131824865937233, -0.08175624907016754, 0.39244937896728516, 0.3721337914466858, -0.2618287205696106, -0.45444172620773315, 0.2779015302658081, -0.6016110777854919, -0.0788758173584938, -0.5482981204986572, -0.16235414147377014, 0.7081384658813477, -0.3642643988132477, 0.22009396553039...
We are planning on adding multi-language support for our ASP.NET Website. I understand the general process of pulling strings from resource files based on the current culture, but what is the best way to deal with the following situation? Let's say that we want to display to the user how many Stack Overflow posts they...
[ 0.3380395472049713, -0.07802179455757141, 0.4212004840373993, 0.04753068834543228, -0.08004797250032425, -0.038940977305173874, 0.3859790861606598, -0.0628061592578888, -0.364664226770401, -0.5734368562698364, -0.1813182681798935, 0.15575896203517914, -0.17432284355163574, 0.07968416064977...
postCountText = "You have made " + i + " posts today"; } ``` So the text is being created based on whether we are dealing in singular or plural posts. What if we then want to create the post count text in any other language? Obviously we can't have lots of conditional statements like above, so the strings in the re...
[ 0.16864430904388428, -0.03633374720811844, 0.5051616430282593, 0.04361362010240555, -0.08005524426698685, 0.2318633794784546, 0.2503717243671417, 0.16113291680812836, -0.019597023725509644, -0.8633572459220886, -0.1977282166481018, 0.29646730422973633, -0.20229677855968475, 0.2394978553056...
only idea I have had so far is to store two strings in the external resource file, one for singular and one for plural, and then apply a `String.Format` to these to insert the post count in the correct location. i.e. the resource file for English would contain the following two strings: ``` singlePostCount : "You hav...
[ 0.04982206970453262, 0.0849417895078659, 0.5503836274147034, 0.03179609030485153, 0.0420377217233181, 0.42329469323158264, 0.25838014483451843, -0.3958609402179718, 0.10090578347444534, -0.6364818811416626, -0.12226148694753647, 0.07877305895090103, -0.02461470477283001, 0.2771036922931671...
change correctly for any languauge. But then, what if a certain language requires different text if there are zero posts? etc. We are dealing with lots of dynamically generated sentences as well (in 3 languages). We always try to make the sentences as neutral as possible to avoid as many conditional statements as po...
[ -0.001010062056593597, -0.17176058888435364, 0.32214605808258057, 0.03294479101896286, -0.18822439014911652, 0.22505149245262146, 0.5689480304718018, 0.16196197271347046, -0.4823075532913208, -0.6729323863983154, -0.06408821791410446, 0.46038052439689636, -0.331628680229187, -0.12568636238...
I have learned how to format strings in the content attribute of a label like this: ``` <Label Content="{Binding ElementName=theSlider, Path=Value}" ContentStringFormat="The font size is {0}."/> ``` I want to do the same thing in a Setter but "ValueStringFormat" doesn't exist, what is the correct syntax to do wh...
[ 0.07985853403806686, 0.040434934198856354, 0.5109918117523193, 0.0698830783367157, -0.22563353180885315, -0.39432236552238464, 0.06300647556781769, -0.49422135949134827, -0.04573146626353264, -0.6129523515701294, -0.15067969262599945, 0.5308881402015686, -0.2684112787246704, -0.05303192511...
Property="Text" Value="{Binding Title,StringFormat='Your title was: {}{0}'}" /> </DataTrigger> ```
[ 0.09201545268297195, 0.10898762196302414, 0.2913663983345032, 0.20220889151096344, 0.1388666182756424, -0.5415023565292358, 0.10857965797185898, -0.4887534976005554, 0.0629223957657814, -0.2780965268611908, -0.27552005648612976, 0.531557023525238, 0.1173032820224762, 0.49893152713775635, ...
We develop an embedded Qt application for linux on MS Windows. The target platform is linux without X-windows (framebuffer). Unfortunallety, the screens on windows look rather different (better) than the same screens on linux because windows has better fonts. Is there a way to force Qt on windows to use the linux fonts...
[ 0.20492170751094818, 0.010038290172815323, 0.31272393465042114, 0.12010305374860764, -0.28154101967811584, 0.22670364379882812, 0.0015803910791873932, -0.29597774147987366, 0.406091570854187, -0.9353615641593933, 0.05165433883666992, 0.5723761916160583, -0.4327408969402313, -0.040025997906...
families (see QFontDatabase::[applicationFontFamilies](https://doc.qt.io/qt-5/qfontdatabase.html#applicationFontFamilies)) that can be passed to QFontDatabase::[font](https://doc.qt.io/qt-5/qfontdatabase.html#font) to create a [QFont](https://doc.qt.io/qt-5/qfont.html) object for use in your application. Only [TrueTyp...
[ 0.23901726305484772, 0.25232994556427, 0.6529442667961121, -0.010496458038687706, 0.16442175209522247, 0.08877833187580109, -0.1458345204591751, -0.28994372487068176, -0.12684063613414764, -0.6766607761383057, -0.475425660610199, 0.462886780500412, -0.3060596287250519, 0.44640079140663147,...
[Edit:] Earlier I asked this as a perhaps poorly-framed question about when to use OOP versus when to use procedural programming - some responses implied I was asking for help understanding OOP. On the contrary, I have used OOP a lot but want to know when to use a procedural approach. Judging by the responses, I take i...
[ 0.11774446815252304, 0.14726057648658752, -0.0118403984233737, -0.0698741003870964, -0.186834916472435, -0.10260685533285141, 0.008998273871839046, 0.11301213502883911, -0.3368403911590576, -0.5847824811935425, -0.3631593883037567, 0.6960161924362183, -0.11108026653528214, -0.3987525403499...
Java programmer has been otherwise. I saw a massive Java program that I architected rewritten by a Perl guru in 1/10 of the code that I had written and seemingly just as robust as my model of OOP perfection. My architecture saw a significant amount of reuse and yet a more concise procedural approach had produced a supe...
[ 0.089741550385952, 0.3893890082836151, -0.2688499093055725, -0.09256434440612793, -0.3258458077907562, -0.11791954934597015, 0.37274688482284546, -0.16504795849323273, -0.19460859894752502, -0.6519414186477661, 0.08709577471017838, 0.6260088682174683, -0.20832234621047974, -0.1233372762799...
approach more concise and efficient. Can anyone suggest examples of what those scenarios would look like? **What is a good way to identify in advance a project that would be better served by a procedural programming approach?** I would suggest using the most concise, standards-based approach that you can find for a...
[ 0.20875130593776703, -0.2391977608203888, -0.04468783736228943, 0.23097354173660278, -0.34837228059768677, -0.10362015664577484, -0.12558576464653015, -0.20801666378974915, -0.35561734437942505, -0.6693525910377502, 0.2059526890516281, 0.8309985995292664, 0.06646358966827393, -0.3628416955...
and a similarly concise language such as Ruby, which happens to also have the benefits of object orientation. Now that's something I'd like to see. My guess is Ruby would come out on top but I'm not interested in provoking a language flame-war here - my point is only that you choose the appropriate tool for the job - w...
[ -0.16293871402740479, 0.1595541089773178, -0.27113616466522217, 0.1896689534187317, -0.515141487121582, -0.03935037925839424, 0.431424081325531, 0.3475714325904846, -0.2542467415332794, -0.7216160297393799, -0.03827302157878876, 0.7774209976196289, -0.15452872216701508, -0.1384814977645874...
and Python are finding these days, there are much more efficient solutions out there, whether procedural or OOP.
[ 0.2662007212638855, -0.0033090051729232073, -0.13802918791770935, 0.17756564915180206, 0.03876548632979393, -0.11554832011461258, 0.012451565824449062, 0.669619083404541, -0.6501933336257935, -0.5534812211990356, -0.42893752455711365, 0.49935752153396606, -0.19864660501480103, -0.377394855...
My company has purchased a product that renders an ASP.NET control on the page. This control uses jQuery 1.2.3 and adds a script tag to the page to reference it. The developers of the control will not support use of the control if it modified in any way (including modification to reference a different version of jQuery...
[ 0.34757283329963684, -0.014993625693023205, 0.3666329085826874, 0.22595471143722534, -0.036421287804841995, -0.042740724980831146, -0.2874007225036621, 0.19135448336601257, 0.1927201896905899, -0.4256618916988373, -0.04090707376599312, 0.5404438376426697, -0.1328166425228119, 0.11652096360...
and new custom development to use jQuery 1.3? Also out of curiosity, what if we were to use an additional control that needed to reference yet another version of jQuery? You can achieve this by running your version of jQuery in [no-conflict mode](http://docs.jquery.com/Using_jQuery_with_Other_Libraries). "No conflict" ...
[ 0.07696318626403809, -0.16363617777824402, 0.48661932349205017, 0.10554072260856628, -0.3747997581958771, -0.12026120722293854, 0.15814109146595, -0.09905035048723221, -0.4888831079006195, -0.5582561492919922, -0.026033058762550354, 0.870433509349823, -0.31086137890815735, 0.00957277230918...
stuff you want to use will need to be called using `jq13` rather than `$`, e.g. ``` jq13("#id").hide(); ``` It's not an ideal situation to have the two versions running on the same page, but if you've no alternative, then the above method should allow you to use two differing versions at once. > Also out of curiosi...
[ 0.6796373724937439, -0.0467236302793026, 0.21394893527030945, 0.15577074885368347, -0.13678118586540222, -0.521300733089447, 0.2532961070537567, -0.04914572834968567, -0.29223114252090454, -0.49139460921287537, -0.009398209862411022, 0.42626625299453735, -0.3780582845211029, -0.13505348563...
jQuery.noConflict(true); </script> <!-- original author's jquery version --> <script src="jQuery1.2.3.js"></script> ``` The variables `jq13` and `jq131` would each be used for the version-specific features you require. It's important that the **jQuery used by the original developer is loaded last** - the original ...
[ 0.07018010318279266, 0.010001890361309052, 0.4062553644180298, -0.08047060668468475, -0.07804448157548904, -0.2716459631919861, 0.2556597888469696, 0.11513613164424896, -0.19610384106636047, -0.4613547921180725, -0.3082810938358307, 0.6132198572158813, -0.17691802978515625, -0.013632910326...
Deadlocks are hard to find and very uncomfortable to remove. How can I find error sources for deadlocks in my code? Are there any "deadlock patterns"? In my special case, it deals with databases, but this question is open for every deadlock. Update: This recent MSDN article, [Tools And Techniques to Identify Concurre...
[ 0.32972246408462524, 0.20877733826637268, 0.18482816219329834, 0.1664004921913147, 0.18302397429943085, -0.015028338879346848, 0.322279155254364, -0.16682985424995422, -0.4860368072986603, -0.314159095287323, -0.1864808052778244, 0.4986875653266907, -0.5117227435112, 0.03144211322069168, ...
is one, since a monitor is a mutual-exclusion lock (meaning only one thread can own a monitor at a time). * The ability to hold one resource and request another. In C#, this is akin to locking on one object and then locking on another before releasing the first lock, for example: ``` lock(a) { ... lock(b) { ...
[ 0.16949725151062012, -0.42948970198631287, 0.17147794365882874, 0.198990598320961, 0.12064690887928009, -0.3885660767555237, -0.02877996861934662, -0.04283510148525238, -0.4896593987941742, -0.3481656312942505, -0.32916510105133057, 0.31358787417411804, -0.5112113952636719, 0.3161893188953...
there is a cycle of threads, each of which is waiting for the next to release a resource before it can continue. He goes on to explain that the way to avoid deadlocks is to avoid (or thwart) condition four. > [Joe Duffy discusses several techniques](http://msdn.microsoft.com/msdnmag/issues/06/04/Deadlocks) > for avo...
[ 0.1187523826956749, -0.07800086587667465, -0.020469583570957184, 0.08222095668315887, 0.1997399777173996, -0.08887612819671631, 0.3920486271381378, -0.31446731090545654, -0.7290658354759216, -0.41188928484916687, -0.2616351246833801, 0.3324110805988312, -0.4039113223552704, 0.2369353324174...
do well in a > typical software application today, > and a failure to follow lock leveling > on every lock acquisition invites > deadlock.
[ 0.24493178725242615, 0.27274325489997864, 0.2376829832792282, 0.02844788320362568, 0.6093864440917969, -0.6918389201164246, 0.6435863971710205, -0.35614457726478577, -0.12295946478843689, -0.504071831703186, -0.408134400844574, 0.5073328614234924, 0.20612192153930664, -0.24733513593673706,...
My team and I have found that documenting our project (a development platform w/ API) with a wiki is both useful to us and useful to the users. Due to some organizational issues, we're forced to do multi-site development without network connectivity. We've switched to a DVCS (Mercurial) and had great success with this....
[ 0.6757684350013733, 0.0992712751030922, 0.0986151173710823, 0.19832508265972137, 0.24088242650032043, -0.521714985370636, 0.2245316207408905, 0.03032643347978592, -0.12895357608795166, -0.7496492266654968, -0.3634338676929474, 0.4668480157852173, 0.06401944905519485, 0.249635711312294, -...
DVCS environment? Update: Should be open-source and cross-platform Ended up writing my own system using python,cherrpy, and mercurial. Perhaps one day it will end up open-source. Thanks for all the suggestions.
[ 0.4875190258026123, -0.0706803947687149, 0.12393110990524292, 0.018239976838231087, -0.037648897618055344, -0.2840358316898346, 0.22343319654464722, 0.24272900819778442, -0.02958809584379196, -0.8352239727973938, -0.16999882459640503, 0.6925042867660522, -0.13991984724998474, -0.2014998495...
I managed to use ILMerge to merge all the assemblies I have in my project into a single assembly, but the problem is there doesn't seem to be a way to sign the merged assembly. Is there some sort of command line option or command that I can run that would let me add a strong name to the merged assembly generated by IL...
[ 0.3740363121032715, 0.23529799282550812, 0.18724457919597626, -0.04276806488633156, -0.14031891524791718, -0.07375139743089676, 0.19680048525333405, 0.02835518680512905, -0.09805278480052948, -0.6994315385818481, -0.07317078858613968, -0.029447775334119797, -0.16129668056964874, 0.27178007...
I don't have much experience with using the yield keyword. I have these IEnumerable<T> extensions for Type Conversion. My question is does the first overloaded method have the same yield return effect that I'm getting from the second method? ``` public static IEnumerable<TTo> ConvertFrom<TTo, TFrom>(this IEnumerable<...
[ 0.15775837004184723, -0.0036065950989723206, 0.5236643552780151, -0.27307766675949097, -0.05348987877368927, -0.12735508382320404, 0.25726988911628723, -0.43046072125434875, 0.15721888840198517, -0.6240736246109009, -0.26201707124710083, 0.8663040399551392, -0.3531917929649353, -0.01800024...
will have been moved into a nested class implementing the iterator block. When `GetEnumerator()` and then `MoveNext()` are first called on the returned `IEnumerable<TTo>`, *then* the code in your second overload will begin executing. I have a fairly long [article on the iterator block implementation](http://csharpinde...
[ 0.1733478307723999, -0.14843009412288666, 0.4621433615684509, -0.20783016085624695, -0.034829918295145035, -0.17875754833221436, 0.06233282387256622, -0.15275979042053223, -0.27487197518348694, -0.6895893812179565, -0.37860745191574097, 0.3464205861091614, -0.016514088958501816, 0.04858635...
Which browsers do support HttpOnly cookies, and since which version? Please see <http://www.codinghorror.com/blog/archives/001167.html> for a discussion of HttpOnly cookies and XSS-prevention. Feel free to add to this list: * Internet Explorer since 6 sp1 ([source](http://www.petefreitag.com/item/644.cfm), [source](h...
[ 0.04227558150887489, 0.11409451812505722, 0.415330171585083, -0.34274032711982727, -0.44320064783096313, -0.40629974007606506, 0.3859533965587616, 0.03567390888929367, -0.5520601272583008, -0.531272828578949, -0.4492214322090149, 0.5295219421386719, -0.5438855290412903, -0.2383338809013366...
I have the following dictionary declared: ``` private readonly Dictionary<int, Image> dictionary; ``` And I have a method, which is causing a compiler error: ``` public IQueryable<Image> Find(Func<Image, bool> exp) { return dictionary.Single(exp); } ``` The error i get is: ``` Error 1 T...
[ 0.0976957157254219, 0.5107946991920471, 0.3950798213481903, 0.0591714046895504, -0.10211039334535599, 0.004839490167796612, 0.3521818518638611, -0.30889976024627686, -0.09723226726055145, -0.5784910917282104, 0.024800896644592285, 0.5487815737724304, -0.3886844217777252, 0.0676290094852447...
This is monday morning at work. I meant to put "where", not single **Edit 2!** Ok, the code is now this: ``` public IQueryable<Image> Find(Func<Image, bool> exp) { return dictionary.Values.Where(exp); } ``` Now I get the following error: ``` Error 1 Cannot implicitly convert type 'System.Collections.Gene...
[ 0.18708522617816925, 0.16260215640068054, 0.5766070485115051, -0.1336563676595688, -0.060107506811618805, -0.23707818984985352, 0.4084016978740692, -0.28761914372444153, -0.33843234181404114, -0.8735123872756958, 0.009489855729043484, 0.5461549162864685, -0.372783362865448, 0.1521651446819...
an instance of `T`, not an `IQueryable<T>` (and for objects, you should probably be using `IEnumerable<T>` anyway)... It feels like you want: ``` public Image Find(Func<Image, bool> predicate) { return dictionary.Values.Single(predicate); } ``` Of course, you could do this globally as an extension method via so...
[ 0.1696048229932785, -0.28092482686042786, 0.48991820216178894, -0.016274265944957733, -0.23794898390769958, -0.14638474583625793, 0.0752745270729065, -0.06028873845934868, -0.20860064029693604, -0.8080124258995056, -0.3488185405731201, 0.6314624547958374, -0.5384014844894409, 0.09123502671...
static IEnumerable<TValue> Find<TKey, TValue>( this IDictionary<TKey, TValue> dictionary, Func<TValue, bool> predicate) { return dictionary.Values.Where(predicate); } } ``` (I'm not sure it is much harder for the caller to do this themselves, though)
[ 0.15174445509910583, -0.3753354847431183, 0.6375691294670105, -0.1430489718914032, -0.12952470779418945, -0.2618054449558258, 0.30906423926353455, -0.06570438295602798, 0.023251671344041824, -0.5763715505599976, -0.372687429189682, 0.8206790089607239, -0.4031451642513275, -0.01937334984540...
I'm getting following error message when I'm trying to add a new user to site and trying to send mails to him. The Site is Intranet site as well exposed on internet via alternate URL mapping while adding users of local exchange group it does not give any errors but suppose that I add a user having gmail id expressed in...
[ 0.4388243556022644, 0.30251336097717285, 0.4158985912799835, 0.07523655891418457, -0.18889003992080688, -0.057651959359645844, 0.40064266324043274, -0.14645518362522125, -0.20829086005687714, -0.6786689162254333, 0.17159564793109894, 0.41021475195884705, -0.32147127389907837, 0.17557393014...
correctly, contact your server administrator. The problem was with the settings on the server our Infrastructure team resolved it
[ 0.2370108962059021, 0.19909411668777466, 0.1404234915971756, 0.24811649322509766, 0.15252774953842163, -0.06294703483581543, 0.4110199213027954, 0.33118635416030884, -0.01843661069869995, -0.8291416764259338, 0.1941150724887848, 0.6222593784332275, -0.25221580266952515, -0.0319168642163276...
Going over the file references in a FileReferenceList calling upload on each one means the files are uploaded as separate requests. I want to upload a bunch of file in one POST (and I already have a ASHX handler that will accept it). Any ideas? AFAIK that is not possible. From the docs: > The FileReferenceList clas...
[ 0.4382774531841278, 0.003293840680271387, 0.577032208442688, 0.13624390959739685, -0.23140111565589905, -0.10834218561649323, 0.15249662101268768, -0.3058152198791504, -0.3441470265388489, -0.6089651584625244, 0.015213712118566036, 0.7199041247367859, -0.5097339153289795, 0.079923123121261...
FileReference.upload() You could perhaps create a zip with the [AS3 zip library](http://www.nochump.com/blog/?p=15) and send that to the server.
[ 0.7237327098846436, -0.34756502509117126, 0.27310410141944885, 0.2727985084056854, 0.14670975506305695, -0.31201881170272827, 0.07851453125476837, 0.19383685290813446, -0.4962090253829956, -0.4697590470314026, -0.19962120056152344, 0.024960385635495186, -0.34015339612960815, 0.133796021342...
Is it true that MS SQL restrict self-referencing constraints with ON DELETE CASCADE option? I have a table with parent-child relation, PARENT\_ID column is foreign key for ID. Creating it with ON DELETE CASCADE option causes error > "Introducing FOREIGN KEY constraint > may cause cycles or multiple cascade > paths...
[ 0.06599778681993484, -0.07396149635314941, 0.0955476313829422, 0.13716615736484528, -0.011096088215708733, -0.0010291817598044872, 0.36699455976486206, -0.3028287887573242, -0.2126867026090622, -0.28488874435424805, 0.27535346150398254, 0.40920549631118774, -0.5118276476860046, 0.260950505...
table with self-referencing constraints. There is a potential of cyclical logic problems, hence it won't allow it. There's a good article [here](http://msdn.microsoft.com/en-us/library/aa902684(SQL.80).aspx) - though it's for version 8 rather than 9 of SQL - though the same rules apply.
[ -0.2771454155445099, 0.11199682950973511, 0.5541856288909912, 0.03434305638074875, 0.15407639741897583, -0.1107374057173729, 0.04193534329533577, 0.07765599340200424, -0.6107429265975952, -0.40390893816947937, -0.09869040548801422, 0.10752321779727936, -0.44525033235549927, -0.027474271133...
Asp.net-MVC now allows for implicit binding of DateTime objects. I have an action along the lines of ``` public ActionResult DoSomething(DateTime startDate) { ... } ``` This successfully converts a string from an ajax call into a DateTime. However, we use the date format dd/MM/yyyy; MVC is converting to MM/dd/yyyy...
[ 0.02911045402288437, -0.2862192690372467, 0.9717193841934204, -0.16939812898635864, -0.19573210179805756, -0.07063940912485123, 0.3831217288970947, -0.15183429419994354, -0.35619139671325684, -0.4954472482204437, -0.15094596147537231, 0.44847768545150757, -0.13114066421985626, -0.008644447...
and then use DateTime.Parse if MVC is capable of doing this for me. Is there any way to alter the date format used in the default model binder for DateTime? Shouldn't the default model binder use your localisation settings anyway? I've just found the answer to this with some more exhaustive googling: Melvyn Harbour h...
[ 0.014874259009957314, -0.13340172171592712, 0.6699692010879517, -0.3148307800292969, -0.049209315329790115, -0.06648571789264679, 0.19669538736343384, -0.259034663438797, -0.36116641759872437, -0.35050448775291443, -0.04406066611409187, 0.4325944483280182, -0.27196457982063293, 0.225365564...
Request form > > > Only the last of these will be culture aware however. There is a very good reason for this, from a localization perspective. Imagine that I have written a web application showing airline flight information that I publish online. I look up flights on a certain date by clicking on a link for that day...
[ 0.5296236872673035, -0.20684082806110382, 0.691368579864502, 0.33133983612060547, -0.020457971841096878, -0.22425593435764313, 0.017472438514232635, -0.07522664219141006, -0.12664972245693207, -0.7511481642723083, 0.08406594395637512, 0.045586444437503815, -0.05927923321723938, -0.04757604...
By contrast, if I'm using a form to book my flight, everything is happening in a tight cycle. The data can respect the CurrentCulture when it is written to the form, and so needs to respect it when coming back from the form.
[ 0.543389618396759, -0.09176061302423477, 0.5891728401184082, 0.38583993911743164, 0.1602398157119751, -0.11731235682964325, -0.18151406943798065, 0.21457889676094055, -0.1435108333826065, -0.5926684141159058, 0.07512234151363373, 0.224281907081604, -0.07128871232271194, -0.1379012912511825...
I have a table with 10 columns as col\_1,col\_2,.... col\_10. I want to write a select statement that will select a value of one of the row and from one of these 10 columns. I have a variable that will decide which column to select from. Can such query be written where the column name is dynamically decided from a vari...
[ 0.020027820020914078, 0.30297383666038513, 0.5041907429695129, -0.09685157239437103, -0.15020273625850677, 0.30396249890327454, -0.03717665746808052, -0.3347030282020569, -0.12095974385738373, -0.4197317361831665, 0.17539682984352112, 0.4210565984249115, -0.4810546338558197, 0.267144501209...
the row-name you want using string concatenation). Then call: `exec(@sql)` All set.
[ 0.23189420998096466, 0.2695804536342621, 0.5284405946731567, -0.05732491612434387, 0.17918145656585693, -0.2731817662715912, -0.07511633634567261, -0.08479071408510208, -0.0029472270980477333, -0.314605712890625, -0.24922943115234375, 0.923994779586792, -0.666580319404602, -0.0349634550511...
What (if any) is the difference between the results of the following two versions of this VB Linq query? ' assume we have an XElement containing employee details defined somewhere else ``` Dim ee = From e In someXML.<Employee> _ Select New With {.Surname = e.<Surname>, .Forename = e.<Forename>} ``` and ``` Dim ee ...
[ 0.5297064185142517, 0.026625443249940872, 0.5920921564102173, -0.09335990250110626, 0.09788822382688522, 0.019420046359300613, 0.03635775297880173, -0.30434292554855347, 0.08323803544044495, -0.4679287374019623, -0.259724885225296, 0.5021266937255859, -0.4065469205379486, 0.184419363737106...
creates an anonymous type. The 2nd is a query expression, and may use an existing type rather than creating an anonymous type. From the documentation linked by Cameron MacFarland: > Query expressions do not always require the creation of anonymous types. When possible, they use an existing type to hold the column data...
[ -0.059140756726264954, 0.011860435828566551, 0.25725898146629333, 0.08146899938583374, -0.2313062846660614, 0.11425666511058807, 0.2524549961090088, -0.04206889867782593, -0.13552437722682953, -0.3480297029018402, -0.3901311457157135, 0.22028791904449463, -0.7131164073944092, -0.1671968996...
Is there is Simple way to read and write Xml in Java? I've used a SAX parser before but I remember it being unintuitive, I've looked at a couple of tutorials for JAXB and it just looks complicated. I don't know if I've been spoilt by C#'s XmlDocument class, but All I want to do is create an Xml Document that represen...
[ 0.24407269060611725, 0.16246947646141052, -0.09687624871730804, 0.32226547598838806, -0.1422477811574936, -0.24031130969524384, 0.026550211012363434, -0.06090677157044411, -0.0641445592045784, -0.5580295324325562, 0.19737303256988525, 0.5770617127418518, -0.33986949920654297, -0.1244760006...
Java. I recommend [XOM](http://www.xom.nu/). Its API is clear and intuitive.
[ -0.05058779940009117, 0.18800149857997894, 0.16237719357013702, -0.4458717703819275, -0.14463292062282562, -0.19160829484462738, 0.0063070813193917274, -0.016193225979804993, -0.00199330342002213, -0.7994371056556702, -0.2861480414867401, 0.26395541429519653, -0.30398550629615784, -0.11581...
I have an application that opens a new window on clicking a link. This spawns a page that holds a Java applet. The problem I am having is that clicking the same link reloads the page, which resets the Java application. Is there any way to trap this? Two solutions that would be acceptable are: 1. Allow multiple windows...
[ 0.46081337332725525, 0.0954386293888092, 0.1762530654668808, -0.2437921166419983, 0.11421175301074982, -0.23927606642246246, 0.13252316415309906, 0.008760222233831882, -0.08883901685476303, -0.7450675964355469, -0.16909094154834747, 0.4372186064720154, -0.5238991975784302, 0.32777893543243...
var l_height = screen.availHeight; var l_params = 'status=1' + ',resizable=1' + ',scrollbars=1' + ',width=' + l_width + ',height=' + l_height +
[ -0.25500422716140747, -0.20750334858894348, 0.8830235004425049, -0.3339449465274811, 0.06352084875106812, 0.45494353771209717, 0.06343314796686172, -0.11833881586790085, -0.20417706668376923, -0.5371201038360596, -0.3473530411720276, 0.47159549593925476, -0.0780104249715805, 0.001162058906...
',left=0' + ',top=0'; winRef = window.open(l_url, l_windowName, l_params); winRef.moveTo(0,0); winRef.resizeTo(l_width, l_height); } ``` EDIT: Thanks for the replies - I modified the suggestions slightly so that I could have more than one URL opened via the function. EDIT2: There is another ...
[ -0.0741240382194519, 0.05931468307971954, 0.6753972768783569, -0.08721262961626053, -0.06347264349460602, 0.036342911422252655, 0.3090692460536957, -0.34665584564208984, -0.17112404108047485, -0.6922909617424011, -0.24416685104370117, 0.30567479133605957, -0.32902514934539795, 0.2192085683...
{ return true; } } return false; }; function launchApplication(l_url, l_windowName) { var l_width = screen.availWidth; var l_height = screen.availHeight; var winRef; var l_params = 'status=1' + ',resizable=1' + ',scrollbars=1' +
[ 0.10607782006263733, -0.17041431367397308, 0.6822378039360046, -0.2200695276260376, 0.26855355501174927, 0.2649401128292084, 0.18206942081451416, -0.19781135022640228, -0.04047054052352905, -0.4745180606842041, -0.647701621055603, 0.6838974952697754, -0.12894122302532196, -0.01400227472186...
',width=' + l_width + ',height=' + l_height + ',left=0' + ',top=0'; if (g_urlarray.has(l_url)) { winRef = g_urlarray[l_url]; } alert(winRef); if (winRef == null || winRef.closed) { winRef = window.open(l_url, l_windowName, l_params); winRef.moveTo(0,0);...
[ -0.006926748435944319, -0.30824771523475647, 0.9166874289512634, -0.496309369802475, 0.3373354375362396, 0.18200869858264923, 0.11356102675199509, -0.21375076472759247, -0.3546743392944336, -0.8231992125511169, -0.891388475894928, 0.4923487901687622, -0.2944129705429077, 0.2475430518388748...
g_urlarray[l_url] = winRef; } } ``` I'd do it like this - basically store all the referenced opened windows on the function itself. When the function fires, check if the window doesn't exist or has been close - of so, launch the popup. Otherwise, focus on the existing popup window for that request. ``` function lau...
[ -0.10860765725374222, 0.007232873700559139, 0.9101573824882507, -0.3494414687156677, 0.00923557486385107, 0.11115499585866928, 0.036874085664749146, -0.14269040524959564, -0.11477890610694885, -0.47955992817878723, -0.6329349875450134, 0.7606040239334106, -0.39402684569358826, 0.1677940338...
= screen.availHeight; var l_params = 'status=1' + ',resizable=1' + ',scrollbars=1' + ',width=' + l_width + ',height=' + l_height +
[ -0.12904497981071472, -0.13655316829681396, 0.8127182722091675, -0.2426280528306961, 0.06342831999063492, 0.3650844693183899, 0.09540388733148575, -0.11912037432193756, -0.2383115291595459, -0.5433812141418457, -0.3232361376285553, 0.36333000659942627, -0.060222361236810684, 0.032209627330...
',left=0' + ',top=0'; launchApplication.winRefs[l_windowName] = window.open(l_url, l_windowName, l_params); launchApplication.winRefs[l_windowName].moveTo(0,0); launchApplication.winRefs[l_windowName].resizeTo(l_width, l_height); } else { launchApplication.winRefs[l_windowName].foc...
[ 0.1611860990524292, -0.2557617127895355, 0.49595335125923157, -0.3369666337966919, 0.23748892545700073, 0.2234208732843399, -0.0029999532271176577, 0.12427600473165512, -0.14166855812072754, -0.6459947824478149, -1.0345450639724731, 0.8391783237457275, -0.37754154205322266, -0.080113746225...
Im struggling to find good material about developing web applications in Ruby without using a framework such as Rails or Merb in the usual places (I've already spent a while on Google, Safari books online and stackoverflow looking!). I have nothing against the frameworks at all; just my intended architecture is a littl...
[ 0.672538697719574, 0.4465436339378357, 0.11747992038726807, 0.06836830824613571, -0.2167264223098755, -0.24227958917617798, 0.40049564838409424, -0.5615320205688477, -0.02890850231051445, -0.4304247200489044, 0.14407190680503845, 0.5580340623855591, -0.28035300970077515, -0.106670595705509...
is a place to look into.
[ 0.23915468156337738, 0.03834756091237068, 0.1342160701751709, 0.020062150433659554, 0.4435102045536041, -0.3102096617221832, 0.4121135473251343, 0.4732826352119446, -0.138682559132576, -0.5057695508003235, -0.29181113839149475, 0.060649946331977844, 0.13939343392848969, 0.00807481724768877...
I'm looking to convert a string of html entities specifying ASCII codes (ie: &#97;) to the ASCII characters they represent (ie: a). I'm using a property of an object and trying to assign a value. For instance: ``` object.Text(""); ``` When I pass is the string representing the entity, I get the same string back. I c...
[ 0.30215972661972046, 0.20427390933036804, 0.3741358518600464, -0.1587212085723877, -0.05106833949685097, 0.11188825219869614, 0.18405400216579437, -0.12645323574543, -0.24085628986358643, -0.5535882711410522, -0.24036666750907898, 0.474883496761322, -0.4042443633079529, 0.0487205870449543,...
I'm looking for an editor that has the help from <http://www.hibernate.org/hib_docs/nhibernate/html/mapping.html> built in, and allows simple editing of the XML files in a GUI fashion. I realise there's CodeSmith and MyGeneration, but from what I remember these only go one way, and don't allow editing existing HBM f...
[ -0.22898340225219727, 0.2344536930322647, 0.04723742976784706, -0.00003566547093214467, -0.5996677875518799, -0.09954102337360382, 0.084299236536026, -0.6381552815437317, -0.046465497463941574, -0.5785681009292603, -0.0016310345381498337, 0.3618193566799164, -0.13728363811969757, 0.0473613...
for each mapping node. Given that you *can* download the source code it wouldn't be that trivial to add the inline help.
[ 0.46727314591407776, -0.04167116433382034, 0.2536313831806183, 0.3915160298347473, -0.28027668595314026, 0.003997448366135359, 0.18266598880290985, 0.11064743995666504, -0.13769355416297913, -0.8167445063591003, 0.16878551244735718, 0.5007206797599792, -0.09952593594789505, 0.0999893546104...