text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I needed. Thanks for the insight, all.
[ 0.18914057314395905, 0.10478399693965912, -0.259818971157074, 0.2846682667732239, -0.26245975494384766, -0.08335678279399872, 0.2064548283815384, 0.25615906715393066, 0.13050933182239532, -0.16540244221687317, 0.37715423107147217, 0.33327335119247437, 0.12728139758110046, 0.114717274904251...
I'm not that into dynamic programming languages but I've written my fair share of JavaScript code. I never really got my head around this prototype-based programming, does any one know how this works? ``` var obj = new Object(); obj.prototype.test = function() { alert('Hello?'); }; var obj2 = new obj(); obj2.test(); ...
[ 0.07492944598197937, 0.2735876441001892, -0.1444285660982132, -0.20225025713443756, -0.06207428127527237, 0.13210590183734894, 0.4884357750415802, 0.08439376950263977, -0.29416751861572266, -0.75047367811203, 0.09395789355039597, 0.2736823260784149, -0.533033013343811, 0.3422764837741852, ...
JavaScript? How does it relate to instantiating objects? ### Update: correct way ``` var obj = new Object(); // not a functional object obj.prototype.test = function() { alert('Hello?'); }; // this is wrong! function MyObject() {} // a first class functional object MyObject.prototype.test = function() { alert('OK');...
[ -0.1194516271352768, 0.1380724459886551, 0.10526096075773239, -0.04881042614579201, -0.06836896389722824, -0.06379088014364243, 0.1940954029560089, -0.45162272453308105, -0.22229984402656555, -0.6008472442626953, -0.16677314043045044, 0.2437068223953247, -0.4944719970226288, -0.11118217557...
specification convention to denote internal slots. The value pointed at by the `[[Prototype]]` of an object, is colloquially known as "the prototype of that object." If you access a property via the dot (`obj.propName`) or bracket (`obj['propName']`) notation, and the object does not directly have such a property (...
[ 0.15903973579406738, 0.0469999834895134, 0.12023758143186569, -0.008118133060634136, 0.31585437059402466, -0.04595058411359787, -0.17148995399475098, -0.21049204468727112, -0.13559085130691528, -0.7661189436912537, -0.31734275817871094, 0.4449746310710907, -0.09547200798988342, 0.438304394...
walked until a match is found, or its end is reached. At the top of the prototype chain is the `null` value. Modern JavaScript implementations allow read and/or write access to the `[[Prototype]]` in the following ways: 1. The `new` operator (configures the prototype chain on the default object returned from a constr...
[ -0.15353573858737946, -0.06844252347946167, 0.31925490498542786, -0.04628697410225868, -0.22168172895908356, 0.22124381363391876, 0.45099520683288574, -0.12248101830482483, -0.28895288705825806, -0.564402163028717, -0.21756349503993988, -0.10147961229085922, -0.42116639018058777, 0.1656820...
are preferred over `__proto__`, in part because the behavior of `o.__proto__` [is unusual](https://stackoverflow.com/a/35458348/38522) when an object has a prototype of `null`. An object's `[[Prototype]]` is initially set during object creation. If you create a new object via `new Func()`, the object's `[[Prototype]]...
[ -0.12720875442028046, -0.0014235639246180654, -0.09987778216600418, 0.013309186324477196, -0.0795283168554306, -0.07101912796497345, 0.1027713418006897, -0.14782622456550598, -0.2876453697681427, -0.9519205689430237, -0.40998414158821106, 0.3306664526462555, -0.2787366509437561, 0.44816580...
functions allows us to simulate classical inheritance in JavaScript; although JavaScript's inheritance system is - as we have seen - prototypical, and not class-based. Prior to the introduction of class syntax to JavaScript, constructor functions were the only way to simulate classes. We can think of properties of the...
[ -0.08835723996162415, -0.09777401387691498, -0.09011876583099365, 0.23373909294605255, -0.18562625348567963, 0.08915673941373825, 0.06499901413917542, -0.1426769644021988, -0.07018916308879852, -0.5674563646316528, 0.05101903900504112, 0.38598737120628357, -0.4800650179386139, 0.1068590357...
the object itself during construction. Without the class syntax, developers had to manually configure the prototype chain to achieve similar functionality to classical inheritance. This led to a preponderance of different ways to achieve this. Here's one way: ```js function Child() {} function Parent() {} Parent.pr...
[ -0.17835961282253265, -0.04666527360677719, -0.20458215475082397, 0.036679599434137344, 0.044922638684511185, 0.3821857273578644, 0.24698878824710846, -0.24693818390369415, -0.08010388910770416, -0.680912435054779, 0.023100025951862335, 0.2981092929840088, -0.2498549520969391, 0.6847360134...
tmp.prototype = parent.prototype const proto = new tmp() proto.constructor = child child.prototype = proto return child } Child = inherit(Child, Parent) const o = new Child console.log(o.inheritedMethod()) // 'this is inherited' ``` The class syntax introduced in ES2015 simplifies things, by providin...
[ 0.051804665476083755, -0.20166565477848053, 0.07509808242321014, -0.107601597905159, 0.26576223969459534, 0.09786662459373474, 0.27913251519203186, -0.3304465413093567, -0.20803186297416687, -0.7341418266296387, -0.06778287142515182, 0.402279257774353, -0.24128073453903198, 0.3055455684661...
Parent {} const o = new Child console.log(o.inheritedMethod()) // 'this is inherited' ``` ...the resulting object's `[[Prototype]]` will be set to an instance of `Parent`, whose `[[Prototype]]`, in turn, is `Parent.prototype`. Finally, if you create a new object via `Object.create(foo)`, the resulting object's `[[P...
[ -0.20362578332424164, -0.1378907859325409, 0.065288245677948, -0.07875349372625351, 0.3437384366989136, 0.15333810448646545, 0.16455072164535522, 0.28195706009864807, 0.07595984637737274, -0.6520770192146301, -0.19674718379974365, 0.33799928426742554, -0.22384442389011383, 0.65077042579650...
I'm using jQuery's [form plugin](http://malsup.com/jquery/form/#getting-started) to submit a form asynchronously. The server sends back HTML which goes into a div #boardcontainer by setting the target of an ajaxForm call. This works fine. ``` ... var options = { target: '#boardcontainer', // targe...
[ 0.3827998638153076, -0.13464252650737762, 0.7355784773826599, -0.09048212319612503, -0.13187652826309204, -0.16175802052021027, 0.03622922673821449, -0.09057328850030899, -0.10342039167881012, -0.6368337869644165, -0.045940034091472626, 0.2717933654785156, 0.015760594978928566, 0.019424641...
}; $('#myForm').ajaxForm(options); ... ``` Problem is, the HTML that comes back from the server contains two divs: ``` <div id="board"> ... </div> <div id="status"> ... </div> ``` "#board" is a giant HTML table prerendered by the server. "#status" is a short message and should ideally go into a div other than...
[ 0.1050974577665329, -0.2299574762582779, 0.5743091702461243, -0.04024471342563629, -0.15511789917945862, -0.03470596671104431, 0.1415647268295288, -0.06863515079021454, -0.011857321485877037, -0.7651920914649963, -0.19654172658920288, 0.5319740176200867, -0.07559255510568619, 0.08680856972...
divs in your success callback. ``` $('#status').appendTo('#realTarget'); ``` **EDIT**: Upon checking, appendTo itself does what you need it to do without losing the event handlers.
[ 0.07531137019395828, -0.4233057200908661, 0.5121939182281494, -0.020033160224556923, 0.21627666056156158, -0.02187909372150898, 0.3777102828025818, 0.045257069170475006, -0.03552046790719032, -0.5657966136932373, -0.3805713653564453, 0.9322560429573059, -0.2792554497718811, -0.279316276311...
Assume that you are doing a banking application. If users are logged into your site, how to detect their inactivity and ask them to log out if they remain inactive for a period of time? Inactive here means they have either switch to other tabs, or not touching the browser application. I guess think I can do this by r...
[ 0.5674000382423401, 0.03846459090709686, 0.17302091419696808, 0.00014609073696192354, 0.2409321665763855, -0.2650440037250519, 0.2897186875343323, 0.1624172329902649, -0.23891416192054749, -0.49227675795555115, 0.23304809629917145, 0.5766773223876953, -0.18762658536434174, -0.1141293123364...
new pages/data from your server on a regular basis, then adjusting the session timeout in PHP should work for this (assuming you are using PHP sessions). If the concern is that they could be sitting on one page for a good length of time with no trips to the server (e.g. filling out a long form), and you want to distin...
[ 0.4210112690925598, -0.46658191084861755, 0.486052542924881, 0.36454665660858154, -0.37570393085479736, -0.2666155695915222, 0.14991410076618195, -0.10638581961393356, -0.424056738615036, -0.8502058386802673, -0.14076723158359528, 0.5346953272819519, -0.1379668116569519, 0.0727624222636222...
events in javascript to stop and restart this mechanism (I think there are some differences for IE, there is a good explanation [here](http://www.thefutureoftheweb.com/blog/detect-browser-window-focus)).
[ 0.0861499160528183, -0.28950637578964233, 0.2584191560745239, -0.003821399062871933, -0.03634641692042351, -0.25625234842300415, 0.5931084752082825, 0.21422123908996582, -0.1589554101228714, -0.7218101620674133, -0.44965484738349915, 0.47832348942756653, -0.24425239861011505, -0.2498108148...
Can anyone please explain me use of throw in exception handling? What happens when i throw an exception? It means to "cause" an exception. When you "throw" an exception you are saying "something has gone wrong, here's some details". You can then "catch" a "thrown" exception to allow your program to degrade gracefully ...
[ 0.7284899950027466, 0.3108804523944855, -0.5353661775588989, 0.06510771065950394, -0.27246180176734924, -0.38591134548187256, 0.353776216506958, 0.03172796219587326, -0.25445377826690674, -0.6153636574745178, 0.16850295662879944, 0.35018473863601685, -0.07380396872758865, 0.235294073820114...
I am currently trying to put together an URL where I specify some GET parameters. But I want to use japanese or other characters too in this URL. Is there a way to convert a NSString to a string containing the HTML entities for the 'special' characters in my NSString? I am currently using the following code, which se...
[ 0.12643451988697052, 0.13589335978031158, 0.558040201663971, 0.22787189483642578, -0.08996233344078064, -0.034305598586797714, 0.31352517008781433, -0.16261543333530426, -0.09952696412801743, -0.484897255897522, -0.28944870829582214, 0.4674340486526489, -0.11288917809724808, -0.07315722107...
you need to convert each name and value to UTF-8, then URL encode each name and value separately, then join names with values using '=' and name-value pairs using '&'. I generally find it easier to put all the parameters in an NSDictionary, then build the query string from the dictionary. Here's a category that I use ...
[ -0.04072036221623421, 0.23531581461429596, 0.6620508432388306, -0.0505569726228714, -0.18103550374507904, 0.0873357504606247, 0.13829781115055084, -0.2714807987213135, -0.26273515820503235, -0.6521528363227844, -0.34839877486228943, 0.6391848921775818, -0.4569227695465088, 0.22209750115871...
it static NSString *urlEncode(id object) { NSString *string = toString(object); return [string stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]; } @implementation NSDictionary (UrlEncoding) -(NSString*) urlEncodedString { NSMutableArray *parts = [NSMutableArray array]; for (id key in self) { ...
[ -0.4157615005970001, -0.48633959889411926, 0.6135531663894653, -0.012686090543866158, -0.03333047777414322, 0.14496777951717377, 0.35119348764419556, -0.2940913140773773, -0.1331920623779297, -0.33785778284072876, -0.3453034460544586, 0.28987863659858704, -0.21997161209583282, 0.3038349449...
and value, then joining them together with '='. Then the parts in the `parts` array are joined together with '&' characters. So for your example: ``` #import "NSDictionary+UrlEncoding.h" // ... NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; [parameters setValue: @"t" forKey: @"client"]; [paramete...
[ -0.14511147141456604, -0.20356133580207825, 0.8838573694229126, -0.0452023409307003, 0.16474027931690216, 0.09092143923044205, 0.07314431667327881, -0.21070875227451324, -0.11981488764286041, -0.40043357014656067, -0.3400818407535553, 0.5715064406394958, -0.3530034124851227, 0.219468608498...
Im writing a game engine and I'm wondering what 3D model format should I use/load/export? Obj seems universal and easy but it also appears to be unreliable in that most models out there contain errors and it doesn't store anywhere near as much as other formats. There appear to be formats specifically for games such as...
[ 0.24285189807415009, 0.3023316264152527, 0.2716330885887146, 0.31642040610313416, -0.3433742821216583, -0.1929963082075119, -0.07888328284025192, -0.11913134157657623, 0.06364234536886215, -0.6335431933403015, 0.3213270306587219, 0.5754856467247009, -0.3341423273086548, -0.1918090581893921...
scripted per piece animation rather than Inverse kinematics and bone rigging? [Collada](http://en.wikipedia.org/wiki/COLLADA) is an open XML based format for 3d models owned by the Khronos group(OpenGL standards body) From the Collada.org FAQ: The COLLADA 1.4.x feature set includes: * Mesh geometry * Transform hier...
[ 0.32065045833587646, -0.37909677624702454, 0.3855382800102234, 0.20869502425193787, -0.30305734276771545, 0.3115432560443878, -0.4627896547317505, -0.036607056856155396, -0.016486644744873047, -0.21872864663600922, -0.3767455220222473, 0.19384361803531647, -0.16604000329971313, -0.22524714...
Microsoft make this piece of software called "Visual Studio 2008 Professional". I have found that there doesn't appear to be an application performance profiler or something similar in it, making it seem not so "professional" to me. If Microsoft don't include a profiler, what are your third party options for time pro...
[ 0.4549805223941803, 0.17710241675376892, 0.006675322540104389, 0.39411234855651855, -0.4151061773300171, -0.163037970662117, -0.06230384483933449, 0.1342736780643463, 0.034333840012550354, -0.12829981744289398, 0.19970165193080902, 0.8077102899551392, 0.015019645914435387, -0.3684925436973...
I played around with it for a while, but I simply can't figure it out. I made a tank that fires missiles, and when the missiles hit the walls, I want them to bounce off, but I want them to bounce off to the right angle. Right now I haven't got any obstacles, the missiles just bounce off when they get outside the `vie...
[ 0.29655027389526367, 0.396079421043396, 0.24726621806621552, 0.20996087789535522, 0.2695101797580719, 0.11671295762062073, 0.08160991966724396, -0.2283855676651001, -0.27154359221458435, -0.5015746355056763, 0.1090145856142044, 0.6579000353813171, 0.12486720830202103, -0.13251204788684845,...
have a missile that has `xVelocity` and `yVelocity` to represent its movement horizontally and vertically. Those velocities can be positive or negative to represent left, right, up, or down. * If a missile hits a top or bottom border reverse the sign of the `yVelocity`. * If a missile hits a left or right border rever...
[ 0.3188490569591522, -0.03859102353453636, 0.7297409772872925, 0.3027011454105377, -0.20884332060813904, -0.09604761749505997, -0.0268903449177742, -0.2012168914079666, -0.3895066976547241, -0.43996351957321167, -0.2560555934906006, 0.2840654253959656, 0.18267881870269775, 0.026367345824837...
positive) the missile will travel in the direction indicated. Let's just assign values of ``` xVelocity = 3 yVelocity = 4 ``` When the missile hits the wall at position **C**, its `xVelocity` shouldn't change, but its `yVelocity` should be reversed to -4 so that it travels back in the up direction, but keeps going t...
[ 0.05066844820976257, 0.06761838495731354, 0.8356403112411499, 0.1355702131986618, -0.15266737341880798, 0.24325314164161682, 0.2909902036190033, -0.38319969177246094, -0.3160591125488281, -0.5103905200958252, -0.19515486061573029, 0.6300334334373474, -0.17880991101264954, 0.007845215499401...
that are not at straight angles or are moving, it will be a lot easier to work with X and Y velocities than with angles.
[ 0.05195261910557747, -0.03717662766575813, 0.4473886787891388, 0.16951049864292145, -0.1205449104309082, 0.10343348234891891, -0.06751145422458649, -0.4431692361831665, -0.2518155574798584, -0.8300480842590332, -0.07652220875024796, 0.5773791074752808, 0.07844770699739456, -0.1706563830375...
does somebody know how can I embedd an exe file into a dll ? I have a tool which is an exe file that I call from c# code. The thing is that I want to have 1 dll containing this tool (exe file) and the dll containg my c# code. Is it possible to embedd this exe file within the resources? Thx in advance Sure it is. ...
[ 0.5422492027282715, 0.2511652410030365, 0.10761669278144836, 0.4178692698478699, 0.18380838632583618, -0.19000287353992462, 0.12614542245864868, 0.07667015492916107, -0.40286985039711, -0.48051050305366516, 0.0018542592879384756, 0.6053778529167175, -0.19849403202533722, 0.3017936646938324...
are using C#. 1. Add a resource file to you application (right click application in IDE and select "Add new item". 2. Use the toolbar in resource editor to add an existing file. 3. Then extract the exe whenever required by calling code something like: System.IO.File.WriteAllBytes (@"C:\MyEXE\", Resource1.MyEXE);
[ 0.20483291149139404, -0.08599136769771576, 0.6421079039573669, -0.0523323118686676, 0.32397133111953735, -0.08106870949268341, 0.03514394536614418, -0.23260603845119476, 0.06700756400823593, -0.7756048440933228, -0.4045456349849701, 0.47773972153663635, -0.35011982917785645, -0.02042223513...
At my previous employer we used a third party component which basically was just a DLL and a header file. That particular module handled printing in Win32. However, the company that made the component went bankcrupt so I couldn't report a bug I'd found. So I decided to fix the bug myself and launched the debugger. I w...
[ 0.4950823485851288, 0.3555232882499695, 0.19900581240653992, -0.039846792817115784, -0.20067456364631653, -0.24954384565353394, 0.09800434112548828, 0.10690342634916306, -0.12305404990911484, -0.4114527404308319, 0.08473024517297745, 0.6157408356666565, -0.5478641390800476, 0.1555244624614...
mov eax, 0x310fac09 ; rest of code here ``` At the first glance I just stepped over the routine which was called twice, then things just went bananas. After a while I realized that the bit twiddling result was always the same, i.e. the jmp eax always jumped right into the `mov eax, 0x310fac09` instruction. I di...
[ 0.20693399012088776, 0.39105233550071716, 0.22839950025081635, -0.31127506494522095, -0.3084224760532379, -0.0914674922823906, 0.45537495613098145, -0.04992556571960449, -0.15630432963371277, -0.26130911707878113, -0.03837254270911217, 0.6910075545310974, -0.47911033034324646, -0.200264424...
trick is to write a simple instruction emulator for an obscure microprocessor. The copy protection and some of the core functionality will then compiled for the microprocessor (GCC is a great help here) and linked into the program as a binary blob. The idea behind this is, that the copy protection does not exist in ...
[ 0.2503204047679901, 0.3641470968723297, 0.0013582210522145033, 0.382098913192749, 0.43206313252449036, -0.2873658239841461, 0.2868393361568451, 0.32581615447998047, 0.07474082708358765, -0.49799686670303345, -0.11167894303798676, 0.8045107126235962, -0.5299744009971619, -0.0348726287484169...
was so easy to emulate (it took just 500 lines of simple C-code). To make things even more obscure I didn't used the raw MIPS32 opcodes. Instead each opcode was xor'ed with it's own address. The binary of the copy protection looked like garbage-data. Highly recommended! It took more than 6 month before a crack came o...
[ 0.16267475485801697, 0.37574154138565063, -0.02691173367202282, 0.45709696412086487, 0.01174311712384224, -0.23005203902721405, 0.6045259833335876, 0.24580109119415283, -0.036547914147377014, -0.20197716355323792, 0.05261561647057533, 0.5157558917999268, 0.004372779745608568, 0.08703127503...
The platform isn't really as important as the theory. For the record, it is ASP.NET (C# on 3.5 SP1), SQL Server 2005. For the sake of argument, I have unlimited space (filesystem and database) and unlimited bandwidth. I am working on a project that would allow multiple users to upload their own images which could be m...
[ 0.4939860701560974, 0.18502888083457947, 0.3551740050315857, 0.2446502447128296, -0.21902969479560852, -0.27913206815719604, -0.14622539281845093, 0.21671992540359497, -0.6869732141494751, -0.5014954805374146, 0.22229984402656555, 0.4436397850513458, -0.19373777508735657, 0.159573644399642...
images. What I am seeing is that the user would upload the image. The server would create a unique name for the image, store it to the filesystem, and store the relational data about that image in the database (i.e. when it was uploaded, the association to the user, reference to a caption, etc.). Having these on disk ...
[ 0.5681447982788086, 0.03778723627328873, 0.5721325278282166, 0.3931490182876587, -0.24498265981674194, -0.19143284857273102, -0.4455961585044861, 0.17568831145763397, -0.4236501455307007, -0.7491961121559143, -0.05082537978887558, 0.5646785497665405, -0.2971690893173218, 0.2087845057249069...
help file access times? Any feedback would be appreciated! I think you already are on the right track as far as the recommended practice is concerned: Store data **about** the uploaded file in the database such as the filesystem location, filename, attributes, caption etc, but store the actual file in a designated fol...
[ 0.4778135120868683, 0.062004171311855316, 0.1242479681968689, 0.3004581332206726, 0.04600135609507561, -0.4164443612098694, 0.31175529956817627, 0.11564498394727707, -0.3720994293689728, -0.6331087350845337, -0.04422783851623535, 0.7837052941322327, 0.0014362441143020988, 0.020588776096701...
What would be the cleanest way of doing this that would work in both IE and Firefox? My string looks like this `sometext-20202` Now the `sometext` and the integer after the dash can be of varying length. Should I just use `substring` and index of or are there other ways? How I would do this: ``` // function you can...
[ 0.3907584846019745, -0.20763427019119263, 0.5054811239242554, -0.28145405650138855, 0.18646438419818878, -0.17650875449180603, 0.3364882469177246, -0.23748871684074402, -0.049206022173166275, -0.887756884098053, -0.2545843720436096, 0.5876986980438232, -0.33065447211265564, -0.031098380684...
I have made a web app where I am using a module which redirects without "www" urls (<http://example.com/>) to with "www" urls (<http://www.example.com/>). But as I am on shared hosting server, where I don't have permission to implement a HttpModule, then I tried the same module code with Global.asax file. That works! ...
[ 0.17845557630062103, 0.0872308537364006, 0.44209226965904236, -0.20568521320819855, -0.015593890100717545, -0.05673981085419655, 0.29566022753715515, -0.24110694229602814, -0.1746882051229477, -1.1417112350463867, -0.061654772609472275, 0.5296390056610107, -0.18414917588233948, 0.135330408...
there ay performance differences between both. Or any difference about which I need to worry about when using Global.asax file instead of HttpModule ?? Please explain! Global.asax inherits from HTTPApplication, and HTTPModules must implement the IHTTPInterface. The HTTPModules Init method gets the HTTPApplication o...
[ 0.039784081280231476, -0.24271826446056366, 0.2660873830318451, 0.23633995652198792, -0.24088701605796814, -0.12836815416812897, 0.19778534770011902, 0.09874535351991653, -0.08016625046730042, -0.8517909646034241, 0.08653276413679123, 0.37339460849761963, -0.2686334252357483, 0.10107141733...
A hobby project of mine is a Java web application. It's a simple web page with a form. The user fills out the form, submits, and is presented with some results. The data is coming over a JDBC Connection. When the user submits, I validate the input, build a "CREATE ALIAS" statement, a "SELECT" statement, and a "DROP AL...
[ 1.1042965650558472, 0.003276902250945568, 0.42465072870254517, 0.2825312912464142, 0.30441850423812866, -0.19657523930072784, -0.244966059923172, -0.09761609882116318, 0.12093108147382736, -0.04315707087516785, 0.23933562636375427, 0.7195912003517151, 0.17005252838134766, -0.10863897204399...
created with a unique name. I'm using an int to ensure this which gets incremented each and every time we go to the database. So, my data access class looks a bit like: ``` private final static Connection connection = // initialized however private static int uniqueInvocationNumber = 0; public static Whatever getDa...
[ 0.16235138475894928, 0.09887707233428955, 0.23724694550037384, 0.22358278930187225, 0.07086306810379028, -0.1646561622619629, 0.4043356776237488, -0.08350440114736557, -0.28114110231399536, -0.5348619222640991, 0.039149437099695206, 0.3524826169013977, -0.1679733842611313, 0.59663462638854...
problems.") - I've never written either threaded code or thread-aware code. I have absolutely no idea what can happen when many users are using the application at the same time. So my question is, (assuming I haven't stumbled to thread-safety by blind luck / J2EE magic): How can I make this safe? I've included infor...
[ 0.25998514890670776, 0.11930616945028305, -0.008528298698365688, 0.21104666590690613, 0.13052240014076233, -0.1986365020275116, 0.6246997117996216, 0.08643407374620438, -0.5180050134658813, -0.42897018790245056, 0.10566376149654388, 0.5317033529281616, -0.23445391654968262, -0.143948823213...
is DB2 on AS400 (i5, System i, iSeries, whatever IBM are calling it these days) and I'm using [jt400](http://jt400.sourceforge.net/). Although DB2 on AS400 is kind of like DB2 on any other platform, tables have a concept of a "member" because of legacy stuff. A member is kind of like a chunk of a table. The query I wa...
[ -0.29590490460395813, 0.08596200495958328, 0.21936942636966705, -0.17268089950084686, -0.1316184252500534, -0.13463786244392395, -0.06984489411115646, -0.21678027510643005, -0.06484492868185043, -0.4229371249675751, 0.01537318155169487, 0.29353824257850647, -0.4017467200756073, 0.093153208...
(I don't know why). The workaround I use is to do something like ``` CREATE ALIAS tempAlias FOR thisTable(thisMember) ``` then a ``` SELECT thisField FROM tempAlias ``` then a ``` DROP ALIAS tempAlias ``` which works but for one show-stopping issue: when you do this repeatedly with the ALIAS always called "t...
[ 0.2571991980075836, 0.12373725324869156, 0.1283528059720993, 0.16269034147262573, -0.017094872891902924, -0.31933721899986267, 0.0025828839279711246, 0.1445062756538391, -0.01341624092310667, -0.5054718852043152, 0.09262361377477646, 0.797389805316925, -0.33979639410972595, 0.1879429519176...
memory, but it's something like that). Hence the workaround of ensuring each ALIAS has a distinct name which clears this up. I've just realised (having spent the time to tap this explanation out) that I probably didn't spend enough time thinking about the issue in the first place before seizing on the workaround. Unf...
[ 0.35621118545532227, 0.18951699137687683, 0.25601422786712646, 0.28361043334007263, -0.1261545568704605, 0.07672847807407379, 0.5037837028503418, 0.08582611382007599, -0.2761089503765106, -0.6654741168022156, 0.2572135627269745, 0.49789994955062866, 0.2534836232662201, 0.2166433036327362, ...
thread will see the latest value at any particular point * The increment isn't atomic The simplest way to fix this in Java is to use [AtomicInteger](http://java.sun.com/javase/6/docs/api/java/util/concurrent/atomic/AtomicInteger.html): ``` private static final AtomicInteger uniqueInvocationNumber = new AtomicInteger(...
[ 0.042753130197525024, -0.03967421501874924, 0.41614678502082825, 0.17750051617622375, -0.24039657413959503, -0.1761741042137146, 0.3327677547931671, -0.11894340813159943, -0.4529694616794586, -0.5684190392494202, 0.07251593470573425, 0.22399155795574188, -0.4053072929382324, 0.504562199115...
is to use a connection pool, and "open/use/close" a connection where you need to (closing the connection in a finally block).
[ 0.036755677312612534, -0.30077600479125977, 0.11938915401697159, 0.19029925763607025, 0.40169790387153625, -0.3047915995121002, 0.01736326701939106, 0.0053728786297142506, -0.07320844382047653, -0.43827903270721436, -0.26529204845428467, 0.1211177259683609, -0.13064582645893097, 0.01632952...
I was wondering about how I should structured my projects. We have some projects that are (re)use in other projects. I mean, our data project and model project are use in one-to-many other projects. What I really what to know is how to structure this type of project, what the best way to name it ? In a standard 3-t...
[ 0.36983636021614075, -0.11634572595357895, 0.24898697435855865, 0.20250537991523743, 0.09162022173404694, 0.01027757115662098, -0.363398939371109, -0.012481280602514744, -0.45859262347221375, -0.46335405111312866, 0.0796518623828888, 0.20071406662464142, 0.013908937573432922, 0.28233206272...
and which one do you prefer and why ? Thx! For the data layer, I usually use: **Company.ProjectName.Data** (i.e. AdventureWorks.OrderManager.Data) For business layer I prefer something like "ObjectModel" (I have used "Business" or "BusinessLogic" but this is the area where data comes together in objects/classes so w...
[ -0.04609641805291176, -0.2268485277891159, 0.48338809609413147, 0.20255883038043976, -0.18212832510471344, -0.10575858503580093, -0.19326715171337128, -0.03729519620537758, -0.5198993682861328, -0.7989861965179443, -0.26847946643829346, 0.6305035352706909, 0.043997492641210556, -0.18799279...
I want to archive the text messages on my WM phone to my PC, preferably as XML. Can I access them from a PC application, e.g. through RAPI? I have no experience in WM development, just PC, and then mainly Delphi. Please no links to commercial application unless you think that's the only possible way. **Edit** No-o...
[ 0.6016174554824829, -0.0653272196650505, 0.481038361787796, -0.16003923118114471, 0.005986060481518507, 0.10085220634937286, 0.4619937241077423, 0.1285659372806549, -0.30680596828460693, -0.7727189064025879, 0.06375521421432495, 0.5495737791061401, -0.37216702103614807, -0.1794431060552597...
find the exported text files.
[ 0.07132209092378616, 0.35092127323150635, -0.2841138243675232, 0.1564306914806366, -0.0028133373707532883, -0.28019553422927856, 0.1443224400281906, 0.3745061457157135, 0.01212738174945116, -0.4160921573638916, -0.49479758739471436, 0.39923083782196045, -0.24271222949028015, 0.093316920101...
Lets say you had some resource clean up like: This is C#. ``` try{/*stuff*/} catch(Exception e) {/*rollback logs etc.*/} finally{ if( context.Transaction != null ) context.Transaction.Dispose(); context.Connection.Close(); context.Connection.Dispose(); } ``` Would it be more robust to do this instead? ``` try{...
[ 0.21311765909194946, -0.2004922330379486, 0.16459235548973083, -0.031811125576496124, -0.042351409792900085, -0.2641850709915161, 0.3987767696380615, -0.3566659390926361, -0.3429383933544159, -0.7671138048171997, -0.1521761417388916, 0.5215969085693359, -0.3544161319732666, 0.1092720627784...
(can have try ... finally without any catches). Only use catch if you can handle (or add value to) the exception. But better: ``` using (var resA = GetMeAResourceNeedingCleanUp()) using (var resB = new AnotherResourceNeedingCleanUpn(...)) { // Code that might throw goes in here. } ``` NB. Once an exception is win...
[ 0.20635727047920227, -0.2702716290950775, 0.01922924816608429, -0.09278866648674011, -0.08380088210105896, -0.34646448493003845, 0.46906399726867676, -0.4517742097377777, -0.27060049772262573, -0.6324588060379028, -0.234778493642807, 0.4267631769180298, -0.22094345092773438, 0.015397050417...
failure. Note, the "Framework Design Guidelines" (2nd ed) has this as (§9.4.1): > **AVOID** throwing an exception from within Dispose(bool) except under critical > situations where the containing process has been corrupted (leaks, inconsistent > shared state, etc.).
[ 0.5382012724876404, 0.22261609137058258, -0.27464282512664795, -0.3120385706424713, 0.21484562754631042, -0.5054476857185364, 0.8499969244003296, -0.22977909445762634, -0.12945783138275146, -0.671987771987915, -0.5167402029037476, 0.36587095260620117, -0.49010661244392395, 0.18681435286998...
I am working on a Drupal based site and notice there are a lot of seperate CSS and js files. Wading though some of the code I can also see quite a few cases where many queries are used too. What techniques have you tried to improve the performance of Drupal and what modules (if any) do you use to improve the performan...
[ 0.5873535871505737, -0.08896655589342117, 0.02079865150153637, 0.11021579802036285, -0.2602444887161255, -0.46014323830604553, 0.374525249004364, 0.20966099202632904, -0.29102030396461487, -0.7034372687339783, -0.022208165377378464, 0.47286179661750793, -0.12238138169050217, 0.317438334226...
you're writing your own code and doing any queries, consider writing your own discrete [caching for expensive functions](http://www.lullabot.com/articles/a_beginners_guide_to_caching_data). The linked article covers Drupal 5, not 6, but the only change in d6 is the elimiation of the serialization requirement and the fu...
[ 0.24119211733341217, -0.06480495631694794, 0.4142112731933594, 0.05762390047311783, -0.07379760593175888, -0.187788724899292, 0.29728230834007263, -0.1360333412885666, -0.30986225605010986, -0.7008228898048401, -0.49861639738082886, 0.5261823534965515, -0.1988793909549713, 0.09466686099767...
lucene/solr as your search indexer instead of drupal's built-in search indexer. It's nice for a built-in indexer but it's not designed for heavy loads (hundreds or thousands of new pieces of content an hour, say, with heavy faceted searching). The [apache solr](http://drupal.org/project/apachesolr) module can tie in wi...
[ -0.051229629665613174, -0.32700496912002563, 0.6398568153381348, -0.017001532018184662, -0.24791713058948517, -0.17352406680583954, -0.2706429660320282, 0.16440299153327942, -0.26505786180496216, -0.7597775459289551, -0.36341822147369385, 0.3243308961391449, 0.09357728064060211, 0.12594689...
the query, and run it through EXPLAIN in mysql or whatever query analysis tools you have. Tools like YSlow and Firebug can also help you spot slow stuff like massive image files, JS hosted on remote servers, and so on.
[ 0.33681339025497437, -0.21745984256267548, 0.1849568486213684, 0.594718873500824, -0.021080754697322845, -0.2940189242362976, 0.17951174080371857, 0.3205591142177582, 0.006702176295220852, -0.727889358997345, -0.2262645661830902, 0.36267611384391785, -0.2977883815765381, -0.029703846201300...
I am looking for podcast or videos on REST and RESTful. Ideally they should cover the basics & the more advanced topics It's short and very basic, but check out [Intro to REST](http://www.youtube.com/watch?v=YCcAE2SCQ6k) from the [GoogleDeveloper](http://www.youtube.com/user/GoogleDevelopers) channel. For podcasts, c...
[ 0.3291749358177185, 0.2927256226539612, 0.41161051392555237, 0.09257672727108002, 0.055840156972408295, -0.3987996578216553, 0.1727990359067917, -0.000571421638596803, -0.028295079246163368, -0.30664926767349243, -0.4803221523761749, 0.7137834429740906, 0.3754136264324188, -0.0552871711552...
on the [RestWiki](http://rest.blueoxen.net/cgi-bin/wiki.pl) and the [REST wikipedia article](http://en.wikipedia.org/wiki/Representational_State_Transfer) has lots of links to follow for more material. I recently stumbled upon the "[RESTful Web Services](http://www.youtube.com/view_play_list?p=F678FD2E7711FF9E)" video...
[ 0.6494898200035095, -0.35994118452072144, 0.2586943805217743, 0.2988298833370209, 0.22057630121707916, -0.6077243089675903, -0.027399569749832153, 0.3164680600166321, -0.42979347705841064, -0.5567538142204285, -0.17470818758010864, 0.562694251537323, 0.20232442021369934, 0.1231404915452003...
I am little confused with the applicability of `reinterpret_cast` vs `static_cast`. From what I have read the general rules are to use static cast when the types can be interpreted at compile time hence the word `static`. This is the cast the C++ compiler uses internally for implicit casts also. `reinterpret_cast`s ar...
[ 0.34390467405319214, 0.054200705140829086, -0.022685915231704712, -0.3011341094970703, -0.4521853029727936, -0.11770567297935486, 0.24517419934272766, 0.06253982335329056, 0.12667657434940338, -0.4719102084636688, 0.18459747731685638, 0.835874080657959, -0.5715698599815369, 0.1167016252875...
and the C code needs to hold on to the C++ object so basically it holds a `void*`. What cast should be used to convert between the `void *` and the Class type? I have seen usage of both `static_cast` and `reinterpret_cast`? Though from what I have been reading it appears `static` is better as the cast can happen at co...
[ 0.10545802116394043, 0.19086477160453796, 0.1089564710855484, -0.14149336516857147, -0.12534022331237793, 0.0368066169321537, -0.1185343787074089, -0.1594969928264618, 0.12366250902414322, -0.5010994076728821, -0.0017633886309340596, 0.6086905598640442, -0.3338398039340973, -0.080721467733...
to the same address: ``` int* a = new int(); void* b = static_cast<void*>(a); int* c = static_cast<int*>(b); ``` `reinterpret_cast` only guarantees that if you cast a pointer to a different type, *and then `reinterpret_cast` it back to the original type*, you get the original value. So in the following: ``` int* a ...
[ -0.010830667801201344, 0.11709459871053696, 0.11329173296689987, -0.2808268964290619, 0.16052231192588806, 0.08104979246854782, 0.30733171105384827, -0.31732743978500366, -0.06096746027469635, -0.4316651225090027, -0.1951640546321869, 0.5621919631958008, -0.3473040759563446, 0.057844895869...
casting to and from `void*`, `static_cast` should be preferred.
[ 0.29405078291893005, -0.11193685978651047, -0.11183477193117142, 0.04166091978549957, -0.11568605899810791, 0.18808254599571228, -0.05906934291124344, 0.11978697776794434, -0.1715644896030426, -0.23960080742835999, -0.44201624393463135, 0.5428236126899719, -0.2756030559539795, 0.2160408049...
I have an existing database I'm trying to put a cake app on top of. The old app used crypt() in Perl to hash the passwords. I need to do the same in the PHP app. Where is the correct place to make that change in a standard cakephp app? And what would such a change look like? I got it working... here is my AppControll...
[ 0.10908432304859161, -0.08915633708238602, 0.6814699172973633, 0.04422435164451599, -0.11036995053291321, 0.029743537306785583, 0.4134220778942108, -0.16783814132213593, -0.34137895703315735, -0.8273923993110657, -0.054144181311130524, 0.38385897874832153, -0.29798927903175354, 0.269137531...
be authorized by default $this->Auth->allow('display'); // tell cake to look on the user model itself for the password hashing function $this->Auth->authenticate = ClassRegistry::init('User'); // tell cake where our credentials are on the User entity $this->Auth->fields = array( ...
[ 0.3491121828556061, 0.047949012368917465, 0.6051793098449707, 0.0414503775537014, 0.23771898448467255, -0.48902708292007446, 0.40092015266418457, -0.42722785472869873, 0.054521866142749786, -0.6213330626487732, -0.46841907501220703, 0.5120043754577637, -0.04501519724726677, -0.021028494462...
); // this is where we want to go after a login... we'll want to make this dynamic at some point $this->Auth->loginRedirect = array('controller'=>'users', 'action'=>'index'); } } ``` Then here is the user: ``` <?php class User extends AppModel { var $name = 'User'; // this is used by the...
[ -0.3907757103443146, -0.03945586457848549, 0.721552848815918, -0.1443023830652237, 0.265473872423172, 0.21930420398712158, 0.2641420364379883, -0.2426529824733734, -0.06846601516008377, -0.5969502329826355, -0.29532599449157715, 0.6938458681106567, -0.5530078411102295, 0.062036193907260895...
$data['User']['pass'] = crypt($data['User']['pass'], substr($data['User']['user'], 0, 2)); return $data; } } ?> ``` Everything else is normal, i think. Here is a good resource: <http://teknoid.wordpress.com/2008/10/08/demystifying-auth-features-in-cakephp-12/>
[ -0.0009164785733446479, -0.14502771198749542, 0.24166807532310486, -0.07670515775680542, 0.059235040098428726, -0.03146558254957199, 0.4343656003475189, 0.0832873061299324, -0.07060333341360092, -0.5323500633239746, -0.41899412870407104, 0.6852555274963379, -0.21016636490821838, -0.1195919...
In which situations I should use LINQ to Objects? Obviously I can do everything without LINQ. So in which operations LINQ actually helps me to code **shorter** and/or **more readable**? *[This question triggered by this](https://stackoverflow.com/questions/573026/how-to-convert-this-code-to-linq)* I find LINQ to Obj...
[ 0.1765233725309372, 0.04904298484325409, 0.023515865206718445, 0.20000441372394562, -0.1899622082710266, -0.11880169063806534, 0.06552504003047943, -0.16743671894073486, -0.40507441759109497, -0.5823186635971069, -0.21352872252464294, 0.3630891740322113, -0.16259314119815826, -0.2509503662...
programming which basically involve transforming one collection (or stream of data) into another. In those cases the code using LINQ is almost always shorter and more readable. I'd like to point out that LINQ shouldn't be regarded as being synonymous with query expressions - if only a single operator is required, [the ...
[ 0.17807304859161377, -0.16693539917469025, 0.10011245310306549, 0.24254411458969116, -0.07149022817611694, -0.13654924929141998, 0.1803104132413864, 0.060700058937072754, -0.2924742102622986, -0.43204548954963684, -0.3678717315196991, 0.6681491732597351, -0.4011176526546478, -0.28318011760...
data layer), LINQ to Objects is applicable in every layer, and in all kinds of applications. Just as an example, here's a line in my MiniBench benchmarking framework, converting a `TestSuite` (which is basically a named collection of tests) into a `ResultSuite` (a named collection of results): ``` return new ResultSu...
[ 0.2887442409992218, -0.1790718287229538, 0.45551344752311707, 0.28420090675354004, -0.149805948138237, -0.14744971692562103, 0.13923773169517517, -0.5186201930046082, -0.04174484685063362, -0.5707749724388123, -0.23283003270626068, 0.4039175510406494, -0.06524612009525299, -0.1658743321895...
real "logic" instead of the details of iterating through loops and adding results to lists etc. Even when LINQ itself isn't applicable, some of the features which were largely included for the sake of LINQ (e.g. implicitly typed local variables, lambda expressions, extension methods) can be very useful.
[ -0.09511662274599075, -0.1916566640138626, 0.1541789174079895, 0.3982049822807312, -0.12587356567382812, -0.1720297932624817, 0.17552749812602997, -0.19719131290912628, -0.09152150899171829, -0.1932513266801834, -0.12782713770866394, 0.5259124040603638, -0.3853253722190857, -0.439358562231...
Is there a way to serialize a lexical closure in Python using the standard library? pickle and marshal appear not to work with lexical closures. I don't really care about the details of binary vs. string serialization, etc., it just has to work. For example: ``` def foo(bar, baz) : def closure(waldo) : ret...
[ 0.1555767059326172, 0.31959033012390137, -0.04403260722756386, 0.05622076615691185, -0.1778212934732437, -0.15631572902202606, 0.3658028841018677, 0.26436349749565125, -0.3846225142478943, -0.36752039194107056, 0.09303651005029678, 0.5325556993484497, -0.5824052691459656, 0.019950933754444...
to convert lexical closures into class objects and vice-versa. One could then convert to classes, serialize, unserialize, convert back to closures. Heck, given that Python is duck typed, if you overloaded the function call operator of the class to make it look like a function, you wouldn't even really need to convert i...
[ 0.144682377576828, -0.015118999406695366, -0.15621240437030792, -0.11117454618215561, -0.25534841418266296, 0.11785832792520523, 0.22530001401901245, 0.18284903466701508, -0.21368999779224396, -0.35782521963119507, -0.02748374454677105, 0.7580379247665405, -0.5554999113082886, -0.052811257...
def __init__(self, bar, baz): self.baz = baz def __call__(self,waldo): return self.baz * waldo ``` On the other hand, a hack which converted a closure into an instance of a new class created at runtime would not work, because of the way `pickle` deals with classes and instances. `pickle` doesn't s...
[ 0.04125010594725609, 0.08776417374610901, 0.026964731514453888, -0.21326856315135956, -0.19077663123607635, 0.026308933272957802, 0.39417946338653564, -0.2822958827018738, -0.19244208931922913, -0.40495869517326355, -0.04608849436044693, 0.5476148724555969, -0.541533887386322, 0.2188237756...
on-the-fly, you're out of luck.
[ 0.46312785148620605, 0.19595712423324585, -0.0346386581659317, 0.2894149124622345, 0.12354297190904617, -0.2265656441450119, -0.23787470161914825, 0.8388261795043945, -0.2591288089752197, -0.42204955220222473, 0.12766395509243011, 0.6485985517501831, 0.07006646692752838, -0.068294584751129...
I'm thinking of writing a domain specific language (DSL) to model business objects. The DSL will not be executed, instead it will be used by a template based code generator (probably CodeSmith) to generate the .NET & SQL. The DSL will need to support the definition of the following elements: * Classes (name & descrip...
[ 0.46378394961357117, -0.1001894474029541, 0.3708960711956024, 0.3869205117225647, -0.20876964926719666, -0.3785005211830139, 0.255336195230484, -0.3231050670146942, -0.11750615388154984, -0.4368359446525574, -0.15454015135765076, 0.22751915454864502, -0.29912346601486206, 0.298202037811279...
person covered by an insurance policy" Prop: FirstName, "First Name", String(20), not null Prop: LastName, "Last Name", String(20), not null Prop: MailAddress, "Mailing Address", Address, not null Prop: SSN, "Social Security Number", String(9), null Rule: RegEx, SSN, ^\d{9}$ Class: Address Prop: Line...
[ 0.5590678453445435, -0.2991871237754822, 0.9061555862426758, -0.07234509289264679, 0.3262990415096283, 0.20632806420326233, 0.04818262532353401, -0.2709539234638214, -0.1855802834033966, -0.30426302552223206, -0.22241495549678802, 0.43415403366088867, -0.3995356559753418, -0.11887659877538...
generated code off limits and add the more complex rules to subclasses. Has anyone written something similar to this? Can you provide any tips or links to similar solutions? It's fairly easy to automatically convert the structure you present into XML. From there, I imagine it's possible to write some sort of transfor...
[ 0.4200016260147095, -0.051188938319683075, 0.2829311192035675, 0.3258785903453827, -0.3002278208732605, -0.24514101445674896, -0.1723601371049881, -0.026496276259422302, -0.2261027842760086, -0.7014894485473633, -0.1714777946472168, 0.3443750739097595, -0.4147701561450958, -0.1135703995823...
I just built an updated version of SDL.dll, an open-source C DLL that my Delphi project uses, with the Express edition of Visual C++ 2005. I dropped it in the folder with my EXE and tried to run it, but it won't load: ``` The procedure entry point SDL_RWFromFP could not be located in the dynamic link library SDL.dll. ...
[ 0.09861698001623154, 0.23296789824962616, 0.290864497423172, -0.35921862721443176, -0.01228411216288805, -0.2447768598794937, 0.41340160369873047, 0.28630101680755615, -0.18171806633472443, -0.5259497165679932, 0.07955735921859741, 0.425881028175354, -0.6137574911117554, 0.1953101456165313...
beneath a preprocessor directive: ``` #ifdef HAVE_STDIO_H ``` IIRC, STDIO is the standard C I/O library. I assume this means that it's not available. Anyone know why that would be and how to fix it? Is this a Visual C++ issue or an SDL one? Most often in the Unix/Linux world, names like `HAVE_STDIO_H` indicate that ...
[ 0.5597307682037354, 0.2863994836807251, 0.10102148354053497, -0.2107836753129959, 0.24118000268936157, -0.47432926297187805, 0.011451836675405502, 0.02859119139611721, -0.029256872832775116, -0.4375121593475342, -0.5975419878959656, 0.5937162637710571, -0.28503233194351196, 0.2050561159849...
`config.h` file that it generates. The compilation would then discover that the platform has `<stdio.h>` and would compile the matching code (the stuff that is currently greyed out). Adapting to your Windows environment, somewhat less than 100% confidently since there could be some other significance to `HAVE_STDIO_H`...
[ 0.32369911670684814, -0.007322697900235653, 0.44301289319992065, -0.007631621323525906, -0.0024646029341965914, -0.2922168970108032, 0.06849555671215057, -0.24935469031333923, 0.09438920766115189, -0.9005549550056458, -0.22899265587329865, 0.6229300498962402, -0.33938542008399963, 0.042166...
you'd have `#define HAVE_STDIO_H 1` as mentioned above. --- Note: on Unix, you normally find a shell script called 'configure' which you run to create the config.h file. If you have Cygwin, there's an outside chance that you can use that script on Windows - I've just checked that an autoconfiscated package I created ...
[ 0.7194309234619141, 0.18701523542404175, 0.10934746265411377, -0.10992277413606644, 0.1496729701757431, -0.6403490304946899, 0.1821434497833252, 0.13608014583587646, 0.029230313375592232, -0.7881032824516296, -0.11916833370923996, 0.6913231611251831, -0.2915729284286499, 0.1080860644578933...
for the network functionality clearly aren't quite correct), and not in Cygwin per se. If I'd done the job properly, it would have worked. (Someone said "There is no portable code; there is only code that has been ported". That applies here.) You do need a good simulation of a Unix environment. MingW might also work.
[ 0.16950082778930664, -0.02176954783499241, 0.1553007811307907, 0.07764268666505814, -0.1419103443622589, -0.3857652246952057, 0.16845794022083282, 0.11593063175678253, -0.2707851231098175, -0.726439893245697, 0.16420847177505493, 0.9670082330703735, -0.10532711446285248, -0.072935678064823...
I've been working on a web app using Django, and I'm curious if there is a way to schedule a job to run periodically. Basically I just want to run through the database and make some calculations/updates on an automatic, regular basis, but I can't seem to find any documentation on doing this. Does anyone know how to ...
[ 0.8431317210197449, 0.5928049087524414, 0.05276580899953842, -0.03151561692357063, 0.22043031454086304, -0.1213996484875679, 0.04826928302645683, 0.1533363312482834, -0.5210854411125183, -0.35353854298591614, 0.17217648029327393, 0.7320955991744995, 0.054382648319005966, -0.062938347458839...
to do much config (preferably zero). I've considered triggering these actions "retroactively" by simply checking if a job should have been run since the last time a request was sent to the site, but I'm hoping for something a bit cleaner. One solution that I have employed is to do this: 1) Create a [custom management...
[ 0.4525544345378876, -0.01181416492909193, 0.3458549678325653, -0.15366990864276886, -0.020690158009529114, -0.36853745579719543, 0.017163574695587158, -0.15784472227096558, -0.4922336935997009, -0.44726482033729553, 0.0749346986413002, 0.7614587545394897, -0.21452584862709045, -0.053587388...
answers. In particular, with Celery it is nice to not have to spread your application logic out into crontab files. However the cron solution works quite nicely for a small to medium sized application and where you don't want a lot of external dependencies. EDIT: In later version of windows the `at` command is deprec...
[ 0.017890233546495438, 0.37727129459381104, 0.49403277039527893, 0.20389105379581451, -0.19739297032356262, 0.1601928323507309, 0.09832876175642014, -0.22556611895561218, -0.4064107835292816, -0.4172743260860443, -0.21173422038555145, 0.7230798602104187, -0.3518401086330414, 0.2705694735050...
Could you recommend a training path to start and become very good in Information Extraction. I started reading about it to do one of my hobby project and soon realized that I would have to be good at math (Algebra, Stats, Prob). I have read some of the introductory books on different math topics (and its so much fun). ...
[ 0.3133503794670105, -0.12516222894191742, 0.002874708501622081, 0.47663620114326477, -0.1189989447593689, -0.13208481669425964, 0.03950038179755211, 0.29339051246643066, -0.010379747487604618, -0.6863879561424255, 0.345878928899765, 0.5128203630447388, 0.2808533012866974, -0.33903118968009...
project, [Natural language processing](http://en.wikipedia.org/wiki/Natural_language_processing), and [Computational linguistics](http://en.wikipedia.org/wiki/Computational_linguistics) can both come in handy -they provide tools to measure, and extract features from the textual information, and apply training, scoring,...
[ 0.2660227119922638, -0.07989703863859177, -0.2661289572715759, 0.4014832079410553, 0.11576322466135025, 0.05896899849176407, 0.09421170502901077, -0.3443870544433594, -0.1086336299777031, -0.4026890695095062, -0.14045511186122894, 0.4201285243034363, 0.3036985993385315, -0.2593031823635101...
feedback. The other big hammer in IE is search, a field not to be underestimated. Again, OReilly's book provides some introduction in basic ranking; once you have a large corpus of indexed text, you can do some really IE tasks with it. Check out [Peter Norvig: Theorizing from data](http://www.youtube.com/watch?v=nU8Dc...
[ 0.12877248227596283, -0.01419022586196661, 0.28208690881729126, 0.1968568116426468, -0.5896052122116089, -0.20372334122657776, 0.33373966813087463, 0.0014139902777969837, -0.014862600713968277, -0.6642054915428162, 0.0854678675532341, 0.9256001710891724, 0.14455823600292206, -0.10901930183...
for IE tasks are usually growing exponentially -in development, and research time. It's also quite underdocumented -most of the high-quality info is currently in obscure white papers ([Google Scholar](http://scholar.google.com) is your friend) -do check them out once you've got your hand burned a couple of times. But m...
[ 0.18679581582546234, 0.146621972322464, 0.14129561185836792, 0.16935230791568756, 0.19547942280769348, -0.5275201201438904, 0.2937428653240204, 0.13494466245174408, -0.030465200543403625, -0.9927075505256653, -0.16840536892414093, 0.43588918447494507, 0.3121039867401123, -0.256286203861236...
In C#, if you have two base interfaces with the same method (say, F()) you can use explicit implementation to perform different impl. for F(). This alloes you to differently treat the object, corresponding to the current point of view: as IMyInterface1 or IMyInterface2. Is this possible in Java? No, there's nothing lik...
[ 0.18344849348068237, 0.16134481132030487, 0.06302265077829361, -0.22324153780937195, -0.4355173408985138, -0.11690086126327515, 0.18337160348892212, -0.2681010365486145, 0.1796659231185913, -0.44161611795425415, 0.12661799788475037, 0.7100027203559875, -0.7001241445541382, -0.3043768405914...
@Override public String getBar() { return "hi"; } } ``` C# wouldn't allow that (prior to C# 9, which [now supports covariant return types](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-9.0/covariant-returns)) - and one of the ways around it is typically to imp...
[ 0.06063488870859146, 0.0021430791821330786, 0.47878527641296387, -0.061410997062921524, -0.22454240918159485, -0.33630862832069397, 0.4138038158416748, -0.23933416604995728, 0.296759694814682, -0.1755194365978241, -0.2086360901594162, 0.5349041223526001, -0.6789401769638062, 0.068541221320...
I have an iPhone game ([Combination](http://www.itunes.com/app/Combination)), and in the next version I would like to set up a server, where users (via the app) can submit which levels they have completed, and see how other users are doing. At this point I don't intend that users will need usernames and passwords, just...
[ 0.3792419731616974, 0.2374066710472107, 0.16871601343154907, 0.18331801891326904, 0.48103296756744385, 0.16595135629177094, 0.09170522540807724, 0.06595166027545929, -0.17746324837207794, -0.5439706444740295, 0.24740919470787048, 0.3634318709373474, -0.03022848628461361, -0.227465614676475...
at [Onyx Online](http://onyx.demiforce.com/) or [OpenFeint](http://www.openfeint.com)? Onxy Online is from the makers of Trism, and they say, "the XBox Live Arcade ecosystem brought to the iPhone". I wrote this kind of system into Trism as a case study, and it's been a complete success. Since Trism launched in July, w...
[ 0.8799136877059937, 0.1614457219839096, 0.2068684846162796, 0.2759236991405487, -0.1422872543334961, 0.0775395855307579, -0.4875609278678894, 0.33800867199897766, 0.07144124060869217, -0.09940605610609055, -0.08963645249605179, 0.4180437922477722, 0.035627711564302444, -0.10002221167087555...
Aurora Feint. From the press release: "OpenFeint allows any iPhone game to add player profiles, buddy lists, walls, newsfeeds and real-time chat rooms allowing the game to build a real community around itself with ZERO operations overhead and minimal development time. OpenFeint consists of a server and a client. The O...
[ -0.03505043685436249, -0.07130255550146103, 0.6323533058166504, 0.13228105008602142, -0.08605711162090302, 0.05940864980220795, -0.028153052553534508, -0.1725134551525116, 0.03828771039843559, -0.21571147441864014, -0.2597138285636902, 0.10870900005102158, -0.08824222534894943, -0.04199862...
game developers will have the ability to reduce over 2 months of development work to 1 day, and completely eliminate back-end server operations, while offering their players an extensive set of customizable social and community building features: * Profiles: Players can upload an avatar photo or take one with their iP...
[ 0.27332621812820435, -0.06477681547403336, 0.1604211926460266, 0.21892663836479187, 0.21463875472545624, 0.08915568888187408, 0.36795151233673096, 0.053054336458444595, -0.2727552056312561, -0.5614408850669861, -0.3479461073875427, 0.3155333697795868, 0.10445526242256165, -0.13049469888210...
community * Newsfeeds: Players can keep in touch with all of their friends’ activities (wall comments, actions in games, befriending people) * Global Community Chat Rooms for players to discuss recommendations, tips, and reviews of other games on the iPhone"
[ 0.32306089997291565, 0.11805887520313263, 0.1727861911058426, 0.142391175031662, 0.358134388923645, -0.06204856187105179, 0.2580612897872925, 0.4014872908592224, -0.2125541716814041, -0.3781668245792389, -0.30362391471862793, 0.2977086007595062, 0.11005815863609314, -0.1731736809015274, ...
I've run into a weird quirk. The website I'm building for [Escondido Arts Gallery](http://www.escondidoarts.org) has all of it's text in each element left-aligned in firefox and IE, but for some reason everything is center aligned in Safari. Is there one simple css or html fix I can do to fix this, or am I going to hav...
[ 0.5996757745742798, 0.20523212850093842, 0.6000468730926514, 0.17727740108966827, 0.246567040681839, -0.47467419505119324, -0.05584815889596939, -0.034850604832172394, -0.0014703951310366392, -0.49052003026008606, 0.3321491479873657, 0.2943301200866699, -0.1897888481616974, 0.0654275640845...