text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
red, the a:hover color is lost, i.e. when a user moves the cursor on to the links, they will stay red, not turn black as I expected. Since I see what jQuery does is put an inline style to `<a`>s within #foo, makes them into `<a style="color:red;" href="..."`>, I guess this will overwrite the :hover pseudo-class. As th...
[ -0.0662849172949791, 0.1915072500705719, 0.6385462880134583, -0.4015657603740692, -0.10594810545444489, 0.10961040109395981, 0.17899028956890106, -0.022852197289466858, -0.2604938745498657, -0.597851037979126, -0.06884612888097763, 0.6146050691604614, -0.41440293192863464, 0.37283658981323...
function(){ $(this).css("color", "blue");} ) ``` ? thanks. !important seems to make css property stronger than inline style, at least in Firefox. Try to change your styles to something like this: ``` #foo a:hover { color: black !important; } ```
[ 0.2585323452949524, 0.1032654345035553, 0.3017313778400421, -0.2178836166858673, 0.02558005601167679, -0.0709860771894455, 0.1774277240037918, -0.017750209197402, -0.18561981618404388, -0.6089362502098083, -0.19180774688720703, 0.6855134963989258, -0.5105434060096741, -0.1140751913189888, ...
What is the simplest way to suppress any output a function might produce? Say I have this: ``` function testFunc() { echo 'Testing'; return true; } ``` And I want to call testFunc() and get its return value without "Testing" showing up in the page. Assuming this would be in the context of other code that *do...
[ 0.7309471964836121, 0.16026803851127625, 0.18002766370773315, -0.14498786628246307, 0.1751750111579895, -0.34720584750175476, 0.4461442828178406, -0.16588227450847626, 0.1622074395418167, -0.1835481822490692, 0.0739353820681572, 0.7518612146377563, -0.48032131791114807, 0.17491848766803741...
but where you call it, you could wrap it around your whole script or the script flow, but you can make it as "tight" as possible by just wrapping it around the call of the method): ``` function foo() { echo "Flush!"; return true; } ob_start(); $a = foo(); ob_end_clean(); ``` And no output is generated.
[ 0.11244789510965347, -0.2760484218597412, 0.29764634370803833, -0.4765446186065674, 0.44277244806289673, -0.11011643707752228, 0.390661358833313, -0.4539477527141571, -0.1750173717737198, -0.23056897521018982, -0.27851876616477966, 0.6499223709106445, -0.6706866025924683, -0.01718195155262...
I'm using the [JQuery Cycle Plugin](http://malsup.com/jquery/cycle/) in an attempt to fade in/out images for a slide show. I am able to get it working in Firefox and Safari, however, when I view in Internet Explorer, I see very unexpected behavior. In Internet Explorer, the cycling is happening as expected, but some o...
[ 0.4656999111175537, 0.0034374778624624014, 0.2891451418399811, -0.22722108662128448, -0.32484811544418335, -0.04286123812198639, 0.17994579672813416, -0.09716290980577469, -0.6917238235473633, -0.8038025498390198, 0.17331142723560333, 0.30054229497909546, -0.48525696992874146, 0.1148286014...
lost here. Can anyone verify my situation? Has anyone seen anything like this before? It didnt show in chrome which leads me to think it's a corrupted jpg, i opened it up in notepad++ and noticed a bunch of xml/non-binary data, it could just be a comment or something but i dont know, maybe that info will help with the ...
[ 0.40622949600219727, 0.1962718814611435, 0.017265792936086655, 0.537239134311676, 0.17061573266983032, -0.38697442412376404, 0.04538193717598915, 0.20641034841537476, -0.12266828119754791, -0.4646982252597809, 0.22753970324993134, 0.27339833974838257, -0.24280180037021637, 0.28238150477409...
is a little more information on it here: <http://osdir.com/ml/video.image-magick.user/2002-09/msg00477.html>
[ -0.11966077983379364, -0.19196893274784088, 0.5867127180099487, -0.1020839661359787, -0.06455303728580475, -0.26680639386177063, 0.19973911345005035, 0.08866660296916962, -0.8509528040885925, -0.16549408435821533, -0.04889875277876854, 0.36504390835762024, 0.20843881368637085, 0.1479238420...
I am in the middle of a project targeting mobile phones (more like pocket PCs). I couldn't find a way to (reliably) access the front camera on any platform (I've tried Android, J2ME and Windows Mobile), let alone capture video from said camera. Can anyone provide any insight on how to achieve this on Windows Mobile, S...
[ 0.4373542368412018, 0.031515758484601974, 0.4669947922229767, 0.13322344422340393, 0.05774952098727226, -0.09904812276363373, 0.3826146721839905, -0.1282002180814743, -0.21790748834609985, -0.43188172578811646, -0.06252537667751312, 0.6561427116394043, -0.04065115749835968, 0.1155704557895...
front camera simply initialize using camera index 1 (index 0 is the back camera): ``` m_pCamera = CCamera::NewL(*this, 1) ``` Although make sure that the device does have a front camera using CCamera::CamerasAvailable() (if it has a front camera and a back camera then that call will return 2). For J2ME check out th...
[ 0.30471479892730713, 0.17779120802879333, 0.9506329298019409, -0.1338893324136734, -0.05026094615459442, -0.33344632387161255, 0.13598287105560303, -0.44639620184898376, -0.27150803804397583, -0.4214560091495514, -0.4835973083972931, 0.8004241585731506, -0.23687052726745605, -0.12789928913...
Is Synapse ready for a Delphi 2009 production applications? Their website doesn't look like it's been updated in a while: <http://www.ararat.cz/synapse/doku.php> Is the project dead? I have been using the latest version from the SVN repository without any problems in a commercial application compiled with Delphi 2009.
[ -0.017988966777920723, 0.20154418051242828, 0.12881894409656525, -0.0017606873298063874, 0.013802831992506981, 0.06282994151115417, 0.051973678171634674, 0.1500622183084488, -0.29433417320251465, -0.3665615916252136, -0.13129645586013794, 0.28912633657455444, -0.42246007919311523, 0.039166...
I have 3 divs with 2 possible image tags for each (active or inactive). If one div is clicked to be active the other divs must be set to inactive. How do I accomplish this with img tags and what happens if user has javascript disable? Do you mean something like this? ``` <div class="block" id="block1"> <img src='i...
[ 0.22595153748989105, -0.12352495640516281, 0.3871873617172241, -0.2066734880208969, -0.2985592186450958, 0.08257164806127548, 0.34887421131134033, -0.38222265243530273, -0.031497128307819366, -0.8636515736579895, -0.20021075010299683, 0.38436633348464966, -0.6111608743667603, 0.04436116665...
$('#block2').find('img').attr('src', 'inactive_block2.jpg'); $('#block3').find('img').attr('src', 'inactive_block3.jpg'); $(this).find('img').attr('src', 'active_' + $(this).attr('id') + '.jpg'); }); }); ``` With the above, if you have `inactive_block1.jpg`, `inactive_block2.jpg`, `inactive_block3.j...
[ 0.0701799988746643, -0.06705335527658463, 0.3087666630744934, 0.16866113245487213, -0.027166705578565598, -0.10130833089351654, 0.20389343798160553, -0.25755298137664795, -0.1671399027109146, -0.34863731265068054, -0.7052322626113892, 0.7441438436508179, -0.17055243253707886, -0.2572376132...
Say I want to check if a record in a MySQL table exists. I'd run a query, check the number of rows returned. If 0 rows do this, otherwise do that. ``` SELECT * FROM table WHERE id=5 SELECT id FROM table WHERE id=5 ``` Is there any difference at all between these two queries? Is effort spent in returning every column...
[ 0.23811514675617218, 0.22137776017189026, 0.3040493130683899, 0.1443118155002594, -0.10205182433128357, 0.12125153094530106, -0.05920051783323288, -0.24352064728736877, -0.27087679505348206, -0.4971703886985779, 0.1991402953863144, 0.32000496983528137, -0.45029115676879883, 0.2561963200569...
anything and just increment a variable each time it finds a match (easier than usual)? I think I'm making a lot of false assumptions about how MySQL works, but that's the meat of the question! Where am I wrong? Educate me, Stack Overflow! Optimizers are pretty smart (generally). They typically only grab what they need...
[ 0.3840218782424927, 0.07191162556409836, 0.028658123686909676, 0.039832018315792084, 0.09612978994846344, -0.18099933862686157, -0.052388571202754974, -0.2838449776172638, -0.04614000767469406, -0.21223300695419312, 0.2527555823326111, 0.6642151474952698, -0.30511537194252014, -0.224830567...
For a simple example of using a NSMutableArray of strings called rows, what do I have to implement in my table controller to move the tableView rows and have the changes reflected in my array? Here we do our heavy lifting. ``` - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPat...
[ -0.0916748195886612, -0.1434672474861145, 0.8694742321968079, -0.174685999751091, 0.014902802184224129, 0.07589133828878403, 0.0890612006187439, -0.26296040415763855, -0.2599242329597473, -0.781671404838562, 0.045794740319252014, 0.574643611907959, -0.24899937212467194, 0.1544310599565506,...
removeObjectAtIndex:fromIndexPath.row]; // insert the object at the target row [rows insertObject:r atIndex:toIndexPath.row]; NSLog(@"result of move :\n%@", [self rows]); } ``` Since this is a basic example, lets make all the rows moveable. ``` - (BOOL)tableView:(UITableView *)tableView canMoveRowAtInd...
[ -0.2406087964773178, -0.08401637524366379, 0.473802387714386, -0.1153230294585228, -0.024422306567430496, -0.07572201639413834, 0.26816585659980774, -0.13220655918121338, -0.12245135009288788, -0.4934271574020386, -0.05352480337023735, 0.3575131893157959, -0.5599462389945984, 0.14820605516...
I've got a list of about 30 `<li>` in a `<ul>`. Is there any way, using CSS, to divide these into three columns of ten? In CSS3 this is [possible](http://www.quirksmode.org/css/multicolumn.html). ```css #columns { -moz-column-count: 3; -moz-column-gap: 20px; -webkit-column-count: 3; -webkit-column-gap: 20px; ...
[ 0.022605033591389656, 0.1538994312286377, 0.6875680088996887, -0.17717665433883667, -0.2013475000858307, 0.3713357448577881, 0.034479714930057526, -0.4121176600456238, -0.49870139360427856, -0.6880965828895569, -0.04521935433149338, 0.2101522833108902, -0.1792067140340805, 0.01455500815063...
It seems to me that whenever a GUI (Graphical User Interface) is involved, the look and feel of the interface nearly always trumps the performance of the application. Is this a universal phenomenon? Sufficiently bad looks trump any level of good performance. Sufficiently bad performance trumps any level of good looks...
[ 0.1868525743484497, 0.38992664217948914, 0.134836345911026, 0.2013617902994156, -0.011867315508425236, 0.004500743001699448, 0.48711031675338745, 0.2316817045211792, -0.1316317915916443, -0.7220318913459778, -0.15262311697006226, 0.8150631785392761, -0.2113536298274994, 0.00896109547466039...
I'm creating a fast application with ruby on rails, and after doing a lot of scaffolding and validation I'm very happy with some of the features that are embeded in RoR... but I live in Mexico and all my users would love the application to be in Spanish of course. So, I noticed theres a lot of functions that write actu...
[ 0.6045442223548889, 0.3869258761405945, 0.04092492535710335, 0.18736997246742249, 0.22322002053260803, -0.21709401905536652, 0.5276575088500977, 0.7397230267524719, 0.043726060539484024, -0.31488698720932007, 0.2885170578956604, 0.43823060393333435, 0.1482035219669342, -0.24225692451000214...
of language file I could edit (or even download one in Spanish). After all, the books I'm reading and the tutorials (and webcast) I'm following to learn this new framework are all in English (and fail to include this problem). Here you can find a nice [sample app](http://github.com/karmi/rails_i18n_demo_app/tree/master...
[ 0.1618712842464447, -0.005091748666018248, -0.23947109282016754, 0.20611949265003204, -0.12883301079273224, -0.12066600471735, 0.7804582118988037, 0.14731328189373016, -0.21192620694637299, -0.738766610622406, -0.028278563171625137, 0.4445224404335022, -0.08029081672430038, -0.101899102330...
I've got a bug from one of our customers and believe that the problem lies with **MSVCR80.DLL v8.0.50727.3053** - a version which I cannot find for download anywhere, however a [google search](http://google.com/search?q=MSVCR80.DLL+8.0.50727.3053) turns up plenty of other crash reports. Latest version on my system (an...
[ -0.14776504039764404, 0.24406641721725464, 0.3697968125343323, 0.012991962023079395, 0.21385760605335236, -0.09978698194026947, 0.5296421647071838, 0.2707337439060211, -0.3003554046154022, -0.6318344473838806, -0.2224922627210617, 0.46629801392555237, -0.42229095101356506, 0.15670005977153...
damn, that wasn't the problem after all :( A thread on the MSDN forums [pointed out the answer](http://social.msdn.microsoft.com/Forums/en-US/windowsworkflowfoundation/thread/5d57e3b1-80c0-43c2-8eab-0b7c4fe168e2/): msvcr80.dll version 8.0.50727.3053 is included in [.NET Framework 3.5 SP1](http://www.microsoft.com/downl...
[ -0.21571537852287292, 0.04327913373708725, 0.4512120485305786, 0.36194565892219543, 0.0790991485118866, -0.08584332466125488, 0.47386130690574646, -0.018693959340453148, -0.49931031465530396, -0.44729694724082947, -0.17105300724506378, 0.5790096521377563, -0.17746011912822723, 0.2015739232...
One of apps I take care of in checking a Oracle DB table every x seconds to see if there are new data to process (other real-time app is populating it). Our new client business process forces our real-time up to populate this table with lots of records in a same time (say 10 000), but just few times a day. Next time ...
[ 0.36819154024124146, 0.18543481826782227, 0.24333858489990234, 0.3628641963005066, 0.029650425538420677, 0.02878342941403389, 0.13210555911064148, 0.11019086092710495, -0.46025776863098145, -0.6865577101707458, 0.38634487986564636, 0.3731784224510193, -0.22897589206695557, 0.07835320383310...
number of record the app gets from Oracle, next time it will pick another 50 (or whatever) etc. How can I limit in Oracle SQL the number of returned records? Order matters! ``` select * from cool_table where date >= to_date('200901010000', 'YYYYMMDDhh24mi') order by seq_nr, entry_dts; ``` ``` select * from (...
[ 0.00689616147428751, 0.28624725341796875, 0.6925725936889648, 0.05660669878125191, 0.30872637033462524, 0.26137202978134155, 0.2007027119398117, -0.3298482596874237, -0.42177140712738037, -0.4975428581237793, -0.4345909357070923, 0.5890939235687256, -0.19576449692249298, -0.041597221046686...
I'm just starting to learn C++ so you'll have to bear with my ignorance. Is there a way to to declare functions such that they can be referenced without being written before the function that uses them. I'm working with one cpp file (not my decision) and my functions call themselves so there is not really a proper orde...
[ 0.6086898446083069, 0.048798076808452606, 0.09427250921726227, 0.19090959429740906, 0.1990003138780594, -0.19207046926021576, 0.19623583555221558, 0.1962081789970398, -0.2695382535457611, -0.39321449398994446, 0.06992276757955551, 0.48488399386405945, -0.1363285481929779, -0.01599895022809...
function **prototypes** before you implement them. A function prototype names a function, its return type, and the type of its arguments. The only thing that needs to be above the call to your function is the prototype. Here's an example: ``` // prototype int your_function(int an_argument); // ... // here you can wri...
[ -0.0694558322429657, 0.17015764117240906, -0.20301663875579834, -0.20050114393234253, -0.11729033291339874, 0.44153741002082825, 0.10767217725515366, -0.11441009491682053, -0.03456799313426018, -0.8342299461364746, 0.17938268184661865, 0.1275128275156021, -0.46584710478782654, 0.3344829976...
I am trying to serialize an Exception object in C#. However, it appears that it is impossible since the Exception class is not marked as [`[Serializable]`](https://msdn.microsoft.com/en-us/library/system.serializableattribute). Is there a way to work around that? If something goes wrong during the execution of the app...
[ 0.09841683506965637, 0.21699661016464233, 0.14886635541915894, -0.1205233708024025, 0.06573168933391571, -0.20261317491531372, 0.5580477714538574, 0.11111005395650864, -0.1880445033311844, -0.6411861181259155, -0.14898626506328583, 0.33849555253982544, -0.45066043734550476, 0.2547095417976...
{ get; set; } public string StackTrace { get; set; } public Error() { this.TimeStamp = DateTime.Now; } public Error(string Message) : this() { this.Message = Message; } public Error(System.Exception ex) : this(ex.Message) { this.StackTrace = ex.StackTrace; ...
[ -0.13637185096740723, -0.3511897623538971, 0.5404819846153259, -0.23305000364780426, 0.39516395330429077, -0.07208043336868286, 0.5573388338088989, -0.2897847294807434, -0.3059992790222168, -0.3196571469306946, -0.5365145802497864, 0.6446504592895508, -0.2895680069923401, 0.202148690819740...
return this.Message + this.StackTrace; } } ```
[ -0.260772705078125, 0.0731649175286293, 0.28351351618766785, -0.3200095295906067, 0.23978736996650696, -0.23743899166584015, 0.3474638760089874, -0.06136055663228035, -0.22578585147857666, -0.5544865727424622, -0.25067850947380066, 0.6552872061729431, -0.5702604651451111, 0.177827790379524...
Does the Python shelve module have any protection built in to make sure two processes aren't writing to a file at the same time? The shelve module uses an underlying database package (such as dbm, [gdbm](http://docs.python.org/library/gdbm.html#module-gdbm) or bsddb) . The [*restrictions* pragraph](http://docs.python....
[ -0.06566876173019409, 0.06464436650276184, 0.1512385457754135, -0.20412950217723846, -0.17700617015361786, -0.11716441065073013, 0.093000128865242, -0.39701545238494873, -0.4488171935081482, 0.02569972164928913, -0.2912609279155731, 0.40869227051734924, -0.08478101342916489, 0.283142238855...
the database implementation used. Conclusion: it depends on OS and the underlying DB. To keep things portable, do not build on concurrency.
[ 0.03275922313332558, 0.09320692718029022, 0.23841078579425812, 0.41503846645355225, -0.1214250698685646, -0.22120876610279083, 0.05590106174349785, -0.09170449525117874, 0.20725789666175842, -0.526580274105072, 0.01447593979537487, 0.39925217628479004, -0.17378568649291992, 0.0491955354809...
In an SSRS report: I am specifying the footer's background image using an expression, so that the image on the first page is different from other pages. The images are stored as part of the project, and are displaying correctly, however I get this warning ``` Build complete -- 0 errors, 0 warnings [rsInvalidImageR...
[ 0.3207468092441559, 0.0489187091588974, 0.3860144317150116, 0.03374263271689415, 0.11039017885923386, 0.09651367366313934, 0.4308725595474243, -0.026895517483353615, -0.32529696822166443, -0.45012691617012024, 0.11256043612957001, 0.10990961641073227, -0.5056872367858887, 0.048216450959444...
an absolute path?** I need to use relative paths within the project as I cant control where this is getting rolled out to. --- The expression I'm using to select the image for the Footer/BackgroundImage/Value property is: ``` = IIf(Globals!PageNumber.Equals(1), "image1.png", "image2.png") ``` Also, I've tried sett...
[ 0.0688333809375763, -0.2236253321170807, 0.801301121711731, 0.03212309256196022, -0.06079750880599022, -0.09993588924407959, 0.13191409409046173, -0.25901976227760315, 0.05898561328649521, -0.8308507204055786, 0.1326781064271927, 0.8767857551574707, -0.33081337809562683, -0.204347640275955...
/> ``` section as well. If you're trying to float just the ul inside of the div you might as well scrap the div. If you need the clear for some other reason you can do a ``` <br clear="all"/> ```
[ 0.28281381726264954, 0.17894256114959717, 0.5288451910018921, 0.030307132750749588, -0.4949831962585449, -0.3911500573158264, -0.26696839928627014, 0.044556453824043274, -0.08657015115022659, -0.47685495018959045, -0.32538551092147827, 0.5062283277511597, -0.2643493711948395, 0.06604284048...
I am getting above error in some machines but not in some machines while accessing the documents. More information in your question might help, but after a quick google I found [this forum](http://forums.isaserver.org/fb.aspx?m=2002054360) which may answer your question (there appears to be a hotfix that may help).
[ 0.36556240916252136, 0.2305660992860794, 0.11968465894460678, 0.35251301527023315, 0.18616706132888794, -0.15333782136440277, 0.4687732756137848, 0.11665327847003937, -0.21376502513885498, -0.603904128074646, 0.23932553827762604, 0.16371893882751465, 0.1690685898065567, -0.0727418884634971...
In magento, I have SEO url rewriting enabled, and it is working fine - apart from: * tags (showing as site/tag/product/list/tagId/1/) * reviews (showing as, for example site/review/product/list/id/1/) * RSS feeds (showing as site/rss/catalog/category/cid/3/sid/1/) How come this is not SEO’d? and what will be the solu...
[ 0.3028807044029236, 0.09050275385379791, 0.904400110244751, 0.0751497745513916, -0.2791166603565216, -0.5701948404312134, -0.09103787690401077, -0.10545045137405396, -0.167698934674263, -0.5633333921432495, 0.04170933738350868, 0.5859035849571228, -0.10435625910758972, -0.34403088688850403...
When defining a customer-accessible API, what is the preferred industry practice between the following: **a)** Defining a set of **explicit** API methods, each with a very narrow and specific purpose, for example: ``` SetUserName <name> SetUserAge <age> SetUserAddress <address> ``` **b)** Defining a set of m...
[ 0.4238814115524292, 0.11962439119815826, 0.3957260251045227, -0.41229116916656494, 0.1803397834300995, 0.10184738039970398, 0.06567759811878204, 0.021272221580147743, -0.0514310784637928, -0.49066439270973206, -0.3071414828300476, 0.3743886649608612, -0.23751887679100037, -0.04697454348206...
more readable code. For example, a method called EnableDisableFoo which takes a boolean parameter indicating whether to enable or disable would not be very clear, nor have a cohesive purpose. It's where there are multiple options that the problem gets more complicated. *In favour of (b)* Option (b) is a great way o...
[ 0.20678254961967468, -0.14793507754802704, 0.01082520466297865, 0.35709255933761597, -0.07358228415250778, -0.2933056056499481, 0.18136820197105408, -0.02854129485785961, -0.27037957310676575, -0.8763000965118408, -0.3394430875778198, 0.6252515316009521, -0.38424161076545715, -0.2973539829...
option (b) worse from a usability standpoint -- but maybe having less methods is a good thing, so even this isn't completely true. *Other thoughts* It's necessary to strike a good balance between usability and extensibility, and they are often at odds with each other. But I'd like to think there is a more objective w...
[ 0.45916056632995605, 0.07111199200153351, -0.04580087959766388, 0.15253078937530518, 0.07510033994913101, 0.04046028479933739, 0.4180549085140228, -0.013894769363105297, -0.09895563870668411, -0.3905453681945801, 0.03860217332839966, 0.814359188079834, -0.13953043520450592, -0.394894808530...
introducing a risk for runtime errors. For example, I could set an attribute of type age with a value that is actually a string, etc. This is very similar to the argument for defining and using enums or explicit types rather than using and returning ints in the old C style, as you get one more level of assurance. Wh...
[ 0.39012956619262695, 0.17128689587116241, -0.19319912791252136, -0.09958639740943909, -0.11802311986684799, -0.19002848863601685, 0.43077147006988525, -0.0788358673453331, -0.008607166819274426, -0.36673471331596375, 0.00541673693805933, 0.5350419878959656, -0.3753816485404968, 0.229159995...
accept anything, including extensions.
[ 0.23418639600276947, 0.05573035776615143, 0.3400932550430298, 0.1295177936553955, 0.03540205582976341, -0.30852779746055603, 0.012809661217033863, 0.17754912376403809, 0.2567726969718933, -0.2992342412471771, -0.37647369503974915, -0.0034133722074329853, -0.17584633827209473, -0.0416798591...
We have a user experience designer in our team who has no programming background. He is expected to design screens within Eclipse as a development environment. His (valid) complaint is that every time he designs a specific screen and gives it to development - they tell him what is not possible technically using either ...
[ 0.8734591007232666, 0.3042704463005066, 0.0240743700414896, 0.09506552666425705, -0.09477285295724869, -0.15321208536624908, -0.15504446625709534, -0.2484806329011917, 0.012687372043728828, -0.8779438138008118, 0.16411852836608887, 0.5908920168876648, -0.18096838891506195, -0.1384963542222...
not be constrained by technical possibilities and in theory, everything that the designer dreams of (at least the practical things) should be possible technically - albeit with workarounds or a little hacking. So, my question is this - how important do you think is programming knowledge for user interface design? And ...
[ 0.4825415015220642, 0.2581096589565277, -0.05261791869997978, 0.4055132269859314, -0.02851804904639721, -0.27559220790863037, 0.2385369837284088, -0.07757563143968582, -0.1618967354297638, -0.7473567128181458, 0.004618093371391296, 0.8028225302696228, 0.13149617612361908, -0.32188892364501...
for the platform is required (text fields, combo boxes, radio buttons, etc). A good designer should be familiar with the capabilities and limitations of these GUI components, from a developer's point of view. So I guess some basic programming knowledge would be useful. > My personal belief is that design > should not...
[ 0.2865111231803894, 0.3034062683582306, 0.13503234088420868, 0.3509075343608856, 0.26636773347854614, -0.008121805265545845, 0.2519158720970154, 0.047027382999658585, 0.024070709943771362, -0.7462994456291199, -0.15771536529064178, 1.053067922592163, -0.03715934604406357, -0.38003215193748...
what constitutes good GUI design, and it's beneficial for your product that you follow them because the user has a certain mental model of how he or she should interact with applications on that platform. (Having said that, there may be good reasons for breaking some design conventions, e.g. in games, specialized graph...
[ 0.39267125725746155, 0.1724078357219696, -0.14917194843292236, 0.4139210283756256, 0.060188617557287216, -0.23797743022441864, 0.16224828362464905, -0.03429458290338516, -0.05931025743484497, -0.7085204124450684, 0.15106217563152313, 1.0351369380950928, 0.029318658635020256, -0.50094050168...
step to acquaint oneself with them.
[ -0.027252638712525368, 0.029029084369540215, -0.23131997883319855, 0.005846445914357901, -0.3171541392803192, 0.1577378660440445, 0.6458252668380737, -0.3123286962509155, -0.14053994417190552, -0.6366870403289795, 0.1963849812746048, 0.0017358340555801988, 0.03300662711262703, -0.194172024...
I am trying to develop a Roulette game for iPhone. How can I animation (spin) the Roulette board? I have no idea how to do this in cocos2d (or even what that is), but you can do this using Core Animation either with CALayers or UIViews. Probably the simplest way would be to create a UIImageView containing an image of y...
[ 0.2776110768318176, 0.02240917831659317, 0.6592729091644287, 0.13330252468585968, -0.09437553584575653, 0.2720116376876831, -0.09886539727449417, -0.12529999017715454, -0.17633852362632751, -0.5718880891799927, 0.2211569994688034, 0.42065128684043884, -0.15972928702831268, 0.08936076611280...
= [CABasicAnimation animationWithKeyPath:@"transform"]; rotationAnimation.toValue = [NSValue valueWithCATransform3D:rotationTransform]; rotationAnimation.duration = 0.25f; rotationAnimation.cumulative = YES; rotationAnimation.repeatCount = 10; [rotatingImage.layer addAnimation:rotationAnimation forKey:@"rotationAnim...
[ 0.2262033075094223, -0.39684924483299255, 0.6420772075653076, -0.23832863569259644, -0.1568237841129303, 0.25695061683654785, 0.18881212174892426, -0.31067588925361633, -0.265010803937912, -0.4477376341819763, 0.013791913166642189, 0.3113766610622406, 0.2656486928462982, 0.4173738956451416...
quarter-circle. Likewise, if you used (0.999f \* pi), the circle would rotate in a clockwise manner. You'll want to implement acceleration and deceleration of your wheel, and for those a CAKeyframeAnimation would take the place of the CABasicAnimation in this example.
[ -0.15668757259845734, -0.22072327136993408, 0.34842586517333984, -0.11190669238567352, -0.22379536926746368, 0.4213762879371643, 0.014597621746361256, -0.4618617296218872, -0.11925327777862549, -0.43944472074508667, 0.1841513216495514, 0.3721044361591339, 0.005649550352245569, 0.4593049883...
I use a lot of scala maps, occasionally I want to pass them in as a map to a legacy java api which wants a java.util.Map (and I don't care if it throws away any changes). An excellent library I have found that does a better job of this: <http://github.com/jorgeortiz85/scala-javautils> (bad name, awesome library). Yo...
[ 0.06392940133810043, -0.24325966835021973, 0.39439326524734497, -0.10674095898866653, 0.04634031653404236, -0.16870330274105072, 0.18680645525455475, 0.0928955152630806, -0.4500691294670105, -0.7914539575576782, 0.08468462526798248, 0.4607032835483551, -0.028472954407334328, 0.131405338644...
VB has operators [AndAlso](http://msdn.microsoft.com/en-us/library/cb8x3kfz(VS.80).aspx) and [OrElse](http://msdn.microsoft.com/en-us/library/ea1sssb2(VS.71).aspx), that perform **short-circuiting** logical conjunction. Why is this not the default behavior of **And** and **Or** expressions since short-circuiting is u...
[ 0.12053382396697998, -0.23051221668720245, 0.2943538725376129, -0.20816293358802795, -0.2115858942270279, -0.2840246260166168, 0.18272104859352112, -0.3163175582885742, -0.40250080823898315, 0.05931674689054489, -0.38178083300590515, 0.6139824390411377, -0.47755762934684753, -0.14388148486...
and add new bitwise operators named BitAnd, BitOr, BitXor and BitNot (the last two being for completeness). However, during one of the betas it became obvious that this was a pretty bad idea. A VB user who **forgets that the new operators exist** and uses And when he means BitAnd and Or when he means BitOr would get co...
[ 0.4083167314529419, -0.17963671684265137, 0.1035427525639534, -0.06352738291025162, -0.1884956806898117, 0.07018795609474182, 0.24919813871383667, -0.39511242508888245, 0.01309667993336916, -0.27818799018859863, -0.24673505127429962, 0.6233400702476501, -0.5604720711708069, 0.0213375519961...
``` > .h file: NSString *myString; @property (nonatomic, retain) NSString *myString; > .m file: self.myString = [[NSString alloc] init]; ``` If i'm not wrong i will end up with an NSString instance with retain count of +2. Right? I'm curious because Apple's example for Location uses "self." for initialization. Why?...
[ -0.008420286700129509, 0.2521006166934967, 0.46291959285736084, -0.2213505506515503, 0.17476016283035278, -0.021887309849262238, 0.4810398817062378, -0.09362681955099106, -0.19516904652118683, -0.4318046569824219, -0.23518379032611847, 0.7510088682174683, 0.04026201739907265, 0.14049664139...
is passed in. If you were to simply set: ``` myString = x; ``` in the .m file, you would bypass all of that hidden property setting code, and simply set the myString member variable to a pointer to x.
[ -0.3421902358531952, -0.13148561120033264, 0.5883437395095825, -0.09446710348129272, 0.16861213743686676, -0.1578218787908554, 0.06222222000360489, -0.033016979694366455, 0.16677725315093994, -0.4962843358516693, -0.2892138361930847, 0.16868455708026886, -0.3531649112701416, 0.535938560962...
I am trying to compare two .NET arrays. Here is an obvious implementation for comparing arrays of bytes: ``` bool AreEqual(byte[] a, byte[] b){ if(a.Length != b.Length) return false; for(int i = 0; i < a.Length; i++) if(a[i] != b[i]) return false; return true; } ``` A more re...
[ 0.31326672434806824, 0.04559144750237465, 0.16254083812236786, -0.3782527446746826, -0.2611965537071228, 0.17061056196689606, 0.29702162742614746, -0.4671349823474884, -0.01292533427476883, -0.8067178726196289, 0.30391860008239746, 0.7842100858688354, -0.35790735483169556, -0.0933525636792...
the most efficient way compare two .NET arrays? Kathy's approach seems a good one to me. I'd personally allow the comparer to be specified explicitly: ``` bool AreEqual<T>(T[] a, T[] b) { return AreEqual(a, b, EqualityComparer<T>.Default); } bool AreEqual<T>(T[] a, T[] b, IEqualityComparer<T> comparer) { // H...
[ 0.070772685110569, 0.010949757881462574, -0.008061840198934078, -0.25495901703834534, -0.3152150809764862, 0.41703560948371887, 0.2248116135597229, -0.5437015891075134, 0.12617895007133484, -0.7160653471946716, 0.22011308372020721, 0.8776801824569702, -0.31848734617233276, -0.1545538008213...
} if(a.Length != b.Length) { return false; } for(int i = 0; i < a.Length; i++) { if(!comparer.Equals(a[i], b[i])) { return false; } } return true; } ``` SequenceEqual as mentioned by CMS is good, but due to its generality over `IEnumerable<T>`
[ 0.06488238275051117, -0.16912364959716797, 0.5531468987464905, -0.3731401860713959, -0.009922013618052006, 0.03525831177830696, 0.20447991788387299, -0.4731742739677429, -0.05504437908530235, -0.4839966297149658, 0.053077202290296555, 0.5411384701728821, -0.2458452433347702, 0.210045456886...
I don't think it can do the "early out" if the length aren't equal. (It's possible that it checks for both sequences implementing IList though, to check Count directly.) You could generalise a little more, to use `IList<T>` ``` bool AreEqual<T>(IList<T> a, IList<T> b, IEqualityComparer<T> comparer) { if(a.Count !=...
[ 0.07592296600341797, -0.3288381099700928, 0.2468329221010208, -0.363040566444397, -0.20875895023345947, 0.16415587067604065, 0.3962937891483307, -0.5413494110107422, 0.2680482268333435, -0.6438838839530945, 0.19149890542030334, 0.6214878559112549, -0.3436974287033081, -0.001272186636924743...
return false; } } return true; } ``` The straight array version will probably be the most efficient - adding generality and abstraction usually hits performance, although whether it's *significant* will depend on your app.
[ 0.18272481858730316, 0.21409374475479126, 0.31290385127067566, -0.05930091813206673, -0.15639080107212067, -0.17293022572994232, 0.34030699729919434, -0.0518028549849987, 0.15401366353034973, -0.5039412379264832, -0.3096112608909607, 0.7103332877159119, -0.27037784457206726, -0.17809158563...
I have a controller build for a web application with a web presentation. But now I need to create a iphone (mobile phone) version of this application. Basically this is a blog application with comments. In the regular version comments are loaded at the same time as the entry. But on the mobile application I want to co...
[ 0.21032239496707916, -0.5168575644493103, 0.4868301451206207, 0.38954272866249084, -0.4443228244781494, -0.1274692714214325, 0.06957951188087463, -0.046542007476091385, -0.5333312153816223, -0.673894464969635, 0.262906551361084, 0.5358127951622009, -0.43506187200546265, -0.1153757870197296...
the regular version the other manage the mobile version. I open to other ideas. BTW I use Zend Framework. Kathy's approach seems a good one to me. I'd personally allow the comparer to be specified explicitly: ``` bool AreEqual<T>(T[] a, T[] b) { return AreEqual(a, b, EqualityComparer<T>.Default); } bool AreEqual...
[ 0.05685538053512573, 0.15214970707893372, 0.2606852650642395, -0.37967702746391296, -0.2530058026313782, 0.34985020756721497, 0.29570332169532776, -0.2516830563545227, 0.13712602853775024, -0.6815500259399414, 0.12973318994045258, 1.0243514776229858, -0.2164476364850998, -0.175287157297134...
return false; } if(a.Length != b.Length) { return false; } for(int i = 0; i < a.Length; i++) { if(!comparer.Equals(a[i], b[i])) { return false; } } return true; } ``` SequenceEqual as mentioned by CMS
[ 0.10556637495756149, -0.02212517336010933, 0.4825999438762665, -0.3248971998691559, 0.05350780487060547, 0.21675564348697662, 0.17526301741600037, -0.5293571949005127, -0.11050838232040405, -0.4425264894962311, -0.0146627863869071, 0.5330783128738403, -0.2798384428024292, 0.390009552240371...
is good, but due to its generality over `IEnumerable<T>` I don't think it can do the "early out" if the length aren't equal. (It's possible that it checks for both sequences implementing IList though, to check Count directly.) You could generalise a little more, to use `IList<T>` ``` bool AreEqual<T>(IList<T> a, IList...
[ -0.02786875329911709, -0.28296276926994324, 0.3620321750640869, -0.3760601878166199, -0.16447323560714722, 0.014872796833515167, 0.251475989818573, -0.5759427547454834, 0.2209191918373108, -0.6667194366455078, 0.06305725127458572, 0.5835046768188477, -0.2726287245750427, -0.217558100819587...
{ return false; } } return true; } ``` The straight array version will probably be the most efficient - adding generality and abstraction usually hits performance, although whether it's *significant* will depend on your app.
[ 0.18215185403823853, 0.20824258029460907, 0.37953826785087585, -0.059809379279613495, -0.12884338200092316, -0.16413988173007965, 0.3231249749660492, -0.07390464097261429, 0.10762495547533035, -0.5584085583686829, -0.2898167371749878, 0.7260634303092957, -0.26142388582229614, -0.1920240223...
I have a very bad feeling about using lock in my code but now the Dispatcher of WindowBase exists and I want to use it everywhere. For example I use a multi thread singleton WCF service who publish events on the EventAggregator of PRISM, the payload is immutable (it is just data) and every thread with a dispatcher can...
[ 0.27140194177627563, -0.21543686091899872, 0.2150057852268219, 0.37818512320518494, -0.401653528213501, -0.39101770520210266, 0.1584017276763916, 0.04118784889578819, -0.5144822001457214, -0.7889819741249084, -0.012354806065559387, 0.32624882459640503, -0.35489025712013245, 0.1666777133941...
problem is that this Dispatcher is coupled with WPF so I feel a bit guilty when I use it everywhere, I feel that the dispatcher was not created for my use case in mind. Does it exist another Dispatcher implementation not coupled with WPF ? or that's OK to abuse it ? Thanks, **Update** The solution that Paul Stovell...
[ -0.12095284461975098, 0.08609431982040405, 0.3192775249481201, 0.6183248162269592, -0.0876971110701561, -0.02328968420624733, 0.4112294316291809, -0.3259649872779846, -0.16994088888168335, -0.8191594481468201, 0.37875980138778687, 0.619724690914154, -0.5024704933166504, -0.1707587540149688...
to it, I don't have to use the Dispatcher of WPF in my tests). Using the Dispatcher instead of a BackgroundWorker make sense, because I'm using a multi publisher / subscriber pattern (with PRISM), and thanks to the Dispatcher every event handler are called on threads who subscribe them to the event. This means that th...
[ 0.017609644681215286, -0.07157795876264572, 0.27837127447128296, 0.3859594762325287, -0.2716444134712219, -0.18268617987632751, 0.16950193047523499, -0.18695016205310822, -0.45328983664512634, -0.5480991005897522, 0.008221494033932686, 0.4133397042751312, -0.25714704394340515, 0.2279493510...
threads and don't know about each other (they only know about events they subscribe and publish). The background worker will make sense, when I will make some calls from my UI to a repository. But I hope to find a design without using BackgroundWorker because I prefere to use this subscriber/publisher pattern (I thin...
[ 0.18017984926700592, -0.0796206146478653, 0.3000278174877167, 0.4143088161945343, 0.1890549212694168, -0.3539603650569916, 0.07647377252578735, 0.0036835097707808018, -0.021061552688479424, -0.6525726318359375, 0.019948961213231087, 0.5734865069389343, -0.35962387919425964, 0.0990882590413...
or WPF. Testing it [also possible](http://blogs.msdn.com/jaredpar/archive/2008/08/25/simple-class-for-tests-involving-a-synchronizationcontext.aspx). Solution 2 ---------- Think of the dispatcher as being just another service. As you use PRISM, you are familiar with services and IOC. Here is how such a service may b...
[ 0.3027406334877014, -0.3277547359466553, 0.4214036166667938, 0.46271637082099915, -0.24059437215328217, -0.28707197308540344, 0.35674285888671875, -0.44473138451576233, -0.05587597191333771, -0.7457103729248047, -0.21695077419281006, 0.48102399706840515, -0.23988375067710876, -0.0737433955...
is an example of [IDispatcher](http://www.codeplex.com/bindablelinq/SourceControl/changeset/view/25046#293215), a [WPF implementation](http://www.codeplex.com/bindablelinq/SourceControl/changeset/view/25046#293214) and a [test implementation](http://www.codeplex.com/bindablelinq/SourceControl/changeset/view/25046#29960...
[ 0.3722310960292816, -0.1710258275270462, 0.07597918063402176, 0.19167062640190125, -0.16676115989685059, -0.4259454309940338, -0.0636763796210289, -0.6641518473625183, -0.11932993680238724, -0.9121010303497314, -0.25760120153427124, 0.09421030431985855, -0.20551519095897675, 0.063522957265...
What sync mechanism should I use to give exclusive access to the text file in boost? The file will likely be accessed by threads from only one process. If you are sure it will only be accessed from one process, a read-write lock with file handles in thread local storage could be a solution. That would simulate the abov...
[ 0.14388658106327057, -0.13566891849040985, 0.6192111968994141, 0.3706170320510864, -0.05911284685134888, -0.07782191038131714, -0.031351059675216675, -0.16924943029880524, -0.07088195532560349, -0.4399980306625366, 0.14741234481334686, 0.9390676021575928, -0.18441228568553925, -0.024341432...
What are some cool applications for custom attributes in CLR/C# code that you've done or heard about? Also interesting new uses of the standard attributes is also ok! **Edit:** Since Java's annotations seems to be the same as CLR's attrbutes, uses of Java annotations is also valid. * [postsharp](http://www.postsharp.o...
[ 0.12649492919445038, 0.09906315803527832, 0.3059828579425812, 0.40082722902297974, -0.09207284450531006, -0.2730724811553955, 0.054700516164302826, -0.32071706652641296, -0.273722380399704, -0.34251153469085693, -0.059188537299633026, 0.3951803743839264, -0.1189255565404892, 0.071797907352...
members
[ 0.27444159984588623, -0.031142158433794975, -0.06525079905986786, -0.3086130619049072, 0.008083771914243698, 0.16769108176231384, -0.002004514215514064, -0.017572201788425446, -0.5831160545349121, -0.13973014056682587, -0.3186897337436676, 0.04235348105430603, -0.12310166656970978, 0.38427...
How do you add a destructor to a custom made class made in C# so as to destroy it when it's not needed anymore? Read [this](http://msdn.microsoft.com/en-us/library/system.object.finalize(VS.71).aspx). But you might consider implementing IDisposable which usually offers a more elegant solution. Go [here](http://www.dev...
[ 0.5869571566581726, -0.40257683396339417, 0.05669151991605759, 0.2680567800998688, 0.2420993149280548, -0.49387580156326294, 0.42532533407211304, -0.1159939095377922, -0.179815411567688, -0.666814923286438, -0.22569571435451508, 0.7094091773033142, -0.42723384499549866, -0.0692153126001358...
I've the code below written in JavaScript to add a new option to the select list from the opener window: ``` function updateSelectList() { var field = opener.document.objectdata.ticketPersonId; if (true && opener && field) { var val = document.createElement('option'); var title = document.o...
[ 0.10168568044900894, -0.0890679657459259, 0.7887144088745117, -0.16515658795833588, 0.26400062441825867, 0.1711324155330658, 0.30071815848350525, -0.3205071985721588, 0.17530252039432526, -0.9376768469810486, -0.22324351966381073, 0.6130033135414124, -0.262371689081192, 0.19914135336875916...
= null; val.selected = true; field.add(val, null); } } ``` works all fine in Firefox, Google Chrome etc but not IE 6 :-( please advise how I can make this work in IE 6 aswell. Here's my snippet: ``` if (oldopt!=null || !horus.brokenDOM) select.add(newopt, oldopt); else newopt=options[options...
[ -0.15373453497886658, 0.0998714342713356, 0.5239205956459045, -0.31007054448127747, 0.28415796160697937, 0.040169812738895416, 0.4591820538043976, -0.13732483983039856, -0.1978575587272644, -0.5859329104423523, -0.5404096841812134, 0.7075878381729126, -0.2732774615287781, -0.15123338997364...
I wonder if there is some neat way to intercept xml request send during java webservice method invocation and xml given in response? I don't want to print those xmls to standard output but to "catch" them in some string. Yes, normally you use a soap proxy like [soapUI](http://www.soapui.org/). Simply point your webserv...
[ 0.4323715567588806, -0.017774013802409172, 0.05407121777534485, 0.08897342532873154, -0.29676371812820435, -0.27804720401763916, 0.23330967128276825, 0.17799735069274902, -0.017897382378578186, -0.7504631876945496, 0.22440533339977264, 0.3909338116645813, -0.11777991056442261, 0.2060706913...
I am trying to port a windows project that includes boost 1.37 and wxwidgets to the Mac. It compiles ok, but the linker gives me a "file is not of required architecture for architecture ppc" error for libz.1.dylib and the same message as a warning a few other libraries. I also get a "duplicate dylib" warning for libz.1...
[ -0.023685071617364883, 0.18107333779335022, 0.3350411355495453, -0.0757780522108078, 0.017302926629781723, -0.09136322140693665, 0.6042999029159546, -0.2596592307090759, 0.15052323043346405, -0.6884816288948059, -0.2825091779232025, 0.6491832137107849, -0.4108591079711914, -0.0016090649878...
/Developer/usr/bin/g++-4.0 -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk "-L/Users/adriangrigore/Documents/Gemsweeper Mac/Gemsweeper MacOS/Gemsweeper Mac/build/Debug" -L/Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib -L/opt/local/lib "-F/Users/adriangrigore/Documents/Gemsweeper Mac/Gemsweeper MacOS/Gemsweeper Mac/...
[ -0.6616297960281372, 0.3888523578643799, 0.3272758424282074, -0.09531324356794357, 0.053942300379276276, 0.325079083442688, 0.3614501655101776, -0.291569322347641, -0.05813680216670036, -0.19067886471748352, -0.5561836361885071, 0.686136782169342, -0.14737682044506073, -0.26592957973480225...
/Users/adriangrigore/Documents/Gemsweeper Mac/Gemsweeper MacOS/Gemsweeper Mac/build/Gemsweeper Mac.build/Debug/Gemsweeper Mac.build/Objects-normal/i386/ParticleLayers.o, file is not of required architecture ld warning: in /Users/adriangrigore/Documents/Gemsweeper Mac/Gemsweeper MacOS/Gemsweeper Mac/build/Gemsweeper Mac...
[ -0.5994316935539246, 0.3266914486885071, 0.5784478187561035, 0.014501598663628101, 0.15440599620342255, -0.1433209925889969, 0.6219297051429749, -0.39875030517578125, -0.10147800296545029, -0.3749890625476837, 0.011967416852712631, 0.39650997519493103, -0.4032595753669739, -0.1483505964279...
plattform, so any help would be greatly appreciated! Thanks, Adrian From the messages you've got, most of Gemsweeper Mac and libboost have been compiled with only ppc as architecture. You should configure Xcode to generate universal binaries and probably recompile libboost through MacPorts. Recent MacPorts have a "u...
[ 0.16024070978164673, 0.03071908839046955, 0.11215899139642715, 0.29816749691963196, -0.2288779616355896, -0.2848302125930786, 0.2173701673746109, 0.17812034487724304, -0.15537790954113007, -0.7487846612930298, -0.008270174264907837, 0.46977174282073975, -0.3254965841770172, -0.102373473346...
In a web application that makes use of AJAX calls, I need to submit a request but add a parameter to the end of the URL, for example: Original URL: > <http://server/myapp.php?id=10> Resulting URL: > <http://server/myapp.php?id=10>**&enabled=true** Looking for a JavaScript function which parses the URL looking at ...
[ 0.009018088690936565, -0.05578973516821861, 0.5188015699386597, -0.1866007298231125, -0.35695406794548035, 0.11128270626068115, 0.17632104456424713, -0.3070748448371887, -0.04325392097234726, -0.4665985703468323, -0.3314586579799652, 0.34078243374824524, -0.24032729864120483, 0.07682866603...
= document.location.search.substr(1).split('&'); let i=0; for(; i<kvp.length; i++){ if (kvp[i].startsWith(key + '=')) { let pair = kvp[i].split('='); pair[1] = value; kvp[i] = pair.join('='); break; } } if(i >= kvp.length){
[ 0.1415281444787979, -0.22298677265644073, 0.6496753692626953, -0.21150578558444977, 0.2929636836051941, -0.01743023842573166, 0.3520895838737488, -0.7913674116134644, -0.16302120685577393, -0.40647947788238525, -0.8128161430358887, 0.2615739703178406, -0.14701378345489502, 0.32145196199417...
kvp[kvp.length] = [key,value].join('='); } // can return this or... let params = kvp.join('&'); // reload page with new params document.location.search = params; } ``` This is approximately twice as fast as a regex or search based solution, but that depends completely on the length of the querys...
[ -0.2641502916812897, -0.30731862783432007, 0.8991379141807556, -0.2228056639432907, -0.2654886841773987, 0.25996145606040955, 0.5269652009010315, -0.9310054183006287, -0.4357169568538666, -0.3842226266860962, -0.5220391154289246, 0.29902833700180054, -0.3496038317680359, 0.0102482605725526...
var kvp = key+"="+value; var r = new RegExp("(&|\\?)"+key+"=[^\&]*"); s = s.replace(r,"$1"+kvp); if(!RegExp.$1) {s += (s.length>0 ? '&' : '?') + kvp;}; //again, do what you will here document.location.search = s; } ```
[ 0.012317880988121033, -0.2913467586040497, 0.9893640279769897, -0.4300527572631836, 0.31426939368247986, 0.10455251485109329, 0.4742445647716522, -0.7001450657844543, -0.34505510330200195, -0.5165770053863525, -0.8065129518508911, 0.585902988910675, -0.2040068656206131, 0.28237292170524597...
How can I program graphics on a graphics card with XNA? (How do I move the workload onto the graphics card) Explained in a very simplified way: All of the graphics are automatically drawn by the graphics card. There is no software rendererer mode in XNA. The way XNA is set up most geometry is transferred to the grap...
[ 0.20990078151226044, -0.2569253146648407, 0.3833558261394501, 0.14321261644363403, -0.2600363790988922, 0.1293344348669052, -0.0637667328119278, -0.20100833475589752, -0.15234529972076416, -0.7171019315719604, -0.0009468677453696728, 0.5475792288780212, -0.14217762649059296, -0.19451883435...
You should also delve into the details of the graphics pipeline to understand better how graphic cards work.
[ 0.6124334931373596, 0.19072438776493073, 0.24399791657924652, 0.38410887122154236, 0.04894233122467995, -0.3613961637020111, -0.33729279041290283, 0.19396767020225525, -0.3223133683204651, -0.7556442022323608, 0.09778595715761185, 0.5181522965431213, 0.33369120955467224, -0.140297800302505...
How do I get just the children of an XElement? I am currently using the XElement.Descendants() function, which returns all levels of XElements, rather than just the child nodes. What I would really like is an IEnumerable of just the children. The immediate child elements of one [XElement](http://msdn.microsoft.com/en...
[ 0.23527677357196808, -0.01718868687748909, 0.29622694849967957, 0.3078303933143616, 0.39572805166244507, 0.39366188645362854, -0.19970698654651642, -0.23885095119476318, -0.1179409921169281, -0.7731521725654602, -0.2652100920677185, 0.04205101728439331, 0.01997184008359909, 0.2558154463768...
I am designing a table in the database which will store log entries from the application. There are a few things which is making me think about this design more than usual. * However these log entries will be used at runtime by the system to make decisions so they need to be relatively fast to access. * They also have...
[ 0.6180947422981262, 0.21286703646183014, 0.3899562954902649, 0.03968987241387367, 0.08342733979225159, 0.11820965260267258, 0.269136518239975, -0.03739113360643387, -0.6584770083427429, -0.8919190764427185, 0.2007073014974594, 0.5348570346832275, 0.29138877987861633, 0.10873755067586899, ...
all of them for much longer than 45 days for support & legal issues, likely atleast 2 years. * The table design is fairly simple, all simple types (no blobs or anything), where possible will use the database engine to put in the default data, at most one foreign key. * If it makes any difference the database will be Mi...
[ 0.16229556500911713, 0.24980725347995758, 0.7265018820762634, 0.17224673926830292, 0.12353266775608063, 0.009705244563519955, 0.20050126314163208, -0.09314669668674469, -0.16390782594680786, -0.6103686094284058, -0.20153053104877472, 0.2922568917274475, 0.05809899792075157, -0.017925467342...
any tips, tricks or suggestions for the database/table design to make sure this works as well as possible? Also if you think it's a bad idea please let me know, and what you think a better idea would be. Some databases offer "partitions" (Oracle, for example). A partition is like a view which collects several tables wi...
[ 0.4202236235141754, 0.055705372244119644, 0.06886926293373108, 0.4875361919403076, 0.2953765094280243, -0.05736352503299713, -0.14534705877304077, 0.1628934144973755, -0.5650801658630371, -0.6063448190689087, -0.020705077797174454, -0.04015505686402321, 0.043057721108198166, 0.340807706117...
you can run full table commands (like truncate, drop, delete from table (without a condition), load/dump, etc.) against them in an efficient manner. If you can't have a partition, you get a similar effect with views. In this case, you can collect several tables in a single view and redefine this view, say, once a mont...
[ -0.16142848134040833, -0.07333378493785858, 0.20320194959640503, 0.0645892545580864, -0.21675601601600647, -0.23363196849822998, -0.03211299702525139, -0.03433015197515488, -0.6863204836845398, -0.41299116611480713, -0.17799560725688934, 0.48466071486473083, -0.2904621958732605, 0.16305609...
Edition) supports partitions. Thanks to [Mitch Wheat](https://stackoverflow.com/users/16076/mitch-wheat)
[ -0.6832202672958374, -0.08188605308532715, 0.16536585986614227, 0.09496351331472397, 0.17990262806415558, -0.16157867014408112, 0.18989846110343933, -0.18660588562488556, -0.28242751955986023, -0.8557933568954468, -0.3211023211479187, -0.07249677926301956, -0.3628234565258026, 0.0880447626...
I am quite new in Perl and I woud like to know which of the following loops is more efficient: ``` my @numbers = (1,3,5,7,9); foreach my $current (@numbers){ print "$current\n"; } ``` or ``` my @numbers = (1,3,5,7,9); foreach (@numbers){ print "$_\n"; } ``` I want to know this in order to know if the use...
[ 0.17246374487876892, 0.10877707600593567, 0.41974130272865295, -0.24158594012260437, -0.013227387331426144, -0.0481904000043869, 0.3620127737522125, -0.10660333931446075, -0.05070170387625694, -0.351637065410614, 0.0743270069360733, 0.48408883810043335, -0.3015843331813812, 0.0002398530632...
is the root of all evil* ``` { local $\ = "\n"; print foreach @numbers; } ``` but some expectations can be wrong. Test is little bit weird because output can make some weird side-effects and order can be important. ``` #!/usr/bin/env perl use strict; use warnings; use Benchmark qw(:all :hireswallclock); use co...
[ 0.17242924869060516, -0.009916388429701328, 0.4413006007671356, -0.2398967295885086, 0.07252808660268784, 0.18822121620178223, 0.7598458528518677, 0.018147993832826614, 0.06848755478858948, -0.5937298536300659, -0.04377094283699989, 0.2733258903026581, -0.40825748443603516, 0.3974719047546...
foreach my $current (@numbers) { print "$current\n"; } }, loop2 => sub { foreach (@numbers) { print "$_\n"; } }, loop3 => sub { local $\ = "\n"; print
[ -0.35217660665512085, -0.16663751006126404, 0.4503189027309418, -0.2941689193248749, 0.2399725466966629, 0.2995340824127197, 0.2824191451072693, -0.01355691347271204, -0.17596618831157684, -0.18459424376487732, -0.03634382039308548, 0.2307436615228653, -0.33523476123809814, 0.2114920318126...
foreach @numbers; } ); sub permutations { return [ map { my $a = $_; my @f = grep {$a ne $_} @_; map { [$a, @$_] } @{ permutations( @f ) } } @_
[ -0.27822238206863403, -0.07449942827224731, 0.5650886297225952, -0.42151176929473877, 0.26922905445098877, 0.5453065037727356, 0.16737650334835052, -0.4326378405094147, -0.1548522710800171, -0.8278650045394897, -0.34720635414123535, 0.32155928015708923, -0.5179883241653442, 0.2536874413490...
] if @_; return [[]]; } foreach my $p ( @{ permutations( keys %tests ) } ) { my $result = { map { $_ => no_out { sleep 1; countit( 2, $tests{$_} ) } } @$p }; cmpthese($result); } ``` One can expect that loop2 should be faster than loop1 ```
[ 0.43106240034103394, -0.1380365937948227, 0.2533707320690155, -0.2599296569824219, 0.3017408847808838, -0.15484346449375153, 0.6173077821731567, -0.3807876408100128, -0.4391748905181885, -0.5799333453178406, -0.19026921689510345, 0.21991002559661865, -0.2436714768409729, 0.0499256961047649...
Rate loop2 loop1 loop3 loop2 322/s -- -2% -34% loop1 328/s 2% -- -33% loop3 486/s 51% 48% -- Rate loop2 loop1 loop3 loop2 322/s -- -0% -34% loop1 323/s 0% -- -34% loop3 486/s 51% 50% -- Rate loop2 loop1 loop3 loop2 323/s -- -0% -33% loop1 324/s
[ -0.2717754542827606, 0.014810439199209213, 0.20823557674884796, 0.16584649682044983, -0.5692484378814697, 0.7341114282608032, 0.9450480341911316, -0.5919666886329651, -0.4595561623573303, -0.4054524898529053, -0.0383196622133255, -0.2798711061477661, -0.2966756522655487, -0.118092022836208...
0% -- -33% loop3 484/s 50% 49% -- Rate loop2 loop1 loop3 loop2 317/s -- -3% -35% loop1 328/s 3% -- -33% loop3 488/s 54% 49% -- Rate loop2 loop1 loop3 loop2 323/s -- -2% -34% loop1 329/s 2% -- -33% loop3 489/s 51%
[ -0.18227170407772064, -0.016486110165715218, 0.2906295657157898, 0.2048967182636261, -0.29141369462013245, 0.8126630187034607, 1.0110418796539307, -0.40224489569664, -0.24560955166816711, -0.35348060727119446, -0.07626143097877502, -0.4363683760166168, -0.17917487025260925, 0.0613831132650...