text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I need to create a portable script to give to others to implement on their websites that will dynamically show content from my database (MySQL). I know AJAX has a cross-site problem, but it seems that Google's ad's somehow manage the effect in a cross-browser / cross-site fashion. Knowing that I have to give people a...
[ 0.6069275140762329, 0.3275577425956726, 0.22544816136360168, 0.14955024421215057, -0.40651029348373413, -0.1631435602903366, 0.12348822504281998, -0.169537752866745, 0.2157646119594574, -0.7068136930465698, 0.14739032089710236, 0.4688642919063568, -0.3471396565437317, 0.16875551640987396, ...
it comes to loading remote javascript files. Once you've loaded the javascript file, you can create iframes in your page that link back to the actual hosted content on your server (and feed them any data about the current page that you wish).
[ 0.22269362211227417, 0.023393772542476654, 0.025649961084127426, -0.029022496193647385, 0.08530553430318832, -0.15284636616706848, -0.0624077133834362, 0.300356388092041, -0.28783777356147766, -0.6420321464538574, 0.0373084619641304, 0.25652098655700684, -0.1723618358373642, -0.08912774175...
I wrote a Nant script that executes MSBUILD.exe to compile a project on my dev machine. On my dev machine, the projects builds its output to bin\x86\Release and my Nant script zips up the contents of that directory. I then commit everything to SVN and let TeamCity run the Nant script that executes MSBUILD.exe to compil...
[ 0.5786206722259521, -0.012562822550535202, -0.12836341559886932, -0.09339188039302826, -0.35333019495010376, -0.04204652085900307, 0.3742063045501709, -0.1394260823726654, -0.10589433461427689, -0.8735153079032898, 0.0654340460896492, 0.5824503302574158, -0.48996880650520325, 0.06903429329...
project file light up as being changed. Are these settings stored in the project file, solution file, or user configuration file and therefore not carried over to the build server? You will need to iterate on the items, and clone them one by one, putting the clones in your result array as you go. ``` public static Lis...
[ 0.4107915461063385, 0.009754099883139133, 0.45931416749954224, -0.22054916620254517, 0.16937243938446045, 0.1640245020389557, 0.11119306087493896, -0.6584696173667908, -0.17240868508815765, -0.9037162065505981, -0.21924780309200287, 0.36837613582611084, -0.5521042346954346, 0.2740480005741...
`clone()` method.
[ 0.12087634950876236, -0.07060631364583969, 0.1085539311170578, -0.10925223678350449, 0.2565446197986603, 0.03982483968138695, -0.016256151720881462, -0.22672395408153534, -0.009458961896598339, -0.38393211364746094, -0.1983100324869156, 0.2637265920639038, -0.5921404957771301, 0.2812222242...
I have a dialog, and I have a datepicker field on the dialog. When I open the dialog and click in the datepicker field, the datepicker panel show behind dialog. I try more properties: zindex, stack, bgiframe, but not success. Someone can help me? Tks. **Old Answer** `z-index` (note the hyphen!) is the property tha...
[ 0.07762526720762253, 0.11483225226402283, 0.8181740045547485, 0.022030264139175415, -0.05289574712514877, 0.04346993938088417, 0.08026423305273056, 0.12282872945070267, -0.11116251349449158, -0.8041048049926758, 0.08964373171329498, 0.8004918694496155, -0.12283989042043686, 0.0073663778603...
`.ui-datepicker` item and change it: ``` .ui-datepicker { width: 17em; padding: .2em .2em 0; z-index: 9999 !important; } ``` Using **z-index: 9999 !important;** worked in Firefox 3.5.9 (Kubuntu).
[ -0.30284708738327026, -0.2076023817062378, 0.8772148489952087, -0.2053309679031372, 0.19963321089744568, 0.02084553986787796, -0.024469899013638496, -0.2947138845920563, -0.12216861546039581, -0.5523001551628113, -0.4498642683029175, 0.41345635056495667, -0.3750537931919098, -0.17382878065...
> Netbeans, indeed any Java compiler and > executor, needs to know the classpath > to compile and run a file. When you > just open a file in Netbeans, you do > not tell it any of that information. > When you set up a project, that > process tells Netbeans where the Java > resources are. Yet other IDEs can easil...
[ 0.39875656366348267, 0.07155832648277283, -0.04306723549962044, -0.004126577638089657, -0.13713525235652924, -0.4817882180213928, 0.4167633652687073, 0.11670741438865662, -0.20600104331970215, -0.7198057770729065, 0.010823344811797142, 0.5100748538970947, -0.18879833817481995, -0.065544433...
file doesn't belong to a project. Your best option with NetBeans is just to create a dummy "try stuff" project that you know will never contain a shipping product but will allow you to experiment without having to create a new project every time. You could even collect code snippets in different classes this way. If ...
[ 0.8556739687919617, -0.28803324699401855, -0.2046186327934265, 0.47813424468040466, -0.028509436175227165, -0.3599066734313965, -0.06208952143788338, 0.2142687290906906, -0.21045607328414917, -0.5242519974708557, 0.38651949167251587, 0.3557363748550415, -0.23982450366020203, 0.239902108907...
I got this idea of expanding my trace() messages. **Why** trace() is all over my code, I want to turn them on/off by a simple command and maybe add some sort of priority functionality to the trace(), i.e. ``` myTrace.TraceMsg("loosehere",debugme, 0); myTrace.TraceMsg("winhere",debugme, 1); ``` And when I run, ...
[ 0.3143046498298645, 0.061730582267045975, 0.3167147934436798, 0.23646102845668793, 0.38466164469718933, -0.2828496992588043, 0.370181143283844, -0.23557332158088684, -0.29726558923721313, -0.5656370520591736, 0.028421349823474884, 0.4969007670879364, -0.5393486022949219, -0.090700283646583...
problems finding info on this subject on our favourite search engine, so any help would be appreciated. `trace()` itself is a top-level function, not a class, so unfortunately we cannot extend it. That being said, we can utilize it in a simple class to do just what it does normally, only in this case the trace is based...
[ 0.24879741668701172, -0.16777664422988892, -0.21403172612190247, 0.24447272717952728, 0.2518581748008728, -0.22297687828540802, 0.21775372326374054, -0.16438373923301697, 0.08180230110883713, -0.6987254023551941, -0.20281976461410522, 0.4859309494495392, -0.4060415029525757, 0.034465275704...
pattern to instantiate instances of Trace, when the trace method of Tracer is called. ``` //This class is handled by Tracer, which is right below it. //You WILL NOT instantiate these, nor hold references. package { public class Trace { private function _value:*; private function _trace:Boolean;...
[ 0.3357042968273163, -0.4048944413661957, 0.10547459125518799, -0.11967578530311584, 0.2342250496149063, -0.33845284581184387, 0.17474859952926636, -0.1413143128156662, -0.2816098928451538, -0.6212058067321777, -0.018601085990667343, 0.49318066239356995, -0.6312666535377502, -0.132421523332...
_trace = pTrace; } public function get value():* { return _value; } public function get trace():Boolean { return _trace; } } } //This is the important class and the
[ 0.07463760673999786, -0.4196532070636749, 0.05132944881916046, -0.11727134883403778, 0.295368492603302, -0.2397848218679428, 0.019388683140277863, -0.26788878440856934, 0.06807172298431396, -0.34128323197364807, -0.07973459362983704, 0.46663177013397217, -0.38457417488098145, -0.0737370923...
only one you will work with. package { /** *Utilizes Singleton and Factory design patterns. */ public class Tracer { private var _traceArray:Array; private static var _instance:Tracer; public function Tracer(pvt:PrivateClass = null):void { if(pvt == nul...
[ 0.38574478030204773, -0.5013729929924011, -0.005632611457258463, 0.043869923800230026, 0.17891466617584229, 0.01639026775956154, 0.3423282206058502, -0.41775235533714294, -0.26313504576683044, -0.5045157670974731, 0.02057836949825287, 0.4163588285446167, -0.5694611668586731, -0.05720396712...
{ throw(new Error("You cannot instantiate this class directly, please use the static getInstance method.")); } _init(); } public static function getInstance():Tracer { if(Tracer._instance == null)
[ 0.022810637950897217, -0.33713939785957336, -0.19885896146297455, -0.1864272505044937, -0.08971407264471054, -0.08501309901475906, 0.49544548988342285, -0.32670724391937256, -0.04195888713002205, -0.47275516390800476, -0.16618791222572327, 0.40745988488197327, -0.5237591862678528, 0.312318...
{ Tracer._instance = new Tracer(new PrivateClass()); } return Tracer._instance; } public function trace(pValue:*, pTrace:Boolean):void { var trace:Trace = new Trace(pValue, pTrace);
[ 0.11360404640436172, -0.4164448380470276, 0.1772659569978714, -0.18409007787704468, 0.4653308689594269, 0.11206697672605515, 0.30638182163238525, -0.3418985903263092, -0.09808260947465897, -0.4935724437236786, -0.21852141618728638, 0.5892449617385864, -0.3640229105949402, 0.210958555340766...
if(trace.pTrace) { trace(pValue); } } //Since we have the option for individual traces to be disabled //I provide this to get access to any and all later. public function traceAll():void
[ 0.5813847184181213, -0.43153834342956543, 0.15586522221565247, -0.19585931301116943, 0.6652750372886658, -0.08294679969549179, 0.32675066590309143, -0.38941389322280884, -0.06896550208330154, -0.3057812452316284, -0.06530172377824783, 0.5137996077537537, -0.292812705039978, -0.058329083025...
{ traceStr:String = _traceArray.toString(); } public function get traceables():Array { return _traceArray; } //Here we provide a method to trace all, even if set to false in their constructor. private function _init():void
[ 0.347729355096817, -0.2032422125339508, 0.22570829093456268, -0.005866991821676493, 0.48312920331954956, -0.06104545667767525, 0.2672830820083618, -0.3544645309448242, -0.14808112382888794, -0.3609362840652466, 0.08376149833202362, 0.36134710907936096, -0.5233083367347717, 0.04672117531299...
{ _traceArray = new Array(); } } } //Here we create a class that is OUTSIDE of the package. //It can only be accessed from within this class file. We use this //to make sure this class isn't instantiated directly. class PrivateClass { function PrivateClass():void { trace('can on...
[ 0.47311463952064514, -0.4300629198551178, 0.3079349398612976, -0.15657204389572144, 0.2377305030822754, -0.2645570933818817, 0.318490207195282, -0.2928442656993866, -0.06408805400133133, -0.5656489729881287, 0.14618007838726044, 0.5171254277229309, -0.4724908769130707, 0.06085653975605965,...
import flash.display.Sprite; import flash.events.Event; //No need to import Tracer and Trace, they are also in the //unnamed package. public class DocumentClass extends Sprite { private var _tracer:Tracer; public function DocumentClass():void { if(stage) _init(...
[ 0.02423011139035225, -0.22710908949375153, 0.3670656681060791, -0.36480018496513367, -0.002002057386562228, -0.07382217049598694, 0.27295881509780884, -0.46477290987968445, -0.015076683834195137, -0.33303356170654297, -0.323775053024292, 0.612957775592804, -0.4381994605064392, -0.086104191...
} private function _init(e:Event = null):void { _tracer = Tracer.getInstance(); _tracer.trace(10*20, false); _tracer.trace(10*20, 0); //SAME AS ABOVE _tracer.trace("I love AS3", true); //traces _tracer.traceAll(); //Would trace: 200, 200,
[ 0.3956814408302307, -0.2137739062309265, 0.36570751667022705, -0.1017921194434166, 0.5741278529167175, 0.17587190866470337, 0.5696397423744202, -0.2083297222852707, -0.21941149234771729, -0.5146505236625671, 0.0012169643305242062, 0.4206221103668213, -0.45989155769348145, 0.188791558146476...
I love AS3 } } } ``` Keep in mind this is off the hip and very well could have a bug or two, but the idea is there; That is to say that this is not tested, it is merely to give you an idea of how you might implement this. I hope this helps.
[ 0.581795334815979, 0.256540447473526, -0.036378052085638046, 0.011504626832902431, 0.10343187302350998, -0.36644598841667175, 0.17126202583312988, 0.5491666197776794, -0.07176384329795837, -0.537053108215332, -0.03689659386873245, 0.450836181640625, -0.07720600813627243, -0.042212065309286...
I'm looking for a C# code snippet to give me a notification for when a USB drive is plugged into my PC in Windows Vista (or win7) There's a class called [DriveDetector](http://www.codeproject.com/KB/system/DriveDetector.aspx) over at Codeproject that sounds like it does what you want.
[ 0.47556638717651367, -0.15970085561275482, 0.14600443840026855, 0.22767093777656555, 0.1255771964788437, -0.32602107524871826, -0.2751465439796448, 0.6710050106048584, -0.2570362389087677, -0.5332042574882507, 0.02702316641807556, 0.7322539687156677, 0.04135652258992195, 0.0817227810621261...
Have the following string i need to split. ``` $string = "This is string sample - $2565"; $split_point = " - "; ``` One: I need to be able to split the string into two parts using a regex or any other match and specify where is going to split. Second: Also want to do a preg\_match for $ and then only grab number on...
[ 0.5818504691123962, -0.1821269989013672, -0.001486360328271985, -0.14752362668514252, 0.055757030844688416, -0.19818587601184845, 0.0649518147110939, -0.395651638507843, -0.2129909098148346, -0.25539150834083557, -0.2316807359457016, 0.7479628324508667, -0.49815744161605835, 0.064763471484...
How would I 'attach' a console/terminal-view to an applications output so I can see what it may be saying? How would I detach from an applications output without killing the application? Normally if you fire up a talkative application using the command line you get to see all kinds of wonderful output. However, let’s...
[ 0.2855721116065979, -0.006921448279172182, 0.3722054064273834, 0.22230370342731476, -0.14176395535469055, -0.17388039827346802, 0.12333183735609055, 0.010933020152151585, -0.09516876190900803, -0.4189271628856659, -0.09312266111373901, 0.8648895025253296, -0.32451945543289185, 0.3931474089...
the command to a file, and then use 'tail' to view new lines that are added to that file in real time. Another option is to launch your program inside of 'screen', which is a sort-of text-based Terminal application. Screen sessions can be attached and detached, but are nominally meant only to be used by the same user,...
[ 0.5708879232406616, -0.5377711057662964, 0.3152795433998108, 0.4137304723262787, 0.017672572284936905, -0.2930217981338501, 0.06642475724220276, 0.16076956689357758, -0.27292877435684204, -0.39107048511505127, -0.034585706889629364, 0.5210603475570679, -0.06620999425649643, 0.1058978885412...
I have a problem where I need to synchronize processing for multiple threads across multiple different servers for a Java service on Windows. In this application, I have multiple consumer threads pullings messages off the same JMS queue. Messages come in in groups of 3 or 4, and I need to make sure the messages in eac...
[ 0.21198388934135437, -0.06249154731631279, 0.36245810985565186, -0.03394670784473419, -0.0368184819817543, 0.21107952296733856, 0.13425974547863007, -0.14168530702590942, -0.5213689208030701, -0.5869144201278687, 0.14679357409477234, 0.3484392464160919, -0.45134881138801575, 0.358299314975...
suggestions on distributed synching mechanisms for threads? Any type of solution would be good (JMS solutions, distributed caching, etc.) Note: the JMS provider we're using is ActiveMQ. ActiveMQ has support for [message groups](http://activemq.apache.org/message-groups.html) which, quite literally, should be exactly w...
[ 0.31817376613616943, -0.1872476488351822, 0.27853620052337646, 0.23665690422058105, -0.04694036766886711, -0.2775646150112152, 0.050336822867393494, 0.34446173906326294, -0.47185492515563965, -0.5922852754592896, 0.15498939156532288, 0.12364332377910614, -0.4091953635215759, 0.062391281127...
Basically, some GoDaddy DNS help text has me scratching my head. Godaddy's DNS service says, "You cannot set up your domain name to use more than one mail provider at a time." But it doesn't talk about more than one subdomain name, with one mail provider per subdomain. I think I need more than one mail server in my or...
[ 0.5548062324523926, 0.3558109402656555, 0.26609569787979126, 0.3325304687023163, -0.18532603979110718, -0.10440711677074432, 0.3400784432888031, 0.1566193848848343, -0.4291294515132904, -0.5912719368934631, 0.048740968108177185, -0.07885688543319702, -0.3312307298183441, 0.4788017272949219...
want to distrurb those. Their owners are happy with them for the time being. It is acceptable to Mr. Google Apps Fanboy if we set up a subdomain like staff.nonprofit.org and use that for his Google Apps mailserver. So he would have an email address like user3@staff.nonprofit.org. Given that there is already a priorit...
[ 0.5328655242919922, -0.028492547571659088, 0.5322684645652771, 0.5475148558616638, -0.10072155296802521, -0.11995694786310196, 0.04738135635852814, -0.03823090344667435, -0.3682185113430023, -0.4073428511619568, -0.14774061739444733, 0.1857895404100418, -0.23931226134300232, 0.294613212347...
do I need to make the subdomain MX record a higher priority than the domain MX record and have everything still work? You can set up MX records on subdomains/hosts just fine, and you don't need to worry about their priority relative to the main domain's records; they don't interact.
[ 0.48900678753852844, 0.08991185575723648, 0.20976994931697845, 0.38184359669685364, 0.15081612765789032, -0.37516096234321594, 0.24999059736728668, 0.1615961492061615, -0.5467327833175659, -0.39877042174339294, 0.035092584788799286, 0.2634982168674469, -0.3260587751865387, 0.31511890888214...
We are moving out of VB6 as quickly as we can, but in the meantime we've begun building our VB6 applications from the command line on a Build Server. Problem: The build server has a basic video adapter and causes the forms to be truncated down to the resolution of the basic adapter rather than the Height and Width in ...
[ 0.5019623041152954, 0.05668466538190842, 0.7394524812698364, 0.12378408014774323, 0.1722019910812378, -0.2576632797718048, 0.28288909792900085, -0.3264819085597992, -0.19543246924877167, -0.7459046840667725, 0.020625585690140724, 0.3123815953731537, -0.060191888362169266, 0.211850479245185...
more applications with more dozens of forms to come. I want to build a script to handle this. Two questions: 1) Where in the code/project/etc do I find the Height and Width of the form as shown in the Properties window? A search of the \*.frm file doesn't turn up any winners; neither does opeing the \*.frx file and c...
[ 0.1673557609319687, 0.09903375059366226, 0.9672075510025024, 0.04011917486786842, -0.17422446608543396, -0.17323102056980133, 0.11998418718576431, -0.24763864278793335, -0.3767200708389282, -0.6278945803642273, -0.07471668720245361, 0.7841083407402039, 0.10381091386079788, -0.3775211572647...
as Angry Jim observed. It doesn't explain about ClientHeight and ClientWidth but as OneNerd and cmsjr have said, that's the size of the interior of the form (without menu bars and borders). The build server may also be changing the ClientLeft and ClientTop, if you have any forms with StartupPosition set to manual. Don...
[ 0.22496557235717773, -0.000349809299223125, 0.7545838356018066, -0.167757049202919, -0.01470324955880642, -0.01642092503607273, 0.23443014919757843, -0.21114152669906616, -0.4555376470088959, -0.7426720857620239, -0.08135750889778137, 0.6395593285560608, 0.03748582676053047, -0.07150106132...
dimensions of the interior of the form. The VB6 runtime calculates the appropriate Height and Width from those. And finally, **just buy a new build server** (or a new video card). Lead all the developers to the boss waving flaming torches and pitchforks, or perhaps just calmly explain the difference between the cost o...
[ 0.6547876000404358, 0.09963950514793396, 0.5726534128189087, 0.3016349673271179, -0.05900587514042854, -0.10648967325687408, 0.2563782036304474, -0.009437053464353085, 0.0033296486362814903, -0.6744343638420105, -0.03565771132707596, 0.7131533026695251, 0.47888073325157166, 0.0520347505807...
The following... ``` require 'yaml' test = "I'm a b&d string" File.open('test.yaml', 'w') do |out| out.write(test.to_yaml) end ``` ...outputs ... ``` --- this is a b&d string ``` How can I get it to output ``` --- 'this is a b&d string' ``` ??? If you want to store an escaped string in YAML, escape it using ...
[ 0.2580913007259369, 0.3914134204387665, 0.1152622401714325, -0.21399299800395966, -0.14396412670612335, 0.029181351885199547, 0.7422096729278564, -0.5677568316459656, 0.08509694039821625, -0.41471195220947266, -0.1998625099658966, 0.2882361114025116, -0.6070941686630249, 0.2022340744733810...
puts str.inspect "This string's a little complicated, but it \"does the job\" (man, I hate scare quotes)" => nil irb> puts str.to_yaml --- This string's a little complicated, but it "does the job" (man, I hate scare quotes) => nil irb> puts str.inspect.to_yaml --- "\"This string's a little complicated, but it \\\"does ...
[ 0.38179922103881836, 0.634191632270813, 0.09712476283311844, -0.28372010588645935, -0.22158043086528778, -0.028321506455540657, 0.5365628600120544, -0.36973029375076294, 0.10527145117521286, -0.6942849159240723, -0.030611427500844002, 0.32541966438293457, -0.43960317969322205, -0.024598488...
job\" (man, I hate scare quotes) " => nil irb> puts %{"#{str}"}.to_yaml --- "\"This string's a little complicated, but it \"does the job\" (man, I hate scare quotes)\"" => nil irb> puts (" " + str).to_yaml --- " This string's a little complicated, but it \"does the job\" (man, I hate scare quotes)" => nil ``` However...
[ 0.5620040893554688, 0.6701058745384216, 0.13554264605045319, -0.3871672749519348, -0.41213762760162354, 0.07193519920110703, 0.583233654499054, 0.018053026869893074, 0.11541581153869629, -0.41621917486190796, 0.09364239126443863, 0.752703845500946, -0.5373642444610596, 0.04147927835583687,...
in them, YAML will preserve the string: ``` irb> test = "I'm a b&d string" => "I'm a b&d string" irb> YAML::load(YAML::dump(test)) => "I'm a b&d string" irb> YAML::load(YAML::dump(test)) == test => true ```
[ 0.262858122587204, 0.3231043517589569, 0.2231878638267517, -0.2012948840856552, -0.2598421573638916, 0.020412787795066833, 0.18664301931858063, -0.4805348813533783, -0.011355376802384853, -0.31522783637046814, -0.3455254137516022, 0.5327597856521606, -0.4929661452770233, 0.0667691081762313...
I have a table with a column I would like to update its values. Here is an example of TSQL codes: ``` WITH Pieces(id, newdesc) AS ( SELECT itemid, REPLACE(REPLACE(description, 'DESC_A', 'DESC_B'), 'NEW_1', 'NEW_2') FROM myTable WHERE description like '%DESC_A%DESC_B%' ) -- SELECT * FROM Pieces UPDATE myTable SET d...
[ -0.009217947721481323, 0.2503145933151245, 0.4782310128211975, -0.07572910934686661, -0.22282946109771729, 0.2741319537162781, 0.03680410608649254, -0.4208069145679474, -0.34959402680397034, -0.9109776616096497, 0.04428032040596008, 0.3595210015773773, -0.27949655055999756, 0.2711268365383...
SET description = newdesc FROM Pieces WHERE Pieces.id = myTable.itemid ```
[ 0.04192888364195824, -0.06838836520910263, 0.03792678192257881, 0.14398975670337677, -0.06557028740644455, -0.2533305883407593, 0.20179755985736847, -0.3106178343296051, -0.31865739822387695, -0.7073595523834229, -0.34124499559402466, 0.15484091639518738, -0.17212000489234924, 0.3622016608...
How to print the bit representation of a string ``` std::string = "\x80"; void print (std::string &s) { //How to implement this } ``` I'd vote for `bitset`: ``` void pbits(std::string const& s) { for(std::size_t i=0; i<s.size(); i++) std::cout << std::bitset<CHAR_BIT>(s[i]) << " "; } int main(...
[ -0.15245042741298676, 0.0022584281396120787, 0.4654979109764099, -0.22514142096042633, 0.2729683518409729, 0.09490741789340973, 0.22242595255374908, -0.5217583179473877, -0.026212668046355247, -0.6978650093078613, -0.38272106647491455, 0.5819860100746155, -0.35704803466796875, -0.277752399...
Every modern source control system can slice and dice the history of a program. There are many tools to statically and dynamically analyze code. What sort of mathematical formula would allow me to integrate the amount of activity in a file along with the number of deployments of that software? We are finding that even ...
[ 0.5733413696289062, 0.16233642399311066, -0.07663009315729141, 0.25414809584617615, 0.07509855926036835, -0.24031998217105865, 0.12833158671855927, -0.17308367788791656, -0.1883496195077896, -0.6948620676994324, -0.013113759458065033, 0.540725588798523, 0.21052606403827667, 0.1839747428894...
a test machine I could see marking it less rotten. If something gets sent to all test boxes I could see it getting a fresh marker. If something goes to production I could give it a nod and reduce its [bitrot](http://en.wikipedia.org/wiki/Bit_rot) score. If there is a lot of activity within its files and it never gets s...
[ 0.8335202932357788, 0.2668364644050598, 0.07015671581029892, 0.11693034321069717, 0.0040238103829324245, -0.1326877474784851, 0.25711295008659363, -0.11826449632644653, -0.31124016642570496, -0.6515179872512817, 0.14527113735675812, 0.5783249139785767, 0.011727968230843544, 0.0996174141764...
think dimensional analysis could probably just be based on age. Relative to that is a little more difficult. Old code is rotten. The average age of each line of code still is simply a measure of time. Does a larger source module rot faster than a smaller, more complex one? **Update** Code coverage is measured in line...
[ 0.5567819476127625, 0.188518226146698, 0.23480598628520966, 0.18434655666351318, -0.19624169170856476, -0.10356122255325317, 0.41300255060195923, -0.08855249732732773, -0.3657948076725006, -0.642192542552948, -0.050391409546136856, 0.2889871299266815, 0.27816125750541687, 0.442788094282150...
I am trying to automatically build html emails and am trying to figure out whether there are standards and what attributes in an email work and which have to exist. Do I need a ? And if no does there have to be a body? Do I need to specify what Doctype I am using? I am working with the Zend Framework in their example ...
[ 0.8207550644874573, 0.3842891752719879, 0.28579407930374146, -0.13015080988407135, -0.3039216697216034, -0.16201545298099518, 0.45369699597358704, -0.16129730641841888, -0.051944226026535034, -0.6536328196525574, 0.26355740427970886, 0.41342607140541077, -0.1069628968834877, -0.24411614239...
request all out beta testers was basic HTML so they can highlight important words by making them fat, italic, underlined etc. Coding for HTML email I've always found to be a crap shoot. Unlike browsers, few mail clients adhere to W3C standards for HTML markup. [MailChimp](http://www.mailchimp.com/)'s a pretty sweet ser...
[ 0.6122530698776245, -0.07909845560789108, 0.17584650218486786, 0.06537827104330063, -0.4323996901512146, -0.16322356462478638, 0.28554677963256836, -0.01758768782019615, 0.3044000566005707, -0.5112766623497009, 0.285123348236084, 0.21155758202075958, -0.25958937406539917, -0.04974088817834...
more reliable for styling in this case (though, being a standards warrior, I cringe to say it). As for html and body tags - I send them in my emails. You're guiding principal should be KISS (keep it simple, stupid!).
[ 0.5982168316841125, -0.32705622911453247, 0.4346926808357239, 0.3398067057132721, -0.08910913020372391, -0.3107569217681885, 0.5044587850570679, 0.19969125092029572, 0.07933474332094193, -0.45060473680496216, 0.009485005401074886, 0.30673524737358093, 0.454001247882843, -0.3472224771976471...
I am performing a jQuery `.ajax()` call that returns a `List<string>` of IP addresses on a specified subnet. I use a `[WebMethod]` on an .aspx page to return the values. ASP.NET's built-in JSON serializer does the magic to return the actual JSON used in my Javascript. I have profiled the the server-side time, and it t...
[ 0.2875054180622101, -0.010155822150409222, 0.4637131989002228, -0.10149101912975311, -0.3131581246852875, -0.21300320327281952, 0.4239346385002136, -0.22970271110534668, -0.20137733221054077, -1.0309230089187622, -0.14043952524662018, 0.36897537112236023, -0.00940622016787529, -0.219570443...
returned. In Firefox, the listbox is essentially populated instantly. I'm not entirely certain where the bottleneck could be. My best guess is that the fault lies with IE6's javascript engine, but even so, adding only 255 list items should not take this much time. Can anyone point me in the right direction as to why ...
[ -0.07173405587673187, -0.11389858275651932, 0.7887769937515259, -0.08382964879274368, -0.017445402219891548, -0.21688027679920197, 0.42989951372146606, -0.01868840493261814, -0.32472747564315796, -0.7872599959373474, -0.4095805287361145, 0.49407514929771423, -0.45960524678230286, -0.062623...
contentType: "application/json; charset=utf-8", dataType: "json", success: function(data) { $('#ipAddresses').empty(); // Loop through each IP address and add it to the listbox $.each(data.d, function(){ var ip = this.toString();
[ -0.0520348846912384, 0.022635480388998985, 0.6624995470046997, -0.11019910871982574, 0.13819164037704468, 0.16790194809436798, 0.43746352195739746, -0.13450323045253754, -0.295058935880661, -0.5851413607597351, -0.548989474773407, 0.27981579303741455, -0.44404539465904236, 0.06142892315983...
$(document.createElement('option')).attr('value', ip).text(ip).appendTo('#ipAddresses'); }); }, error: function(msg) { alert('Error: ' + msg); } }); ``` It could be a rendering issue. try this ``` success: function(data) {
[ -0.16094987094402313, 0.0786624327301979, 0.6909791231155396, -0.4393618404865265, 0.3567277193069458, 0.22907887399196625, 0.7488941550254822, -0.11094798147678375, -0.22119054198265076, -0.5580651164054871, -0.581096351146698, 0.7364470362663269, -0.4141107201576233, -0.25866273045539856...
// Loop through each IP address and add it to the listbox var list = $("<select />"); $.each(data.d, function(){ var ip = this.toString(); list.append($('<option />').val(ip).text(ip)); }); $('#ipAddress').empty().append(list.find('option')); }, ``` Basica...
[ 0.13061247766017914, -0.2964615225791931, 0.4799076318740845, -0.22984983026981354, 0.4452227056026459, 0.27334845066070557, 0.33315011858940125, -0.13473108410835266, -0.6037481427192688, -0.480263888835907, -0.2409992516040802, 0.4643940031528473, -0.6480509042739868, -0.0733780711889267...
the contents to the ipAddresses list. The other thing that I changed was the `document.createElement(...)`. If you look at the internals of `$('<option />')` it performs the createElement for you. Finally I choose to append the data to the list instead of calling `option.appendTo('#ipAddress')`, which would have to f...
[ 0.09870724380016327, -0.12122728675603867, 0.5845379829406738, -0.0034219964873045683, 0.030394766479730606, 0.143488809466362, 0.13717028498649597, 0.13637615740299225, -0.3918282985687256, -0.519487202167511, -0.03841012716293335, 0.4853108525276184, -0.2503950297832489, -0.0242034830152...
Sorry for this question to be a "can you fix it" one, but this little bit of code has been confusing me for a while now. I'm basically making a table with a bunch of rows and columns and in each one I have a slightly changing SQL query. To make it a bit easier instead of typing all that out I made this bit of script b...
[ 0.23621395230293274, -0.05939623713493347, 0.24470043182373047, 0.2237968146800995, 0.13844387233257294, 0.15983211994171143, 0.2677042782306671, -0.08820013701915741, -0.2829557955265045, -0.6111747622489929, 0.20120003819465637, 0.5514719486236572, -0.4401828944683075, 0.1113296672701835...
AND verticle = ${'mapPiece' . $mapPieceCount . [0]}")); echo $tile[0]; echo '.png"></td>'; ``` Thanks, Stanni Assuming I interpreted this right, the [0] needs to go outside of the curly braces: ``` echo '<td background="images/map/'; $tile = mysql_fetch_array( mysql_query( "SELECT image FROM ma...
[ 0.18286854028701782, -0.14074774086475372, 0.8612104654312134, -0.2021123468875885, -0.12023350596427917, 0.2756773829460144, 0.41618961095809937, -0.8891511559486389, -0.2037769854068756, -0.43654191493988037, -0.38667264580726624, 0.6966104507446289, -0.39175495505332947, 0.0389195755124...
. $mapPieceCount}[0] ) ); echo $tile[0]; echo '.png"></td>'; ```
[ 0.047379687428474426, -0.2618417739868164, 0.5120742321014404, -0.3915743827819824, 0.05363547056913376, -0.023046964779496193, 0.6094741821289062, -0.587200403213501, 0.03154783695936203, -0.6696157455444336, -0.5170968174934387, 0.3263382017612457, -0.38693806529045105, 0.103393040597438...
You're writing an application that manages online courses. A course is completed in many different ways. A user must do one or more of the follow to complete the course: * spend x amount of hours in the course * take a test, and pass the test (a passing score could be different for every course) * take all the lessons...
[ 0.9342208504676819, 0.14141026139259338, 0.22779980301856995, 0.3873154819011688, 0.1715950220823288, -0.23672832548618317, 0.4535932242870331, -0.13458815217018127, -0.1306009739637375, -0.4174303412437439, -0.2316204011440277, 0.40113675594329834, 0.34913086891174316, -0.1731742024421692...
the user * An organization is alerted via email, HTTP callback, or something else * some other requirements you don't know about yet Many of the courses are almost identical with respect to their requirements, but some are completely unique. There are a lot of courses, upwards of 50, and more are always being added. ...
[ 0.7686097621917725, 0.09437549114227295, 0.23114113509655, 0.3174394965171814, 0.04932364448904991, -0.1266506463289261, 0.15525393187999725, -0.02822917327284813, -0.39094269275665283, -0.7356789708137512, -0.04524850472807884, 0.5277847647666931, -0.09167715907096863, 0.12404738366603851...
constructor... granted I would make the constructor internal and Create a CourseBuilder that will know how to build all of the different courses but... When ever the Course is updated it checks if the Requirements are met by passing itself to the Requirements object. If it meets the requirements it then passes itself ...
[ 0.6826315522193909, 0.129994735121727, 0.6459258198738098, 0.02544706128537655, 0.3804304599761963, -0.07141400128602982, 0.02161302976310253, -0.4822937846183777, 0.1268460899591446, -0.8309445977210999, -0.2412816733121872, 0.6241750121116638, -0.14996129274368286, 0.21988040208816528, ...
list of IRequirement which you could fine tune based on the Course that you create... the AreMetBy method simple enumerates all of your IRequirements in the list and checks to see if your course satisfies them all... ``` interface IRequirement { public bool IsMetBy(Course course); } ``` Then you could have all ...
[ 0.15388280153274536, 0.2625022828578949, 0.41706404089927673, 0.022273454815149307, -0.03438534215092659, 0.24307921528816223, 0.1604897528886795, -0.36792415380477905, -0.09304369986057281, -0.706173300743103, -0.06170065328478813, 1.0867916345596313, -0.34332844614982605, 0.0784476324915...
OnCompleteActions would have a list of one or More IOnCompleteAction that would execute each one. ex. CreateCertificateOnCompleteAction, SendEmailOnCompleteAction, etc. By encapsulating each possible Requirement in its own class you can then Build a course that would have a MinimumHourRequirement, a PassedAllTestRequi...
[ 0.32586047053337097, -0.26220953464508057, 0.4606460630893707, 0.4001178443431854, 0.2719618082046509, -0.07814136147499084, 0.16856200993061066, -0.24414771795272827, -0.11151555180549622, -0.7734644412994385, 0.08582745492458344, 0.4890793561935425, -0.29362353682518005, -0.0933403298258...
Here's the situation. I've got a two different window hooks, one's a global hook of the WH\_SHELL variety that watches for new top-level windows, the second's a thread hook of the WH\_CALLWNDPROC which is set on some of the top-level windows discovered by the first hook. The two hooks are implemented in different DLLs....
[ 0.22715826332569122, -0.15135593712329865, 0.30353131890296936, -0.0070721167139709, 0.08752710372209549, -0.08646378666162491, 0.24309056997299194, 0.16240108013153076, -0.4180418848991394, -0.762327253818512, 0.05785972625017166, 0.6376249194145203, -0.2593742907047272, 0.179343879222869...
that hooks a discovered window: ``` ... Getting handle, mod, and procHook ... DWORD threadId = GetWindowThreadProcessId(handle, NULL); HHOOK hook = SetWindowsHookEx(WH_CALLWNDPROC, (HOOKPROC)procHook, mod, threadId); if(!PostMessage(handle, CUSTOM_MESSAGE, NULL, NULL)) { ... fetch and print error message ... } ``...
[ 0.04393211379647255, -0.26002195477485657, 0.5652191042900085, -0.3065789043903351, 0.25402602553367615, 0.044163718819618225, 0.15789711475372314, -0.5110272765159607, -0.12755168974399567, -0.4010012149810791, -0.321465402841568, 0.5539565086364746, -0.42719247937202454, 0.00935192871838...
installed and working, as it posts back a bunch of messages in the low teens and twenties (ERASEBACKGROUND, PAINT, etc.). CUSTOM\_MESSAGE is defined as WM\_USER + 314. The message used for Report(...) is WM\_USER + 317. *I have since updated my code to use RegisterWindowMessage to obtain a UINT to send, it was incorr...
[ 0.34744998812675476, -0.06430917978286743, 0.6341573596000671, -0.07427298277616501, 0.09139059484004974, 0.0822824016213417, 0.23308970034122467, -0.051446039229631424, -0.21841563284397125, -0.815496027469635, 0.03952539339661598, 0.4715745747089386, -0.04460983723402023, -0.180472984910...
to only include what I think is relevant. As an aside, is there an agreed upon better way to debug hooks? I've been using the moral equivalent to cout << ... everything by posting messages to an agreed upon window and debugging its WndProc. Thanks, -Kevin Montrose I think I figured it out. Simple case of not quite...
[ 0.6743223667144775, -0.11059108376502991, 0.11568988859653473, 0.08414561301469803, -0.1710081696510315, -0.20148444175720215, 0.2052880823612213, 0.010995827615261078, -0.18833261728286743, -0.4681139588356018, 0.07183854281902313, 0.7085803747177124, -0.39487749338150024, -0.097414605319...
I was hoping to write a python script to create some appropriate environmental variables by running the script in whatever directory I'll be executing some simulation code, and I've read that I can't write a script to make these env vars persist in the mac os terminal. So two things: Is this true? and It seems like ...
[ 0.3459288477897644, 0.35227450728416443, -0.03754177689552307, 0.06247662752866745, 0.2264423370361328, -0.172251895070076, 0.36194100975990295, 0.008676577359437943, -0.32118529081344604, -0.3505924344062805, 0.35300183296203613, 0.7426197528839111, -0.2993062436580658, 0.1181446388363838...
created with fork() it inherits its parent's environment variables. When you set an environment variable in your shell (e.g. bash) like this: ``` export VAR="foo" ``` What you're doing is telling bash to set the variable VAR in its process space to "foo". When you run a program, bash uses fork() and then exec() to ...
[ 0.31481555104255676, -0.026935677975416183, -0.04944208636879921, -0.28007471561431885, 0.09892258793115616, -0.3106488883495331, 0.002305080881342292, -0.11967061460018158, -0.1742573380470276, -0.46752485632896423, -0.01658516563475132, 0.6102755069732666, -0.5588663220405579, 0.55523544...
get the data out of the file: ``` cat .data ``` That prints the data. Now, we want to create a bash command to set that data in an environment variable: ``` export DATA=`cat .data` ``` That command takes the contents of .data and puts it in the environment variable DATA. Now, if you put that inside an alias com...
[ 0.08221093565225601, 0.0018121178727596998, 0.2979176938533783, -0.034732941538095474, 0.20535309612751007, -0.142363503575325, 0.13202476501464844, -0.2928265631198883, -0.28422632813453674, -0.6441792249679565, -0.20704981684684753, 0.8729779720306396, -0.31666749715805054, -0.0096613187...
I was deploying an ASP.NET MVC application last night, and found out that it is less work to deploy with IIS7 set to integrated mode. My question is what is the difference? And what are the implications of using one or the other? Classic mode (the only mode in IIS6 and below) is a mode where IIS only works with ISAPI e...
[ 0.2519851326942444, -0.40376386046409607, 0.535878598690033, -0.22870033979415894, 0.03652942553162575, -0.37151139974594116, 0.38351136445999146, -0.25595083832740784, -0.2790265381336212, -0.7584633827209473, -0.44945722818374634, 0.6805902719497681, -0.5812426805496216, 0.05449915304780...
box (and only when it's needs to give out the request to ASP.NET). In this mode, ASP.NET is not much different from PHP or other technologies for IIS. Integrated mode, on the other hand, is a new mode in IIS7 where IIS pipeline is tightly integrated (i.e. is just the same) as ASP.NET request pipeline. ASP.NET can see ...
[ 0.1123165562748909, -0.6136605739593506, 0.5172445178031921, -0.05171738937497139, -0.3016761243343353, -0.12577135860919952, 0.2437475472688675, -0.35065701603889465, -0.3380776345729828, -0.8003629446029663, -0.28557848930358887, 0.5279372930526733, -0.4630988836288452, -0.06718574464321...
have had and ASP.NET `HttpHandler`s can have nearly equivalent capability as an ISAPI extension could have. In this mode, ASP.NET is basically a part of IIS.
[ 0.5438279509544373, -0.535114049911499, 0.2538332939147949, -0.21772226691246033, -0.31581979990005493, -0.5083358883857727, 0.050110116600990295, -0.03118433989584446, -0.23642729222774506, -0.7230908274650574, -0.3063800036907196, 0.3230304718017578, -0.15460960566997528, 0.1636987626552...
One of the requirements proposed for an ASP.NET application is that we have Session state disabled globally. (This is not negotiable.) Another requirement is that we have some means for user authentication. I'm thinking of using ASP.NET's membership provider model. Is it possible to have user authentication without S...
[ 0.1923965960741043, -0.025659464299678802, 0.2755131721496582, 0.20318058133125305, -0.03726853430271149, -0.5487247109413147, 0.6681876182556152, -0.04950450360774994, -0.5792737603187561, -0.5349708199501038, -0.1935250461101532, 0.33942312002182007, 0.006686373148113489, 0.0519478656351...
not be easily spoofed? Is there built-in functionality in ASP.NET to support this, or will we need to roll our own method? ASP.NET Forms authentication does not use `SessionState`. It uses a cookie to store the authentication ticket. You can also force the authentication ticket to be sent over SSL channel by editing...
[ 0.27290287613868713, -0.0979810506105423, 0.48669204115867615, 0.30222007632255554, 0.09292435646057129, -0.5297076106071472, 0.4919012486934662, -0.2892957329750061, -0.16800963878631592, -0.4576142430305481, -0.05660208687186241, 0.4310200810432434, -0.385966420173645, -0.120648920536041...
I am trying to profile and optimize algorithms and I would like to understand the specific impact of the caches on various processors. For recent Intel x86 processors (e.g. Q9300), it is very hard to find detailed information about cache structure. In particular, most web sites (including [Intel.com](http://www.intel.c...
[ 0.2597789466381073, 0.21131537854671478, -0.07813751697540283, -0.12776429951190948, 0.09946494549512863, 0.23401321470737457, -0.0704912319779396, 0.1299794465303421, -0.24299223721027374, -0.7181677222251892, -0.14214543998241425, 0.21250560879707336, -0.22757543623447418, 0.127189248800...
in the answers below), I have concluded that my Q9300 seems to have a 32K L1 data cache. I still haven't found a clear explanation as to why this information is so difficult to come by. My current working theory is that the details of L1 caching are now being treated as trade secrets by Intel. It is near impossible to ...
[ 0.5136634707450867, 0.5146821737289429, -0.3064050078392029, 0.023023566231131554, 0.14307241141796112, -0.030482295900583267, 0.1903925985097885, 0.3732582628726959, -0.2239745557308197, -0.48275086283683777, -0.12047842890024185, 0.22071081399917603, -0.13066905736923218, 0.2918553054332...
systems, you can squeeze lots of information out of the kernel: ``` grep . /sys/devices/system/cpu/cpu0/cache/index*/* ``` This will give you associativity, set size, and a bunch of other information (but not latency). For example, I learned that although AMD advertises their 128K L1 cache, my AMD machine has a spli...
[ 0.21854200959205627, 0.18948742747306824, 0.06948068737983704, 0.2543943524360657, 0.06135832145810127, 0.29625576734542847, 0.23970086872577667, 0.3555155098438263, -0.48684069514274597, -0.7805077433586121, -0.21413390338420868, 0.5340257883071899, -0.17858421802520752, 0.054259501397609...
all sorts of cache models inside it, and it is invaluable for profiling and understanding cache behavior. It comes with a very nice visualization tool `kcachegrind` which is part of the KDE SDK. --- For example: in Q3 2008, AMD [K8](http://www.7-cpu.com/cpu/K8.html)/[K10](http://www.7-cpu.com/cpu/K10.html) CPUs use 6...
[ -0.12726344168186188, -0.18699787557125092, 0.2600597143173218, -0.14989309012889862, -0.06310459226369858, 0.48971617221832275, -0.06157898157835007, 0.14814171195030212, -0.39720094203948975, -0.6125237345695496, -0.33868685364723206, 0.15267431735992432, -0.17339752614498138, -0.0522314...
for a long time (from Pentium M to [Haswell](http://www.realworldtech.com/haswell-cpu/5/) to Skylake, and presumably many generations after that): Split 32kB each I and D caches, with L1D being 8-way associative. 64 byte cache lines, matching the burst-transfer size of DDR DRAM. Load-use latency is ~4 cycles. Also see...
[ 0.40022119879722595, -0.05261170491576195, 0.2419700175523758, -0.22140471637248993, -0.05936315283179283, 0.4736528694629669, 0.12227848917245865, -0.017014281824231148, -0.28927966952323914, -0.4200368821620941, -0.17130470275878906, 0.017036374658346176, 0.060774728655815125, 0.18467104...
I am trying to detect whether the 'a' was entered as the first string argument. ``` public class YourClass { public static void main(String[] args) { if (args.length > 0 && args[0].equals("a")){ //... } } } ```
[ -0.07681086659431458, 0.13086865842342377, 0.30673208832740784, -0.3642319142818451, 0.0178461242467165, -0.07276304811239243, 0.6169787645339966, -0.050867993384599686, -0.02858719974756241, -0.40110594034194946, -0.10517098009586334, 0.4536225497722626, -0.4094299376010895, 0.26747217774...
I'm trying to find a LINQ oneliner that takes a Dictionary<String,Int> and returns a Dictionary<String,SomeEnum>....it might not be possible, but would be nice. Any suggestions? EDIT: ToDictionary() is the obvious choice, but have any of you actually tried it? On a Dictionary it doesn't work the same as on a Enumerab...
[ 0.13159914314746857, -0.01209529023617506, 0.4321839511394501, -0.05204729735851288, -0.05491490662097931, 0.17568349838256836, 0.1763400435447693, -0.1272711455821991, 0.087506964802742, -0.6781244874000549, 0.182180255651474, 0.6907346844673157, -0.23268552124500275, -0.08843560516834259...
item => (SomeEnum)item.Value); ``` --- I used this test and it does not fail. ``` using System; using System.Collections.Generic; using System.Linq; using System.Diagnostics; namespace DictionaryEnumConverter { enum SomeEnum { x, y, z = 4 }; class Program { static void Main(string[] args) ...
[ -0.13026173412799835, -0.1487320065498352, 0.5825494527816772, -0.34525665640830994, 0.0503186397254467, 0.49666163325309753, 0.4059986174106598, -0.023231539875268936, -0.03600287064909935, -0.43643859028816223, -0.3409566283226013, 0.3609648644924164, -0.23695145547389984, 0.491959095001...
input.Add("a", 0); input.Add("b", 1); input.Add("c", 4); Dictionary<String, SomeEnum> output = input.ToDictionary( pair => pair.Key, pair => (SomeEnum)pair.Value); Debug.Assert(output["a"] == SomeEnum.x); Debug.Assert(output["b"]
[ 0.09811742603778839, -0.2679511308670044, 0.11158554255962372, -0.4277516305446625, -0.06409447640180588, 0.3509844243526459, 0.5281131267547607, -0.27210715413093567, 0.16608652472496033, -0.13606975972652435, -0.2006548047065735, 0.5891133546829224, -0.29451125860214233, 0.12697847187519...
== SomeEnum.y); Debug.Assert(output["c"] == SomeEnum.z); } } } ```
[ 0.3055238127708435, 0.12786555290222168, -0.06023966893553734, -0.18039748072624207, 0.1472054421901703, -0.04589155316352844, 0.5449578762054443, 0.022679803892970085, 0.17843537032604218, 0.028085682541131973, -0.2916997969150543, 0.701554536819458, -0.0893743559718132, 0.483755320310592...
I have a TabControl with TabPage1 and TabPage2, In TabPage1, there is another TabControl1 with 2 Items TabPage11 and TabPage12. In TabPage2, there is another TabControl2 with 2 Items TabPage21 and TabPage22. Each item (TabPage11 , TabPage12, TabPage21 and TabPage22) has its own View (in form of UserControl) and Vi...
[ -0.30494558811187744, -0.24101148545742035, 0.6399806141853333, 0.10222052782773972, -0.44317856431007385, 0.4060148000717163, 0.0044589564204216, 0.0760427936911583, -0.21978163719177246, -0.7249066829681396, -0.07044041901826859, 0.3904443085193634, -0.2866845726966858, 0.044410143047571...
processed. The problem is that the button on the mainWindow does't know how to tell the ViewModel of selected tabItem to export it. Any Suggestions? Thanks in advance! Steve It works straight forward with a simple cast. ``` Dictionary<String, Int32> input = new Dictionary<String, Int32>(); // Transform input Di...
[ -0.024713870137929916, -0.1193830668926239, 0.44154858589172363, -0.022939465939998627, 0.02170032262802124, 0.21973396837711334, 0.2644921839237213, -0.02324679121375084, -0.08104922622442245, -0.6390427350997925, 0.12869994342327118, 0.5400042533874512, -0.06046372279524803, 0.0995937436...
Main(string[] args) { Dictionary<String, Int32> input = new Dictionary<String, Int32>(); input.Add("a", 0); input.Add("b", 1); input.Add("c", 4);
[ -0.4044795632362366, -0.1119297593832016, 0.5273193120956421, -0.6536403298377991, -0.02647390030324459, 0.38973239064216614, 0.25154414772987366, 0.026826616376638412, -0.053611163049936295, -0.2508402466773987, -0.6837487816810608, 0.3877357542514801, -0.6311389803886414, 0.2006293833255...
Dictionary<String, SomeEnum> output = input.ToDictionary( pair => pair.Key, pair => (SomeEnum)pair.Value); Debug.Assert(output["a"] == SomeEnum.x); Debug.Assert(output["b"] == SomeEnum.y); Debug.Assert(output["c"] == SomeEnum.z); } } } ```
[ 0.09519737213850021, -0.16859717667102814, 0.1440335363149643, -0.2509472966194153, -0.08058449625968933, 0.2430572807788849, 0.5545598268508911, 0.15659457445144653, 0.38289594650268555, -0.29837948083877563, -0.19837860763072968, 0.6311423778533936, -0.18890124559402466, 0.13829831779003...
What do you consider a fair, yet profitable hourly wage for routine updates/management (ie - information, maintenance, database management) for your average site? What factors do you use to set that rate? As a reference...I usually quote around $25/hour...am I getting ripped? EDIT: Initially I was hoping for this to...
[ 0.9940208196640015, 0.0299244187772274, -0.0016128013376146555, 0.06455022841691971, 0.13214999437332153, -0.16589176654815674, 0.49573183059692383, 0.728265643119812, -0.10903897881507874, -0.45647817850112915, 0.1358405500650406, 0.21634835004806519, 0.06951083242893219, -0.2733183205127...
a little bit more than what you normally would. P.S. When in doubt about how much to charge... overcharge! $$$ ;-)
[ 0.4211530089378357, -0.133235365152359, 0.41425690054893494, 0.39576953649520874, 0.2767655551433563, -0.17321951687335968, 0.13821463286876678, 0.10166952013969421, -0.2701811194419861, -0.32317277789115906, 0.2479948103427887, 0.704279363155365, 0.22871741652488708, 0.06252806633710861, ...
I'm using the module pattern in Javascript to separate my public interface from the private implementation. To simplify what I'm doing, my code generates a chart. The chart consists of multiple parts (axises, labels, plot, legend, etc.) My code looks like: ``` var Graph = function() { var private_data; function dr...
[ 0.302391916513443, -0.16502614319324493, 0.6717308759689331, 0.05132629722356796, -0.024524297565221786, 0.18978945910930634, -0.07462981343269348, -0.3494793176651001, -0.3187137544155121, -0.732090413570404, 0.11207081377506256, 0.22730617225170135, -0.38965845108032227, 0.20730401575565...
draw_legend() draw_plot() } } } ``` Some people advocate only testing the public interface of your classes, which makes sense, but I'd really like to get in some tests to test each of the components separately. If I screw up my draw\_legend() function, I'd like that test to fail, not a test for the public...
[ 0.6472365856170654, 0.08262207359075546, 0.047216661274433136, 0.16470053791999817, -0.004829098004847765, -0.03945569694042206, 0.19514469802379608, -0.2206963747739792, 0.013094345107674599, -0.5703014135360718, 0.3598710894584656, 0.632138729095459, -0.33470141887664795, 0.0803614184260...
code, and it would be uglier because I'd need to pass in a bunch of private state. And I wouldn't be able to test my helper functions. Should I do this anyway? Should I suck it up and only test the public draw()? Or is there some other solution? There is no way to access inner functions (private) from an outer scope. I...
[ 0.753420889377594, 0.21696506440639496, -0.0963967889547348, 0.3757823705673218, -0.2077958732843399, 0.07960360497236252, 0.6139093637466431, -0.13347390294075012, -0.11439378559589386, -0.49584007263183594, 0.04845452308654785, 0.5635625123977661, -0.48439279198646545, -0.135594114661216...
and remove those test functions. Actually Javascript is an Object oriented language. It's just not a statitcally typed one.
[ 0.39643049240112305, -0.0021864548325538635, -0.2756885290145874, 0.291237473487854, -0.35237908363342285, -0.3313598930835724, 0.22434531152248383, 0.13694092631340027, 0.17070822417736053, -0.33056649565696716, 0.011728628538548946, 0.4842897355556488, -0.646698534488678, -0.152376800775...
What is the best way to write a callback? I only need to call 1 function that has the sig of void (string, int); and this would need to invoke a class since i have member objs that i need to process. Whats the best way to write this? in C i would do pass a func pointer and an void\*obj. i dislike that and i suspect the...
[ -0.035109467804431915, -0.18981902301311493, 0.3114367127418518, 0.10637443512678146, -0.2099013328552246, -0.2167273610830307, -0.2536430060863495, -0.12284223735332489, -0.2621038556098938, -0.40276211500167847, -0.031157316640019417, 0.6938859224319458, -0.2996581792831421, -0.123751230...
provides a very powerful, clean way of handling callbacks.
[ -0.11552469432353973, -0.07426539063453674, 0.15516507625579834, 0.0678597018122673, 0.16555887460708618, -0.1448369324207306, -0.006874264683574438, 0.06140062212944031, -0.05159571021795273, -0.38970813155174255, -0.46026360988616943, 0.4451235234737396, 0.1057831346988678, -0.0506937876...
Does the project - <https://github.com/TroyGoode/MembershipStarterKit> - work with the latest release of RC 1.0 ? Does anyone know whether its been upgraded or ? i.e. seems the source hasn't been upgraded in a while and I thought it was being actively developed? Just wondering if anyone has implemented it, got it wor...
[ 0.8213561773300171, 0.003707235911861062, 0.44339945912361145, 0.1680717021226883, -0.12622322142124176, -0.052094317972660065, 0.0023757133167237043, -0.16621394455432892, -0.4219929873943329, -0.40570712089538574, 0.31171974539756775, 0.6080350875854492, 0.10967524349689484, -0.112716034...
performance, but I think a single one shouldn't hurt anybody. But beware: It may look right now, but you simply can't display as much information with 640x480 as with 1600x1200... The most elegant solution is to use resolution dependent templates which are demonstratet in the [Photo Suru app](http://www.photosuru.com/...
[ 0.008213351480662823, -0.20504571497440338, 0.3490840792655945, 0.3688523769378662, -0.05237657576799393, 0.07269807904958725, -0.05497317388653755, -0.4643469750881195, -0.5542267560958862, -0.745936393737793, -0.004488860256969929, 0.5460545420646667, 0.15776093304157257, -0.009565602988...
I think we all understand the necessity of `delete` when reassigning a dynamically-allocated pointer in order to prevent memory leaks. However, I'm curious, to what extent does the C++ mandate the usage of `delete`? For example, take the following program ``` int main() { int* arr = new int[5]; return 0; } ...
[ 0.09994952380657196, 0.21146348118782043, 0.1624671369791031, -0.18326866626739502, 0.17255942523479462, -0.2575238347053528, 0.2914964556694031, 0.13491712510585785, -0.2949216067790985, -0.14627763628959656, -0.43879956007003784, 0.6705631017684937, -0.15734048187732697, 0.41871115565299...
would there be any other reason why you would `delete[]` here? There is nothing that requires a `delete[]` in the standard - However, I would say it is a very good guideline to follow. However, it is better practice to use a `delete` or `delete[]` with every `new` or `new[]` operation, even if the memory will be clean...
[ 0.3546125888824463, 0.11709822714328766, -0.05465412139892578, 0.16807921230793, 0.1640494018793106, -0.2857518792152405, 0.659416913986206, -0.08280599117279053, -0.4566487967967987, -0.4188699722290039, -0.3761058747768402, 0.7705220580101013, -0.19144143164157867, 0.24072517454624176, ...