text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
application controller is somewhat unnecessary. If you're only going to use this in your view / layout, you could put it directly in a helper module, such as LayoutHelper. You will need to use `helper :all` (or at least `helper :layout`) in your application controller. This is somewhat of personal preference - you may...
[ -0.10114283114671707, -0.2831405699253082, 0.5377779006958008, 0.13111375272274017, -0.03124196082353592, -0.2826375365257263, -0.1412716954946518, 0.07580629736185074, -0.3274594843387604, -0.8566734790802002, -0.24025222659111023, 0.7034510374069214, -0.46336862444877625, 0.0960743203759...
I know, there's JSONP, which involves server cooperation to name-space the data. What is bothering me is the fact that the content of script tag `src` is **evaluated**, but it's *NOT* available to read. ``` <script src="http://www.google.com"></script> ``` All we need to figure out is how to namespace the data, tha...
[ 0.24280089139938354, 0.36606746912002563, 0.3178649842739105, 0.09408929198980331, -0.1950947493314743, -0.3290497958660126, 0.1728735864162445, -0.062008049339056015, -0.1901651918888092, -0.4457344114780426, -0.028230618685483932, 0.4063274562358856, -0.16793961822986603, 0.0227683689445...
evals scope somehow (not much documentation about this as well), we could solve this annoying "*evaluated but not readable*" thing. Any ideas? HTML5 provides `window.postMessage` which provides a mechanism for safe cross domain messaging, and is supported by Firefox 3, Opera 9.6, and WebKit nightlies. That said your ...
[ 0.3760998249053955, -0.04395255073904991, 0.45175701379776, -0.1646376997232437, -0.2282002717256546, 0.12422386556863785, 0.5802019238471985, -0.4146521985530853, -0.2643214464187622, -0.5042777061462402, -0.4081239104270935, 0.5367372035980225, -0.6793763041496277, -0.10437722504138947, ...
i = 0; i < 10; i++) ; doSomething();; ``` meaning the for-loop becomes empty, and `doSomething` would only be called once. Clearly this would result in incredibly difficult to comprehend semantics, as well as making it substantially less safe to use, as eval would gain the ability to directly influence control flow.
[ -0.04065496847033501, -0.24758869409561157, 0.29464077949523926, -0.38557690382003784, -0.12295951694250107, -0.02115670032799244, 0.5536971688270569, -0.48309025168418884, 0.03436021879315376, -0.27586761116981506, -0.2441120445728302, 0.5207155346870422, -0.3424806594848633, 0.1452407687...
Coming from Eclipse and having been used to duplicate lines all the time, it's pretty strange finding out that Xcode has no such function. Or does it? I know it's possible to change the system wide keybindings but that's not what I'm after. The whole point is NOT to use the `Cmd-C`/`Cmd-V` shortcuts. I have the same i...
[ 0.6526832580566406, -0.004842865280807018, 0.21511201560497284, 0.3109337389469147, -0.17618046700954437, -0.023782994598150253, 0.420071542263031, 0.3515108525753021, -0.1832013577222824, -0.8693084716796875, 0.10670910030603409, 0.2532978057861328, -0.20335949957370758, 0.077419899404048...
`~/Library/KeyBindings/PBKeyBinding.dict` with the following content and restart Xcode. ``` { "^$K" = ( "selectLine:", "cut:" ); "^$D" = ( "selectLine:", "copy:", "moveToEndOfLine:", "insertNewline:", "paste:", "deleteBackward:" ); } ```...
[ -0.1256761997938156, -0.02287445403635502, 0.2771238088607788, -0.09617049992084503, 0.25734245777130127, 0.10860621929168701, 0.338458776473999, -0.22629596292972565, 0.026169337332248688, -0.6471003293991089, -0.4210813641548157, 0.6687583327293396, -0.29442065954208374, 0.06990081071853...
current line and `Ctrl`-`Shift`-`D` for duplicating the current line. Please note that this will **only** work if you are **NOT** using a custom key binding set in Xcode. Switch to "XCode Default" and things should work. Tested on XCode 3.2 on Snow Leopard. More information on Mac OS X key bindings: <http://funkworks....
[ 0.026704493910074234, -0.39572086930274963, 0.553984522819519, 0.10859396308660507, 0.4194648563861847, -0.03451814129948616, 0.41135892271995544, -0.6120333075523376, -0.23954032361507416, -0.4060060679912567, -0.32520341873168945, 0.5644041895866394, -0.25596868991851807, -0.036749906837...
I'm very new to Drupal, and am wondering if there's an API that external programs can call to transfer text and images directly into my Drupal site. Yes. There are several ways to accomplish this in Drupal: 1. If you're doing a one-time import, try the [Node Import](http://drupal.org/project/node_import) module --- th...
[ 0.7547540068626404, 0.012163197621703148, 0.42592981457710266, -0.06789901107549667, -0.3180462121963501, -0.29539772868156433, 0.151725634932518, 0.08583436906337738, -0.34263503551483154, -0.7321009635925293, -0.12228916585445404, 0.28346729278564453, -0.23572199046611786, 0.069238394498...
example), check out [FeedAPI](http://drupal.org/project/feedapi). 4. If you want to write your own PHP code to create new content, check out [this article](http://acquia.com/blog/migrating-drupal-way-part-i-creating-node) for an introduction.
[ 0.5456226468086243, -0.3654255270957947, 0.10442737489938736, 0.18615476787090302, -0.09828159213066101, -0.17341022193431854, -0.0024237679317593575, 0.33068180084228516, -0.273292601108551, -0.5529286861419678, -0.008511929772794247, 0.040041401982307434, -0.4193934500217438, -0.00934427...
> Write code in your favorite language > and let Windows Task Manager represent > a sine wave in CPU Usage History. This is a technical interview quiz from Microsoft China. I think it's a good question. Especially it's worth knowing how candidate understand and figure out the solution. **Edit**: It's a good point i...
[ 0.05077189579606056, 0.025036649778485298, 0.37036851048469543, 0.1183387041091919, 0.1797664761543274, -0.09280141443014145, 0.4164789915084839, 0.005028924439102411, -0.1194709837436676, -0.8046167492866516, -0.13750946521759033, 0.46544960141181946, 0.005409062374383211, 0.1517956703901...
float t = sin(static_cast<float>(x)/180*PI)*0.5f + 0.5f; DWORD busy_time = static_cast<DWORD>(t*TIME_SLICE); DWORD wait_start = GetTickCount(); while(GetTickCount() - wait_start < busy_time) { } Sleep(TIME_SLICE - busy_time); } } ``` This would give a period of ...
[ 0.4549598693847656, -0.34420672059059143, 0.5099112391471863, -0.513745903968811, 0.3383466303348541, -0.10083507746458054, 0.4206293225288391, -0.401717871427536, -0.25105878710746765, -0.49083465337753296, -0.2971191108226776, 0.4970203936100006, 0.07847760617733002, -0.03249580785632133...
you are only running it on a single CPU. Neither of these is really that common in reality.
[ 0.43487992882728577, 0.14721377193927765, -0.03778388351202011, 0.5190622806549072, 0.052528154104948044, 0.027517620474100113, -0.06452060490846634, 0.40162205696105957, -0.19275428354740143, -0.26647353172302246, 0.17693789303302765, 0.4359511137008667, -0.11944394558668137, 0.1240397468...
I would like to write a replacement for the S60 Active Screen (app that runs in the idle screen). But I can't find any documentation covering how to write/draw to the idle/active screen API's for S60 3rd edition. I dont mind if they are for C++ or Python bindings. Can anyone point me to some docs/examples? PS I know...
[ 0.38602414727211, -0.07074541598558426, 0.25414979457855225, 0.05931604281067848, 0.08359597623348236, 0.0168387982994318, 0.07399402558803558, 0.09131254255771637, -0.20569182932376862, -0.932707667350769, 0.0009546438232064247, 0.9079630970954895, -0.28710269927978516, -0.204217836260795...
are a couple of ways to do this - the simplest is via `HandleWsEventL()` in your AppUi class. Over-ride [HandleWsEventL()](http://www.symbian.com/Developer/techlib/v70sdocs/doc_source/reference/cpp/UIControlFramework/CCoeAppUiClass.html#%3a%3aCCoeAppUi%3a%3aHandleWsEventL()) and check for `EEventFocusGroupChanged` even...
[ -0.12872368097305298, -0.09571866691112518, 0.7421134114265442, -0.21469315886497498, 0.014029070734977722, 0.2586935758590698, 0.028869185596704483, -0.40314456820487976, -0.4566578269004822, -0.7173897624015808, -0.1746765822172165, 0.618001401424408, -0.3805350959300995, -0.031469676643...
Most people have been here at some point or another - in your project, you get really small requests along the way that you're happy to take care of, but at some point the little things add up. Sometimes it takes less time to implement something than it does to re-negotiate the project plan. Providing the spec/require...
[ 0.8061769008636475, -0.03843746706843376, 0.2837490737438202, 0.29697832465171814, 0.10577383637428284, -0.18414200842380524, -0.000808209995739162, 0.05156193673610687, -0.28250324726104736, -0.6158595085144043, 0.023192845284938812, 0.5012302398681641, 0.4401707947254181, -0.218752086162...
how you make the call. Budget N hours of ad-hoc requests in your project plan. (You know it's going to happen, so why isn't it in there?) Then track your ad-hoc requests and renegotiate when the budget's blown.
[ 0.723340630531311, -0.007600206416100264, 0.2793138027191162, 0.2028847336769104, 0.23902221024036407, -0.06209862232208252, -0.10069245845079422, -0.057185109704732895, -0.2812049388885498, -0.11962645500898361, 0.15846006572246552, 0.7768015265464783, 0.19711549580097198, -0.228722378611...
I've tried RSS feeds, but these always-updating sites that have tons of entries per day just fill up my poor reader. I do keep my Google Reader, I monitor quite a few feeds, but they are all (with the exception of Lifehacker and icanhascheezburger) feeds that have at most one or two entries per day. Right now, I keep ...
[ 0.6990137100219727, 0.3172089755535126, 0.2722225785255432, 0.002798254368826747, 0.08613741397857666, 0.004100523889064789, 0.25795674324035645, 0.2880418598651886, -0.569775402545929, -0.4567411243915558, 0.31742656230926514, 0.40642425417900085, -0.09362645447254181, 0.12132477015256882...
get the best information out of it while not having to deal with the questions that I neither care about nor have time for? How did you find this question in the sea of questions here on stackoverflow? I use Google Reader with 3 different folders. "Personal" is for sites which only update 1 - 2 times a day and which I...
[ 0.42871126532554626, -0.03995348513126373, 0.4001789391040802, 0.5346844792366028, -0.1344771832227707, -0.11228406429290771, 0.029247134923934937, 0.21064552664756775, -0.21505028009414673, -0.7678397297859192, 0.13056878745555878, 0.5012074708938599, 0.37326517701148987, 0.11916700750589...
and I go through it when I have the time. This way, you can make sure you keep track of all your important content and also see stuff like SO.
[ 0.6371634006500244, 0.4421379268169403, -0.1395660787820816, 0.02813584730029106, 0.1692894697189331, -0.5321007966995239, 0.1582699716091156, 0.596603512763977, -0.17303788661956787, -0.37257155776023865, 0.11706268787384033, 0.31614309549331665, 0.45743876695632935, 0.027844661846756935,...
I'm studying for my operating systems midterm and was wondering if I can get some help. Can someone explain the checks and what the kernel does during the open() system call? Thanks! Very roughly, you can think of the following steps: 1. Translate the file name into an inode, which is the actual file system object d...
[ 0.15466246008872986, 0.16566208004951477, 0.25733068585395813, 0.27853307127952576, 0.12167085707187653, -0.255727082490921, 0.21549323201179504, 0.006709434557706118, -0.1611972451210022, -0.8724340796470642, -0.27481186389923096, 0.740136981010437, -0.21223217248916626, 0.061755783855915...
open. 3. Create what's sometimes called an *open file descriptor* within the kernel. There is one of these objects for each file the kernel has opened on behalf of any process. 4. Allocate an unused index in the per-process file descriptor table, and point it at the open file descriptor. 5. Return this index from the s...
[ 0.15116557478904724, 0.10913389921188354, 0.5971982479095459, 0.06560136377811432, -0.15732279419898987, -0.15931732952594757, 0.03510972112417221, -0.11031793802976608, -0.276396244764328, -0.6804625988006592, -0.6135492324829102, 0.46173590421676636, -0.31702834367752075, 0.4150811135768...
By default error page in ZF looks like this: ``` Fatal error: Uncaught exception 'Zend_Form_Exception' with message 'Method setDeault does not exist' in /usr/home/.../library/Zend/Form.php:2838 Stack trace: #0 [internal function]: Zend_Form->__call('setDeault', Array) #1 /usr/home/.../application/admin/controllers...
[ -0.08700306713581085, 0.2886975109577179, 0.3270881175994873, -0.2147369235754013, -0.012180004268884659, -0.21708577871322632, 0.30366677045822144, -0.34765440225601196, -0.07877237349748611, -0.5832713842391968, -0.09625717997550964, 0.48014557361602783, -0.3899696171283722, 0.0441356934...
given my current position (lat,long) I want to quickly find the nearest neighbor in a points of interest problem. Thus I intend to use an R-Tree database, which allows for quick lookup. However, first the database must be populated - of course. Therefore, I need to determine the rectangular regions that covers the area...
[ -0.1061783879995346, 0.060660190880298615, 0.7860496640205383, -0.005228056572377682, 0.028939858078956604, 0.020054854452610016, 0.007715312298387289, -0.15929266810417175, -0.19926883280277252, -0.4881175756454468, -0.2864078879356384, 0.06223991513252258, 0.024423182010650635, 0.4731574...
regions). /John **Edit:** The below approach works, but ignores the critical feature of R-trees -- that The splitting behavior of R-tree nodes is well defined, and maintains a balanced tree (through B-tree-like properties). So in fact, all you have to do is: 1. Pick the maximum number of rectangles per page 2. Create...
[ -0.2957206070423126, -0.3100546598434448, 0.5075355172157288, 0.28251248598098755, 0.2740977704524994, -0.040475498884916306, 0.0291422288864851, -0.3197670876979828, -0.3102079927921295, -1.0241930484771729, -0.2689577043056488, -0.07107335329055786, -0.10286238044500351, 0.31480473279953...
exits -- area works) 6. If multiple rectangles apply -- choose one based on how full it is, or some other heuristic 4. If overflow occurs -- use the quadratic split to move things around... 5. And so on, using R-tree algorithms straight out of a text book. I think the method below is ok for finding your initial seed ...
[ 0.02718808688223362, 0.027611223980784416, 0.11957822740077972, 0.0672794058918953, -0.052899524569511414, 0.02365308627486229, 0.1248980462551117, -0.45604807138442993, -0.1616102159023285, -0.5504850149154663, -0.10870927572250366, 0.276024729013443, -0.10696865618228912, -0.105220869183...
not all of the work. --- The KD approach: enclose everything in a rectangle. If the number of points in the rectangle is > threshold, sweep in direction D until you cover half the points. Divide into rectangles left and right (or above and below) the splitting point). Call the same procedure recursively on the n...
[ 0.24145112931728363, -0.4589942395687103, 0.23347000777721405, -0.13342954218387604, -0.26754727959632874, -0.22908201813697815, -0.010078201070427895, -0.7486339211463928, -0.4484022557735443, -0.8165236115455627, -0.28281474113464355, -0.00020198410493321717, -0.25614169239997864, 0.1132...
I want to make sure my sweeper is being called as appropriate so I tried adding something like this: ``` it "should clear the cache" do @foo = Foo.new(@create_params) Foo.should_receive(:new).with(@create_params).and_return(@foo) FooSweeper.should_receive(:after_save).with(@foo) post :create, @create_p...
[ 0.2670542597770691, 0.3788471221923828, 0.27044063806533813, -0.32970771193504333, -0.08640632033348083, -0.05394717678427696, 0.6645135879516602, -0.7923989295959473, -0.3257409334182739, -0.5714071989059448, -0.026796432211995125, 0.5012338161468506, -0.32673507928848267, 0.0000320180370...
idea to temporarily enable this at runtime for your caching specs. 'after\_save' is an instance method. You setup an expectation for a class method, which is why it's failing. The following is the best way I've found to set this expectation: ``` it "should clear the cache" do @foo = Foo.new(@create_params) Foo.s...
[ 0.22860229015350342, -0.04977370798587799, 0.35484278202056885, 0.05078858137130737, 0.09008090943098068, 0.04046560451388359, 0.22504720091819763, -0.581662118434906, -0.19894401729106903, -0.6281868815422058, 0.3086121380329132, 0.31391969323158264, -0.39183059334754944, 0.07348966598510...
model with 'instance\_variable\_set'.
[ -0.5346516966819763, -0.2766479551792145, 0.1778925508260727, 0.23623724281787872, 0.04673513397574425, 0.1843130737543106, -0.08156510442495346, -0.12443765252828598, 0.010092837736010551, -0.7497903108596802, -0.15473641455173492, 0.3464936912059784, -0.6495742201805115, 0.20069974660873...
I'm doing some work where SIMD is required and I need to do operations on an array of doubles. Do any of the mainstream architectures support this? I've only seen floating point operations. Thanks in Advance, Stefan Yes, x86 can do it with the SSE2 instructions. A CELL too, although it's performance is pretty awful w...
[ 0.5628386735916138, 0.22236034274101257, -0.05265704542398453, 0.2639736831188202, -0.03601355105638504, -0.17091171443462372, 0.37554579973220825, 0.1132366880774498, -0.24109472334384918, -0.35745006799697876, 0.07829201221466064, 0.3719390630722046, -0.36703336238861084, -0.018364312127...
I was wondering How To make a Form and Div have a max width of child elements. Eg in this example both the form and the outerDiv stretch the full width of the page. I would like the form and outerDiv to have a width of 200px. This becomes a problem when I have this page in an iframe, because the width of the page is ...
[ 0.3256888687610626, -0.26241713762283325, 0.6937191486358643, 0.044437211006879807, -0.23650182783603668, 0.21717087924480438, 0.035998620092868805, -0.6047922968864441, -0.07003702968358994, -0.8202449083328247, -0.11097115278244019, 0.2889767289161682, 0.20058295130729675, -0.14398846030...
Both the form and outer div stretch 100%. I am wondering how I would get them to wrap tightly around the inner div. </div> </div> </form> </body> ``` Thanks for your time and help. I believe the "proper" way is to make them inline elements: ``` style="display: inline;" ``` divs are block elemen...
[ 0.4115869104862213, -0.07617335021495819, 0.7618005871772766, 0.05491941422224045, -0.17510880529880524, -0.09484574943780899, 0.09612724930047989, -0.30882248282432556, -0.08001833409070969, -0.8668583631515503, 0.07746399194002151, 0.46701377630233765, -0.027659947052598, -0.127418845891...
Update: iPhone SDk 3.0 now addresses the question here, however the NDA prevents any in depth discussion. Log in to the iPhone Dev Center if you need more info. Ok, I have to admit I'm a little lost here. I am fairly comfortable with Cocoa, but am having trouble picking up the bit of javascript needed to solve this p...
[ 0.19269871711730957, 0.15577107667922974, 0.38218924403190613, -0.04898511990904808, -0.17290090024471283, -0.04381101205945015, 0.6006409525871277, 0.21759116649627686, -0.2432589828968048, -0.9017218947410583, -0.16788452863693237, 0.7311846613883972, -0.1633720099925995, -0.388515532016...
show a url being sent to google (which seems easy enough), but in others they show javascript. It seems for reverse geocoding, the request might be be harder than sending the url with some parameters (but I hope I am wrong). Can someone point me to the correct way to make a request? (In objective-C, so I can wrap my h...
[ 0.031893711537122726, -0.018643442541360855, 0.7333515882492065, 0.027531921863555908, -0.12413974106311798, -0.1458224356174469, 0.3914409577846527, 0.12055680900812149, -0.1443401724100113, -0.6735599040985107, -0.1658533662557602, 0.6752945780754089, -0.3883354365825653, -0.372224837541...
of the Google API. The Google API is written in Javascript. You could use an objective-c to JS bridge, as the [Google Maps Component](http://code.google.com/p/iphone-google-maps-component/) does, but that doesn't really solve the issue - you're still making JS calls! Unfortunately, that means you a) need to use a webv...
[ 0.30633604526519775, 0.07954210042953491, 0.2424260675907135, 0.19779238104820251, -0.26468440890312195, -0.18966297805309296, 0.14162510633468628, -0.33215460181236267, 0.18868190050125122, -0.7522982954978943, -0.10398668050765991, 0.7399438619613647, -0.6785869598388672, -0.156084626913...
A different question, i.e. [Best .NET obfuscation tools/strategy](https://stackoverflow.com/questions/2525/best-net-obfuscation-tools-strategy), asks whether obfuscation is easy to implement using tools. My question though is, **is obfuscation effective?** In a comment replying to [this answer](https://stackoverflow.c...
[ 0.19809138774871826, 0.2525469660758972, 0.01890871301293373, -0.20710425078868866, -0.2370566874742508, -0.04246348515152931, 0.14310716092586517, -0.1095837950706482, -0.3197299838066101, -0.40037381649017334, -0.16294942796230316, 0.8489653468132019, -0.13840484619140625, -0.13509367406...
the license protection), and add a jump to skip that. If the worry is more than just cracking by an end-user or a 'pirate' though: if the worry is "source theft" i.e. if you're a software vendor, and your worry is another vendor (a potential competitor) reverse-engineering your source, which they could then use in or ...
[ 0.26021409034729004, 0.38724568486213684, 0.364384263753891, 0.1891402304172516, 0.08746535331010818, -0.5047491788864136, 0.2595050632953644, -0.03252563625574112, 0.07191602885723114, -0.08770643174648285, -0.22240447998046875, 0.7979332208633423, -0.2100287526845932, -0.0264736935496330...
to a real cracker*", I'd like some insight into **why** it's ineffective (and not just "how much" it's not effective). --- **2nd edit:** I'm not worried about someone's reversing the algorithm: more worried about their repurposing the actual *implementation* of the algorithm (i.e. the source code) into their own pro...
[ 0.7774611115455627, 0.3354942202568054, -0.04479504004120827, 0.10519113391637802, 0.04801220819354057, -0.13343584537506104, 0.23864121735095978, 0.33031514286994934, -0.20829875767230988, -0.1312803328037262, -0.1698291301727295, 0.6274067163467407, 0.4341132342815399, -0.229672089219093...
a maintenance nightmare, and hope that it needs little maintenance? If this scenario *is* a possibility then is obfuscated .Net code any more vulnerable to this than compiled machine code is? Is most of the obfuscation "arms race" aimed mostly at preventing people people from even 'cracking' something (e.g. finding an...
[ 0.27339300513267517, 0.08799827843904495, -0.0919550210237503, 0.04654383659362793, -0.13006691634655, -0.33852314949035645, 0.21362324059009552, 0.06959497928619385, -0.23955419659614563, -0.5118719339370728, 0.01716698706150055, 0.7079187035560608, -0.07439812272787094, 0.275348812341690...
Eiliams book, "[Reversing: Secrets of Reverse Engineering](https://rads.stackoverflow.com/amzn/click/com/0764574817)", the author discusses source theft as one reason behind reverse engineering in the first two chapters. Basically, what it comes down to is the only chance you have of being targeted for source theft i...
[ 0.14588259160518646, 0.09773600846529007, -0.09533945471048355, 0.18410247564315796, -0.020790984854102135, -0.08934520184993744, -0.009463494643568993, 0.006513805128633976, 0.053448472172021866, -0.21770669519901276, 0.2547552287578583, 0.6467863321304321, 0.08327057212591171, 0.11939643...
have, you don't need to worry about source theft. The cost involved with reversing any significant amount of source-code out of your application quickly exceeds the cost of re-writing it from scratch. Even if you do have some algorithm you don't want them to have, there isn't much you can do to stop determined and sk...
[ 0.7997159957885742, 0.49900490045547485, 0.062345679849386215, 0.3078902065753937, 0.09021969884634018, -0.43556180596351624, 0.5976151823997498, 0.17638567090034485, -0.2195431888103485, -0.39768025279045105, -0.1899176836013794, 0.6016470193862915, 0.05414428934454918, 0.1065861061215400...
easy, right? * 3rd Party Packers - [Themida](http://www.oreans.com/) is one of the better ones. Packs an executable into an encrypted win32 application. Prevents reflection if the application is a .NET app as well. * Custom Packers - Sometimes writing your own packer if you have the skill to do so is effective because ...
[ 0.35234057903289795, 0.07807176560163498, -0.22031687200069427, -0.027938736602663994, -0.2457892894744873, -0.31832459568977356, 0.28175026178359985, -0.4422418773174286, -0.3177233934402466, -0.45906713604927063, -0.14600355923175812, 0.4159604012966156, -0.308658242225647, -0.5212973952...
never executed locally. The only "fool-proof" method of protection. However, packers can be unpacked, and obfuscation doesn't really hinder those who want to see what you application is doing. If the program is run on the users machine then it is vulnerable. Eventually its code must be executed as machine code and i...
[ 0.4919285178184509, 0.08865141868591309, -0.04996158555150032, 0.059541214257478714, 0.05445180833339691, -0.19709208607673645, 0.7576291561126709, 0.11714509129524231, -0.23107795417308807, -0.6050853729248047, -0.16565676033496857, 0.24455967545509338, -0.12019744515419006, -0.1199521869...
an order of magnitude longer to reverse those equivalent 20kLOC from your application into workable source if you took the bare minimum precautions. This is why it is only cost-effective to reverse small, industry specific algorithms from your application. Anything else and it isn't worth it. Take the following fict...
[ 0.397415429353714, 0.150082528591156, 0.010450447909533978, 0.3210029900074005, 0.04749799892306328, -0.13566283881664276, 0.7372716069221497, -0.10486571490764618, -0.24034282565116882, -0.1632024645805359, 0.2876718044281006, 0.6321373581886292, 0.15026316046714783, 0.12697313725948334, ...
music-listening taste. Apple (being the pirates they are) gets wind of this and decides they really like your music suggest feature so they decide to reverse it. They will then hone-in on only that algorithm and the reverse engineers will eventually come up with a workable algorithm that serves up the equivalent sugge...
[ 0.34945589303970337, 0.37338316440582275, 0.2892182171344757, 0.3231775164604187, 0.23177914321422577, 0.020724976435303688, 0.10936015844345093, 0.3294648230075836, -0.319073349237442, -0.3665507733821869, -0.03419652581214905, 0.8657020926475525, 0.20530074834823608, 0.24836918711662292,...
simply be too costly and too time consuming. About 90% of the time they would be reversing boring, non-industry-secretive code that simply handled button presses or handled user input. Instead, they could hire developers of their own to re-write most of it from scratch for less money and simply reverse the important al...
[ 0.5200039148330688, 0.19279532134532928, -0.16141873598098755, 0.5564611554145813, 0.218017116189003, 0.030471056699752808, 0.2174060046672821, -0.0525820329785347, 0.2939644455909729, -0.27004730701446533, -0.07341989874839783, 0.5135613679885864, -0.028735028579831123, 0.1294132471084594...
I'm designing a table in SQL Server 2008 that will store a list of users and a Google Maps co-ordinate (longitude & latitude). Will I need two fields, or can it be done with 1? What's the best (or most common) data-type to use for storing this kind of data? Take a look at the new Spatial data-types that were introduc...
[ -0.08615940809249878, 0.06582323461771011, 0.7048843502998352, 0.2098769098520279, -0.026051264256238937, 0.04152066260576248, -0.22383062541484833, -0.24065522849559784, -0.35738837718963623, -0.8304699659347534, 0.06347029656171799, 0.26375922560691833, -0.10696747153997421, 0.0671627297...
I have 2 simple tables and a foreign key defined in SQL Server Express: --- Product * ProductID [auto-inc] * Name * CompanyID [not-null] Company * CompanyID [auto-inc] * Name FK\_Product\_Company * Product.CompanyID = Company.CompanyID --- I created an ADO.NET Entity Data Model and added all the tables to it....
[ 0.2161562144756317, 0.4910602867603302, 0.39470234513282776, -0.14751479029655457, -0.08358478546142578, 0.34676849842071533, -0.09399079531431198, -0.17424099147319794, 0.16021381318569183, -0.45611223578453064, 0.279136598110199, 0.2538645267486572, -0.46637749671936035, 0.55181849002838...
(from p in _db.Product where p.ProductID == 3 select p).First(); product.Company // == null ``` Are there any steps I'm missing to get this to work? Thanks --- Things I have tried: -------------------- --- Running the following SQL, returns the company record correctly. ``` SELECT ...
[ 0.17284347116947174, 0.45773622393608093, 0.5254518985748291, -0.45339906215667725, 0.1585276573896408, 0.1895180493593216, 0.13105231523513794, -0.2073822319507599, -0.061822354793548584, -0.5075084567070007, -0.13286153972148895, 0.41289326548576355, -0.21457447111606598, 0.4787352383136...
_db.Product where p.ProductID == 3 select p).First(); var company = (from c in _db.Company where c.CompanyID == product.CompanyID select c).First(); ``` However, that does not compile because the field Product.CompanyID is hidden by the ORM generator and I d...
[ 0.06665752083063126, -0.004793281201273203, 0.2181955724954605, -0.6033774018287659, 0.09924732148647308, 0.21090859174728394, -0.003953080158680677, -0.3715074360370636, 0.18451842665672302, -0.4245154857635498, -0.37177392840385437, 0.43793565034866333, -0.45141154527664185, 0.2862341403...
it. --- The next best thing to run I guess is the following, and it did return a company: ``` var _db = new MyDBEntities(); var company = (from c in _db.Company where c.CompanyID == 2 select c).First(); ``` Just to be clear, Product with ID 3 corresponds to Company with ID 2. --- I ...
[ 0.2853182852268219, 0.11900315433740616, 0.45653730630874634, -0.2341795265674591, 0.10609380155801773, -0.12326839566230774, 0.0685143694281578, 0.04915563389658928, 0.11553773283958435, -0.28827476501464844, -0.059938784688711166, 0.6684919595718384, -0.2909969091415405, 0.31692400574684...
the Data Context class. You need to add the .Include method to your query. ``` var _db = new MyDBEntities(); var product = (from p in _db.Product.Include("Company") where p.ProductID == 3 select p).First(); ```
[ 0.11631134152412415, 0.10287570208311081, 0.31802240014076233, -0.12217644602060318, 0.24224698543548584, 0.008919292129576206, -0.001633250736631453, -0.3110879063606262, 0.1819281429052353, -0.35320016741752625, -0.42047014832496643, 0.3973149061203003, -0.6069416403770447, 0.45626556873...
I am lazy - and I am using a SQLDataSource to populate my dropdownLists. The Databind event for the databound objects is called before the Page.PreRender so I am doing something like this in the PreRender eventHandler: ``` private void InitializeDropDown() { this.myDropDown.Items.Insert(0, new Lis...
[ 0.2078925222158432, -0.10732902586460114, 0.5591914653778076, -0.19426797330379486, 0.0588369220495224, -0.19528542459011078, 0.25472819805145264, 0.02611047960817814, -0.27692171931266785, -0.41649600863456726, -0.0644167959690094, 0.6057416796684265, -0.3759070634841919, 0.07931268215179...
doing is not working. It usually works when I bind stuff dynamically like this: ``` myDropDown.DataTextField = "whatever"; myDropDown.DataValueField = "ID"; myDropDown.DataSource = GetStuff(); myDropDown.DataBind(); myDropDown.Items.Insert(0, "-- Select something --"); ``` What I am doing should be equivalent - onl...
[ 0.44736313819885254, -0.2500610649585724, 0.37440773844718933, -0.032598916441202164, -0.16086234152317047, -0.22024410963058472, 0.2162511795759201, -0.3299705386161804, -0.2272065132856369, -0.581806480884552, 0.08369102329015732, 0.5350599884986877, -0.5422044992446899, -0.1546365916728...
of others) as the datasource. ``` void RadGrid1_NeedDataSource(object sender, EventArgs e) { List<Stuff> things = new List<Stuff>(); /// fill the list RadGrid1.DataSource = things; } ``` This will let you focus on the presentation of the collection in the grid. I would refer to the LiveExamples included...
[ 0.31222036480903625, -0.17223623394966125, 0.3393132984638214, 0.0929718166589737, 0.08561284095048904, -0.22737817466259003, 0.17562998831272125, -0.2646655738353729, -0.37596720457077026, -0.6698234677314758, -0.29835930466651917, 0.5999460816383362, -0.4314275085926056, -0.0459888614714...
as above. You can use plain DataTables and DataSets to bind to the DataSource also, but those are only good for very small applications.
[ 0.10224947333335876, -0.141245499253273, 0.22015638649463654, 0.4717753231525421, -0.09441202878952026, -0.3249095678329468, -0.24489620327949524, 0.020293427631258965, -0.3557077944278717, -0.7784672975540161, -0.11017465591430664, 0.41198235750198364, -0.13234645128250122, 0.147173821926...
i'm hosting a website through a hosting company [1] on a linux/apache server. until now i serve the different content through one script with parameters. an example url is ``` www.mydomain.com/pages.php?date=1-10-2008 ``` now i want to change the scheme the url is composed of to something which looks completely like...
[ 0.5471927523612976, 0.23248682916164398, 0.893280029296875, -0.24741998314857483, -0.28608614206314087, -0.5924339294433594, 0.1913994699716568, 0.10040063410997391, -0.10849519819021225, -0.614856481552124, 0.12503059208393097, 0.07718342542648315, 0.035568587481975555, 0.5627696514129639...
the trick. [1] btw, the hosting company is [godaddy.com](http://www.godaddy.com/). Something like: ``` RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . pages.php ``` should rewrite every request for a file or directory that doesn't exist to pages....
[ 0.28335097432136536, 0.3146834671497345, 0.8401784896850586, 0.08389279246330261, 0.052152786403894424, -0.20694231986999512, 0.22973735630512238, 0.4524597227573395, -0.3073999881744385, -0.5280064940452576, -0.021312646567821503, 0.21632593870162964, 0.04648176580667496, 0.54364126920700...
Instead of placing triggers on tables everywhere in an Oracle database, is there a Java API that I can use to read transactions off the Oracle transaction log? My purpose is to be able to detect transactions going into a proprietary(vendor) database and react accordingly. We can't modify the database so that we do not...
[ 0.49588334560394287, 0.19889302551746368, -0.28278619050979614, 0.21280202269554138, -0.006308885291218758, -0.0353708490729332, -0.17360495030879974, -0.17864549160003662, -0.5826227068901062, -0.4457164704799652, 0.33060222864151, 0.6555765271186829, -0.27457642555236816, -0.117017835378...
When selling a software package that requires hardware, typically dedicated hardware (could be a VM), the buyer typically has to buy the server it will run on. So the total cost of ownership (focusing on the capital expense) includes the hardware in addition to the software. For example, a $3000 bug tracking package m...
[ 0.8100248575210571, 0.2149500995874405, 0.20705905556678772, 0.32605910301208496, 0.44059672951698303, 0.10734916478395462, 0.05124427005648613, -0.07873313874006271, -0.04835593327879906, -0.3690856695175171, -0.3183438181877136, 0.6682631373405457, 0.08675947040319443, 0.0913883596658706...
the sale of the software? "typically" - that's an assumption. And the cost can be more than just hardware and software if there are service or renewal fees involved. This can be true of open source as well, because a lot of companies like to pay for indemnification and services. If you buy hardware plus operating sys...
[ 0.7455013394355774, -0.026316052302718163, -0.04572520777583122, 0.4844578802585602, 0.1651584804058075, -0.006180682685226202, -0.2687903344631195, 0.08055908232927322, -0.28465259075164795, -0.18530189990997314, -0.12767758965492249, 0.7748191952705383, 0.08093973249197006, 0.29488453269...
a comment below that's worth surfacing. There's another consideration that's becoming more important all the time: power consumption. Some corporate data centers can't add a new server without retiring an old one or by reducing power consumption some other way. Being able to deploy a new software purchase on an existin...
[ 0.5087378025054932, 0.006802004296332598, 0.28022146224975586, 0.5753868222236633, 0.3827250897884369, -0.22758351266384125, -0.06767364591360092, 0.30159538984298706, -0.6114305853843689, -0.6777843236923218, -0.030911127105355263, 0.28296926617622375, 0.04834635928273201, 0.3014457821846...
When attempting to output an empty textarea element, the .NET XSLT processor collapses the element to its short form. Instead of this: ``` <textarea id="blah" name="blah"></textarea> ``` I get this: ``` <textarea id="blah" name="blah"/> ``` Which causes many web browsers (including IE and Firefox) to render the r...
[ 0.29888400435447693, 0.38062942028045654, 0.6398566961288452, -0.23464618623256683, -0.06494276225566864, -0.19093674421310425, 0.7733415365219116, -0.05648922175168991, 0.018371285870671272, -0.7715182304382324, -0.5045155882835388, 0.3720097541809082, -0.342340350151062, 0.08764562755823...
empty. I also have to use JavaScript to remove the extra space so that users don't begin their comments with a blank space. Does anyone know of a way to force the XSLT processor to render both the opening and closing tags *without* having to insert dummy content? Find your answer via a similar question right [here](ht...
[ 0.06713986396789551, 0.03577626869082451, 0.42004072666168213, 0.04617981240153313, -0.010212568566203117, -0.2042047530412674, 0.24226875603199005, 0.0744067057967186, -0.2967129945755005, -0.5423166751861572, -0.17092570662498474, 0.4870811700820923, -0.25232768058776855, 0.1030209064483...
Our application has a `CustomerNumber` field. We have hundreds of different people using the system (each has their own login and their own list of `CustomerNumber`s). An individual user might have at most 100,000 customers. Many have less than 100. Some people only put actual numbers into their customer number fields...
[ 0.22412754595279694, -0.039045024663209915, 0.5455031394958496, 0.11824897676706314, 0.1871315836906433, 0.6134471893310547, 0.025151023641228676, 0.006424579303711653, -0.07501113414764404, -0.44615495204925537, 0.010551178827881813, 0.4934101402759552, 0.16238844394683838, -0.15670861303...
sorted by Customer Number. e.g. ``` SELECT CustomerNumber,CustomerName FROM Customer WHERE User = ? ORDER BY CustomerNumber; ``` This is a naive solution as the people that only ever use numbers do not want to see a plain alphabetic sort (where "10" comes before "9"). I do not wish to ask the user any unnecessary q...
[ -0.3806714713573456, 0.016753418371081352, 0.14542308449745178, -0.0661453902721405, -0.06630581617355347, 0.33310621976852417, -0.2845515012741089, -0.1967439204454422, -0.31628087162971497, -0.6873838305473328, -0.2591281533241272, 0.3886186182498932, -0.505674421787262, 0.03842281922698...
'[0-9]', ''), TO_NUMBER(REGEXP_SUBSTR(cust_name, '[0-9]+')) ``` This will sort by the first occurence of number, not regarding it's position, i. e.: 1. `customer1 < customer2 < customer10` * `cust1omer ? customer1` * `cust8omer1 ? cust8omer2` , where a `?` means that the order is undefined. That suffices for mos...
[ -0.8072012662887573, 0.16695651412010193, 0.7672858238220215, -0.3076709508895874, 0.12257567793130875, 0.6171281337738037, -0.11276877671480179, -0.11016187816858292, -0.39046674966812134, -0.5460077524185181, -0.6433128714561462, 0.48430901765823364, -0.2524416148662567, 0.15561813116073...
digits. In practice, the query I wrote is enough. You may create a function based index on these expressions, but you'll need to force it with a hint, and a one-pass `SORT ORDER BY` will be performed anyway, as the `CBO` doesn't trust function-base indexes enough to allow an `ORDER BY` on them.
[ -0.031058240681886673, 0.2293001413345337, 0.3639262914657593, 0.06407500058412552, 0.1107262596487999, 0.0965270921587944, -0.011816730722784996, -0.19523760676383972, -0.3756808340549469, -0.12940481305122375, -0.12594802677631378, 0.46866437792778015, -0.3435824513435364, -0.17200297117...
I have a UserControl in WPF with numerous child controls which I would like to index like an array. These child controls are in the same grid control as other child controls which I am not interested in. I'd like to be able to index these controls in a way similar to: ``` someControl.Children[3]; ``` With out havin...
[ -0.1449591964483261, -0.006271247752010822, 0.38763993978500366, 0.16935691237449646, -0.12358879297971725, 0.1532965749502182, -0.21615591645240784, -0.19562259316444397, -0.09007293730974197, -0.9530321359634399, 0.27487489581108093, 0.42698934674263, -0.17554786801338196, 0.236915931105...
<Internal:DayCalendarCore Grid.Row="1" Grid.Column="2"/> <Internal:DayCalendarCore Grid.Row="1" Grid.Column="3"/> <Internal:DayCalendarCore Grid.Row="1" Grid.Column="4" /> <Internal:DayCalendarCore Grid.Row="1" Grid.Column="5"/> <Internal:DayCalendarCore Grid.Row="1" Grid.Column="6"/> <Internal:DayC...
[ 0.11785769462585449, -0.1505211591720581, 0.5464739799499512, -0.19044877588748932, 0.2236633151769638, 0.3347376883029938, 0.04239213094115257, -0.6364586353302002, 0.11522050201892853, -0.8698750734329224, -0.03476685285568237, 0.5154449343681335, -0.5658670663833618, -0.0064564407803118...
phone settings. To store preferences between runs of you application you need to do the following 1. Create a SharedPreferences object ``` SharedPreferences settings = getSharedPreferences(String n, MODE_PRIVATE); ``` *String n identifies your preferences and the second argument is the mode they'll be accessed* 2....
[ 0.12819235026836395, -0.008505218662321568, 0.5453265309333801, -0.18292587995529175, 0.3958221971988678, 0.09251052886247635, 0.41265663504600525, -0.29946818947792053, 0.2019941508769989, -0.7209604382514954, 0.035007767379283905, 0.9642441272735596, -0.40493229031562805, -0.298430830240...
to the preferences. If your app crashes before this line then the preferences will not be written. There is also a documented bug: commit() is supposed to return a boolean indicating success or failure. Last I checked it always returned false.* These preferences will by stored on the phone and will only be accessible ...
[ 0.5544390082359314, 0.0031543339136987925, 0.19954897463321686, 0.09335506707429886, 0.2298000305891037, 0.145894393324852, 0.49043163657188416, -0.044088106602430344, -0.10943864285945892, -0.64167720079422, -0.09988885372877121, 0.6533071994781494, -0.3857779800891876, -0.080882653594017...
As a jQuery neophyte I am somewhat confused by the different contexts in which the ***this*** keyword is used. Sometimes it refers to a DOM element e.g. *this.id* and sometimes it refers to a jQuery object e.g. *$(this).val()*. [Remy Sharp's blog post](http://remysharp.com/2007/04/12/jquerys-this-demystified/ "this de...
[ 0.008223277516663074, -0.02025078795850277, 0.21988768875598907, 0.010812021791934967, -0.45978832244873047, -0.22689907252788544, 0.21417661011219025, -0.04691058769822121, -0.12056148052215576, -0.4342380166053772, -0.2930639684200287, 0.7704052329063416, 0.11710089445114136, 0.204245761...
[What is this? by Mike Alsup](http://www.learningjquery.com/2007/08/what-is-this). Remy Sharp's post is confusing if you don't read it carefully, in my opinion. The meaning of `this` never changes. In the example you gave, there were 2 uses of `this`. As a DOM element in an event: ``` $('a').click(function() { ale...
[ 0.026344196870923042, -0.2200806736946106, 0.14070820808410645, -0.22555333375930786, -0.15805229544639587, -0.4502284824848175, 0.13017337024211884, 0.059915605932474136, -0.3164087235927582, -0.21889887750148773, -0.5285738706588745, 0.3763848841190338, -0.542009174823761, 0.042701166123...
element (not a jQuery object) which triggered an event. In the second code snippet above, it is **still** the same DOM element, only it is wrapped in a jQuery element by wrapping `$()` around it. As with any argument to the jQuery constructor, passing `this` into the constructor transforms it into a jQuery object. I t...
[ 0.157525897026062, -0.4380738437175751, 0.041123270988464355, -0.004234760068356991, -0.07377704977989197, -0.2631179392337799, 0.08672301471233368, -0.13478566706180573, -0.21741712093353271, -0.2970986068248749, -0.15043041110038757, 0.5483098030090332, -0.39253687858581543, -0.024225661...
this case, you're using the word `this` to refer to the plugin you're writing. In normal use-cases, you won't be writing plugins often so this is a much less common scenario. When not in the scope of the plugin, you can't use `this` to refer to the jQuery object. --- In the JavaScript language, the keyword `this` ref...
[ -0.04047843813896179, -0.06795680522918701, -0.085474893450737, -0.13903109729290009, -0.11251507699489594, -0.3172961473464966, 0.014138941653072834, 0.12654457986354828, -0.11568299680948257, -0.63453608751297, -0.49801504611968994, 0.4328697621822357, -0.15456880629062653, 0.14107574522...
(Internet Explorer) don't refer to `this` as the DOM element in an event, it makes working with events difficult. To get around this, jQuery performs some JavaScript magic that *always* makes `this` refer to the DOM element which triggered the event. That is (one of the many) reasons to use a JavaScript framework inste...
[ 0.19063282012939453, -0.22279274463653564, 0.058575209230184555, 0.017470309510827065, -0.12891130149364471, -0.7059134244918823, 0.2677611708641052, 0.25754085183143616, -0.3197169303894043, -0.4535691440105438, -0.09247126430273056, 0.6479612588882446, -0.2525677978992462, -0.00694646593...
If I add "trace=true" into my directive on an asp.net 2.0 .aspx page, will it recycle my application pool? I know if I enable tracing in web.config that will recycle the application pool. The webserver is IIS 6.0. Thanks. Remy Sharp's post is confusing if you don't read it carefully, in my opinion. The meaning of `t...
[ 0.47411152720451355, -0.22911372780799866, 0.5436539053916931, -0.09833821654319763, 0.19673292338848114, -0.5564060807228088, 0.36238574981689453, -0.4207196533679962, -0.1606648713350296, -0.3941737711429596, -0.0990818664431572, 0.6210774779319763, -0.44031524658203125, 0.04812318086624...
you'll notice that `this` never changes meaning. It always refers to the DOM element. The difference comes in how it is used. In jQuery, by default, `this` refers to the DOM element (not a jQuery object) which triggered an event. In the second code snippet above, it is **still** the same DOM element, only it is wrappe...
[ 0.2970440089702606, -0.3901098966598511, 0.19849085807800293, 0.00037702207919210196, -0.018068663775920868, -0.4621770679950714, -0.020894156768918037, 0.009359115734696388, -0.43558818101882935, -0.13294574618339539, -0.4456413686275482, 0.5270901322364807, -0.20076359808444977, 0.106278...
as jQuery events. jQuery plugins are something that people rarely write and frequently use. When writing a jQuery plugin, you're working within the context of the jQuery object prototype. In this case, you're using the word `this` to refer to the plugin you're writing. In normal use-cases, you won't be writing plugins ...
[ 0.08350299298763275, -0.07421288639307022, -0.10923970490694046, 0.03428991138935089, -0.12093500792980194, -0.4913421869277954, 0.058364275842905045, 0.4368416368961334, -0.2132510542869568, -0.6311609148979187, -0.4288311302661896, 0.46444663405418396, -0.2564241886138916, 0.000822308007...
JavaScript prototype, it refers to the instance of the prototype. Depending on the browser, when using the non-jquery event model, `this` also refers to the DOM element. Because some browsers (Internet Explorer) don't refer to `this` as the DOM element in an event, it makes working with events difficult. To get around ...
[ 0.06308393180370331, -0.1864454746246338, -0.3482353687286377, -0.14686888456344604, -0.30495864152908325, -0.22815728187561035, 0.1081148162484169, 0.2453097701072693, -0.3202202320098877, -0.5305135846138, 0.040448494255542755, 0.2130969911813736, -0.2364305704832077, 0.09071588516235352...
I'm trying to read data in from a binary file and then store in a data structure for later use. The issue is I don't want to have to identify exactly what type it is when I'm just reading it in and storing it. I just want to store the information regarding what type of data it is and how much data of this certain type ...
[ 0.5922696590423584, 0.3849877715110779, -0.14943291246891022, 0.2312397062778473, 0.12109307944774628, 0.0650835931301117, 0.0877765417098999, 0.034293126314878464, -0.05697714537382126, -0.7467311024665833, 0.10083428770303726, 0.3875449597835541, 0.07979981601238251, 0.2974804639816284, ...
to cast (or something similar) that data into a readable form later? My first idea would be to use characters, since all the data I will be looking at will be in byte units. But if I did something like this: ``` ifstream fileStream; fileStream.open("fileName.tiff", ios::binary); //if I had to read in 4 bytes of data...
[ 0.5227807760238647, 0.17023739218711853, 0.22700919210910797, 0.026483185589313507, -0.2084553837776184, 0.2358279824256897, 0.21418902277946472, -0.2352263480424881, -0.24695956707000732, -0.6906065344810486, 0.18198040127754211, 0.22305090725421906, -0.3905718922615051, -0.23518970608711...
makes life easier later on: ``` double x; memcpy (&x,memory,sizeof(double)); ``` or you could just refer to it as a cast value: ``` if (*((double*)(memory)) == 4.0) { // blah blah blah } ``` I believe a `char*` is the best way to read it in, since the size of a char is guaranteed to be 1 unit (not necessarily...
[ 0.05730976164340973, 0.24538549780845642, 0.09069348871707916, -0.29229602217674255, 0.0015929247019812465, 0.2812073230743408, 0.28252512216567993, -0.12436803430318832, -0.22120226919651031, -0.473023921251297, -0.17576910555362701, 0.31128138303756714, 0.01413897704333067, -0.0162219945...
Can someone tell me what the difference is between the 2 JSON parsers? <https://github.com/douglascrockford/JSON-js/blob/master/json.js> <https://github.com/douglascrockford/JSON-js/blob/master/json2.js> I have a JSON file from 2007-04-13 (It has methods such as `parseJSON`). I don't see these methods in any of th...
[ -0.24083445966243744, -0.11147329211235046, 0.20260275900363922, -0.21782632172107697, -0.2767338454723358, 0.21166718006134033, 0.5213820934295654, -0.1110263466835022, -0.09468577802181244, -0.9000747799873352, 0.0031526379752904177, 0.3542689383029938, -0.4703562557697296, -0.2292375117...
return JSON.parse(this, filter); }; } ``` I guess parseJSON is obsolete, therefore the new version (json2) doesn't even use it anymore. However if your code uses `parseJSON` a lot you could just add this piece of code somewhere to make it work again: ``` Object.prototype.parseJSON = function (filter) { ...
[ -0.27333560585975647, -0.03214818611741066, 0.11845960468053818, -0.2788996398448944, -0.03292418271303177, -0.16017165780067444, 0.523684561252594, 0.015918005257844925, -0.27887770533561707, -0.8316877484321594, -0.05875178426504135, 0.3946886360645294, -0.7780798077583313, 0.02342272736...
So kind of very similar to "[Detecting https requests in php](https://stackoverflow.com/questions/452375/detecting-https-requests-in-php "Detecting https requests in php")": Want to have <https://example.com/pog.php> go to <http://example.com/pog.php> or even vice versa. Problems: * Can't read anything from $\_SERVE...
[ 0.2042374312877655, -0.022182682529091835, 0.22286778688430786, 0.16683781147003174, -0.1844545602798462, -0.19486138224601746, 0.3680949807167053, 0.002142859622836113, -0.39011532068252563, -0.5582048892974854, 0.08810142427682877, 0.4847448468208313, -0.12536916136741638, -0.11421421170...
detect if it's being called via SSL or non-SSL? **Edit**: `$_SERVER["HTTPS"]` isn't there, switched on or not, no matter if you're looking at the site via SSL or non-SSL. For some reason the hosting has chosen to serve all the HTTPS requests encrypted, but down port 80. And thusly, the `$_SERVER["HTTPS"]` is never on,...
[ 0.29463934898376465, 0.05524290353059769, 0.23899579048156738, 0.07864277064800262, 0.07501645386219025, -0.2777414619922638, 0.5799114108085632, 0.30066779255867004, -0.24009265005588531, -0.647499680519104, -0.2102450132369995, 0.5102923512458801, -0.3864656984806061, -0.0485200844705104...
detecting the URL is up to the point of the slashes. The PHP can't see if the request has `https` or `http` at the front. **Keyword -- Load Balancer** The problem boils down to the fact that the load balancer is handling SSL encryption/decryption and it is completely transparent to the webserver. ``` Request: Client...
[ -0.002096317010000348, -0.14512479305267334, 0.18931831419467926, 0.2057034969329834, -0.2934076189994812, -0.3657991290092468, 0.268762469291687, -0.0035576955415308475, -0.16192643344402313, -0.5716053247451782, -0.11054319888353348, 0.44828560948371887, -0.20218254625797272, 0.164096206...
definitions for HTTP and HTTPS. Then send HTTP traffic to port 80 of the web servers, and HTTPS traffic to port 81 of the webservers. (port 81 is not used by anything else). In apache, configure two different virtual hosts: ``` <VirtualHost 1.2.3.4:80> ServerName foo.com SetEnv USING_HTTPS 0 ... </VirtualHos...
[ 0.17922215163707733, -0.07966404408216476, 0.302019864320755, 0.10719310492277145, -0.22639839351177216, -0.08625101298093796, 0.22597253322601318, -0.1894513964653015, -0.09526851028203964, -0.7274377346038818, -0.12555822730064392, 0.4134221076965332, -0.5016900897026062, 0.0750761777162...
the Load Balancer configuration**, then things are a bit trickier. There will not be a way to definitively know if you are using HTTP or HTTPS, because HTTP and HTTPS are **protocols**. They specify how to connect and what format to send information across, but in either case, you are using HTTP 1.1 to make the request...
[ 0.5132514238357544, -0.31899207830429077, 0.43901970982551575, 0.40547043085098267, -0.047514282166957855, -0.3462512791156769, 0.09732963889837265, 0.0452042818069458, -0.22210723161697388, -0.6218652725219727, 0.14176833629608154, 0.7345010638237, -0.29267096519470215, -0.081372357904911...
(<http://www.php.net/setcookie>). Perhaps you could set a cookie with this parameter and then check for it on subsequent requests? Another possibility would be to use JavaScript to update the links on each page depending on the protocol (adding a GET parameter). *(neither of the above would be bullet proof)* Another...
[ 0.5354282855987549, -0.11041995137929916, 0.34807288646698, 0.29800543189048767, -0.1515129655599594, -0.5253393054008484, 0.29635536670684814, 0.14822325110435486, -0.3847249150276184, -0.7546483278274536, 0.032053884118795395, 0.7223706841468811, -0.16425901651382446, 0.04289370775222778...
always take the perspective that your web app should switch to SSL mode when needed, and trust the users NOT to move it back (after all, it is their data on the line (usually)). Hope it helps a bit.
[ 0.6399641633033752, -0.17925375699996948, 0.20390310883522034, 0.24297510087490082, -0.06207121163606644, -0.4467724859714508, 0.527194082736969, 0.6282598972320557, -0.11937196552753448, -0.532848596572876, 0.0021382237318903208, 0.5224419832229614, 0.019533326849341393, -0.35164365172386...
I have a simple Grid control with some buttons that I want to be able to move around. The code below does work, but it takes a lot of effort to actually do the drag&drop and it is not clear where the drop will happen. I have to move the mouse around a lot to get to a state where the drop is not rejected. I would apprec...
[ -0.015722153708338737, -0.09532556682825089, 0.7562307119369507, -0.10477405786514282, -0.023136964067816734, 0.16418582201004028, -0.2270723283290863, -0.49402135610580444, -0.1252347081899643, -0.4990885257720947, -0.04371573403477669, 0.6058467030525208, -0.3542584478855133, -0.37173119...
mx.core.DragSource; import mx.events.*; import mx.managers.DragManager; private function dragInit(event:MouseEvent):void { if(event.buttonDown) { var button:Button = event.currentTarget as Button; var dragSource:DragSource = new DragSource(); dragSource.addData(button, 'button'); ...
[ -0.0772240087389946, -0.49406692385673523, 0.514495849609375, -0.20857404172420502, 0.2062796652317047, 0.4355340898036957, 0.20086164772510529, -0.30800914764404297, -0.19204038381576538, -0.5889075994491577, -0.3920721113681793, 0.8628395795822144, -0.6363962292671204, 0.0744709223508834...
DragManager.showFeedback(DragManager.MOVE); } } private function dragDrop(event:DragEvent): void { var target:GridItem = event.currentTarget as GridItem; var button:Button = event.dragSource.dataForFormat('button') as Button; target.addChild(button); } ]]> </mx:Script> <mx:G...
[ 0.0010041255736723542, -0.4908752143383026, 0.6096181273460388, -0.14628292620182037, -0.19341109693050385, 0.3324817419052124, -0.1985115110874176, -0.3882397413253784, -0.28143608570098877, -0.6626571416854858, -0.14326907694339752, 0.7296552062034607, -0.42542096972465515, 0.02741881832...
<mx:GridItem width="44" height="44" dragEnter="dragEnter(event)" dragDrop="dragDrop(event)"> </mx:GridItem> <mx:GridItem width="44" height="44" dragEnter="dragEnter(event)" dragDrop="dragDrop(event)"> <mx:Button label="A" width="40" height="40" mouseMove="dragInit(event)"/> ...
[ 0.021814748644828796, -0.3352319598197937, 0.662030816078186, -0.06049647182226181, -0.2527574300765991, 0.23873066902160645, -0.11518316715955734, -0.3050443232059479, -0.41355207562446594, -0.45139288902282715, -0.11854129284620285, 0.8307740688323975, -0.3018095791339874, -0.29890817403...
<mx:GridItem width="44" height="44" dragEnter="dragEnter(event)" dragDrop="dragDrop(event)"> </mx:GridItem> <mx:GridItem width="44" height="44" dragEnter="dragEnter(event)" dragDrop="dragDrop(event)"> <mx:Button label="B" width="40" height="40" mouseMove="dragInit(event)"/> ...
[ 0.1662278175354004, -0.3384155035018921, 0.5986895561218262, -0.008384272456169128, -0.20589108765125275, 0.12535764276981354, -0.14593234658241272, -0.23045845329761505, -0.5305218696594238, -0.36679282784461975, -0.0769045501947403, 0.8138051629066467, -0.35579678416252136, -0.2882823646...
</mx:GridRow> <mx:GridRow width="100%" height="100%"> <mx:GridItem width="44" height="44" dragEnter="dragEnter(event)" dragDrop="dragDrop(event)"> <mx:Button label="C" width="40" height="40" mouseMove="dragInit(event)"/> </mx:GridItem> <mx:GridItem width="44" ...
[ 0.06016778200864792, -0.3475183844566345, 0.7159077525138855, 0.046547189354896545, -0.1619829535484314, 0.21515953540802002, -0.241250142455101, -0.19769327342510223, -0.4080396592617035, -0.5334310531616211, -0.14595404267311096, 0.7010278105735779, -0.23498952388763428, -0.1917448639869...
width="44" height="44" dragEnter="dragEnter(event)" dragDrop="dragDrop(event)"> </mx:GridItem> </mx:GridRow> </mx:Grid> <mx:Style> GridItem { borderColor: #A09999; borderStyle: solid; borderThickness: 2; horizontal-align: center; vertical-align: center; } Grid { borde...
[ -0.11496131867170334, -0.5172021985054016, 0.8352660536766052, 0.04680892080068588, -0.0764707550406456, 0.024859363213181496, -0.09635882824659348, -0.27819618582725525, -0.4719378352165222, -0.6354156136512756, -0.11553461849689484, 0.3627132177352905, -0.17061972618103027, 0.07743936777...