text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
Is there a way to keep the cusror location off-screen in Vim / gVim while scrolling? Similar to many Windows editors. I know about marks, and do use them. I also know the '.' mark (last edit location), But looking for other ideas. I'm asking this because sometimes i want to keep the cursor at some location, scroll t...
[ 0.010710623115301132, 0.006736349780112505, 0.9130066633224487, 0.17701341211795807, -0.21007227897644043, 0.05637110397219658, -0.16395021975040436, 0.23365518450737, -0.3845156729221344, -0.518752932548523, 0.1713031828403473, 0.5149053931236267, -0.07204145938158035, 0.18249349296092987...
just be confusing) An alternative solution, to paraphrase posts from [this thread from comp.editors](http://groups.google.com/group/comp.editors/browse_thread/thread/2ed904497fe930fa): `Ctrl+o` goes to the previous cursor location, `Ctrl+i` goes to the next (like undo/redo for motions) Marks seem like the other solu...
[ -0.3106168508529663, -0.05581837147474289, 0.7813757658004761, 0.013891185633838177, -0.07478313148021698, 0.0387229286134243, 0.2478427290916443, -0.11700665205717087, -0.38132795691490173, -0.6406369209289551, -0.511568009853363, -0.01243833638727665, -0.31421953439712524, 0.300929844379...
to jump back. Another option which Paul suggested, > `gi` command switches Vim to Insert mode and places cursor in the same position as where Insert mode was stopped last time.
[ -0.11076227575540543, -0.3505209982395172, 0.3685414791107178, 0.18737971782684326, -0.29797640442848206, -0.12023400515317917, 0.1622762531042099, -0.3022456467151642, -0.1880522072315216, -0.3464809060096741, -0.05857909098267555, 0.885723352432251, -0.38810792565345764, -0.1660845279693...
My question is best illustrated with an example. Suppose I have the enum: ``` public enum ArrowDirection { North, South, East, West } ``` I want to associate the unit vector corresponding to each direction with that direction. For example I want something that will return (0, 1) for North, (-1, 0) f...
[ -0.123641736805439, 0.06029919907450676, 0.5043982267379761, 0.017672007903456688, 0.008258745074272156, 0.4144967198371887, -0.13584831357002258, -0.30502521991729736, -0.1157243624329567, -0.548017680644989, -0.0578276552259922, 0.17947916686534882, -0.3413606286048889, 0.090920202434062...
the passed in ArrowDirection (the method uses a HashTable to accomplish the lookup but that's not really important). This seems... unclean. Question: **Is there a best-practice solution for storing additional information corresponding to an enum in .NET?** There's a FANTASTIC new way to do this in C# 3.0. The key i...
[ -0.1649474948644638, -0.2062338888645172, 0.6119137406349182, 0.21043594181537628, -0.3426203727722168, 0.09381140768527985, 0.1238960325717926, -0.36861154437065125, 0.044002898037433624, -0.6377606987953186, -0.030008956789970398, 0.05817931890487671, -0.32770928740501404, 0.197176203131...
// Replace this with a dictionary or whatever you want ... you get the idea switch(self) { case ArrowDirection.North: return new UnitVector(0, 1); case ArrowDirection.South:
[ -0.21557369828224182, -0.10364051908254623, 0.45107632875442505, 0.14377380907535553, 0.08484964817762375, 0.35601258277893066, 0.20580728352069855, -0.1589599996805191, 0.008932827971875668, -0.6608618497848511, -0.30280250310897827, 0.3284148573875427, -0.09709645062685013, -0.0286720898...
return new UnitVector(0, -1); case ArrowDirection.East: return new UnitVector(1, 0); case ArrowDirection.West: return new UnitVector(-1, 0); default:
[ -0.6987006068229675, -0.3345949351787567, 0.45758509635925293, -0.09720340371131897, -0.07363972812891006, 0.3290864825248718, 0.17247840762138367, -0.422074556350708, -0.005599305499345064, -0.6033456921577454, -0.6374418139457703, 0.4875867962837219, -0.09377611428499222, 0.0822068676352...
return null; } } } ``` Now, you can do this: ``` var unitVector = ArrowDirection.North.UnitVector(); ``` Sweet! I only found this out about a month ago, but it is a very nice consequence of the new C# 3.0 features. [Here's another example on my blog.](http://charlieflowers.wordpress.com/2009/04/01/...
[ 0.18186582624912262, -0.30640825629234314, 0.6219971776008606, -0.1612042784690857, -0.02580435946583748, -0.11713134497404099, 0.25650250911712646, 0.19044598937034607, -0.4491625130176544, -0.1932668387889862, -0.06014631688594818, 0.3523455262184143, -0.25996536016464233, 0.066109426319...
I was looking at a library a person has made for FaceBook in C++. The header file is this: ``` #ifndef __FACEBOOK_H__ #define __FACEBOOK_H__ /** * Facebook Class * Joel Seligstein * Last mod: Aug 22, 2006 * * This is the beginnings of a facebook class set and REST client. Its not documented * yet nor nearly c...
[ 0.00932389684021473, 0.010365244932472706, 0.2203778326511383, 0.06451970338821411, -0.422850102186203, -0.4019339978694916, 0.14817896485328674, 0.15576936304569244, -0.07360237836837769, -0.680239737033844, 0.035289064049720764, 0.22600533068180084, -0.15970316529273987, -0.1160557419061...
which platform you're compiling for #define fb_windows 1 //#define fb_linux 1 #include <string> #include <sstream> #include <list> using namespace std; #ifdef fb_windows #include <windows.h> #endif #include "curl/curl.h" #include "xmlParser/xmlParser.h" #include "md5.h" class facebook { public: //app/se...
[ 0.3018536865711212, -0.06722644716501236, 0.25450173020362854, -0.17926163971424103, -0.22689604759216309, 0.07227396965026855, 0.2023291289806366, -0.027407413348555565, -0.5071894526481628, -0.6160334944725037, -0.28243812918663025, 0.5181887745857239, -0.4210844039916992, -0.09782251715...
bool has_session; facebook( string my_key, string my_secret, string my_server ); bool authenticate( ); bool request( string method, list<string> params, string *res ); bool load_token( ); void launch_login( string url ); bool get_session( ); void clean_up( ); ...
[ 0.38235926628112793, -0.07462553679943085, 0.647350549697876, -0.2806887626647949, -0.02094775065779686, -0.422770619392395, 0.41329050064086914, -0.10977515578269958, -0.3085440993309021, -0.3932444751262665, -0.6778949499130249, 0.3850993514060974, -0.241712287068367, 0.2389165312051773,...
info CURL *curl; CURLcode res; int call_id; //internal functions string get_signature( list<string> params ); static string md5( string str ); static string get_param_string( list<string> params, bool separate ); static size_t write_callback( void *ptr, s...
[ 0.0654766708612442, -0.18696439266204834, 0.8416464924812317, -0.07522285729646683, 0.21050725877285004, 0.10274675488471985, -0.03079206682741642, -0.3842826783657074, -0.34272584319114685, -0.34947600960731506, -0.5054903626441956, 0.349712073802948, -0.4731527268886566, 0.08440816402435...
file, my question is regarding this, the below is the constructor: ``` facebook::facebook( string my_key, string my_secret, string my_server ) { this->api_key = my_key; this->secret = my_secret; this->server = my_server; this->has_session = false; this->call_id = 0; } ``` Why have they used the `...
[ 0.13578066229820251, 0.22923682630062103, 0.21381370723247528, -0.007727193646132946, 0.17688587307929993, -0.08395286649465561, 0.14154905080795288, -0.03482217341661453, -0.24947750568389893, -0.497077614068985, -0.16253283619880676, 0.5234731435775757, -0.23731198906898499, 0.2246989458...
this.secret = my_secret; this.server = my_server; this.has_session = false; this.call_id = 0; } ``` All I want to know is the theory behind why `->` is used over the dot notation. --- **UPDATE: For anyone else in the same boat as me and learning C++. I have expanded on an example posted by a member in t...
[ 0.2570573389530182, 0.12051466107368469, 0.41548460721969604, -0.2511102259159088, 0.08685094118118286, -0.01949271187186241, 0.49677976965904236, -0.0860108733177185, -0.36801040172576904, -0.6711640357971191, -0.20099800825119019, 0.4815215766429901, -0.30680572986602783, 0.0089317886158...
void setX(int xx) {x += xx;} }; int main() { A a; a.setX(13); A *pa = &a; pa->setX(2); A b = a; b.setX(5); cout << "a" << a.getX() << endl; cout << "a*" << pa->getX() << endl; cout << "b" << b.getX() << endl; return 0; } ``` `this` is a *pointer* to the current object ...
[ 0.19311605393886566, -0.28760942816734314, 0.2838583290576935, -0.3309560716152191, 0.19203707575798035, 0.01891643926501274, 0.35666000843048096, -0.27995267510414124, -0.14747263491153717, -0.27560198307037354, -0.4763803780078888, 0.3749690651893616, -0.6392596364021301, 0.0429966636002...
as `const`, `this` is of type `A const *`.) Hence the use of `->` (designed only for pointers) and not `.` (designed only for class objects `A` or references to class objects `A&`).
[ -0.3263895809650421, 0.05937746539711952, 0.23454034328460693, 0.05581176280975342, -0.13997375965118408, -0.08379284292459488, 0.17890338599681854, 0.09407578408718109, 0.09856585413217545, -0.26985567808151245, -0.462956964969635, 0.3706880509853363, -0.5131095051765442, 0.13312473893165...
Currently I'm registering every user control separately in Web.config ``` <pages validateRequest="false"> <controls> <add tagPrefix="cc1" src="~/Controls/MyUserControl1.ascx" tagName="MyUserControl1"/> ... <add tagPrefix="cc1" src="~/Controls/MyUserControlN.ascx" tagName="MyUserControlN"/> </contro...
[ 0.20889568328857422, 0.33336368203163147, 0.7642775774002075, 0.1663847416639328, -0.15215347707271576, -0.33566445112228394, 0.1797546148300171, -0.24633511900901794, -0.5302315950393677, -0.47286877036094666, 0.04430237412452698, 0.27927443385124207, -0.2543281018733978, 0.33934712409973...
you'll run into problems if you want to use any of your usercontrols within other usercontrols. So, if you're never going to nest usercontrols, you're good to go. BUT if you want the flexibility to nest usercontrols you've got a few options: 1. Register them all in the web.config, and then, in the case of nesting, re...
[ 0.25569483637809753, -0.163395494222641, 0.011943372897803783, 0.36673179268836975, 0.08989454060792923, -0.016163930296897888, 0.2238951325416565, -0.32791292667388916, -0.2069125473499298, -0.7247071266174316, 0.015448122285306454, 0.19741539657115936, -0.524876058101654, -0.051662951707...
the web.config by placing your controls in sub folders...not a great option. 4. Another option is to strongly type your usercontrols, perhaps by creating base classes for your usercontrols. Basically it's not a bug in the framework but a result of compiling everything into a single assembly. The app essentially can't ...
[ 0.052717551589012146, -0.12645676732063293, 0.5623173117637634, 0.4812048375606537, -0.06716617941856384, -0.23828892409801483, 0.2848414182662964, -0.3221598267555237, -0.36646875739097595, -0.5499576330184937, 0.09491809457540512, 0.52824866771698, -0.463288813829422, -0.2659494876861572...
I need a way to transfer a bunch of information (1-10kb) from an email in the Mail application to my iPhone app. I was thinking I could craft a custom URL in the body of the email that, when clicked, would transfer the information through a custom URL handler to my app. However, it's a lot of data. Can I pass that mu...
[ 0.49659568071365356, -0.10887788981199265, 0.43653973937034607, 0.3602365553379059, 0.09641971439123154, 0.20522652566432953, 0.045950353145599365, 0.034098170697689056, -0.32110893726348877, -0.7519489526748657, 0.14771690964698792, 0.19112062454223633, -0.11060319095849991, 0.11515272408...
very long [data-urls](http://en.wikipedia.org/wiki/Data_URI_scheme) in Safari, which let you store image or other file data in the url itself. If the limits are similar, then you are in luck.
[ 0.3116399049758911, -0.2120266854763031, 0.2299066036939621, 0.12095864862203598, -0.014419333077967167, -0.5557665228843689, 0.08015541732311249, 0.31756114959716797, -0.6563183665275574, -0.32871267199516296, -0.23047244548797607, 0.11240015178918839, 0.14829422533512115, 0.0178195182234...
Why might quick sort be better than merge sort ? See [Quicksort on wikipedia](http://en.wikipedia.org/wiki/Quicksort): > Typically, quicksort is significantly > faster in practice than other Θ(nlogn) > algorithms, because its inner loop can > be efficiently implemented on most > architectures, and in most real-wor...
[ -0.31450337171554565, -0.5828008651733398, -0.08721335977315903, 0.21088415384292603, -0.18223769962787628, -0.05239183455705643, -0.03353195637464523, -0.07124362885951996, -0.20971930027008057, -1.2821253538131714, -0.21650293469429016, 0.24298325181007385, -0.3502313792705536, -0.345797...
In what situations in java is explicit nulling useful. Does it in any way assist the garbage collector by making objects unreachable or something? Is it considered to be a good practice? In Java it *can* help if you've got a very long-running method, and the only reference to the an object is via a local variable. Sett...
[ -0.11977554857730865, -0.12168487161397934, -0.0679142102599144, -0.1049511581659317, -0.24870923161506653, -0.47721225023269653, 0.46569162607192993, 0.10429348051548004, -0.37128114700317383, -0.5578826665878296, -0.23478856682777405, 0.40559786558151245, -0.3585052192211151, -0.18352574...
use" into account. That optimization may make it to Java some time - I don't know.) Likewise if you've got a member field referring to an object and you no longer need it, you could potentially aid GC by setting the field to null. In my experience, however, it's rarely *actually* useful to do either of these things, ...
[ 0.48596903681755066, 0.015549125149846077, -0.08556108921766281, 0.059714410454034805, -0.18647074699401855, -0.3515058755874634, 0.3688734769821167, -0.11974243819713593, -0.37974026799201965, -0.25971704721450806, -0.024148425087332726, 0.4834115505218506, -0.2798382341861725, 0.09611418...
need to, and if you *do* need to you should see whether refactoring could improve your design in the first place. (It's possible that your method or type is doing too much.) Note that setting the variable to null is entirely passive - it doesn't inform the garbage collector that the object can be collected, it just a...
[ 0.7129462361335754, -0.08173207193613052, -0.06057829409837723, 0.09772435575723648, -0.08820582926273346, -0.4957643747329712, 0.4551425278186798, -0.08975809067487717, 0.002490424318239093, -0.41626566648483276, -0.021895412355661392, 0.7210516333580017, -0.5668107271194458, -0.032817464...
In Internet Explorer 7 some properties (mouse coordinates) are treated as physical while others are logical (offset). This essentially required Web developers to be aware of or calculate the zoom state. In IE8 release all properties are logical. You can get it using: ``` var b = document.body.getBoundingClientRect();...
[ -0.058934152126312256, 0.007435477338731289, 0.9260026216506958, -0.011963983997702599, 0.20144732296466827, -0.46975019574165344, 0.43022459745407104, 0.193044513463974, -0.128522589802742, -0.86607426404953, -0.4560108482837677, 0.906616747379303, -0.26233741641044617, -0.346338003873825...
I have an application that works without any problem in a spanish server. When i uploaded the application into the online server (an english windows), im getting exceptions (of type "input string is not a valid Datetime/Int32") with Convert.ToDateTime and Convert.ToInt32. Are any web.config line that could help me in ...
[ 0.09884299337863922, -0.004976107273250818, 0.7682589888572693, 0.12867045402526855, -0.001324107521213591, 0.03840024396777153, 0.00471136812120676, 0.22197194397449493, -0.046632394194602966, -0.7024722099304199, 0.06321367621421814, 0.31663158535957336, -0.02428705058991909, 0.119867175...
I'm a bit confused as to how to get two method to call each other (i.e., have `A()` call `B()` and `B()` call `A()`). It seems that F# only 'sees' the method after it's been encountered in code, so if it hasn't, it just says *value or constructor has not been defined*. Am I missing something very basic here? 'let rec....
[ -0.28163275122642517, 0.057838957756757736, 0.17942513525485992, -0.09481768310070038, -0.00700641144067049, -0.22312524914741516, 0.3624412417411804, -0.15107446908950806, -0.3003278076648712, -0.4255955219268799, -0.3557910919189453, 0.8054391741752625, -0.3506556749343872, -0.1546733528...
Here's the scenario: I want define a base class that allocate some buffer once for all derived classes, while the size of the buffer varies among different derived classes. I could achieve it in this way: ``` class base { public: base():size(), p_array(0){} private: size_t size; boost::shared_array<unsi...
[ 0.17468670010566711, -0.33168214559555054, 0.11878038942813873, -0.06361877173185349, 0.044878941029310226, 0.13325271010398865, -0.10437915474176407, -0.48764920234680176, -0.035626817494630814, -0.5078282952308655, 0.09281056374311447, 0.41284146904945374, -0.1890617161989212, 0.06879233...
class, I really want to put this line: ``` p_array.reset(new unsigned char[size]); ``` to somewhere in the base class, thus writing it only once. Is there any C++ design pattern could achive it? Thanks. sorry but why do you have 2 arrays (and 2 sizes)? Now if you create a derived class you have a 2 times a p\_array...
[ 0.07675886899232864, -0.24489544332027435, 0.16346204280853271, -0.04353765770792961, 0.11460022628307343, 0.20548701286315918, 0.2423388510942459, -0.1732766479253769, -0.2728685140609741, -0.7210502624511719, 0.06615000218153, 0.5700624585151672, -0.5548355579376221, 0.23616784811019897,...
} private: size_t size; boost::shared_ptr<unsigned char> p_array; }; class derived { public: derived(size_t array_size):base(array_size) { } private: }; ```
[ 0.01054411381483078, -0.4367758333683014, 0.07314717769622803, -0.02064184844493866, 0.03277308866381645, 0.018785633146762848, -0.025473978370428085, -0.3738979995250702, -0.05480707436800003, -0.2603399157524109, -0.272019624710083, 0.5968085527420044, -0.1743478924036026, 0.209129542112...
Could anyone explain to me the differences between multi-CPU, multi-core, and hyper-thread? I am always confused about these differences, and about the pros/cons of each architecture in different scenarios. Here is my current understanding after learning online and learning from others' comments. 1. I think hyper-thr...
[ 0.22103604674339294, 0.08564651012420654, 0.09600698202848434, 0.3777173161506653, 0.019484709948301315, 0.30690616369247437, 0.08072306215763092, 0.25074338912963867, -0.3365534842014313, -0.8610178232192993, 0.22144216299057007, 0.43117988109588623, -0.3441449999809265, 0.093008384108543...
consumption than with multi-core; 3. multi-core integrates all the CPUs on a single chip, so the latency of communication between different CPUs are greatly reduced compared with multi-processor. Since it uses one single chip to contain all CPUs, it consumer less power and is less expensive than a multi processor syste...
[ 0.13726364076137543, -0.10230500996112823, 0.08989373594522476, 0.2727094292640686, -0.05520051345229149, 0.1911141574382782, -0.07999143749475479, -0.1358889788389206, -0.5146799683570862, -0.8578543663024902, 0.01810556836426258, 0.680289089679718, -0.4673111140727997, -0.247346475720405...
was hyper-threading. One chip on the mainboard but it had some parts twice internally so it could execute two instructions at the same time. The current development is multi-core. It's basically the original idea (several complete CPUs) but in a single chip. The advantage: Chip designers can easily put the additional ...
[ -0.05065733939409256, -0.2380840927362442, 0.5675630569458008, 0.32790568470954895, -0.05284431576728821, 0.2501077950000763, -0.044155750423669815, 0.12045242637395859, -0.6814409494400024, -0.3440256416797638, -0.17933712899684906, 0.2919650673866272, -0.23225577175617218, 0.152194723486...
each has its own RAM. [EDIT] You got that pretty much right. Just a few minor points: * Hyper-threading keeps track of two contexts at once in a single core, exposing more parallelism to the out-of-order CPU core. This keeps the execution units fed with work, even when one thread is stalled on a cache miss, branch mi...
[ 0.12688350677490234, 0.10517298430204391, 0.12864552438259125, 0.17700113356113434, -0.06533482670783997, 0.3553449213504791, 0.22364270687103271, -0.23213765025138855, -0.6323958039283752, -0.48780131340026855, -0.01980503648519516, 0.373136967420578, -0.307404100894928, 0.070873096585273...
wording of this paragraph. * The main problem with multi-CPU is that code running on them will eventually access the RAM. There are N CPUs but only one bus to access the RAM. So you must have some hardware which makes sure that a) each CPU gets a fair amount of RAM access, b) that accesses to the same part of the RAM d...
[ 0.2539178431034088, 0.28202933073043823, 0.22716571390628815, 0.22805973887443542, -0.008238044567406178, 0.03541247546672821, 0.4693271517753601, 0.007207515649497509, -0.5783097743988037, -0.6723970174789429, -0.12042004615068436, 0.4777531325817108, -0.3456125259399414, 0.30170866847038...
the cached value, oblivious to the fact that it is outdated Just imagine you have tasks in a list and you want to spread them to all available CPUs. So CPU 1 will fetch the first element from the list and update the pointers. CPU 2 will do the same. For efficiency reasons, both CPUs will not only copy the few bytes in...
[ -0.08815173804759979, 0.11014072597026825, 0.3309769928455353, -0.0010574222542345524, -0.11095687747001648, 0.1435878872871399, 0.05982261896133423, -0.08074445277452469, -0.4024527370929718, -0.9730258584022522, -0.09158224612474442, 0.4130461812019348, -0.4149097204208374, 0.02424747496...
will then fetch the next item from the list. Without cache sync, it won't have noticed that CPU 2 has changed the list, too, and it will start to work on the same item as CPU 2. This is what effectively makes multi-CPU so complicated. Side effects of this can lead to a performance which is worse than what you'd get if...
[ 0.018009288236498833, -0.46259835362434387, 0.3557813763618469, 0.3724052906036377, -0.2742822468280792, 0.08721914887428284, 0.14632421731948853, -0.4137782156467438, -0.3878260552883148, -0.5064668655395508, 0.0962553322315216, 0.4208429753780365, -0.46789148449897766, -0.088509917259216...
of a cache line without having to flush and reload it), etc. Or the cache logic could make sure that all CPUs get the same cache line when they access the same part of real RAM, simply blocking CPU 2 for a few nanoseconds until CPU 1 has made its changes. [EDIT2] The main reason why multi-core is simpler than multi-cp...
[ 0.15552547574043274, -0.019509900361299515, 0.45568957924842834, 0.21804006397724152, 0.010440330021083355, -0.11345412582159042, 0.5346747040748596, -0.2410014420747757, -0.5075982213020325, -0.5799744129180908, 0.08409878611564636, 0.34505048394203186, -0.377467542886734, -0.112202301621...
And don't forget that, on a multi-layer mainboard, signals start to influence each other (crosstalk). We like to think that 0 is 0V and 1 is 5V but in reality, "0" is something between -0.5V (overdrive when dropping a line from 1->0) and .5V and "1" is anything above 0.8V. If you have everything inside of a single chi...
[ 0.2727685868740082, -0.0286401454359293, 0.22856387495994568, 0.18019533157348633, -0.1740698665380478, -0.2066374570131302, -0.0016813992988318205, -0.09608935564756393, -0.19169864058494568, -0.514130175113678, -0.006317384075373411, 0.5251849293708801, 0.09541963040828705, -0.0528990887...
I have a question not necessarily specific to any platform or API but more specific to interactions in code between animations. A game is a good example. Let's say the player dies, and there's a death animation that must finish before the object is removed. This is typical for many cases where some animation has to fi...
[ 0.38534560799598694, 0.13152119517326355, -0.07069533318281174, 0.5006745457649231, -0.026002531871199608, 0.10911927372217178, -0.1628059446811676, 0.09658991545438766, -0.29319605231285095, -0.656849205493927, 0.1816997081041336, 0.1692444533109665, -0.044174958020448685, 0.3793844282627...
implement custom behavior? The problem that typically arise, is that the game logic and animation data become codependent. That is, the animation has to callback into code or somehow contain meta data for duration of animation sequences. What's typically even more so a problem, is when an animation, which has to trigg...
[ 0.6119239330291748, 0.08870535343885422, -0.07546436041593552, 0.3720919191837311, -0.0400397814810276, -0.13750632107257843, 0.4841994345188141, -0.346886545419693, -0.35378918051719666, -0.24710504710674286, 0.14675401151180267, 0.46524474024772644, -0.6625419855117798, 0.103690609335899...
what would you do to keep animation and code two separate things? *Recently I've been trying out mgrammar, and I'm thinking, a DSL might be the way to go. That would allow the animation or animator, to express certain things in a presumably safe manner which would then go into the content pipeline...* The solution dep...
[ 0.36145442724227905, -0.22235675156116486, 0.25318387150764465, 0.3754158616065979, 0.15670497715473175, -0.06068134680390358, -0.049651920795440674, -0.09850092232227325, -0.19325123727321625, -0.3627510964870453, 0.048443373292684555, 0.599337100982666, 0.04976886883378029, 0.29128703474...
as the designer can just say "we need that death anim to be shorter" and it gets negotiated. But when you have very precise rules in mind or a simulated system like physics, state-driven animation may be preferable. There is no 100% orthogonal and clean solution for the general case. One thing that helps to keep it fr...
[ 0.2887016832828522, -0.29175952076911926, -0.22945043444633484, 0.3573194444179535, -0.09943822771310806, 0.0017537262756377459, 0.1634947657585144, 0.017723167315125465, -0.3022456765174866, -0.8578391671180725, -0.18541257083415985, 0.1704123467206955, -0.4984123408794403, -0.09841571003...
the low level you can say things like "in the hitreact state, playback my hitreact anim until it finishes, then find out from the high-level logic what state to continue from." At the high level there are a multitude of ways to go about defining the logic, but simple repeating loops like "approach/attack/retreat" are a...
[ 0.12292870879173279, -0.26984772086143494, 0.28711792826652527, 0.2860463559627533, -0.051581621170043945, -0.1304667890071869, 0.47341153025627136, -0.17350199818611145, 0.10898907482624054, -0.3501735329627991, 0.17689631879329681, 0.793400228023529, -0.008964568376541138, -0.08730979263...
code to drive data or the other way around. But that's AI for you. No general solutions here!
[ 0.3066102862358093, 0.08913520723581314, -0.16858802735805511, 0.6367282867431641, -0.14401526749134064, -0.12442412972450256, 0.4150278866291046, 0.269233375787735, -0.07565610110759735, -0.3701934218406677, -0.07038811594247818, 0.605291485786438, -0.6017736196517944, 0.02831040322780609...
my Rails app works fine locally. But once I put it on a server and in production mode, I get this error: ``` ActionView::TemplateError (undefined method `each' for nil:NilClass) on line #7 of app/views/admin/confirm.rhtml: 4: <br>Description: 5: <br><%= @description %> 6: <br>Features: 7: <% @features.each do |feature...
[ -0.22406265139579773, 0.29255566000938416, 0.563765287399292, -0.28790751099586487, -0.08549932390451431, 0.5758272409439087, 0.5827025175094604, -0.5332407355308533, -0.08442601561546326, -0.7273063659667969, 0.08823910355567932, 0.7915087342262268, -0.2059832364320755, -0.400508105754852...
@features is nil. But I don't know how it is. In my create action I have: ``` flash[:name] = params[:name] flash[:description] = params[:description] flash[:role_data] = params[:role_data] flash[:user_data] = params[:user_data] flash[:features] = params[:features] flash[:theme] = params[:theme] redirect_to :action => ...
[ 0.04752237722277641, -0.01110770832747221, 0.5673828125, 0.017082635313272476, -0.1902090311050415, -0.0418228842318058, 0.08519977331161499, -0.6332752108573914, -0.16868922114372253, -0.33918461203575134, 0.04057968407869339, 0.681226372718811, -0.2634486258029938, 0.0314842164516449, ...
nil for that instance.
[ 0.14191657304763794, -0.08986739814281464, -0.22153490781784058, 0.057083502411842346, -0.27172669768333435, 0.052444856613874435, -0.19969259202480316, 0.17049498856067657, -0.02490636333823204, -0.08621731400489807, 0.15022078156471252, 0.4231553375720978, -0.03060784377157688, 0.2531057...
I am using Intel TBB C++ for multithreading an application on visual studio 2008. When I run the executable I get a dialog saying "MSVCP80D.dll" was not found. There is so much on the net about this that it confuses me. Please help. EDIT: Based on answers, finally I was able to fix the "dll missing" problem. I had ...
[ 0.2506650984287262, 0.10420555621385574, 0.18657267093658447, -0.1713760644197464, -0.2358420342206955, -0.06463553756475449, 0.40668633580207825, -0.1340312510728836, -0.2272777557373047, -0.6818572282791138, -0.05611614137887955, 0.9009568691253662, -0.5058383941650391, 0.133485749363899...
by project to depend on vc9 dlls, not vc8 and then it worked fine. Another thing to note is use of manifest files on windows. Manifest files describe dependencies. The manifest files must be generated while writing an application as it is necessary. You can find them online at various places. Just scan it for a virus...
[ 0.67774897813797, -0.29545632004737854, -0.07826680690050125, 0.33032622933387756, -0.2834443151950836, -0.385046124458313, 0.20862255990505219, 0.06445186585187912, -0.29229676723480225, -0.8416321277618408, 0.42457202076911926, 0.6530424952507019, -0.2330010086297989, -0.0014237071154639...
I'm using delphi6, and it lacks the following abilities: * a library object, * a list object(looks like TList,TStringList is good enough?) * a algorithm library(like sort,) * template library like STL * dynamic language feature or GC. * and so on. how can I find this things? Try [Jedi Code Library](http://sourceforge...
[ -0.19819121062755585, -0.10202702134847641, 0.11177718639373779, -0.02394767291843891, -0.37589123845100403, -0.20987313985824585, 0.2213142216205597, -0.16327591240406036, -0.310795396566391, -0.5685800313949585, 0.0069519695825874805, 0.7776415348052979, -0.30994299054145813, -0.23792316...
Can you use shared memory to communicate between php scripts and c program in windows? The c program runs all the time and uses memory mapped files ie: ``` handle1 = CreateFileMapping( (HANDLE)0xFFFFFFFF, NULL, PAGE_READWRITE, 0, sizeof(byte)*BUFFER_SIZE, "my_foo" ); hView = (LPINT) MapViewOfFile(handle1, FILE_MAP...
[ 0.16771522164344788, 0.17724812030792236, 0.3860982060432434, 0.029576031491160393, -0.0419657938182354, -0.05768522992730141, 0.09064049273729324, -0.13701477646827698, -0.13174790143966675, -0.7452881932258606, 0.12304247170686722, 0.546269953250885, -0.1583954095840454, -0.1020261570811...
windows. From the [PHP manual](http://theserverpages.com/php/manual/en/ref.shmop.php): > Note: Versions of Windows previous to Windows 2000 do not > support shared memory. Under Windows, > Shmop will only work when PHP is > running as a web server module, such > as Apache or IIS (CLI and CGI will not > work). ...
[ 0.04591549560427666, 0.15168888866901398, 0.4155765175819397, -0.17321272194385529, -0.05487900972366333, -0.2310110330581665, 0.41190871596336365, 0.09994009137153625, -0.37112075090408325, -0.562240481376648, -0.12639416754245758, 0.43424296379089355, -0.2826071083545685, -0.153952971100...
I'm certain I'm doing something really obviously stupid, but I've been trying to figure it out for a few hours now and nothing is jumping out at me. I'm using a ModelForm so I can expose a few fields from a model for editing. 2x ImageField, 1x TextField. The Form is processed and the TextField works. The two ImageFiel...
[ 0.3827376067638397, 0.12590210139751434, 0.548881471157074, -0.1239754930138588, -0.20193296670913696, -0.2791461646556854, -0.04913615807890892, -0.17677856981754303, -0.09874866157770157, -0.6622125506401062, 0.12258828431367874, 0.6898506879806519, -0.42873716354370117, -0.3124900758266...
logo = models.ImageField(upload_to='logos', blank=True) intro_pic = models.ImageField(upload_to='intropics', blank=True) intro_text = models.TextField(blank=True) ``` View and form: ``` def admin_edit(request, company_slug): company = get_object_or_404(Company, slug = company_slug) f = AdminEditForm...
[ 0.5444717407226562, 0.1557622253894806, 0.7223066091537476, 0.05126494914293289, 0.36325603723526, 0.14291904866695404, -0.3016378879547119, -0.26106491684913635, -0.1646394282579422, -0.4781605303287506, -0.04757285118103027, 0.6588481664657593, -0.439270943403244, 0.16674187779426575, ...
f.save() return render_to_response('uadmin/edit.html', {'company':company, 'f':f}, RequestContext(request)) class AdminEditForm(ModelForm): class Meta: model = Company fields = ['logo', 'intro_pic', 'intro_text'] ``` Well I feel like an idiot. In order for Django to be able to process uploade...
[ 0.3000869154930115, 0.09089749306440353, 0.5642267465591431, -0.16436733305454254, 0.12773047387599945, -0.005651739425957203, -0.04643813520669937, -0.15345606207847595, -0.02097724750638008, -0.3904173970222473, 0.15386037528514862, 0.6873484253883362, -0.5279605388641357, 0.174622014164...
in the future) is that your form is multipart. Your `<form>` tag should look something like this: ``` <form enctype="multipart/form-data" method="post" action=""> ```
[ 0.3296344578266144, -0.4430008828639984, 0.8258845806121826, -0.005413973703980446, 0.33471521735191345, -0.32424914836883545, 0.13243061304092407, -0.34361907839775085, -0.15671385824680328, -0.8151572942733765, -0.23849593102931976, 0.5087143778800964, -0.3535327911376953, -0.35882303118...
How to get the [IMEI](http://en.wikipedia.org/wiki/International_Mobile_Equipment_Identity) of a Java ME device in a common way that is applicable to all devices Usually, using java.lang.System.getProperty() can return the device IMEI. Unfortunately, the String parameter you need to use to get the IMEI will change fro...
[ 0.023860273882746696, -0.07656851410865784, 0.4192998707294464, 0.18755443394184113, 0.3978438079357147, 0.252096027135849, 0.11194917559623718, -0.437801718711853, 0.027753476053476334, -0.659989595413208, -0.1661701798439026, 0.3017098903656006, -0.396651029586792, 0.28049540519714355, ...
"-" in the middle of 17 digits. it can be a normalized imei of 13 or 15 digits...
[ -0.04877848923206329, 0.13987652957439423, 0.2709709703922272, 0.0941900685429573, -0.27191898226737976, 0.7066755294799805, 0.22332142293453217, -0.36197173595428467, 0.08385132253170013, -0.5138269066810608, -0.17943836748600006, 0.015386773273348808, -0.0885472297668457, 0.0902265608310...
How can I embed some characters one time, and have them embedded in all my dynamic textfields? I don't think you can do that by default, but you can do something close: 1. You go to the library, select "new font". 2. You pick your font, for example "Myriad Pro", check the "export for Actionscript" checkbox. You get a m...
[ 0.14542166888713837, -0.2698167562484741, 0.5507245659828186, -0.15737944841384888, 0.06352478265762329, 0.07150349766016006, 0.1438869833946228, -0.27794352173805237, -0.07956572622060776, -0.7314948439598083, -0.11391336470842361, 0.6822552680969238, -0.5339240431785583, -0.2039979100227...
textFormat once, if no differences in size or other attributes exist. The `setTextFormat(textFormat)` applies for the text already in the textbox, whereas the `defaultTextFormat` applies for the text that's going to be added from that point on to the textbox. That should do the trick. Tested in Flash CS4.
[ 0.1561199128627777, -0.2558731734752655, 0.7708892226219177, -0.12004368752241135, -0.10459398478269577, -0.5872331261634827, -0.1217864602804184, -0.06152712553739548, 0.03173146769404411, -0.728341281414032, -0.5769868493080139, 0.705384373664856, -0.24479639530181885, -0.388149589300155...
I need a SQL update statement for updating a particular field of all the rows with a string "test" to be added in the front of the existing value. For example, if the existing value is "try" it should become "testtry". You can use the [CONCAT](http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_conca...
[ 0.5114526152610779, 0.11493324488401413, 0.20985367894172668, -0.02868000417947769, -0.008820254355669022, -0.13263007998466492, 0.21191634237766266, -0.16149269044399261, 0.24820290505886078, -0.6156545877456665, -0.0467321053147316, 0.5921916961669922, -0.5603576302528381, 0.005901794880...
I am using the JQueryui Datepicker. But it doesn't really affect values entered manually in the input-field. Is there some way I can use the same (client) code to specify mask / validation on the input field (when the datapicker is not used - not just have datepicker output the correct format). What would be the most ...
[ 0.20974044501781464, -0.055963367223739624, 0.389184832572937, 0.14415663480758667, -0.1279425024986267, -0.2751215994358063, 0.06230464577674866, 0.16869990527629852, -0.18994773924350739, -0.46633458137512207, 0.1806231141090393, 0.5907328128814697, -0.10371223092079163, -0.2080280929803...
col=CONCAT('test',col); ``` If you want to get cleverer and only update columns which don't already have test prepended, try ``` UPDATE tbl SET col=CONCAT('test',col) WHERE col NOT LIKE 'test%'; ```
[ 0.1252877414226532, -0.17771978676319122, 0.07293485850095749, -0.03942305967211723, -0.006493594963103533, -0.027248332276940346, 0.16747118532657623, 0.11088725924491882, 0.21841149032115936, -0.5363898277282715, -0.32674020528793335, 0.38426247239112854, -0.7382523417472839, -0.27183178...
e.g. if you write... `public delegate void MyTypedDel(int x)` Intellisense shows that BeginInvoke, Invoke and EndInvoke are part of the MyTypedDel type definition. They are not part of the Delegate or MulticastDelegate type definition. (Delegate has a DynamicInvoke method, which uses late/runtime binding to bi...
[ 0.35582444071769714, -0.047826312482357025, 0.0844416469335556, 0.010179653763771057, 0.02755262888967991, -0.33642706274986267, 0.3712746202945709, -0.1314377784729004, -0.057441212236881256, -0.7350294589996338, -0.0013131791492924094, 0.3749508857727051, -0.404842346906662, 0.2831043899...
Maybe I missed something real obvious... in which case be brutal :) The compiler generates your delegate class, which extends the `Delegate` BCL class and adds methods specific to the signature of your delegate. You can see this by looking at your delegate (or a BCL delegate) in reflector and switching to IL view (sinc...
[ 0.547684371471405, -0.12219283729791641, 0.122770756483078, 0.03871540725231171, -0.010520029813051224, -0.09464869648218155, 0.3044102191925049, -0.4060395061969757, -0.2439165562391281, -0.5299544334411621, -0.16712528467178345, 0.6151642799377441, -0.46194207668304443, 0.117667220532894...
.ctor(object 'object', native int 'method') runtime managed { } .method public hidebysig newslot virtual instance class System.IAsyncResult BeginInvoke(object state, class System.AsyncCallback callback, object 'object') runtime managed { } .method public hidebysig newslot virtual instance void...
[ 0.07538164407014847, 0.12225589156150818, 0.35581377148628235, 0.11650700122117996, -0.021202795207500458, -0.1531577706336975, 0.23178337514400482, 0.19217711687088013, -0.09065066277980804, -0.6684798002243042, -0.5449151992797852, 0.45258498191833496, -0.49866682291030884, 0.43674394488...
Anyone know how to get a Type object from a FullName? Eg. ``` string fullName = typeof(string).FullName; Type stringType = <INSERT CODE HERE> Assert.AreEqual(stringType, typeof(string) ``` ``` string fullName = typeof(string).FullName; Type stringType = Type.GetType(fullName); ``` However, note that this only...
[ 0.13161686062812805, 0.11131957918405533, 0.40788570046424866, -0.19149966537952423, 0.2610129117965698, -0.3730778694152832, 0.6786997318267822, -0.23991332948207855, -0.018629983067512512, -0.641726016998291, -0.23708993196487427, 0.7696816921234131, -0.2093750387430191, 0.08089333027601...
for persistance, it is often better to use an implementation independent contract. For example, xml (via `XmlSerializer` or `DataContractSerializer`) is not concerned about the specific types, as long as the layout is correct. If space is an issue, binary formats are often shorter - but `BinaryFormatter` includes type...
[ 0.24276556074619293, -0.17843252420425415, 0.2693304121494293, 0.1501305103302002, 0.0805407464504242, -0.31982243061065674, 0.05119193345308304, -0.09145628660917282, -0.4199104309082031, -0.3441343307495117, -0.26045140624046326, 0.36542844772338867, -0.21734198927879333, 0.2451438456773...
I'm looking for a library which can perform a morphological analysis on German words, i.e. it converts any word into its root form and providing meta information about the analysed word. For example: ``` gegessen -> essen wurde [...] gefasst -> fassen Häuser -> Haus Hunde -> Hund ``` My wishlist: * It has to work ...
[ -0.13365599513053894, 0.549713671207428, 0.2123252898454666, -0.20614910125732422, -0.5498144626617432, 0.32385456562042236, 0.7725231647491455, -0.1472114771604538, 0.1757466197013855, -0.8524282574653625, -0.01895783469080925, 0.1421760767698288, 0.15498393774032593, -0.06710701435804367...
cirumstances. * I'd also prefer C/C++/Delphi Windows libraries, because that would make them easier to integrate but .NET, Java, ... will also do. * It has to be a free library. (L)GPL, MPL, ... **EDIT:** I'm aware that there is no way to perform a morphological analysis without any dictionary at all, because of the i...
[ 0.2645380198955536, 0.3858778178691864, 0.3516162931919098, 0.1924464851617813, -0.05885865166783333, -0.2114991992712021, -0.15374033153057098, -0.29335087537765503, 0.044255103915929794, -0.7949878573417664, -0.04269668459892273, 0.21090152859687805, -0.15029922127723694, 0.1321237534284...
the huge size and the inability to process unknown words. Of course all exceptions can only be handled with a dictionary: ``` esse -> essen isst -> essen eßt -> essen aß -> essen aßt -> essen aßen -> essen ... ``` (My mind is spinning right now :) ) I think you are looking for a "stemming algorithm". Martin Porter...
[ -0.4878273606300354, -0.12350983172655106, -0.13894224166870117, -0.0395471453666687, -0.4231426417827606, 0.5130118727684021, 0.8602184653282166, -0.11270417273044586, 0.2285463511943817, -0.7874805927276611, -0.44839638471603394, 0.33725211024284363, -0.019360996782779694, 0.039854217320...
This doesn't matter, though, if you're using those stems to improve search results in information retrieval systems. [Lucene](http://lucene.apache.org/) comes with support for the Porter stemmer, for instance. Porter also devised a simple programming language for developing stemmers, called Snowball. There are also s...
[ 0.04469345882534981, -0.22546477615833282, 0.1903798133134842, 0.14714078605175018, -0.1818518191576004, 0.05526581034064293, 0.36257851123809814, 0.02386271208524704, 0.08629949390888214, -0.28435492515563965, -0.37180688977241516, 0.22766585648059845, 0.1269882619380951, -0.3202435374259...
you should Google for "lemmatization".
[ 0.14410419762134552, 0.004547842778265476, -0.19937188923358917, 0.26481667160987854, 0.018506107851862907, -0.12649701535701752, 0.3049977123737335, 0.4590734839439392, -0.052111778408288956, -0.5176305770874023, -0.20058399438858032, 0.4194042384624481, -0.0219886377453804, -0.0858515277...
You can sample pixel color data on a canvas image with getImageData(). If I layer a transparent canvas element over a background image or flash movie, can I sample a color from that via the canvas tag? Phil's right, you can't do it. Canvas, by design, only returns its own intrinsic pixel data, not any on-screen rendere...
[ 0.4795481264591217, -0.2949840724468231, 0.009703251533210278, 0.33417609333992004, -0.1709972620010376, -0.07326657325029373, 0.17804491519927979, -0.4211665689945221, -0.1274930089712143, -0.5445760488510132, 0.10936472564935684, 0.4257534444332123, -0.2398315966129303, -0.12133423984050...
it), then suck out the content from it pixel by pixel.
[ 0.3940478563308716, 0.09249807149171829, 0.22116661071777344, 0.1446489840745926, -0.133655846118927, 0.370292991399765, 0.21776458621025085, -0.06428351998329163, 0.3696396052837372, -0.40705060958862305, -0.3509758710861206, 0.32120481133461, -0.47421708703041077, 0.5349211096763611, 0...
I'm looking for a better way to call functions based on a variable in Python vs using if/else statements like below. Each status code has a corresponding function ``` if status == 'CONNECT': return connect(*args, **kwargs) elif status == 'RAWFEED': return rawfeed(*args, **kwargs) elif status == 'RAWCONFIG': ...
[ 0.4759700298309326, -0.1155114695429802, -0.126956969499588, 0.013363203965127468, -0.2433864176273346, 0.1667182892560959, 0.3367123305797577, -0.23034422099590302, 0.10101058334112167, -0.7187778353691101, 0.021113744005560875, 0.6778361201286316, -0.1475917398929596, -0.1281711161136627...
similar problems here on SO. Put your functions into a dictionary with your status codes as keys: ``` funcs = { 'CONNECT': connect, 'RAWFEED': rawfeed, 'RAWCONFIG' : rawconfig, 'TESTFEED': testfeed } funcs[status](*args, **kwargs) ```
[ -0.1319909244775772, 0.00269517139531672, -0.01649746671319008, 0.23311293125152588, 0.15382865071296692, 0.015098920091986656, 0.18904832005500793, 0.08774804323911667, -0.07444024085998535, -0.7727776765823364, -0.28342676162719727, 0.6812393069267273, -0.09928938001394272, -0.2414449304...
is there a way of formatting a string to show whole numbers of a decimal number if it follows 00. example show 10 if number is 10.00. but show 10.2 if number is 10.2 this is for c#, asp.net In .NET: ``` if (Math.Floor(d) == d) return d.ToString("0"); else return d.ToString(); ```
[ 0.09037204086780548, 0.07361263036727905, 0.35119375586509705, -0.107415571808815, -0.12406491488218307, -0.07122887670993805, 0.04409731179475784, -0.24297574162483215, -0.3969521224498749, -0.35863620042800903, -0.1705344021320343, 0.19762016832828522, -0.06570268422365189, -0.1626133620...
I have an assembly deployed to SQL Server that performs an export to an accounting system SDK. The **reasons** that this is deployed to SQL Server are **beyond my control**, and I **cannot modify** the target **database**. In development, I moved several dynamic queries from hard-coding to text files outside the appli...
[ 0.16756093502044678, 0.19340190291404724, 0.15550413727760315, -0.23506282269954681, 0.06839224696159363, 0.023858238011598587, 0.22012272477149963, -0.17936356365680695, -0.21386821568012238, -0.7304017543792725, -0.14069722592830658, 0.3557248115539551, -0.24085800349712372, 0.1732616722...
d.ToString(); ```
[ -0.5515960454940796, 0.18002071976661682, 0.002901321742683649, -0.4408315122127533, -0.21532106399536133, 0.23585888743400574, 0.24476827681064606, -0.093807153403759, -0.03143762797117233, -0.440736323595047, -0.4541492164134979, 0.3154774308204651, -0.2772042155265808, 0.235537990927696...
I am using a MySQL database and PHP. My MySQL database contains the following records: ``` Name Address Data email Date Joy Fortblair 10 my@gmail.comm 1/22/2009 Bob Atlanta 15 bob@gmail.com 2/22/2009 ``` My intention is to send the email using PHP with the following...
[ 0.30445408821105957, 0.603667676448822, 0.7745561599731445, -0.43806999921798706, -0.03561048209667206, 0.15543198585510254, 0.6594123840332031, 0.3496139347553253, -0.18719594180583954, -0.5368935465812683, 0.2936308979988098, 0.1313370019197464, -0.28159603476524353, 0.05502583459019661,...
day`) * It should mail all the email records at one time. What is the best way to get started? The SQL query is pretty simple and it goes as following ``` SELECT *, TIMESTAMPDIFF(day, Date, NOW()) FROM `your_table_name` WHERE TIMESTAMPDIFF(day, Date, NOW()) = 1; ``` Now you have to get the contents of the result an...
[ 0.36381882429122925, -0.022472629323601723, 0.8883323669433594, -0.015387018211185932, 0.40410640835762024, -0.24008004367351532, 0.07144583761692047, -0.16763100028038025, -0.40695738792419434, -0.5387567281723022, -0.18831507861614227, 0.6747123599052429, -0.21088334918022156, 0.08576174...
I used the following script to symbolize the crash report I got from the user: > /Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Plug-ins/iPhoneRemoteDevice.xcodeplugin/Contents/Resources/symbolicatecrash > myapp\_iPod-Touch.crash myapp.app.dSYM > test.txt It matches up all of the framework calls but ...
[ -0.25114917755126953, 0.405413419008255, 0.010243858210742474, 0.10101877152919769, 0.09636497497558594, 0.24877017736434937, 0.516488790512085, -0.4298095703125, -0.31463029980659485, -0.5190643072128296, 0.29168665409088135, 0.27331575751304626, -0.34794339537620544, -0.08274056762456894...
file is produced by your latest build to run against an older submitted version of your application.
[ 0.604105532169342, -0.1122707650065422, 0.43284112215042114, 0.3167335093021393, 0.35776036977767944, -0.14596645534038544, -0.11711778491735458, -0.1239999383687973, -0.040181681513786316, -0.524433970451355, -0.31536969542503357, 0.1967988759279251, -0.2984332740306854, 0.214696422219276...
How can i refresh grid data when new data added in exts? Making it const and making it static do two different things. * if it is const, each function call gets its own unchangeable instance of the struct * if it is static there is one changeable instance of the struct shared across all function calls It sounds as th...
[ -0.020360680297017097, -0.3926619291305542, 0.3695160448551178, 0.036120932549238205, -0.2984527051448822, 0.039781901985406876, 0.20709040760993958, -0.1486417055130005, -0.05301762372255325, -0.6772681474685669, 0.06294597685337067, 0.7734194993972778, -0.2012249380350113, 0.079811431467...
If I do the following session.getTransaction().rollback(); is it then ok/possible to start calling save/update/delete etc. on the same session object? Couldnt find the answer to this in the [Hibernate Session/Transaction API](http://www.hibernate.org/hib_docs/v3/api/), or in the Hibernate reference documentation. O...
[ 0.2003343403339386, 0.027198823168873787, 0.538324236869812, -0.17253223061561584, -0.2023986279964447, -0.3640618324279785, 0.5683374404907227, -0.19972647726535797, -0.10132650285959244, -0.5885935425758362, -0.237850159406662, 0.8137887120246887, -0.25957465171813965, 0.1876585483551025...
I have an object which i need to validate. This object has properties which cannot be null, strings which cannot exceed a given size and date strings which i need to check for format correctness. How would you perform this validation. I don't want to go over the whole object, I'm looking for something more dynamic ED...
[ 0.33273181319236755, 0.05801323056221008, 0.23527222871780396, 0.3720175325870514, -0.20499412715435028, -0.27089977264404297, 0.17574265599250793, 0.03795474395155907, -0.14033375680446625, -0.3482322096824646, 0.3473086953163147, 0.4910801947116852, -0.08434193581342697, 0.41636425256729...
want the object to be validated on the server side of a web service. If so, the answer I'm suggesting may apply to your situation. As you've no doubt seen already, there are several ways of going about validating the fields in an object. But you know what needs to be done: check each field to see whether its value is ...
[ 0.6634809970855713, 0.12452365458011627, -0.12496623396873474, 0.42716190218925476, -0.13377554714679718, -0.26019206643104553, 0.18458586931228638, 0.04088350385427475, -0.22805632650852203, -0.3327449560165405, 0.04266437888145447, 0.36781346797943115, -0.006277397274971008, 0.0345230735...
and validate the objects you get over the wire using the schema as a reference. This makes it easy to maintain your validation code and your class: you simply update the schema, and re-generate the class. (I wouldn't even keep the class in source control. Just generate it before you compile your code. This guarantees t...
[ 0.5784497261047363, 0.1246085911989212, 0.13068899512290955, 0.35594525933265686, -0.006525255739688873, -0.41618114709854126, 0.2920270562171936, -0.16950178146362305, -0.1545819789171219, -0.33143070340156555, 0.19260777533054352, 0.7906607985496521, -0.0967603251338005, -0.0632264241576...
Lest say you want the last element of a python list: what is the difference between ``` myList[-1:][0] ``` and ``` myList[len(myList)-1] ``` I thought there was no difference but then I tried this ``` >>> list = [0] >>> list[-1:][0] 0 >>> list[-1:][0] += 1 >>> list [0] >>> list[len(list)-1] += 1 >>> list [1] `...
[ 0.36540141701698303, -0.13597193360328674, 0.4557911455631256, -0.11850375682115555, -0.2226412445306778, -0.014241276308894157, 0.14757297933101654, -0.0666111558675766, 0.013619741424918175, -0.7674955129623413, -0.12829259037971497, 0.5750551819801331, -0.415828675031662, 0.205276608467...
At my work we currently use [Aegis](http://aegis.sourceforge.net/) version control/SCM. The way we have it configured, we have a bunch of tests, and it forces the following things to be true before a change can be integrated: * The full set of tests must have been run. * All tests must have passed. With test-driven d...
[ 0.6932409405708313, -0.016586996614933014, 0.22765754163265228, 0.14935168623924255, 0.08651753515005112, -0.41342565417289734, 0.24904344975948334, -0.08559779822826385, -0.3739772439002991, -0.6831194758415222, 0.12188736349344254, 0.5745193958282471, -0.03513183444738388, -0.11823952943...
in *any* VCS (distributed or not) that can do this, I'm also interested in any plugins/extensions to existing VCS that allow this. Preferably open source software. **ETA:** OK, it seems like the usual thing to do is have VCS + continuous integration software, and running the tests is automated as part of the build, in...
[ 0.7520881295204163, 0.08061197400093079, -0.10498079657554626, 0.3221771717071533, 0.10257313400506973, -0.21351073682308197, 0.13533322513103485, 0.01797596924006939, -0.3320116698741913, -0.5196369290351868, 0.0611984059214592, 0.5831266641616821, -0.2636220455169678, -0.0018452195217832...
much better off using a continuous integration system like [CruiseControl](http://cruisecontrol.sourceforge.net/) or [Hudson](http://hudson-ci.org/) if you want to enforce that your tests pass, and make the build rather than the check-in dependent on the tests results. The tools are straightforward to set up, and you g...
[ 0.5396608114242554, -0.1944466084241867, 0.040528152137994766, 0.12151478230953217, 0.29574206471443176, -0.40263381600379944, -0.10167258977890015, -0.1863163858652115, -0.19536380469799042, -0.6662939190864563, 0.12115804851055145, 0.6406639218330383, -0.028357692062854767, 0.02692341431...
unless all the tests pass. If you really want to stop anyone from even committing unless all the tests pass you will have to use hooks in the VCS as others have suggested. However, this looks to me to be hard to deal with - either developers would have to run all of the tests every time they made a checkin, including t...
[ 0.8318931460380554, 0.1532476544380188, -0.013409124687314034, 0.0457410030066967, 0.09180547297000885, -0.25570300221443176, 0.33161360025405884, -0.20028094947338104, -0.4726819097995758, -0.40430840849876404, -0.013638979755342007, 0.33747801184654236, -0.393466055393219, 0.021705137565...
efficient to rely on developers to run the relevant tests locally, and have the CI system pick up on the occasional mistakes.
[ 0.12190460413694382, 0.1755291074514389, -0.07501162588596344, 0.26951608061790466, 0.2711707353591919, -0.18565680086612701, 0.10258112102746964, -0.08753497153520584, 0.14057113230228424, -0.9514899253845215, -0.1976640671491623, 0.4991178512573242, -0.1939009428024292, -0.43967309594154...
When running JUnit tests, I always seem to run into this error: > eclipse outOfMemoryError: heap space I have monitored Eclipse with JConsole and heap memory peaks at about 150MB. I have set heap memory to 1GB. I am using the following arguments when starting Eclipse: ``` -vm "C:\Program Files\Java\jre1.5.0_08\bin...
[ 0.4105726182460785, 0.13353390991687775, 0.28464093804359436, -0.005768544971942902, -0.3603326380252838, -0.235861673951149, 0.43398863077163696, -0.1387324035167694, -0.016278881579637527, -0.7234845757484436, 0.22616389393806458, 0.7118352055549622, -0.08012564480304718, -0.135441392660...
the run configurations of the test. You go to the run configurations and then under arguments, you can set the vm arguments.
[ 0.7147204875946045, -0.2025635838508606, 0.12293967604637146, 0.3251771628856659, 0.03942614048719406, 0.07627388834953308, 0.10864590108394623, -0.35862863063812256, 0.030022818595170975, -0.4295777976512909, 0.10098424553871155, 0.8545638918876648, -0.11813348531723022, 0.08266581594944,...
I have two vectors of floats and i want them to become one vector of Complex numbers. I'm stuck. I don't mind using iterators, but i am sure it'd be rediscovering the wheel i'm not informed about. Is my code leading me in the right direction? ``` typedef std::vector<float> CVFloat; CVFloat vA, vB; //fil vectors typede...
[ 0.023656930774450302, 0.0046887933276593685, 0.8210274577140808, -0.06359897553920746, -0.09322483837604523, 0.17424677312374115, 0.2390567511320114, -0.6262539625167847, -0.2573784291744232, -0.5412180423736572, 0.08297375589609146, 0.707805335521698, -0.5062251091003418, 0.26968041062355...