text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
How do you find out the local time of the user browsing your website in ASP.NET? Create a hidden input control to get the value back at the server on the next page postback. It will need to be populated it in the onload event for the page with the value of a new Date object created in JavaScript. You will want to creat...
[ 0.33582985401153564, -0.4800790548324585, 0.414211243391037, 0.19391004741191864, 0.23178452253341675, -0.18948951363563538, 0.3690943419933319, -0.1025414764881134, -0.15275391936302185, -0.8559544682502747, -0.022511813789606094, 0.4044945240020752, -0.25025269389152527, 0.26947349309921...
if(input) input.value = now.toString(); } ``` Then create a call to the function passing the ClientId of the hidden input and then add that piece of script to the page using RegisterStartupScript so that it runs on page load.
[ -0.07747819274663925, 0.11253315210342407, 0.5292620658874512, -0.2935340702533722, 0.13520385324954987, -0.101453498005867, 0.2388971447944641, -0.2698054611682892, 0.2148367017507553, -0.7114056348800659, -0.2596064507961273, 0.6296983361244202, -0.3501312732696533, 0.1070997416973114, ...
I'm using this code, to make a request to a given URL: ``` private static string GetWebRequestContent(string url) { string sid = String.Empty; HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(url); req.KeepAlive = false; using (HttpWebResponse res = (HttpWebResponse)req.GetResponse()) { using...
[ 0.10451704263687134, -0.062315430492162704, 0.8543559312820435, -0.1324470490217209, -0.06634464859962463, 0.06698973476886749, 0.4326518476009369, -0.5177533030509949, -0.18363112211227417, -0.7121302485466003, -0.01451455894857645, 0.1565345674753189, -0.2995622456073761, 0.3320475220680...
URL's with HTTP this works fine. But with HTTPS it doesn't work. I get this exception: > The request was aborted: Could not create SSL/TLS secure channel. At the moment, I have only 2 servers behind the WLB and one on its own with a public IP behind a firewall. HTTPS requests works fine if I hit the stand-alone serve...
[ 0.24709902703762054, 0.04746272787451744, 0.798024594783783, 0.13946384191513062, -0.5426150560379028, -0.2943868041038513, 0.4445793032646179, -0.027244362980127335, -0.26119089126586914, -0.7490033507347107, 0.12625935673713684, 0.23550735414028168, -0.27530238032341003, 0.56618177890777...
the moment. So I put a record in my hosts file to hit the WLB. This shouldn't be causing problems... **My question**: Which SSL credentials/certificates does the HttpWebRequest use? If it uses 40 bit DES or 56 bit DES, that's the reason, because those are disabled in the WLB. But those certificates haven't been used i...
[ 0.25233331322669983, 0.12010206282138824, 0.2940031588077545, 0.053766537457704544, -0.10823383182287216, -0.32196566462516785, 0.5597487688064575, -0.07026012241840363, -0.14088033139705658, -0.914092481136322, -0.1325019747018814, 0.6210277080535889, -0.11798099428415298, 0.2711213827133...
or 56 bit DES, which is disabled in the WLB.
[ 0.5214012861251831, -0.2632809281349182, 0.012880108319222927, 0.41654467582702637, 0.13922275602817535, -0.039463989436626434, 0.2109118551015854, -0.08383718878030777, -0.009579822421073914, -0.3253481388092041, -0.36418089270591736, 0.4647814929485321, -0.0910908430814743, 0.27431863546...
I am getting the following error when I post back a page from the client-side. I have JavaScript code that modifies an asp:ListBox on the client side. How do we fix this? Error details below: ``` Server Error in '/XXX' Application. -------------------------------------------------------------------------------- Inv...
[ -0.21499022841453552, 0.23634743690490723, 0.5927185416221619, -0.0986686423420906, -0.06467583030462265, -0.07833682745695114, 0.669097363948822, -0.20814140141010284, -0.022313496097922325, -0.719715416431427, -0.18202927708625793, 0.5240337252616882, 0.034237731248140335, 0.193887874484...
or callback data for validation. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentException: Invalid postback or callback argument. Eve...
[ -0.09630326926708221, 0.15197394788265228, 0.42050525546073914, 0.018483862280845642, 0.05142401531338692, -0.08898945152759552, 0.3921887278556824, -0.3684886395931244, -0.24312099814414978, -0.2650737762451172, -0.3389837443828583, 0.5456126928329468, -0.04071320593357086, 0.044752318412...
postback or callback data for validation. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [ArgumentException: Invalid postback or c...
[ -0.11303499341011047, 0.12941741943359375, 0.344707727432251, 0.002704279962927103, 0.04270010069012642, -0.05331825464963913, 0.31914472579956055, -0.378492146730423, -0.23298011720180511, -0.2688369154930115, -0.3223298192024231, 0.45122039318084717, 0.008177955634891987, 0.0848585814237...
the postback or callback data for validation.] System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +2132728 System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +108 System.Web.UI.WebControls.ListBox.LoadPostData(String postDataKey, NameValueCollection postCo...
[ -0.33090904355049133, -0.12160079926252365, 0.4873511493206024, 0.0930650383234024, -0.029589815065264702, 0.29814663529396057, 0.3399008810520172, -0.4586019217967987, -0.19350802898406982, -0.34955355525016785, -0.2858488857746124, 0.28423452377319336, -0.2759860157966614, 0.103426866233...
the listbox in the Updatepanel and trigger a update, if you add or remove listbox. This way viewstate and related fields get updates and eventvalidation will pass.) * Forget client-side and use the classic postback and add or remove the listitems server-side. I hope this helps.
[ 0.19242361187934875, -0.319695383310318, 0.49444422125816345, 0.0037442673929035664, -0.1702497899532318, -0.3789529502391815, 0.3467419743537903, 0.09571482986211777, -0.32485848665237427, -0.8072815537452698, -0.19467273354530334, 0.861589252948761, -0.3218483030796051, 0.014697032980620...
We want to show a hint for a JList that the user can select multiple items with the platform dependent key for multiselect. However I have not found any way to show the OS X COMMAND symbol in a JLabel, which means the symbol that's printed on the apple keyboard on the command key, also called apple key. Here's a pic...
[ 0.36149483919143677, -0.04693905636668205, 0.657522439956665, 0.05255790799856186, 0.2065306454896927, -0.15965309739112854, -0.005407854914665222, -0.07881855964660645, -0.5326372981071472, -0.7398986220359802, -0.1709822565317154, 0.5621640086174011, -0.11424484103918076, -0.020341802388...
+ "select multiple items", KeyStroke.getKeyStroke( ... , ... ) ) ) , BorderLayout.SOUTH ); ``` Where instead of the *{0}* there should appear above seen symbol... Does any one of you guys know how to do this? I know it must be possible somehow since in the JMenuItems there is the symbol... My own (non graphical ...
[ -0.08154799044132233, -0.14170250296592712, 0.7020255923271179, -0.0946492925286293, 0.13008008897304535, 0.1332644522190094, 0.17118413746356964, -0.383352130651474, -0.4358225166797638, -0.6934700608253479, -0.41892680525779724, 0.19937092065811157, -0.33185726404190063, -0.0768774375319...
All you need to do is make your JLabel display HTML by starting its text string with <html> and then include the character code. ``` JLabel label = new JLabel( "<html>&#8984; is the Apple command symbol." ); ``` This will work on a Mac, but I've no idea what it'll do on other platforms, although you do seem to have ...
[ -0.12225458025932312, 0.32896748185157776, 0.6395624279975891, -0.35018596053123474, -0.025627028197050095, -0.14704644680023193, 0.24453815817832947, 0.11401581764221191, -0.034922048449516296, -0.9260451197624207, -0.15901578962802887, 0.46675264835357666, -0.23354366421699524, -0.053378...
How can i map a date from a java object to a database with Hibernate? I try different approaches, but i am not happy with them. Why? Let me explain my issue. I have the following class [1] including the main method i invoke and with the following mapping [2]. The issue about this approach you can see, when you look at ...
[ 0.08927002549171448, -0.11463811248540878, 0.5033706426620483, -0.21987801790237427, 0.02100563794374466, -0.377557635307312, 0.30084046721458435, -0.11364220082759857, -0.10145852714776993, -0.7816146612167358, 0.12362554669380188, 0.16765061020851135, -0.23654904961585999, 0.225571662187...
dates are not exactly equal, although they should, so it is hard to compare them without goofing around with return value of `getTime`. I also tried java.sql.Date, Timestamp and date instead of timestamp in the mapping, but without success. I wonder why the last three digits are zero and if this is a hibernate or a j...
[ 0.3879157602787018, -0.23783767223358154, 0.46382051706314087, -0.21634872257709503, 0.06671923398971558, -0.08496652543544769, 0.20108406245708466, -0.20709840953350067, -0.1153816506266594, -0.5787046551704407, 0.05757040157914162, 0.3535739779472351, -0.41745930910110474, 0.289786487817...
HibernateUtil.getSessionFactory().getCurrentSession().beginTransaction(); Clock clock = new Clock(); clock.date = new java.util.Date(); HibernateUtil.getSessionFactory().getCurrentSession().saveOrUpdate(clock); HibernateUtil.getSessionFactory().getCurrentSession().getTransaction().comm...
[ -0.15997590124607086, 0.21330931782722473, 0.926659107208252, -0.6604206562042236, 0.14809544384479523, 0.27403727173805237, 0.7598767876625061, -0.5489852428436279, -0.11322738975286484, -0.889479398727417, -0.5144401788711548, 0.5100462436676025, -0.5324782729148865, 0.032408908009529114...
System.out.println(fromDBClock.date.equals(clock.date)); System.out.println(clock.date.compareTo(fromDBClock.date)); System.out.println(fromDBClock.date.compareTo(clock.date)); System.out.println(clock.date.getTime()); System.out.println(fromDBClock.date.getTime()); System.out...
[ -0.28013649582862854, -0.18003971874713898, 0.7464054822921753, -0.36436355113983154, 0.27492082118988037, 0.27067941427230835, 0.4687870442867279, -0.42446351051330566, -0.22526153922080994, -0.7284125685691833, -0.37486085295677185, 0.6104600429534912, -0.4820123016834259, 0.320233404636...
this.id = id; } public java.util.Date getDate() { return date; } public void setDate(java.util.Date date) { this.date = date; } } ``` [2] ``` <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate....
[ 0.26063960790634155, -0.2404860556125641, 0.9154651761054993, -0.3796979784965515, 0.001251899404451251, -0.17079231142997742, 0.09620388597249985, -0.42379555106163025, -0.07331588119268417, -0.7064326405525208, -0.3757355511188507, 0.2508591413497925, -0.21603497862815857, 0.120423927903...
<generator class="native"/> </id> <property name="date" type="timestamp"/> </class> </hibernate-mapping> ``` MySql DateTime precision is only to the second. Java Date precision is to the millisecond. That is why the last three digits are zeros after it has been put in the database. Do this to yo...
[ -0.06184493377804756, -0.3047933280467987, 0.5612285137176514, -0.42747458815574646, 0.10105958580970764, -0.050501491874456406, 0.12653402984142303, -0.3990788161754608, -0.00236983853392303, -0.7078191637992859, 0.10947180539369583, 0.18228121101856232, -0.0038750621024519205, 0.25398448...
I find print\_r in PHP extremely useful, but wonder if there is anything remotely equivalent in Perl? Note @tchrist recommends [Data::Dump](http://search.cpan.org/~gaas/Data-Dump-1.21/lib/Data/Dump.pm) over [Data::Dumper](http://search.cpan.org/~jhi/perl-5.8.0/ext/Data/Dumper/Dumper.pm). I wasn't aware of it, but from ...
[ 0.1751643717288971, 0.4109068512916565, 0.47293904423713684, -0.24054740369319916, -0.17667657136917114, -0.08639181405305862, 0.24964427947998047, -0.1730363368988037, -0.28766384720802307, -0.37730032205581665, -0.19438298046588898, 0.5638936758041382, -0.16117219626903534, 0.01882071979...
weird REF-REF-SCALAR object sub new {bless \($_ = \ 'fu\'z'), $_[0]}; package main; $foo = Foo->new; $fuz = Fuz->new; $boo = [ 1, [], "abcd", \*foo, {1 => 'a', 023 => 'b', 0x45 => 'c'}, \\"p\q\'r", $foo, $fuz]; ######## # simple usage ######## $bar = eval(Dumper($boo)); print($@) if $@; print Dump...
[ 0.09653475135564804, 0.29508262872695923, 0.8159635066986084, -0.059612926095724106, -0.06278183311223984, 0.06572911888360977, 0.5250793695449829, 0.045950550585985184, -0.009881420992314816, -0.1747005432844162, -0.3268028795719147, 0.5013427734375, -0.6041955351829529, 0.407917827367782...
= 1; # mild pretty print print Dumper($boo); $Data::Dumper::Indent = 3; # pretty print with array indices print Dumper($boo); $Data::Dumper::Useqq = 1; # print strings in double quotes print Dumper($boo); ```
[ 0.09962524473667145, 0.18717454373836517, 0.6528339385986328, -0.6849377751350403, -0.28507041931152344, 0.12739646434783936, 0.5974970459938049, -0.225768581032753, 0.1520986109972, -0.14836056530475616, -0.5846319198608398, 0.59569251537323, -0.7286956906318665, 0.011881816200911999, -...
I would like to do remote deployment from my build machine onto a server. The remoting can be done via ssh commands from a script, but I would rather use phing and a deploy.xml file that would do the automation. What alternatives do I have to do ssh (and also scp) tasks from within a phing build file? If you really ne...
[ 0.5343331694602966, 0.12526459991931915, 0.5839378237724304, 0.0476037971675396, 0.20631974935531616, -0.14260709285736084, -0.04736233502626419, -0.371925413608551, -0.3839394152164459, -0.4902850091457367, 0.250209242105484, 0.6291815042495728, -0.4230460524559021, -0.06032071262598038, ...
Do you always use a second-level cache in Hibernate or do you first try it without and only use it when the performance goes down? Make it work first, then make it fast. If you don't need caching, don't implement it.
[ 0.6172088384628296, -0.304593563079834, -0.3110072612762451, 0.168960303068161, 0.01375241857022047, -0.2656639814376831, 0.4049234092235565, -0.08753181248903275, 0.13970839977264404, -0.8655093312263489, 0.0857255756855011, 0.41761675477027893, -0.10412413626909256, -0.5205643773078918, ...
I have a server application that receives information over a network and processes it. The server is multi-threaded and handles multiple sockets at time, and threads are created without my control through BeginInvoke and EndInvoke style methods, which are chained by corresponding callback functions. I'm trying to crea...
[ 0.4688590168952942, 0.20068691670894623, 0.28074994683265686, 0.03987196460366249, -0.006536213681101799, 0.12213670462369919, -0.051145270466804504, -0.2517271637916565, -0.21022212505340576, -0.6359708309173584, 0.017074977979063988, 0.25397953391075134, -0.2806994616985321, 0.4273847043...
Controls property - I.E: ``` (ListBox)c.Controls["listBox1"].Items.Add(); ``` Naturally I don't just call the function, I've tried several ways I've found here and on the web to communicate between threads, including `MethodInvoker`, using a `delegate`, in combination with `Invoke()`, `BeginInvoke()` etc. Nothing se...
[ -0.0048063937574625015, -0.11036108434200287, 0.23460885882377625, 0.10459717363119125, 0.020739981904625893, -0.16775202751159668, -0.026134666055440903, -0.2864704430103302, -0.2852194309234619, -0.5332701802253723, 0.09696400165557861, 0.5500909686088562, -0.5502923130989075, 0.21948635...
listBox.Invoke(...); } ```
[ 0.11526857316493988, -0.07831259816884995, 0.135639488697052, -0.2496759593486786, 0.3010472357273102, -0.3107621967792511, 0.19547486305236816, 0.18068380653858185, -0.23342391848564148, -0.5133038759231567, -0.22404614090919495, 0.6776989102363586, -0.6455264687538147, 0.2740161716938019...
Very often when working on an ASP.NET web site, the options View Code and View Designer will be missing from the content menu in the code window, as well as missing from the View menu. They are only available in the context menu in Solution Explorer. This happens when debugging and when not debugging. Anyone know what...
[ 0.39697009325027466, -0.06436527520418167, 0.1160157322883606, 0.05421341210603714, 0.02131497487425804, -0.22347304224967957, 0.4616110026836395, 0.3060951232910156, -0.49635615944862366, -0.733207106590271, 0.25240835547447205, 0.37215206027030945, -0.24944967031478882, 0.233661010861396...
priority, or even waits for computer idle. I think that's the gist of it. When you encounter this, don't do anything with your computer for a quick couple seconds, then right-click again and the option should be in the menu at that point. It's just that quick pause that makes VS think it can steal some "idle" time or...
[ 0.36521992087364197, -0.32579895853996277, 0.19405975937843323, 0.20006245374679565, 0.19966714084148407, -0.15247191488742828, -0.12269067764282227, 0.45823511481285095, -0.5198558568954468, -0.21166300773620605, 0.3544107973575592, 0.6145845055580139, -0.1039174497127533, 0.0967290401458...
been an issue lately, not sure why.
[ 0.27888762950897217, 0.1752077341079712, 0.37903159856796265, -0.28671878576278687, 0.20250718295574188, 0.024987051263451576, 0.1605910211801529, 0.41376203298568726, -0.41156044602394104, -0.3204957842826843, 0.2829475402832031, 0.26938360929489136, 0.19124238193035126, 0.283306866884231...
I am trying to extract a table of values from an excel (2003) spreadsheet using vb6, the result of which needs to be stored in a (adodb) recordset. The table looks like this: ``` Name Option.1 Option.2 Option.3 Option.4 Option.5 Option.6 ----------------------------------------------------------------...
[ -0.013606893830001354, 0.11530385166406631, 0.41796764731407166, -0.348716139793396, -0.0031271909829229116, 0.10487691313028336, 0.10457770526409149, -0.35010308027267456, 0.14362837374210358, -0.5832772850990295, 0.06914282590150833, 0.38523125648498535, -0.19167712330818176, 0.041377607...
3 4 Name3 2 3 4 Name4 2 3 4 Name5 2
[ -0.08219801634550095, 0.3720288872718811, 0.2831772565841675, -0.5943200588226318, -0.4004764258861542, 0.2884628474712372, 0.4057392477989197, 0.04170127958059311, -0.15916118025779724, -0.2718289792537689, -0.14079391956329346, 0.24428732693195343, -0.018849369138479233, 0.66973519325256...
3 4 Name6 2 3 4 Name7 2 3 4 Name8 2 3
[ -0.059192854911088943, 0.5111768245697021, 0.3248797655105591, -0.5240195989608765, -0.3436681628227234, 0.12251937389373779, 0.49280354380607605, 0.04570237919688225, -0.16020342707633972, -0.4718295633792877, -0.23821261525154114, 0.12959609925746918, -0.31696656346321106, 0.634531736373...
4 Name9 2 3 4 5 6 7 ``` Upon connecting and executing the query "`SELECT * FROM [Sheet1$]`" or even a column-specific, "`SELECT [Option#6] FROM [Sheet1$]`" (see footnote 1) and looping through the results, I am given `Null` values for the row `Name9`, `Option.4` -...
[ 0.021090272814035416, 0.10059211403131485, 0.7255446910858154, -0.24932260811328888, 0.21547827124595642, 0.4025900661945343, 0.08406565338373184, -0.10966729372739792, 0.018705984577536583, -0.28578293323516846, -0.2551860809326172, 0.4283822476863861, -0.3331614136695862, 0.1725962758064...
rather than the correct values 5, 6, and 7. It seems the connection to the spreadsheet is using a "best guess" of deciding what the valid table limits are, and only takes a set number of rows into account. To connect to the spreadsheet, I have tried both connection providers `Microsoft.Jet.OLEDB.4.0` and `MSDASQL` an...
[ -0.15116780996322632, 0.14665861427783966, 0.8000473976135254, 0.165289044380188, 0.29366669058799744, 0.14443868398666382, -0.20286662876605988, -0.1209234818816185, -0.4032582640647888, -0.8571548461914062, 0.11485734581947327, 0.46073517203330994, -0.2991218566894531, 0.1628924012184143...
.Provider = "MSDASQL" .ConnectionString = "Driver={Microsoft Excel Driver (*.xls)};" & _ "DBQ=" & filePath & ";MaxScanRows=0;" .CursorLocation = adUseClient .Open End With Set rsSelects = New ADODB.Recordset Set rsSelects = cn.Execute("SELECT [Option#5] FROM " & "[" & strTbl & "]")...
[ -0.43080899119377136, 0.09130443632602692, 0.7121841907501221, -0.19104574620723724, 0.09276257455348969, 0.21948237717151642, 0.197455033659935, -0.11641524732112885, -0.3753166198730469, -0.8143408298492432, -0.0038028103299438953, 0.24660243093967438, -0.4471112787723541, 0.286285102367...
has produced the same results. Notable project references I have included are: * MS ActiveX Data Objects 2.8 Library * MS ActiveX Data Objects Recordset 2.8 Library * MS Excel 11.0 Object Library * MS Data Binding Collection VB 6.0 (SP4) Any help in this matter would be very appreciated! (1) For some reason, when ...
[ -0.28763437271118164, 0.31795790791511536, 0.4887547492980957, 0.2703058421611786, -0.1558672934770584, -0.08518251776695251, 0.1430964469909668, -0.17815890908241272, -0.3364937901496887, -0.4176581799983978, -0.07411076873540878, 0.2596389949321747, 0.018843717873096466, 0.12183089554309...
to read the post and comments, since there are slight variations to a solution from one person to another. You are correct: it is guessing the data type based on a number of rows. There are local machine registry keys you may be able to alter to influence the data type chosen. For more details, see [this answer](https:...
[ 0.1523529291152954, 0.15368296205997467, 0.3291228413581848, 0.27423515915870667, 0.20695728063583374, -0.024587010964751244, 0.012034810148179531, -0.15523017942905426, -0.41205042600631714, -0.44316500425338745, -0.09505275636911392, 0.37666425108909607, -0.13099583983421326, 0.048877406...
We have a need to take dozens of different protocols from systems such as security systems, fire alarms, camera systems etc.. and integrate them into a single common protocol. I would like this to be a messaging server that many systems could subscribe to and or communicate through. * polling and non-polling "drivers...
[ 0.27189457416534424, 0.04312891140580177, 0.14213095605373383, 0.2698998749256134, -0.1633388251066208, -0.10887402296066284, 0.11747562140226364, -0.21091097593307495, -0.17532971501350403, -0.45174309611320496, 0.13724777102470398, 0.38063547015190125, -0.5878326892852783, -0.02971039339...
the other is is kind of a middleware / messaging server. Any thoughts on the best way to proceed would be appreciated. I know that there will be a considerable amount of programming involved on the driver side, however as tempted as I am, building the whole system from scratch would not be appropriate. If you don't mi...
[ 0.07874909788370132, -0.0942157581448555, -0.00699592987075448, 0.16938233375549316, -0.23296141624450684, 0.07470487058162689, -0.2559553384780884, -0.05426344648003578, -0.21136511862277985, -0.7230101823806763, 0.052936360239982605, 0.6751129627227783, -0.2668060064315796, -0.0656320303...
there'd be no actual coding required for those things. To add new custom protocols the simplest route is to build on top of the [MINA component](http://activemq.apache.org/camel/mina.html) which takes care of all the networking, socket handling, threading and so forth (e.g. NIO versus BIO et al). Then you just extend...
[ 0.3695145845413208, -0.03242770582437515, 0.2660905420780182, -0.23828302323818207, -0.4007018804550171, 0.0867362916469574, 0.2332029938697815, -0.49160823225975037, -0.17454496026039124, -0.616360604763031, 0.12029261142015457, 0.3005092442035675, -0.5096647143363953, 0.08125235885381699...
other protocol using simple URIs to implement any of the [Enterprise Integration Patterns](http://activemq.apache.org/camel/enterprise-integration-patterns.html) such as [Content Based Router](http://activemq.apache.org/camel/content-based-router.html), [Recipient List](http://activemq.apache.org/camel/recipient-list.h...
[ -0.18374115228652954, 0.0001246160827577114, 0.5181628465652466, -0.2096068114042282, -0.29299643635749817, 0.04223047196865082, 0.08953596651554108, -0.1017019972205162, -0.3486892580986023, -0.6609667539596558, -0.3989314138889313, 0.07659681141376495, -0.6093930602073669, 0.287035226821...
Is there a way of programmatically determining a rough geographical position of a mobile phone using J2ME application, for example determining the current cell? This question especially applies to non-GPS enabled devices. I am not looking for a set of geographical coordinates, but an ability for a user to define loca...
[ 0.35609859228134155, 0.006414463743567467, 0.32493069767951965, 0.2649834454059601, 0.3871248960494995, -0.028598295524716377, -0.029219023883342743, -0.13192465901374817, -0.21184715628623962, -0.47582578659057617, 0.049978964030742645, 0.42864054441452026, 0.21998192369937897, -0.2269425...
few years back.
[ -0.05115511268377304, 0.10660599917173386, -0.045204587280750275, -0.04278602451086044, 0.23459479212760925, -0.20641934871673584, -0.049925681203603745, 0.5648244619369507, 0.10286659747362137, -0.1319795548915863, 0.5327047109603882, 0.07590516656637192, 0.20251935720443726, 0.2610921263...
in my application (c# 3.5) there are various processes accessing a single xml file (read and write) very frequently. the code accessing the file is placed in an assembly referenced by quite a couple of other applications. for example a windows service might instanciate the MyFileReaderWriter class (locatied in the prev...
[ 0.38771355152130127, 0.33584731817245483, 0.6347101926803589, 0.015802372246980667, 0.22061915695667267, -0.2551712393760681, -0.0418742373585701, 0.06853941082954407, -0.06923253834247589, -0.7148517370223999, -0.21620994806289673, 0.3712478578090668, -0.07879114896059036, 0.0156334228813...
that I currently use the XDocument (LInq2Xml infrastructure) for reading/writing the content to the file. To start with, make sure that all access to the XML Document is done through a single instance. Then put a lock mechanism (that wait for unlock) at the beginning of the function that access it and unlock it at the...
[ 0.31898754835128784, 0.3833169937133789, 0.7056716084480286, 0.18341407179832458, 0.22239728271961212, -0.5454853177070618, -0.1692754030227661, -0.20657315850257874, 0.0619925782084465, -0.5099548101425171, -0.22624468803405762, 0.397284597158432, -0.022333374246954918, 0.2676422595977783...
Since I've started my first job as a professional software developer about two years ago, I've read many articles about commonly accepted methodologies (e.g. Scrum, XP), technologies (e.g. EJB, Spring), techniques (e.g. TDD, code reviews), tools (bug tracking, wikis) and so on in software companies. For many of these...
[ 0.8548982739448547, 0.3732196092605591, -0.18918484449386597, 0.1811452955007553, 0.05673368275165558, -0.3106984794139862, 0.2337854653596878, 0.49019283056259155, -0.2376345843076706, -0.5305706262588501, 0.03278253600001335, 0.48751363158226013, 0.1669270545244217, 0.13202133774757385, ...
at your company. Tell about everything regarding software development. Here are some suggestions (in the order as they come from my mind). Tell at least if you do it or not, or give a short comment: * Test-Driven-Development * Domain-Driven-Design * Model-Driven-Design/Architecture * Do you test? * Unit Testing * Int...
[ 0.6130856871604919, 0.2448260486125946, -0.04196562245488167, 0.2469346970319748, 0.026799451559782028, 0.022250983864068985, 0.21386167407035828, 0.21373358368873596, -0.12995831668376923, -0.6061064600944519, -0.3075501620769501, 0.6454415321350098, 0.16509459912776947, -0.20693604648113...
know what you really do, not what you would like to do or think you should do. * **Test-Driven-Development** - No way. * **Domain-Driven-Design** - What's *design*? * **Model-Driven-Design/Architecture** - What's *design*? We do have an architecture team. With one exception (the most junior architect), they couldn't co...
[ 0.9437361359596252, 0.22041217982769012, 0.5354477167129517, 0.13714730739593506, 0.23625914752483368, -0.2573225200176239, 0.24407869577407837, 0.2803534269332886, -0.25951841473579407, -0.3677825629711151, 0.26877808570861816, 0.6512826085090637, 0.43095749616622925, -0.17117713391780853...
a dedicated test team. There's about 1 tester for every 10-12 devs. They're completely swamped. Ask me if we test *well*. * **Unit Testing** - Completely informal/up to the developer. I do when the schedule I'm given allows for it. * **Integration Testing** - Yes. This one's necessary given the suite of products we dev...
[ 0.7277434468269348, 0.11396592855453491, 0.046487417072057724, 0.25403621792793274, -0.02119367942214012, -0.057392850518226624, 0.23019111156463623, -0.1979161500930786, 0.17350338399410248, -0.5630829930305481, -0.30154815316200256, 0.8480703234672546, 0.3655564785003662, -0.516796410083...
had good luck getting to newer versions of .Net, though, if typically 2 years or so behind the curve. * **Agile** - No. Management claims to want "agile," though they don't exhibit the barest understanding of what it is. We just recently modified our process so that higher priority tasks are spec'd and implemented with...
[ 0.646224319934845, -0.14171740412712097, -0.18530192971229553, 0.1299246847629547, -0.11600607633590698, 0.0006894386606290936, 0.21247543394565582, 0.2028081715106964, -0.5233638882637024, -0.8655498623847961, -0.02886171266436577, 0.5564541220664978, -0.17121084034442902, -0.143028602004...
waste time on nonsense like *designs* and *code reviews*. Dogs, cats, living together! * **UML** - No. We got a UML tool once to help us understand a legacy codebase that had evolved. The person in charge of evaluating the tool loved it, it reverse engineered the entire million+ line C++ codebase in less than 30 second...
[ 0.45421358942985535, 0.20209430158138275, -0.1095212996006012, 0.42945465445518494, 0.12958166003227234, -0.13715964555740356, 0.6482321619987488, 0.3600831627845764, -0.33123424649238586, -0.36444827914237976, 0.03300917148590088, 0.20138312876224518, -0.08707620948553085, 0.0802579522132...
that it failed. ([I'm lookin' at you, kid!](http://www.magicdraw.com/)) It only took us a year and a half to get around to dropping our licenses for that. See? Agile! * **Domain-specific languages** - They're probably used somewhere, though not by myself. * **Requirement Specification (How?)** - A product manager perfo...
[ 0.8838198781013489, 0.2042911946773529, 0.3365260362625122, 0.18906459212303162, 0.22468876838684082, -0.1625485122203827, 0.6441864371299744, -0.062366463243961334, -0.2007768750190735, -0.3469808101654053, 0.14179690182209015, 0.9553436040878296, 0.19507713615894318, -0.18314218521118164...
at once. * **Code-Coverage Tools** - Someone once put a blankey on the source repository server in the cold, cold server room. Does that count? * **Aenemic Domain Model** - In all seriousness, I've never even heard of this before. * **Communication (Wiki, Mail, IM, Mailinglists, other documents)** - Memos. Lotus Notes ...
[ 0.4821872413158417, -0.02777094952762127, 0.1627931445837021, 0.3108920454978943, -0.11368289589881897, -0.0029689050279557705, 0.3234248459339142, -0.006504078395664692, -0.17812500894069672, -0.6345369815826416, 0.2075342983007431, 0.19227945804595947, 0.4202815294265747, -0.032798055559...
"ship dates." * **Team size** - Runs the gamut, based on product. We have teams as small as four and as big as fifteen if you include managers. * **Meetings** - Not bad if you're relatively junior and aren't working on more than one or two products. I'm only required to attend 2-3 1-hour meetings per week. * **Code met...
[ 0.5849102735519409, -0.19462090730667114, 0.3466271460056305, 0.1077956035733223, 0.08987317979335785, 0.1074608862400055, -0.3425556719303131, 0.16269075870513916, -0.5777055621147156, -0.5694882273674011, -0.14773878455162048, 0.6034855842590332, 0.581142246723175, -0.3921569287776947, ...
to make sure we don't lose whatever this year's certification is. * **Bug tracking** - Yes, but only for customer-reported problems. Developers are not allowed to submit discovered bugs against a product they're working on b/c that's not being a "team player." (My boss' boss explained this to me in great detail when I ...
[ 0.8632102608680725, 0.15884774923324585, 0.32342958450317383, 0.2434675395488739, 0.11365890502929688, -0.2804621458053589, 0.3822791874408722, 0.40968453884124756, -0.44158655405044556, -0.24482081830501556, -0.07836434990167618, 0.5477271676063538, 0.04658200591802597, -0.256065070629119...
high-tech jobs in the area, I'm actually pretty lucky to have a gig at all. Doesn't mean I have to like the way things are, though. It just takes a lot of time and constant pressure to even try to influence an established corporate culture. But if they get sick of my attempts to change the culture and fire me, well, I...
[ 0.9405175447463989, 0.32130321860313416, -0.05023645609617233, -0.047580912709236145, 0.1407182365655899, -0.13572484254837036, 0.44025203585624695, 0.8400214314460754, -0.34754955768585205, -0.4383837878704071, -0.07243981957435608, 0.6673814058303833, 0.2800479531288147, 0.07192096859216...
I currently have an application which needs to have an awareness of which monitor the cursor is located when running in a multi-monitor configuration. [GetCursorPos](http://msdn.microsoft.com/en-us/library/ms648390.aspx) and [MonitorFromPoint](http://msdn.microsoft.com/en-us/library/ms534603.aspx).
[ -0.09570436179637909, 0.03192306309938431, 0.8468883633613586, 0.15542355179786682, 0.08362936973571777, -0.20977522432804108, -0.0547194704413414, 0.05086228623986244, -0.3406805396080017, -0.8596615195274353, -0.14766912162303925, 0.49571940302848816, -0.22328585386276245, 0.281868368387...
I have a string in Bash: ```sh string="My string" ``` How can I test if it contains another string? ```sh if [ $string ?? 'foo' ]; then echo "It's there!" fi ``` Where `??` is my unknown operator. Do I use `echo` and `grep`? ```sh if echo "$string" | grep 'foo'; then echo "It's there!" fi ``` That looks a ...
[ 0.15398812294006348, 0.26163655519485474, 0.2198701798915863, -0.32188528776168823, 0.10634865611791611, -0.10004958510398865, 0.5940283536911011, -0.5812135338783264, -0.19741038978099823, -0.13933761417865753, -0.12980347871780396, 0.2891097962856293, -0.018605824559926987, -0.0524538755...
note that a simple comparison operator is used (i.e. `==`), not the regex operator `=~`.
[ -0.20180968940258026, -0.19785480201244354, -0.08738677948713303, -0.02942519448697567, -0.04085930064320564, 0.11501362919807434, -0.0972800925374031, -0.17538104951381683, 0.26238447427749634, -0.2933807075023651, -0.3901667296886444, 0.6714088320732117, -0.20697376132011414, 0.106566250...
does anybody know how to refresh the Internet Explorer (like by pressingthe F5 key) but using some "backdoor" like PostMessage or SendMessage? The internet Explorer Window is not active so I can't use the keyboard. Thanks (Language doesnt matter) If you can identify what is to be replaced through a regular expression...
[ 0.19624757766723633, 0.028582090511918068, 0.5249528884887695, -0.0012995150173082948, -0.012112382799386978, -0.14411497116088867, 0.482893168926239, 0.15732772648334503, -0.2469923049211502, -0.7010663747787476, 0.1926342248916626, 0.7920290231704712, -0.12981334328651428, -0.24128471314...
this is the easiest way. Another option would be to create a custom ant task to do what you want.
[ 0.4915984272956848, -0.2660553753376007, -0.23903241753578186, 0.36971110105514526, -0.014125595800578594, 0.3228999078273773, 0.0728193074464798, 0.12846282124519348, -0.4181220531463623, -0.8994653820991516, 0.3827081322669983, 0.37478864192962646, -0.3827459216117859, -0.113487504422664...
How many international languages does the iPhone Simulator support? Choose: Settings/General/International/Language Mine only has English listed, but I fear I may have inadvertently stripped out the localisations? [iPhone/Settings/General/International/Language http://i36.tinypic.com/1q50t1.png](http://i36.tinypic.c...
[ 0.11432288587093353, 0.04405108094215393, 0.1461159884929657, 0.009617512114346027, 0.1617983728647232, 0.463691771030426, 0.3980312943458557, 0.32621315121650696, -0.2184535264968872, -0.25273069739341736, -0.17968398332595825, 0.5175018906593323, -0.1835850179195404, -0.5444684624671936,...
Following on from a [previous question](https://stackoverflow.com/questions/221417/how-do-i-programmatically-access-the-target-path-of-a-windows-symbolic-link), I am creating a symbolic link on a Server 2008 from a Vista machine using UNC paths. I can create the link just fine. I can go to the Server 2008 box and doubl...
[ -0.3866506516933441, 0.24595557153224945, 0.33027464151382446, -0.09891114383935928, -0.0224104393273592, -0.11824385076761246, 0.49665120244026184, -0.2294706553220749, -0.20255334675312042, -0.9619311690330505, 0.12943501770496368, 0.30846279859542847, -0.2093469798564911, 0.170910537242...
its "type" in Server 2008 (assuming the error means what it says)? To add to [@David Arno's helpful answer](https://stackoverflow.com/a/230047/45375), based on W7: --- `fsutil.exe` can be made to show what arguments it takes by simply running: ``` fsutil behavior set /? ``` To **report the *current* configuration*...
[ -0.596660852432251, -0.19335006177425385, 0.4492724537849426, -0.11226344108581543, -0.032262880355119705, 0.059105660766363144, 0.22646793723106384, -0.039313118904829025, -0.20381192862987518, -0.45801642537117004, -0.22379693388938904, 0.26689499616622925, -0.4243922233581543, 0.0600304...
stands for "Local", and `R` for "Remote" * The FIRST `L` or `R` - *before* the `2` - refers to the location of the link itself (as opposed to its target) *relative to the machine ACCESSING the link*. * The SECOND `L` or `R` - *after* the `2` - refers to the location of the link's *target relative to the machine where t...
[ -0.1746414601802826, -0.36176446080207825, 0.4315508008003235, -0.036470625549554825, 0.13014507293701172, -0.08518540114164352, 0.3587382137775421, -0.07024997472763062, -0.13742080330848694, -0.6823871731758118, -0.40457403659820557, 0.5370222926139832, -0.2825920581817627, 0.24332648515...
I, on W7, was able to resolve a remote link that pointed to a resource on another remote machine by enabling R2R alone (and not also having to enable R2L).
[ -0.5367381572723389, -0.08414286375045776, 0.28124290704727173, 0.014101117849349976, -0.19750259816646576, 0.08886279165744781, 0.260608971118927, -0.40417879819869995, -0.04246518015861511, -0.4157959222793579, -0.1783784031867981, 0.43008625507354736, -0.13789182901382446, -0.1967918872...
As a developer who spent many years working within Visual C++ 6, I'm used to working with the String Table resource to store unicode strings for localization. Is there a resource within Visual Studio 2005 that provides the same? Are there any third party libraries or tools? [ResourceManager](https://learn.microsoft.com...
[ -0.134018212556839, -0.01594865880906582, -0.022131284698843956, -0.22850044071674347, -0.3189204931259155, 0.07565977424383163, -0.13659967482089996, 0.13130082190036774, -0.3771209716796875, -0.6034408807754517, -0.10467274487018585, 0.7187460064888, -0.028841791674494743, -0.12852680683...
What is the best way to save enums into a database? I know Java provides `name()` and `valueOf()` methods to convert enum values into a String and back. But are there any other (flexible) options to store these values? Is there a smart way to make enums into unique numbers (`ordinal()` is not safe to use)? #### Upda...
[ 0.31369122862815857, -0.04453562572598457, -0.005349356681108475, 0.20410490036010742, 0.05865294486284256, -0.011882409453392029, 0.1812037080526352, -0.029244152829051018, -0.2921782433986664, -0.6429263353347778, 0.21417437493801117, 0.1916830688714981, -0.1064969152212143, 0.0964142680...
at the moment, Java does not support any solutions for this (a Java enum cannot extend other classes). We *never* store enumerations as numerical ordinal values anymore; it makes debugging and support way too difficult. We store the actual enumeration value converted to string: ``` public enum Suit { Spade, Heart, Dia...
[ 0.34993407130241394, 0.06005578115582466, 0.38994377851486206, -0.2411031424999237, 0.5517671704292297, 0.1635616421699524, -0.08068178594112396, -0.5016800165176392, -0.0060216402634978294, -0.38737040758132935, 0.0040854341350495815, 0.637238085269928, -0.3368365466594696, -0.14618131518...
Suit ------------ ---- Kylie Guénin 2 Ian Boyd 1 ``` verses ``` Name Suit ------------ ------- Kylie Guénin Diamond Ian Boyd Heart ``` the latter is much easier. The former required getting at the source code and finding the numerical values that were assigned to the enumeration members. Ye...
[ 0.4614138901233673, 0.2601660490036011, 0.17072924971580505, 0.20167554914951324, 0.3247154951095581, 0.15924988687038422, 0.17089317739009857, -0.8356434106826782, -0.23061995208263397, -0.15273933112621307, 0.11537341773509979, 0.6226291656494141, -0.1551768183708191, -0.3015763759613037...
tied to them. You cannot nicely insert or rearrange the members without having to force the old numerical values. For example, changing the Suit enumeration to: ``` public enum Suit { Unknown, Heart, Club, Diamond, Spade } ``` would have to become : ``` public enum Suit { Unknown = 4, Heart = 1, ...
[ 0.18023601174354553, 0.11367712169885635, 0.2739157974720001, -0.1571459323167801, 0.43116647005081177, 0.09724538028240204, -0.2255409061908722, -0.7924066781997681, -0.3716273307800293, -0.3897540867328644, -0.003898077178746462, 0.2002635896205902, -0.3911145329475403, 0.347317487001419...
database -------------------------------- The question comes up: lets say i wanted to order the values. Some people may want to sort them by the `enum`'s ordinal value. Of course, ordering the cards by the numerical value of the enumeration is meaningless: ``` SELECT Suit FROM Cards ORDER BY SuitID; --where SuitID is...
[ 0.021271105855703354, 0.17747928202152252, 0.19463512301445007, 0.09379970282316208, 0.19912908971309662, -0.12992680072784424, -0.29888254404067993, -0.4461614191532135, -0.30298107862472534, -0.14229296147823334, 0.4214465320110321, 0.5405378937721252, -0.32991713285446167, 0.33566349744...
WHEN 0 THEN 4 --Spade ELSE 999 END ``` The same work that is required if you save integer values is required if you save strings: ``` SELECT Suit FROM Cards ORDER BY Suit; --where Suit is an enum name Suit ------- Club Diamond Heart Spade Unknown ``` But that's not the order we want - we want them in enumerat...
[ 0.11465775221586227, 0.18744418025016785, 0.16622988879680634, -0.37031781673431396, 0.1450573354959488, 0.03524775803089142, -0.16575384140014648, -0.8364876508712769, -0.2773124873638153, -0.14171624183654785, -0.21274994313716888, 0.5666329264640808, -0.23811617493629456, 0.027525188401...
THEN 4 ELSE 999 END ``` My opinion is that this kind of ranking belongs in the user interface. If you are sorting items based on their enumeration value: you're doing something wrong. But if you wanted to really do that, i would create a `Suits` [dimension table](https://en.wikipedia.org/wiki/Dimension_(data_war...
[ -0.1890932321548462, 0.017584562301635742, 0.7171233296394348, -0.10140922665596008, 0.07956098765134811, 0.0002539837150834501, -0.09079480916261673, -0.7001081705093384, -0.3873395323753357, -0.4443926215171814, -0.2013053148984909, 0.34493178129196167, -0.24626697599887848, 0.1085314899...
| 4 | Black | This way, when you want to change your cards to use [***Kissing Kings* New Deck Order**](https://www.quora.com/When-you-buy-a-deck-of-cards-does-it-come-mixed-or-in-order) you can change it for display purposes without throwing away all your data: | Suit | SuitID | Rank | Color | CardOrder | | --- | ---...
[ 0.14530520141124725, 0.09582436084747314, 0.4681117534637451, -0.15190279483795166, 0.22930654883384705, -0.052355892956256866, 0.03418032452464104, -0.6835348606109619, -0.6321170926094055, -0.17694909870624542, -0.08728484064340591, 0.12645824253559113, -0.5970023274421692, 0.13465581834...
| -1 | Now we are separating an internal programming detail (enumeration name, enumeration value) with a display setting meant for users: ``` SELECT Cards.Suit FROM Cards INNER JOIN Suits ON Cards.Suit = Suits.Suit ORDER BY Suits.Rank, Card.Rank*Suits.CardOrder ```
[ -0.12578848004341125, 0.20796500146389008, 0.5070682764053345, -0.24304325878620148, 0.3096923530101776, 0.01184201892465353, -0.37702229619026184, -0.8401294946670532, -0.22547009587287903, -0.5999583601951599, -0.192312091588974, 0.05098479613661766, -0.282012403011322, 0.011718855239450...
Anyone point my at a utility for syncing sql server logins after restoring a database to a different server? I know I can do it with scripts, but I've been using a wonderful little utility - 'Db Maint Sync SQL Logins' (<http://www.dbmaint.com/SyncSqlLogins.asp>) to do it on sql server 2000 which unfortunately doesn't...
[ 0.2280452698469162, 0.17592905461788177, 0.3579917252063751, -0.06002772971987724, -0.32301661372184753, -0.2288452833890915, 0.3386704921722412, 0.055393464863300323, -0.354474276304245, -0.4982979893684387, 0.5212312340736389, 0.4525764286518097, -0.3359139561653137, 0.14635072648525238,...
I have heard mixed opinions over the amount of memory that a byte takes up in a java program. I am aware you can store no more than +127 in a java byte, and the [documentation](http://java.sun.com/docs/books/tutorial/java/nutsandbolts/datatypes.html) says that a byte is only 8 bits but [here](http://www.jguru.com/faq/...
[ 0.15019963681697845, 0.16358166933059692, -0.06380589306354523, -0.08897319436073303, -0.14369580149650574, 0.1560681164264679, 0.25774919986724854, -0.2752588093280792, -0.4636036455631256, -0.345981240272522, 0.08947712928056717, 0.18949401378631592, 0.03023851476609707, -0.0131650231778...
:) Here's a quick benchmark. It's got the normal caveats when it comes to this kind of thing - testing memory has oddities due to JITting etc, but with suitably large numbers it's useful anyway. It has two types, each with 80 members - LotsOfBytes has 80 bytes, LotsOfInts has 80 ints. We build lots of them, make sure ...
[ 0.08034441620111465, 0.19682446122169495, 0.1785198301076889, 0.3350540101528168, 0.14293541014194489, 0.6170306205749512, 0.04926029220223427, -0.020726017653942108, -0.5611348748207092, -0.4324728846549988, -0.026395367458462715, 0.12221529334783554, -0.112279511988163, -0.00632699346169...
ba, bb, bc, bd, be, bf; byte c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, ce, cf; byte d0, d1, d2, d3, d4, d5, d6, d7, d8, d9, da, db, dc, dd, de, df; byte e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, ea, eb, ec, ed, ee, ef; } class LotsOfInts { int a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab,...
[ -0.26821136474609375, 0.057579006999731064, 0.21568484604358673, 0.1480128914117813, 0.12382988631725311, 0.9698606729507446, 0.3316793739795685, -0.010615093633532524, -0.2799358665943146, -0.38870465755462646, -0.1360192447900772, 0.12518906593322754, -0.2829876244068146, -0.089386403560...
b9, ba, bb, bc, bd, be, bf; int c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, ce, cf; int d0, d1, d2, d3, d4, d5, d6, d7, d8, d9, da, db, dc, dd, de, df; int e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, ea, eb, ec, ed, ee, ef; } public class Test { private static final int SIZE = 1000000; pub...
[ 0.08233214169740677, 0.11855491250753403, -0.19768457114696503, -0.020773870870471, 0.16954876482486725, 0.4932876527309418, 0.4537370800971985, -0.15978656709194183, -0.008243086747825146, -0.2844735383987427, -0.5296748876571655, 0.21037234365940094, -0.34225431084632874, 0.1896840184926...
LotsOfBytes[] first = new LotsOfBytes[SIZE]; LotsOfInts[] second = new LotsOfInts[SIZE]; System.gc(); long startMem = getMemory(); for (int i=0; i < SIZE; i++) { first[i] = new LotsOfBytes(); } System.gc();
[ -0.3346789479255676, -0.3664844036102295, 0.7269126176834106, -0.21787850558757782, 0.25305822491645813, 0.18996377289295197, -0.05123469606041908, -0.25876638293266296, -0.34012657403945923, -0.766697883605957, -0.5589149594306946, 0.2581421434879303, -0.2457108348608017, 0.34636318683624...
long endMem = getMemory(); System.out.println ("Size for LotsOfBytes: " + (endMem-startMem)); System.out.println ("Average size: " + ((endMem-startMem) / ((double)SIZE))); System.gc(); startMem = getMemory(); for (int i=0; i < SIZE; i++) { second[i] = new Lo...
[ -0.216712087392807, -0.4954277276992798, 0.6536140441894531, -0.41151922941207886, 0.2585504651069641, 0.2125481218099594, 0.2443842589855194, -0.4016888439655304, -0.207121804356575, -0.7180477380752563, -0.4690699577331543, 0.39317643642425537, -0.1660185307264328, 0.2842140793800354, ...
System.gc(); endMem = getMemory(); System.out.println ("Size for LotsOfInts: " + (endMem-startMem)); System.out.println ("Average size: " + ((endMem-startMem) / ((double)SIZE))); // Make sure nothing gets collected long total = 0; for (int i=0; i < SIZE; i++) {
[ -0.047647275030612946, -0.4569382965564728, 0.5823689699172974, -0.07191047817468643, 0.1813996434211731, 0.00405787443742156, 0.21223105490207672, -0.3276389539241791, -0.5779549479484558, -0.45799922943115234, -0.3459298610687256, 0.4242071509361267, -0.2787294089794159, -0.0368067063391...
total += first[i].a0 + second[i].a0; } System.out.println(total); } private static long getMemory() { Runtime runtime = Runtime.getRuntime(); return runtime.totalMemory() - runtime.freeMemory(); } } ``` Output on my box: ``` Size for LotsOfBytes: 88811688 Average size...
[ -0.22533591091632843, -0.20876485109329224, 0.5763285160064697, -0.10324816405773163, -0.14542630314826965, 0.3473057746887207, 0.3057103753089905, -0.3218148946762085, -0.5313676595687866, -0.32746124267578125, -0.08644116669893265, 0.5531410574913025, -0.21152380108833313, 0.142800122499...
said, there are oddities here) - but the point is that the byte fields appear to be packed in for LotsOfBytes such that it takes (after overhead removal) only a quarter as much memory as LotsOfInts.
[ -0.3164757490158081, 0.02664043940603733, 0.20451387763023376, 0.35766610503196716, -0.015875060111284256, 0.11861662566661835, -0.04679391533136368, 0.0068886904045939445, -0.2860923409461975, -0.3843364417552948, 0.02868144027888775, 0.19916489720344543, 0.11464616656303406, -0.009230928...
What translation occurs when writing to a file that was opened in text mode that does not occur in binary mode? Specifically in MS Visual C. ``` unsigned char buffer[256]; for (int i = 0; i < 256; i++) buffer[i]=i; int size = 1; int count = 256; ``` Binary mode: ``` FILE *fp_binary = fopen(filename, "wb"); fwrite(...
[ -0.129145085811615, -0.11177234351634979, 0.5350753664970398, -0.4047844111919403, -0.023457158356904984, -0.016361115500330925, 0.601112961769104, 0.06278408318758011, -0.005774715915322304, -0.8137820959091187, -0.44268250465393066, 0.9471293687820435, -0.5045676827430725, -0.05679803714...
you will see that specifying the "t" option will have the following effect: * line feeds ('\n') will be translated to '\r\n" sequences on output * carriage return/line feed sequences will be translated to line feeds on input. * If the file is opened in append mode, the end of the file will be examined for a ctrl-z cha...
[ 0.2001686990261078, -0.21433137357234955, 0.6191481947898865, -0.016031263396143913, 0.17286422848701477, 0.08696786314249039, 0.3757523000240326, 0.10346481204032898, -0.13975836336612701, -0.49992725253105164, -0.3249993622303009, 0.478947252035141, -0.4654025435447693, 0.484030008316040...
children up to the 3rd or 4th generation). Contrary to previously stated opinion, the ctrl-z character will not be appended.
[ -0.13244497776031494, -0.1490444540977478, 0.6963903307914734, 0.2669140696525574, 0.26133066415786743, -0.22929054498672485, 0.32909104228019714, 0.36020249128341675, -0.23984411358833313, -0.3047092854976654, -0.5643655061721802, 0.13614912331104279, 0.0703962966799736, 0.34818235039711,...
Using the following code I get a nice formatted string: ``` Request.QueryString.ToString ``` Gives me something like: &hello=world&microsoft=sucks But when I use this code to clone the collection to another object (of the same type) I get the Type() back from the ToString() method instead. ``` System.Collections....
[ 0.2587137520313263, -0.3091285824775696, 0.6238083243370056, 0.012037861160933971, -0.21309950947761536, -0.14467257261276245, 0.3607769310474396, -0.2539934515953064, -0.08268709480762482, -0.805526077747345, 0.14481018483638763, 0.5971925258636475, -0.3908306360244751, 0.3599711954593658...
On our Scrum board, tasks start at 'To Do', go to 'In Progress', and when you're done with a task, they move to 'To Verify' before ending up in 'Done'. The 'To Verify' column is when you're done with a task and someone else can have a look at it, test it, and comment on it. This has proven helpful for errors, better c...
[ 0.3681298792362213, -0.10861340165138245, 0.2686064541339874, 0.05323980376124382, -0.0025897123850882053, -0.18426069617271423, -0.10915226489305496, 0.018717793747782707, -0.20999588072299957, -0.38225898146629333, -0.03601982444524765, 0.31091824173927307, 0.19529172778129578, -0.123564...
clear, and would like to hear your thoughts. This question is not specific to Scrum, I've seen this problem outside agile processes too. The answer turns out to be: it depends on the issues raised in verification. If there are minor issues raised, and the responsible developer is senior enough, then trust him to fix t...
[ 0.35647693276405334, 0.07087960094213486, -0.033187054097652435, 0.007544259540736675, 0.0962463989853859, -0.09825791418552399, 0.008309329859912395, -0.16549399495124817, -0.24935393035411835, -0.2394719272851944, -0.23951809108257294, 0.6217248439788818, 0.004690946079790592, -0.2322895...
of the kind of error you don't bother checking is a simple typo. A good example of something you would check again is an error in a boundary condition, when there are many interdependent boundary conditions.
[ 0.15346547961235046, 0.22342835366725922, -0.25075772404670715, 0.48224756121635437, 0.0927390456199646, -0.2616732120513916, 0.26414954662323, 0.07796286791563034, -0.1950904279947281, -0.8369351029396057, -0.02330566942691803, 0.1398487687110901, -0.38546237349510193, 0.05563310161232948...
Does anyone have links to tutorials regarding the new IModelBinder in asp.net mvc beta? I can't get my head around it properly, so much has changed. Thanks Take a look at the source of DefaultModelBinder. That'll give you some clues.
[ 0.3710471987724304, -0.10508178174495697, 0.03677200525999069, 0.13528907299041748, -0.21606558561325073, -0.36291220784187317, 0.4586339294910431, 0.5880144238471985, -0.3009589910507202, -0.6949183940887451, 0.01143623422831297, 0.42222610116004944, -0.1432255506515503, 0.270575612783432...
I am trying to manipulate a string using Jython, I have included below an example string: This would be a title for a website :: SiteName This would be a title for a website :: SiteName :: SiteName How to remove all instances of ":: Sitename" or ":: SiteName :: SiteName"? No different from regular Python: ``` >>>...
[ 0.06845907866954803, 0.2737763226032257, 0.3444991707801819, -0.24476701021194458, -0.06687436997890472, -0.10659027099609375, 0.4960838556289673, -0.16519039869308472, -0.08468044549226761, -0.462565153837204, -0.28231289982795715, 0.4295165538787842, -0.5060821175575256, -0.0168118346482...
I have a Timestamp value that comes from my application. The user can be in any given local TimeZone. Since this date is used for a WebService that assumes the time given is always in GMT, I have a need to convert the user's parameter from say (EST) to (GMT). Here's the kicker: The user is oblivious to his TZ. He ente...
[ 0.45126765966415405, 0.1887972503900528, 0.6398715376853943, 0.005351881962269545, 0.21091507375240326, 0.05000770464539528, 0.1541261076927185, 0.2454591989517212, -0.22788871824741364, -0.9079877734184265, 0.1120556890964508, 0.19821877777576447, 0.10466654598712921, 0.5538688898086548, ...
supposed to be in GMT by default, but when sending the parameter, even though I created my Calendar from the TS (which is supposed to be in GMT), the hours are always off unless the user is in GMT. What am I missing? ``` Timestamp issuedDate = (Timestamp) getACPValue(inputs_, "issuedDate"); Calendar issueDate = conver...
[ 0.31524449586868286, 0.20631352066993713, 0.9696454405784607, -0.06348928064107895, -0.20320290327072144, -0.1184827983379364, 0.2255975604057312, 0.07260392606258392, -0.23676206171512604, -0.551889181137085, -0.0343269445002079, 0.5255654454231262, -0.011131568811833858, 0.19425417482852...
investigation I got to the right answer. As mentioned by Skip Head, the TimeStamped I was getting from my application was being adjusted to the user's TimeZone. So if the User entered 6:12 PM (EST) I would get 2:12 PM (GMT). What I needed was a way to undo the conversion so that the time entered by the user is the time...
[ 0.20150746405124664, -0.04810862988233566, 0.8288438320159912, 0.06780386716127396, 0.22801490128040314, -0.007320576347410679, 0.36044782400131226, -0.11430153250694275, -0.4291592836380005, -0.6994090676307678, -0.022445496171712875, 0.37711673974990845, -0.02710789628326893, 0.196111768...