text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
the **X-MicrosoftAjax** header to the value **Delta=true** (case is important here), the ScriptModule will interpret this as a normal redirect, and turn the response into a **200**, but will set the **pageRedirect** data string for any ScriptManager (MS-AJAX PageRequestManager) on the page to consume. The jQuery.ajax f...
[ 0.1867073029279709, -0.04842795431613922, 0.4538590908050537, -0.17469064891338348, -0.3511773943901062, -0.033752720803022385, 0.4139556586742401, -0.05464475229382515, 0.04186427220702171, -0.8278147578239441, -0.14491957426071167, 0.5169700980186462, -0.33912214636802673, 0.086536817252...
url: postUrl + "/SomePageMethod", data: "{searchString:\"" + escape(searchString) + "\"}", contentType: "application/json; charset=utf-8", beforeSend: function(xhr) { xhr.setRequestHeader("X-MicrosoftAjax","Delta=true"); }, dataType: "json",
[ -0.17611104249954224, 0.0638505220413208, 0.604256808757782, -0.13505902886390686, -0.13935664296150208, 0.24337682127952576, 0.29530876874923706, 0.13690966367721558, 0.22131361067295074, -0.5071361660957336, -0.6515812873840332, 0.08987320214509964, -0.3560321033000946, 0.479629814624786...
success: onSuccess, error: onError }); function onError(xhr, e, textStatus) { var isAjaxRedirect = xhr.status == 200 && xhr.responseText.match(/pageRedirect/); if (isAjaxRedirect == "pageRedirect") { // forms authentication ticket expired location.href = "a session timeout p...
[ -0.4398985803127289, -0.10749589651823044, 0.8041307926177979, 0.04865479841828346, 0.1896788626909256, -0.24262988567352295, 0.5270600318908691, -0.5572299361228943, -0.06522247195243835, -0.4552197754383087, -0.36775511503219604, 0.6811206340789795, -0.15290585160255432, 0.00701034953817...
Re the recent question at [when are modal dialogs truly necessary?](https://stackoverflow.com/questions/361481/when-are-modal-dialogs-truly-necessary). WHY are modal dialog boxes evil? Is it because people don't read them anyway? Because they are often implemented so poorly? Something else? About half of the answers so...
[ 0.41224005818367004, 0.27496448159217834, 0.5095558166503906, 0.03473096340894699, -0.18211166560649872, -0.2190578281879425, 0.6694258451461792, -0.3412473797798157, -0.059244439005851746, -0.41472235321998596, -0.2596738636493683, 0.881672739982605, -0.19324341416358948, 0.01179068721830...
In the most common implementation, this means you can't access any other windows. This is evil. Consider an address book application. Suppose you have an existing person in the address book and you wish to add their roommate. * If the "add person" dialog is non-modal, you can flip back and forth between the old reco...
[ 0.2226797193288803, 0.0424090214073658, 0.010568934492766857, 0.04227447509765625, 0.10244054347276688, 0.08478864282369614, 0.13335837423801422, 0.04798091575503349, -0.3440321087837219, -0.9107840657234192, -0.1271268129348755, 0.41903308033943176, -0.2945197522640228, 0.2214415073394775...
be manually retyped. On rare occasions, you run into something which truly must be done in one piece without allowing the user to diverge from that task until it is complete. Modal dialogs are appropriate for such cases. *But these cases are very rare!* Which is basically the point of the other thread referenced by th...
[ 0.467277854681015, -0.09581895172595978, 0.10287827998399734, 0.07019609957933426, 0.01953372173011303, -0.23375318944454193, 0.6928577423095703, -0.05516287311911583, -0.2603245675563812, -0.45535364747047424, -0.41525211930274963, 0.4687882363796234, -0.2865162789821625, -0.0176182165741...
I'm having the trouble finding the wording, but is it possible to provide a SQL query to a MS SQL server and retrieve the results asynchronously? I'd like to submit the query from a web request, but I'd like the web process to terminate while the SQL server continues processing the query and dumps the results into a t...
[ 0.4696049094200134, 0.22006383538246155, 0.08247429877519608, 0.24579358100891113, 0.017854100093245506, -0.2469174563884735, 0.4315871596336365, 0.07415734976530075, -0.1843845397233963, -0.494477242231369, -0.07551273703575134, 0.44042325019836426, -0.08082111179828644, 0.220405489206314...
on very large data sets. I'm currently using a Java Daemon to examine a "jobs" table and run the results, I was just hopeful that there might be a more native solution. This really depends on how you are communicating with the DB. With ADO.NET you can make a command execution run asynchronously. If you were looking to ...
[ 0.49237722158432007, 0.08362295478582382, -0.0984671339392662, 0.024089306592941284, -0.21050186455249786, -0.07210032641887665, 0.21143904328346252, -0.03807038813829422, -0.35044246912002563, -0.552394688129425, 0.15877418220043182, 0.3335060477256775, -0.31323036551475525, 0.21024629473...
I would guess your web request is received by asp.net and you could use the ADO.NET classes.
[ 0.5879011750221252, -0.03626306354999542, 0.08360448479652405, 0.2069920152425766, -0.2861998677253723, -0.22687101364135742, 0.11052755266427994, 0.19953927397727966, -0.14765121042728424, -0.6296365857124329, 0.10148938000202179, 0.22319525480270386, 0.09286657720804214, 0.17222180962562...
What needs to happen before we can open Web Application Projects hosted in IIS7 with Visual Studio 2008 without running as Administrator? Are we talking about waiting for the next version of Visual Studio? Are there any existing workarounds? I think it's implied by the above, but this pertains to Vista. Thanks. Never...
[ 0.3938128650188446, 0.1275416761636734, 0.24655453860759735, 0.13548855483531952, -0.05466314032673836, -0.4778033494949341, 0.1642020344734192, 0.1545567661523819, -0.41178596019744873, -0.39620935916900635, -0.0488317646086216, 0.7026652693748474, 0.021035466343164444, 0.0123156867921352...
I have a database table (named Topics) which includes these fields : 1. topicId 2. name 3. parentId and by using them I wanna populate a TreeView in c#. How can I do that ? Thanks in advance... It will probably be something like this. Give some more detail as to what exactly you want to do if you need more. ``` //...
[ 0.00119203538633883, -0.10153090208768845, 0.8047361969947815, 0.14450231194496155, -0.08258409053087234, -0.17967815697193146, 0.08821059763431549, 0.0006775378715246916, -0.2669588625431061, -0.6490990519523621, -0.271033376455307, 0.4738943576812744, -0.3050233721733093, 0.1957003921270...
//select from topic where parentId = topicId. foreach (DataRow row in topics.Rows) { TreeNode node = new TreeNode(dr["name"], dr["topicId"]) node.PopulateOnDemand = true; e.Node.ChildNodes.Add(node); } } ```
[ -0.35215094685554504, -0.23772361874580383, 0.47775137424468994, 0.04164443165063858, 0.1066199243068695, 0.1892833411693573, -0.2236318439245224, 0.15509675443172455, -0.43696287274360657, -0.5585529804229736, -0.5756219029426575, 0.2376689314842224, -0.13302107155323029, 0.33669811487197...
I have a div tag styled through CSS. I set the padding to 10px (padding:10px), it works just as I wanted in Firefox and IE7, but in IE6 it adds additional padding at the bottom (about 2-3px I think). Anyone has idea about what's happening here? [update] I just noticed this, the div tag I'm talking about has a backgro...
[ 0.28469422459602356, 0.04367959871888161, 0.7846201658248901, -0.1464398056268692, -0.07890072464942932, -0.04341911897063255, 0.21294625103473663, 0.07593608647584915, -0.015369054861366749, -0.9471099972724915, -0.11120735108852386, 0.5602943301200867, -0.320506751537323, -0.159374833106...
background-image: url("../img/user_panel_bg.png"); float:right; border: 1px #AAAAAA solid; font-size:12px; } ``` Is there an image in your div? If there's an image, there's a bug in IE 6 that can cause white space within the div to create extra padding on the bottom Extra padding shows up with ``` <div> ...
[ 0.049537766724824905, -0.08084193617105484, 0.5516175031661987, -0.09480208158493042, 0.07879836112260818, 0.2859884202480316, 0.10674064606428146, 0.20454251766204834, -0.4313253164291382, -0.5971209406852722, -0.31937986612319946, 0.3788997530937195, -0.336851567029953, -0.20399744808673...
This afternoon, upon noticing a broken build and the fact that some files looked like very old versions (about 2 weeks old), I checked the svn log. Apparently just this afternoon, 1 of the developers did an "svn copy" of a directory from an older revision to the same directory. Thus it appears that the latest version "...
[ 0.2558271288871765, 0.43961435556411743, 0.5070236921310425, -0.08440481126308441, 0.16044890880584717, -0.20191393792629242, 0.39500176906585693, -0.07096478343009949, -0.14972350001335144, -0.761169970035553, 0.3968256413936615, 0.35401952266693115, -0.14359459280967712, 0.63445198535919...
finding the revision where the bad "svn copy" was done (say rev 1234) , subtracting 1 (1233) and doing: ``` svn copy -r 1233 file://path/to/messed/up/dir file://path/to/messed/up/dir ``` That *should* restore the latest version, as well as get back all my history. Am I right about this? According to [the SVN book](h...
[ -0.2895929515361786, 0.3258275091648102, 0.69846510887146, -0.12952269613742828, -0.07560478895902634, -0.13725629448890686, 0.4272419214248657, -0.12333330512046814, -0.289192795753479, -0.3776933252811432, -0.35233885049819946, 0.41690629720687866, -0.0914311483502388, 0.3098649382591247...
I have read a lot of popular standards manuals for open source PHP projects. A lot enforce underscores for variables spaces, and a lot enforce camelCase. Should global functions and variables be named differently to class methods/properties? I know the most important thing is consistency, but I'd like to hear some t...
[ 0.20709319412708282, 0.014407193288207054, -0.20745155215263367, 0.4679410457611084, -0.426777184009552, -0.1670178323984146, 0.07481492310762405, 0.17209137976169586, -0.2165076732635498, -0.5471445322036743, 0.49359792470932007, 0.5911896824836731, -0.19239427149295807, -0.04231396690011...
I try to stick to: * Classes are StudlyCaps singular or plural nouns, as appropriate: `Item`, `Row`, `DB`, `Items`. * Variables are lowercase nouns, singular or plural depending on what they hold: `$column`, `$name` * Constants are singular upper-case nouns: `DEBUG`, `TYPE_FOO`. * Methods are camelCase, and begin with...
[ 0.36569395661354065, 0.029005341231822968, -0.061552342027425766, 0.13981688022613525, -0.22369223833084106, 0.5665194392204285, 0.364804744720459, 0.08844510465860367, 0.0877552330493927, -0.49981021881103516, -0.08881881833076477, 0.40533319115638733, -0.15110518038272858, -0.23223891854...
Say you have something like an ASP.NET ASP:DetailsView to show and edit a single record in a database. It's simple to record the error cases... you add validation and a validation summary. When your update form fails validation it naturally makes noise: it shows the validation message and/or the validation summary. No...
[ 0.5998126864433289, 0.20939628779888153, 0.11804291605949402, 0.32799622416496277, -0.1299915313720703, -0.26719048619270325, 0.255840003490448, -0.11782262474298477, -0.32778945565223694, -0.4497500956058502, 0.07895373553037643, 0.4501465857028961, -0.00407932186499238, -0.00138231576420...
message? onItemUpdate, right? Fine, but then let's say you make another change and get a validation error? Your success message stays. I wasn't able to find an event that would reliably turn off an existing success message if there were a validation error. This should be web development 101! Why is it so hard? **EDI...
[ 0.047075055539608, -0.05799352377653122, 0.5710985064506531, 0.06188070401549339, 0.005439679138362408, -0.02369065396487713, 0.3509473502635956, -0.007768305484205484, -0.45754727721214294, -0.6746994853019714, 0.004380566533654928, 0.6069887280464172, -0.22371169924736023, 0.067732565104...
DataKeyNames="LicenseID" DataSourceID="MySource" runat="server" OnItemUpdated="SuccessfulClientUpdate" OnItemCommand="ClearMessages"> ``` And, my code-behind: ``` protected void SuccessfulClientUpdate(object sender, DetailsViewUpdatedEventArgs e) { successMessage.InnerText = string.Form...
[ -0.025325214490294456, -0.038460616022348404, 0.8796693086624146, -0.1513870656490326, 0.3865595757961273, 0.038029201328754425, 0.5876572728157043, -0.35862889885902405, -0.294054239988327, -0.5743070244789124, -0.47747495770454407, 0.6800808310508728, -0.07624475657939911, 0.163524046540...
ClearMessages code in Page\_Load. However, nothing seems to make that successMessage label disappear when I hit update a 2nd time WITH a validation error. Can anyone suggest any other troubleshooting tips? As far as I know, there is no native way of doing this. You may rant about it, maybe Microsoft will hear it :). R...
[ -0.12924467027187347, 0.04184909537434578, 0.5292786359786987, -0.12147001177072525, 0.036056432873010635, -0.26549649238586426, 0.6276896595954895, 0.07707534730434418, -0.33790525794029236, -0.41365909576416016, -0.20946277678012848, 0.6265886425971985, -0.2757684886455536, -0.1956907659...
the error on the client, **without** going back to the server. So you're stuck with both the success message and the error message at the same time. What you can do about it: * place a `<div>` control on your page, that would show up the success message (as already suggested by others above). Whenever you update some...
[ 0.12974615395069122, 0.03090915083885193, 0.26372087001800537, 0.2308560162782669, -0.07428529113531113, 0.04505667835474014, 0.530605673789978, 0.06089513376355171, -0.17459847033023834, -0.601387619972229, -0.3372954726219177, 0.6855303645133972, -0.2870868742465973, 0.15855304896831512,...
script that does the validation. If you look at the client source of an ASP.NET page (with validators on it), here's what you can find: `<form name="aspnetForm" method="post" action="MyPage.aspx" onsubmit="javascript:return WebForm_OnSubmit();id="aspnetForm">` The WebForm\_OnSubmit is generated by ASP.NET and calls ...
[ 0.1543484777212143, 0.04422459378838539, 0.560162365436554, -0.19120976328849792, -0.11755770444869995, -0.10968641936779022, 0.27754631638526917, -0.36249932646751404, 0.06441676616668701, -0.5551485419273376, -0.218222513794899, 0.38368546962738037, -0.08136679977178574, -0.0826188623905...
Page.ClientScript.RegisterOnSubmitStatement(Page.GetType(), "ClearMessage", script); } ``` This will turn your page's autogenerated WebForm\_OnSubmit into the following: ``` function WebForm_OnSubmit() { document.getElementById('ctl00_yourDivControl').style.display='none'; if (typeof(ValidatorOnSubmit) == "f...
[ -0.0707593485713005, 0.06669753789901733, 0.9376851320266724, -0.274130642414093, 0.029859228059649467, -0.07794958353042603, 0.38264065980911255, -0.2494298666715622, -0.28687813878059387, -0.5867467522621155, -0.5799291729927063, 0.5744354724884033, -0.36428141593933105, 0.11034536361694...
shown again by the code-behind on the server. And so on and so forth. I hope the above is helpful. It's not the full-blown solution, but it gives sufficient hints to point you in the right direction.
[ 0.44367292523384094, 0.044624000787734985, 0.3528672754764557, 0.1571284532546997, 0.11873333156108856, -0.14536364376544952, 0.10534314066171646, 0.47288206219673157, -0.12750190496444702, -0.48363035917282104, 0.012506931088864803, 0.23744915425777435, 0.4251735508441925, 0.0296991262584...
How do I properly set the default character encoding used by the JVM (1.5.x) programmatically? I have read that `-Dfile.encoding=whatever` used to be the way to go for older JVMs. I don't have that luxury for reasons I wont get into. I have tried: ``` System.setProperty("file.encoding", "UTF-8"); ``` And the prope...
[ 0.10680714249610901, -0.08635065704584122, 0.7865779399871826, -0.18910738825798035, 0.1345914602279663, -0.10241330415010452, 0.29105135798454285, -0.4021660089492798, -0.1478918492794037, -0.8453848958015442, -0.37292003631591797, 0.6826457977294922, -0.2674954831600189, -0.1827078908681...
character encoding used by `String.getBytes()` and the default constructors of `InputStreamReader` and `OutputStreamWriter` has been permanently cached. As [Edward Grech points out,](https://stackoverflow.com/a/623036/3474) in a special case like this, the environment variable `JAVA_TOOL_OPTIONS` *can* be used to spec...
[ -0.19780205190181732, 0.023798217996954918, 0.2041807472705841, -0.2937994599342346, 0.29367437958717346, 0.11662096530199051, 0.1254047304391861, 0.0034336084499955177, -0.0003690820885822177, -0.7790771722793579, -0.40615206956863403, 0.544212281703949, -0.2148440182209015, -0.0374447479...
method or constructor overload to specify it.
[ -0.1788472682237625, 0.11957110464572906, -0.14112117886543274, 0.12901359796524048, -0.2039952576160431, -0.18424244225025177, 0.031432900577783585, -0.16728687286376953, 0.19942323863506317, -0.4503537118434906, -0.2606126666069031, 0.3955870270729065, -0.33007511496543884, 0.18642133474...
Why the FontFamily param of the Font object is a string and not an enum? FontFamily refers to the name of the Font. While you could use "monospace" or "serif" I wouldn't think it would be supported by .Net. Remember, using a enum would be impossible. A enum is a static compile-time feature, which means that it can't "...
[ 0.3558015823364258, 0.1991289258003235, 0.21523341536521912, 0.13801953196525574, -0.10861818492412567, 0.08125513046979904, 0.15872307121753693, -0.06788960844278336, -0.24371200799942017, -0.5272219777107239, -0.0990067720413208, 0.13522443175315857, -0.35845768451690674, 0.3340754210948...
included in the list and some excluded (because once compiled an enum becomes 'final'). Enums are a convenient store of integral constants and NOTHING else. Each item in a enum has a convenient name and a value, even if you don't specify it. The following two enums are the same. ``` public enum MyEnum { A = 1, B...
[ 0.07631876319646835, 0.2120162695646286, 0.30975455045700073, 0.045457638800144196, 0.06990128010511398, 0.09143129736185074, -0.17242154479026794, -0.3175572156906128, -0.04655690863728523, -0.49614307284355164, -0.2784789204597473, 0.21100926399230957, -0.2803150415420532, 0.247341290116...
code will get you a list of fonts (you will need to add System.Drawing as a reference): ``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Drawing.Text; using System.Drawing; namespace ConsoleApplication19 { class Program ...
[ 0.29610559344291687, 0.057762376964092255, 0.3991144597530365, -0.13870485126972198, 0.15324310958385468, 0.4110259413719177, 0.32318589091300964, -0.160935640335083, -0.07472255080938339, -0.5216473340988159, -0.30509063601493835, 0.5316085815429688, -0.5357593894004822, 0.197063043713569...
InstalledFontCollection ifc = new InstalledFontCollection(); foreach (FontFamily o in ifc.Families) { Console.WriteLine(o.Name); }
[ -0.1304251104593277, -0.05645327642560005, 0.7529482245445251, -0.4869181513786316, 0.5491305589675903, 0.45976150035858154, 0.16044531762599945, 0.03485994040966034, 0.06042247265577316, -0.651201069355011, -0.3586938977241516, 0.5177573561668396, -0.38298869132995605, 0.2888798117637634,...
Console.ReadLine(); } } } ```
[ -0.3846477270126343, 0.15643006563186646, 0.3033234179019928, 0.03902124986052513, 0.41779711842536926, -0.24481333792209625, -0.030945437029004097, 0.27863553166389465, 0.28072062134742737, -0.7353537082672119, -0.26719847321510315, 0.7346143126487732, -0.35252460837364197, 0.287927061319...
Is it possible to create a new process on windows with a different user account? I know there are a context menu "Run as" but I want do it from Java. I have the username and the password. You need to write a DLL using the [Java Native Interface (JNI)](http://en.wikipedia.org/wiki/Java_Native_Interface) as you cannot do...
[ 0.24673506617546082, 0.225790873169899, 0.246522456407547, -0.08672471344470978, 0.12305009365081787, 0.06982441246509552, 0.06979060918092728, -0.09612688422203064, -0.32808443903923035, -0.6673238277435303, -0.05770520865917206, 0.38325753808021545, -0.08350365608930588, 0.29487463831901...
(it takes the username and password to authentify that other user).
[ 0.11222799867391586, 0.2114979773759842, 0.3866147994995117, -0.07974079251289368, 0.22260665893554688, -0.05350446328520775, 0.3157246708869934, 0.030039584264159203, 0.2688218653202057, -0.3768347203731537, -0.42582815885543823, 0.5027663707733154, 0.05593268945813179, -0.007719678338617...
I am actually rendering an excel file in the browser. I use the Response.Writefile(filePath) to dod this. It is working perfectly fine in few of the machines. I am getting a pop up with "Open","Save" and "Cancel" option. But incase of few machines after i do a save click on the popup a plain empty page remains open. ...
[ 0.15851101279258728, 0.11142905056476593, 0.6029744744300842, -0.046808965504169464, -0.16126281023025513, -0.2113417088985443, 0.4379916489124298, 0.6516702771186829, -0.2643464207649231, -1.093675971031189, -0.10308047384023666, 0.6397151947021484, 0.07406894862651825, 0.0992316082119941...
file is opened or saved. Are you setting any HTTP headers? If you are not, you are relying on the browser to interpret the data correctly. To tell the browser you are sending excel content: ``` Response.ContentType = "application/x-excel"; ``` To tell the browser to treat the response as download: ``` Response.Add...
[ 0.012582657858729362, 0.10218056291341782, 0.5995119214057922, 0.13371561467647552, 0.04158680513501167, -0.25898563861846924, 0.25435471534729004, 0.03510064631700516, -0.30944186449050903, -0.7579742074012756, -0.5843732357025146, 0.6509713530540466, -0.4231235980987549, -0.1082456484436...
Which is the best, user-friendliest performance tool for MySQL? I'd like help with pinpointing the bottle neck of my setup. Is the problem in the SQL statements, the settings variables, or something else? The bad news: there are GUI tools to help with this, but its a skilled and wide ranging job. So they don't cover ev...
[ 0.18303373456001282, 0.024067724123597145, 0.028377017006278038, 0.32432401180267334, -0.0020225427579134703, -0.14455194771289825, -0.016568509861826897, 0.19081486761569977, -0.05329739674925804, -0.5577182173728943, 0.09817001223564148, 0.886946976184845, -0.022542549297213554, -0.26102...
bad, you can only get so far. This includes normalisation, as well as using appropriate types for fields. I'll leave this point here, as I think its a bit of an aside, and not what you are after. Make sure the MySQL Query Cache is set up and working and give it a bit more RAM if you can, and make sure that your import...
[ 0.2627820074558258, 0.25853633880615234, 0.1650804877281189, -0.017084628343582153, -0.0534331239759922, -0.13588057458400726, 0.5682471394538879, 0.32193711400032043, -0.32417941093444824, -0.5122291445732117, -0.048537477850914, 0.4964488446712494, -0.32330384850502014, 0.158370479941368...
sql, and use the time to the nearest minute/hour/day (the largest period you can get away with) to allow mysql to get some caching benefit. To begin optimising things: Sticking "EXPLAIN" in front of select is THE way to see how a query is being executed and idetify how to improve it. Learn to interpret the output: <ht...
[ 0.2922419011592865, -0.1635841578245163, -0.05683394894003868, 0.23537413775920868, -0.35088157653808594, -0.221925288438797, 0.16016994416713715, -0.12283209711313248, 0.05326054245233536, -0.541598916053772, 0.11376481503248215, 0.5967843532562256, -0.3446355164051056, -0.074923977255821...
to check the slow query log - it logs to a file all queries taking longer than x seconds. Overview, including config for if its not logging this already, is here: <http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html> - I've also found that setting long\_query\_time to 0 for a day or so, so that all queries are ...
[ 0.2363547533750534, -0.2273232638835907, 0.5518893003463745, 0.1166348084807396, -0.10123799741268158, -0.15598879754543304, 0.14718997478485107, 0.2529744505882263, -0.4792487323284149, -0.5495703220367432, 0.20150820910930634, 0.3840486407279968, 0.13052202761173248, 0.29369688034057617,...
from here: <http://hackmysql.com/mysqlsla> is a good tool. It can do more than just slow query log analysis - read the manual. But to explain what it does for slow logs: the slow query log can contain a lot of data, so it can be hard to figure out which queries are the most expensive overall - eg: factor in how many ...
[ 0.22760090231895447, -0.5111817121505737, 0.25225454568862915, 0.23881711065769196, -0.12221059203147888, -0.22970139980316162, 0.023600371554493904, 0.07094740122556686, -0.23591120541095734, -0.4833962917327881, 0.4131026268005371, 0.49139535427093506, 0.0837474837899208, -0.048965603113...
values in the where clauses. It then presents you (by default) the top 10 queries in terms of total execution time - which often has some surprises, but is usually the most productive starting point - take the most expensive query and use EXPLAIN on it and see if you can improve it. Some queries take a long time, and ...
[ 0.2176515907049179, -0.0733344778418541, 0.2988022267818451, 0.42099621891975403, -0.241948202252388, 0.062051668763160706, 0.29571402072906494, -0.4449658989906311, 0.17951324582099915, -0.44662564992904663, -0.20809020102024078, 0.6996601819992065, -0.0899956077337265, -0.068672455847263...
mysqlsla output because you run them a lot (especially true if long\_query\_time is set to 0), even if they run pretty quick. Maybe time to add some caching to your app? <http://www.maatkit.org/> also looks promising - never used it, but the mk-query-profiler tool should be useful to further look into why queries slow...
[ 0.03168955817818642, -0.55586177110672, 0.5775507688522339, 0.17299887537956238, -0.1064530685544014, -0.13387589156627655, 0.15086837112903595, 0.27340877056121826, -0.28317925333976746, -0.5772499442100525, 0.2520378530025482, 0.23318606615066528, -0.08181776106357574, -0.200210645794868...
system resources. I don't know that much on this - my approach has always been that if something is red and looks bad, to go and read up about it and decide if its important and whether I should do something (usually means allocating more resources to MySQL by changing config). Recently I've found that running SHOW PR...
[ 0.40528398752212524, -0.18243636190891266, 0.4671230614185333, 0.21090903878211975, -0.024215687066316605, 0.025020960718393326, 0.2391578108072281, 0.22694620490074158, -0.5650479197502136, -0.7110201716423035, 0.2438638061285019, 0.580975353717804, -0.1481654793024063, 0.0960072651505470...
times and observe the changes. I recently spotted a server using every available mysql connection to run an identical query using this method. Sure, it'd have been in the slow query log, but this as a really quick and obvious way to see what was up.
[ 0.5734785199165344, -0.1448703557252884, 0.5140220522880554, 0.0324464850127697, 0.14857152104377747, -0.18285003304481506, 0.1095883697271347, 0.48789024353027344, -0.646617591381073, -0.8451663851737976, 0.32365837693214417, 0.20930378139019012, -0.05897150933742523, 0.24805405735969543,...
I found this question in an old question in your website so i thought i can do it but I think I was mistaken :-) the old post was [here](https://stackoverflow.com/questions/360943/read-text-from-file-and-apply-some-operations-on-it) I'm new at the jagged array thing so did the following code ``` StreamReader rows = ...
[ 0.16118675470352173, -0.17531882226467133, 0.21409852802753448, -0.26933807134628296, -0.0009280945523642004, -0.2139255255460739, 0.6762171387672424, -0.32270556688308716, -0.1602936089038849, -0.4695771038532257, -0.0920422300696373, 0.7510204911231995, -0.22730135917663574, -0.248851820...
{ String[][]rows = new String [i][]; ; rows = rows.ReadLine(); String[][] rows = new string[S.Length][]; i++; }
[ -0.17691989243030548, -0.23227109014987946, 0.49906110763549805, -0.5184222459793091, 0.0629449188709259, 0.30031585693359375, 0.45602965354919434, -0.5054231286048889, -0.24038033187389374, -0.4247209131717682, -0.49697035551071167, 0.5427514910697937, -0.3236505091190338, 0.3021718859672...
for (int i; i < S.Length; i++) { row[i] = S[I].Split(','); } int totalCounter = 0, totalSum = 0; // etc
[ 0.1080520823597908, -0.4262981414794922, 0.5138324499130249, -0.17710769176483154, 0.07494299113750458, 0.2272726446390152, 0.05851476266980171, -0.5300869345664978, -0.39542314410209656, -0.1770511418581009, -0.2547013461589813, 0.3373689651489258, -0.22684958577156067, 0.0543876625597476...
foreach(string[] row in rows) { int m1 = int.Parse(row[3]); totalCounter++; totalSum += m1; switch(row[2])
[ -0.3358500897884369, -0.054673243314027786, 0.37934860587120056, -0.46577996015548706, 0.16336899995803833, 0.4067443609237671, 0.18836957216262817, -0.4786362946033478, -0.32432207465171814, -0.16411913931369781, -0.3571779131889343, 0.43391868472099304, -0.257966011762619, -0.27431294322...
{ case "male": maleCount++; maleSum += m1;
[ -0.6004635691642761, 0.182929128408432, 0.03555629029870033, -0.18748866021633148, 0.18247056007385254, 0.8588535785675049, 0.15771645307540894, -0.15695005655288696, -0.2242887318134308, -0.5084355473518372, -0.513070821762085, 0.023059062659740448, -0.5535475015640259, -0.069198526442050...
break; case "female": femaleCount++;
[ -0.6948052644729614, -0.07568633556365967, -0.12958133220672607, -0.3039195239543915, -0.17603574693202972, 0.6010905504226685, 0.28675517439842224, -0.11250027269124985, -0.4620043635368347, -0.30549904704093933, -0.7687419652938843, 0.1517738550901413, 0.012726284563541412, 0.13984186947...
femaleSum += m1; break; } } ``` I know i did major mistakes
[ -0.2430347502231598, 0.41248220205307007, -0.10379119217395782, -0.3542305827140808, 0.06179122254252434, 0.25760164856910706, 0.7163841724395752, -0.11248740553855896, -0.23898056149482727, -0.5270902514457703, -0.13117273151874542, 0.4961059093475342, -0.19630160927772522, 0.290043681859...
but at east i tried can any one help me to make it a workin code The bad news: there are GUI tools to help with this, but its a skilled and wide ranging job. So they don't cover everything, its likely you will need to use command line stuff/sql statements etc to help. I've only really used the command line tools. I'll ...
[ 0.12382987141609192, 0.25922539830207825, 0.13325954973697662, 0.06225929409265518, 0.028616145253181458, -0.21854111552238464, 0.23781391978263855, 0.13503398001194, -0.26488959789276123, -0.596929132938385, 0.05512635037302971, 0.6020805835723877, -0.15672314167022705, 0.0629504248499870...
fields. I'll leave this point here, as I think its a bit of an aside, and not what you are after. Make sure the MySQL Query Cache is set up and working and give it a bit more RAM if you can, and make sure that your important queries aren't doing anything that prevents mysql caching them. For example, using the NOW() f...
[ 0.5113652348518372, 0.12413546442985535, 0.27514803409576416, 0.01269566547125578, 0.055928025394678116, -0.38666871190071106, 0.10278485715389252, 0.3325682580471039, -0.3664030134677887, -0.5492902398109436, 0.10221376270055771, 0.4774266481399536, -0.1484028398990631, 0.1329851597547531...
to allow mysql to get some caching benefit. To begin optimising things: Sticking "EXPLAIN" in front of select is THE way to see how a query is being executed and idetify how to improve it. Learn to interpret the output: <http://dev.mysql.com/doc/refman/5.0/en/using-explain.html> You'll often be able to add new indexes...
[ 0.1627778708934784, -0.34446609020233154, -0.19034481048583984, 0.26061877608299255, -0.4276658296585083, -0.16379021108150482, 0.2572675049304962, -0.09584842622280121, 0.08163662999868393, -0.99607253074646, 0.1697685271501541, 0.5136540532112122, -0.329409658908844, -0.14877727627754211...
x seconds. Overview, including config for if its not logging this already, is here: <http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html> - I've also found that setting long\_query\_time to 0 for a day or so, so that all queries are logged here with time taken, is a useful way to get an idea of exactly where th...
[ 0.23148255050182343, -0.334490567445755, 0.5567257404327393, 0.2963324189186096, -0.12855616211891174, -0.17879419028759003, -0.020078862085938454, 0.28780654072761536, -0.4343924820423126, -0.6128695607185364, 0.08171240985393524, 0.2658911645412445, 0.06538413465023041, 0.104674279689788...
- read the manual. But to explain what it does for slow logs: the slow query log can contain a lot of data, so it can be hard to figure out which queries are the most expensive overall - eg: factor in how many times they run and when two queries are actually the same with a different id in a where clause. MySQL sla do...
[ -0.04184610769152641, -0.3133552074432373, 0.3859195411205292, 0.47320571541786194, -0.08790916204452515, -0.11058101803064346, 0.2948746681213379, -0.08955811709165573, -0.15587790310382843, -0.46429675817489624, 0.07477781921625137, 0.6667547225952148, 0.057607993483543396, -0.2864014506...
of total execution time - which often has some surprises, but is usually the most productive starting point - take the most expensive query and use EXPLAIN on it and see if you can improve it. Some queries take a long time, and can't easily be improved. In this case, can you get the data another way or at least cache ...
[ 0.24247348308563232, -0.12349144369363785, 0.08502353727817535, 0.3266344666481018, -0.05552266165614128, 0.01826663501560688, 0.3903745710849762, -0.24783992767333984, -0.08153970539569855, -0.6180574297904968, -0.052568066865205765, 0.6784773468971252, -0.05420947074890137, 0.02631888352...
if they run pretty quick. Maybe time to add some caching to your app? <http://www.maatkit.org/> also looks promising - never used it, but the mk-query-profiler tool should be useful to further look into why queries slow. A completely separate thing to look at as well: the "status" page in PHPMYADMIN (or you can run a...
[ 0.1815711110830307, -0.17031623423099518, 0.28854259848594666, 0.3655480742454529, 0.01573038101196289, -0.08096639066934586, 0.4212433099746704, 0.28526031970977783, -0.21676500141620636, -0.820759117603302, 0.18003222346305847, 0.515179455280304, 0.10625934600830078, -0.22373363375663757...
something is red and looks bad, to go and read up about it and decide if its important and whether I should do something (usually means allocating more resources to MySQL by changing config). Recently I've found that running SHOW PROCESSLIST can also be useful on a server that is suffering. Whilst it only gives you li...
[ 0.5491975545883179, -0.21052588522434235, 0.2922671437263489, -0.1932668536901474, -0.24774150550365448, -0.09364593029022217, 0.28256264328956604, 0.31759417057037354, -0.5984634160995483, -0.693534791469574, 0.25125664472579956, 0.3197835683822632, -0.23708945512771606, 0.147572815418243...
an identical query using this method. Sure, it'd have been in the slow query log, but this as a really quick and obvious way to see what was up.
[ 0.055161818861961365, -0.16934216022491455, 0.22727921605110168, 0.19407886266708374, -0.3380969166755676, -0.2339457869529724, 0.1020454615354538, -0.07846860587596893, -0.43817415833473206, -0.4161914587020874, 0.3276796340942383, 0.31245753169059753, -0.15878090262413025, -0.06888564676...
I'm interested in implementing autocomplete in Python. For example, as the user types in a string, I'd like to show the subset of files on disk whose names start with that string. What's an efficient algorithm for finding strings that match some condition in a large corpus (say a few hundred thousand strings)? Someth...
[ 0.2457215040922165, 0.01029462181031704, -0.08430515974760056, 0.0054093459621071815, -0.06857278198003769, 0.0433393158018589, 0.10180756449699402, 0.0300814937800169, -0.12809592485427856, -0.764790952205658, -0.07506676018238068, 0.8452361226081848, -0.6359789371490479, -0.3300912976264...
I'm showing here? For exact matching, generally the way to implement something like this is to store your corpus in a [trie](http://en.wikipedia.org/wiki/Trie). The idea is that you store each letter as a node in the tree, linking to the next letter in a word. Finding the matches is simply walking the tree, and showing...
[ 0.6758259534835815, 0.2645609378814697, 0.27334243059158325, 0.03711465373635292, -0.25756093859672546, 0.39303749799728394, 0.07305031269788742, -0.07279159128665924, 0.011020146310329437, -0.5527235865592957, 0.09158679097890854, 0.09854728728532791, -0.008147605694830418, 0.482897788286...
and "r", making cat and car as your completions). Note that you'll also need to mark nodes that are complete words to handle names that are substrings of others (eg "car" and "cart") To get the desired fuzzy matching, you may need to make some changes however.
[ -0.07228323072195053, -0.11470319330692291, 0.4777209162712097, 0.1483515352010727, -0.13409800827503204, 0.446367472410202, 0.15601271390914917, -0.1365034133195877, -0.17885251343250275, -0.3516213893890381, -0.3248184025287628, 0.32697391510009766, 0.06194455921649933, 0.230586126446723...
It is connected to BI and merging of data from different data sources and would make that process more smooth. And is there an optimal migration strategy from a database without Guids to a version with Guids without information losses? Edited after reading Frans Bouma's answer, since my answer has been accepted and th...
[ 0.15698575973510742, 0.04083053022623062, 0.11381164938211441, 0.3639659583568573, -0.18802453577518463, 0.03058370016515255, -0.32515573501586914, -0.2125277817249298, -0.3237210512161255, -0.4393977224826813, 0.1438228338956833, 0.46541130542755127, -0.15518805384635925, -0.0373383760452...
make your choice. Take into account that if your primary key is "clustered" then GUIDs are not appropriate. This is because a clustered index causes the rows to be physically re-ordered in the table on inserts/updates. Since GUIDs are random, every insert would require actual rows in the table to be moved to make way ...
[ 0.12408447265625, -0.0002213272819062695, 0.2845940887928009, 0.22079823911190033, 0.21748796105384827, 0.22340211272239685, -0.1511393040418625, 0.05336165055632591, -0.29621487855911255, -0.7484037280082703, 0.04087371006608009, 0.6021079421043396, -0.1485150307416916, -0.024668790400028...
if you're using database replication (SQL Server will add a "rowguid" column automatically for merge-replicated tables) because the identity seed is maintained per server instance, and you'd get duplicates. **2) External Key/External ID/Business ID** Often it is also preferable to have the additional concept of an "ex...
[ 0.26499253511428833, 0.11306162178516388, 0.12050310522317886, 0.27436020970344543, 0.05019353702664375, -0.04006544128060341, -0.03612178564071655, -0.10019523650407791, -0.3472122550010681, -0.5686740279197693, 0.03413302078843117, 0.45191851258277893, -0.11130664497613907, 0.38575309514...
them.
[ 0.2846624255180359, 0.33277928829193115, 0.09694752842187881, 0.12144450098276138, -0.24820151925086975, 0.20225362479686737, 0.009774827398359776, -0.10091307014226913, -0.3383118212223053, -0.4857724606990814, -0.15055954456329346, 0.4165761172771454, -0.1952596753835678, 0.2329004704952...
I have 6 classes, which are all document types. All the document types have the same 8 fields. There is one class which consists of only these 8 fields. The rest of the classes have more fields. Some of these classes have the same fields (beside the 8 fields). Example: class Document: fields 1 to 8 class Form: field...
[ 0.299839586019516, 0.13257983326911926, 0.2412821501493454, 0.2397172451019287, -0.007883092388510704, 0.12501102685928345, 0.3374127149581909, -0.2346022129058838, 0.02897678315639496, -0.716680645942688, -0.29766908288002014, 0.40518662333488464, 0.05796809867024422, 0.3281020522117615, ...
make one or more interfaces, or should i use abstract classes? Thnx Either make Document the base type of Form etc, or make a form have the extra fields and a reference to a separate Document (i.e. use composition instead of inheritance). In this case it sounds like inheritance would quite possibly be the best option,...
[ 0.5930702090263367, -0.18742388486862183, 0.10513260960578918, 0.5232399106025696, -0.08742338418960571, -0.17427974939346313, 0.0030840584076941013, -0.222747802734375, -0.02439117431640625, -0.7399778962135315, 0.06884445995092392, 0.672379732131958, -0.21444645524024963, -0.271453261375...
- i.e. the common 8 fields. That would take an instance of Document. You *may* want to be able to pass a Form or WorkInstruction to it directly - in which case it's best to derive from Document. Alternatively, when rendering a Form or WorkInstruction, you could create an instance of the control passing in the document ...
[ 0.09860248118638992, 0.026468342170119286, 0.41710424423217773, 0.09067675471305847, 0.04779314994812012, -0.07464489340782166, 0.019965993240475655, -0.4957734942436218, 0.025440432131290436, -0.5747019648551941, -0.4332488477230072, 0.5686514973640442, -0.3789714276790619, -0.08659018576...
// Other stuff } // Later on Controls.Add (new DocumentDisplay(form.Document)); ``` Without knowing the rest of your design, it's hard to recommend one or the other. I *usually* prefer composition over inheritance, but this feels like more of a natural inheritance situation.
[ 0.42895442247390747, 0.14355821907520294, 0.12236591428518295, -0.03441749885678291, 0.039197299629449844, -0.37860438227653503, 0.13840317726135254, -0.08068940043449402, 0.006813790183514357, -0.8980973958969116, -0.13552509248256683, 0.5760704278945923, -0.0460878387093544, 0.0281769279...
I am developing a Web Album using Grails and for image processing, I am using grails-image-tools plugin. I need a functionality to resize the images if the uploaded images size is too big (for eg: more than 600 \* 840 ) . In this case I need to resize this image to 600 \* 840). What is the most efficient way to do this...
[ 0.3837932348251343, 0.004728492349386215, 0.3998989164829254, -0.09512826800346375, -0.25471338629722595, 0.23077760636806488, 0.21174870431423187, -0.6014938950538635, -0.016323667019605637, -0.8657753467559814, -0.0021409005858004093, 0.8303524255752563, -0.4272971749305725, -0.019739029...
= new ImageIcon(bytes).image int width = ai.getWidth( null ) int height = ai.getHeight( null ) def limits = 300..2000 assert limits.contains( width ) && limits.contains( height ) : 'Picture is either too small or too big!' float aspectRatio = width / height float requiredAspectRatio = maxW / ma...
[ 0.18331217765808105, -0.4112771153450012, 0.9035651683807373, 0.057183388620615005, -0.03979326784610748, 0.12905092537403107, 0.2501653730869293, -0.6628645062446594, -0.2668099105358124, -0.37384283542633057, -0.11735659837722778, 0.7698653340339661, 0.007960697636008263, 0.0119892517104...
maxW dstH = Math.round( maxW / aspectRatio) } else { dstH = maxH dstW = Math.round(maxH * aspectRatio) } BufferedImage bi = new BufferedImage(dstW, dstH, BufferedImage.TYPE_INT_RGB) Graphics2D g2d = bi.createGraphics() g2d.drawImage(ai, 0, 0, dstW, dstH, null, null) IIO.w...
[ -0.20703697204589844, -0.20261134207248688, 0.643111526966095, -0.09299714118242264, -0.39158087968826294, 0.4111529290676117, 0.2360467165708542, -0.503722071647644, -0.28330665826797485, -0.6736838221549988, -0.13059164583683014, 0.603400468826294, -0.4122235178947449, -0.132857620716094...
I ask because I am sending a byte stream from a C process to Java. On the C side the 32 bit integer has the LSB is the first byte and MSB is the 4th byte. So my question is: On the Java side when we read the byte as it was sent from the C process, what is [endian](https://en.wikipedia.org/wiki/Endianness) on the Java ...
[ -0.07934144139289856, 0.08401630073785782, 0.2297402024269104, -0.35013145208358765, -0.27412137389183044, 0.25647714734077454, -0.16929173469543457, -0.16256806254386902, -0.1772763580083847, -0.6622494459152222, -0.02163681387901306, 0.2816135287284851, -0.38875266909599304, 0.2521700859...
See man htons for the different translators in C.
[ 0.08460826426744461, 0.38877642154693604, -0.19159077107906342, -0.404840350151062, -0.4542044699192047, 0.3402857482433319, 0.3227647542953491, 0.16032403707504272, -0.3750052750110626, -0.42282748222351074, -0.1206427812576294, 0.06026875972747803, 0.028203535825014114, -0.14829421043395...
What is the "cleanest" way to implement an command-line UI, similar to git's, for example: ``` git push origin/master git remote add origin git://example.com master ``` Ideally also allowing the more flexible parsing, for example, ``` jump_to_folder app theappname v2 jump_to_folder app theappname source jump_to_fol...
[ 0.3427620828151703, -0.10120373964309692, 0.7088657021522522, 0.0017374485032632947, -0.14999838173389435, -0.010770591907203197, 0.0019198092631995678, -0.5989122986793518, -0.21874994039535522, -0.8155733346939087, -0.3041952848434448, 0.5711677074432373, -0.29866740107536316, -0.1374667...
be a more elegant way to do this? As an entirely theoretically example, I could describe the UI schema.. ``` app: fixed: application_name optional params: arg subsection: "build" "source" "tmp" "config" arg version:
[ 0.24606436491012573, 0.10644621402025223, 0.6463975310325623, -0.08781322836875916, 0.05607344210147858, -0.1751796305179596, 0.12316804379224777, -0.16042885184288025, -0.26853176951408386, -0.41880089044570923, -0.6244020462036133, 0.7653796672821045, -0.3729327619075775, -0.318272024393...
integer "v" + integer ``` Then parse the supplied arguments though the above schema, and get a dictionary: ``` >>> print schema.parse(["app", "theappname", "v1", "source"]) { "application_name": "theappname", "params":{ "subsection": "source", "version":"v1" } } ``` Does suc...
[ -0.34813210368156433, 0.3288281559944153, 0.7241871356964111, -0.3664577901363373, -0.14278672635555267, 0.5123457908630371, 0.1325543075799942, -0.44938215613365173, -0.31267625093460083, -0.2561199367046356, -0.38048624992370605, 0.6976179480552673, -0.46943238377571106, -0.2899177074432...
# Arguments for top-level, e.g "subcmds.py -v" arger.add_argument("-v", "--verbose", action="count", default=0) subparsers = arger.add_subparsers(dest="command") # Make parser for "subcmds.py info ..." info_parser = subparsers.add_parser("info") info_parser.add_argument("-m", "--moo", dest="moo") ...
[ -0.29529455304145813, -0.060370974242687225, 0.2818426191806793, -0.1116492971777916, 0.1363677978515625, 0.5229867696762085, 0.10331553220748901, -0.5161758065223694, -0.2696664035320282, -0.5374223589897156, -0.7055863738059998, 0.9719017148017883, -0.5423023104667664, -0.513209879398346...
== "info": print "Info command" print "--moo was %s" % opts.moo elif opts.command == "create": print "Creating %s" % opts.name print "Additional: %s" % opts.additional else: # argparse will error on unexpected commands, but # in case we mistype one of the elif s...
[ 0.06383900344371796, -0.09125212579965591, 0.24862925708293915, -0.3607565462589264, 0.03750789165496826, 0.4373360872268677, 0.41457659006118774, -0.3167586028575897, -0.02894073911011219, -0.37599676847457886, -0.29479795694351196, 0.8140243887901306, -0.4441191256046295, -0.124407127499...
ValueError("Unhandled command %s" % opts.command) if __name__ == '__main__': main() ``` This can be used like so: ``` $ python subcmds.py create myapp v1 blah Namespace(additional=['v1', 'blah'], command='create', name='myapp', verbose=0) Creating myapp Additional: ['v1', 'blah'] $ python subcmds.py info --moo ...
[ -0.05951027572154999, 0.015127087943255901, 0.8236173391342163, -0.21717700362205505, -0.0207565538585186, 0.21913038194179535, 0.16306190192699432, -0.4059716761112213, -0.26239338517189026, -0.5089989304542542, -0.17177967727184296, 0.7276241183280945, -0.2147728055715561, -0.05989793688...
I dropped a database from SQL Server, however it turns out that **my login** was set to use the dropped database as its default. I can connect to SQL Server Management Studio by using the 'options' button in the connection dialog and selecting 'master' as the database to connect to. However, whenever I try to do anythi...
[ 0.1931782215833664, 0.03887774795293808, 0.5151111483573914, -0.019749868661165237, 0.1620086431503296, -0.11163847893476486, 0.3561922609806061, -0.13266746699810028, -0.4997856616973877, -0.41043102741241455, 0.01686348207294941, 0.3694879412651062, -0.30250319838523865, 0.32050231099128...
LOGIN [my_user_name] WITH DEFAULT_DATABASE = [new_default_database] ``` **Note**: user and database names are provided without quotes (unlike the `sp_defaultdb` solution). Brackets are needed if name had special chars (most common example will be domain user which is `domain\username` and won't work without brackets)...
[ 0.1691928505897522, 0.27261847257614136, 0.465078741312027, -0.0004348596266936511, 0.23665635287761688, 0.08034292608499527, 0.3035837709903717, -0.2887372076511383, -0.14724792540073395, -0.28802919387817383, -0.030503807589411736, 0.6517837643623352, -0.4554137587547302, 0.2119887620210...
I am sure this is a very simple problem, but I am new to VB.NET, so I am having an issue with it. I have a `Decimal` variable, and I need to split it into two separate variables, one containing the integer part, and one containing the fractional part. For example, for x = 12.34 you would end up with a y = 12 and a z...
[ 0.30804747343063354, 0.3316150903701782, 0.09539467841386795, 0.026089971885085106, 0.03994986042380333, -0.024703221395611763, 0.035593755543231964, -0.10486628860235214, -0.06961365789175034, -0.25576335191726685, 0.21885329484939575, 0.46828898787498474, -0.1370680034160614, 0.208233609...
that will give you a negative value for both parts if the input is decimal (e.g. -1.5 => -1, -.5) EDIT: Here's a version of Eduardo's code which uses decimal throughout: ``` Sub SplitDecimal(ByVal number As Decimal, ByRef wholePart As Decimal, _ ByRef fractionalPart As Decimal) wholePart = Math.T...
[ -0.010776735842227936, 0.1635768711566925, 0.2389165312051773, 0.05142389237880707, -0.059286415576934814, -0.0024416751693934202, 0.14733567833900452, -0.32534486055374146, -0.10117776691913605, -0.021947719156742096, 0.11251412332057953, 0.2978250980377197, 0.01042451336979866, -0.139653...
I would like to write a macro for Notepad++ which should replace char1, char2, char3 with char4, char5, char6, respectively. Macros in Notepad++ are just a bunch of encoded operations: you start recording, operate on the buffer, perhaps activating menus, stop recording then play the macro. After investigation, I fou...
[ -0.16929012537002563, -0.04099532216787338, 0.34799811244010925, -0.4219908118247986, 0.3165166676044464, 0.3156214952468872, -0.23603032529354095, -0.18317259848117828, -0.30543220043182373, -0.620445728302002, 0.2855492830276489, 0.5828602910041809, -0.12247195839881897, -0.3609901964664...
<Action type="1" message="2170" wParam="0" lParam="0" sParam=" " /> <Action type="0" message="2327" wParam="0" lParam="0" sParam="" /> <Action type="0" message="2327" wParam="0" lParam="0" sParam="" /> <Action type="2" message="0" wParam="42024" lParam="0" sParam="" /> <Action type="2" message="0" wPara...
[ -0.10132993757724762, -0.30014440417289734, 0.3902406394481659, -0.15980440378189087, -0.25019335746765137, 0.2232968658208847, 0.17818045616149902, -0.4390665888786316, -0.6683876514434814, -0.44947341084480286, -0.14198404550552368, 0.45422545075416565, -0.4238364100456238, -0.3201439380...
that 2170 is the code of ReplaceSel (ie. insert string is nothing is selected), 2327 is Tab command, and Resource Hacker (just have it handy...) shows that 42024 is "Trim Trailing Space" menu item and 41006 is "Save". I guess action type 0 is for Scintilla commands with numerical params, type 1 is for commands with ...
[ 0.09743236750364304, -0.4109606444835663, 0.2185586839914322, 0.04368847236037254, -0.11968482285737991, 0.331766813993454, 0.19222018122673035, -0.5096688866615295, -0.27377384901046753, -0.2681746482849121, -0.00945726316422224, 0.543615996837616, -0.26696524024009705, -0.046573534607887...
(I edited manually, when exiting N++ it was truncated). I tried some tricks, but I fear such task is beyond the macro capabilities. Maybe that's where SciTE with its Lua scripting ability (or Programmer's Notepad which seems to be scriptable with Python) has an edge... :-) [EDIT] Looks like I got the above macro f...
[ 0.04540404677391052, 0.07172919064760208, 0.20696239173412323, -0.05582539737224579, 0.15115700662136078, 0.054592158645391464, 0.2849079966545105, 0.20061692595481873, -0.37242820858955383, -0.42744332551956177, -0.05300908163189888, 0.5534881353378296, -0.27133944630622864, -0.1963312476...
Are there some practical programming situations for someone to declare a class abstract when all the methods in it are concrete? Well you could be using a template method pattern where there are multiple override points that all have default implementations but where the combined default implementations by themselves a...
[ 0.3766683340072632, 0.0218356866389513, -0.4852240979671478, 0.14746910333633423, -0.2293848842382431, -0.21568037569522858, 0.30636319518089294, 0.002151201944798231, -0.185557559132576, -0.4310532510280609, 0.12221688032150269, 0.45934611558914185, -0.3899437189102173, 0.1855740249156952...
I have an existing site in php running on Apache using the mod\_rewrite plug-in. In other words, I currently have urls like www.example.com/section/subsection/ which Google and others have indexed. However, the site needs a major upgrade, and I would like to move it to asp.net. I only have the option of using a shared...
[ 0.7543671727180481, 0.30080118775367737, 0.24838267266750336, -0.06881073117256165, -0.3070164918899536, -0.23076947033405304, 0.4785192012786865, 0.0804874449968338, -0.030183564871549606, -0.5460429191589355, 0.4364776611328125, 0.521937906742096, -0.0582435242831707, 0.1959810107946396,...
engines. Thanks, Egil. According to Steve Sanderson’s blog post [Deploying ASP.NET MVC to IIS 6](http://blog.codeville.net/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/) it do not look like there is an option to do url rewriting/redirection with IIS6 in a shared hosting set up, where you cant manually configur...
[ -0.22884491086006165, -0.1594867706298828, 0.608431875705719, 0.2964029610157013, -0.1943727284669876, -0.14689186215400696, 0.297634482383728, -0.3175515830516815, -0.43838265538215637, -0.5385434627532959, -0.2842077910900116, 0.9089871048927307, -0.47630736231803894, 0.03543000295758247...
Should I prepare my code for possible/predicted future changes so that it's easier to make these changes even if I don't really know if these changes will be required anytime? I am likely to get lynched for my opinion on this, but here I go. While I have had this hammered into me over years of reading idealistic artic...
[ 0.7377466559410095, 0.5782095789909363, -0.0920930877327919, 0.07038989663124084, 0.24158553779125214, -0.224023699760437, 0.5793512463569641, -0.08298254013061523, -0.08061209321022034, -0.5889396667480469, 0.1842140257358551, 0.3716147840023041, -0.00820709578692913, 0.31777140498161316,...
to design, development and testing estimates, increasing cost and overheads, when in reality this is not often the case. How many times have you actually reused your code or a library. If it is going to be used in many places, through numerous projects, then yes you should. However, most of the time this is not the ca...
[ 0.751541256904602, 0.2960415184497833, -0.13872785866260529, 0.4991472661495209, 0.2074570208787918, -0.16664919257164001, 0.16036537289619446, 0.07080963999032974, -0.4457375109195709, -0.6048428416252136, 0.11493416875600815, 0.574724555015564, -0.03187144175171852, 0.1567966341972351, ...
not, I repeat NOT, an excuse to write sloppy, poorly designed, poorly documented code. This should be a fundamental that is so wholly ingrained in you that you could not break it, but writing a class for reuse is a waste most of the time as it will never get reused. There are obvious exceptions to this. If you are wri...
[ 0.42765873670578003, 0.28495365381240845, -0.3524484634399414, 0.18307767808437347, 0.13861866295337677, -0.42798352241516113, 0.4364348351955414, 0.07637982815504074, -0.2780870497226715, -0.5293985605239868, -0.24880552291870117, 0.4989681541919708, -0.33082133531570435, 0.09598442167043...
Is it worth it](https://stackoverflow.com/questions/325514/code-reusability-is-it-worth-it "Code Reusability: Is it worth it") It might help.
[ 0.16650351881980896, -0.2754603326320648, 0.24893729388713837, 0.32798805832862854, -0.010468835011124611, -0.15544448792934418, -0.1820504367351532, -0.11307941377162933, -0.32362642884254456, 0.29291844367980957, 0.4681195318698883, 0.7713573575019836, 0.3602903187274933, -0.457976549863...