text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
-53, 20, 0, 30, 103, -101, 110, -66, 97, -122, 25, 52, 44, 33, -125, -74, 11, -92, -98, 115, -35, 90, -55, 1, 52, 33, 83, 76, 33, -118, 10, 97, 73, -70, 81, 7, 29, 44, -35, 1, -46, 29, 76, -22, 2, 7, 30, -84, 50, -60, 7, 48, 60, 114, -11, 112,
[ -0.240169957280159, 0.38630378246307373, 0.3810723125934601, 0.19216622412204742, 0.22504061460494995, 1.157353401184082, 0.364012748003006, -0.05927421152591705, -0.4342854619026184, -0.13858479261398315, -0.05362902581691742, 0.31895822286605835, -0.121690534055233, 0.3926289975643158, ...
0, -124, -95, 67, 21, -110, 96, -66, -61, 14, 12, -84, 36, -27, 8, -99, -101, 80, -128, 5, 72, -36, -104, -55, 23, -92, 83, -95, -116, 19, 14, -92, 46, 62, -21, 8, 21, 1, 68, 9, -93, -124, -78, 3, 51, 59, -68, -84, 82, -30, 72, 84, 64, 1, 18, 121,
[ -0.40867528319358826, 0.4040296673774719, 0.4856336712837219, 0.18318623304367065, 0.2686595022678375, 0.8964941501617432, 0.2600557208061218, -0.18029148876667023, -0.09378668665885925, -0.17154909670352936, -0.15866655111312866, 0.3272479176521301, -0.29389065504074097, 0.376778662204742...
85, 0, -123, 32, -126, -80, -112, 6, -56, 11, -32, 32, -2, -28, 10, -71, -64, 5, -80, 48, 7, 74, 56, -63, 16, 58, -40, 65, 45, -28, -16, 5, -108, 56, 16, 37, -112, -80, 17, 5, 70, -16, 6, 87, 124, -127, 5, -98, 0, -126, 3, 30, -128, -125, 14, -30,
[ -0.2926507592201233, 0.47965702414512634, 0.39763590693473816, 0.20318977534770966, 0.3928526043891907, 1.1052131652832031, 0.23456574976444244, -0.18073303997516632, -0.3230190575122833, -0.1813763529062271, -0.027303872630000114, 0.4031173586845398, -0.14431799948215485, 0.46653792262077...
64, 1, 2, 12, -95, 8, 67, 8, 0, -118, 108, -126, 8, 31, -16, 1, 40, 100, -96, -120, 20, 76, 33, 18, 121, -104, 64, 88, 102, 24, 2, -78, 48, 66, 5, -101, -96, 26, 12, 118, -72, 67, 100, 12, 103, 34, 4, 89, 65, 18, -1, 72, -127, -125, 2, 30, 80,
[ -0.2647072374820709, 0.4801090955734253, 0.32515740394592285, 0.0901581272482872, 0.3402538299560547, 1.1747781038284302, 0.3608751893043518, -0.09359096735715866, -0.456809401512146, -0.2813485562801361, -0.15523578226566315, 0.3395107686519623, -0.2178654670715332, 0.3912217319011688, ...
7, -107, -24, -37, 22, 26, -15, -66, 2, 20, -96, 17, 12, 64, 65, 52, -30, -74, -128, 7, 88, -47, -118, -28, 99, -120, 2, 122, -112, -124, 36, -100, 34, 1, 14, -48, -126, 26, 74, -128, -121, 80, 68, 33, 10, -127, -80, -127, 6, 98, -122, 1, 42, 120, 34,
[ -0.18032902479171753, 0.3815590739250183, 0.4272701144218445, 0.2029915601015091, 0.4007849097251892, 1.1861127614974976, 0.3453913629055023, -0.019529331475496292, -0.4432869255542755, -0.19343353807926178, -0.08957773447036743, 0.40566691756248474, -0.13817256689071655, 0.364240974187850...
11, 27, -72, -94, 21, 1, 56, 19, 50, 116, -47, -117, -89, 32, -59, 3, 28, 112, 5, 39, -108, 0, -119, 81, 16, -123, 17, 108, 96, 6, 42, -8, 65, 91, 15, 72, -128, 28, -77, -120, 16, -116, -64, -30, 25, 113, -120, 100, 36, -101, -15, 8, 24, -84, 80, 6,
[ -0.25328198075294495, 0.40958377718925476, 0.3520764112472534, 0.159022718667984, 0.3624739944934845, 1.153795838356018, 0.27707770466804504, -0.097972072660923, -0.3872721791267395, -0.2376847267150879, 0.008485660888254642, 0.3623858690261841, -0.15854915976524353, 0.3522101938724518, ...
46, -116, 93, 36, -124, -9, 1, 34, 120, -46, -109, 71, -8, 33, 73, 16, 66, -122, 21, -12, -32, -108, 61, 40, 5, 47, 18, 48, -121, 62, -2, 113, 18, 58, 112, -62, 6, 18, 64, -53, 90, 50, 82, 49, 10, 40, -62, 41, 11, -63, 75, 94, -68, 32, 117, 106,
[ -0.09425882250070572, 0.3459852635860443, 0.37957143783569336, 0.23347985744476318, 0.3828086853027344, 1.2415351867675781, 0.2927922010421753, -0.07142891734838486, -0.5015415549278259, -0.21882815659046173, -0.006820605602115393, 0.31228411197662354, -0.21049687266349792, 0.2834798991680...
-16, -93, 30, 18, 89, -53, 4, -60, 64, 52, 10, 81, -128, 47, 86, -64, 76, 102, -106, 34, 23, 47, -48, -126, 22, 28, 80, 76, 90, -34, 82, 32, 6, -56, -90, 54, 69, 25, 0, 38, -64, -126, 11, 71, 8, -89, 56, -107, -96, 8, 31, -104, -45, 7, 68, -32, 2,
[ -0.2396552860736847, 0.45281901955604553, 0.4378085136413574, 0.21210987865924835, 0.21620383858680725, 1.1684354543685913, 0.3505554497241974, -0.08401447534561157, -0.4846135973930359, -0.2201681286096573, 0.03512299433350563, 0.31456050276756287, -0.1916438341140747, 0.33805423974990845...
55, -127, 72, -108, 11, -112, -95, 8, 49, -120, -89, 60, 71, -15, -126, 122, 38, -32, -102, -56, 60, -120, 2, 110, 80, 51, -124, 126, -58, -94, 8, -62, -88, -25, 49, -13, 41, 23, 5, -112, -31, 6, 8, 93, 65, 64, -15, -39, -56, 117, 98, -124, 9, 51, -72,
[ -0.16165846586227417, 0.4109342396259308, 0.37259364128112793, 0.2516847550868988, 0.42318469285964966, 1.209261178970337, 0.2996601462364197, -0.052758023142814636, -0.4684440791606903, -0.23014916479587555, -0.01650136709213257, 0.3328215181827545, -0.1561717987060547, 0.3005766272544861...
-59, 45, 56, -95, 78, -121, 6, -128, -96, 5, -39, 39, 67, 49, -54, -47, -114, 122, -44, 32, 1, 1, 0, 59 }; ``` Taking from [this forum on Sun's support site](http://forums.sun.com/thread.jspa?threadID=747860&messageID=4278559), no method can be more than 64 KB long: When you have code (pseudo) like the fo...
[ 0.16200736165046692, 0.17609097063541412, 0.5312450528144836, 0.0753563940525055, 0.07255113869905472, 0.43519723415374756, 0.14807020127773285, 0.19383013248443604, -0.3621005117893219, -0.45502421259880066, 0.021265704184770584, 0.024044370278716087, -0.3042222559452057, 0.33653852343559...
s[0] = "a"; s[1] = "b"; s[2] = "c"; } public MyClass() { FunnyName$Method(); } ``` And as noted java limits all methods to 64k, even the ones the compiler creates. It may be that Eclipse is doing something sneaky to get around this, but I assure you this is still possible in Eclipse because I hav...
[ 0.11914689838886261, 0.21333914995193481, 0.275665819644928, -0.23348939418792725, -0.22771316766738892, 0.017635686323046684, 0.4432087242603302, -0.1456071436405182, -0.23159094154834747, -0.6734476089477539, -0.18075823783874512, 0.3268410563468933, -0.31898486614227295, -0.030147725716...
compileIcon = readFileToBytes("compileIcon.gif"); } //... (I assume there are several other icons) private static byte[] readFileToBytes(String filename) { try { File file = new File(filename); byte[] bytes = new byte[(int)file.length()]; FileInputStream fin = new FileInputStream(file); ...
[ 0.10751010477542877, -0.4218079149723053, 0.8156615495681763, 0.013931629247963428, 0.1322789341211319, -0.003622878110036254, -0.009991019032895565, -0.4100838899612427, -0.3711228370666504, -0.46212178468704224, -0.12746460735797882, 0.7376517057418823, -0.4345043897628784, 0.01247015316...
In every MVC framework I've tried (Rails, Merb, Waves, Spring, and Struts), the idea of a Request (and Response) is tied to the HTTP notion of a Request. That is, even if there is an AbstractRequest that is a superclass of Request, the AbstractRequest has things like headers, request method (GET, POST, etc.), and all o...
[ -0.0007739216671325266, -0.13692636787891388, 0.3815170228481293, -0.012786239385604858, -0.4071365296840668, 0.19394934177398682, -0.007516069803386927, -0.17848771810531616, -0.26401403546333313, -0.5514923334121704, 0.0347922146320343, 0.5069312453269958, -0.3506743013858795, 0.05992846...
for example, a Twitter poller that runs in a separate thread and translates messages into local HTTP requests, then sends the responses back out. If there *were* a good framework for multiple request media, what would routing look like? In Rails, the HTTP routing looks something like: ``` map.connect 'some/path/with/...
[ 0.3436748683452606, -0.13972207903862, 0.20759662985801697, 0.19291965663433075, -0.35583579540252686, -0.007311938796192408, -0.0836063027381897, -0.21321798861026764, -0.21208757162094116, -0.9131016135215759, 0.302182137966156, 0.21600136160850525, -0.4974915385246277, 0.012412649579346...
of requests (in the general, generic sense) to code via engines. Granted, all the engine classes are currently based on HTTP, but I have toyed with the idea of trying to write an engine class that wasn't based on HTTP (or was perhaps tied to something like Twitter, but was separated from the HTTP interactions that Twit...
[ 0.32876408100128174, 0.013109858147799969, 0.3067193627357483, 0.4660380482673645, -0.2378460317850113, 0.08367831259965897, 0.32256248593330383, -0.12696056067943573, -0.13217686116695404, -0.4559726417064667, 0.1439053863286972, 0.47448235750198364, -0.3627694547176361, 0.213779374957084...
For example I have such query: ``` Query q = sess.createQuery("from Cat cat"); List cats = q.list(); ``` If I try to make something like this it shows the following warning ``` Type safety: The expression of type List needs unchecked conversion to conform to List<Cat> List<Cat> cats = q.list(); ``` Is there a w...
[ 0.3742472529411316, 0.030037961900234222, 0.23985151946544647, -0.3199172616004944, -0.2159232795238495, -0.2874157428741455, 0.556931734085083, -0.49905869364738464, -0.3168339133262634, -0.4862464964389801, -0.1374179720878601, 0.5734115242958069, -0.4352409541606903, 0.28291329741477966...
@SuppressWarnings("unchecked") List list = q.list(); return list; } ``` **Prevent Eclipse from generating warnings for unavoidable problems** In Eclipse, go to Window>Preferences>Java>Compiler>Errors/Warnings and under Generic type, select the checkbox `Ignore unavoidable generic type problems due to raw A...
[ 0.5449885129928589, -0.045388735830783844, 0.20148912072181702, -0.16723862290382385, -0.5829413533210754, -0.39412856101989746, 0.7206515073776245, -0.356984943151474, 0.05242205783724785, -0.5750325322151184, -0.03762838989496231, 0.8765532374382019, -0.3437129259109497, -0.0965179577469...
`.iterate()` etc.
[ -0.11292068660259247, 0.10612061619758606, -0.09788085520267487, -0.32056382298469543, -0.013726139441132545, -0.4102862477302551, 0.0029111674521118402, -0.16722166538238525, 0.4152897000312805, -0.4624946117401123, -0.46864113211631775, 0.6638990640640259, -0.44672250747680664, 0.1063369...
I am wondering any efficient way to hide our Silverlight code. I know there are some obfuscators available but it looks like people can hack that too. Anybody have any success on this front? Pragma No-Cache on the page hosting the silverlight application will prevent the the browser from caching the xap, instead it wil...
[ 0.9101805090904236, 0.17991609871387482, 0.18046407401561737, 0.22257818281650543, -0.3586496114730835, -0.3818361461162567, 0.5806655883789062, 0.21437494456768036, -0.19631533324718475, -0.3772478699684143, 0.11248430609703064, 0.4744115471839905, -0.33399641513824463, 0.0204329993575811...
is encoded on the way down.
[ -0.2222973108291626, 0.04774687439203262, 0.35238003730773926, 0.0819978415966034, 0.4558544158935547, 0.20647813379764557, 0.3758341073989868, 0.22644831240177155, -0.004243805073201656, -0.6629847288131714, -0.3680651783943176, -0.22099705040454865, 0.05865979194641113, -0.10722128301858...
I'm using python and CherryPy to create a simple internal website that about 2 people use. I use the built in webserver with CherryPy.quickstart and never messed with the config files. I recently changed machines so I installed the latest Python and cherrypy and when I run the site I can access it from localhost:8080 b...
[ 0.44504743814468384, 0.1172068640589714, 0.022208144888281822, 0.007905962876975536, -0.05209053307771683, 0.05248899757862091, 0.3564417064189911, 0.48283621668815613, -0.3553736209869385, -0.838582456111908, 0.2627532184123993, 0.4887484312057495, -0.13281354308128357, 0.0423100255429744...
config file at all. That depends on how you are running the cherrypy init. If using cherrypy 3.1 syntax, that wold do it: ``` cherrypy.server.socket_host = 'www.machinename.com' cherrypy.engine.start() cherrypy.engine.block() ``` Of course you can have something more fancy, like subclassing the server class, or usi...
[ 0.43243998289108276, 0.03339038044214249, 0.31202933192253113, 0.08845524489879608, -0.17546634376049042, -0.23953965306282043, 0.12209191918373108, 0.1716168075799942, -0.06744395196437836, -0.5489323735237122, 0.09377014636993408, 0.7435932159423828, -0.3671947717666626, -0.1135036870837...
A friend of mine brought up this questiont he other day, he's recently bought a garmin heart rate moniter device which keeps track of his heart rate and allows him to upload his heart rate stats for a day to his computer. The only problem is there are no linux drivers for the garmin USB device, he's managed to interpr...
[ 0.4398210942745209, 0.12218716740608215, 0.0548505038022995, 0.22959838807582855, 0.22393973171710968, 0.14883701503276825, 0.18605317175388336, 0.09710854291915894, -0.304858535528183, -0.40778741240501404, 0.47166144847869873, 0.18729247152805328, -0.13217128813266754, -0.066166296601295...
taken. Where does one start when reverse engineering data when you know nothing about the structure? I had the same problem and initially found this project at Google Code that aims to complete a cross-platform version of tools for the Garmin devices ... see: <http://code.google.com/p/garmintools/>. There's a link on ...
[ 0.3901212513446808, 0.1984889805316925, 0.07062144577503204, -0.08854878693819046, 0.07434631139039993, 0.061256758868694305, -0.01877637393772602, 0.004539624322205782, -0.2614953815937042, -0.3959410488605499, 0.13287967443466187, 0.2819124162197113, -0.2601041793823242, -0.3341284394264...
I'm getting an error message when I try to build my project in eclipse: `The type weblogic.utils.expressions.ExpressionMap cannot be resolved. It is indirectly referenced from required .class files` I've looked online for a solution and cannot find one (except for those sites that make you pay for help). Anyone hav...
[ 0.5189630389213562, 0.199541836977005, 0.025090575218200684, 0.20212367177009583, -0.17604559659957886, -0.2396395206451416, 0.44005823135375977, 0.16347594559192657, -0.16917109489440918, -0.8728657364845276, 0.08761100471019745, 0.5255560874938965, -0.28425508737564087, 0.113736778497695...
click on your project and choose build `path->configure` build path and then choose the libraries tab. You should see the weblogic libraries associated here. If you do not you can click `Add Library->Server Runtime`. If the library is not there, then you first need to configure it. `Windows->Preferences->Server->Instal...
[ 0.47979453206062317, -0.15703599154949188, 0.3877338171005249, 0.222772479057312, 0.04027881845831871, -0.29445841908454895, 0.2067822813987732, -0.05696728453040123, -0.08137041330337524, -1.1232823133468628, -0.12582318484783173, 0.45233339071273804, -0.18843382596969604, 0.1410343050956...
We all know that RAW pointers need to be wrapped in some form of smart pointer to get Exception safe memory management. But when it comes to containers of pointers the issue becomes more thorny. The std containers insist on the contained object being copyable so this rules out the use of std::auto\_ptr, though you can...
[ 0.22219611704349518, 0.12981681525707245, 0.1552020162343979, 0.156574085354805, -0.05280590429902077, -0.11607000976800919, -0.04856155440211296, -0.3470361530780792, -0.17407523095607758, -0.5070006251335144, -0.012912759557366371, 0.525449812412262, -0.19022531807422638, 0.1353679597377...
over the resources they hold. A std::vector<boost::shared\_ptr<X>> has shared ownership. There are reasons why that may be necessary, but in case it isn't, I would default to boost::ptr\_vector<X>. YMMV.
[ 0.23412388563156128, -0.09541076421737671, 0.33850374817848206, 0.12575630843639374, 0.03813079744577408, -0.05084113031625748, -0.40234920382499695, 0.0548408180475235, -0.30481818318367004, -0.4122079312801361, -0.10258400440216064, 0.4983033835887909, -0.08866995573043823, 0.24496532976...
How do I programatically (Using C#) find out what the path is of my My Pictures folder? Does this work on XP and Vista? The following will return a full-path to the location of the users picture folder (Username\My Documents\My Pictures on XP, Username\Pictures on Vista) ``` Environment.GetFolderPath(Environment.Spe...
[ 0.35863131284713745, 0.1990302950143814, 0.7423002123832703, -0.05665697902441025, 0.25240710377693176, -0.0748915895819664, 0.41963592171669006, -0.04807918891310692, -0.06998206675052643, -0.7501559257507324, -0.07959482818841934, 0.40354159474372864, -0.1663552224636078, -0.088279858231...
I just started using SVN, and I have a cache directory that I don't need under source control. How can I ignore the whole directory/folder with SVN? I am using [Versions](https://en.wikipedia.org/wiki/Comparison_of_Subversion_clients#Standalone_Subversion_clients_comparison_table) and [TextMate](http://en.wikipedia.or...
[ 0.17024216055870056, 0.1809753179550171, 0.4247063994407654, -0.372934490442276, -0.3070932626724243, -0.17403221130371094, 0.3827818036079407, -0.04481915012001991, -0.4916524887084961, -0.493945449590683, -0.21546995639801025, 0.7395191788673401, -0.5203990936279297, 0.2648146152496338, ...
I have a scenario where I have to check whether user has already opened Microsoft Word. If he has, then I have to kill the winword.exe process and continue to execute my code. Does any one have any straight-forward code for killing a process using vb.net or c#? You'll want to use the [System.Diagnostics.Process.Kill]...
[ 0.3046373426914215, -0.00004836028165300377, 0.23326723277568817, -0.08708444237709045, 0.20374341309070587, 0.1287757307291031, 0.4231889843940735, -0.10836564749479294, -0.15026551485061646, -0.8394749760627747, -0.08669909089803696, 0.6558307409286499, -0.2181704044342041, 0.40015649795...
p.Kill(); p.WaitForExit(); // possibly with a timeout } catch ( Win32Exception winException ) { // process was terminating or can't be terminated - deal with it } catch ( InvalidOperationException invalidException ) { // process has already exited - might be able to let t...
[ 0.1608365774154663, -0.22465038299560547, 0.36772236227989197, -0.19590556621551514, 0.14931978285312653, -0.08826811611652374, 0.28999823331832886, -0.18018385767936707, -0.1745772361755371, -0.230874165892601, -0.2535884380340576, 0.5220847725868225, -0.2892218232154846, 0.27311569452285...
suggests that the process is remote.
[ 0.1751796156167984, 0.08124148100614548, 0.013509009964764118, 0.05008126050233841, 0.5291534066200256, 0.07741715013980865, 0.30900025367736816, 0.07446962594985962, -0.031764138489961624, -0.2332136482000351, -0.30733227729797363, 0.09586741030216217, 0.32632267475128174, 0.2075560837984...
I've got several AssemblyInfo.cs files as part of many projects in a single solution that I'm building automatically as part of TeamCity. To make the msbuild script more maintainable I'd like to be able to use the AssemblyInfo community task in conjunction with an ItemGroup e.g. ``` <ItemGroup> <AllAssemblyInfos...
[ 0.08503156900405884, 0.21833392977714539, 0.0702192634344101, -0.346595823764801, -0.03910905122756958, 0.09635724127292633, 0.3397436738014221, -0.07443711161613464, -0.22807854413986206, -0.48397716879844666, -0.298270046710968, 0.372903972864151, -0.4125465154647827, -0.0926810577511787...
blatently doesn't work because OutputFile cannot be a referenced ItemGroup. Anyone know how to make this work? Try changing the @ to a % as below ``` <ItemGroup> <AllAssemblyInfos Include="..\**\AssemblyInfo.cs" /> </ItemGroup> <AssemblyInfo AssemblyTitle="" AssemblyProduct="$(Product)" AssemblyCompany="$(Company)"...
[ 0.2581304907798767, 0.24004323780536652, 0.38198843598365784, -0.3567410707473755, 0.14621835947036743, -0.05082282796502113, 0.258853942155838, -0.0955348014831543, -0.16361775994300842, -0.29032111167907715, -0.12321717292070389, 0.5863890051841736, -0.6486445069313049, 0.230450779199600...
a call for every entry in AllAssemblyInfos. Have a look at this article too, should help. <http://blogs.msdn.com/aaronhallberg/archive/2006/09/05/msbuild-batching-generating-a-cross-product.aspx>
[ -0.045072175562381744, -0.05849383771419525, 0.09952662885189056, -0.07099970430135727, -0.34274330735206604, -0.1618090271949768, 0.4033200144767761, -0.1624595820903778, -0.4244699776172638, -0.23837964236736298, -0.16486778855323792, 0.09420979768037796, -0.39878717064857483, 0.21404890...
I have a paradox table from a legacy system I need to run a single query on. The field names have spaces in them - i.e. "Street 1". When I try and formulate a query in delphi for only the "Street 1" field, I get an error - Invalid use of keyword. Token: 1, Line Number: 1 Delphi V7 - object pascal, standard Tquery obje...
[ -0.510707676410675, 0.04496705159544945, 0.4195840358734131, 0.12495625019073486, -0.33002960681915283, 0.5394638180732727, 0.06744854897260666, -0.24398106336593628, -0.2915477156639099, -0.7120723128318787, -0.1456502377986908, 0.39457735419273376, -0.37759003043174744, 0.009832838550209...
Some files in our repository are individual to each developer. For example some developers use a local database, which is configured in a properties file in the project. So each developer has different settings. When one developer commits, he always has to take care to not commit his individually configured files. How...
[ 0.6479325890541077, 0.04366381838917732, -0.003502273466438055, 0.3877538740634918, 0.16673365235328674, -0.048707932233810425, 0.30917641520500183, -0.2859734296798706, -0.18041788041591644, -0.9324241876602173, 0.24693742394447327, 0.1773194521665573, -0.16239245235919952, 0.300934016704...
This is not a new topic, but I am curious how everyone is handling either `.js` or `.css` that is browser specific. Do you have `.js` functions that have `if/else` conditions in them or do you have separate files for each browser? Is this really an issue these days with the current versions of each of the popular b...
[ 0.5706378221511841, 0.08270207047462463, -0.21521523594856262, -0.013002236373722553, -0.38473930954933167, -0.24314719438552856, -0.015126347541809082, 0.35846906900405884, -0.41534149646759033, -0.8232686519622803, -0.10855396836996078, 0.4247960150241852, -0.014158151112496853, 0.107493...
in this regard.
[ 0.057435452938079834, 0.15987089276313782, -0.06732673197984695, 0.1451324224472046, 0.100975900888443, 0.056917380541563034, -0.15781666338443756, -0.1958928108215332, 0.09442085027694702, -0.16004608571529388, -0.12040078639984131, 0.5825933218002319, 0.13710927963256836, -0.055458713322...
I've got a database which I intend to replicate for backup reasons (performance is not a problem at the moment). We've set up the replication correctly and tested it and all was fine. Then we realized that it replicates all the writes to the temporary tables, which in effect meant that replication of one day's worth...
[ 0.5228525996208191, 0.29314517974853516, 0.4731834828853607, 0.21530863642692566, 0.0859878659248352, 0.0049786814488470554, 0.5945660471916199, -0.16033045947551727, -0.1214202493429184, -0.5333714485168457, 0.11746293306350708, 0.35356128215789795, -0.014893767423927784, 0.36258071660995...
to do those operations during a web request; instead we just store the modifications without attempting to recompute anything while in the web request, and then do all of the work in bulk). In order to process that data efficiently, we use temporary tables (as there's lots of interdependencies). Now, the first problem...
[ 0.07648702710866928, -0.05160248279571533, 0.36151835322380066, 0.3463849425315857, 0.21891461312770844, -0.04501468688249588, 0.19123564660549164, -0.149248868227005, -0.6312738656997681, -0.6461758017539978, -0.1980365663766861, 0.3404197096824646, -0.24570101499557495, 0.141180127859115...
easily catch up in less than half an hour if it wasn't for all that recomputation (which it does one after the other, so there's no benefit of rebuilding the data every 15 mins... and you can literally see it stuck at, say 1115, only to quickly catch up and got stuck at 1130 etc). One solution we came up with is to mo...
[ -0.07591179013252258, -0.029041483998298645, 0.33087286353111267, 0.20082996785640717, 0.21060141921043396, -0.04584555700421333, 0.3797334134578705, -0.2872874438762665, -0.1996968388557434, -0.8405594825744629, 0.13099579513072968, 0.08573059737682343, -0.07366695255041122, 0.00452706450...
we'd have to recompute everything on it before we could actually use it. Did anyone have a similar problem and/or how would you solve it? Am I missing something obvious? I've come up with the solution. It makes use of replicate-do-db mentioned by Nick. Writing it down here in case somebody had a similar problem. The ...
[ 0.5816413760185242, 0.020100995898246765, -0.13640742003917694, 0.2681848108768463, 0.01296983566135168, 0.010201669298112392, 0.14176836609840393, -0.19811801612377167, -0.21167123317718506, -0.27447912096977234, 0.5831949710845947, 0.2479764074087143, -0.39898428320884705, 0.058812074363...
central table being up-to-date will produce different results) or you ignore the central table, which has a similar problem. Not to mention, you have to restart mysql after adding any of those options to my.cnf. We wanted something that would cover all those cases (and future ones) without the need for any further rest...
[ 0.3724671006202698, -0.22486035525798798, 0.38557299971580505, 0.4235926866531372, 0.23882423341274261, -0.29512009024620056, -0.06765960156917572, 0.12432403117418289, -0.3538905680179596, -0.43918612599372864, 0.2558579444885254, 0.27711424231529236, -0.11326400190591812, 0.3340010344982...
in "workarea" db, and to avoid the dependency problem mentioned above, we won't populate the central table (which sits in "real" db) by INSERT ... SELECT or RENAME TABLE, but rather query the tmp tables to generate a sort of a diff on the live table (ie. generate INSERT statements for new rows, DELETE for the old ones ...
[ 0.4733763337135315, -0.1977190375328064, 0.1481921523809433, 0.034312885254621506, -0.3168482780456543, -0.03244625777006149, 0.5089643597602844, -0.3994496464729309, 0.11755519360303879, -0.6380578279495239, -0.21298448741436005, 0.2523651719093323, -0.41617122292518616, 0.077715910971164...
that do will be minimal and not computationally expensive at all, just simple INSERTs and DELETEs.
[ 0.21096301078796387, 0.235942080616951, 0.27334070205688477, 0.3637526333332062, 0.43730780482292175, -0.22923870384693146, -0.013216668739914894, -0.05661839246749878, 0.2737981379032135, -0.48299890756607056, -0.18581125140190125, 0.5444802641868591, -0.10106813907623291, -0.118789866566...
I'm used to python, so this is a bit confusing to me. I'm trying to take in input, line-by-line, until a user inputs a certain number. The numbers will be stored in an array to apply some statistical maths to them. Currently, I have a main class, the stats classes, and an "reading" class. Two Questions: 1. I can't se...
[ 0.2733731269836426, -0.09967346489429474, -0.06037464737892151, 0.062315162271261215, -0.21721497178077698, 0.262019544839859, 0.09920059889554977, -0.1609540432691574, -0.20205602049827576, -0.4420085847377777, 0.16798105835914612, 0.30191344022750854, -0.20759092271327972, -0.23240217566...
I prevent the array from having more than 1000 values stored within it? Let me show what I have so far: ``` public static java.util.ArrayList readRange(double end_signal){ //read in the range and stop at end_signal ArrayList input = new ArrayList(); Scanner kbd = new Scanner( System.in ); int count =...
[ 0.2955409288406372, -0.08749111741781235, 0.6522774696350098, -0.477828711271286, 0.20978087186813354, 0.06207077577710152, 0.44032344222068787, -0.7408307790756226, -0.1990870237350464, -0.43534669280052185, -0.23450925946235657, 0.5280301570892334, -0.3650493025779724, 0.1242465376853942...
input; } ``` Any help would be appreciated, pardon my newbieness... Answers: *>1. I can't seem to get the input loop to work out, what's the best practice for doing so.* I would rather have a simple while loop instead of a do{}while... and place the condition in the while... In my example it read: *while the read ...
[ 0.026072397828102112, 0.03549093380570412, 0.26691076159477234, -0.16297440230846405, -0.08743486553430557, -0.08079886436462402, 0.1390826255083084, -0.09953434765338898, -0.19234102964401245, -0.6351521611213684, -0.05911228433251381, 0.6252894401550293, -0.44717976450920105, -0.11073986...
to program to the interface rather to the implementation. *>2.1How do I declare method-type to be an arraylist?* See code below. *>2.2. How do I prevent the array from having more than 1000 values stored within it?* By adding this restriction in the while condition. ``` import java.util.Scanner; import java.util.L...
[ 0.2178332358598709, -0.08227039873600006, 0.3049710690975189, -0.30821624398231506, -0.0664965882897377, 0.18791399896144867, 0.32256293296813965, -0.6360530257225037, -0.10964303463697433, -0.5831992626190186, 0.08984822034835815, 0.4209846556186676, -0.409189909696579, 0.0244956091046333...
); System.out.println("The input was " + list ); } /** * Read from the standar input until endSignal number is typed. * Also limits the amount of entered numbers to 10000; * @return a list with the numbers. */ public List readRange( double endSignal ) { List<Double> inp...
[ 0.41107404232025146, -0.36730512976646423, 0.7486603856086731, -0.4070636034011841, -0.1879328042268753, 0.15600793063640594, 0.2528713643550873, -0.6513862609863281, -0.3619726598262787, -0.2974424958229065, -0.10608213394880295, 0.16471436619758606, -0.43460872769355774, 0.22760540246963...
= new Scanner( System.in ); int count = 0; double number = 0; while( ( number = kdb.nextDouble() ) != endSignal && count < INPUT_LIMIT ){ System.out.println( number ); input.add( number ); } return input; } } ``` Final remarks: It is preferred to
[ 0.05229904502630234, -0.45215320587158203, 0.9111706614494324, -0.2469424605369568, -0.09688954055309296, -0.05266198515892029, -0.035346850752830505, -0.5601846575737, -0.3382672667503357, -0.6587207317352295, -0.10467942804098129, 0.3038524389266968, -0.08820142596960068, 0.2962108552455...
have "instance methods" than class methods. This way if needed the "readRange" could be handled by a subclass without having to change the signature, thus In the sample I've removed the "static" keyword an create an instance of "InputTest" class In java code style the variable names should go in cammel case like in "e...
[ 0.16438275575637817, -0.1337883174419403, 0.12839415669441223, -0.08271685987710953, -0.11248118430376053, -0.3470454514026642, 0.15517252683639526, -0.30625349283218384, -0.03674662485718727, -0.45372670888900757, 0.016925830394029617, 0.38112008571624756, -0.29561087489128113, -0.0007794...
I'm a PHP developer and now I use [Notepad++](http://en.wikipedia.org/wiki/Notepad_%28software%29) for code editing, but lately I've been searching for an IDE to ease my work. I've looked into [Eclipse](http://en.wikipedia.org/wiki/Eclipse_%28software%29), [Aptana Studio](http://en.wikipedia.org/wiki/Aptana#Aptana_Stu...
[ 0.6673371195793152, 0.24450764060020447, 0.12511450052261353, -0.21046704053878784, -0.3355172872543335, 0.09267700463533401, 0.06589293479919434, -0.14545458555221558, -0.19693692028522491, -0.6551845073699951, 0.18635040521621704, 0.618749737739563, -0.059777941554784775, -0.251113861799...
impression of being too complicated that you got from e.g. Aptana, suggest that perhaps all you really want is a good editor with syntax highlighting and integration with some common workflow tools. For this, there are tons of options. I've used [jEdit](http://www.jedit.org/) on several platforms successfully, and tha...
[ -0.030504170805215836, -0.10241983085870743, -0.011368627659976482, 0.13423815369606018, -0.34904465079307556, -0.08651051670312881, -0.11002335697412491, -0.0865136981010437, 0.07617061585187912, -0.7216388583183289, -0.07044290006160736, 0.8552149534225464, -0.26870304346084595, -0.16060...
in the bottom of your window, invoke scripts from within the editor, and so forth. It's not perfect (the UI is better than most Java UIs, but not perfect yet I don't think), but I've had good luck with it, and it'll be a hell of a lot simpler than Aptana/Eclipse. That said, I do like Aptana quite a bit for web develop...
[ 0.2903270721435547, -0.18501734733581543, 0.22582635283470154, 0.007004900835454464, -0.3497423231601715, -0.14231213927268982, 0.14727477729320526, 0.4537643790245056, 0.10334865748882294, -0.986393392086029, 0.39709410071372986, 0.6840189695358276, 0.07134094089269638, -0.110997848212718...
How compatible is code written under Solaris with Open Solaris ? I would be interested specifically in some kernel modules . Kernel modules in particular will be very compatible between Solaris and OpenSolaris. OpenSolaris (via Project Indiana) is evolving the user-space components more heavily, including the installer...
[ 0.3930932879447937, 0.1748473346233368, 0.25419881939888, 0.1267355978488922, 0.029082082211971283, -0.30312108993530273, -0.35721132159233093, 0.1249745562672615, -0.1629805862903595, -0.7662951946258545, -0.5029422640800476, 0.5973044633865356, -0.08066234737634659, 0.043788135051727295,...
I have a web application that needs to take a file upload from the user and upload it to a remote server. I can take input from user to server fine via file\_field, but can't seem to work out the next step of uploading from server to remote. Net::HTTP doesn't do multipart forms out of the box, and I haven't been able t...
[ 0.4874541461467743, 0.04116557911038399, 0.3446381688117981, 0.017904095351696014, -0.06153608113527298, -0.12241169810295105, 0.25512802600860596, -0.06442050635814667, -0.13552741706371307, -0.8678804636001587, 0.17458803951740265, 0.44630318880081177, -0.06277983635663986, 0.42891952395...
for this: <http://svn.techno-weenie.net/projects/plugins/attachment_fu/>
[ 0.660618007183075, -0.2161392718553543, 0.1874750554561615, -0.06536294519901276, 0.16657738387584686, -0.032750826328992844, -0.17629148066043854, -0.25246086716651917, -0.2737208902835846, -0.4970490634441376, -0.28147998452186584, 0.5972583293914795, -0.03438711166381836, -0.23003146052...
Let's say I have a string holding a mess of text and (x)HTML tags. I want to remove all instances of a given tag (and any attributes of that tag), leaving all other tags and text along. What's the best Regex to get this done? Edited to add: Oh, I appreciate that using a Regex for this particular issue is not the best ...
[ 0.4120722711086273, 0.25074052810668945, 0.11421402543783188, 0.23409782350063324, -0.07687866687774658, -0.15579356253147125, 0.4717784821987152, -0.07508149743080139, -0.25912192463874817, -0.36808785796165466, -0.12681519985198975, 0.44357725977897644, -0.4044758379459381, -0.1280050277...
a parser instead, there should be one available for your chosen language. You **might** be able to get away with something like this: ``` </?tag[^>]*?> ``` But it depends on exactly what you're doing. For example, that won't remove the tag's content, and it may leave your HTML in an invalid state, depending on whic...
[ -0.12317846715450287, 0.3518100380897522, -0.09234068542718887, 0.21086491644382477, -0.3147140145301819, -0.18567322194576263, 0.6162230968475342, 0.014200979843735695, -0.012450085021555424, -0.6177082657814026, -0.274419903755188, 0.5742469429969788, -0.6163488030433655, -0.337053179740...
I've been reading a little about temporary tables in MySQL but I'm an admitted newbie when it comes to databases in general and MySQL in particular. I've looked at some examples and the MySQL documentation on how to create a temporary table, but I'm trying to determine just how temporary tables might benefit my applica...
[ 0.5353209972381592, 0.23721548914909363, 0.16129803657531738, 0.3559388220310211, 0.297605037689209, 0.012816671282052994, -0.29862284660339355, 0.3148730993270874, -0.42957666516304016, -0.6571083068847656, 0.44451379776000977, 0.17772211134433746, 0.053516726940870285, 0.0621108040213584...
the topic. If you have any experience with this, I'd love to hear about it. Thanks, Matt Temporary tables are often valuable when you have a fairly complicated SELECT you want to perform and then perform a bunch of queries on that... You can do something like: ``` CREATE TEMPORARY TABLE myTopCustomers SELECT cus...
[ 0.09749751538038254, 0.051954854279756546, 0.667799174785614, 0.41311025619506836, -0.011489496566355228, 0.06199934706091881, -0.15096943080425262, 0.29893314838409424, -0.47505703568458557, -0.6971001029014587, -0.07867509871721268, 0.46039825677871704, -0.043182622641325, 0.166158244013...
cleanup needs to be done. Almost always you'll see temporary tables used for derived tables that were expensive to create.
[ 0.5759109854698181, 0.14200499653816223, 0.2249704897403717, 0.16109494864940643, 0.4435560703277588, -0.11638804525136948, -0.18779994547367096, 0.038040585815906525, -0.43551039695739746, -0.7108737230300903, -0.05272170901298523, 0.13426350057125092, 0.03774901479482651, 0.1179398298263...
Ok so before I even ask my question I want to make one thing clear. I am currently a student at NIU for Computer Science and this does relate to one of my assignments for a class there. So if anyone has a problem read no further and just go on about your business. Now for anyone who is willing to help heres the situa...
[ 0.768693745136261, 0.12113611400127411, -0.029757406562566757, -0.16251356899738312, 0.052456051111221313, -0.2349911332130432, 0.4668920636177063, 0.48601508140563965, -0.2443559616804123, -0.49738380312919617, -0.03738130256533623, 0.3303486108779907, 0.07580845803022385, 0.5562934875488...
would end up as "can" and "that--to" would end up as "that" obviously with out the quotes, quotes were used just to specify what the example was). The problem I've run into is that I can clean the string fine and then insert it into the map that we are using but for some reason with the code I have written it is allow...
[ 0.5695081353187561, 0.3095148801803589, 0.179380863904953, 0.11043427139520645, 0.11304087191820145, -0.08637087047100067, 0.542402982711792, 0.06910742819309235, 0.11146880686283112, -0.6352625489234924, 0.38470789790153503, 0.20064237713813782, -0.10396274924278259, 0.3348066508769989, ...
method within the map structure itself. So what I am looking for is two things, any suggestions about how I could a) fix this with out simply just erasing it and b) any improvements that I could make on the code I already have written. Here are the functions I have written to read in from the file and then the one th...
[ 0.08860692381858826, -0.03272520750761032, 0.44976168870925903, 0.022913357242941856, 0.11465320736169815, 0.13512225449085236, 0.15956564247608185, -0.217500701546669, -0.30747517943382263, -0.8171616196632385, 0.1402568519115448, 0.402121365070343, -0.2637350261211395, -0.029031295329332...
to the code I've written or any criticisms of something I did I'll listen. At school we really don't get feed back on the correct, proper, or most efficient way to do things. ``` int get_words(map<string, int>& mapz) { int cnt = 0; //set out counter to zero map<string, int>::const_iterator mapzIter; ...
[ 0.3280438184738159, -0.044016432017087936, 0.5677410960197449, -0.18738478422164917, 0.05554832145571709, 0.030580291524529457, 0.5024369359016418, -0.31439000368118286, 0.03331054747104645, -0.7206543684005737, -0.13392162322998047, 0.6159536838531494, -0.22357654571533203, -0.07243631780...
s; //temp strings to read into string not_s; input >> s; while(!input.eof()) //read in until EOF { not_s = ""; clean_entry(s, not_s); if((int)not_s.length() == 0) { input >> s; clean_entry(s, not_s); } mapz[not_s]++; //increment occurence
[ -0.10301878303289413, -0.6714004278182983, 0.5924922823905945, -0.3748340606689453, 0.2698792815208435, 0.24018415808677673, 0.5847465991973877, -0.4026338458061218, -0.13156910240650177, -0.797267496585846, -0.6555684804916382, 0.21868804097175598, -0.329632431268692, 0.01020378153771162,...
input >>s; } input.close(); //close instream for(mapzIter = mapz.begin(); mapzIter != mapz.end(); mapzIter++) cnt = cnt + mapzIter->second; return cnt; //return number of words in instream } void clean_entry(const string& non_clean, string& clean) { int i, j, begin, end; for(i = 0; isalnum(non_...
[ -0.3944629728794098, -0.0821283757686615, 0.6992819905281067, -0.28704479336738586, 0.16815821826457977, 0.2728181779384613, 0.5830764174461365, -0.345663458108902, -0.0810389295220375, -0.6958847641944885, -0.7182425260543823, 0.6142407655715942, -0.2779131829738617, 0.0053272307850420475...
with empty entries is in your while loop. If you get an empty string, you clean the next one, and add it without checking. Try changing: ``` not_s = ""; clean_entry(s, not_s); if((int)not_s.length() == 0) { input >> s; clean_entry(s, not_s); } mapz[not_s]++; //increment occurence input >>s; ...
[ -0.19605830311775208, -0.2258191704750061, 0.3414498567581177, -0.3065339922904968, 0.09347356855869293, 0.2310682237148285, 0.24130244553089142, -0.17412759363651276, -0.19358092546463013, -0.7638198733329773, -0.6891700625419617, 0.2699621319770813, -0.31042036414146423, -0.0047099473886...
If numbers are not allowed, you may need to revisit that area as well.
[ 0.445941686630249, 0.041753944009542465, -0.015117248520255089, 0.15091301500797272, 0.36829811334609985, -0.22769849002361298, 0.15561264753341675, 0.3121287524700165, -0.6225385069847107, -0.5417317152023315, -0.15703347325325012, 0.09390110522508621, 0.029334429651498795, -0.05581854283...
By default, emacs 22.1.1 only shows the top of the compilation buffer when you first issue the compile command. I would like it to scroll to the bottom automatically when I use the compile command in order to save keystrokes. This way I can easily get a status of the current compilation by just looking at the compile b...
[ 0.30460280179977417, 0.1473657637834549, 0.3516652286052704, -0.029292980208992958, 0.2745916545391083, -0.0322389230132103, 0.16912823915481567, 0.10674063861370087, -0.4322914183139801, -0.6819838881492615, -0.16811931133270264, 0.6565317511558533, -0.27834975719451904, 0.200560316443443...
the compilation buffer always scrolls to follow output as > it comes in.
[ 0.09618869423866272, -0.007404467090964317, 0.4828398525714874, 0.03119204193353653, 0.12917722761631012, -0.300642728805542, 0.14677388966083527, -0.03060668334364891, -0.10652706027030945, -0.6611470580101013, -0.322520911693573, 0.3887539207935333, 0.02646559104323387, 0.231335893273353...
When I build a site, I'd like to have at least one browser I can show it off in without any hacks or workarounds, and yet still retain maximum functionality. Knowing that none of the browsers have perfect standards adherence, which one comes closest? Also, are there any standards areas in which a single browser seems ...
[ 0.7729219198226929, 0.295773446559906, 0.25874149799346924, -0.12240958213806152, -0.26626962423324585, -0.2566402554512024, 0.5242680907249451, 0.1215900182723999, -0.21852849423885345, -0.6573886275291443, -0.11780616641044617, 0.4791014790534973, 0.1611785739660263, -0.2490435093641281,...
best bet - it passes [Acid3](http://acid3.acidtests.org/), something no browser on the market can do yet.
[ -0.16390030086040497, -0.06650273501873016, 0.27863895893096924, 0.07870178669691086, 0.056520964950323105, -0.2948791980743408, 0.2669360041618347, 0.08572590351104736, 0.14361625909805298, -0.4714297950267792, 0.11798181384801865, 0.2511754333972931, 0.23973749577999115, -0.2461275011301...
I like to use Emacs' shell mode, but it has a few deficiencies. One of those is that it's not smart enough to open a new buffer when a shell command tries to invoke an editor. For example with the environment variable `VISUAL` set to `vim` I get the following from `svn propedit`: ``` $ svn propedit svn:externals . "...
[ 0.2295926958322525, 0.0879635363817215, 0.5299511551856995, -0.16211901605129242, 0.30582761764526367, 0.1386600285768509, 0.35094311833381653, 0.05500458925962448, -0.05136207118630409, -0.5420674085617065, 0.02510840818285942, 0.9755709171295166, -0.2327154576778412, 0.09803273528814316,...
[4;1H~
[ -0.3747929036617279, 0.37519314885139465, 0.5721770524978638, -0.39114612340927124, 0.24654003977775574, 0.10295706987380981, -0.10047420114278793, -0.35865873098373413, -0.018785366788506508, -0.5997499823570251, -0.3019312024116516, 0.39004480838775635, 0.049387942999601364, 0.1399315744...
[5;1H~ [6;1H~
[ -0.37439996004104614, 0.32026779651641846, 0.6008008122444153, -0.3605603277683258, 0.19139476120471954, 0.41250327229499817, -0.04659142717719078, -0.664192795753479, -0.04948126897215843, -0.5797380208969116, -0.1799013763666153, 0.48120954632759094, 0.11696323752403259, 0.10720004886388...
[7;1H~ ... ``` (It may be hard to tell from the representation, but it's a horrible,
[ 0.34192925691604614, 0.6298858523368835, 0.32358357310295105, -0.13150349259376526, 0.15796737372875214, -0.1438930481672287, 0.42971643805503845, 0.07815632969141006, -0.20807252824306488, -0.4230574071407318, -0.0915776789188385, 0.29908767342567444, -0.19977642595767975, 0.3297874331474...
ugly mess.) With `VISUAL` set to `"emacs -nw"`, I get ``` $ svn propedit svn:externals . emacs: Terminal type "dumb" is not powerful enough to run Emacs. It lacks the ability to position the cursor. If that is not the actual type of terminal you have, use the Bourne shell command `TERM=... export TERM' (C-shell: `se...
[ -0.009269733913242817, 0.31684809923171997, 0.563101589679718, -0.33308401703834534, 0.15936526656150818, 0.2515590786933899, 0.5140342116355896, 0.018079183995723724, -0.15405085682868958, -0.6358627080917358, 0.08286583423614502, 0.6691272854804993, -0.6026924252510071, 0.139671549201011...
to do the right thing here and open up a new buffer on behalf of the command line process? You can attach to an Emacs session through `emacsclient`. First, start the emacs server with ``` M-x server-start ``` or add `(server-start)` to your `.emacs`. Then, ``` export VISUAL=emacsclient ``` Edit away. Note: * T...
[ 0.05769716203212738, 0.05545860528945923, 0.5664206147193909, -0.06561706215143204, 0.02684827335178852, 0.2876172363758087, 0.10094796121120453, 0.16353610157966614, -0.3941892385482788, -0.8895961046218872, -0.27071595191955566, 0.40256422758102417, -0.4597732424736023, 0.270275205373764...
frame to start the server.
[ 0.12289008498191833, 0.036034684628248215, 0.29979363083839417, 0.1610890030860901, -0.3260129392147064, 0.28477898240089417, -0.27692195773124695, -0.10318301618099213, -0.17628113925457, -0.5308482646942139, 0.021622730419039726, 0.33107784390449524, -0.14241592586040497, 0.2493840605020...
While googling, I see that using [`java.io.File#length()`](http://docs.oracle.com/javase/6/docs/api/java/io/File.html#length%28%29) can be slow. [`FileChannel`](http://docs.oracle.com/javase/6/docs/api/java/nio/channels/FileChannel.html) has a [`size()`](http://docs.oracle.com/javase/6/docs/api/java/nio/channels/FileCh...
[ -0.1238187849521637, 0.06016385927796364, 0.7689719200134277, -0.1373130828142166, -0.17880754172801971, 0.22252163290977478, 0.2919918894767761, -0.30173996090888977, -0.3468502461910248, -0.5796588063240051, 0.18348951637744904, 0.4711443781852722, -0.21386662125587463, 0.211291328072547...
5 and iterations = 50 the picture draws different. ``` LENGTH sum: 39496, per Iteration: 157.984 CHANNEL sum: 74261, per Iteration: 297.044 URL sum: 95534, per Iteration: 382.136 ``` File must be caching the calls to the filesystem, while channels and URL have some overhead. Code: ``` import java.io.*; import ja...
[ 0.11090434342622757, 0.024251645430922508, 0.5555064082145691, -0.28470441699028015, 0.11695919930934906, 0.41839349269866943, 0.45746511220932007, -0.8154484629631042, -0.14561769366264343, -0.6272200345993042, -0.1225212961435318, 0.46723371744155884, -0.1474788933992386, 0.3762396275997...
"FileSizeBench.class").getFile()); return me.length(); } }, CHANNEL { @Override public long getResult() throws Exception { FileInputStream fis = null; try {
[ 0.441418319940567, -0.7244972586631775, 0.6261523962020874, 0.09327919781208038, 0.3355935215950012, -0.20635643601417542, 0.5448113679885864, -0.18101748824119568, -0.07140205055475235, -0.36893847584724426, -0.3533678650856018, 0.4508790671825409, -0.42018765211105347, 0.4316021203994751...
File me = new File(FileSizeBench.class.getResource( "FileSizeBench.class").getFile()); fis = new FileInputStream(me); return fis.getChannel().size(); } finally { fis.close();
[ -0.03192383050918579, -0.4591709077358246, 1.0378177165985107, -0.16309569776058197, 0.156948059797287, 0.0701870322227478, 0.33756428956985474, -0.31296858191490173, 0.0076462337747216225, -0.7160856127738953, -0.4241557717323303, 0.34478625655174255, -0.23812802135944366, 0.2317153811454...
} } }, URL { @Override public long getResult() throws Exception { InputStream stream = null; try { URL url = FileSizeBench.class
[ 0.03312446177005768, -0.4410583972930908, 0.22602079808712006, 0.09124190360307693, 0.3042142689228058, -0.15546280145645142, 0.4394744038581848, 0.026676861569285393, -0.035940028727054596, -0.2645086944103241, -0.4762210547924042, 0.2666173577308655, -0.2669530212879181, 0.63495892286300...
.getResource("FileSizeBench.class"); stream = url.openStream(); return stream.available(); } finally { stream.close(); }
[ 0.046087365597486496, -0.3399984538555145, 0.7324872612953186, 0.02451464720070362, 0.2796540856361389, -0.1067659854888916, 0.20820628106594086, 0.1297033578157425, -0.013112767599523067, -0.6760185360908508, -0.6300060749053955, 0.4770606458187103, -0.29479342699050903, 0.597607374191284...
} }; public abstract long getResult() throws Exception; public static void main(String[] args) throws Exception { int runs = 5; int iterations = 50; EnumMap<FileSizeBench, Long> durations = new EnumMap<FileSizeBench, Long>(FileSizeBench.class); for (int i = 0; i < runs; i...
[ 0.042261045426130295, -0.32829588651657104, 0.08454693108797073, -0.18804873526096344, 0.24760966002941132, 0.24311786890029907, 0.5395788550376892, -0.4823625385761261, -0.17425982654094696, -0.2166256159543991, -0.2874842882156372, 0.2069089561700821, -0.3190974295139313, 0.3343153297901...
if (!durations.containsKey(test)) { durations.put(test, 0l); } long duration = testNow(test, iterations); durations.put(test, durations.get(test) + duration);
[ 0.5657123923301697, -0.5628700852394104, -0.13033100962638855, -0.20639263093471527, 0.2842462956905365, 0.11337544023990631, 0.510491132736206, -0.20085887610912323, 0.04363192245364189, -0.05470949783921242, -0.2271907478570938, 0.3937811553478241, 0.06468607485294342, 0.3082422316074371...
// System.out.println(test + " took: " + duration + ", per iteration: " + ((double)duration / (double)iterations)); } } for (Map.Entry<FileSizeBench, Long> entry : durations.entrySet()) { System.out.println(); System.out.println(entry.getKey() + " sum: " + entry.getV...
[ -0.14766216278076172, -0.5479056239128113, 0.41769108176231384, -0.5247439742088318, 0.17949539422988892, 0.32364052534103394, 0.5049675107002258, -0.46279793977737427, -0.12445386499166489, -0.4318111836910248, -0.18304786086082458, 0.4192803204059601, -0.03355439007282257, 0.141732305288...
} } private static long testNow(FileSizeBench test, int iterations) throws Exception { long result = -1; long before = System.nanoTime(); for (int i = 0; i < iterations; i++) { if (result == -1) {
[ 0.16464193165302277, -0.47589877247810364, 0.08406178653240204, -0.025905760005116463, 0.38535478711128235, 0.1922692209482193, 0.27436649799346924, -0.37367329001426697, 0.15528152883052826, -0.30157920718193054, 0.02386580780148506, 0.2192516177892685, -0.31751593947410583, 0.53391498327...
result = test.getResult(); //System.out.println(result); } else if ((result = test.getResult()) != result) { throw new Exception("variance detected!"); } } return (System.nanoTime() - before) / 1000; } } ```
[ 0.23366272449493408, -0.30974888801574707, 0.40503156185150146, 0.07391141355037689, 0.25197485089302063, -0.18906687200069427, 0.15488241612911224, -0.5415650010108948, -0.10347182303667068, -0.4106464684009552, -0.015927499160170555, 0.29901671409606934, -0.2533535957336426, 0.4937052428...
Looking for suggestions on file system management tools. We have several terabytes of images, pdfs, excel sheets, etc. We're looking at some sort of software that will help us to manage, archive, etc the images. We don't store all the files information in a database but some are and we were hoping to maybe find an a...
[ 0.894263505935669, -0.015438304282724857, -0.07896978408098221, 0.3719824552536011, -0.036607012152671814, -0.04636833444237709, 0.14507684111595154, 0.7501329779624939, -0.45393475890159607, -0.7571527361869812, 0.18383456766605377, 0.5714318156242371, 0.08543279021978378, 0.1020194962620...
How do you clear the IRB console screen? On *Mac OS X* or *Linux* you can use `Ctrl` + `L` to clear the *IRB* screen.
[ -0.11244047433137894, -0.0341697596013546, 0.595848023891449, -0.03842891752719879, 0.06525494158267975, -0.2656962275505066, -0.019895736128091812, 0.3595248758792877, -0.21860362589359283, -0.6904950141906738, -0.17796958982944489, 0.5785192847251892, -0.14476320147514343, -0.06261105835...
I've been given the task of doing some work customizing an artist's space in MySpace. It seems that you sort of hack the HTML you want into your edit profile page (which has several empty boxes). The MySpace page, it seems, is already HTML so you can only hack into that. Suggested "tweaks" include incomplete HTML code ...
[ 1.0007658004760742, -0.017115136608481407, 0.06445029377937317, 0.007097686640918255, 0.1406138688325882, -0.0429437980055809, -0.07949907332658768, 0.08249393850564957, -0.21986761689186096, -0.6499447822570801, 0.3656523823738098, 0.20331664383411407, -0.040793027728796005, 0.16506047546...
Paste the code at the bottom of your 'I'd Like to Meet' Section!" This cannot possibly be this lame, can it? Is there any coherent guide to customizing MySpace pages for programmers/HTML designers? Is there a coherent DOM (including things like `.contactTable` etc.)? Could it be that all the tweaks are just hacks peo...
[ 0.6636267900466919, -0.0021699329372495413, 0.32664939761161804, 0.3608895242214203, -0.11783739179372787, -0.501751720905304, 0.40263631939888, 0.19110330939292908, -0.12157795578241348, -0.6164265871047974, 0.1255897432565689, 0.4871121048927307, -0.1567372977733612, -0.09466125816106796...
mock it up to roughly how you want it and note down which elements and which styles need work and figure out how to get that set up in the profile editor. Try approaching this from the point of view of a challenge. On the upside, MySpace allows you access to the DOM so you can screw with all sorts of things. On the do...
[ 0.6949735283851624, 0.16738052666187286, 0.3031385838985443, 0.19813784956932068, -0.4746048152446747, -0.17261925339698792, 0.5471163392066956, 0.394898921251297, -0.08619663864374161, -0.36759060621261597, 0.15998822450637817, 0.5370397567749023, -0.05990435555577278, 0.13143771886825562...