text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
features. However, it is easy to extend the Lua core since (nearly) any platform that has a file system also supports DLLs or shared libraries. Lua File system is a portable library that adds support for directory iteration, file attribute discovery, and the like. With lfs, emulating some of the capability of DIR in ...
[ -0.18332985043525696, -0.31883692741394043, 0.6759300231933594, -0.35026052594184875, 0.009756205603480339, 0.1273370236158371, -0.22219577431678772, -0.2205018848180771, -0.10174722969532013, -0.9398804903030396, -0.16845552623271942, 0.5159085392951965, -0.36878401041030884, 0.0626993030...
directory 2009-04-02 13:23 0 .. directory 2009-04-02 13:18 0 foo.txt file 2009-02-23 01:56 0 t-lfs.lua file 2009-04-02 13:18 241 E:...> ``` If your copy of Lua came from [Lua for Windows](http://www.keplerproject.org/luafilesystem/), then you already have lfs ...
[ 0.19712845981121063, 0.08097784221172333, 0.7682213187217712, -0.2941136360168457, 0.1516759693622589, 0.07582253217697144, -0.24832655489444733, 0.2305765450000763, -0.3155144155025482, -0.5560819506645203, -0.14348497986793518, 0.4155941605567932, -0.43235543370246887, 0.1432668566703796...
the Lua solution might also be a sensible C or C++ solution. The Lua core is not at all large, provides a dynamic, garbage-collected language, and is easy to interact with from C either as a hosting application or as an extension module. To use lfs from a C application, you would link with the Lua DLL, initialize a Lua...
[ 0.21536323428153992, -0.2820371091365814, 0.48707905411720276, -0.25963133573532104, 0.17229662835597992, 0.20456121861934662, -0.33288246393203735, -0.19632366299629211, -0.04807614907622337, -0.6469839811325073, -0.22007900476455688, 0.11207427084445953, -0.5906863808631897, 0.0479871332...
which leaves the `lfs` table on the top of the Lua stack. This approach probably makes the most sense if you already had a need for an embedded scripting language, and Lua meets your requirements.
[ 0.034812308847904205, 0.12213079631328583, 0.25481724739074707, -0.36893340945243835, 0.04345865547657013, -0.07560069859027863, -0.40511253476142883, -0.1224641501903534, 0.005639135371893644, -0.5015785694122314, -0.2629992961883545, 0.31052860617637634, -0.20275722444057465, -0.26513192...
I'm trying to find a way that will add / update attribute using JavaScript. I know I can do it with `setAttribute()` function but that doesn't work in IE. You can read [here](http://www.quirksmode.org/dom/w3c_core.html#attributes) about the behaviour of attributes in many different browsers, including IE. `element.set...
[ 0.4036436975002289, -0.04442118480801582, 0.15837500989437103, 0.12896403670310974, -0.09848646819591522, -0.1493346393108368, 0.45314672589302063, -0.03686608746647835, -0.06160443648695946, -0.632006824016571, 0.2545081079006195, 0.7309032678604126, -0.15834279358386993, -0.1307830661535...
I'm a single developer using Mercurial to create a program. I have so far committed at every step of developing, and I have messed things up and want to work on something else. How shall I go to a previous state (ie. rollback) and then create a branch, maintaining the newer states? Does rollback ever delete anything?...
[ 0.26883575320243835, 0.034245479851961136, 0.3549114167690277, 0.3428577184677124, 0.35727766156196594, 0.1639501005411148, 0.235120490193367, 0.06909400969743729, -0.33122456073760986, -0.6948570609092712, -0.0035413168370723724, 0.1469082236289978, -0.1599661111831665, 0.5144039988517761...
create new changesets, then merge the two repositories? I'm new to SCM and of course DSCM, so be gentle :) You don't want to use `hg rollback`, that only erases **exactly one** change (the most recent). See [You Can Only Roll Back Once](http://hgbook.red-bean.com/read/finding-and-fixing-mistakes.html#id519728) in the ...
[ 0.3147110044956207, 0.09962537884712219, 0.51478111743927, -0.011916768737137318, 0.23358595371246338, -0.0446978360414505, 0.22195619344711304, -0.16842705011367798, -0.5698530077934265, -0.6607717275619507, -0.17774911224842072, 0.3660595118999481, -0.2406979650259018, 0.3543751537799835...
merge those changes back into the original later, if you wish.
[ 0.4292885363101959, -0.20605622231960297, 0.0807468593120575, 0.2110491544008255, 0.2385690063238144, 0.032606132328510284, -0.05008750781416893, 0.026313798502087593, 0.05677308887243271, -0.8435097932815552, -0.10102738440036774, 0.3504467308521271, 0.002288057701662183, -0.2004103660583...
I would like to programmatically export my Procedures / Functions and Packages into individual files (as a backup) and using Oracle 9.2. The closest solution i found was using DBMS\_METADATA.GET\_DDL , but how do i output the CLOB to a text file, without losing any parts (due to length or indentation) ? Or maybe do y...
[ 0.20608699321746826, 0.09943225234746933, 0.07903237640857697, -0.008520051836967468, -0.12432295083999634, -0.15742197632789612, 0.058083727955818176, -0.033176571130752563, -0.11714234203100204, -0.3159081041812897, -0.0249932948499918, 0.6354012489318848, -0.4770798683166504, -0.2074706...
in a non- type checking language (Perl) that uses `DBMS_METADATA` to bring the CLOB back into a string. Snippet: ... ``` $sthRef = $dbhRef->prepare("select dbms_metadata.get_ddl(?,?) from dual"); $sthRef->execute('PACKAGE', $thisName); while (($thisDDL) = $sthRef->fetchrow()) { print $thisDDL; } $sthRef->fini...
[ 0.23407292366027832, -0.050498150289058685, 0.5043935179710388, -0.14438404142856598, 0.11900465190410614, -0.18083739280700684, 0.3063977062702179, -0.497366338968277, -0.12319520860910416, -0.14504750072956085, -0.5885999202728271, 0.5008097290992737, -0.5120806097984314, 0.1880781054496...
I have defined an UIImageView in my nib. After the app launches, I display an image in that UIImageView. Maybe I am on the wrong way, but what I want to do is the following: The image which I load into the view is bigger than the view itself. I want that it is displayed in original size with hidden overlay. Then I wan...
[ 0.18448477983474731, -0.20136019587516785, 0.6650707721710205, -0.07820965349674225, -0.21637630462646484, 0.07767805457115173, -0.08228588849306107, 0.14108721911907196, -0.2588905990123749, -1.0076500177383423, -0.04167316481471062, 0.2461019903421402, -0.18195101618766785, 0.38504487276...
something similar on iPhone. Maybe an UIImageView is not the right thing for that? Or must I set the UIImageView to the full size of that image and then move the UIImageView around slowly? Could it be bigger than the iPhone's screen? It seems that external XAML file can't be loaded by LoadComponent. I checked the sou...
[ -0.0665174052119255, 0.013562777079641819, 0.6567110419273376, -0.12491678446531296, 0.1164836660027504, 0.1381942331790924, 0.25957080721855164, 0.08307178318500519, -0.3443286418914795, -0.7415874600410461, -0.10544157028198242, 0.673613429069519, -0.2694641053676605, 0.03974274918437004...
to resolve it to Pack://Application. //..\..\ in the relative Uri will get stripped when creating the new Uri and resolving to the //PackAppBaseUri, i.e. only relative Uri within the appbase are created here Uri currentUri = new Uri(BaseUriHelper.PackAppBaseUri, resourceLocator); ... ...
[ -0.0839204415678978, -0.08922462910413742, 1.0458300113677979, -0.313896119594574, 0.1205819621682167, -0.15572163462638855, 0.1386653035879135, -0.6436907649040222, -0.19572842121124268, -0.7518745064735413, -0.3145817518234253, 0.18939745426177979, -0.532894492149353, -0.0637294054031372...
authority > identifies application data files that > are known at compile time, including > resource and content files. The > siteoforigin:/// authority identifies > site of origin files. Possible data files are: * Packages and parts are analogous to applications and files, where an application (package) can inc...
[ 0.10235082358121872, 0.03438924625515938, 0.24564673006534576, 0.277704656124115, -0.0409090630710125, -0.10950595885515213, 0.03205809369683266, -0.36704617738723755, 0.0021432924550026655, -0.49480292201042175, -0.267612099647522, 0.18629460036754608, -0.037866514176130295, 0.24924716353...
I turned app.xaml into content file (details are [here](http://msdn.microsoft.com/en-us/library/aa970494.aspx#Content_Files)) 1. Build Action to Content 2. Copy to Output Directory to Copy always 3. [assembly: AssemblyAssociatedContentFile("app.xaml")] As result such exception was thrown: 'application/xaml+xml' Conte...
[ 0.016205918043851852, 0.3323143720626831, 0.7492422461509705, -0.36217010021209717, 0.05919698625802994, -0.081410713493824, 0.49641573429107666, -0.5511629581451416, -0.028780683875083923, -0.41317397356033325, -0.4164314270019531, 0.43967118859291077, -0.6255695819854736, 0.3637867867946...
} ... } ``` So the LoadComponent expects 'application/baml+xml' instead of 'application/xaml+xml'. I don't know a way to store xaml as external file in 'application/baml+xml', so assume the task has no solution.
[ -0.16471995413303375, 0.1579974740743637, 0.4701681435108185, -0.29111745953559875, 0.11441762745380402, -0.17563101649284363, -0.05671565979719162, -0.16201181709766388, -0.2592543661594391, -0.357688844203949, -0.29615068435668945, 0.4740569293498993, -0.5103635787963867, 0.0523095801472...
I am writing a VSPackage for Visual Studio 2008, and am deploying it with a WiX generated Msi. As the end of the install, I am running "devenv.exe /setup" as required to get VS to notice my package. However, this command will not succeed if there are any copies of Visual Studio running. Currently, I tell people they h...
[ 0.6625183820724487, 0.1369749754667282, 0.4290136992931366, -0.21049970388412476, -0.24845780432224274, -0.44034841656684875, 0.6498040556907654, -0.11672753095626831, -0.13895879685878754, -0.9031731486320496, -0.12155745178461075, 0.876867413520813, -0.1986169070005417, 0.062449332326650...
toolset has a CloseApps CustomAction that will close windows for you. It unfortuantely does not prompt with a list to close all the applications but the code would be a reasonable place to start.
[ -0.11324212700128555, 0.23588164150714874, 0.5878945589065552, -0.0546078160405159, -0.10809959471225739, -0.19842322170734406, 0.33370327949523926, 0.049052610993385315, -0.08970129489898682, -0.6601346731185913, -0.21748632192611694, 0.49599647521972656, -0.18997544050216675, 0.249581634...
I'm using the entity framework to access my database and I want to mock the database context inside my unit tests so that I can test my middle tier classes free of their dependency on real data. I know that I'm not the first to ask about this [(Mocking an Entity Framework Model)](https://stackoverflow.com/questions/604...
[ 0.6170662045478821, 0.49107152223587036, -0.08246845752000809, 0.09992813318967819, -0.12473832815885544, -0.08608176559209824, 0.5943319797515869, 0.21963892877101898, -0.16614489257335663, -0.3131188452243805, 0.39733004570007324, 0.6012275218963623, 0.13517580926418304, 0.29161337018013...
[here](http://blogs.msdn.com/diego/archive/2008/03/03/unit-testing-your-entity-framework-domain-classes.aspx).
[ 0.14478746056556702, -0.047747280448675156, 0.23881490528583527, 0.14650897681713104, 0.008563459850847721, -0.552842915058136, 0.33084291219711304, -0.2039935439825058, -0.3881172835826874, -0.232272207736969, -0.1458427906036377, 0.1958390176296234, 0.23010826110839844, 0.161665022373199...
I am implemening simple file-sharing service. Currently I use a file-based database (as it suits my needs). ``` # somewhere in my cgi script sub first_run { my $dbh = DBI->connect('dbi:DBM:'); $dbh = DBI->connect("dbi:DBM:", "", "",{ AutoCommit => 1, RaiseError => 1, f_dir=>$DATABASE_DIR} ); ...
[ 0.13289864361286163, 0.24031934142112732, 0.8552955985069275, -0.37818679213523865, 0.1314460039138794, 0.09627430140972137, 0.5240998864173889, 0.10238681733608246, -0.039894185960292816, -0.45065629482269287, -0.27365586161613464, 0.6010804772377014, -0.4967004060745239, 0.34990221261978...
$dbh->do("CREATE TABLE uploads( user_name TEXT, file_name TEXT, upload_date TEXT ) "); $dbh->disconnect( ); } ``` As you can see I propose to store the upload timestamp as a string, since currently I only have to display it (suppose to use localtime() to get timestamp in a human readable fo...
[ 0.23931778967380524, 0.3167790174484253, 0.25723695755004883, -0.2754238545894623, -0.1680326610803604, -0.10168949514627457, 0.22429870069026947, -0.17474672198295593, -0.06845896691083908, -0.7317049503326416, -0.11896410584449768, 0.19857892394065857, -0.45820844173431396, 0.47534641623...
a DBM database without using third-party, CPAN modules? How can I pull them later and show them to the user (in my situation, convert back to string)? Consider that storing UTC time is less ambiguous than storing local time. If you save a time at your computer in London and send me the file in Hong Kong, will I when I ...
[ 0.4300439953804016, -0.14505812525749207, 0.42951929569244385, 0.0732780322432518, 0.22231373190879822, -0.02964603714644909, 0.251902312040329, -0.25591179728507996, -0.08325593918561935, -0.5560263991355896, -0.18751467764377594, -0.03185062110424042, -0.2618599534034729, 0.2340154945850...
Presumably either format is isomorphic with the other, as there is a well-defined bi-directional conversion rom one to the other.
[ 0.04395954683423042, 0.22002151608467102, 0.11763447523117065, -0.007070252671837807, 0.05792556703090668, -0.05353856831789017, -0.2342037856578827, 0.03658584877848625, -0.08170588314533234, -0.4558286964893341, -0.4414624869823456, 0.46999111771583557, -0.1181156113743782, -0.0486123077...
I'm creating a dynamic expression, which will order items in a list by some rule (lambda exp.). This is the code: ``` Expression<Func<String, String>> exp = o => o; MethodCallExpression orderByExp = Expression.Call(typeof(Enumerable), "OrderBy", new Type[] { typeof(String), exp.Body.Type }, Expression.Parameter(t...
[ -0.02597516030073166, -0.13432985544204712, 0.6725944876670837, -0.10443641245365143, 0.16821502149105072, 0.16395293176174164, 0.3910483717918396, -0.4325280785560608, -0.12435924261808395, -0.6413022875785828, -0.1702704280614853, 0.5002053380012512, -0.4741286039352417, 0.05663060396909...
is the working code: ``` Expression<Func<String, String>> exp = o => o; var list = Expression.Parameter(typeof(IEnumerable<String>), "list"); MethodCallExpression orderByExp = Expression.Call(typeof(Enumerable), "OrderBy", new Type[] { typeof(String), exp.Body.Type }, list, exp); var lambda = Expression.Lambda<F...
[ -0.12458398938179016, -0.19418391585350037, 0.7407301664352417, -0.1383107304573059, 0.20659485459327698, -0.09127575159072876, 0.09832853078842163, -0.5928540825843811, -0.04555513337254524, -0.45146992802619934, -0.48530417680740356, 0.6016907095909119, -0.3384071886539459, -0.2465985566...
experts
[ 0.38205695152282715, 0.528171718120575, -0.031248126178979874, 0.18628914654254913, 0.2264699637889862, -0.09311388432979584, 0.009260803461074829, -0.146301731467247, -0.3308011293411255, -0.13703010976314545, -0.3044774532318115, 0.6179858446121216, 0.3567803204059601, -0.141090020537376...
I'm looking at ways to secure the admin section of my (cakephp powered) Facebook application. To avoid duplicating functionality, I thought it'd be neat to allow access to people who have been flagged as developers in the app settings. The question could then be: How do I determine whether a user of my Facebook applic...
[ 0.43688854575157166, 0.13129718601703644, 0.3527766764163971, 0.1358180046081543, -0.0006118922028690577, 0.09899313002824783, 0.13015350699424744, -0.44877728819847107, 0.13348494470119476, -0.24649697542190552, 0.006251317448914051, 0.2374708652496338, -0.07315026223659515, -0.2019724696...
execution of the block. In the case of the code shown above, you are defaulting the accumulator, result, to 0. Each run of the block adds the given number to the current total and then stores the result back into the accumulator. The next block call has this new value, adds to it, stores it again, and repeats. At the ...
[ -0.19209863245487213, -0.24622409045696259, 0.4133415222167969, -0.2165726125240326, 0.02509910799562931, 0.15471194684505463, 0.33287516236305237, -0.5046753883361816, -0.1993960738182068, -0.2622707486152649, -0.16744564473628998, 0.4111548364162445, -0.5774962306022644, -0.0308516845107...
do |hash, item| hash[item.to_s] = item hash end ``` In this case, we are defaulting our accumulator to an empty hash, then populating it each time the block executes. Notice we must return the hash as the last line of the block, because the result of the block will be stored back in the accumulator.
[ -0.167910635471344, -0.15302824974060059, 0.6118066310882568, -0.22038842737674713, 0.29650071263313293, -0.11707824468612671, 0.1671706885099411, -0.16351629793643951, -0.16782525181770325, -0.3772813081741333, -0.46518656611442566, 0.22888188064098358, -0.4176003634929657, 0.377805948257...
I'm executing a number of SQL query's as a batch and then getting all of the result sets back in a batch. The way that my code is currently put together, the first result set gets skipped. Now that I know this, I could simply throw in another statement outside of my loop that grabs the first result, however I'm wonderi...
[ 0.07703426480293274, -0.13399837911128998, 0.27418646216392517, -0.05978620424866676, -0.1412392258644104, -0.09403245896100998, 0.28245964646339417, -0.25720733404159546, -0.1442728191614151, -0.7546571493148804, -0.03635123744606972, 0.3438758850097656, -0.26953238248825073, 0.4245370924...
if (!reader.IsDBNull(0)) { //do things with the data.... } } } ``` Now i would have expected that NextResult() advances you to the first result the first time you call it, which is what Read() seems to do. However what it actually seems to do is bring you to the second result on the first ...
[ -0.2981951832771301, -0.3607800304889679, 0.4887484312057495, 0.046267732977867126, 0.06468452513217926, -0.35881587862968445, 0.10850796103477478, -0.3310629725456238, -0.03288158401846886, -0.6164734363555908, -0.1841254085302353, 0.5335737466812134, -0.20113049447536469, 0.1349575817584...
reader= /*some stuff that returns a batch of results...*/; //this deals with the row in the the very first result while (reader.Read()) { if (!reader.IsDBNull(0)) { //do things with the data.... } } //this deals with the rest of the rows... while (reader.NextResult()) { while (reader.Read()) ...
[ -0.316972553730011, -0.3546008765697479, 0.6243686079978943, 0.011168376542627811, 0.16898278892040253, 0.09516426920890808, 0.09902941435575485, -0.36688438057899475, -0.14161305129528046, -0.732521116733551, -0.31235864758491516, 0.23746013641357422, -0.4587862491607666, 0.09778145700693...
//is this not pretty klugey? } } } ``` This strikes me as rotten programming style, but I don't see a way around it. Does anyone know of a more elegant solution to this? Simply put the NextResult at the end of the loop instead of the beginning: ``` do { while (reader.Read()) { if (!reader.IsDBNull...
[ -0.2531237006187439, -0.0711459368467331, 0.5687636137008667, 0.12558040022850037, 0.21219784021377563, -0.35458359122276306, 0.3116305470466614, 0.12177301198244095, -0.10762640833854675, -0.6248322129249573, -0.2869551479816437, 0.40538489818573, -0.25097984075546265, 0.2638433277606964,...
I am very interested in learning what features people are interested in in the forthcoming .net framework(s)? Whether these be new classes or new controls I am curious to know people views. Code Contracts and Parallel Extensions. Neither are language features (which is mostly what I get interested in usually) but both...
[ 0.6324986815452576, 0.1923297494649887, 0.1366388201713562, 0.19062571227550507, -0.40386858582496643, -0.11848529428243637, 0.038935210555791855, 0.17171688377857208, -0.14608998596668243, -0.7849968671798706, 0.20117102563381195, 0.7329647541046143, 0.19169369339942932, 0.273097425699234...
terms of C# 4 language features, covariance and contravariance will be more of a "phew, that reduces an annoyance" than a "wahay, cool stuff!" but optional/named arguments could be very handy. It'll make writing/using immutable types *slightly* easier, although I'd still like built-in support for the builder pattern :)
[ 0.33879637718200684, 0.18433889746665955, 0.2983785569667816, 0.11702381819486618, -0.1832498461008072, -0.24656111001968384, 0.40814775228500366, -0.2865455448627472, -0.02817518450319767, 0.01491011306643486, -0.13049213588237762, 0.7202010750770569, -0.062473103404045105, -0.24908769130...
I've updated my default templates in Visual Studio for classes, interfaces, code files, etc. I removed the default namespaces and added a copyright header blurb. Is there a way to use a variable or something in the template so I don't have to zip/unzip and re-run the vs installer to change the copyright header? (I'm a...
[ 0.9036790728569031, 0.04328971728682518, 0.24089501798152924, 0.17826193571090698, 0.05733991041779518, -0.46207189559936523, -0.04629945009946823, 0.06284823268651962, -0.08838614076375961, -0.5071746110916138, -0.0785258561372757, 0.7279347777366638, 0.11287617683410645, -0.1266029924154...
Toolkit. A template using GAT can accept user input as well as information from the project and environment, can unfold one or more templates, filling in placeholders with the data gathered, and then can execute various actions against the unfolded templates, the project, or whatever.
[ 0.45047661662101746, -0.37935230135917664, -0.09299630671739578, 0.46608418226242065, -0.2232884019613266, -0.09116754680871964, -0.04372232034802437, -0.1509036123752594, -0.005278932396322489, -0.8048238158226013, -0.2904242277145386, 0.6604249477386475, -0.3103084862232208, -0.120670661...
The behavior of "this" when function `bar` is called is baffling me. See the code below. Is there any way to arrange for "this" to be a plain old js object instance when bar is called from a click handler, instead of being the html element? ``` // a class with a method function foo() { this.bar(); // when calle...
[ -0.16022098064422607, 0.3162115812301636, 0.3947979509830475, -0.4572359621524811, 0.22397592663764954, -0.19372840225696564, 0.4065799117088318, 0.10993660241365433, -0.2187366634607315, -0.519856870174408, -0.22811689972877502, 0.6223834753036499, -0.6771416068077087, 0.30289286375045776...
the html element $("#thing").after($("<div>click me</div>").click(barf)); } foo.prototype.bar = function() { alert(this); } ``` Welcome to the world of javascript! :D You have wandered into the realm of javascript scope and closure. **For the short answer:** ``` this.bar() ``` is executed under the scope...
[ -0.004913564305752516, 0.09557048231363297, 0.504481852054596, -0.4617401659488678, -0.2134699672460556, -0.16054140031337738, 0.46693485975265503, 0.0042057763785123825, -0.20324940979480743, -0.821977436542511, -0.07325099408626556, 0.19124342501163483, -0.7145582437515259, 0.12159767001...
``` barf(); ``` to something like this: ``` barf.apply(this); ``` This tells Javascript to bind the scope of *this* to barf before executing it. For jquery events, you will need to use an anonymous function, or extend the bind function in prototype to support scoping. For more info: * [Good explanation on scopi...
[ 0.20163153111934662, 0.09174661338329315, 0.3289452791213989, -0.36309224367141724, -0.18690024316310883, -0.2037270963191986, 0.38457220792770386, -0.3246341347694397, -0.15514671802520752, -0.5747486352920532, -0.2560277581214905, 0.3908063471317291, -0.5317254662513733, -0.2104268819093...
I'm just starting out (reading up a lot for the past couple of days). Here's some questions that I have stacked up, hopefully someone can answer them. **1.** the (self != nil) check in initializer code. Why do it? To prevent accidental access to some "run-only-once" code that's wrapped up in there? Where from could th...
[ 0.352878600358963, 0.04460935667157173, -0.041533924639225006, -0.029063986614346504, 0.13619521260261536, -0.10998513549566269, 0.5990254282951355, 0.20519942045211792, -0.09437628835439682, -0.7073555588722229, 0.09680954366922379, 0.4230037331581116, -0.21303150057792664, 0.214462593197...
return self; } ```` **2.** How is it that you don't have to free up anything that static methods return? (or this is the idea I've got) **3.** How is str = @"Hi there!" different from ```` str = [[NSString alloc] initWithString:@"Hi there!"]; ```` As I understand, you have to release str in aquired with second met...
[ -0.3132689893245697, -0.01420542225241661, 0.501981794834137, -0.13289625942707062, -0.20645347237586975, 0.02556905336678028, 0.5095753073692322, 0.025691242888569832, -0.28333401679992676, -0.49951639771461487, -0.1942448765039444, 0.5193658471107483, -0.29538577795028687, -0.25766888260...
to the nearest wrapping "autorelease pool", which will release it? Basically, some magic to avoid releasing it yourself? Why use it? Well, thats it for now. Thanks for any answers! 1. In Objective-C, it's possible to return an instance other than self from `-init`. Classes do this, for example, to enforce a singleton ...
[ -0.2102193981409073, -0.26001012325286865, 0.06227652728557587, -0.14482539892196655, -0.18856528401374817, -0.04557599872350693, 0.25201916694641113, 0.04222383350133896, -0.05513748526573181, -0.34659481048583984, -0.2876124382019043, 0.5182839035987854, -0.4259454607963562, -0.163225531...
oringial caller. Thus the pattern self = [super init]; which reassigns `self` to the value of `[super init]` so that `self` points to the actual instance that `[super init]` returned. If `+alloc` or the super's `init` method fails, the result of `[super init]` may be `nil`. To avoid, side effects in the case of a fai...
[ -0.5326184630393982, -0.16070988774299622, 0.35487785935401917, -0.2032046616077423, -0.25383856892585754, 0.0806233286857605, 0.3235512971878052, -0.02434459701180458, 0.005726883187890053, -0.26750481128692627, -0.23628975450992584, 0.3759555518627167, -0.4712647795677185, -0.01030674856...
or an other instance) from the `init` method. You *should* assign self to `[super init]` and you may check for `nil` before doing more work. 2. You may have to release the return value of a staic method. You should read the Cocoa memory management [guide](http://developer.apple.com/documentation/Cocoa/Conceptual/Memory...
[ 0.1748223900794983, 0.2574872076511383, 0.41980674862861633, -0.023774323984980583, -0.00929174479097128, -0.3165985643863678, 0.17804621160030365, -0.25211143493652344, -0.45103687047958374, -0.18560530245304108, -0.47775110602378845, 0.5979426503181458, -0.16981680691242218, 0.0428187027...
or "copy" method) you want to keep a reference to and then call `-release` or `-autorelease` when you are done with that instance. 3. `str = @"Hi there!"`, assuming `str` was declared as `NSString *str;` assigns the address of the string constant `@"Hi there!" to the value of the`str`variable. You do not need to retain...
[ -0.1194072887301445, 0.3112567961215973, 0.8568596839904785, -0.35031965374946594, 0.035856589674949646, -0.15126574039459229, 0.3059599995613098, -0.49210602045059204, -0.1854684054851532, -0.24583281576633453, -0.4602135419845581, 0.5799320936203003, -0.5683561563491821, 0.23608249425888...
= @"Hi There!", `str==str2`. See [this](https://stackoverflow.com/questions/706519/is-an-nsmutablestring-in-this-case-more-efficient-than-nsstring/706610#706610) answer as well. 4. `-autorelease` adds the receiver to the current `NSAutoreleasPool`. When the pool is drained (usually at the end of the current run loop it...
[ -0.0189902875572443, -0.08780629187822342, 0.7319130301475525, -0.24748243391513824, 0.34148433804512024, -0.244197815656662, 0.20116199553012848, -0.3307476341724396, -0.295920729637146, -0.20432306826114655, -0.5342240333557129, 0.7501729130744934, -0.4380955100059509, -0.146564275026321...
the end of the run loop iteration. If you can use `-release` instead of `-autorelease`, you generally should. Again, see the Cocoa memory management [guide](http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html) for more info.
[ 0.14693817496299744, 0.033181555569171906, 0.1457187533378601, -0.07003986090421677, 0.12098716199398041, -0.3159550428390503, 0.45613953471183777, 0.09193678945302963, -0.5420196056365967, -0.35727041959762573, -0.38269999623298645, 0.45623108744621277, -0.12173254042863846, 0.03088190034...
Can IIS supporting ASP.NET and WAMP supporting PHP coexist on the same server? We already have a WAMP stack setup on a Windows Server 2003 box to support some internal PHP applications, and I want to also setup CI Factory on that box which will try to configure IIS to support it's ASP.NET based dashboard. I want to ma...
[ 0.3263203203678131, -0.20050987601280212, 0.00455710431560874, 0.14420899748802185, -0.16302192211151123, -0.3260129988193512, 0.06546401232481003, -0.2360781878232956, -0.2479890137910843, -0.7266826033592224, 0.19949790835380554, 0.551555871963501, -0.5425956845283508, 0.0203256737440824...
same port? For example IIS on non-standard port (e.g. 8080) and Apache redirecting traffic to IIS via [mod\_proxy](http://httpd.apache.org/docs/2.2/mod/mod_proxy.html). Separate vhosts: ``` <VirtualHost lamp.example.com> # standard vhost configuration </VirtualHost> <VirtualHost aspx.example.com> ProxyPass / as...
[ -0.020435716956853867, -0.3279469311237335, 0.6952261924743652, -0.009899383410811424, -0.15431399643421173, 0.1097629964351654, 0.13519889116287231, -0.295382022857666, -0.4956536293029785, -0.9121477007865906, 0.05117335170507431, 0.5502215623855591, -0.3642260432243347, 0.26661765575408...
I'm trying to figure out what's gone wrong with my json serializing, have the current version of my app with and old one and am finding some surprising differences in the way JSON.stringify() works (Using the JSON library from json.org). In the old version of my app: ``` JSON.stringify({"a":[1,2]}) ``` gives me th...
[ 0.12983636558055878, 0.06734015792608261, 0.6588491201400757, -0.2497333139181137, -0.27232977747917175, 0.08325126767158508, 0.3762304186820984, 0.020861590281128883, -0.4106254577636719, -0.8103762865066528, -0.11883664131164551, 0.7569094896316528, -0.5529680848121643, -0.35761958360671...
&& window.JSON.stringify and only include the json.org library otherwise (via `document.createElement('script')`…). To resolve the incompatibilities, use: ``` if(window.Prototype) { delete Object.prototype.toJSON; delete Array.prototype.toJSON; delete Hash.prototype.toJSON; delete String.prototype.toJS...
[ -0.1505439430475235, 0.08745332807302475, 0.13935233652591705, -0.23656632006168365, 0.16982901096343994, 0.14520737528800964, 0.39515331387519836, -0.173545241355896, -0.21570634841918945, -0.5486977696418762, -0.2571370601654053, 0.5032697319984436, -0.41064777970314026, 0.15960331261157...
I'm doing a read in on a file character by character using istream::get(). How do I end this function with something to check if there's nothing left to read in formatted in the file (eg. only whitespace) and set the corresponding flags (EOF, bad, etc)? You can strip any amount of leading (or trailing, as it were) whit...
[ 0.14479634165763855, -0.22112378478050232, 0.31671011447906494, -0.09822876751422882, -0.17170082032680511, -0.025271032005548477, 0.2323651760816574, -0.05037470906972885, -0.3934381306171417, -0.41830939054489136, -0.19062665104866028, 0.03139754757285118, -0.23499491810798645, 0.2932768...
I am needing to implement email notifications for a C++ project. Basically a user provides all the relevant information for their email account and on certain events this component would fire off an email. Ideally I would like to find a small cross platform open source command line project that I can exec from within m...
[ 0.41623127460479736, 0.11694260686635971, 0.2148502618074417, -0.041803039610385895, -0.24715878069400787, -0.33512967824935913, 0.07776068896055222, 0.06936655938625336, -0.1570960432291031, -0.559628963470459, -0.12336158007383347, 0.41410234570503235, -0.36702990531921387, -0.0904845446...
commercial friendly license, but would be open to hearing all suggestions. Thank you very much in advance for any recommendations The simplest fix to your existing code is just to change: ``` return (char) digits_conversion[i][1]; ``` into ``` return digits_conversion[i][1][0]; ``` However, you might find that c...
[ 0.3130420744419098, 0.271146297454834, 0.5971540212631226, 0.04827714338898659, 0.12123896926641464, -0.399237722158432, -0.1072884127497673, -0.2318294495344162, 0.03708899766206741, -0.5283636450767517, -0.08976100385189056, 0.8289804458618164, -0.4121108651161194, -0.0138624282553792, ...
{"ap_five", '5'}, {"ap_six", '6'}, {"ap_seven", '7'}, {"ap_eight", '8'}, {"ap_nine", '9'}, {"ap_star", '*'}, {"ap_hash", '#'}, {NULL, '\0'} }; char convert_to_char(const char *digit) { int i = 0; for(i = 0; conversion_table[i].digit; i++) { if(strcmp(conversion_table...
[ -0.013333344832062721, 0.1351088136434555, 0.6025744676589966, -0.3123624324798584, -0.02493659220635891, 0.7948132157325745, 0.2532386779785156, -0.5173869132995605, -0.006922788452357054, -0.4147818088531494, -0.4878818988800049, 0.4710482060909271, -0.42590153217315674, 0.22197249531745...
return conversion_table[i].digit; } } return '\0'; } int main(void) { char ch; ch = convert_to_char("ap_five"); printf("Converted digit: %c\n", ch); return 0; } ```
[ -0.09985201060771942, 0.18506643176078796, 0.1922297179698944, -0.29591870307922363, 0.059540048241615295, 0.5613771677017212, 0.15260867774486542, -0.15050995349884033, -0.054820749908685684, -0.3828005790710449, -0.511152446269989, 0.6110571622848511, -0.30369919538497925, 0.203637361526...
While checking some code on the web and scripts generated by SQL Server Management Studio I have noticed that some statements are ended with a semicolon. So when should I use it? From a SQLServerCentral.Com [article](http://www.sqlservercentral.com/articles/SQL+Puzzles/thegocommandandthesemicolonterminator/2200/) by ...
[ -0.007209578063338995, -0.004998318385332823, 0.3155197203159332, 0.09974069148302078, -0.34758466482162476, -0.04451606422662735, 0.03016624227166176, 0.18728691339492798, -0.09479601681232452, -0.31311798095703125, -0.4606029689311981, -0.07412392646074295, -0.33509793877601624, 0.058971...
not the first statement in the batch. The second is where you issue a Service Broker statement and the Service Broker statement is not the first statement in the batch.
[ 0.38415226340293884, -0.041581444442272186, 0.17320436239242554, -0.128753200173378, -0.09064054489135742, 0.14652080833911896, -0.04497459903359413, -0.00012470982619561255, 0.12315059453248978, -0.4535413384437561, -0.31760644912719727, 0.3684902489185333, -0.04735588654875755, 0.3923222...
In the spirit of this question by Si here: [WiX tricks and tips](https://stackoverflow.com/questions/471424/wix-tricks-and-best-practices). I am trying to determine the best way to get create wix fragments based on a directories. File harvesting, so to speak. For example under the bin\release folder I could have many d...
[ 0.637209415435791, -0.0517176017165184, 0.0184209905564785, 0.052386574447155, -0.2613593637943268, -0.4827595353126526, 0.13696815073490143, -0.05872063338756561, -0.2703070640563965, -0.6580716371536255, 0.2256537228822708, 0.13910473883152008, 0.09125903248786926, 0.05801619216799736, ...
Newagesolution which discusses using t4 script: <http://blog.newagesolution.net/2008/06/how-to-use-msbuild-and-wix-to-msi.html> I would like to know what others are doing to solve this. Regards, Brian Ok, Daniel I definately agree with using heat, but I think Rob pointed me in the right direction for what I ended up ...
[ 0.337697833776474, 0.22101221978664398, 0.2977718412876129, 0.038553159683942795, -0.1713862419128418, -0.15573883056640625, 0.31568673253059387, -0.05616620182991028, 0.0006843575974926353, -0.8145498037338257, 0.056194622069597244, 0.48217517137527466, -0.13475830852985382, -0.3288045227...
to both Rob and Daniel for your help. Therefore, I came back and answered this question myself. Hurdles... **Hurdle 1** I ran into is there is nearly no documentation on the web for how to implement heat tasks/heat directory(Heat wrapped in msbuild) from within visual studio. Please note that the wrapper to run fr...
[ 0.3154272139072418, 0.110406294465065, 0.03191346302628517, 0.20930010080337524, -0.08873188495635986, 0.022555334493517876, 0.6637774705886841, -0.2346028983592987, -0.06309182196855545, -0.8234575986862183, -0.05770013853907585, 0.36124518513679504, 0.1545712649822235, -0.492386639118194...
his great blog entry here for a better understand how heat is going to help you automate: <http://icumove.spaces.live.com/blog/cns!FB93073C6534B681!461.entry> **Hurdle 2** After working with heat, I found out that I was not using components the recommended way, but I had to piece together all the reasoning. I think ma...
[ 0.39530402421951294, 0.11809758841991425, -0.1050526350736618, 0.15739721059799194, 0.0627073347568512, -0.43879270553588867, 0.45951467752456665, -0.13502462208271027, -0.14590787887573242, -0.8091635704040527, -0.10097862780094147, 0.45874935388565063, -0.1302850991487503, -0.14774738252...
better understanding of components: <http://robmensching.com/blog/posts/2003/10/4/Windows-Installer-Components-Introduction> <http://robmensching.com/blog/posts/2003/10/18/Component-Rules-101> For Extra Reading on Windows installer check these rules from the windows installer team(Rule 16: Follow Component Rules): <htt...
[ 0.1536269336938858, 0.13410498201847076, 0.4252023696899414, -0.13641169667243958, 0.0028107494581490755, -0.42632681131362915, 0.5019909143447876, -0.46739572286605835, -0.24488815665245056, -0.5914447903633118, -0.15588560700416565, 1.169975996017456, -0.3830417990684509, -0.030762415379...
do not know anything about wix other than wix builds msi fields. It seems that this will work with using heat, but I am uncertain. **Hurdle 4** For me it took a little time to figure out why the include file with my preprocessor variables was not working. I finally figured it out. You must include the file in your .w...
[ 0.8055952191352844, 0.008518180809915066, -0.030966483056545258, -0.22367355227470398, -0.22706006467342377, -0.3666060268878937, 0.6019444465637207, -0.3046482801437378, -0.015163077041506767, -0.6315387487411499, 0.022390132769942284, 0.43737804889678955, -0.38147851824760437, -0.1569868...
quite simple and it is if you know how to do it. I had trouble here and had to get help for this as well. **Hurdle 6** With heat updating the files based on a bin folder everything works quite well. Well almost automatic, if there are any conflicts in dll references, etc then files will not be included in the installe...
[ 0.40742892026901245, -0.10820339620113373, -0.053150925785303116, 0.11428214609622955, -0.048969000577926636, -0.41643986105918884, 0.7282972931861877, -0.3476549983024597, 0.19202391803264618, -0.6948332786560059, 0.05918627604842186, 0.9118013381958008, 0.17940238118171692, -0.4529765844...
track of the program's used dlls and compare against the msi file. Now for the solution using HeatDirectory(from the help of Brian Rogers(wix team)): ``` <PropertyGroup> <Configuration Condition=" '$(Configuration)' == ''">Debug</Configuration> <OutputName>msbuild.heatfile</OutputName> <OutputType>Package<...
[ -0.01840154267847538, -0.0016945106908679008, 0.12257466465234756, -0.09500439465045929, 0.16348904371261597, 0.3518003821372986, 0.1493033617734909, -0.5201185941696167, -0.022111786529421806, -0.8616811037063599, -0.2636789083480835, 0.2455712854862213, -0.3211498558521271, -0.1103692278...
AutogenerateGuids="true" ToolPath="$(WixToolPath)" /> </Target> ``` This needs to be pasted into your project file and appropriate settings/pathing needs to be changed. What this will do is take all the files in the path you specify and create a TestDir.wxs file which you then can reference by component group....
[ 0.34050047397613525, -0.2576468884944916, 0.18862394988536835, -0.2737118601799011, -0.11600345373153687, -0.00626489520072937, 0.08627974987030029, -0.2333507090806961, -0.061253536492586136, -0.6237412095069885, 0.044990431517362595, 0.5117300748825073, -0.33991727232933044, -0.213663831...
.csproj with heat.exe in Visual Studio 2008 and WiX(v3)](https://stackoverflow.com/questions/745267/wixv3-harvesting-a-csproj-with-heat-exe-in-vs2008). and again this can be done using heat tasks instead. Both discuss using third party tools. One called Mallow and another called Paraffin. I think paraffin looks supp...
[ -0.08719499409198761, -0.13743266463279724, 0.47642356157302856, -0.20332661271095276, -0.2642002999782562, 0.009479580447077751, 0.22267493605613708, -0.1524628847837448, -0.41964277625083923, -0.43200942873954773, -0.02635071612894535, 0.27713537216186523, -0.15778200328350067, -0.277855...
I have a dictionary that goes like this: ``` typedef struct dictNode { int key; char *value; struct dictNode *next; } Dict; ``` And a **get()** function that goes like this: ``` char *get(const Dict *dict, int key) { if(!dict) return NULL; Dict *currPtr = dict; while(currPtr) { if(...
[ -0.24036800861358643, -0.0495276004076004, 0.5085141658782959, -0.2924438416957855, -0.16372846066951752, 0.15755456686019897, 0.4474810063838959, -0.12128814309835434, 0.41793695092201233, -0.7413769364356995, -0.17851318418979645, 0.5575539469718933, -0.18236388266086578, 0.1878139078617...
currPtr->next; } } ``` Compiling this code produces the following error: **dict.c:85: warning: initialization discards qualifiers from pointer target type** This warning refers to the line: ``` Dict *currPtr = dict; ``` If I add a "const" before that line like this: ``` const Dict *currPtr = dict; ``` T...
[ -0.09215515106916428, 0.5134713649749756, 0.4714856743812561, -0.3434397578239441, 0.01628129929304123, -0.17360185086727142, 0.44215822219848633, -0.09662332385778427, 0.1930469572544098, -0.4286024272441864, -0.1386498063802719, 0.6731769442558289, -0.4013041853904724, 0.2430870682001114...
Now, I'm creating a new pointer, **currPtr**, that points to the same place as **dict**. This way, I use this pointer instead, to traverse the dictionary and keep **dict** pointer intact. Why do I also need to have **const** for **currPtr**? **2)** Second thing I don't understand is this: The line **currPtr = currPtr-...
[ -0.1628372222185135, 0.07636289298534393, 0.5863789916038513, -0.1831505000591278, -0.18188981711864471, 0.008533298969268799, 0.18199072778224945, -0.12999285757541656, -0.2051408588886261, -0.763869047164917, -0.03153342381119728, 0.5894550681114197, -0.10083463788032532, 0.3496134281158...
= dict; Dict *prevPtr = dict; while(currPtr) { if(currPtr->key == key) { prevPtr->next = currPtr->next; free(currPtr); } prevPtr = currPtr; currPtr = currPtr->next; } return dict; } ``` *Please note that I'm aware that this delete function cod...
[ -0.32673120498657227, -0.14363400638103485, 0.5230987071990967, -0.3526591956615448, 0.09157561510801315, 0.0325835682451725, 0.6284963488578796, -0.34737586975097656, 0.15030932426452637, -0.475666344165802, -0.5794249176979065, 0.6159393191337585, -0.17933261394500732, 0.2199021130800247...
it does not correctly work if I want to delete the first element for instance. It doesn't matter, I'll finish later, it suffices to demonstrate my problem...* **3)** So, in the **get()** function I needed to add **const** to **currPtr** but in this **del()** function, I don't need to add **const** to **currPtr** nor *...
[ -0.12206541001796722, -0.0481891930103302, 0.6663759350776672, -0.10822410881519318, -0.2237820327281952, 0.04920436814427376, 0.3344048857688904, -0.5178045034408569, -0.1685640811920166, -0.5454190373420715, -0.20650295913219452, 0.9147806167602539, -0.30311933159828186, -0.0915483534336...
a **const** before **currPtr** and **prevPtr**? I can basically resume this whole post to: When and where exactly in my **get()** and **del()** functions should I use **const** and why, and, when and where I shouldn't? Without a pointer, you would have ``` const Dict currPtr ``` which is a constant Dict. Now, if yo...
[ -0.1199481189250946, 0.1567033976316452, 0.6202351450920105, -0.28722772002220154, -0.2512092888355255, 0.00911802425980568, 0.1573033481836319, 0.11422190815210342, 0.02094295620918274, -0.39464980363845825, -0.3224383592605591, 0.7077528238296509, -0.2533959746360779, 0.1420566886663437,...
= otherPtr; // possible: the pointer is not constant ``` You would get an error for the second case if you make the pointer constant. Keeping the pointed dict constant too, this would look like this ``` const Dict * const currPtr = init; ``` Now you can't set currPtr to point to something different, because the po...
[ -0.22306248545646667, -0.023306019604206085, 0.3020934462547302, -0.3329533636569977, -0.01985042914748192, -0.2931634783744812, 0.07562056928873062, -0.03248033672571182, -0.26126614212989807, -0.27027609944343567, -0.09577076137065887, 0.45700034499168396, -0.5429985523223877, -0.0421671...
snippet. If you then read it from right to left, it tells you what it is "const pointer to a const Dict". If you have a type, it doesn't matter how you order the specifiers ``` int const a = 10; const int b = 10; ``` Both are constant integers. That is why we could put const right of the Dict type specifier. Now, i...
[ 0.20478181540966034, -0.03641941398382187, 0.598703145980835, 0.038913801312446594, -0.12097964435815811, 0.17334231734275818, -0.04429339990019798, 0.21496155858039856, -0.4059377610683441, -0.5230713486671448, -0.2296229749917984, 0.3216096758842468, -0.38707607984542847, 0.2168389856815...
const *p = NULL; // doesn't work without a cast. Will at least provoke a warning int *pn = p; int *p = NULL; // always works: pretending to point to something const doesn't harm. int const *pc = p; ``` Note that if you make the pointer itself const, the rules are different to that. They are analogous to const applie...
[ 0.13671858608722687, 0.16769781708717346, 0.3737551271915436, -0.1863294243812561, -0.14658686518669128, -0.06809433549642563, 0.6106223464012146, -0.21914617717266083, -0.12385393679141998, -0.5715351104736328, -0.20506079494953156, 0.5862705111503601, -0.5395574569702148, -0.209276705980...
copying the value into a new variable (whether pointer or not), the new variable is not connected in any way to the other variable, because the value read has no associativity to how the value was created in the first place. The const of the other variable doesn't matter.
[ 0.39371442794799805, -0.0034623797982931137, 0.40321457386016846, 0.5597119927406311, 0.13876287639141083, -0.11573228240013123, -0.13891719281673431, 0.2361452430486679, -0.06420321017503738, -0.4781791567802429, 0.18997125327587128, 0.2677253186702728, -0.5274155139923096, 0.595004558563...
I know NetBeans has this feature, but I can't find it in Eclipse. A quick search for plugins was not successful. [Java2Html - Eclipse Plugin](http://www.java2html.de/eclipse.html): > **Convert files:** > > Select items in the Package Explorer, Navigator or other views and right click to open the context menu. Ther...
[ 0.4368688762187958, -0.013270335271954536, 0.2797635793685913, -0.17228902876377106, -0.3189197778701782, -0.15353038907051086, 0.09551413357257843, -0.20803704857826233, 0.01043442077934742, -1.066561222076416, -0.027217140421271324, 0.7987089157104492, -0.2384335696697235, -0.19617635011...
tab size, etc. for conversion can be adjusted on the preference pages (Menu "Window" - "Preferences" - "Java" - "Java2Html")...
[ -0.12414857000112534, -0.0976397767663002, 0.35366517305374146, 0.07291310280561447, -0.07879211753606796, 0.19549338519573212, -0.16152703762054443, -0.07354244589805603, -0.1546509563922882, -0.855509340763092, -0.25650516152381897, 0.1816975325345993, -0.17276053130626678, -0.1806878447...
I have a site that has an IE8-only problem: The code is: ``` var w = window.open(urlstring, wname, wfeatures, 'false'); ``` The error is: > Message: Invalid argument. > > Line: 419 > Char: 5 > > Code: 0 > > URI: <http://HOSTNAME/js_context.js> I have confirmed the line number of the code (the "Line...
[ 0.06654694676399231, 0.24370995163917542, 0.5214133858680725, -0.26757386326789856, -0.12930572032928467, -0.06197996810078621, 0.6439191102981567, -0.00392336817458272, -0.0608389750123024, -0.687468409538269, -0.1822451651096344, 0.7094951272010803, -0.33243033289909363, 0.12989532947540...
in using assigning the result of window.open() when doing "var w". When I split the line into two statements it works in IE8. UPDATE2: Based on: <http://javascript.crockford.com/code.html> > When a function is to be invoked > immediately, the entire invocation > expression should be wrapped in parens > so that...
[ 0.11500289291143417, -0.030796676874160767, 0.2280353456735611, -0.3427221179008484, -0.20082247257232666, -0.19552353024482727, 0.3249628245830536, -0.3406684696674347, 0.00852416642010212, -0.5090389847755432, -0.1937943696975708, 0.5900895595550537, -0.28951629996299744, -0.020061345770...
posting but maybe still useful for someone. I had the same error message. In the end the problem was an invalid name for the second argument, i.e., I had a line like: ``` window.open('/somefile.html', 'a window title', 'width=300'); ``` The problem was 'a window title' as it is not valid. It worked fine with the...
[ 0.2915053963661194, 0.1948942244052887, 0.29564449191093445, 0.022941919043660164, -0.3115122318267822, -0.22362074255943298, 0.422279953956604, 0.38965341448783875, -0.1314356029033661, -0.6371948719024658, -0.16438627243041992, 0.33311283588409424, -0.2067912220954895, 0.3302046954631805...
\_parent * \_search * \_self * \_top
[ -0.12410078197717667, 0.3606509566307068, -0.01550458837300539, -0.0666918084025383, 0.4954797327518463, 0.01733875460922718, 0.22771714627742767, 0.3645095229148865, 0.06386304646730423, -0.643676221370697, -0.3328601121902466, 0.13743746280670166, 0.06055677309632301, 0.1930578052997589,...
I'm showing a modal dialog via "window.showModalDialog(..." which happens in a vbscript function (the page shown is aspx). I'd like to do some resizing of the window based on the number of rows in a datatable that's coming back. So naturally I go to register a startup script that resizes the window based on the number ...
[ 0.12199066579341888, 0.14124779403209686, 0.6128190159797668, -0.3464559018611908, -0.08621298521757126, -0.009298117831349373, 0.08838000148534775, 0.1158243864774704, -0.2343938797712326, -0.805626630783081, 0.060135748237371445, 0.378030925989151, -0.46336328983306885, 0.258674144744873...
this.ClientScript.RegisterStartupScript(typeof(MyPageClassName), "hello", @"<script language=vbscript> sub fnWindowOnLoad() MsgBox ""hello""
[ -0.09484494477510452, 0.17134656012058258, 0.7118884921073914, -0.1783263236284256, 0.04861024394631386, -0.029371827840805054, 0.36727359890937805, -0.07028181850910187, -0.2611256539821625, -0.7807524800300598, 0.002530519850552082, 0.27879276871681213, -0.48473572731018066, 0.1635993123...
end sub <script>", false); } if (!this.ClientScript.IsStartupScriptRegistered(typeof(MyPageClassName), "hello")) { throw new Exception("Failed to load script"); } ``` To me it looks like this should work and show a message box that says "hello" when
[ -0.22564485669136047, -0.057859841734170914, 0.41414257884025574, -0.3861142694950104, 0.1632126122713089, -0.23993626236915588, 0.7214800119400024, -0.08414585888385773, -0.08458400517702103, -0.6698536276817322, -0.2002747654914856, 0.3809012174606323, -0.32376939058303833, 0.27534249424...
the page loads (I've got the window's onload event set to fnWindowOnLoad). But what happens is nothing, no exception, no alert. I've tried every Type I could think of in the typeof call. Nothing seems to work. The only thing I can think of is that since the dialog is a modal ClientScript.RegisterStartupScript won't run...
[ -0.26621413230895996, 0.19756785035133362, 0.9249994158744812, -0.17373330891132355, -0.21802940964698792, 0.05417103320360184, 0.5503072142601013, 0.012573905289173126, -0.40501537919044495, -0.8248451352119446, -0.04072841629385948, 0.5864824652671814, -0.39762794971466064, 0.29925084114...
far as I can tell. Take a look at the `filterdiff` utility, which is part of [patchutils](http://cyberelk.net/tim/software/patchutils/). For example, if you have the following patch: ``` $ cat example.patch diff -Naur orig/a/bar new/a/bar --- orig/a/bar 2009-12-02 12:41:38.353745751 -0800 +++ new/a/bar 2009-12-02 ...
[ 0.06642080098390579, 0.07016552984714508, 0.43370935320854187, -0.38470545411109924, -0.017255891114473343, 0.13124030828475952, 0.3157748878002167, 0.06384598463773727, -0.21404458582401276, -0.6810685992240906, -0.16562916338443756, 0.6853222846984863, -0.4347291886806488, -0.13666681945...
this: ``` $ cat example.patch | filterdiff -i 'new/a/*' --- orig/a/bar 2009-12-02 12:41:38.353745751 -0800 +++ new/a/bar 2009-12-02 12:42:17.845745951 -0800 @@ -1,3 +1,3 @@ 4 -5 +e 6 --- orig/a/foo 2009-12-02 12:41:32.845745768 -0800 +++ new/a/foo 2009-12-02 12:42:25.697995617 -0800 @@ -1,3 +1,3 @@ 1 2 -3 +c...
[ 0.025605561211705208, 0.19847585260868073, 0.5507668256759644, -0.45181378722190857, -0.09499701112508774, 0.14087334275245667, 0.3896694481372833, -0.18469233810901642, -0.5971800088882446, -0.758753776550293, -0.2956288158893585, 0.5400341153144836, -0.7929162383079529, 0.029886376112699...
I have an interesting question about the way PHP evaluates boolean expressions. When you have, for example, ``` $expression = $expression1 and $expression2; ``` or ``` if ($expression1 and $expression2) ``` PHP first checks if `$expression1` evaluates to **`true`**. If this is not the case, then `$expression2` is...
[ 0.43631988763809204, 0.18959754705429077, -0.02834337204694748, 0.07412353903055191, -0.2601264417171478, -0.3207569718360901, 0.4328572750091553, -0.132139191031456, -0.04180008918046951, -0.20142674446105957, -0.08573108166456223, 0.7561572194099426, -0.19329656660556793, -0.376261144876...
evaluation](http://en.wikipedia.org/wiki/Short-circuit_evaluation), and to avoid it you need to do this, using a single `&`: ``` if($validator->valid("title") & $validator->valid("text")) { } ``` Note that this is not using [logical operators](http://www.php.net/language.operators.logical) but actually [bitwise ope...
[ -0.08804970234632492, 0.14742915332317352, -0.06700608134269714, -0.05975858494639397, -0.25348398089408875, -0.009767771698534489, 0.2683427333831787, -0.5745055675506592, 0.1306602656841278, -0.16014151275157928, -0.12623772025108337, 0.6960327625274658, -0.1806558519601822, -0.188795015...
consequence of PHP's type casting rules, and nothing to do with the behavior of the operators. As such, there is *some* debate as to whether it is good practice to use this side effect to circumvent short-circuit evaluation. I would personally at least put a comment that the & is intentional, but if you want to be as ...
[ 0.6562453508377075, 0.20983216166496277, 0.07441996037960052, -0.1675078272819519, -0.31459957361221313, -0.3625854551792145, 0.6978598237037659, -0.13106168806552887, -0.06098227947950363, 0.023503204807639122, 0.1457483023405075, 0.4570436477661133, -0.11808950453996658, -0.2150887548923...
I'm pretty sure the answer is no, but thought I'd ask anyway. If my site references a scripted named "whatever.js", is it possible to get "whatever.js" from within that script? Like: ``` var scriptName = ??? if (typeof jQuery !== "function") { throw new Error( "jQuery's script needs to be loaded before "...
[ 0.5119671821594238, 0.1486233025789261, 0.450115442276001, -0.3672999441623688, -0.003728285199031234, -0.32139450311660767, 0.7540566325187683, -0.050498541444540024, -0.3841608464717865, -0.47446534037590027, -0.02864934131503105, 0.49667423963546753, 0.08805312216281891, 0.0249073468148...
in: FF 3.0.8, Chrome 1.0.154.53, IE6 --- ### See also: [How may I reference the script tag that loaded the currently-executing script?](https://stackoverflow.com/questions/403967/how-may-i-reference-the-script-tag-that-loaded-the-currently-executing-script)
[ 0.1261684149503708, -0.02555331401526928, 0.4723450839519501, -0.037516381591558456, -0.13196350634098053, -0.05186295136809349, 0.15062852203845978, -0.034894634038209915, -0.4922485649585724, -0.45053204894065857, -0.2573651075363159, 0.6717602610588074, -0.4081452190876007, -0.264726281...
I am currently looking for a quick way to sync my production db and my dev-db. I was thinking of doing it with something like this : ``` mysqladmin -u <user> -p<password> <dev-db_name> | mysqldump -u <user> -p<password> --databases <production-db-name> --add-drop-table ``` but it seems that it just prints all of th...
[ 0.2447301298379898, -0.010799720883369446, 0.48842111229896545, -0.032380081713199615, 0.004852800630033016, -0.10021533071994781, -0.0985851138830185, 0.16954956948757172, -0.5100945234298706, -0.5222581028938293, 0.14427588880062103, 0.7567024827003479, -0.30262264609336853, -0.094886831...
On my website users can post comments on a document. Now I want to send an RSS feed to the webmasters when a comment is posted. I want the webmaster to be notified by a small pop-up in the right corner of the page. So this is what's happening: 1. User adds comment 2. system checks if webmaster is logged in 3. if webma...
[ 0.46373438835144043, 0.09034799039363861, 0.6275749802589417, 0.032119374722242355, -0.2595811188220978, -0.20176167786121368, 0.0011751161655411124, 0.2687942087650299, -0.46127042174339294, -0.77811199426651, 0.04633864387869835, 0.31876641511917114, -0.2588155269622803, 0.06626369059085...
that the command like looks something like this: ``` mysqldump ... | mysql ... ```
[ 0.17199014127254486, 0.2889181673526764, 0.3271057605743408, -0.12219647318124771, 0.04268475994467735, -0.04182807356119156, -0.07853638380765915, 0.28506237268447876, -0.10946334898471832, -0.42991775274276733, -0.37181034684181213, 0.5946636199951172, -0.3306596875190735, 0.142734050750...