text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
WHERE productID NOT IN (1040,1050,1168) GROUP BY productID ) AS [ok_products] ON [ok_products].productID = [tree].productID WHERE [tree].productID IN (1040,1050,1168) AND [ok_products].productID IS NULL GROUP BY [tree].productID ``` ``` SELECT [tree].productID FROM ...
[ -0.649290919303894, -0.17413866519927979, 0.11657008528709412, -0.31358644366264343, -0.13256265223026276, 0.38983970880508423, 0.2307586669921875, -0.5660803318023682, 0.05745154991745949, -0.6203325390815735, -0.5684425830841064, -0.05395017936825752, -0.38243451714515686, 0.147197440266...
1 AND MAX(CASE WHEN [tree].productID NOT IN (1040,1050,1168) THEN 1 ELSE 0 END) = 0 ``` There are others, and variations of each, but this should give you a very good start. But I really would stress the use of GROUP BY and the consideration to INDEXES :)
[ -0.16547560691833496, -0.011771348305046558, 0.17597223818302155, -0.23027990758419037, -0.020133573561906815, 0.018770383670926094, 0.07184639573097229, -0.5678263902664185, -0.11554859578609467, -0.4433501958847046, -0.21206064522266388, 0.29943567514419556, -0.26127004623413086, 0.00053...
I am not able to get out of these simple bugs, but would be great full if some one could answer to weed out from these errors. I included windows.h and some other necessary headers but couldn't able get out of it. Snippet of errors: ``` error C2146: syntax error : missing ';' before identifier 'MMVERSION' error C443...
[ -0.04012511670589447, 0.286894291639328, 0.21508844196796417, -0.006951659917831421, 0.09723344445228577, 0.09425550699234009, 0.5404801964759827, -0.08813879638910294, 0.0037836432456970215, -0.5976672172546387, -0.09229493141174316, 0.8333741426467896, -0.2504560053348541, -0.09513737261...
does not support default-int error C2146: syntax error : missing ';' before identifier 'ms' error C4430: missing type specifier - int assumed. Note: C++ does not support default-int error C4430: missing type specifier - int assumed. Note: C++ does not support default-int ``` Thanks In Advance Look in `mmsystem.h`, l...
[ -0.35316047072410583, 0.16183383762836456, 0.621207058429718, -0.11470894515514374, 0.25221627950668335, 0.18969573080539703, 0.33656492829322815, -0.07418854534626007, -0.2837507426738739, -0.5086662173271179, -0.34994640946388245, 0.7255621552467346, -0.4342321753501892, 0.15727089345455...
I'm writing a photo gallery script in PHP and have a single directory where the user will store their pictures. I'm attempting to set up page caching and have the cache refresh only if the contents of the directory has changed. I thought I could do this by caching the last modified time of the directory using the filem...
[ 0.6286595463752747, 0.21688860654830933, 0.45680704712867737, 0.0591956302523613, 0.044681794941425323, -0.018231000751256943, 0.20521172881126404, -0.19643136858940125, -0.13179804384708405, -0.6216065287590027, 0.4411754608154297, 0.3650955557823181, -0.11832433193922043, -0.013792681507...
Linux machines yet). So my questions is, what is the simplest way to check if the contents of a directory have been modified? Uh. I'd simply store the md5 of a directory listing. If the contents change, the md5(directory-listing) will change. You *might* get the very occasional md5 clash, but I think that chance is ti...
[ 0.4267456829547882, -0.02571829967200756, 0.29112204909324646, 0.012327402830123901, 0.1810058057308197, -0.13552024960517883, -0.1138954907655716, 0.2321457713842392, -0.4051809012889862, -0.7331399321556091, -0.0034507785458117723, 0.6820443868637085, -0.1419568508863449, 0.2527437806129...
I have a few images and their rollover images. Using jQuery, I want to show/hide the rollover image when the onmousemove/onmouseout event happen. All my image names follow the same pattern, like this: > Original Image: `Image.gif` > > > Rollover Image: `Imageover.gif` I want to insert and remove the *"over"* portio...
[ 0.3974708020687103, -0.04953458532691002, 0.6154634952545166, -0.14312782883644104, 0.12936657667160034, 0.014018716290593147, 0.05272452160716057, -0.08077727258205414, -0.06719726324081421, -0.7013396620750427, -0.10811500996351242, 0.6799084544181824, -0.05610183626413345, 0.00565017294...
"over.gif"; $(this).attr("src", src); }) .mouseout(function() { var src = $(this).attr("src").replace("over.gif", ".gif"); $(this).attr("src", src); }); }); ``` For those that use url image sources: ``` $(function() { $("img") .mouseover...
[ -0.033631857484579086, -0.06235339120030403, 0.6913162469863892, -0.24767976999282837, 0.293743371963501, -0.20553399622440338, 0.3241935670375824, -0.18876595795154572, -0.0035155219957232475, -0.4112400412559509, -0.5193593502044678, 0.8075388073921204, -0.464229017496109, 0.404870331287...
var src = $(this).attr("src"); var regex = /_normal.svg/gi; src = this.src.replace(regex,'_rollover.svg'); $(this).attr("src", src); }) .mouseout(function() {
[ -0.07208748906850815, -0.36038661003112793, 0.5962780117988586, -0.38048115372657776, 0.49642524123191833, 0.045901428908109665, 0.4290221035480499, -0.2054598331451416, 0.014335110783576965, -0.2300652414560318, -0.3322015106678009, 0.9333058595657349, -0.4256013333797455, 0.1233955919742...
var src = $(this).attr("src"); var regex = /_rollover.svg/gi; src = this.src.replace(regex,'_normal.svg'); $(this).attr("src", src); }); }); ```
[ 0.052318111062049866, -0.027420198544859886, 0.764157772064209, -0.2933085858821869, 0.17559921741485596, -0.06916093826293945, 0.24215860664844513, -0.2272748351097107, -0.13850699365139008, -0.20191583037376404, -0.6085273623466492, 0.8272966742515564, -0.3179697096347809, 0.317869782447...
I have a C interface that looks like this (simplified): ``` extern bool Operation(void ** ppData); extern float GetFieldValue(void* pData); extern void Cleanup(p); ``` which is used as follows: ``` void * p = NULL; float theAnswer = 0.0f; if (Operation(&p)) { theAnswer = GetFieldValue(p); Cleanup(p); } ``` ...
[ 0.06920033693313599, 0.07362443208694458, 0.3638381361961365, -0.3333681523799896, 0.0385936014354229, 0.08069637417793274, 0.07328948378562927, -0.14711163938045502, -0.10840156674385071, -0.5408449769020081, 0.06782176345586777, 0.7623633146286011, -0.5164619088172913, -0.030210847035050...
retrieve its value. I think the correct way to do this is by use of typemaps, so I defined an interface that would automatically dereference p for me on the C side: ``` %typemap(in) void** { $1 = (void**)&($input); } ``` However, I was unable to get the following python code to work: ``` import test p = None th...
[ -0.24845333397388458, 0.049125462770462036, 0.2826732099056244, -0.37676936388015747, 0.22605307400226593, 0.11928591877222061, 0.1813528686761856, -0.3793564438819885, -0.12984177470207214, -0.1608448475599289, -0.08551988005638123, 0.7537015080451965, -0.44690564274787903, -0.13583184778...
the C code that stops Python from having to deal with the pointer. And then wrap *that* wrapper with SWIG. Somebody stop me! Edit: Thanks to [Jorenko](https://stackoverflow.com/users/7161/jorenko), I now have the following SWIG interface: ``` % module Test %typemap (in,numinputs=0) void** (void *temp) { $1 = &t...
[ 0.02968432568013668, -0.007365018129348755, 0.7802143692970276, -0.30754175782203674, 0.06673470884561539, 0.055647216737270355, 0.43162721395492554, -0.20852157473564148, -0.33043205738067627, -0.39622658491134644, -0.20775002241134644, 0.7428721189498901, -0.4483628571033478, -0.14500972...
$1 = PyCObject_AsVoidPtr($input); } } ``` The python code that uses this SWIG interface is as follows: ``` import test success, p = test.Operation() if success: f = test.GetFieldValue(p) # This doesn't work f = test.gvp(p) # This works! test.Cleanup(p) ``` Oddly, in the python code, test.GetFieldV...
[ 0.26301872730255127, 0.13809381425380707, 0.36844438314437866, -0.32766857743263245, 0.07386959344148636, -0.07478852570056915, 0.44909197092056274, -0.038340430706739426, -0.09558746963739395, -0.47030168771743774, -0.04001624882221222, 0.8558207154273987, -0.4481302499771118, -0.18409168...
use ctypes instead. It's always easier than thinking about typemaps. But, if you're dead set on using swig, what you need to do is make a typemap for `void**` that RETURNS the newly allocated `void*`: ``` %typemap (in,numinputs=0) void** (void *temp) { $1 = &temp; } %typemap (argout) void** { PyObject *obj =...
[ 0.03069438599050045, -0.010980302467942238, 0.5293604135513306, -0.2563669681549072, -0.06359316408634186, 0.11882046610116959, 0.35409015417099, -0.3786426782608032, -0.2605145275592804, -0.457211971282959, -0.10965217649936676, 0.6121851205825806, -0.512637734413147, -0.17365053296089172...
to wrap the `void*` for GetFieldValue() and Cleanup(): ``` %typemap (in) void* { $1 = PyCObject_AsVoidPtr($input); } ```
[ 0.0761016234755516, -0.04913352429866791, 0.150346040725708, -0.35127004981040955, 0.40458327531814575, -0.0017721507465466857, 0.3504638373851776, -0.20016156136989594, -0.1405244767665863, -0.3466356694698334, -0.376791775226593, 0.690534234046936, -0.5352197885513306, 0.018753781914711,...
What do I need to do to the following rewrite rule to make it so it works whether or not their is a slash at the end of the URL? ie. <http://mydomain.com/content/featured> or <http://mydomain.com/content/featured/> ``` RewriteRule ^content/featured/ /content/today.html ``` Use the `$` to mark the end of the string ...
[ 0.4016105532646179, 0.1771428883075714, 0.963813841342926, -0.21728156507015228, 0.1589176505804062, -0.11601573973894119, 0.06572041660547256, -0.40998831391334534, -0.0013750289799645543, -0.406392365694046, 0.14267978072166443, 0.3857763111591339, -0.22022376954555511, 0.162240758538246...
I'm working on C++ framework and would like to apply automatic memory management to a number of core classes. So far, I have the standard approach which is ``` class Foo { public: static shared_ptr<Foo> init() { return shared_ptr<Foo>(new Foo); } ~Foo() { } protected: Foo() { } }; // ...
[ -0.05229467153549194, 0.13981129229068756, 0.09430339187383652, -0.08545626699924469, 0.013659263961017132, -0.06330953538417816, 0.1343494951725006, -0.1876361221075058, -0.009487096220254898, -0.57063889503479, -0.12818141281604767, 0.761551022529602, -0.2716444432735443, 0.0050891311839...
perhaps just stick with (semi-)manually wrapping instances of class with `shared_ptr`? This would also give ability to expose parameterized constructors without declaring new named constructors... Ie. ``` template <typename T> shared_ptr<T> make_shared(T* ptr) { return shared_ptr<T>(ptr) } // Example shared_ptr<T>...
[ 0.1999714970588684, -0.247472882270813, 0.20460566878318787, -0.14576615393161774, 0.02227598801255226, 0.12411494553089142, -0.04479337856173515, -0.3172762095928192, -0.08080429583787918, -0.5182361602783203, -0.08962154388427734, 0.6949904561042786, -0.28022146224975586, 0.0160458590835...
I was wondering which edge cases exist that could make [Common Language Specification compliance](http://www.devarticles.com/c/a/C-Sharp/Making-Your-Code-CLS-Compliant/) acceptable. Even when not intending to be accessed from other languages, I think that the tenets asserted by the [`CLSCompliantAttribute`](http://msdn...
[ 0.2415023148059845, 0.1622488647699356, 0.511139988899231, 0.15751491487026215, 0.18817660212516785, -0.6235231161117554, 0.35541462898254395, -0.00731382891535759, -0.26055458188056946, -0.16116401553153992, -0.34665948152542114, 0.7595162987709045, -0.09878155589103699, 0.090267032384872...
are trying to run their application from a shared network drive and can't because the local admin has killed non-CLS compliant applications in the security profile. In general, there are usually ways to work around the issue anyway. I would take the opposite approach to the comments above, why break it? You are writin...
[ 0.636235773563385, 0.42068737745285034, -0.07514435052871704, 0.26199018955230713, -0.008562467992305756, -0.4494996964931488, 0.617939829826355, 0.1752851903438568, -0.40620124340057373, -0.4882880747318268, -0.18841852247714996, 0.6260080337524414, -0.3745710551738739, 0.0122260944917798...
to run from medium trust. In some cases, this is the only reason they can't run. If they had taken a little more time to adhere to the guidelines, users would not be limited as to how they can use their component.
[ 0.7813658714294434, -0.20613586902618408, 0.30178597569465637, 0.15518933534622192, 0.07310764491558075, -0.5665633678436279, 0.7171498537063599, -0.1756579577922821, 0.24845671653747559, -0.16480274498462677, -0.12318925559520721, 0.7322292327880859, -0.31218352913856506, -0.1206617876887...
I am looking for opinions of how to handle large binary files on which my source code (web application) is dependent. We are currently discussing several alternatives: 1. Copy the binary files by hand. * Pro: Not sure. * Contra: I am strongly against this, as it increases the likelihood of errors when setting up a n...
[ 0.4471844732761383, 0.3156155049800873, 0.0224596057087183, -0.1539372205734253, -0.03299577161669731, -0.18493814766407013, 0.33534881472587585, -0.03917132318019867, -0.253133088350296, -0.6228368878364563, -0.2173229306936264, 0.6654151082038879, -0.19493131339550018, 0.0903762355446815...
Separate repositories. * Pro: Checking out/cloning the source code is fast as ever, and the images are properly archived in their own repository. * Contra: Removes the simpleness of having *the one and only* Git repository on the project. It surely introduces some other things I haven't thought about. What are your ...
[ 0.579778790473938, -0.062481001019477844, 0.2390909045934677, 0.49007391929626465, -0.000260780390817672, 0.027261218056082726, 0.015087001025676727, 0.08088502287864685, -0.5777611136436462, -0.4659535884857178, -0.20527875423431396, 0.3124637007713318, -0.00508822500705719, 0.16247469186...
will not work without the files. If the program won't work without the files it seems like splitting them into a separate repo is a bad idea. We have large test suites that we break into a separate repo but those are truly "auxiliary" files. However, you may be able to manage the files in a separate repo and then use ...
[ 0.8339359164237976, -0.12441457062959671, 0.5418724417686462, 0.3440288007259369, 0.2839307487010956, 0.006476028356701136, -0.0750490054488182, -0.1525464653968811, -0.39263108372688293, -0.48155516386032104, -0.4022206962108612, 0.6187636256217957, -0.22980698943138123, 0.060937665402889...
should help you keep the correct version of the code in line with the correct version of the images. Here's a good [introduction to submodules](http://alx.github.io/gitbook/5_submodules.html) from Git Book.
[ 0.3097580075263977, -0.12824265658855438, 0.31497904658317566, 0.3685505986213684, 0.036740537732839584, -0.10944665968418121, 0.0764637216925621, 0.14860352873802185, -0.08780355006456375, -0.6135380268096924, -0.08390089124441147, 0.22527845203876495, 0.20770247280597687, -0.188760757446...
We are using the Intelligencia URLRewriting module for asp.net with version 2.0 of the framework and IIS6. Our URLs typically have no extension. I understand that IIS6 cannot really deal with this situation without a blanket wildcard (which causes other problems). However, it works! Sometimes. At other times (e.g. o...
[ 0.6552677750587463, -0.1340000480413437, 0.5655990839004517, 0.12359665334224701, -0.16054554283618927, -0.3936990201473236, 0.44178253412246704, 0.07896953821182251, 0.023130131885409355, -0.845948338508606, -0.10464150458574295, 0.5124977827072144, -0.3449603021144867, 0.1639665067195892...
can't find this hence we get a 404 * by chance we have a custom error page set up in **IIS** for 404s * this error page sticks the referring URL on the end of the 404 error.aspx page * so we get a redirect coming into asp.net along the lines of: <http://website/error.aspx?404;http://website/products/productid> * our U...
[ 0.4256918728351593, -0.017184296622872353, 0.6170181035995483, 0.10755013674497604, -0.15268389880657196, -0.074175164103508, 0.37175145745277405, 0.06089291721582413, -0.21170948445796967, -0.5537539720535278, -0.1262553483247757, 0.38051262497901917, -0.11501478403806686, 0.3290314972400...
filter. One heads-up is that this will by default lead to a tight loop of redirects!
[ 0.20980900526046753, -0.4393160939216614, 0.420806884765625, 0.09619969874620438, -0.03546423465013504, -0.15600746870040894, 0.3653523921966553, -0.0180137250572443, -0.1845293790102005, -0.7734354138374329, -0.14145083725452423, 0.465863972902298, -0.5628977417945862, -0.040285374969244,...
``` sudo find /etc | xargs grep -i fedora > searchFedora ``` gives: ``` /etc/netplug.d/netplug: # At least on Fedora Core 1 ... ``` But see the Fedora version in the `/etc/netplug.d/netplug` file. Is it serious? ``` cat /etc/issue ``` Or `cat /etc/fedora-release` as suggested by @Bruce ONeel
[ 0.26990318298339844, 0.010866990312933922, 0.1902688592672348, -0.06586622446775436, 0.15160532295703888, -0.4217568337917328, 0.0007257733959704638, 0.06895768642425537, -0.40887296199798584, -0.025247136130928993, -0.3078884184360504, 0.5376417636871338, -0.5066155791282654, -0.136219561...
I have a Delphi application that has many dependencies, and it would be difficult to refactor it to use DUnit (it's huge), so I was thinking about using something like AutomatedQA's TestComplete to do the testing from the front-end UI. My main problem is that a bugfix or new feature sometimes breaks old code that was ...
[ 0.5784376859664917, 0.1635502576828003, -0.09356444329023361, -0.013222793117165565, 0.013856285251677036, -0.3502163290977478, 0.2172749638557434, -0.25025874376296997, -0.0549406073987484, -0.5507767200469971, 0.04674595221877098, 0.6688956022262573, -0.3164181411266327, -0.0119755882769...
do anything drastic... (and before purchasing anything) 1. Is it worth it? 2. Would this be a good way to test? 3. The result of the test should in my database (Oracle), is there an easy way in testcomplete to check these values (multiple fields in multiple tables)? 4. I would need to setup a test database to do all t...
[ 0.7465916872024536, -0.000849705480504781, -0.044691119343042374, 0.22727908194065094, -0.17780275642871857, -0.2506456673145294, 0.4484593868255615, -0.4489985704421997, 0.19129812717437744, -0.30333223938941956, 0.4099648892879486, 0.5359990000724792, -0.10961108654737473, -0.14421080052...
similar situation. (Large app with lots of dependencies). There is almost no automated testing. But there is a big wish to fix this issue. And that's why we are going to tackle some of the problems with each new release. We are about to release the first version of the new product. And the first signs are good. But i...
[ 0.48148617148399353, 0.12331438064575195, 0.11197695881128311, 0.2531687915325165, 0.1479308158159256, -0.01649845577776432, 0.16577725112438202, 0.1903860718011856, -0.3096134066581726, -0.6987095475196838, 0.03855394199490547, 0.520244300365448, -0.2649349868297577, 0.04949096962809563, ...
start somewhere. Things we have done: * Introduced a more OO approach, because a big part the code was still procedural. * Moved stuff between files. * Eliminated dependencies where possible. But there is far more on the list of requirements, ensuring enough work for the entire team until retirement. And maybe I'm...
[ 0.8273792266845703, 0.2402869015932083, -0.1922435760498047, 0.19721755385398865, 0.049143072217702866, 0.1523275524377823, 0.268112450838089, -0.21663595736026764, -0.23039083182811737, -0.6878472566604614, -0.14020030200481415, 0.2793010473251343, 0.2578064203262329, 0.08143898844718933,...
new bugs introduced was extremely low. Oh, and be sure that you know this is an expensive process. It takes lots of time. And you have to fight the tendency to tackle more than one problem in a row.
[ 0.3438483774662018, 0.09800183773040771, -0.06454994529485703, 0.410186767578125, 0.3688291609287262, -0.035646192729473114, 0.052535224705934525, 0.36631810665130615, -0.4117446839809418, -0.6237934231758118, 0.3875584602355957, 0.6639731526374817, -0.24249328672885895, -0.065139114856719...
I'm looking for research papers or studies made on Unit Testing and TDD effectiveness. Points of interest: * Does TDD reduce Development time? * Does overall development cost reduced as well? * Is the result product more stable? [Microsoft Research: **Realizing quality improvement through test driven development: res...
[ 0.319568008184433, -0.043413810431957245, -0.37163907289505005, 0.19069890677928925, -0.28580722212791443, 0.14717130362987518, 0.005433723330497742, -0.29243016242980957, -0.21503624320030212, -0.22507165372371674, -0.20465633273124695, 0.33153530955314636, 0.2887538969516754, 0.423042595...
I'm using a hosted Linux machine so I don't have permissions to write into the `/usr/lib` directory. When I try to install a CPAN module by doing the usual: ``` perl Makefile.PL make test make install ``` That module is extracted to a `blib/lib/` folder. I have kept `use blib/lib/ModuleName` but it still the compil...
[ 0.5215246677398682, 0.395132452249527, 0.19049787521362305, -0.16033664345741272, 0.2841685712337494, -0.3507409691810608, 0.3930394947528839, -0.2251109629869461, -0.13814213871955872, -0.4522591531276703, 0.03578677028417587, 0.5825320482254028, -0.3239186406135559, 0.3011014461517334, ...
somewhere relative to the .pl files The install goes like: ``` perl Makefile.PL PREFIX=./modulos make make install ``` Then, in the .pl file that requires the module, which is in ./ ``` use lib qw(./modulos/share/perl/5.8.8/); # You may need to change this path use module::name; ``` The rest of the files (makefi...
[ 0.5141848921775818, -0.17951753735542297, 0.4980466365814209, -0.12865038216114044, 0.11271259933710098, -0.14172419905662537, -0.09907514601945877, -0.2461475282907486, -0.250640332698822, -0.44849881529808044, -0.2861005663871765, 0.6574936509132385, -0.3613201379776001, 0.06180600076913...
Similar to this [question](https://stackoverflow.com/questions/124121/how-to-create-excel-2003-udf-with-a-c-excel-add-in-using-vsto-2005-se) (but in my case not VSTO SE), however, I just want to confirm that it is not possible to create a UDF using pure VSTO in Visual Studio 2005 and Excel 2003 - so, to absolutely clea...
[ 0.17880016565322876, 0.121915303170681, 0.2588510811328888, -0.023322712630033493, -0.2751052975654602, -0.24036544561386108, 0.08692365139722824, -0.19992093741893768, -0.2500309944152832, -0.47044721245765686, 0.002491998253390193, 0.6208897233009338, -0.3787437379360199, -0.074171014130...
not without any very dirty tricks). The reason is that the only way Office can execute external code (i.e. you add-in) is via COM. Even VSTO is still using the old IDTExtensibility2 COM interface underneath. IDTExtensibility2 is a COM interface that all add-ins for Microsoft Office applications must implement. Before...
[ -0.07122524082660675, -0.10629022866487503, 0.6828207969665527, 0.11848315596580505, 0.025222038850188255, -0.2751711905002594, 0.05397339165210724, -0.18402926623821259, -0.21857398748397827, -0.7799398899078369, -0.22222429513931274, 0.46051734685897827, -0.47568854689598083, 0.249930500...
a dll provided by the VSTO runtime. This means that your add-in is no longer COM-visible. Hence, if you added a UDF to your VSTO add-in it won't be visible to Office. Paul Stubbs explains on his blog how to do with VSTO and VBA: [**How to create Excel UDFs in VSTO managed code**](http://blogs.msdn.com/pstubbs/archive/...
[ -0.09110777825117111, -0.406615674495697, 0.49619799852371216, -0.11529085040092468, -0.08171290904283524, 0.027409711852669716, 0.12217550724744797, -0.24792122840881348, -0.27444320917129517, -0.8331939578056335, -0.31171950697898865, 0.27088791131973267, -0.6158691048622131, 0.209121420...
2. Wire up your class to VBA in VSTO > > > > ``` > Private Sub ThisWorkbook_Open() Handles Me.Open > Me.Application.Run("RegisterCallback", New MyManagedFunctions) > End Sub > > ``` > 3. Create Hook for managed code and a wrapper for the functions in VBA > > > In a VBA module in your spreadsheet or document >...
[ -0.013482826761901379, -0.3050839304924011, 0.24216721951961517, -0.14858928322792053, 0.14451563358306885, -0.04050704091787338, 0.2129196673631668, -0.4463915228843689, -0.2847592234611511, -0.6716217994689941, -0.15649794042110443, 0.5576179027557373, -0.3087511658668518, 0.117617353796...
enter `=GetNumberFromVSTO()` > in a cell, when excel starts the cell > value should be 42.
[ -0.1582385152578354, 0.18058635294437408, 0.20851348340511322, -0.33090585470199585, 0.15069203078746796, -0.18675321340560913, 0.2392459660768509, -0.49024537205696106, 0.27227821946144104, -0.6059710383415222, -0.4189765751361847, 0.34410765767097473, -0.2904873788356781, -0.218177601695...
As I understand it when I create an Excel sheet with VBA code the VBA code is saved as binary with the sheet. I therefore can't put the code into source control in a useful way, have multiple devs working on the problems, diffing is difficult, etc. Is there a way round this without switching to VSTO, COM addins etc? E...
[ 0.47621285915374756, 0.3831436038017273, -0.14658571779727936, -0.09837733954191208, -0.19761592149734497, 0.053582996129989624, 0.05897669494152069, -0.18600843846797943, -0.20255842804908752, -0.43561211228370667, 0.05228911712765694, 0.6706168055534363, -0.30654260516166687, 0.277805149...
be imported into source control, diffed, etc.). It works by creating a new Excel file which contains the imported code, so it might not work in your case. The build macro looks like this, I save it in a file called Build.xls: ``` Sub Build() Dim path As String path = "excelfiles" Dim vbaProject As VBIDE....
[ 0.3816532790660858, 0.12182462960481644, 0.4129088819026947, -0.3398030698299408, 0.1614263653755188, -0.02156415767967701, 0.2527335286140442, -0.3620041608810425, -0.01855594478547573, -0.6862162351608276, -0.11701095849275589, 0.9136877655982971, -0.3581885099411011, -0.1451169699430465...
Application.DisplayAlerts = False ActiveWorkbook.SaveAs "Output.xls" Application.DisplayAlerts = True Application.Quit End Sub ``` Now, the VBIDE stuff means you have to import a reference called “Microsoft Visual Basic for Applications Extensibility 5.3", I think. Of course you still have the problem w...
[ 0.13005094230175018, 0.27834489941596985, 0.8717228770256042, -0.24819046258926392, -0.23642021417617798, -0.15521588921546936, 0.4501977562904358, -0.2940419018268585, 0.006692224647849798, -0.8260475993156433, -0.08515787869691849, 0.756529688835144, -0.27566373348236084, 0.0394118204712...
build Excel file which outputs the resulting sheet. You problably have to change some things to make it movable in the file system. Hope this helps!
[ 0.48635995388031006, 0.22113418579101562, 0.06811682879924774, 0.17080971598625183, -0.011863546445965767, -0.047633539885282516, 0.18150955438613892, 0.258533775806427, 0.056971363723278046, -0.8272473216056824, 0.06202162057161331, 0.5293976664543152, 0.0918344110250473, -0.3241946101188...
``` public enum aa{ a1=1,a2=2,a3=6,...,a100=203} ``` How to get value like this ``` string att=GetFromDatabase("attribute"); //this return a1 or a2 ... Enum.GetValue(att); ``` Solution ``` string name = GetFromDatabase("attribute"); Enum.Parse(typeof(aa),name); ```
[ -0.40200185775756836, 0.35724934935569763, 0.34047529101371765, -0.26082852482795715, 0.19737869501113892, 0.20246358215808868, 0.34106558561325073, -0.4365193247795105, 0.0007012293790467083, -0.43761616945266724, -0.4035041034221649, 0.5887930393218994, -0.34984827041625977, 0.0110074169...
This would appear to imply "no". Which is unfortunate. ``` [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Class, AllowMultiple = true, Inherited = true)] public class CustomDescriptionAttribute : Attribute { public string Description { get; private set; } public CustomDescriptionAttribute(stri...
[ 0.16199983656406403, -0.17104710638523102, 0.2877853810787201, 0.19528408348560333, 0.0701131671667099, 0.10019072890281677, 0.2597578167915344, -0.7703790664672852, -0.13638611137866974, -0.5373561382293701, -0.2718147337436676, 0.6622694134712219, -0.1837712973356247, 0.2003035545349121,...
Type type = typeof(ProjectController); object[] attributes = type.GetCustomAttributes( typeof(CustomDescriptionAttribute), true); // NUnit.Framework.AssertionException: Expected: 1 But was: 0 Assert.AreEqual(1, attributes.Length); } } ``` Can a class inherit a...
[ 0.04587221518158913, -0.20378723740577698, 0.011665543541312218, -0.03249794989824295, -0.1375175267457962, -0.18346592783927917, 0.6310269236564636, -0.47689753770828247, -0.07377810776233673, -0.3108075261116028, -0.10767452418804169, 0.6791096925735474, -0.28032171726226807, 0.136473566...
in a derived class, you need to re-declare the attributes. If you only care about ComponentModel (not direct reflection), there is a way ([`[AttributeProvider]`](http://msdn.microsoft.com/en-us/library/system.componentmodel.attributeproviderattribute.aspx)) of suggesting attributes from an existing type (to avoid dupl...
[ 0.23418019711971283, -0.10083277523517609, 0.47093096375465393, -0.010676747187972069, -0.12373480945825577, 0.1294979602098465, 0.10422277450561523, -0.5718799829483032, 0.2085629403591156, -0.37226366996765137, -0.22428369522094727, 0.4610098600387573, -0.4761503040790558, 0.347649186849...
Console.WriteLine(attrib); } } } ``` outputs: ``` System.SerializableAttribute System.ComponentModel.AttributeProviderAttribute System.ComponentModel.EditorAttribute System.Runtime.InteropServices.ComVisibleAttribute System.Runtime.InteropServices.ClassInterfaceAttribute System.ComponentModel.TypeConvert...
[ -0.5611969828605652, 0.21671850979328156, 0.6711875200271606, -0.07487097382545471, 0.09982248395681381, 0.25950151681900024, 0.15587928891181946, -0.3219124376773834, -0.08104279637336731, -0.6480939984321594, -0.4042401611804962, 0.6519362926483154, -0.35477790236473083, 0.15457190573215...
What would be the quickest way to delete the contents in the documents directory. I have a list of the contents loaded into an NSArray but I'm not sure of the objective c on how to delete safely. I've googled for a solution but cant seem to find anything. Thanks for your help. PS, can you recommend a good book for Beg...
[ -0.163432314991951, 0.02083711139857769, -0.09501805156469345, 0.14673253893852234, 0.31045350432395935, 0.02974563091993332, 0.41944563388824463, -0.1214529275894165, -0.3524296283721924, -0.5763302445411682, 0.07323623448610306, 0.48193663358688354, -0.2795254588127136, -0.36209988594055...
best introductions.
[ 0.0650019496679306, 0.22417043149471283, 0.02373981662094593, 0.19242163002490997, 0.00507158599793911, -0.1530211716890335, 0.16516095399856567, 0.20284375548362732, -0.12700437009334564, -0.12928827106952667, -0.06533080339431763, 0.21473895013332367, 0.3974616229534149, -0.2491734921932...
I have a Variable class and and 3 subclasses: VariableBool, VariableLong and VariableDouble. Each subclass defines only a value member of the type of the suffix. Now, I need to transfert objects based on these classes over WCF. I have multiple clients registering their variale to a server. Whenever a value changes on...
[ 0.03965621814131737, 0.1226101666688919, 0.4514331817626953, -0.26171842217445374, -0.15983915328979492, -0.0018254304304718971, 0.37249356508255005, -0.21424570679664612, 0.04540437087416649, -0.5643692016601562, 0.173015296459198, 0.44018590450286865, -0.11576853692531586, 0.574581801891...
other types... ``` What am I missing? Is there a patern of some kind? Could I use reflection? Also, I don't think I can use Generics because of the WCF (I've tried but I could make it work). Thanks Specifically, you want NSFileManager's `-(BOOL)removeItemAtPath:(NSString *)path error:(NSError **)error` this is docum...
[ 0.14736419916152954, 0.2520771920681, -0.11747008562088013, -0.11285284161567688, -0.12131811678409576, -0.10147418826818466, 0.44523411989212036, -0.13916727900505066, -0.24846194684505463, -0.6085275411605835, -0.018993226811289787, 0.5209339261054993, -0.38359811902046204, -0.0393813699...
The function `somefunction()` takes a triple pointer as an argument. ``` int somefunction(tchar ***returnErrors); ``` How to allocate memory for the `returnErrors` parameter? *At a guess . . .* You can think of returnErrors as a pointer to an array of strings. 1. The first \* imples pointer to array of tchar (or a...
[ 0.04789891093969345, 0.01803676411509514, 0.25659534335136414, -0.12615664303302765, -0.19954201579093933, 0.24785681068897247, 0.17755433917045593, -0.16909603774547577, -0.05294455960392952, -0.24539217352867126, 0.034838464111089706, 0.52444988489151, -0.3744581341743469, 0.003018312389...
end, so we know there are no more - thanks tlholaday) errors = malloc(sizeof(tchar*) * 3); // the first string has length 20 (+ 1 for null terminator) errors[0] = malloc(sizeof(tchar) * 21); // the second string has length 30 (+ 1 for null terminator) errors[1] = malloc(sizeof(tchar) * 31); // ensure the last is nul...
[ 0.11339253932237625, 0.048842307180166245, 0.526766836643219, -0.010424734093248844, 0.26410147547721863, 0.0851500928401947, 0.42029064893722534, -0.4148889482021332, -0.27842915058135986, -0.3439036011695862, -0.4837895929813385, 0.5230778455734253, -0.34275224804878235, 0.14500696957111...
I have a ListView whereby I want to display one context menu if an item is right-clicked, and another if the click occurs in the ListView control. The problem I'm getting is the MouseClick event is only firing when an item is right-clicked, not the control. What's causing this and how can I get around it? You could sub...
[ 0.11562652885913849, -0.26008477807044983, 0.6017424464225769, -0.1917278915643692, -0.14767035841941833, 0.034285768866539, 0.2894483804702759, -0.42523622512817383, -0.3799607753753662, -0.6794815063476562, -0.06618010997772217, 0.661045253276825, -0.4479317367076874, 0.18326851725578308...
//RightClick += new MyDelegate(OnRightClick); } public event EventHandler RightClick { add { Events.AddHandler(EventRightClickRaised, value); } remove { Events.RemoveHandler(EventRightClickRaised, value); }
[ -0.44802770018577576, -0.4115837812423706, 0.3016292452812195, -0.027815721929073334, 0.2603996992111206, -0.06999807059764862, 0.08638548105955124, -0.24709738790988922, -0.14207513630390167, -0.4051879644393921, -0.2706005573272705, 0.6199322938919067, -0.1322701871395111, -0.03618661686...
} protected override void OnMouseUp(MouseEventArgs e) { if (e.Button == MouseButtons.Right) { OnRightClick(EventArgs.Empty); } base.OnMouseUp(e); } protected void OnRightClick(EventArgs e) { EventHandler RightClickRaised = (EventHandler)Events[Ev...
[ -0.5404531955718994, -0.5507826209068298, 0.38471636176109314, -0.11763811856508255, 0.6139172315597534, -0.16449807584285736, 0.3817375898361206, -0.3391767740249634, -0.05525340884923935, -0.22364401817321777, -0.4660892188549042, 0.9373260140419006, -0.1663046032190323, -0.0105671323835...
{ RightClickRaised(this, e); } } } } ```
[ -0.18457137048244476, 0.15302281081676483, 0.5877799987792969, -0.1666729599237442, 0.45402824878692627, -0.33263257145881653, -0.03518093004822731, -0.03271738067269325, -0.20077966153621674, -0.3949226140975952, -0.17490489780902863, 0.8050268888473511, -0.1785864681005478, 0.08385912328...
I'm working on a fairly simple survey system right now. The database schema is going to be simple: a `Survey` table, in a one-to-many relation with `Question` table, which is in a one-to-many relation with the `Answer` table and with the `PossibleAnswers` table. Recently the customer realised she wants the ability to ...
[ 0.7887148261070251, 0.046046383678913116, 0.344491183757782, -0.022178377956151962, 0.023174552246928215, 0.027401825413107872, -0.16234304010868073, -0.1616543084383011, -0.22347450256347656, -0.39056214690208435, 0.42297953367233276, 0.5098291039466858, 0.085454061627388, 0.1712995618581...
way to implement this *conditional* questions in terms of my database schema? If `question A` has 2 possible answers: A and B, and `question B` should only appear to a user **if** the answer was `A`? Edit: What I'm looking for is a way to store those information about requirements in a database. The handling of the da...
[ 0.2500281035900116, -0.09818881005048752, 0.42937272787094116, 0.07774467021226883, -0.19233079254627228, 0.014990466646850109, 0.22889256477355957, -0.47828808426856995, -0.3375527262687683, -0.8457661271095276, 0.09115684777498245, 0.2476472109556198, -0.14003294706344604, 0.073292367160...
improvements !!!** This is a real classic, done by thousands. They always seems 'fairly simple' to start with but to be good it's actually pretty complex. To do this in Rails I would use the model shown in the attached diagram. I'm sure it seems way over complicated for some, but once you've built a few of these, over...
[ 0.16916686296463013, 0.09169503301382065, 0.368579238653183, 0.061937179416418076, 0.15555766224861145, 0.10880646109580994, 0.3121454417705536, -0.32370901107788086, -0.41944611072540283, -0.916570246219635, 0.05394148454070091, 0.5467569231987, -0.0949413925409317, -0.08767875283956528, ...
the actual responses by users. You'll notice that answers links to **question\_options**, not **questions**. This is intentional. input\_types ------------ **input\_types** are the types of questions. Each question can only be of 1 type, e.g. all radio dials, all text field(s), etc. Use additional questions for when ...
[ 0.35853931307792664, 0.07232064008712769, 0.3232496976852417, 0.28097614645957947, -0.04199061170220375, 0.16729985177516937, 0.35997840762138367, -0.6329774260520935, -0.09619323909282684, -0.6790192127227783, -0.35467779636383057, 0.6335878372192383, -0.15898534655570984, -0.117853134870...
groups. One example, in a real estate application there might be the question 'How old is the property?'. The answers might be desired in the ranges: 1-5 6-10 10-25 25-100 100+ Then, for example, if there is a question about the adjoining property age, then the survey will want to 'reuse' the above ranges, so that sam...
[ 0.4488540589809418, 0.14363163709640503, 0.3660948574542999, 0.09507933259010315, -0.006030727177858353, 0.057023271918296814, -0.03849117085337639, -0.4190261662006378, -0.2863732576370239, -0.6743156313896179, -0.245108500123024, 0.11869300156831741, 0.2503703236579895, 0.406027287244796...
"id" for the primary key for each table. Also the relationships are all simple one\_to\_many's with no many\_to\_many or has\_many throughs needed. I would probably add has\_many :throughs and/or :delegates though to get things like survey\_name from an individual answer easily without.multiple.chaining.
[ 0.23010970652103424, 0.016195138916373253, 0.15101951360702515, 0.2927281856536865, -0.2629178464412689, -0.0773455873131752, -0.12573079764842987, -0.34404876828193665, -0.15386568009853363, -0.6210799813270569, 0.12592419981956482, 0.3181861340999603, -0.27432194352149963, 0.112909473478...
I'm using Perl's [XML::Simple](http://search.cpan.org/perldoc?XML::Simple) to parse deeply nested XML and would like to extract a small list of elements about 4 levels down: ``` A B C D1 D2 D3 ``` Ideally I want to do this on the input step, if possible. Like this: ``` my @list = XMLin($xml...
[ 0.009980141185224056, 0.2643805742263794, 0.267903208732605, 0.021699776872992516, -0.08932046592235565, 0.03626357018947601, 0.26233288645744324, -0.2854655385017395, -0.11033888906240463, -0.47732701897621155, -0.04749565199017525, 0.32422351837158203, -0.09736832231283188, -0.0010206167...
traversing the data structure by using an eval block. ``` my $xml_tree; my @list; eval { # just go for it my @list = @{ $xml_tree->{A}->{B}->{C} }; }; if ($@) { say "oops - xml is not in expected format - and that happens sometimes"; } ```
[ -0.17923110723495483, -0.11806284636259079, 0.5287871360778809, 0.13028940558433533, 0.06474454700946808, -0.013230559416115284, 0.48198220133781433, -0.09579864889383316, -0.3194926679134369, -0.6230834126472473, -0.3739843964576721, 0.3982538878917694, -0.3886690139770508, -0.27248698472...
How to prevent a specific key such as backspace key functioning from TextField editable field, preventDefault does not seem to work: ``` public function handleEvents(evt:KeyboardEvent):void { if (evt.type == KeyboardEvent.KEY_UP) { if (evt.keyCode==8){ evt.preventDefault () ; } } ``` I recommend listening for ...
[ -0.05726194754242897, 0.0387439988553524, 0.4269029200077057, -0.1806822419166565, 0.15006288886070251, -0.28964582085609436, 0.5544559359550476, -0.19050316512584686, -0.046104177832603455, -0.6904459595680237, -0.16706855595111847, 0.7666712403297424, -0.21250692009925842, 0.257113516330...
I have a VMWARE ESX server. I have Redhat VMs running on that server. I need a way of programatically testing if I'm running in a VM. Ideally, I'd like to know how to do this from Perl. See the answer to "[Detect virtualized OS from an application?](https://stackoverflow.com/questions/154163/detect-virtualized-os-from-...
[ 0.1973711997270584, 0.0850420817732811, 0.339864581823349, 0.009285714477300644, 0.15575307607650757, -0.3265078663825989, 0.178686261177063, 0.30710476636886597, -0.1545180231332779, -0.6870918869972229, -0.14237403869628906, 0.7149091362953186, -0.07740304619073868, 0.2680150270462036, ...
I have a List containing a lot of paths. I have a specific path I want to check against this list to see if there are any paths there that uses this path, ie: ``` f.StartsWith(r.FILENAME) && f != r.FILENAME ``` What would be the fastest way of doing this? edit: Complete function from answer below: ``` static boo...
[ 0.1569647192955017, 0.0529574491083622, 0.3775034546852112, -0.051145151257514954, 0.0381472222507, -0.16321299970149994, 0.5126604437828064, -0.41442108154296875, -0.1264880746603012, -0.5832550525665283, -0.13462674617767334, 0.53317791223526, -0.37234920263290405, 0.17264138162136078, ...
//we found it if (paths[index + 1].StartsWith(fragment) && paths[index + 1].EndsWith(".manifest")) { return true; } } return false; } ``` The *fastest* way is probably with binary search: ``` static bool ContainsFragment(string[] paths, string fragment) { /...
[ 0.10539038479328156, -0.24814990162849426, 0.45280182361602783, 0.0353889986872673, 0.30823826789855957, -0.2540833652019501, 0.40320953726768494, 0.10988882929086685, 0.05631263181567192, -0.6561080813407898, -0.24448241293430328, 0.20494700968265533, -0.10786298662424088, 0.1791832149028...
int index = Array.BinarySearch(paths, fragment); // we want the index of the *next highest* path if (index < 0) { // no match index = ~index; } else { // exact match index++; // for strict substring (non-equal) } return index < paths.Length && paths[index].StartsWith(fragment); } `...
[ -0.06485935300588608, -0.25838518142700195, 0.2546503245830536, -0.0012450750218704343, -0.10350915044546127, -0.05013978108763695, 0.19156230986118317, -0.5479732751846313, -0.22859123349189758, -0.704598605632782, -0.11344804614782333, 0.363948255777359, -0.22099602222442627, -0.10382114...
scan the array - either with LINQ etc, or just: ``` bool found = false; for(int i = 0 ; i < paths.Length ; i++) { if(paths[i].StartsWith(fragment) && paths[i].Length != fragment.Length) { found = true; break; } } ```
[ 0.2845827341079712, -0.34919488430023193, 0.6800535917282104, -0.16106820106506348, 0.1349245309829712, -0.28399139642715454, 0.34218573570251465, -0.6113407015800476, -0.19685812294483185, -0.5532206296920776, -0.2026180475950241, 0.5895145535469055, -0.3622592091560364, -0.05943359807133...
I am trying to get the sources for Netbeans IDE by running: hg clone <http://hg.netbeans.org/main/> However, this seems to be taking forever, and it does not give me any kind of status which tells me the percent of download that's complete. If a lose my internet connection, I have to start all over again. I realize ...
[ 0.6215599179267883, -0.006637700833380222, 0.31549525260925293, 0.18860580027103424, 0.22692397236824036, -0.5071283578872681, 0.20757801830768585, 0.3324098289012909, -0.06615810096263885, -0.6910280585289001, 0.06400752812623978, 0.7590227127075195, 0.05533549562096596, 0.498786568641662...
possible to do something like this with Mercurial? May be a [`clone -verbose`](http://www.selenic.com/mercurial/bts/msg5141) would give you more details about what goes wrong ? ``` C:\netbeans-src>hg clone --verbose http://hg.netbeans.org/main destination directory: main requesting all changes adding changesets adding...
[ -0.11523894965648651, -0.2659750282764435, 0.529316246509552, -0.10714534670114517, 0.1970202773809433, -0.2438768446445465, 0.1509692668914795, 0.11914307624101639, -0.10807548463344574, -0.555363118648529, -0.22411499917507172, 0.1633102148771286, -0.31335780024528503, 0.4999193549156189...
I am allowing users to download a file from another server just by giving them the link. However, the files are always named "file.zip" when users try to download it. I was hoping I could use maybe JavaScript to rename the file for them to something more appropriate. How can I do this? Is this possible? Would appre...
[ 0.6833868622779846, -0.08677580952644348, 0.36357125639915466, 0.3976299464702606, 0.039080098271369934, -0.39505404233932495, 0.06705676019191742, 0.37142303586006165, -0.3324495553970337, -0.774117648601532, -0.028677362948656082, 0.40112876892089844, -0.07773490995168686, 0.460492253303...
is nothing you can do in Javascript to intercept and modify it.
[ 0.19547314941883087, 0.16957861185073853, -0.012766750529408455, 0.4556584656238556, 0.22405917942523956, -0.4231259822845459, 0.522549569606781, 0.33679986000061035, 0.07252484560012817, -0.5959998369216919, -0.10553113371133804, 0.39710769057273865, -0.41839563846588135, -0.2446952164173...
Why do I fail to extract an integer value into the `Num` variable? ``` #include <sstream> #include <vector> #include <iostream> using namespace std; int main() { string Digits("1 2 3"); stringstream ss(Digits); string Temp; vector<string>Tokens; while(ss >> Temp) Tokens.push_back(Temp); ...
[ -0.06391605734825134, -0.018410412594676018, 0.3893667459487915, -0.37546050548553467, -0.12765493988990784, 0.2292160838842392, 0.5221912264823914, -0.4516957700252533, -0.29518401622772217, -0.5100616812705994, -0.3476208746433258, 0.30092567205429077, -0.33152061700820923, 0.05449685454...
This is not cleared by the str() member,you need to do it yourself. Change your code to: ``` ss.clear(); ss.str(Tokens[0]); ```
[ 0.2862043082714081, 0.017793411388993263, 0.42030423879623413, -0.27572521567344666, 0.21087099611759186, -0.24002119898796082, 0.48227524757385254, -0.2707754075527191, -0.2061523050069809, -0.3650219142436981, -0.4618335962295532, 0.21948190033435822, -0.314578652381897, -0.0332310460507...
I have an existing ASP.NET app which is configured to connect to a MS SQL Server database and I am trying to modify it to use a postgres database instead. I would like to avoid modifying the C# code, if possible. I expected that the following changes would be sufficient: 1. Add a reference to a suitable postgres dri...
[ 0.062558613717556, 0.08510631322860718, 0.3175126314163208, -0.042006995528936386, 0.04729302227497101, 0.08131549507379532, -0.00370850064791739, 0.07111288607120514, -0.2912076413631439, -0.9760510325431824, -0.1546451300382614, 0.39785557985305786, -0.35255667567253113, 0.24529503285884...
have no effect (although it does not in itself generate an error.) Instead I still see this error message in the browser: ``` [ArgumentException: Keyword not supported: 'port'.] System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms...
[ -0.04840017110109329, 0.26553672552108765, 0.4747312664985657, -0.06044422835111618, -0.0433175191283226, -0.2521573603153229, 0.5079527497291565, 0.13377617299556732, -0.3655491769313812, -0.6336824297904968, -0.2239106297492981, 0.3765704929828644, -0.4221726953983307, 0.4748538136482239...
all kinds of connection strings, and yours looks to be OK. Unfortunately your code is using SqlClient which is the SqlServer only database access in .Net. You're going to have to hack some code ...
[ 0.212278813123703, 0.03422098979353905, 0.07661320269107819, 0.4450177252292633, 0.10321476310491562, -0.4325316846370697, 0.5046741962432861, 0.6239621043205261, -0.23115071654319763, -0.6205276250839233, 0.18556372821331024, 0.48341867327690125, -0.29678404331207275, 0.4067016541957855, ...
How do you call a JavaScript function at the end of button click event in code behind? If you're working in .NET you could try ``` ScriptManager.RegisterClientScriptBlock(myButton, this.GetType(), "BlockName", "alert('hello world');", true); ```
[ 0.3212863802909851, -0.12982115149497986, 0.11995537579059601, -0.2209443747997284, 0.02325117029249668, -0.20598183572292328, 0.396070271730423, 0.06773186475038528, -0.03668610379099846, -0.8072737455368042, -0.20940595865249634, 0.5631247162818909, -0.433630108833313, -0.122874766588211...
In my project we have a base exception. For handling showing error dialogs, log and such. Im looking for a way to handle all derived classes of that exception, I thought this would work: ``` try { main_loop(); } catch (const MyExceptionBase* e) { handle_error(e); } ``` As every child instance thrown could be rep...
[ 0.07928606867790222, 0.21828815340995789, -0.0499366819858551, -0.026301885023713112, -0.23067224025726318, -0.024903688579797745, 0.24110047519207, -0.1474461406469345, -0.12547297775745392, -0.34989243745803833, 0.03843238577246666, 0.17314328253269196, -0.40163540840148926, 0.2491419017...
main_loop(); } catch (const ExceptionA& e) { handle_error(e); } catch (const ExceptionB& e) { handle_error(e); } catch (const ExceptionC& e) { handle_error(e); } ``` Which seems kinda ugly. What is the correct way to do this? Dont have a base exception class? Or can it be solved in the way I want? Ps: What `ha...
[ -0.0035832568537443876, 0.10723970830440521, 0.292937695980072, -0.05240052565932274, -0.1048579066991806, -0.15389923751354218, 0.5900099873542786, -0.12686605751514435, -0.08402228355407715, -0.6424334645271301, -0.19914688169956207, 0.44805797934532166, -0.37074175477027893, 0.001625717...
We are gearing up for some pretty serious Sharepoint(MOSS 2007) development including custom web parts, lists, master pages and layouts etc etc and etc. We are evaluating version control and it seems that the discussion has not got much deeper than that. I am keen that we can easily deploy from the source control to o...
[ 0.39581140875816345, 0.22006230056285858, 0.33690622448921204, -0.0562940388917923, 0.24209779500961304, -0.3750809133052826, -0.04507269710302353, 0.12717580795288086, -0.07336261123418808, -0.7201690673828125, -0.12915118038654327, 0.4711190164089203, 0.032620999962091446, 0.041226949542...
be sensible. I fear if we head off down a too 'easy' path then we will come to regret it pretty swiftly when we have to spend half a day setting up each environment after we release some new functionality. I have not even started to address in my head what happens when there is actual content in the lists added by us...
[ 0.7904500365257263, 0.14568351209163666, -0.012506269849836826, -0.006775572430342436, 0.007802232634276152, -0.2804888188838959, 0.48102930188179016, -0.1791527420282364, -0.3119552433490753, -0.633652925491333, 0.08294939249753952, 0.7655636668205261, -0.047390058636665344, -0.2879993915...
allowed us to remove the sharepoint solution from the target server, install the new solutions and reset the required application pools. Took a while to build, but it worked well. We did not release to test using this process, but it may be possible. Here is an example of a targets file. Unfortunately, it is a bit co...
[ 0.14813929796218872, -0.08870188891887665, 0.3858010470867157, 0.09156312793493271, 0.0041489009745419025, -0.10362266004085541, 0.021365774795413017, -0.31499505043029785, -0.046625953167676926, -0.7679229378700256, -0.018036024644970894, 0.3534504473209381, -0.21449734270572662, -0.02449...
<STSADM>"$(ProgramFiles)\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm.exe"</STSADM> <STSDEV>"$(SolutionDir)..\Tools\STSDev\stsdev.exe"</STSDEV> <GACUTIL>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe"</GACUTIL> <IISAPP>cscript c:\windows\system32\iisapp.vbs</IISAPP> ...
[ -0.25827744603157043, 0.048013657331466675, 0.7308136820793152, -0.06174345687031746, 0.16156594455242157, 0.1897900402545929, 0.3668902814388275, -0.6292542815208435, -0.15597957372665405, -0.4105677604675293, -0.5052919387817383, 0.4698551893234253, 0.15279977023601532, 0.182435259222984...
/> <Message Text="" Importance="high" /> <Message Text="Copying WSP file to CAB" Importance="high" /> <Delete Files="$(ProjectDeploymentFilesFolder)\$(PackageFile).cab" ContinueOnError="true" /> <Copy SourceFiles="$(ProjectDeploymentFilesFolder)\$(PackageFile)" DestinationFiles="$(ProjectDeploymentFilesFolder)\...
[ -0.1410691738128662, 0.06205252930521965, 0.6060526967048645, -0.17113086581230164, 0.20288579165935516, 0.2538227438926697, 0.3611743450164795, -0.5457714796066284, -0.13734124600887299, -0.28738099336624146, -0.40023237466812134, 0.7018085718154907, -0.1253848522901535, 0.071695163846015...
-o deploysolution -name $(PackageName) -immediate -allowgacdeployment -url http://intranet" /> <Exec Command="$(STSADM) -o execadmsvcjobs" /> <Copy SourceFiles="$(TargetDir)$(TargetName).pdb" DestinationFolder="C:\WINDOWS\assembly\GAC_MSIL\MyFeatures\1.0.0.0__ce271be627d58c77" SkipUnchangedFiles="" /> <Message Te...
[ -0.6004638671875, 0.025115417316555977, 0.6500880718231201, -0.668121874332428, 0.09489134699106216, 0.2192704826593399, 0.1657717078924179, -0.4932366609573364, -0.2544582486152649, -0.6205347180366516, -0.4902982711791992, 0.5555975437164307, -0.4356347620487213, -0.1139196828007698, 0...
<CallTarget Targets="DebugRetract" /> <CallTarget Targets="DebugDelete" /> <CallTarget Targets="DebugBuild" /> <CallTarget Targets="DebugInstall" /> <CallTarget Targets="DebugDeployForce" /> <Message Text="" Importance="high" /> </Target> <Target Name="DebugRetract" > <Message Text="Retracting Solu...
[ -0.40549466013908386, -0.1417665332555771, 0.5082703828811646, -0.24797867238521576, 0.24390558898448944, 0.35313618183135986, 0.3318095803260803, -0.4400429427623749, -0.17330020666122437, -0.18921372294425964, -0.6137295365333557, 0.7376391291618347, -0.049658045172691345, 0.148799195885...
How do you bind a DropDownlist DataText or DataValue field from a object. When the object in question is at a second level, e.g. the object to bind is not in the first level of the returned object Users.ContactDetails.Telephone, as the code below doesn't work: ``` ddl.DataSource = dal.dal_Users.GetAllUsers(); ddl.Da...
[ 0.2889782786369324, -0.3184332847595215, 0.44304412603378296, -0.02998063713312149, -0.18179164826869965, -0.39190080761909485, 0.14987021684646606, -0.38514500856399536, -0.16167476773262024, -0.49877437949180603, 0.011298572644591331, 0.22481003403663635, -0.33027055859565735, -0.0303961...
to inherit from a base class that has an overload in the constr to allow for a text/value only "subset" of the original. The code below is used in a Model View Presenter Or Model View ViewModel implementation that abstracts out the ddl control so you can push any UI on the top of this business code. **below is an exam...
[ 0.2872280478477478, -0.457187294960022, 0.49100080132484436, 0.14899003505706787, 0.20309452712535858, -0.1760949045419693, -0.13192687928676605, -0.4633185863494873, -0.38900426030158997, -0.641071617603302, -0.0514267273247242, 0.5533942580223083, -0.3014967143535614, 0.29665619134902954...
collection of objects to bind this ddl List<ILookupDTO> UserLookupDTO = new List<ILookupDTO>(); UserLookupDTO.Add(new User(" ", "0")); //insert a blank row ... if you are into that type of thing foreach (var User in UserCollection) { UserLookupDTO.Add(new User(User.FullName, User.ID.ToSt...
[ -0.28660526871681213, -0.3114590048789978, 0.6553856730461121, -0.1717463582754135, -0.09328272193670273, 0.19907619059085846, 0.21008987724781036, -0.674915611743927, -0.24327030777931213, -0.6787541508674622, -0.5454967021942139, 0.42798009514808655, -0.459985613822937, 0.155510276556015...
} if (UserCollection == null) { return; } for (i = 0; i <= UserCollection.Count - 1; i++) { if (UserCollection(i).ID == UnitOfWorkObject.User.ID) { LookupCollectionObject.SelectedIndex = (i + 1); //because we start at 0 instead of 1 (we inserted the blank row...
[ -0.17508606612682343, -0.3630329370498657, 0.483784019947052, -0.2595849931240082, 0.33419501781463623, 0.30559366941452026, -0.027995815500617027, -0.5917908549308777, -0.009906971827149391, -0.488749235868454, -0.09256301075220108, 0.2563175857067108, -0.16972602903842926, 0.280186444520...
break; } } } ``` **below is what the overload will look like in your user object** ``` /// <summary> /// This constr is used when you want to create a new Lookup Collection of ILookupDTO /// </summary> /// <param name="txt">The text that will show up for the user in the lookup collection</param> /// <...
[ 0.08381880819797516, -0.07936055958271027, 0.3915020823478699, 0.14103879034519196, -0.07997670024633408, 0.033806540071964264, 0.1414000242948532, -0.41149964928627014, -0.38808855414390564, -0.483802855014801, -0.37200379371643066, 0.3403174579143524, -0.4727942943572998, -0.000546780414...