text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
is what I get. The area below the red border should be filled with a color. [border image http://www.kevtrout.com/tortus/div.png](http://www.kevtrout.com/tortus/div.png) By popular demand, here is the css: ``` #footer{ border-top: 10px solid #d8d8d8; background:#5b5b5b; /*overflow:auto;*///Add...
[ 0.033925026655197144, -0.1491764634847641, 0.8855421543121338, 0.17721064388751984, 0.15737256407737732, 0.19302354753017426, 0.07011406123638153, -0.13756190240383148, -0.4710789620876312, -0.6987779140472412, -0.23297838866710663, 0.2585369348526001, 0.07612477242946625, 0.02133812569081...
background: #5b5b5b; margin:0px; float:left; padding: 10px; } dt.tr{ font-weight: normal; font-size: 14px; color: #d8d8d8; line-height: 28px; } ``` edit: I am using firefox on a mac Check your footer CSS... if you
[ 0.06137993559241295, 0.32445278763771057, 0.4473005533218384, -0.03622906655073166, 0.2593929171562195, 0.17915304005146027, 0.45272794365882874, -0.11436665803194046, -0.13461732864379883, -0.5920117497444153, -0.30246490240097046, 0.6393139362335205, -0.33538618683815, -0.354078680276870...
have overflow set to anything but auto/scroll, then the DIV won't grow. If not try using something other than DL/DT since DT's are inline elements, they won't push your div to fit content.\* e.g. just try using a DIV instead, if the footer grows, you have your answer. (note: I revised order of suggestions) \*(I rea...
[ 0.3913921117782593, -0.22820700705051422, 0.37829604744911194, 0.15334680676460266, -0.15331777930259705, -0.22125066816806793, 0.3199933171272278, 0.12042352557182312, -0.16038385033607483, -0.9206818342208862, -0.3908076584339142, 0.6155874133110046, -0.10795540362596512, 0.0361254103481...
It seems that HTML 5 is going to be supported (partially) by Firefox 3.1 and other browsers. It is adding support for video and audio as tags, but these are new tags that XHTML 1.0 Transitional does not recognize. What is the behavior supposed to be if I use a new HTML 5 tag in a future version of Firefox but use the D...
[ 0.727156400680542, 0.02647712640464306, 0.6283142566680908, 0.1450793445110321, -0.3025612235069275, -0.459374338388443, 0.2746995687484741, -0.26506832242012024, -0.3414093554019928, -0.5431172251701355, -0.14637041091918945, 0.8429833650588989, -0.509065568447113, 0.049765363335609436, ...
HTML 5: <http://www.youtube.com/watch?v=xIxDJof7xxQ> Well, generally speaking HTML is SGML and XHTML is expressed in XML. Because of that, creating XHTML is connected with more restrictions (in the form of markup) than HTML is. ([SGML-based versus XML-based HTML](http://en.wikipedia.org/w/index.php?title=HTML&oldid=248...
[ 0.20863787829875946, -0.007861736230552197, 0.977142870426178, -0.09709440171718597, -0.3441561162471771, -0.5183327794075012, 0.11962983012199402, -0.1033877357840538, -0.3884812295436859, -0.5563466548919678, -0.5547115206718445, 0.16770096123218536, -0.14852233231067657, 0.1746023893356...
I highly doubt), then you should make sure that you use the HTML 5/XHTML 5 DTD in order to specify that your document is in that DOCTYPE. Using HTML 5 or XHTML 5 in the given state of the implementation (AFAIK, the standard is not even settled, yet, correct?) could be counter-productive, as almost all users may not se...
[ 0.280252605676651, 0.3324393630027771, 0.48052355647087097, 0.10258925706148148, -0.36399945616722107, -0.4472062289714813, 0.3392479419708252, -0.019931184127926826, -0.24924765527248383, -0.2222156971693039, -0.32896989583969116, 0.5955244898796082, -0.20536842942237854, 0.18871098756790...
I wrote this answer five years ago. Since most major browsers support most parts of the HTML5 draft and because a lot of stuff can be fixed with polyfills in older browsers, I mainly use HTML5 now.
[ 0.24081148207187653, 0.4160325527191162, 0.36247071623802185, -0.0160489771515131, -0.3177655339241028, 0.002877331804484129, 0.10045121610164642, -0.11242344230413437, 0.184034064412117, -0.4421321749687195, -0.13754908740520477, 0.13294118642807007, -0.36283859610557556, -0.1995115578174...
I have a PHP web application which uses a MySQL database for object tagging, in which I've used the tag structure accepted as the answer to [this SO question](https://stackoverflow.com/questions/20856/how-do-you-recommend-implementing-tags-or-tagging). I'd like to implement a tag hierarchy, where each tag can have a u...
[ 0.4425222873687744, -0.04289117082953453, -0.013028053566813469, 0.1538381427526474, -0.0071271928027272224, -0.08083069324493408, 0.04961061105132103, -0.3621644675731659, -0.011028779670596123, -0.4356764554977417, 0.11819331347942352, 0.3192361295223236, -0.20818683505058289, 0.12477972...
number if the tag has no parent. Searching for descendants, however, then requires repeated full searches of the database to find the tags in each 'generation', which I'd like to avoid. A (presumably) faster, but less normalised way of doing this would be to have a table containing all the children of each tag, or eve...
[ 0.2172551155090332, -0.2779453992843628, 0.06405119597911835, 0.19335836172103882, 0.041919127106666565, 0.13708454370498657, 0.16939501464366913, -0.28156840801239014, -0.41709837317466736, -0.5958871245384216, -0.1788121908903122, -0.25694048404693604, -0.31294557452201843, 0.30546185374...
as possible? Ali's answer has a link to [Joe Celko's Trees and Hierarchies in SQL for Smarties](http://books.google.co.uk/books?id=6mAAFPTB-9cC), which confirms my suspicion - there isn't a simple database structure that offers the best of all worlds. The best for my purpose seems to be the "Frequent Insertion Tree" de...
[ 0.2616175413131714, -0.09451638907194138, 0.018794767558574677, 0.1779651641845703, 0.1060725674033165, 0.15922197699546814, 0.41659441590309143, -0.38353216648101807, -0.026689017191529274, -0.39475521445274353, -0.3467521667480469, 0.04162730649113655, -0.43630990386009216, 0.16387477517...
I have been searching for recent performance benchmarks that compare L2S and EF and couldnt find any that tested calling stored procedures using the released version of EF. So, I ran some of my own tests and found some interesting results. Do these results look right? Should I be testing it in a different way? One in...
[ 0.36886224150657654, 0.11857205629348755, 0.2246975302696228, 0.03303500637412071, -0.09630954265594482, -0.14021942019462585, 0.3941754698753357, -0.4273386299610138, -0.23891624808311462, -0.2907242476940155, 0.18583530187606812, 0.7482681274414062, -0.35795173048973083, -0.2600372135639...
[startup costs vs. execution costs](http://oakleafblog.blogspot.com/2008/08/entity-framework-instantiation-times.html). The Entity Framework, in particular, has substantial [startup costs resulting from the need to compile database views](http://blogs.msdn.com/adonet/archive/2008/02/04/exploring-the-performance-of-the-...
[ -0.15299536287784576, 0.38385409116744995, 0.24758952856063843, 0.1719944179058075, -0.10264436155557632, 0.05406646057963371, 0.08608142286539078, -0.2783684730529785, -0.32914990186691284, -0.4031364321708679, 0.006938586942851543, 0.5032997727394104, 0.05959479510784149, 0.0542165823280...
Writing something like this using the [loki library](http://loki-lib.sourceforge.net/), ``` typedef Functor<void> BitButtonPushHandler; ``` throws a compiler error, but this works ``` typedef Functor<void,TYPELIST_1(Matrix3D*)> Perspective; ``` > Functor.h:530: error: '((Loki::FunctorHandler, int>\*)this)->Loki::...
[ 0.2477601319551468, -0.03816331923007965, 0.22720631957054138, -0.06341486424207687, -0.33709192276000977, -0.2779562175273895, 0.47109124064445496, -0.29146113991737366, -0.013095053844153881, -0.6297664046287537, -0.14579030871391296, 0.23545630276203156, -0.3404574692249298, -0.17254684...
(or accept all defaults) need to be specified. You can just define as follows and let the defaults do the work: ``` typedef Functor<> BitButtonPushHandler; ``` This compiles for me with a small test Functor class (not the actual Loki one), and I can use the typedef successfully.
[ 0.4418836534023285, -0.31021931767463684, 0.019240962341427803, 0.015689166262745857, -0.2330198734998703, -0.2533625066280365, 0.46331244707107544, -0.2213848978281021, 0.18846836686134338, -0.4233912229537964, -0.17784154415130615, 0.6258403658866882, -0.20296740531921387, -0.25650531053...
Say you have a string, but you don't know what it contains. And you want to replace all occurences of a particular word or part of a word with a formatted version of the same word. For example, I have a string that contains "lorem ipsum" and i want to replace the entire word that contains "lo" with "lorem can" so that ...
[ 0.13448970019817352, 0.15912702679634094, 0.6366050839424133, 0.005464091431349516, 0.18925915658473969, -0.01112363114953041, 0.16572806239128113, -0.1952880471944809, -0.2182633876800537, -0.3969195485115051, -0.41687801480293274, 0.6035955548286438, -0.20260189473628998, -0.158509686589...
"lo" + the other characters + " can" It will also replace "lo" with "lo can" - if you don't want this, change `\w*` to `\w+`
[ 0.3222438395023346, -0.02940550446510315, 0.3321813941001892, -0.3452703654766083, 0.5572841167449951, 0.037895046174526215, 0.14809873700141907, 0.021120330318808556, -0.019469302147626877, -0.48040971159935, -0.5791170001029968, 0.4385693073272705, -0.1572708934545517, -0.061787202954292...
In other words, can `fn()` know that it is being used as `$var = fn();` rather than as `fn();`? A use case would be to `echo` the return value in the latter case but to `return` it in the former. Can this be done without passing a parameter to the function to declare which way it is being used? Many PHP functions do ...
[ 0.3438311219215393, -0.25836828351020813, 0.024916578084230423, -0.5245776176452637, -0.12420617789030075, -0.16960839927196503, 0.15015916526317596, -0.09733819961547852, -0.30494144558906555, -0.1356900930404663, -0.17667774856090546, 0.6256752014160156, -0.4885391891002655, 0.1002515330...
if ($return) { return 'blah'; } else { echo 'blah'; } } ``` Any other way will not be good programming style.
[ 0.39543044567108154, 0.1122913733124733, 0.19287963211536407, -0.2245149314403534, -0.005634468048810959, -0.40478748083114624, 0.39015957713127136, -0.2146105021238327, -0.01897628791630268, -0.3271116614341736, -0.30665910243988037, 0.6962717175483704, -0.4344181716442108, 0.155976742506...
I'm using IntelliJ-Idea to write Java daemons. We use JUnit to unit test our code and want to have automated runs on check-in to subversion. Are there any tools available that can automatically run unit tests and then send reports in email and to [Hobbit](http://hobbitmon.sourceforge.net/)? I think you should look int...
[ 0.18955181539058685, 0.12913648784160614, 0.16440075635910034, -0.12155329436063766, -0.2777392566204071, -0.12332218885421753, 0.09970884770154953, -0.133221834897995, -0.19153475761413574, -0.749997079372406, -0.03137179836630821, 0.7147994637489319, -0.16901762783527374, -0.077029071748...
to configure and use. It has built-in support for Maven and Ant if you use those, but if not, you can simply write your own batch file/shell script. If continuous integration is not an option, you can look into the use of a Subversion post-commit hook (<http://svnbook.red-bean.com/en/1.0/svn-book.html#svn-ch-5-sect-2...
[ 0.3757442235946655, -0.2954893410205841, -0.03735235705971718, -0.10102599114179611, -0.15034401416778564, -0.2820686101913452, 0.5250450968742371, 0.09610291570425034, -0.23587006330490112, -0.5808978080749512, 0.042013201862573624, 0.5234990119934082, -0.2985302805900574, -0.130248531699...
Is there a way (a program, a library) to approximately know which language a document is written in? I have a bunch of text documents (~500K) in mixed languages to import in a i18n enabled CMS (Drupal).. I don't need perfect matches, only some guess. There is a pretty easy way to do this, given that you have corpus d...
[ 0.07220859825611115, 0.05966315045952797, 0.28997188806533813, 0.34416744112968445, 0.10553696751594543, 0.019808510318398476, -0.13005873560905457, -0.11497551947832108, -0.17789326608181, -0.6203020811080933, 0.13418884575366974, 0.4409998059272766, 0.01758517138659954, -0.18748870491981...
Here is a simple scenario with table characters: ``` CharacterName GameTime Gold Live Foo 10 100 3 Foo 20 100 2 Foo 30 95 2 ``` How do I get this output for the query `SELECT Gold, Live FROM characters WHERE name = 'Foo' ORDER BY GameTime`: ``` Gold Live 100 3 0 -1 -5 0 ``` using MySQL stored procedure (or quer...
[ -0.14177726209163666, 0.27787959575653076, 0.23254142701625824, -0.13445976376533508, -0.134635329246521, 0.11161430180072784, 0.015708083286881447, -0.4280330538749695, -0.10325158387422562, -0.5867516398429871, 0.15487715601921082, 0.6575664281845093, -0.19444097578525543, -0.37435457110...
just as a learning material. One possible solution using a temporary table: ``` CREATE TABLE characters_by_gametime ( id INTEGER AUTO_INCREMENT PRIMARY KEY, gold INTEGER, live INTEGER); INSERT INTO characters_by_gametime (gold, live) SELECT gold, live FROM characters ORDER BY game_time; SELECT c1.id, c1.go...
[ -0.2254038155078888, -0.14791522920131683, 0.3123767673969269, -0.11655782908201218, 0.13984531164169312, 0.2642996907234192, -0.04179634898900986, -0.15301527082920074, -0.08823629468679428, -0.6330243945121765, -0.3060818612575531, 0.4402157962322235, 0.03413766622543335, 0.0484442636370...
``` void addNewNode (struct node *head, int n) { struct node* temp = (struct node*) malloc(sizeof(struct node)); temp -> data = n; temp -> link = head; head = temp; } ``` The code give above is the popularly wrong version of a function for adding a new node at the head of a linked list. Generally the ...
[ -0.053317323327064514, -0.1557406485080719, 0.4257050156593323, -0.25618284940719604, -0.04315676912665367, -0.007305190432816744, 0.3299361765384674, -0.23477426171302795, -0.25506049394607544, -0.6074958443641663, -0.3808613121509552, 0.28816869854927063, -0.7040157318115234, 0.071095570...
struct node* temp = (struct node*) malloc(sizeof(struct node)); temp -> data = n; temp -> link = head; return temp; } ``` But I haven't seen this being used or discussed in code and tutorials and thus I am curious to know if this approach has some flaw. The flaw is that you're relying on the caller to per...
[ 0.18140050768852234, 0.11382226645946503, 0.5359709858894348, -0.193800151348114, -0.048906873911619186, -0.11163511872291565, 0.6028780937194824, -0.20974832773208618, -0.19434578716754913, -0.6449426412582397, -0.14281806349754333, 0.5177380442619324, -0.4291543960571289, 0.1197864636778...
not have changed (and you'll have leaked the memory for a node).
[ 0.647509753704071, -0.09022675454616547, -0.05808427929878235, -0.07351619750261307, 0.2832871377468109, 0.059621259570121765, 0.21462517976760864, 0.2811175286769867, -0.26607051491737366, -0.28782978653907776, -0.17272624373435974, 0.2601255774497986, -0.0932314395904541, 0.1720430850982...
I personally don't use FxCop yet. We want to work out the unit testing first before going with code analysis. However, which rules would you permanantly deactivate? Which rules would you deactivate temporarily and in which situation? I don't use the naming convention rule that prohibits underscores in method/event name...
[ 0.6270458102226257, -0.014160026796162128, 0.14550624787807465, -0.05650841444730759, 0.17580503225326538, 0.01771397888660431, -0.12851563096046448, 0.029689503833651543, -0.41239073872566223, -0.40262654423713684, 0.1017492413520813, 0.5356216430664062, -0.07800041884183884, 0.0739785507...
I need to create a form with, half linear view (textboxes and dropdownlists in separate line) and the other half, non linear view i.e. the textboxes will appear next to each other, like first name and last name will be next to each other. I am aware how to acomplish the linear view with CSS. I am using ``` fieldset ...
[ -0.032466720789670944, 0.09827951341867447, 0.9245964288711548, -0.054651275277137756, 0.005220713559538126, 0.16121596097946167, 0.2366015464067459, -0.2743759751319885, -0.0010716643882915378, -0.7727205753326416, -0.23398630321025848, 0.15776272118091583, -0.10340216755867004, 0.0702241...
text-align:right; } ``` How can I get the non-linear view? if you also float:left, set a width and display:inline the other input fields, the should appear on the same line
[ -0.03970930725336075, 0.07773542404174805, 0.7197446227073669, -0.03888913616538048, -0.009806749410927296, 0.09729582071304321, -0.030645402148365974, -0.12276880443096161, 0.08718767017126083, -0.5839962363243103, -0.030214229598641396, 0.8163095712661743, -0.2777864336967468, -0.0045693...
I want to implement my own clustering algorithm using this Virtual Earth javascript API: <http://msdn.microsoft.com/en-us/library/cc966716.aspx> However, the VE engine calls my cluster function once for every shape in the layer. This makes it very slow! It seems to me that VE should put all the shapes into a layer, th...
[ 0.21939288079738617, -0.01564689725637436, 0.673393964767456, -0.08539406210184097, -0.10133655369281769, 0.13906411826610565, -0.20403148233890533, 0.09898340702056885, -0.05397217720746994, -1.1402456760406494, 0.07526060938835144, 0.04483059048652649, -0.1695522516965866, 0.397357761859...
"Robustness Principle" should apply. Be liberal in what you accept, but strict in what you send. So, be prepared to receive just a LF, but if you're sending data use whatever the relevant standards require.
[ 0.22616149485111237, -0.06707792729139328, 0.29581519961357117, -0.009014209732413292, -0.19318094849586487, -0.5329017043113708, 0.12305012345314026, -0.22299794852733612, -0.012334221974015236, -0.3661606013774872, -0.1930397003889084, 0.8797337412834167, 0.02200930379331112, -0.21388839...
I wonder if the UNIX domain socket connections with postgresql are faster then tcp connections from localhost in high concurrency rate and if it does, by how much? UNIX domain sockets should offer better performance than TCP sockets over loopback interface (less copying of data, fewer context switches), but I don't kno...
[ 0.41652774810791016, -0.09357330948114395, 0.18232043087482452, 0.18475475907325745, -0.49412354826927185, -0.12539897859096527, 0.07840719819068909, -0.09393275529146194, -0.36427345871925354, -0.6491156220436096, 0.11077772825956345, 0.5749183297157288, 0.18873095512390137, 0.41273257136...
Within an unordered list: ``` <li><span></span> The lazy dog.</li> <li><span>AND</span> The lazy cat.</li> <li><span>OR</span> The active goldfish.</li> ``` Adding a class or style attribute is permitted but padding the text and adding or changing tags is not allowed. The page is rendering with Courier New. Goal i...
[ -0.008257848210632801, -0.03760451450943947, 0.42753565311431885, -0.2826680541038513, -0.32081446051597595, 0.20321087539196014, 0.1511273980140686, -0.16984547674655914, -0.5760909914970398, -0.6294154524803162, -0.33897870779037476, 0.6455661058425903, -0.7483478784561157, -0.1561580896...
dog.</li> <li><span>AND</span> The lazy cat.</li> <li><span>OR</span> The active goldfish.</li> </ul> ``` Like Eoin said, you need to put a non-breaking space into your "empty" spans, but you can't assign a width to an inline element, only padding/margin so you'll need to make it float so that you can give it a...
[ 0.010652096942067146, 0.020624859258532524, 0.3621710240840912, -0.33686867356300354, -0.2136543095111847, 0.1421988308429718, 0.32829734683036804, 0.01347025204449892, -0.6133852005004883, -0.65656977891922, 0.029664743691682816, 0.43005451560020447, -0.706207275390625, -0.150320485234260...
I'm completely new at C# and NUnit. In Boost.Test there is a family of `BOOST_*_THROW` macros. In Python's test module there is `TestCase.assertRaises` method. As far as I understand it, in C# with NUnit (2.4.8) the only method of doing exception test is to use `ExpectedExceptionAttribute`. Why should I prefer `Expe...
[ 0.27302059531211853, 0.03586720675230026, -0.09214485436677933, -0.2014082670211792, -0.39922627806663513, -0.2537364661693573, 0.30088725686073303, -0.28403499722480774, 0.13503099977970123, -0.34835824370384216, 0.1114107072353363, 0.8483322858810425, 0.0021521456073969603, -0.4403896927...
saying that object has to be valid after some setter raised `System.IndexOutOfRangeException`. How would you fix following code to compile and work as expected? ``` [Test] public void TestSetterException() { Sth.SomeClass obj = new SomeClass(); // Following statement won't compile. Assert.Raises( "System....
[ 0.4861827790737152, 0.15532267093658447, 0.2565579116344452, 0.1853371411561966, -0.20352882146835327, 0.09416034072637558, 0.6161495447158813, -0.3814481496810913, -0.0024050967767834663, -0.24626000225543976, -0.09929221123456955, 0.5848413705825806, -0.28745928406715393, 0.0940345749258...
more minor variation). It's shame that I couldn't find it before :-(. I'm surprised I haven't seen this pattern mentioned yet. David Arno's is very similar, but I prefer the simplicity of this: ``` try { obj.SetValueAt(-1, "foo"); Assert.Fail("Expected exception"); } catch (IndexOutOfRangeException) { // E...
[ -0.09115318208932877, -0.15149147808551788, 0.21379150450229645, -0.3976242244243622, 0.0013375818962231278, 0.14892350137233734, 0.4806802272796631, -0.31301015615463257, -0.22868752479553223, -0.537122368812561, -0.12993332743644714, 0.507219672203064, -0.41769659519195557, -0.0648595318...
I have put together a script which is very much like the flickr photostream feature. Two thumbnails next to each other, and when you click the next or prev links the next (or previous) two images slide in. Cool! Currently when the page loads it loads the two images. The first time nxt / prv is used then the next two i...
[ 0.4046073257923126, -0.13694456219673157, 0.6903650164604187, 0.14822185039520264, -0.334076464176178, -0.3687475323677063, -0.3006788194179535, 0.18172527849674225, -0.2192050814628601, -0.7499294281005859, 0.11652041226625443, 0.3778687119483948, -0.025222888216376305, 0.0291444156318902...
on a slow connection, or heavy server load then the two images, although relatively small thumbnails could still take a while to load, and the nice things with sliding panes is the fact that the hidden data slides in quickly and smoothly preferbly without a loading delay. So I was wondering from a performance and good...
[ 0.34216076135635376, -0.31520748138427734, 0.4831552803516388, 0.3896757662296295, -0.110712431371212, -0.11447463184595108, -0.1512637436389923, -0.002677351236343384, -0.17650142312049866, -0.7969624996185303, -0.0469488725066185, 0.6158720254898071, -0.21495579183101654, -0.160932555794...
details that way - although browser will still have to load image. Plus sometimes there might be 4 images, other times there could be upto 1000! 3, Load 10 images via php into a Json or other file, and load all 10 images into the browser hiding the 8 which are not on show, and always showing the middle two. Problem he...
[ 0.24947330355644226, -0.11210458725690842, 0.5097122192382812, 0.632632315158844, -0.21000933647155762, 0.19455505907535553, 0.267779141664505, -0.05955692008137703, -0.32745644450187683, -0.6135385632514954, 0.19918932020664215, 0.6297629475593567, 0.00033782096579670906, 0.05207623168826...
still there is a loading time. 4, Is it possible to have a json image with all the image details (regardless of numbers) and use no 3 above to load 10 of those images, is it possible to use ajax to only read 10 lines and keep a pointer of the last one it read, so the json file can be loaded fast, short refresh and ima...
[ 0.28714388608932495, -0.19010625779628754, 0.34608298540115356, 0.35182666778564453, -0.29285404086112976, 0.0001511926093371585, 0.14875873923301697, 0.07498815655708313, -0.32348960638046265, -0.7537924647331238, 0.002537870081141591, 0.6769838929176331, -0.11578524857759476, -0.35944449...
All you need is this: ``` var img = new Image(); img.src = "http://example.com/new/image.jpg"; ``` The browser will quite happily load the image in the background, even though it's not displayed anywhere. Then, when you update the `src` field of another (displayed) image tag, the browser will immediately show the pa...
[ 0.19909827411174774, 0.0856764167547226, 0.7464157938957214, -0.11223594844341278, 0.06078401207923889, -0.3522849977016449, -0.09105414152145386, 0.02401338331401348, -0.3474879562854767, -0.5699800848960876, -0.5421306490898132, 0.5126587748527527, -0.2586776316165924, -0.031148998066782...
As a hobby project I am currently trying to create a small browser-based game - and I thought it would be the "right thing" to code it using the MVC pattern, separating the game's "engine" from presentation. It would be a simple "rpg" game, where the player's character wander the world fighting monsters and gathering i...
[ -0.15307100117206573, -0.03283150494098663, 0.16647717356681824, 0.23881085216999054, -0.07421015948057175, 0.07986755669116974, -0.16013188660144806, -0.02278159372508526, -0.1466469019651413, -0.16980262100696564, -0.10494086146354675, 0.45841023325920105, -0.28927987813949585, 0.2285158...
the actions: travels, attacks, buys items etc. I know there are probably other ways to design such engine, but somehow I can't figure it out, so I'm asking for some tips or advices here. Oh, and the server backend will be php+mysql, if that in any way matters. "but it is a character that does most of the actions:" Ye...
[ -0.2104281485080719, -0.04701455309987068, 0.260832279920578, 0.34850555658340454, -0.23054301738739014, 0.17362821102142334, 0.07732133567333221, -0.21924549341201782, -0.4834243655204773, -0.21477805078029633, -0.09444264322519302, 0.45082980394363403, -0.10280339419841766, -0.2253602892...
character doesn't dominate, the character merely participates. You'll find it more pleasant if you define each possible human-player action as a **Command**. Each subclass of **Command** can make a change to the state of the model. Things move, monsters move, the character moves (character, not player.) Picking somet...
[ -0.37981152534484863, -0.38518887758255005, 0.13235776126384735, 0.26020297408103943, -0.16411766409873962, 0.404050350189209, 0.1557208001613617, -0.14451341331005096, -0.27397897839546204, -0.5535029172897339, -0.5391098856925964, 0.40447717905044556, 0.030943341553211212, -0.00561449257...
the state and association among all the various things in your model. If you want to carry this a step further, each **Command** can be a **Memento** with an undo capability as well as a do capability. Then the history of the game is a history of these **Mementos**.
[ 0.026982378214597702, -0.16516421735286713, 0.016545480117201805, 0.3050503134727478, -0.0327262207865715, 0.1403970718383789, 0.040278010070323944, -0.1342184990644455, -0.3460029363632202, -0.6731247901916504, -0.12273680418729782, 0.411039263010025, 0.03823462873697281, 0.22610592842102...
How can I bring my WPF application to the front of the desktop? So far I've tried: ``` SwitchToThisWindow(new WindowInteropHelper(Application.Current.MainWindow).Handle, true); SetWindowPos(new WindowInteropHelper(Application.Current.MainWindow).Handle, IntPtr.Zero, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); SetForegroun...
[ 0.2169221043586731, -0.16256628930568695, 0.7980467677116394, -0.11846084892749786, 0.14454039931297302, -0.14643332362174988, 0.3875608742237091, -0.3361884355545044, -0.13515229523181915, -0.8213304281234741, -0.2846398949623108, 0.7845430970191956, -0.06389656662940979, 0.03006388619542...
call from a keyboard hook used to implement a hotkey. The call works as expected if I put it into a BackgroundWorker with a pause. It's a kludge, but I have no idea why it wasn't working originally. ``` void hotkey_execute() { IntPtr handle = new WindowInteropHelper(Application.Current.MainWindow).Handle; Back...
[ 0.20493130385875702, -0.21951785683631897, 0.3979440927505493, -0.4780333638191223, 0.5305600762367249, 0.015561804175376892, 0.38335463404655457, -0.20562709867954254, -0.14500002562999725, -0.6154479384422302, -0.3659391701221466, 0.8118878602981567, -0.42317649722099304, 0.4265618026256...
}); bg.RunWorkerAsync(); } ```
[ 0.08536037057638168, 0.08037026226520538, 0.2536265552043915, -0.618848443031311, 0.4942362904548645, -0.3374153673648834, 0.32850030064582825, -0.09207320958375931, -0.10512344539165497, -0.3313378393650055, -0.4626605808734894, 0.8636332154273987, -0.492749959230423, 0.24293114244937897,...
I have a website built in PHP 4 with a framework made by hand by me. The code is 3 years old and I am limited (well it requires a lot of effort to make changes). I decided to do new version of this website. My knowledge has since increased, and now I know that a lot of frameworks exist and that **IOC** is there and **...
[ 0.5541792511940002, 0.6057144403457642, -0.03534873202443123, 0.008809952065348625, -0.2636335790157318, -0.2860085070133209, 0.42479559779167175, -0.024906374514102936, -0.1492600440979004, -0.8279880881309509, 0.4398244321346283, 0.3026905059814453, 0.05065157637000084, 0.066061154007911...
many good IOC and other solutions possible, and, I think that .Net is more mature for developing software with best-practices. I haven't found many good IOC for PHP. As for ORM, I have seen Propel, which looks nice, but haven't found a complete Framework too (Symfony documentation isn't up-to-date, contains lot of err...
[ 0.39629998803138733, 0.2554129958152771, -0.04616466537117958, 0.39076775312423706, -0.22452330589294434, -0.41574910283088684, 0.15666814148426056, 0.18599435687065125, -0.09179884195327759, -0.6260168552398682, 0.36063051223754883, 0.4198726415634155, -0.01535543892532587, -0.31337851285...
more users). The database is normalized too much... etc. * The code isn't bad - business logic is separated of the HTML - but the problem is that controllers are inside the view so it's harder and harder to make some layout changes. * No unit tests have been done, and it's very "stressful" to make change. * There's no ...
[ 0.07516927272081375, -0.12971937656402588, 0.6361555457115173, 0.22511573135852814, -0.24450597167015076, -0.23597875237464905, 0.3699222207069397, 0.2176477015018463, -0.524246335029602, -0.7472907900810242, 0.07700711488723755, 0.5127739906311035, -0.14774082601070404, 0.1010061427950859...
language not for the speed issue but for the tool/framework available. * It's slow because of the database normalisation, too many table that are great in theory but not in practice (we learn from our mistake!) * It's an hobby, but I take it seriously cause I have over 25 000 users registered since the beginning (not a...
[ 0.32670554518699646, 0.14239519834518433, 0.3886607885360718, 0.019797036424279213, -0.19254694879055023, 0.1684468686580658, 0.6636161804199219, 0.39154914021492004, -0.47499004006385803, -0.6074742674827576, 0.3214735686779022, 0.4785063564777374, 0.04428465664386749, -0.0991113632917404...
me for the short term. --- Thx to **nickf** who has spell check all my text. If you made the whole framework yourself, I would suggest you just upgrade it for PHP 5 and go forward from there. Most PHP 4 code will "just work" in PHP 5; the exceptions are code that uses the new reserved words, and code that relies on t...
[ 0.7986568808555603, 0.123488649725914, 0.3680286407470703, 0.04084071144461632, -0.3710049092769623, -0.367324560880661, 0.7136033773422241, 0.20577292144298553, -0.010339610278606415, -0.48388999700546265, 0.040557704865932465, 0.8518317937850952, 0.04285011067986488, -0.07902003079652786...
For a random event generator I'm writing I need a simple algorithm to generate random ranges. So, for example: I may say I want 10 random intervals, between 1/1 and 1/7, with no overlap, in the states (1,2,3) where state 1 events add up to 1 day, state 2 events add up to 2 days and state 3 events add up to the rest....
[ 0.1639021784067154, -0.6170170903205872, 0.09363511949777603, 0.06548596173524857, 0.2086716890335083, 0.1692449301481247, 0.2938854396343231, -0.10759777575731277, -0.24082359671592712, -0.4498998522758484, 0.03346025198698044, 0.011599264107644558, -0.2633194029331207, 0.3900917768478393...
TotalSeconds; } public Interval[] GetRandomIntervals(DateTime start, DateTime end, StateSummary[] sums, int totalEvents) { // insert your cool algorithm here } ``` I'm working on this now, but in case someone beats me to a solution (or knows of an elegant pre-existing algorithm) I'm posting this on SO. Here is m...
[ 0.012039585039019585, -0.2828596532344818, 0.49889233708381653, 0.2007261961698532, 0.07504302263259888, -0.11243297159671783, 0.09895937889814377, -0.010160322301089764, -0.537589967250824, -0.643431544303894, 0.06731852144002914, 0.41413676738739014, -0.09881580621004105, 0.0917088985443...
this.Duration = -1; this.Date = DateTime.MinValue; } public DateTime Date; public long Duration; public int State; } class StateSummary { public StateSummary(StateEnum state, long totalSeconds) { State = (int)state; TotalSeconds = totalSeconds; } public int...
[ 0.04191303253173828, -0.5011160373687744, 0.4338051378726959, 0.032488010823726654, 0.31580349802970886, 0.056006286293268204, 0.2660996615886688, -0.11848536133766174, -0.7416974306106567, -0.1700707972049713, -0.34322166442871094, 0.034201137721538544, 0.08994170278310776, 0.464637368917...
totalEvents) { Random r = new Random(); ArrayList intervals = new ArrayList(); for (int i=0; i < sums.Length; i++) { intervals.Add(new Interval(sums[i].State)); } for (int i=0; i < totalEvents - sums.Length; i++) { intervals.Add(new Interval(sums[r.Next(0,sums.Length)].Sta...
[ -0.3241617679595947, -0.7500430345535278, 0.4917944073677063, -0.36783507466316223, 0.03446274995803833, 0.2781769335269928, 0.18361376225948334, -0.5418105721473694, -0.5126471519470215, -0.34208768606185913, -0.3412918150424957, 0.4368553161621094, -0.2742820680141449, 0.2331222593784332...
if (eventCounts[interval.State] == null) { eventCounts[interval.State] = 1; } else { eventCounts[interval.State] = ((int)eventCounts[interval.State]) + 1; } } foreach(StateSummary sum in sums) {
[ -0.2815791368484497, -0.3544273376464844, 0.113723523914814, -0.2184426337480545, 0.25975826382637024, 0.21787194907665253, 0.37426504492759705, -0.678644061088562, -0.24160295724868774, -0.2875261604785919, -0.1881774216890335, 0.24484975636005402, -0.15473084151744843, 0.1873130798339843...
long avgDuration = sum.TotalSeconds / (int)eventCounts[sum.State]; foreach (Interval interval in intervals) { if (interval.State == sum.State) { long offset = ((long)(r.NextDouble() * avgDuration)) - (avgDuration / 2); interval.Duration = avgDura...
[ -0.11316747218370438, -0.491472065448761, 0.41811466217041016, -0.5417039394378662, 0.24094019830226898, 0.11200422793626785, 0.01868751458823681, -0.5687519907951355, -0.1300085186958313, -0.07258284837007523, -0.2575666010379791, 0.6969952583312988, 0.05440129339694977, 0.159475103020668...
} } } // cap the durations. Hashtable eventTotals = new Hashtable(); foreach (Interval interval in intervals) { if (eventTotals[interval.State] == null) { eventTotals[interval.State] = interval.Duration; }
[ -0.3154740333557129, -0.4766640365123749, -0.006257985718548298, -0.3535195291042328, 0.382032185792923, -0.04388508200645447, 0.10606493800878525, -0.07560648769140244, -0.38932088017463684, -0.2588343322277069, -0.3068050444126129, 0.6097736358642578, -0.1326565444469452, 0.1991291493177...
else { eventTotals[interval.State] = ((long)eventTotals[interval.State]) + interval.Duration; } } foreach(StateSummary sum in sums) { long diff = sum.TotalSeconds - (long)eventTotals[sum.State]; if (diff != 0) { long diffPerInterval = diff
[ -0.23030318319797516, -0.5193426012992859, 0.4151659607887268, -0.29387784004211426, 0.21758919954299927, 0.09002670645713806, 0.20031149685382843, -0.5658809542655945, -0.2796182930469513, -0.0002489903417881578, -0.2671850025653839, 0.34195926785469055, 0.08048044890165329, 0.15503065288...
/ (int)eventCounts[sum.State]; long mod = diff % (int)eventCounts[sum.State]; bool first = true; foreach (Interval interval in intervals) { if (interval.State == sum.State) {
[ -0.086347796022892, -0.4296068251132965, 0.1770155131816864, -0.5488590002059937, 0.3617360591888428, 0.10973457992076874, 0.5038539171218872, -0.5927202701568604, 0.1590983271598816, -0.13725455105304718, -0.39065104722976685, 0.656033456325531, -0.08615345507860184, 0.15107572078704834, ...
interval.Duration += diffPerInterval; if (first) { interval.Duration += mod;
[ 0.02809356339275837, -0.7619138360023499, 0.17889955639839172, -0.5014586448669434, 0.0321340337395668, -0.20654013752937317, 0.4224932789802551, -0.5458623170852661, -0.13238945603370667, -0.17375047504901886, -0.5174270272254944, 1.0099326372146606, -0.313811719417572, 0.1739246994256973...
first = false; } } } } } Shuffle(intervals); DateTime d = start; foreach (Interval interval in intervals) {
[ -0.1026650071144104, -0.4521753489971161, 0.15343917906284332, -0.46764323115348816, 0.5451055765151978, -0.03740110248327255, 0.030813710764050484, -0.20756219327449799, -0.2359473556280136, -0.6566539406776428, -0.3719002306461334, 0.36597174406051636, -0.02020137757062912, 0.35701501369...
interval.Date = d; d = d.AddSeconds(interval.Duration); } return (Interval[])intervals.ToArray(typeof(Interval)); } public static ICollection Shuffle(ICollection c) { Random rng = new Random(); object[] a = new object[c.Count]; c.CopyTo(a, 0); byte[] b = new byte[a.Length]; rng.Ne...
[ 0.08778306841850281, -0.5650532245635986, 0.2786533534526825, -0.17037200927734375, 0.33691301941871643, 0.15887336432933807, -0.1318369060754776, -0.28999578952789307, -0.5527231693267822, -0.313164621591568, -0.04672710970044136, 0.47127416729927063, -0.265116810798645, 0.479143232107162...
Having a problem trying to create a function, as part of a BizTalk helper class that returns a value of type (Microsoft.XLANGs.BaseTypes.XLANGMessage). The function code is as follows: ``` public XLANGMessage UpdateXML (XLANGMessage inputFile) { XmlDocument xDoc = new XmlDocument(); XLANGMessage outputFile; x...
[ -0.23199670016765594, 0.16763554513454437, 0.5662057399749756, -0.24888986349105835, 0.07234793156385422, -0.11794723570346832, 0.3261933922767639, -0.25832274556159973, -0.13581250607967377, -0.4156474471092224, -0.4262049198150635, 0.5403876900672913, -0.5011749267578125, 0.0685665532946...
build error. What am I doing wrong? In the code you have provided, change the line: ``` XLANGMessage outputFile; ``` to: ``` XLANGMessage outputFile = null; ``` and change the `TypeOf` to `typeof` You might want to take a look at these two blog articles [here](http://vijaymodi.wordpress.com/2008/07/19/biztalk-p...
[ -0.030066650360822678, 0.35161954164505005, 0.053245916962623596, -0.1250162124633789, -0.3529030978679657, -0.13479533791542053, 0.4612504839897156, -0.08264274150133133, -0.03014771081507206, -0.3615822196006775, 0.2976425290107727, 0.7567844986915588, -0.37834087014198303, 0.15586571395...
I try to use it in my test harness. Later tonight when I have some free time I'll see if there is an easy way to use the `XLANGMessage` directly in orchestration shapes. Add a comment if you manage to get it working before I update.
[ 0.6109330058097839, -0.06566483527421951, 0.22208228707313538, 0.09902976453304291, 0.024123916402459145, -0.17952103912830353, -0.0880126878619194, 0.14818264544010162, 0.32957690954208374, -0.5101779699325562, 0.258490651845932, 0.4694443941116333, -0.08449533581733704, -0.39249947667121...
I'm looking to create a Visual Studio 2008 template that will create a basic project and based on remove certain files/folders based on options the user enters. Right now, I have followed some tutorials online which have let me create the form to query the user and pass the data into an IWizard class, but I don't know...
[ 0.3685981035232544, -0.012541026808321476, 0.5250687003135681, -0.1700383871793747, -0.1693931519985199, -0.03904666751623154, 0.23834356665611267, -0.5061404705047607, 0.13859303295612335, -0.6796471476554871, 0.04222378134727478, 0.3533247113227844, -0.48345649242401123, 0.09195555746555...
if (!replacementsDictionary.ContainsKey(pair.Key)) replacementsDictionary.Add(pair.Key, pair.Value); else replacementsDictionary[pair.Key] = pair.Value; } } form.Close(); ``` but I'm looking to selectively include files based on the user settings, and if possible, selectively inclu...
[ 0.2931426465511322, -0.0201412420719862, 0.2334456592798233, -0.3792535662651062, 0.28524667024612427, -0.2990441620349884, 0.48979175090789795, -0.3538217842578888, -0.20732852816581726, -0.653517484664917, -0.43789994716644287, 0.5774809122085571, -0.5135138034820557, 0.17849622666835785...
pretty much useless. Instead, you would need to put code in your `ProjectFinishedGenerating` implementation that uses the VS API to remove ProjectItems. In there, you can remove items like this: ``` ProjectItem file = project.ProjectItems.Item("File.cs"); file.Remove(); ```
[ 0.5069417953491211, 0.03757662698626518, 0.14525772631168365, 0.08404184132814407, 0.0520903542637825, -0.46181929111480713, 0.3824408948421478, 0.035184238106012344, -0.29591861367225647, -0.5901575684547424, -0.11092612147331238, 0.3544618487358093, -0.36694392561912537, 0.26003751158714...
I recently switched my hosting provider and due to the time zone that the server is now in, my code has stopped working. The hosting server reports in Pacific time, However, my code needs to work with GMT as my site is for the UK market. So, all my displays and searches need to be in the format dd/MM/yyyy How can I ...
[ 0.431771457195282, 0.1128528043627739, 0.9202343225479126, -0.04832077771425247, 0.16292478144168854, -0.1576240062713623, 0.3353107273578644, 0.4955369830131531, -0.4492383897304535, -0.5280308723449707, 0.009988189674913883, 0.01799958571791649, 0.09313137829303741, 0.5891033411026001, ...
file add `<globalization>` element under `<system.web>` node: ``` <system.web> <globalization culture="en-gb"/> <!-- ... --> </system.web> ```
[ 0.018590180203318596, 0.028936313465237617, 0.539192795753479, 0.1616184264421463, 0.102588951587677, 0.03051943890750408, -0.3699534833431244, 0.19619472324848175, -0.5761038064956665, -0.6434863209724426, -0.33568933606147766, -0.0057558827102184296, -0.28940916061401367, 0.3431860804557...
I wrote a C++ project in VS2005, and used lots of STL container with its plus-in STL. However, I found STL in VS2005 does not have a hash\_map in it, I want to use SGI hash\_map. How can I change my project to use SGI STL? Thanks for Brian's method, it works! And it's simple. VS2005 does have a hash\_map: ``` #includ...
[ 0.08176882565021515, -0.01852314919233322, 0.3289526700973511, -0.0742756798863411, -0.08824354410171509, -0.14621511101722717, 0.3023316562175751, -0.017121447250247, -0.3435324430465698, -0.7421956658363342, -0.10296815633773804, 0.35366272926330566, -0.44603562355041504, 0.0944780409336...
I'm having a hard time understanding some git/DCVS concepts. Here's what happened: 1. I created a git project, and imported it from an SVN repo 2. I made some commits 3. I wanted to experiment something, so I created a branch called **constants-update** 4. I switched to **constants-update**branch, moved some files, de...
[ 0.48349642753601074, -0.38573288917541504, 0.3924184739589691, 0.10524683445692062, -0.11333714425563812, -0.12058179080486298, 0.19299660623073578, 0.2647962272167206, -0.45557641983032227, -0.6010705828666687, -0.009751890785992146, 0.4692936837673187, -0.3463498651981354, 0.398212224245...
has more or less files than the others, as long as I commit my files. I've tried committing with `git commit -a` and switching to master branch, but I have the same error. As a side note, when I commit git warns me that LF will be replaced by CRLF and warns me about some trailing whitespaces also; after I commit I do...
[ 0.27001744508743286, -0.09672808647155762, 0.34412097930908203, -0.13060615956783295, 0.10553961992263794, -0.2881149649620056, 0.2304619699716568, 0.22234877943992615, -0.43798550963401794, -0.8044971227645874, -0.1548910290002823, 0.2968887686729431, -0.2495766282081604, 0.60954689979553...
branch **without losing my changes** in the other branch. I solved the problem [hacking my pre-commit hook](http://www.dont-panic.cc/capi/2007/07/13/git-on-windows-you-have-some-suspicious-patch-lines/) (commenting these lines in `.git/hooks/pre-commit` with a `#`): ``` # if (/\s$/) { # bad_line("trailing ...
[ -0.09499391913414001, -0.25066882371902466, 0.27102163434028625, 0.006963318679481745, 0.1585574448108673, 0.22152380645275116, 0.41148456931114197, 0.23465558886528015, -0.36250296235084534, -0.3696402907371521, 0.08310547471046448, 0.48541054129600525, -0.4760546386241913, 0.012939392589...
I'm getting the memory leak message upon shutdown, saying that I'm leaking 3 of a certain object. Two problems with that, though. 1. It only happens intermittently. I can run my program, go through the exact same series of steps, (open a data file, display it, and shut down again,) and sometimes the message will show ...
[ 0.32653748989105225, 0.0819593071937561, 0.306838721036911, -0.06164603307843208, -0.05585616081953049, -0.20963749289512634, 0.6245105266571045, 0.0448288731276989, -0.40327975153923035, -0.539089024066925, -0.3305627703666687, 0.5592973232269287, -0.10309433192014694, 0.29365789890289307...
I instantiate a lot more than three objects of the parent class. And no exceptions get raised during cleanup.) Adding tracing outputs to the constructor and destructor for this class show that every object created is destroyed, even with the memory manager reporting otherwise. So I can only conclude that this is a fal...
[ 0.41942793130874634, -0.10141094774007797, 0.07314091175794601, 0.11630169302225113, -0.15264549851417542, -0.19785290956497192, 0.6000965237617493, 0.021689314395189285, -0.3003263771533966, -0.731880784034729, -0.07763765007257462, 0.5415838360786438, -0.23142695426940918, 0.173029750585...
Map file construction in Linker options, define conditional symbol FullDebugMode and rebuild the program. Then go through your steps. On program termination, it should generate file programname\_\_MemoryManager\_\_EventLog.txt with information on where in the program the leaked object was constructed.
[ 0.05327218398451805, -0.14384369552135468, 0.2376169115304947, -0.05360904708504677, 0.253376305103302, -0.25442901253700256, 0.30767932534217834, -0.08304300159215927, -0.16876162588596344, -0.728134036064148, -0.4945538640022278, 0.6150161623954773, 0.04719260707497597, 0.135730028152465...
We have an application that does single sign-on using a centralized authentication server (CAS). We'd like to do single sign-out, such that if the user logs out of one application (say a front-end portal), the user is automatically signed out of all applications using the same single sign-on ticket. The expectation wo...
[ 0.36546581983566284, -0.06279776990413666, 0.44492480158805847, 0.31007304787635803, 0.2412189394235611, -0.2982659339904785, -0.08521877229213715, -0.00593335647135973, -0.3764796555042267, -0.5682060122489929, -0.14305751025676727, -0.17521286010742188, -0.12720796465873718, 0.0449890159...
this: is there a way to abandon an InProc session from a different session? I presume, since the HTTP request will be coming from the CAS server, that it will get its own session, but it is the session of the user that I want to terminate. I have pretty good idea of how to do this using a separate session state server,...
[ 0.3555275797843933, -0.04921218752861023, -0.005419085267931223, 0.041824545711278915, 0.291415810585022, -0.17593367397785187, 0.3412925601005554, 0.1916825771331787, -0.30605417490005493, -0.16568684577941895, 0.06259618699550629, 0.40814444422721863, -0.2829955816268921, 0.4092680811882...
use InProc session. Basically, it consists of extending the HttpModule that already handles single sign-on to detected CAS sign outs and redirect the browser to the application sign out page. Outline: Sign-On: 1. For each new single sign-on request, create a new SSO cookie and encode a unique value in it to identify...
[ 0.3797719478607178, -0.053701091557741165, 0.365450918674469, -0.24942490458488464, 0.000046244735131040215, -0.2009325474500656, 0.245805025100708, -0.4012739658355713, 0.12697923183441162, -0.682124674320221, -0.4433096945285797, 0.29597121477127075, -0.2844108045101166, -0.1695063114166...
be pinned in the cache at least long enough for the session to expire naturally. 2. For each request, look for the SSO cookie and check its value against the cached, signed-out session identifiers. If there is a hit, remove the SSO cookie and redirect the browser to the application's sign-out url. 3. For each sign-out,...
[ 0.06826990097761154, 0.1243184506893158, 0.5757752656936646, -0.017087751999497414, 0.16343411803245544, -0.10047208517789841, 0.4681732952594757, -0.11807344853878021, -0.27611595392227173, -0.6526378989219666, -0.6106277704238892, 0.27922898530960083, -0.4024403393268585, 0.1431914567947...
the sign out page.
[ 0.23323041200637817, 0.37825942039489746, 0.26787352561950684, 0.0001846542436396703, -0.06140393391251564, -0.2167176753282547, -0.06043228507041931, 0.1841002255678177, -0.18956248462200165, -0.3290756046772003, 0.12200263142585754, 0.13401548564434052, -0.12761597335338593, 0.1271030902...
In my fieldset I have labels next (side) to my textboxes, but for some reason, they are towards the top and not middle. Here is my CSS for the fieldset: ``` fieldset { clear: both; font-size: 100%; border-color: #000000; border-width: 1px 0 0 0; border-style: solid none none none; padding: 10px; margin: ...
[ -0.01899167150259018, 0.20211993157863617, 0.7346524596214294, -0.022000040858983994, -0.2284904420375824, 0.3509020507335663, 0.2350742071866989, -0.2678224742412567, -0.07235914468765259, -0.6063461899757385, -0.04521330073475838, 0.32385188341140747, -0.10951165109872818, -0.04379167407...
for the label element. You may need to increase or decrease it.
[ 0.5111711621284485, -0.1870936155319214, 0.006752656307071447, -0.010428440757095814, 0.1261446475982666, 0.016189372166991234, 0.0943639799952507, -0.2627604305744171, -0.19439546763896942, -0.2251090407371521, 0.03091931715607643, 0.6689642071723938, -0.3510468900203705, -0.0262403991073...
I'm using this script to display all the images in a folder, but I can't figure out how to get each image's file name to display underneath it. Any suggestions? ``` <?php $dirname = "images"; $images = scandir($dirname); $ignore = Array(".", "..", "otherfiletoignore"); foreach($images as $curimg){ if (!in_array(...
[ 0.10587026923894882, 0.05987706407904625, 0.5035369396209717, -0.395252525806427, -0.08703416585922241, 0.19047172367572784, 0.38011959195137024, -0.3293059170246124, -0.321230411529541, -0.5263059139251709, -0.18991893529891968, 0.49183693528175354, -0.6513165831565857, 0.0079814363270998...
I am writing a console application which makes use of the F1 key (for help). Unfortunately, while Konsole (of KDE) doesn't use this key, Gnome Terminal does, so the F1 key becomes inaccessible to my application. I don't think there's a way to detect whether the F1 key is already mapped in the GUI side of things (Gnome ...
[ 0.07858539372682571, 0.28897005319595337, 0.1474013328552246, 0.09135063737630844, -0.1651008129119873, -0.0596964955329895, 0.278089314699173, 0.2600954473018646, 0.031123997643589973, -0.4993109703063965, 0.027037717401981354, 0.6558741927146912, 0.03892160952091217, -0.06099260225892067...
this from within Ruby, but if it can be done via shell or environment variables, or virtual filesystem (/proc, /dev, etc.) then that will suffice. I'm hoping for a reliable way to do this, but I can settle for "best guess" approaches like grepping the environment variables for clues that can let me reasonably assume t...
[ 0.3114962875843048, -0.1682533174753189, 0.2702770233154297, 0.00850116740912199, 0.010099797509610653, -0.02138338051736355, 0.32330626249313354, 0.07997656613588333, -0.14331385493278503, -0.48462778329849243, -0.02724449709057808, 0.6741148233413696, -0.24346308410167694, 0.029287690296...
environment variable to 'gnome-terminal'.
[ -0.48694488406181335, -0.20937557518482208, 0.20071548223495483, -0.2361457794904709, 0.05521807447075844, 0.34046471118927, 0.035852041095495224, 0.5385292172431946, -0.05813504755496979, -0.5321786403656006, -0.23459842801094055, 0.5232719779014587, -0.43455344438552856, 0.41270089149475...
I am using windsor DI framework in one of my MVC project. The project works fine when I tried to run from Visual Studio 2008. But when i tried to run the project creating an application in IIS7 then I recieved the following error message: > Looks like you forgot to register the http module > Castle.MicroKernel.Lifes...
[ 0.44852587580680847, 0.17401123046875, 0.38579437136650085, -0.14769673347473145, 0.04328998178243637, -0.11148102581501007, 0.4806097745895386, -0.49998319149017334, -0.36921587586402893, -0.6068181991577148, 0.3406941592693329, 0.5693742632865906, -0.32641980051994324, 0.3378553986549377...
well? ``` <configuration> <system.web> <httpModules> <add name="PerRequestLifestyle" type="..." /> </httpModules> </system.web> <system.webServer> <modules> <add name="PerRequestLifestyle" type="..." /> </modules> </system.webServer> </configurati...
[ 0.15975560247898102, 0.06923257559537888, 0.8455024361610413, -0.19936251640319824, 0.16478781402111053, -0.046206340193748474, 0.1542210429906845, -0.7058321237564087, -0.37806910276412964, -0.3126460611820221, 0.18638017773628235, 0.6836807727813721, 0.05212943255901337, 0.05476156249642...
I've read the description of "functionoids" [here](https://isocpp.org/wiki/faq/pointers-to-members#functionoids). They look like a poor-man's version of Boost::function and Boost::bind. Am I missing something? Is there a good reason to use them if you're already using Boost? No. Alternatively see the FQA answer [here...
[ 0.13206104934215546, 0.07775353640317917, -0.07921825349330902, -0.16964031755924225, -0.2744317054748535, -0.02244211919605732, 0.12309719622135162, 0.09282378852367401, -0.24570035934448242, -0.3137083351612091, -0.21096135675907135, 0.5902055501937866, -0.47996899485588074, -0.105110064...
I recently installed VS 6.0 after installing VS 2008 and overwrite JIT settings .. when i started VS 2008 option dialog .. it said another debugger has taken over VS 2008 debugger and I asked me to reset .. so I did .. Now everything works fine except javascript debugging. I am unable to debug javascript .. I can set ...
[ 0.05721401423215866, 0.26063331961631775, 0.6225245594978333, -0.14927808940410614, -0.24532674252986908, -0.05183085799217224, 0.8094635009765625, -0.3294964134693146, -0.2225661277770996, -0.5841490030288696, 0.06669053435325623, 0.8535409569740295, -0.26526233553886414, 0.19011095166206...
Visual Studio 2008 and see if that solves this problem
[ -0.294118195772171, 0.07575136423110962, 0.19838222861289978, 0.26651766896247864, -0.4895230829715729, 0.021694961935281754, 0.3130339980125427, -0.09437751770019531, -0.2119845300912857, -0.29996827244758606, 0.17398475110530853, 0.5905094146728516, 0.07269608974456787, -0.21290083229541...
POSIX environments provide at least two ways of accessing files. There's the standard system calls `open()`, `read()`, `write()`, and friends, but there's also the option of using `mmap()` to map the file into virtual memory. When is it preferable to use one over the other? What're their individual advantages that mer...
[ -0.30436399579048157, 0.06471478193998337, 0.08554672449827194, -0.051878444850444794, 0.005886806175112724, 0.30632689595222473, -0.18039457499980927, -0.05378645285964012, -0.6149433255195618, -0.9165176749229431, -0.07249141484498978, 0.5149100422859192, -0.11381489038467407, -0.3059601...
allows the operating system to optimize paging operations. For example, consider two programs; program `A` which reads in a `1MB` file into a buffer creating with `malloc`, and program B which `mmaps` the 1MB file into memory. If the operating system has to swap part of `A`'s memory out, it must write the contents of t...
[ -0.2106861174106598, -0.02438761480152607, 0.0290219746530056, 0.12381213158369064, 0.18879519402980804, 0.08747681975364685, 0.02374241128563881, -0.028900694102048874, -0.20658035576343536, -0.621006965637207, -0.44390809535980225, 0.38503125309944153, -0.2397174835205078, -0.17967700958...
by initially marking writable `mmap`'d pages as read only and catching [seg faults](https://en.wikipedia.org/wiki/Segmentation_fault), similar to [Copy on Write](https://en.wikipedia.org/wiki/Copy-on-write) strategy). `mmap` is also useful for [inter process communication](https://en.wikipedia.org/wiki/Inter-process_...
[ -0.07983490079641342, 0.16584868729114532, 0.1267542988061905, -0.00833174679428339, -0.3548603057861328, 0.050430335104465485, 0.052436646074056625, -0.41917717456817627, -0.4258427619934082, -1.0883476734161377, -0.5131417512893677, 0.12249709665775299, -0.512695848941803, -0.07091946899...