text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
How can I receive and send email in python? A 'mail server' of sorts. I am looking into making an app that listens to see if it receives an email addressed to foo@bar.domain.com, and sends an email to the sender. Now, am I able to do this all in python, would it be best to use 3rd party libraries? Here is a very simp...
[ 0.20897521078586578, 0.08516453951597214, 0.3139062821865082, -0.14977215230464935, -0.4775024652481079, -0.07615074515342712, 0.4182325005531311, -0.03304921090602875, -0.2803986966609955, -0.6171246767044067, -0.056026529520750046, 0.2500731647014618, -0.5804901123046875, 0.1310140639543...
look at the [smtplib module documentation](http://www.python.org/doc/2.5.2/lib/module-smtplib.html).
[ 0.19472573697566986, -0.15321236848831177, 0.17607508599758148, -0.24865491688251495, 0.010682119987905025, -0.3873613178730011, 0.3531583845615387, 0.30469581484794617, -0.3868044912815094, -0.1842721551656723, -0.3476133346557617, 0.1792919933795929, -0.3621008098125458, -0.2386859804391...
I'm a little new to the Java 5 annotations and I'm curious if either of these are possible: This annotation would generate a simple getter and setter for you. ``` @attribute private String var = ""; ``` The `@NotNull` annotation indicates that a variable connot be null so you don't have to write that boilerplate co...
[ 0.3651290237903595, 0.05307629331946373, 0.144328773021698, 0.12182765454053879, -0.07699194550514221, 0.08135177195072174, 0.3511357009410858, -0.4082472622394562, -0.35456931591033936, -0.517304003238678, 0.031335290521383286, 0.6535401344299316, -0.3423921465873718, 0.019580889493227005...
what annotations are about. Any direction here would be appreciated. Annotation processing occurs on the abstract syntax tree. This is a structure that the parser creates and the compiler manipulates. The current specification (link to come) says that annotation processors cannot alter the abstract syntax tree. One of...
[ 0.23697735369205475, 0.28417977690696716, 0.20272426307201385, 0.11260328441858292, -0.11076124012470245, 0.031721603125333786, 0.1681128740310669, -0.34877362847328186, -0.08392123132944107, -0.6896517872810364, -0.2502748966217041, 0.34919899702072144, -0.18682266771793365, -0.1266638636...
defect detection, and includes `@NonNull` and `@CheckForNull` and a host of others. *Edit*: [Project Lombok](http://projectlombok.org/features/index.html) solves exactly the problem of getter and setter generation.
[ -0.1689416766166687, 0.13794757425785065, 0.16528205573558807, 0.13131214678287506, 0.03962218016386032, -0.0870354026556015, 0.011934591457247734, -0.11423606425523758, -0.20488156378269196, -0.26419514417648315, -0.5498206615447998, 0.43563905358314514, -0.2749764621257782, -0.2506157755...
Is it possible in PHP to do something like this? How would you go about writing a function? Here is an example. The order is the most important thing. ``` $customer['address'] = '123 fake st'; $customer['name'] = 'Tim'; $customer['dob'] = '12/08/1986'; $customer['dontSortMe'] = 'this value doesnt need to be sorted'; ...
[ -0.18138037621974945, 0.2305149883031845, 0.3862464427947998, -0.17564161121845245, -0.0365331768989563, -0.0969417467713356, 0.16034036874771118, -0.20264104008674622, -0.04744136705994606, -0.055407870560884476, -0.00016599484661128372, 0.40398460626602173, -0.3758591115474701, -0.112555...
PHP's internal array functions but it seems you can only sort alphabetically or numerically. Just use [`array_merge`](https://www.php.net/manual/en/function.array-merge.php) or [`array_replace`](https://www.php.net/manual/en/function.array-replace.php). `array_merge` works by starting with the array you give it (in the...
[ -0.32098159193992615, 0.3289964199066162, 0.614530622959137, -0.2608160674571991, -0.22108691930770874, 0.2766447961330414, 0.22080501914024353, -0.5097272396087646, -0.2971104383468628, -0.09171826392412186, 0.16563864052295685, 0.17343078553676605, -0.5024033784866333, 0.0005009862943552...
'dob' => '12/08/1986', // 'address' => '123 fake st', // 'dontSortMe' => 'this value doesnt need to be sorted') ``` PS: I'm answering this 'stale' question, because I think all the loops given as previous answers are overkill.
[ 0.36506474018096924, 0.564664363861084, 0.2945835292339325, -0.24831482768058777, 0.22019542753696442, -0.5002045631408691, 0.23790891468524933, -0.022324370220303535, 0.07937011122703552, -0.48478949069976807, -0.10380870848894119, 0.3014039099216461, -0.44529956579208374, 0.1325432807207...
Is there an easy way to move around controls on a form exactly the same way as the tab key? This includes moving around cells on a datagridview etc. using winforms you should set the Form KeyPreview property to true and in the keypress event for the form you should have ``` private void Form1_KeyPress(object sender,...
[ 0.17209705710411072, -0.40356484055519104, 0.8468243479728699, -0.10499405860900879, 0.2815091013908386, -0.32550838589668274, 0.18673205375671387, -0.4282757341861725, 0.09168915450572968, -0.7894883751869202, -0.30212801694869995, 0.7809021472930908, -0.20987826585769653, -0.137970328330...
Could someone simply explain the 3 phases in the Flash Event framework, please? By event phases, I mean: * `CAPTURING_PHASE` * `AT_TARGET` * `BUBBLING_PHASE` To be clear, I'm talking about `flash.events.Event` and subclasses. An in-depth example would be *fantastic*. What happens when you click on a nested `MovieC...
[ 0.17913980782032013, -0.4025418162345886, 0.21142350137233734, 0.07133468240499496, 0.13792812824249268, -0.2963120639324188, -0.0592072457075119, 0.11192737519741058, -0.3644736111164093, -0.372283935546875, -0.2593194842338562, 0.308267742395401, -0.3188081383705139, 0.02173561602830887,...
objects of the target object from which the event originated. Any propagated event starts with the topmost parent (stage) and works down the display object hierarchy until reaching the original target. * **At target phase**: The target phase is the phase where the event is at the target object or the object from which ...
[ -0.06452665477991104, -0.24319593608379364, 0.39337822794914246, 0.11004944145679474, -0.05485156923532486, -0.1181304082274437, 0.044295720756053925, 0.15927305817604065, -0.26154735684394836, -0.40726327896118164, -0.4949774444103241, -0.011781319975852966, -0.19946834444999695, 0.169827...
I need to make some code to talk to a SOAP web service. Unfortunately I'm unable to get a connection to the service as it requires a SSL connection encrypted with a special certificate. I've been given a pk12 certificate which when installed into my keychain allows me to access the SOAP service manually via Safari, but...
[ 0.6223019361495972, 0.40070027112960815, 0.00295277894474566, 0.15537016093730927, -0.08823839575052261, -0.11197710037231445, 0.840831995010376, 0.0024923852179199457, -0.27906858921051025, -0.6524064540863037, 0.1571071594953537, 0.4113522171974182, -0.12370955944061279, 0.20510411262512...
you need to do is alter the trust settings on this certificate. There is another workaround, where you say that this site should ignore trust settings, but this leaves you open to man-in-the-middle attacks. There is another thread on SO about this topic: [Objective-C/Cocoa How do I accept a bad server certificate?](h...
[ 0.29697877168655396, 0.11889754235744476, 0.12778379023075104, 0.24574948847293854, -0.139867901802063, -0.305515855550766, 0.10581889748573303, -0.0035470942966639996, -0.21814896166324615, -0.3773464560508728, 0.009866134263575077, 0.3809016942977905, -0.16398508846759796, 0.087990380823...
Is there any way to change the autonumber field to a number datatype, when the field is used a primary key and linked to other tables? You will have to delete the relationship(s) between the table and any foreign key columns on other tables first. Change the data type and then recreate the relationship(s).
[ 0.017311085015535355, -0.05317515507340431, 0.3685600161552429, 0.2225584089756012, 0.10594014078378677, 0.05915125831961632, 0.09328275918960571, -0.27494534850120544, -0.18350109457969666, -0.4043485224246979, -0.1492007076740265, 0.48280826210975647, -0.4148370921611786, 0.0525750853121...
I have been hearing and reading about Agile for years. I own a book or two on it and I like the idea. I am finally in a position where I could roll something like this out where I work, but I have serious concerns about whether it's the way to go for us: * Isn't there a minimum size for this? Big design up front *mus...
[ 0.5888199210166931, -0.12186389416456223, -0.05995991826057434, -0.0483466275036335, 0.07109402120113373, 0.2181614488363266, 0.05687124282121658, -0.11246924102306366, -0.21799325942993164, -0.8879811763763428, 0.22183994948863983, 0.8243799805641174, 0.5059595704078674, -0.11702840775251...
obvious black hole and even then people are more comfortable with a cap. So how can you provide a quote if you're going with a process that is tolerant of ongoing requirement changes? * I understand that Agile may provide better odds of success in more complex projects, but won't it drive up costs to the customer? And ...
[ 0.704412043094635, 0.22148264944553375, -0.12141776829957962, 0.409423291683197, -0.17367543280124664, -0.06097963824868202, 0.007357378490269184, -0.04583923891186714, -0.21763212978839874, -0.3826637268066406, 0.287276953458786, 0.7902801632881165, -0.05079308897256851, 0.053685374557971...
heads around anything beyond Waterfall. * Even for internal projects, there are budgets. What am I missing? * It seems like there is some backlash against Agile lately. Is something else going to start gaining traction soon? Note: We are a 5 dev shop with projects ranging from a day or two all the way up to several mo...
[ 0.7855291366577148, -0.06599199026823044, 0.1469312161207199, 0.3393479585647583, -0.09255646914243698, -0.09926440566778183, 0.5326230525970459, 0.09682422131299973, -0.393953800201416, -0.5408347249031067, 0.17040711641311646, 0.36403653025627136, 0.2638164460659027, -0.30781957507133484...
am sorry. I am a firm believer in finding the right model for the right project. For example how would you feel if your were into surgery and you knew the machine which was keeping you alive was developed in a rapid iterative cycle with little design upfront. But anyway, on to your question. I am a big believer in agi...
[ 0.513580322265625, 0.14425671100616455, -0.23938605189323425, -0.01944928616285324, 0.1628222018480301, 0.2943544387817383, 0.05390409007668495, 0.1491730660200119, -0.3046351373195648, -0.6327329277992249, 0.3576011657714844, 0.4193470776081085, 0.2064880132675171, 0.30204057693481445, ...
usually a cultural issue, not a project issue. Now as far as BDUF (Big Design up Front), we had great success with a 20 person team on a 4 month project, we took the project broke it down into 3 four week cycles, at the start of each cycle we all meet in a room, and said ok here's what we need to build, here's how we ...
[ 0.624069094657898, 0.0885092169046402, 0.2722831666469574, -0.031445667147636414, -0.45851072669029236, 0.12133245915174484, 0.2499167025089264, 0.3488605320453644, -0.2824877202510834, -0.5631114840507507, -0.14169953763484955, 0.12854595482349396, 0.33544331789016724, 0.2946487367153168,...
owned the various pieces flushed out the details. Essentially we did enough BDUF upfront to jumpstart the team (And ensure we covered all the business requirements). We used to call these sessions Developer Days and it was a good way to jumpstart the team. If you have the cash take the team off site you can stuff them...
[ 0.9214116334915161, 0.123130664229393, -0.12594129145145416, 0.40931928157806396, -0.05147325247526169, -0.1700771152973175, -0.06917262822389603, 0.11922768503427505, 0.1422027200460434, 0.03289269655942917, 0.4809745252132416, 0.5390971899032593, 0.5446665287017822, -0.05065395310521126,...
I'm creating some videos from a collection of images, I subsequently wish to play this video back with java. I found JMF but I haven't been able to find an encoding which is actually playable by it. Does anybody have an ffmpeg or mencoder formulation which produces JMF playable output? I would also take alternatives to...
[ 0.31987863779067993, -0.05704705789685249, 0.4393407702445984, 0.09975287318229675, -0.340143084526062, -0.32026588916778564, 0.0724804699420929, -0.04943619295954704, -0.30265092849731445, -0.7178053855895996, -0.36400678753852844, 0.62192702293396, -0.296945720911026, -0.1055650785565376...
I have a string from which I wish to extract a single word, but with a numerical appended to it, which might be different in each line: ``` This is string1 this is string This is string11 This is string6 and it is in this line ``` I want to parse this file and get the values of "stringXXX", starting from 0 to 100 ...
[ 0.49627676606178284, 0.2804259955883026, 0.6363893747329712, -0.42329663038253784, 0.07513750344514847, 0.3035191297531128, 0.2432180941104889, -0.3858935832977295, -0.18924462795257568, -0.6653667688369751, -0.1175815537571907, 0.3542366623878479, -0.5456188917160034, -0.08749086409807205...
need to capture it: ``` while ($pattern =~/(string(100|\d{1,2}))/g) { print $1; } ``` Explanation: * the parentheses capture what's in them into $1. If you have more than one set of parens, the 1st captures into $1, the 2nd into $2 etc. In this case $2 will have the actual number. * \d{1,2} captures between 1 a...
[ 0.11513297259807587, 0.05783769488334656, 0.1118650883436203, 0.023682432249188423, 0.41654008626937866, 0.18200871348381042, 0.13221748173236847, -0.4924834072589874, -0.13313013315200806, -0.38308680057525635, -0.11836578696966171, 0.38006705045700073, -0.2949061691761017, -0.22717258334...
I've got an NSBrowser hooked up to an NSTreeController bound to an array of NSTreeNode objects. It's easy enough to get the text portion working by setting the Content and Content Value bindings to properly reference the tree controller, but how do I set the image for each cell using bindings? The following worked well...
[ 0.05154423788189888, -0.058644089847803116, 0.4926697611808777, 0.023555375635623932, 0.08267004787921906, -0.07002854347229004, 0.32646849751472473, -0.14295248687267303, -0.28792881965637207, -0.9587753415107727, 0.02128903940320015, 0.4894757568836212, -0.13018853962421417, 0.0116593558...
Ok, what I'm trying to do is build a web app that allows students to visually organize their class calendar using drag and drop. but They have to be able to drag and drop to specific locations (when those classes are available), not just anywhere. This would be a 'fixed week' calendar. I was considering using a table,...
[ 0.6981294751167297, -0.06982190907001495, 0.0014348564436659217, 0.28146204352378845, 0.136673703789711, -0.062228988856077194, -0.34902438521385193, 0.44503435492515564, -0.46663808822631836, -0.5994747877120972, 0.45667141675949097, 0.20596390962600708, -0.009352351538836956, -0.08757667...
help me. Alternatively, if you know of something like this already implemented which I can use, Let me know! How about using [Dojo toolkit](http://dojotoolkit.org/) to implement the heavy lifting? They have a [class](http://dojotoolkit.org/book/dojo-book-0-9/part-3-programmatic-dijit-and-dojo/drag-and-drop) for it. F...
[ -0.10183881223201752, -0.11286445707082748, 0.24698776006698608, 0.08752156794071198, -0.31597810983657837, 0.09519684314727783, 0.1402413547039032, -0.4493911862373352, -0.20869116485118866, -0.5622730851173401, -0.0523701012134552, 0.4826273024082184, -0.048827189952135086, -0.4971694052...
<div class="dojoDndItem" dndType="red,darkred"> <div class="redsquare">RED</div> </div> </div> </td> <td> <!-- Create a target that accepts nodes of type red and blue. --> <div dojoType="dojo.dnd.Target" jsId="c2" class="target" accept="blue,darkred"> TARGET </div> </td> </tr><tbody/></t...
[ -0.06838877499103546, -0.21452617645263672, 0.11998293548822403, -0.1714686006307602, -0.19051024317741394, 0.21061331033706665, 0.19529739022254944, -0.24768775701522827, -0.009162196889519691, -0.9316879510879517, -0.14304952323436737, 0.3016292452812195, -0.6000505685806274, -0.09988848...
Improving Web Development Using Virtualization <https://web.archive.org/web/20090207084158/http://aspnet.4guysfromrolla.com:80/articles/102908-1.aspx>
[ -0.3232343792915344, -0.3833393156528473, 0.10765276104211807, 0.08374806493520737, 0.15820124745368958, 0.04500230401754379, 0.13112735748291016, 0.17066991329193115, -0.36444541811943054, -0.7702063918113708, -0.1771501898765564, 0.6183291077613831, 0.06735742092132568, -0.28328856825828...
I know the use of server-side controls is a no-no in ASP.NET MVC, however we have a long list of crystal reports that the company has already produced for a previous application that I would like to utilize for our new ASP.NET MVC application. Is there an appropriate way to use crystal reports in ASP.NET MVC? If so, h...
[ 0.329632431268692, -0.19616137444972992, 0.13957332074642181, 0.48977065086364746, -0.13525435328483582, -0.18452323973178864, -0.07094164192676544, 0.09352501481771469, -0.19186042249202728, -0.6504600644111633, 0.19539318978786469, 0.6040780544281006, -0.20900286734104156, 0.129298523068...
This question is coded in pseudo-PHP, but I really don't mind what language I get answers in (except for Ruby :-P), as this is purely hypothetical. In fact, PHP is quite possibly the worst language to be doing this type of logic in. Unfortunately, I have never done this before, so I can't provide a real-world example. ...
[ 0.08471322059631348, 0.2862488627433777, -0.047434333711862564, 0.3424264192581177, -0.18039549887180328, 0.07605332136154175, 0.2341337949037552, -0.06907562166452408, -0.01822623424232006, -0.365565687417984, 0.07223434746265411, 0.26167017221450806, -0.20511384308338165, -0.094029672443...
run in parallel. Obviously, some objects may finish downloading before others. The actual grabbing of data may run in threads, but that is not relevant to this question. So we can define the object as such: ``` class DownloaderObject() { var $url = ''; var $downloading = false; function DownloaderObject(...
[ 0.11669345945119858, -0.35311105847358704, 0.523512065410614, 0.153742715716362, 0.06799986958503723, 0.16672617197036743, 0.1353473961353302, 0.2615089416503906, -0.40506505966186523, -0.4149130582809448, -0.3332918584346771, 0.5998007655143738, -0.33522552251815796, 0.34627553820610046, ...
save_the_data_somewhere(); $this->downloading = false; $this->destroy(); // actually destroys the object } } ``` Okay, so we have lots of these objects running: ``` $download1 = new DownloaderObject('http://somesite.com/latest_windows.iso'); $download2 = new DownloaderObject('http://somesite.com/...
[ 0.34322768449783325, -0.09276197105646133, 0.6178834438323975, 0.16786044836044312, 0.24094471335411072, 0.1944935917854309, 0.14579585194587708, -0.006107323803007603, -0.31084054708480835, -0.7557351589202881, -0.3243216574192047, 0.8044108748435974, -0.15730267763137817, 0.0574396401643...
print($d->url . "\n"); } ``` Okay, now suppose download 2 finishes, and the object is destroyed. Now we should have two objects in the array: ``` array( 1 => $download1, 3 => $download3 ) ``` But there is a hole in the array! Key #2 is being unused. Also, if I wanted to start a new download, it is unclear wher...
[ -0.10558530688285828, 0.07484211027622223, 0.590800940990448, -0.22644783556461334, 0.15080954134464264, -0.11978843808174133, 0.23029173910617828, -0.16987091302871704, -0.33331432938575745, -0.6686349511146545, -0.30762749910354614, 0.7483576536178589, -0.39896732568740845, 0.36975190043...
} $i++; } ``` However, that is terribly inefficient (and `while $i++` loops are nooby). So, another approach is to keep a counter. ``` function add_download($url) { global $downloads; static $download_counter; $download_counter++; $downloads[$download_counter] = new DownloaderObject($url); } ``...
[ -0.05985172837972641, 0.08499247580766678, 0.5018330812454224, -0.20168401300907135, 0.08082371205091476, 0.02603364735841751, 0.2569361627101898, -0.2864849269390106, -0.49923938512802124, -0.5220978856086731, -0.23697862029075623, 0.8490720391273499, -0.3382960259914398, 0.15678842365741...
I should be aware of? I want a structure that I can add stuff to, remove stuff from, refer to keys in a variable, iterate through, etc., that is not an array. Does such a thing exist? I have been coding for years, but this question has bugged me for very many of those years, and I am still not aware of an answer. This...
[ 0.8787534236907959, 0.2966732680797577, -0.05721781402826309, 0.16599786281585693, -0.05317758396267891, -0.21744641661643982, 0.2765471339225769, -0.024977106600999832, -0.1294741928577423, -0.47237253189086914, 0.1574058085680008, 0.047024890780448914, -0.11627615988254547, 0.14622752368...
this question nearly three years ago. In hindsight, I can see my knowledge in that area was *severely* lacking. The biggest problem I had was that I was coming from a PHP perspective, which does not have the ability to arbitrarily pop elements. Something the other answers to this question helped me to discover was that...
[ 0.14996561408042908, 0.1165584847331047, 0.16892412304878235, 0.05531003326177597, -0.2946561872959137, 0.03665744140744209, 0.08408919721841812, -0.0052389600314199924, -0.3698664903640747, -0.5413850545883179, 0.25658944249153137, 0.2693140506744385, -0.3053492605686188, 0.17670513689517...
never tried, but imagine it would also be the right way to deal with the above. Interestingly, [Python lists](http://docs.python.org/tutorial/datastructures.html) contain the `pop()` method which, unlike PHP's [`array_pop()`](http://php.net/manual/en/function.array-pop.php), can pop arbitrary elements and keep everyth...
[ 0.36820167303085327, 0.11523768305778503, 0.10949546843767166, -0.026818493381142616, 0.07433375716209412, -0.009284312836825848, 0.14810535311698914, -0.33234700560569763, -0.5115309357643127, -0.06279318034648895, -0.33632296323776245, 0.3629329204559326, -0.6256900429725647, -0.19256047...
the middle 'ram' >>> x # the one we popped ('ram') is now gone ['baa', 'ewe'] >>> x[1] # and there are no holes: item 2 has become item 1 'ewe' ```
[ -0.02740839123725891, 0.36096253991127014, 0.2444210648536682, 0.0052877324633300304, 0.16501159965991974, 0.4344169795513153, 0.19571910798549652, -0.3067438006401062, -0.30581724643707275, -0.4519345760345459, -0.41458138823509216, 0.2442248910665512, -0.2572871446609497, 0.3599973022937...
Is there any code coverage tool available for PHP? I wish to check the code coverage of my code and API's written in PHP, but have not been able to lay my hands on any code coverage tool for PHP, as it is more of a server side language and dynamic in nature. Does anyone know of a method by which code coverage for PHP ...
[ 0.5593414306640625, 0.28140562772750854, 0.10684062540531158, 0.07624369859695435, -0.22068727016448975, -0.23105323314666748, 0.17328034341335297, -0.06751541048288345, -0.3690693974494934, -0.2701675295829773, 0.011524875648319721, 0.49020490050315857, -0.02956700138747692, -0.0619347617...
**Is there a tool out there for visualizing dynamic call graphs?** I saw a reference to one for Visual Basic 6 but I'd like one for .NET. **If I had to build a visualizer myself should I bother with the *.NET profiling API* or should I do something with *Mono.Cecil*?** I started writing a CLI runtime with Cecil, but I...
[ 0.3785284161567688, 0.08689338713884354, 0.2704392075538635, 0.18761467933654785, -0.4137270152568817, -0.2203371822834015, 0.21089108288288116, -0.09067074954509735, -0.2690366208553314, -0.385904997587204, 0.3339315354824066, 0.7889605164527893, -0.5118351578712463, -0.2902332842350006, ...
it seems to be perfect for your need. Most part of profiler products are based on top of it. But you'll have to write unmanaged code, urk. Using Cecil is possible too, and pretty straightforward if you just want to record enter/exit of methods. EDIT: Well, [PostSharp](https://www.postsharp.net/) is probably the best...
[ 0.4255378246307373, -0.33481261134147644, 0.337516188621521, 0.16683119535446167, -0.23340031504631042, -0.17970779538154602, -0.01414006482809782, -0.2093757838010788, -0.1880849003791809, -0.7576177716255188, 0.023099979385733604, 0.2897299826145172, -0.4183719754219055, -0.1509550660848...
Parser Error Message: The entry 'SiteSqlServer' has already been added. Source Error: > ``` > Line 23: providerName="System.Data.SqlClient"/> --> > > Line 24: < ! -- Connection String for SQL Server 2000/2005 --> > > Line 25: <add name="SiteSqlServer" connectionString="Server=(local); > > ``` > > abase=DotNetNuk...
[ -0.16779448091983795, 0.47207292914390564, 0.49144628643989563, -0.022226646542549133, -0.05882367119193077, -0.08622777462005615, 0.4625920355319977, -0.14466877281665802, -0.3099920153617859, -0.6804553866386414, -0.06217063218355179, 0.3159361481666565, -0.5210528373718262, 0.0195458866...
try and change the connectionString section to look like this: ``` <connectionStrings> <remove name="SiteSqlServer" /> <add name="SiteSqlServer" connectionString="server=(local);uid=;pwd=;Trusted_Connection=yes;database=communityserver" /> </connectionStrings> ``` Remove the old key, then add the new one. you ca...
[ -0.020528824999928474, -0.10907235741615295, 0.5149257779121399, -0.026804465800523758, 0.2242640107870102, -0.31303656101226807, 0.264178603887558, -0.14514973759651184, -0.49531370401382446, -0.858588695526123, -0.3196469247341156, 0.24717524647712708, -0.489275187253952, 0.3260698020458...
I have written a game that uses GLUT, OpenGL and FMOD. The problem is that the binary won't run, unless Visual Studio 2008 is installed on the computer. Why is this? Most likely you're linking with DLL versions of the C/C++ runtime. Go to project properties -> C++ -> Code Generation, and set Runtime Library to *not* b...
[ 0.3944300413131714, 0.02806028537452221, 0.19292986392974854, -0.10200993716716766, -0.0682457834482193, -0.2079763561487198, 0.09411671757698059, -0.05773051083087921, -0.16348624229431152, -0.8526794910430908, -0.07149872183799744, 0.7225214838981628, -0.37956249713897705, 0.088489547371...
ships with some versions of Visual Studio as well.
[ 0.19031931459903717, -0.23299939930438995, 0.3389226794242859, 0.18779480457305908, 0.06020040810108185, -0.11893603950738907, -0.03515813872218132, 0.10766427963972092, 0.1469828337430954, -0.4715774953365326, -0.19507785141468048, 0.6754388213157654, 0.16613849997520447, -0.2321719527244...
The code below is the code i am using. It works fine in thunderbird but not in mac mail client (and i assume anything made by microsoft. I currently do not have access to this to test it in). Much as i am aware of the idiosyncrasies of the various mail clients, I am flummoxed by this! It's fairly self explanatory but i...
[ 0.2414112389087677, 0.39358195662498474, 0.407000869512558, 0.06625939160585403, -0.21669867634773254, -0.1795344203710556, 0.37312617897987366, 0.33714279532432556, -0.09457378834486008, -0.8373309969902039, -0.0255802720785141, 0.6350240707397461, -0.29029300808906555, -0.289197117090225...
in mac mail client you get the entire thing from the first PHP-alt to the last PHP ``` <?php //define the receiver of the email $to = 'youraddress@example.com'; //define the subject of the email $subject = 'Test HTML email'; //create a boundary string. It must be unique //so we use the MD5 algorithm to generate a rand...
[ -0.24752697348594666, 0.28845712542533875, 0.791873037815094, -0.18063203990459442, -0.057915668934583664, -0.14636580646038055, 0.23164187371730804, -0.02449875883758068, -0.14803153276443481, -0.7699265480041504, -0.2695094048976898, 0.4846312403678894, -0.5743072628974915, -0.1884146928...
email message. --PHP-alt-<?php echo $random_hash; ?> Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: 7bit <h2>Hello World!</h2> <p>This is something with <b>HTML</b> formatting.</p> --PHP-alt-<?php echo $random_hash; ?>-- <? //copy current buffer contents into $message variable and delete ...
[ 0.24601370096206665, 0.24147188663482666, 0.34399551153182983, -0.15327692031860352, -0.22700414061546326, 0.09190160036087036, 0.6454229354858398, -0.20088934898376465, -0.2582119405269623, -0.36671677231788635, 0.008516322821378708, 0.27907755970954895, -0.6018791198730469, 0.08188422769...
problems, I've dropped my hand-made mailer, switched to this, and focused on other things in the time I've spared. In other words, don't reinvent the wheel. Although doing it yourself can be a good challenge and you'll learn a lot during the process, if you just want it to work, these guys have dealt with the complexi...
[ 0.09896154701709747, 0.225139781832695, -0.13171853125095367, 0.10687042772769928, 0.03679647296667099, 0.3599684536457062, 0.32407644391059875, 0.33339831233024597, -0.4447360634803772, -0.7015671133995056, 0.3110450506210327, 0.8720170259475708, -0.1535917967557907, 0.18218834698200226, ...
Is it possible to overload the null-coalescing operator for a class in C#? Say for example I want to return a default value if an instance is null and return the instance if it's not. The code would look like something like this: ``` return instance ?? new MyClass("Default"); ``` But what if I would like to u...
[ 0.06951092928647995, -0.019177313894033432, -0.3474787473678589, 0.052786532789468765, -0.05872688069939613, -0.01941101811826229, 0.3767686188220978, 0.09203417599201202, 0.0033873391803354025, -0.4995855391025543, 0.039143141359090805, 0.49526748061180115, -0.29718783497810364, 0.1583779...
public static TestClass operator ??(TestClass test1, TestClass test2) { return test1; } } ``` and I get the error "Overloadable binary operator expected". So I'd say the answer is, as of .NET 3.5, a no.
[ -0.026164628565311432, -0.08650033175945282, 0.0058253672905266285, -0.1756615787744522, -0.03194088861346245, -0.27389174699783325, 0.2621406018733978, 0.11134536564350128, 0.10446317493915558, -0.3713352382183075, -0.34328579902648926, 0.5705146789550781, -0.29117345809936523, 0.15663903...
I have used checkbox column in gridview. I want to check status of that checkboxes. On click of a button it should be checked that if any checkbox is checked or not. If none checkbox is checked then it should display alert message that check checkbox first. Hey, I found answer. It is as follows: ``` function checkBoxs...
[ 0.20419929921627045, -0.20524221658706665, 0.8767340183258057, -0.19998770952224731, -0.05785562843084335, -0.0999285951256752, 0.32784295082092285, -0.6338369846343994, -0.19596843421459198, -0.643922746181488, 0.026244059205055237, 0.632362425327301, -0.04153811186552048, -0.119636438786...
{ if(document.forms[0].elements[i].checked) { flag=true } }
[ 0.19868218898773193, -0.14606623351573944, 0.08998896181583405, -0.10922948271036148, 0.3453107178211212, -0.38542866706848145, 0.23290857672691345, -0.3781331181526184, 0.17627869546413422, -0.23248247802257538, -0.41831880807876587, 0.38799530267715454, -0.19397184252738953, -0.060624532...
} if (flag==true) { return true }else { alert('Please select at least one Event.') return false } } ```
[ 0.16227024793624878, -0.35724931955337524, 0.11192405223846436, -0.08136798441410065, 0.30893754959106445, -0.4089718461036682, 0.3123190999031067, 0.018485911190509796, -0.11333994567394257, -0.5375362038612366, -0.3873779773712158, 0.6643095016479492, -0.4475760757923126, -0.115162834525...
I need to convert a list (or a dict) into a comma-separated list for passing to another language. Is there a nicer way of doing this than: ``` result = '' args = ['a', 'b', 'c', 'd'] i = 0 for arg in args: if i != 0: result += arg else: result += arg + ', ' i += 1 result = 'function (...
[ -0.13454507291316986, 0.3181145191192627, 0.15277348458766937, -0.27805015444755554, -0.09835153818130493, 0.0655878484249115, 0.5740035772323608, -0.30979394912719727, 0.00500613683834672, -0.5546557903289795, -0.24102510511875153, 0.47453972697257996, -0.4696696400642395, -0.187014982104...
I've written a simple control which basically displays a few words with an image next to it. I want the containing items to strech when the parent form is resized and as you can see from my commented out code, I don't want to use a loop as it flickers. Any idea on how to get the items to grow and shrink with the form...
[ 0.26521778106689453, -0.09564866125583649, 0.7694084644317627, -0.10371916741132736, 0.12120476365089417, 0.11869938671588898, 0.11761391162872314, -0.33025214076042175, -0.2380741983652115, -0.8457198143005371, 0.03945489227771759, 0.5457032918930054, -0.2650678753852844, 0.18816538155078...
= 64; List<FlowLayoutPanel> _listItems; public IconListBox() { this.SizeChanged += new EventHandler(IconListBox_SizeChanged); this.AutoScroll = true; this.HorizontalScroll.Enabled = false; this.HorizontalScroll.Visible = false; this.Verti...
[ -0.19155338406562805, -0.45852455496788025, 0.8942805528640747, -0.29302453994750977, 0.2878913879394531, 0.2722964584827423, 0.4476664662361145, -0.35424381494522095, -0.2810034453868866, -0.5180959105491638, -0.42723220586776733, 0.5400391817092896, -0.2701317369937897, -0.14653782546520...
this.VerticalScroll.Visible = true; _listItems = new List<FlowLayoutPanel>(); } void IconListBox_SizeChanged(object sender, EventArgs e) { //foreach (FlowLayoutPanel item in _listItems) { // item.Width = this.Width - 10; //}
[ -0.14882178604602814, -0.46506398916244507, 0.9884790182113647, -0.3603593409061432, 0.08104979991912842, 0.3518276512622833, 0.31295153498649597, -0.2621874213218689, -0.43082377314567566, -0.5841713547706604, -0.1399899572134018, 0.5205349326133728, -0.2531355023384094, 0.099186711013317...
} public void AddItem(string itemText) { PictureBox pic = new PictureBox(); pic.Image = MyWave.Properties.Resources.mywave_icon; pic.Width = pic.Height = MAX_IMAGE_SIZE; pic.SizeMode = PictureBoxSizeMode.Normal; pic.Enabled = false; Flow...
[ 0.08611706644296646, -0.5681079626083374, 0.6728407740592957, -0.03668063133955002, 0.05983978882431984, 0.1275973618030548, 0.18049165606498718, -0.2718143165111542, -0.2545282542705536, -0.6084365248680115, -0.2897692918777466, 0.6502695679664612, -0.40461304783821106, 0.0926552340388298...
p = new FlowLayoutPanel(); p.Width = this.Width; p.Height = pic.Image.Height + (ITEM_PADDING * 4); p.BackColor = Color.White; p.Padding = new Padding(ITEM_PADDING); p.Margin = new Padding(0); Label l = new Label();
[ -0.1413591206073761, -0.40203341841697693, 1.1428121328353882, 0.07740623503923416, -0.016536766663193703, 0.29086220264434814, -0.26174041628837585, -0.6501806974411011, -0.29459348320961, -0.5775430798530579, -0.2774808406829834, 0.27203860878944397, 0.022296788170933723, -0.006409155204...
l.Margin = new Padding(10, 5, 0, 0); l.Width = this.Width - ITEM_PADDING - MAX_IMAGE_SIZE; l.Height = p.Height - (ITEM_PADDING * 2); l.Text = itemText; l.Enabled = false; //l.BorderStyle = BorderStyle.FixedSingle;
[ -0.008274134248495102, -0.4417420029640198, 1.0514271259307861, -0.3024671673774719, 0.2790147364139557, 0.2867997884750366, -0.1950398087501526, -0.3286668658256531, -0.20251882076263428, -0.6505116820335388, -0.4373724162578583, 0.3995784819126129, -0.3394831418991089, -0.112749919295310...
p.Controls.Add(pic); p.Controls.Add(l); p.MouseEnter += new EventHandler(p_MouseEnter); p.MouseLeave += new EventHandler(p_MouseLeave); p.MouseClick += new MouseEventHandler(p_MouseClick); this.Controls.Add(p); _listItems.Add(p); p.A...
[ -0.09272941201925278, -0.4464186728000641, 0.7947645783424377, -0.20841242372989655, 0.27245426177978516, 0.00672756927087903, -0.2787928581237793, -0.5944242477416992, -0.5835877656936646, -0.33691778779029846, -0.2023559808731079, 0.43906140327453613, -0.5171965956687927, -0.281540721654...
} void p_MouseClick(object sender, MouseEventArgs e) { //throw new NotImplementedException(); } void p_MouseLeave(object sender, EventArgs e) { ((Panel)sender).BackColor = Color.White; } void p_MouseEnter(object sender, EventArgs e) {
[ 0.08326730132102966, -0.42176032066345215, 0.0573229044675827, -0.23527516424655914, 0.33923283219337463, 0.116004578769207, 0.511496365070343, -0.21309180557727814, -0.04900094494223595, -0.5526877641677856, -0.3970341384410858, 0.7094892859458923, -0.42795830965042114, 0.0486981160938739...
((Panel)sender).BackColor = Color.LightBlue; } public void AddItem(string itemText, Image icon) { } } ``` Avoid triggering a redraw every time you resize a child control by embedding your `foreach` in `SuspendLayout()` and `ResumeLayout()`: ``` this.SuspendLayout(); foreach (FlowLayoutP...
[ -0.047531962394714355, -0.27106302976608276, 0.8002977967262268, -0.09515830129384995, 0.4811823070049286, 0.21853230893611908, 0.3093612492084503, -0.29879042506217957, -0.2134081870317459, -0.4556694030761719, -0.6191477179527283, 0.7067455649375916, -0.36279165744781494, 0.1405879557132...
When is a good idea to save information in a XML file and when in a own-format file? For XML (or other standard) I see: * (+) Standard format. * (-) It's tedious to hand modify. For own-format files I see: * (-) We need to build a own-parser (non-standard). * (+) It can be easy to hand modify the files. Use XML whe...
[ 0.13492001593112946, 0.08723323792219162, 0.018803337588906288, 0.3157646656036377, -0.09588141739368439, -0.20146644115447998, 0.05444918945431709, -0.01636948063969612, -0.19699107110500336, -0.6898032426834106, -0.029788950458168983, 0.5281063914299011, 0.08383911848068237, -0.362152934...
Performance isn't critical (parsing XML isn't exactly blazingly fast - although if performance is important and you go for XML, shop around for a fast parser, as there's a wide difference between fastest and slowest) * Schema can be pre-defined and documents can be verified against it * Simpler formats (e.g. name=value...
[ 0.11443958431482315, -0.0352737158536911, -0.19123682379722595, 0.5559936761856079, -0.28990626335144043, -0.3169528543949127, 0.25824102759361267, -0.14873488247394562, -0.2800634801387787, -0.8028117418289185, -0.18168973922729492, 0.7405490279197693, 0.18400174379348755, -0.514562010765...
plenty of other standard (or "somewhat standard" - e.g. supported by tools on multiple platforms) formats available beyond just XML.
[ 0.4510214030742645, -0.018757248297333717, -0.11851507425308228, 0.3727134168148041, -0.06355234235525131, -0.43072909116744995, -0.28286731243133545, 0.23574213683605194, -0.33353328704833984, -0.45318615436553955, -0.47502586245536804, 0.3423968553543091, 0.17297221720218658, -0.12772898...
What other frameworks should ASP.Net programmers consult for code inspiration? Broaden your search - don't look just at ASP.NET MVC. Different approaches will help you better understand things you want to do. Some suggestions: * [RoR](http://www.rubyonrails.org/) * [Django](http://www.djangoproject.com/) * [Grails](h...
[ 0.47526317834854126, 0.05078061670064926, -0.014082072302699089, 0.0954592153429985, -0.12538574635982513, -0.15573662519454956, 0.5482655763626099, -0.1641784906387329, -0.4108426868915558, -0.3130439519882202, 0.16165576875209808, 0.5415393710136414, -0.16792185604572296, -0.218717679381...
I am currently working on converting an existing web application to support an additional language (namely Welsh). My proposed approach is to extract all displayed text into property files and then access the text using JSTL fmt tags. My question is: how should these property files be structured? I know they need to b...
[ 0.42092832922935486, 0.3508681058883667, 0.07217411696910858, -0.3539208769798279, -0.04511794447898865, -0.09310072660446167, 0.4685719311237335, -0.04662550240755081, 0.17552825808525085, -0.7906550168991089, -0.5371304154396057, 0.5438507199287415, 0.08199252933263779, 0.079463638365268...
the jsps is it a good idea to create a new top-level directory (e.g. resources) and mirror the jsp structure under this folder? This would give me a structure like ``` resources/jsp/index.properties resources/jsp/index_cy.properties ``` This seems like a reasonable approach and it is extensible to property files fo...
[ 0.19162340462207794, 0.16564695537090302, 0.22327283024787903, 0.13244308531284332, -0.1514287143945694, -0.2502233684062958, -0.1451505571603775, -0.17421194911003113, -0.3520768880844116, -0.758061408996582, -0.3535398542881012, 0.6565853953361511, -0.13256245851516724, -0.13275095820426...
It has been pointed out that this approach could lead to a lot of duplicated strings in the various property files. While this is true, it would only be as many duplicated strings as currently exist in the jsps. Is it better to have a clear mapping from jsp to property files, at the cost of some duplication in the prop...
[ 0.2620236575603485, -0.047720953822135925, 0.05680819973349571, 0.058905452489852905, 0.040495615452528, -0.16440151631832123, 0.2633836269378662, 0.06859342753887177, -0.3249532878398895, -0.7051587104797363, -0.07309519499540329, 0.37213557958602905, -0.26090365648269653, 0.1426107436418...
the following directory structure: ``` src +- main | |- java | |- resources +- test |- java |- resources ``` Which gives you a nice clean separation between your code and unit tests, and then between java code and resources such as property files etc.
[ -0.05288739502429962, 0.2207026183605194, -0.10020386427640915, 0.09927623718976974, 0.15022985637187958, -0.155169278383255, 0.13361886143684387, -0.25804880261421204, -0.033507537096738815, -0.5430974364280701, -0.03150038421154022, 0.2536422312259674, 0.03445186838507652, 0.179668053984...
I've notice an issue - it feels like a bug but I suspect a 'feature' - in SSMS in SQL Server 2008. I have various tabs open, for example an alter table script in one table and a SProc that queries that table in another tab, and when I execute my Alter Table script the changes are not reflected in Intellisense in the o...
[ -0.17780132591724396, 0.07081272453069687, 0.5741140842437744, -0.08707195520401001, -0.2451978325843811, -0.3671507239341736, 0.158072367310524, 0.19926029443740845, -0.40316614508628845, -0.5952609181404114, 0.22449694573879242, 0.5652841329574585, -0.5329539179801941, 0.1065739989280700...
push ahead with your modified tables and code, everything compiles without a grumble (as expected). Is this a bug? A feature? Is there a setting somewhere that alters this behaviour? I checked in the options but couldn't see anything And no sooner than I post the question, I find the right phrase for a successful sear...
[ 0.08896074444055557, -0.009271788410842419, 0.20887675881385803, -0.16931913793087006, -0.17903266847133636, -0.1769128441810608, 0.5777950882911682, 0.10390138626098633, -0.17890994250774384, -0.5648136734962463, -0.0655701756477356, 0.7350888848304749, -0.0902690663933754, -0.07124778628...
this way. After further checking, I've been able to add a 'Refresh Local Cache' button to one of the toolbars. Having quickly tried a refresh, it appears that the refresh takes some time, because Intellisense went from being out of date, to non-existent, and back to updated or a minute or so. I'm tempted to pull this ...
[ 0.032953448593616486, -0.10777214914560318, 0.48852768540382385, 0.3028503358364105, 0.26142823696136475, -0.09532526135444641, 0.24025945365428925, 0.4137022793292999, -0.07976721972227097, -0.7692311406135559, 0.11122507601976395, 0.4161650538444519, 0.16497765481472015, 0.00611962750554...
I want to send some strings in a list in a POST call. eg: ``` www.example.com/?post_data = A list of strings ``` The python code receives the data as a single string (Instead of a list of strings). How do I post it as a list of strings? There's no such thing as a "list of strings" in a URL (or in practically any...
[ 0.5473790168762207, 0.20198598504066467, 0.2042100578546524, -0.07821664959192276, -0.2309996783733368, 0.1464020162820816, 0.18813900649547577, 0.05474654585123062, -0.3179950416088104, -0.5547283291816711, -0.16220863163471222, 0.1625814288854599, -0.49572503566741943, 0.2295990139245987...
in some way (e.g. comma-separated) and then parse them out again at the other end.
[ -0.22088517248630524, 0.14193713665008545, 0.04372648894786835, -0.1899978369474411, -0.10649041831493378, 0.3544114828109741, 0.23629331588745117, 0.046861886978149414, -0.2778465747833252, -0.6710466742515564, -0.36604270339012146, 0.008320785127580166, 0.10953846573829651, -0.0401150695...
How is it possible to check if MOSS Standard or MOSS Enterprise is installed? This link should sort you out... [Determining sharepoint versions](http://weblogs.asp.net/danlewis/archive/2008/09/06/determine-which-version-of-sharepoint-is-installed.aspx) Edit: The article has now disappeared, so see Dan's answer below
[ 0.037662241607904434, -0.07277621328830719, 0.16043150424957275, 0.12984280288219452, 0.17691975831985474, -0.4317002594470978, 0.1482774168252945, 0.1814071089029312, -0.41106852889060974, -0.0019058651523664594, -0.2498239278793335, 0.14400140941143036, -0.12530267238616943, 0.2603159546...
Tk GUI's seem to be universally considered ugly, but I'd like to know why specifically. Some in the Tcl/Tk world would argue that this is a moot point as there is much better support now for native look and feel, which is a big reason I decided on Tcl/Tk. Now, however, the problem is, because I'm leveraging a Tcl/Stark...
[ 0.3554118275642395, 0.059408292174339294, 0.35537540912628174, -0.07804904878139496, -0.4193054437637329, -0.17972227931022644, 0.28998515009880066, 0.24236272275447845, 0.2289854884147644, -1.0879865884780884, -0.05770255997776985, 1.050244927406311, -0.6665922403335571, 0.117548070847988...
Because I personally don't buy the "it's just ugly to me". To me, its just different, and I switch between Mac and Windows and Linux with regularity, so I'm used to different looks/feels. Specifically, motif-ish look of a traditional Tk GUI is regarded as ugly: ![Tcl/Tk GUI Sample](https://web.archive.org/web/20140...
[ 0.02899017557501793, -0.08914438635110855, 0.2523314356803894, -0.03939562663435936, -0.35728558897972107, -0.01779903471469879, 0.3651680052280426, 0.09473692625761032, 0.017095370218157768, -0.6749989986419678, 0.12544554471969604, 0.7093813419342041, -0.26458460092544556, 0.138845175504...
and shortest-path-to-a-solution (read: don't take time to hide scrollbars when they aren't needed, don't use common idioms for toolbars, don't properly align widgets, etc). Unfortunately, Tk's defaults aren't always the prettiest. As the screenshot in the question shows, the default uses relatively thick border width...
[ -0.3822188973426819, -0.26552197337150574, 0.46314823627471924, 0.2709038555622101, 0.13140787184238434, -0.061331626027822495, 0.43298250436782837, -0.08418743312358856, -0.22093240916728973, -0.8130700588226318, -0.09260867536067963, 0.3281470239162445, 0.04427216574549675, -0.2134168297...
clunky looking, but arguably it's better than the original by a considerable bit. With an hour dedicated to the task, several more improvements could be made. With tk 8.5 (and actually for a couple years prior) there is support for themes and for native widgets, and even the X11 version gets a minor facelift. Tk is st...
[ 0.10737770795822144, 0.005719284527003765, 0.775060772895813, 0.1931561380624771, -0.20781180262565613, -0.31380027532577515, 0.023386800661683083, 0.408769816160202, -0.3106050193309784, -0.3819217383861542, -0.024126075208187103, 0.4205327033996582, -0.2282962203025818, 0.014857141301035...
application you'll lose. But if you have an industrial application that just needs to work and be usable and perhaps multi-platform, Tk is still one of the best choices out there. --- As of 2015, there's a nice write-up about modernizing Tkinter's IDLE IDE. The article describes some of the steps taken to make IDLE m...
[ 0.32818856835365295, 0.004436376504600048, 0.0734715461730957, 0.11825565993785858, 0.025898976251482964, -0.08689779043197632, -0.049552470445632935, 0.10660818219184875, -0.5673432350158691, -0.44559377431869507, 0.08489182591438293, 0.6175734400749207, -0.17123980820178986, 0.1149646565...
I am given a problem where I have been given N nodes in a graph that are interconnected to each other then given a matrix which lists down a node being connected to another (1 if it is, 0 if not). I am wondering how to best approach this problem. I think these are adjacency matrix? But how would I implement that ... B...
[ 0.2889232635498047, -0.05601980537176132, -0.04295634105801582, 0.2953948676586151, -0.09906312823295593, 0.23284272849559784, 0.13066169619560242, -0.13569515943527222, -0.337449312210083, -0.7614206075668335, 0.05880417302250862, 0.1693190187215805, -0.4092582166194916, 0.401039183139801...
can implement this using a 2-dimensional array of booleans. So, if node i is connected to node j, then myarray[i][j] would be true. If your edges are not directional, then myarray[j][i] would be true whenever myarray[i][j] is. This can also be extended to weighted edges by using integers (or another numeric type) inst...
[ -0.1393079161643982, -0.34662044048309326, 0.389591246843338, 0.0698935016989708, -0.293430894613266, -0.06413951516151428, 0.22513334453105927, -0.2989049553871155, -0.05181950330734253, -0.3717843294143677, 0.13153353333473206, 0.2754233479499817, -0.212148517370224, -0.06074241176247597...
In my SQL Server backend for my app, I want to create history tables for a bunch of my key tables, which will track a history of changes to the rows. My entire application uses Stored Procedures, there is no embedded SQL. The only connection to the database to modify these tables will be through the application and th...
[ 0.5417720675468445, 0.20233437418937683, 0.30443280935287476, 0.14421479403972626, -0.015332845970988274, -0.025937745347619057, 0.10439866036176682, -0.34807613492012024, -0.510410726070404, -0.4789689779281616, 0.36288607120513916, 0.6907081007957458, -0.2573902904987335, -0.133598357439...
some DDL of the stuff used: --- The AuditLog table ------------------ ``` CREATE TABLE [AuditLog] ( [AuditLogID] [int] IDENTITY (1, 1) NOT NULL , [ChangeDate] [datetime] NOT NULL CONSTRAINT [DF_AuditLog_ChangeDate] DEFAULT (getdate()), [RowGUID] [uniqueidentifier] NOT NULL , [ChangeType] [varchar] (5...
[ -0.0025277771055698395, 0.20878708362579346, 0.7104972004890442, 0.26104217767715454, -0.11027134954929352, -0.15492671728134155, 0.16714885830879211, -0.3394981324672699, -0.1847943812608719, -0.5082011222839355, -0.10071159899234772, 0.5877688527107239, -0.20599345862865448, 0.2746615707...
COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [Hostname] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [AppName] [varchar] (128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [UserGUID] [uniqueidentifier] NULL , [TagGUID] [uniqueidentifier] NULL , [Tag] [varchar] (8000) COLLATE SQL_...
[ -0.4058694541454315, 0.18410193920135498, 0.5333172678947449, 0.04800475388765335, -0.05359037220478058, 0.27554333209991455, -0.035424523055553436, -0.5292540788650513, -0.254475861787796, -0.3759720027446747, -0.13002336025238037, 0.31580427289009094, -0.6014062762260437, 0.1413466632366...
Old/New because the row is new. So we only have one record - INSERTED*/ INSERT INTO AuditLog( ChangeDate, RowGUID, ChangeType, Username, HostName, AppName, UserGUID, TableName, FieldName, TagGUID, Tag,
[ -0.12254218012094498, 0.3072098195552826, 0.6369216442108154, 0.038280412554740906, 0.29441216588020325, 0.11436346918344498, -0.17182892560958862, -0.07998383790254593, -0.12066192179918289, -0.7236250638961792, 0.1395075023174286, 0.43862301111221313, -0.18855668604373932, 0.081238709390...
OldValue, NewValue) SELECT getdate(), --ChangeDate i.NodeGUID, --RowGUID 'INSERTED', --ChangeType USER_NAME(), HOST_NAME(), APP_NAME(), @SavedUserGUID, --UserGUID 'Nodes', --TableName '', --FieldName i.ParentNodeGUID, --TagGUID i.Caption, --T...
[ -0.256793737411499, -0.1344556212425232, 0.7482696175575256, -0.046546876430511475, 0.34052327275276184, 0.37270456552505493, 0.14001093804836273, 0.0007565469131805003, -0.1705814003944397, -0.9913088083267212, -0.4039097726345062, 0.4929799437522888, -0.21953099966049194, 0.3431332707405...
null, --OldValue null --NewValue FROM Inserted i ``` --- Trigger to log Updates ---------------------- ``` CREATE TRIGGER LogUpdate_Nodes ON dbo.Nodes FOR UPDATE AS /* Load the saved context info UserGUID */ DECLARE @SavedUserGUID uniqueidentifier SELECT @SavedUserGUID = CAST(context_info as uniqueide...
[ -0.019054705277085304, 0.1427830010652542, 0.42910036444664, -0.1672384887933731, 0.20317038893699646, -0.017483852803707123, 0.18966209888458252, -0.5728919506072998, -0.28458335995674133, -0.670964241027832, -0.1314203441143036, 0.4306703507900238, -0.17816880345344543, 0.216530069708824...
Username, HostName, AppName, UserGUID, TableName, FieldName, TagGUID, Tag, OldValue, NewValue) SELECT getdate(), --ChangeDate
[ -0.15329518914222717, -0.290568470954895, 0.612723708152771, -0.09059994667768478, 0.09519629180431366, 0.2579288184642792, 0.10185221582651138, 0.05680530145764351, 0.03767261281609535, -0.9293106198310852, -0.31487950682640076, 0.37898898124694824, -0.39447370171546936, 0.245141759514808...
i.NodeGUID, --RowGUID 'UPDATED', --ChangeType USER_NAME(), HOST_NAME(), APP_NAME(), @SavedUserGUID, --UserGUID 'Nodes', --TableName 'ParentNodeGUID', --FieldName i.ParentNodeGUID, --TagGUID i.Caption, --Tag
[ -0.4590960443019867, -0.12281310558319092, 0.4292965829372406, 0.28210559487342834, 0.15766769647598267, 0.3711923658847809, -0.14146070182323456, 0.4319307804107666, -0.28067076206207275, -0.9752538800239563, -0.3467806279659271, 0.3105626702308655, -0.24312220513820648, 0.389814943075180...
d.ParentNodeGUID, --OldValue i.ParentNodeGUID --NewValue FROM Inserted i INNER JOIN Deleted d ON i.NodeGUID = d.NodeGUID WHERE (d.ParentNodeGUID IS NULL AND i.ParentNodeGUID IS NOT NULL) OR (d.ParentNodeGUID IS NOT NULL AND i.ParentNodeGUID IS NULL)
[ -0.6641020178794861, -0.20621386170387268, 0.0525016188621521, -0.07462717592716217, 0.1447739452123642, 0.23707300424575806, 0.29606664180755615, 0.14560264348983765, 0.17032840847969055, -0.7762019634246826, -0.4041992127895355, 0.09318895637989044, -0.08549541980028152, 0.58738631010055...
OR (d.ParentNodeGUID <> i.ParentNodeGUID) END /* Caption varchar(255) */ IF UPDATE (Caption) BEGIN INSERT INTO AuditLog( ChangeDate, RowGUID, ChangeType, Username, HostName, AppName, UserGUID, TableName, FieldName,
[ -0.20083677768707275, 0.16485419869422913, 0.5257810950279236, -0.17017751932144165, 0.2540684640407562, 0.02169092372059822, 0.018903719261288643, -0.15343399345874786, 0.023378470912575722, -0.5777554512023926, -0.10222241282463074, 0.5748072862625122, -0.25611796975135803, -0.0041021774...
TagGUID, Tag, OldValue, NewValue) SELECT getdate(), --ChangeDate i.NodeGUID, --RowGUID 'UPDATED', --ChangeType USER_NAME(), HOST_NAME(), APP_NAME(), @SavedUserGUID, --UserGUID
[ -0.24242784082889557, -0.20831792056560516, 0.7129267454147339, -0.1901172399520874, 0.22898219525814056, 0.37160536646842957, 0.20828302204608917, 0.032023489475250244, -0.20812900364398956, -0.9823055863380432, -0.262383371591568, 0.5044320821762085, -0.4774927496910095, 0.33198308944702...
'Nodes', --TableName 'Caption', --FieldName i.ParentNodeGUID, --TagGUID i.Caption, --Tag d.Caption, --OldValue i.Caption --NewValue FROM Inserted i INNER JOIN Deleted d
[ -0.6326768398284912, -0.17273901402950287, 0.40834078192710876, 0.12275958061218262, 0.31805551052093506, 0.38090938329696655, 0.14679060876369476, 0.1908942461013794, 0.015473661944270134, -0.8489559888839722, -0.6002712845802307, 0.15457633137702942, -0.10783927887678146, 0.3653469681739...
ON i.NodeGUID = d.NodeGUID WHERE (d.Caption IS NULL AND i.Caption IS NOT NULL) OR (d.Caption IS NOT NULL AND i.Caption IS NULL) OR (d.Caption <> i.Caption) END ... /* ImageGUID uniqueidentifier */ IF UPDATE (ImageGUID) BEGIN INSERT INTO AuditLog( ChangeDate, RowGUID, ChangeType...
[ -0.17061448097229004, -0.028470667079091072, 0.4202916622161865, -0.010930809192359447, 0.21076634526252747, -0.08507079631090164, -0.05452187731862068, -0.07700040936470032, -0.08935283869504929, -0.8781367540359497, -0.12554395198822021, 0.47879907488822937, -0.3286314010620117, -0.03559...
UserGUID, TableName, FieldName, TagGUID, Tag, OldValue, NewValue) SELECT getdate(), --ChangeDate i.NodeGUID, --RowGUID 'UPDATED', --ChangeType USER_NAME(), HOST_NAME(), APP_NAME(), @SavedUserGUID, --UserGUID 'Nodes', --TableName 'I...
[ -0.2932405471801758, -0.10989462584257126, 0.7163854837417603, -0.14969581365585327, 0.12040114402770996, 0.4320428669452667, 0.032821107655763626, 0.11327905207872391, -0.1944373995065689, -1.1114697456359863, -0.24574153125286102, 0.5047988891601562, -0.3902217447757721, 0.26555016636848...
--FieldName i.ParentNodeGUID, --TagGUID i.Caption, --Tag (SELECT Caption FROM Nodes WHERE NodeGUID = d.ImageGUID), --OldValue (SELECT Caption FROM Nodes WHERE NodeGUID = i.ImageGUID) --New Value FROM Inserted i INNER JOIN Deleted d ON i.NodeGUID = d.NodeGUID WHERE...
[ -0.5050635933876038, -0.19254246354103088, 0.3808688819408417, 0.019802622497081757, -0.029900377616286278, 0.3126290738582611, -0.051812201738357544, 0.012282202951610088, -0.125335231423378, -0.9095175266265869, -0.36320212483406067, 0.37542328238487244, -0.1482144594192505, 0.1951897889...