text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
make it easier to replace functionality in a system. For instance, we've gone through several different tape libraries on our system and now we are considering going to disk archives in the future. Since the "archive" portion of our system sits behind an abstraction layer, we can replace it fairly easily without replac...
[ 0.5963274240493774, 0.08343436568975449, -0.09230142086744308, 0.5902352333068848, 0.524284303188324, -0.2922351062297821, -0.19286340475082397, -0.009129328653216362, -0.527779221534729, -0.6549598574638367, 0.06804011762142181, 0.7281922698020935, -0.0378170870244503, 0.227082759141922, ...
I have setup a property and implement INotifyPropertyChanged like so... ``` public event PropertyChangedEventHandler PropertyChanged; public FlowProcess LastSelectedFlowProcess { get { return _lastSelectedFlowProcess; } set { _lastSelectedFlowProcess = value; Notify("LastSelectedFlowProce...
[ 0.1491757035255432, -0.3907107412815094, 0.9628474116325378, -0.17315533757209778, 0.2763306498527527, -0.2355564534664154, 0.37043678760528564, -0.3772789537906647, -0.2812827229499817, -0.6647676229476929, -0.06276745349168777, 0.6788245439529419, -0.030313069000840187, 0.186139151453971...
back null. In other classes when this works the PropertyChanged event is not null and evaluates to a delegate? What am I missing here? I am calling the public accessor from inside the class would that make a difference? Whether the delegate is null or not depends on whether anything has subscribed to the event.
[ 0.07775615155696869, -0.1315387338399887, -0.2116100788116455, 0.26540711522102356, -0.3601553440093994, -0.14785632491111755, 0.3409740924835205, 0.10275409370660782, -0.2899721562862396, -0.3354111313819885, 0.0011059363605454564, 0.4508117735385895, -0.12907667458057404, 0.3731976449489...
I have the following Rails migration which works perfectly (irrelevant pieces removed): ``` create_table :comments do |t| t.text :body t.references :post end ``` Now I'd like to add an `author` column to my `comments` table (which is the userid of a user), but I have no idea how to do it (I'm tempted to just wri...
[ 0.2154914289712906, 0.34459826350212097, 0.244760662317276, -0.07066304236650467, -0.14309822022914886, -0.08731323480606079, 0.3043646514415741, -0.07200182974338531, -0.24784262478351593, -0.7260987162590027, 0.16856583952903748, 0.5113460421562195, -0.46751126646995544, 0.13901732861995...
actually establish relationships between the tables? While it's too late to get any points out of this, I thought I'd post the best way for posterity :) use `change_table` instead of `create_table` to add columns to a table that already exists, with all the TableDefinition goodness: ``` self.up do change_table :com...
[ 0.4551568925380707, 0.3286040425300598, 0.38559094071388245, 0.18503688275814056, 0.06282351166009903, -0.2022283375263214, 0.29147881269454956, -0.08645815402269363, -0.20079617202281952, -0.625404417514801, 0.3023735284805298, 0.24969659745693207, -0.07099274545907974, 0.0216984879225492...
This has always confused me. It seems like this would be nicer: ``` ["Hello", "world"].join("-") ``` Than this: ``` "-".join(["Hello", "world"]) ``` Is there a specific reason it is like this? It's because any iterable can be joined (e.g, list, tuple, dict, set), but its contents and the "joiner" *must be* string...
[ -0.3247531056404114, 0.13417603075504303, 0.3031352758407593, -0.11683870106935501, -0.16213905811309814, -0.16691873967647552, 0.4120227098464966, -0.16998061537742615, -0.16943274438381195, -0.33185189962387085, -0.5169464945793152, 0.19723215699195862, -0.46893176436424255, 0.3533139824...
Whenever I try to copy an entire working copy using simple drag and drop between two computers (e.g. from an old computer to a new one, or from one VM to another) in order to avoid having to redownload the entire several GB set of code from our online repository I get an error as soon as I reach any of the hidden SVN-B...
[ 0.5292768478393555, 0.5452074408531189, 0.2927379310131073, 0.1980126053094864, 0.12682393193244934, -0.19439682364463806, 0.22169916331768036, 0.07416148483753204, -0.3853764235973358, -0.5480387210845947, 0.00012548326049000025, 0.7106812596321106, -0.18843379616737366, 0.289513051509857...
are hidden and so do not need to be copied, or they're locked and not available for copying. In the former, make them un-hidden (with the global file options in explorer's Organise menu, under folder & Search options, view tab), in the latter, try stopping TortoiseSVN's cache which might be holding on to them. or try ...
[ 0.19184085726737976, -0.12602005898952484, 0.5029855966567993, 0.1895422637462616, 0.612650454044342, -0.10588651895523071, 0.27529045939445496, 0.17211049795150757, -0.5683774948120117, -0.26666224002838135, -0.7751006484031677, 0.5499292612075806, -0.021741051226854324, 0.015272079966962...
For what reason(s) should WCF return me a "empty" instantiated object when it was clearly populated on my WCF service return before it went over the wire? For instance a simple `OperationContract` method: ``` response.Client = new Client(); response.Client.ID = 99; return response; ``` returns an "empty" Client obj...
[ -0.0917675793170929, 0.043636493384838104, 0.515723466873169, -0.2393421232700348, -0.179245263338089, -0.10147567838430405, 0.5368185639381409, -0.27897873520851135, -0.2326785922050476, -0.5659864544868469, -0.08558329939842224, 0.6052207350730896, -0.4247762858867645, 0.4387831091880798...
I have found the fix. Due to business requirements I had marked my custom class with both `[Serializable]` and `[DataContract]`, this appears to be illegal possibly as of .NET 3.5 SP1? I have a friend who is sending WCF objects with both these attributes pre .NET 3.5 SP1 and it is working fine. Interesting. FYI, I si...
[ 0.12823116779327393, -0.002363908104598522, 0.5431409478187561, 0.1888057291507721, -0.07143128663301468, -0.2619849741458893, 0.5491300821304321, 0.18952278792858124, -0.460213840007782, -0.5010107755661011, 0.10192137956619263, 0.6055102348327637, -0.41179677844047546, 0.1582426875829696...
I've got a series of tabs on a page. The tabs are set to relative position. They are then moved 15px to the left. The resulting style looks like this: ``` style="position:relative;left:-15px" ``` (note that each tab's left is going to be -15 \* tab number - so #2 will be -15, #3 is -30, etc.) This gives the tabs a ...
[ 0.336713969707489, 0.07143749296665192, 1.0049638748168945, -0.1410742700099945, -0.06537626683712006, 0.1510331928730011, 0.05196857452392578, 0.02765972539782524, -0.34075185656547546, -0.7503179907798767, -0.2625766098499298, 0.16943241655826569, 0.04603184387087822, 0.2545183002948761,...
of nudging the `<li>`s with 'position: relative', you could apply this to each tab (except for the first tab): ``` margin-left: -15px; ``` **EDIT:** Example of the concept... ``` <div style="text-align:center;"> <img src="http://www.google.com/intl/en_ALL/images/logo.gif" /> <img style="margin-left: -54px;" src="ht...
[ -0.4086550176143646, 0.03338494896888733, 0.6030864715576172, -0.0009524432825855911, -0.2988283634185791, 0.11107270419597626, -0.4647689461708069, -0.3548339009284973, 0.03195245936512947, -0.5586787462234497, 0.017498819157481194, 0.19191230833530426, -0.020827632397413254, 0.0955182015...
I am doing the exact same thing in two classes, and in one the compiler is allowing it just fine, but the other one is giving me an error. Why the double standard? There's 15 classes using this same pattern, but only one refuses to compile, saying the following error: > 'AWWAInvoicingXML.AwwaTransmissionInfo' > does ...
[ 0.35863715410232544, 0.05839141458272934, 0.2157890349626541, -0.2359081208705902, -0.33738973736763, 0.06255359202623367, 0.608279287815094, -0.2957405149936676, 0.040304411202669144, -0.5573340654373169, 0.18051181733608246, 0.5297397971153259, -0.3493707776069641, 0.1974828839302063, ...
those where the compiler is just dying after the first error. And I know, I know, there's built-in stuff for what I'm trying to do here, but just assume I actually know what I'm doing and skipped the built-in serializers for a reason :) ``` public interface IXmlSerializable { //if this interface is implemented...
[ -0.0755775198340416, -0.09463996440172195, 0.5294725894927979, 0.10233124345541, -0.06680631637573242, 0.11924654990434647, 0.33547428250312805, 0.013789980672299862, 0.05652904883027077, -0.7754283547401428, -0.3296457529067993, 0.624865710735321, -0.5673941373825073, 0.1054111197590828, ...
string toXML() { throw new Exception("The method or operation is not implemented."); } public AwwaTransmissionInfo fromXML(XmlDocumentFragment inXml) { throw new Exception("The method or operation is not implemented."); } } public class CEmail { public string Email = ""; public s...
[ 0.23678667843341827, 0.04786181449890137, 0.3305954039096832, -0.09017732739448547, -0.07938938587903976, -0.062353093177080154, 0.19743704795837402, -0.06368327885866165, 0.23631201684474945, -0.4574483335018158, -0.44754770398139954, 0.34779176115989685, -0.5927689075469971, 0.1203320100...
throw new System.Exception("The method or operation is not implemented."); } } ``` The reason the CEmail class was compiling fine is because it was not marked as implementing the interface. When I marked it as such, I got the same error as the other class. The following is how it has to be... I am pretty stupid fo...
[ 0.6038046479225159, 0.33923959732055664, 0.04286142811179161, 0.021489212289452553, -0.24215708673000336, -0.34757480025291443, 0.4931282699108124, 0.056297216564416885, 0.05163276195526123, -0.7085599899291992, 0.2597489058971405, 0.40809449553489685, -0.4641008973121643, 0.41055938601493...
always is I guess :) ``` public interface IXmlSerializable { //if this interface is implemented, the object can be serialized to XML string toXML(); IXmlSerializable fromXML(XmlDocumentFragment inXml); } public class AwwaTransmissionInfo : IXmlSerializable { public DateTime DateTime = DateTime.No...
[ -0.045022401958703995, -0.4282619059085846, 0.62948077917099, 0.05147906765341759, 0.21908104419708252, 0.08636415749788284, 0.16494932770729065, -0.0862608477473259, 0.0642317607998848, -0.5277270078659058, -0.33712509274482727, 0.592407763004303, -0.5096465349197388, -0.09321481734514236...
new Exception("The method or operation is not implemented."); } } public class CEmail : **IXmlSerializable** { public string Email = ""; public string toXML() { throw new System.Exception("The method or operation is not implemented."); } public IXmlSerializable fromXML(XmlDocumentFragmen...
[ -0.11749675124883652, 0.20828188955783844, 0.539520800113678, -0.05002989247441292, -0.12349789589643478, 0.03862137347459793, 0.196798637509346, 0.1510760635137558, -0.022445686161518097, -0.6886531710624695, -0.5536376237869263, 0.1555577665567398, -0.5861485600471497, 0.4045532643795013...
I've designed an MVC (in .NET) where the View has no link to the Model. It only knows about the Controller. The traditional MVC pattern has all parts communicating with each other. In my case, the Controller is basically a mediator. This keeps any exceptions or logic out of the View. It has zero dependency on the Model...
[ 0.14687703549861908, -0.16774292290210724, 0.8390302658081055, -0.3244934380054474, -0.19468915462493896, 0.05829454958438873, 0.05706527829170227, -0.33413365483283997, -0.37872445583343506, -0.6285042762756348, 0.0012211042921990156, 0.38668742775917053, -0.5370960831642151, 0.4168619513...
that > handles display and a controller that > responds to user gestures. **The > significant change with Passive View > is that the view is made completely > passive and is no longer responsible > for updating itself from the model.** As > a result all of the view logic is in > the controller. As a result, the...
[ -0.1359374076128006, -0.295538067817688, 0.7120295763015747, -0.3745107650756836, -0.24733607470989227, 0.2928052246570587, 0.2992706000804901, -0.47782984375953674, -0.28586843609809875, -0.8050094842910767, 0.05719943717122078, 0.42721810936927795, -0.4009194076061249, 0.2247105389833450...
I've recently switched from storing session data in a cookie to storing it in the database. Now every POST request causes an **ActionController::InvalidAuthenticityToken** error. It only happens in Firefox, and only on my home machine (I tried it out at work today in the same version of FF and everything was fine). Th...
[ 0.4162043333053589, 0.567937433719635, 0.4667932689189911, -0.03390146791934967, 0.2588573396205902, -0.49257779121398926, 0.9682266116142273, -0.06390295177698135, -0.42320701479911804, -0.7639746069908142, -0.028846057131886482, 0.9655919671058655, -0.3445205092430115, 0.0972947627305984...
characters and all random, # no regular words or you'll be exposed to dictionary attacks. config.action_controller.session = { :session_key => '_basillslam_session', :secret => '373ee5b69a4a31d3318485fs368c41fac6b797a1f5c35693b49bd34e8a96291b92dd577bd49de7aeea56c9ffa1af2d8386bafe857220cafacfa0028f01be357d78' } #...
[ -0.5135079026222229, -0.06102051958441734, 0.22270062565803528, -0.1297338753938675, -0.08807720988988876, 0.603011965751648, 0.47778406739234924, -0.4622170925140381, -0.13266228139400482, -0.4060917794704437, -0.1327812224626541, 0.5551097989082336, -0.2985129952430725, -0.39083728194236...
thing happened to me when I switched one of my sites. Delete the Rails session cookie for that site in your home Firefox Browser. It only happens if you had a pre-existing session that used the cookie store. So, hopefully, only you and your browser will ever see the issue. After you've deleted the cookie, you'll never...
[ 0.2660164535045624, 0.13265341520309448, 0.2241174280643463, 0.14665205776691437, 0.12832129001617432, -0.29922324419021606, 0.9238215684890747, 0.25653716921806335, -0.36721542477607727, -0.5437204241752625, 0.24335819482803345, 0.6573753356933594, -0.07969113439321518, 0.2171559929847717...
I almost never hear the word CakePHP without hearing the word Rails shortly afterwards. Are these two frameworks mainly similar based on how they adhere to the MVC model or do they have other significant similarities/differences? One of the main attractions of Rails for me is how easy it is to do Ajax. Would that als...
[ 0.2834888994693756, -0.19583334028720856, -0.13757075369358063, 0.38004279136657715, -0.5090848207473755, -0.3893040716648102, 0.19016820192337036, 0.4587078094482422, -0.060160696506500244, -0.7859594225883484, 0.2892710566520691, 0.5539652109146118, -0.276108980178833, -0.228785157203674...
Ajax-related helper methods in Rails, so yes, in some way, it's also true. But CakePHP is really an exercise in futility: its authors wrote it so they wouldn't have to learn Ruby, even though learning Ruby and Rails together is probably easier than figuring out the monstrous mess that is CakePHP. (This, coming from s...
[ 0.1699424833059311, 0.2057919055223465, -0.2639573812484741, 0.0924667939543724, -0.47293567657470703, -0.3515263497829437, 0.3436140716075897, 0.5342094302177429, -0.08548495918512344, -0.6359586715698242, 0.21126694977283478, 0.44139090180397034, -0.22796018421649933, -0.1966498196125030...
feel like any logical person would implement an ORM using faulting and dynamic loading of properties in to objects, which is exactly what ActiveRecord (the Rails library) does. The whole idea of setting a member variable called `$recursive` to determine which relationships to load is just plain flawed. Being based on ...
[ -0.01906316541135311, 0.13814033567905426, 0.036367304623126984, 0.15259794890880585, -0.05281265079975128, -0.16258332133293152, 0.6052945256233215, -0.008665086701512337, -0.12415417283773422, -0.43374618887901306, 0.09709670394659042, 0.5913873910903931, -0.4718036353588104, -0.03871898...
CakePHP equivalents, last I checked. I admit to being without data on this. Worst of all, the bugs in CakePHP just about kill it for me. I could tell any number of stories about * the time we spent two days figuring out why CakePHP refused to connect to the right database host * the time half of our pages went blank ...
[ 0.09807965904474258, 0.013943027704954147, 0.09248632937669754, 0.2618199586868286, -0.3247760534286499, -0.03711782023310661, 0.5597499012947083, 0.38898909091949463, -0.2678811252117157, -0.7645361423492432, 0.07633393257856369, 0.21995443105697632, -0.29979655146598816, 0.16489352285861...
how we traced down the blank `<javascript>` tag that shows up at the end of every page
[ 0.3126109540462494, 0.22928451001644135, 0.023661501705646515, 0.07088161259889603, 0.08392681181430817, -0.09941720217466354, 0.09763740748167038, 0.14850032329559326, -0.03654811158776283, -0.38561761379241943, 0.00023406269610859454, 0.11952798068523407, 0.15517346560955048, -0.17662179...
This question has always been around my head. Can someone create a new product based on an existing open source project? Say you want to create an "Apaxe webserver" that is basically Apache with your some extra plugins ( say support for ASP or something similar ) Is this possible? Would you be able to create a clo...
[ 0.7301256656646729, 0.30286705493927, 0.05623193457722664, 0.4436476230621338, -0.22272035479545593, -0.31576529145240784, -0.04538653418421745, -0.05782891809940338, -0.14100098609924316, -0.24789871275424957, 0.15955540537834167, 0.47930827736854553, -0.2666800320148468, 0.29660186171531...
fixes and counting with the core development team the only thing that prevent from others to commercialize those OS products? What about: Khrome a commercial product based on Chrome with ActiveX support ( who would dare to do such a thing :P ) **EDIT** Thank you all you all for your answers. So, again ***What pre...
[ 0.7734895944595337, 0.47422054409980774, 0.11616776883602142, 0.1484432965517044, 0.17438839375972748, -0.1774822324514389, 0.048197053372859955, -0.008009489625692368, -0.12347254902124405, -0.3955375552177429, 0.09181589633226395, 0.7633057832717896, -0.2019699662923813, 0.30667275190353...
from XFree86. And so on. It happens relatively infrequently, though, for a couple of reasons: * The original project has the first-to-market advantage * The original is usually being given away free So unless your version is significantly better than the original, you're not going to get much uptake or make much mon...
[ 0.8204225301742554, 0.13081622123718262, 0.02921130135655403, 0.07617463916540146, -0.04166064411401749, -0.6584960222244263, 0.11656688898801804, 0.11218900978565216, -0.21211214363574982, -0.3069165050983429, -0.30766499042510986, 0.649846613407135, -0.14840468764305115, 0.31340047717094...
Now this must be easy, but how can sum two `NSNumber`? Is like: ``` [one floatValue] + [two floatValue] ``` or exist a better way? There is not really a better way, but you really should not be doing this if you can avoid it. `NSNumber` exists as a wrapper to scalar numbers so you can store them in collections and p...
[ -0.07335317134857178, -0.07382502406835556, 0.11791183054447174, 0.18970328569412231, -0.4320744574069977, -0.053901758044958115, 0.1136569082736969, -0.2548827826976776, -0.35406091809272766, -0.5599705576896667, 0.3113396167755127, 0.328241229057312, -0.14078153669834137, 0.1185865923762...
for it. For example: ``` NSNumber *sum = [NSNumber numberWithFloat:([one floatValue] + [two floatValue])]; ``` Is blowing at a minimum 21 instructions on message dispatches, and however much code the methods take to unbox the and rebox the values (probably a few hundred) to do 1 instruction worth of math. So if yo...
[ 0.11688479781150818, -0.10431870073080063, 0.2617835998535156, -0.07882354408502579, -0.202275350689888, 0.12211588025093079, 0.3178708255290985, -0.40354102849960327, -0.06157394498586655, -0.5549604296684265, 0.1566942036151886, 0.5575565099716187, -0.13082529604434967, -0.31447887420654...
I would like to create a `String.replaceAll()` method in JavaScript and I'm thinking that using a regex would be most terse way to do it. However, I can't figure out how to pass a variable in to a regex. I can do this already which will replace all the instances of `"B"` with `"A"`. ``` "ABABAB".replace(/B/g, "A"); `...
[ 0.05312325805425644, 0.3115136921405792, -0.0213463194668293, -0.2547009289264679, -0.11349683254957199, 0.16537953913211823, 0.3814028203487396, -0.2815338671207428, 0.058579638600349426, -0.6916957497596741, 0.10028522461652756, 0.47958147525787354, -0.8279080986976624, 0.218466043472290...
[RegExp](https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Regular_Expressions) object: ``` var replace = "regex\\d"; var re = new RegExp(replace,"g"); ``` You can dynamically create regex objects this way. Then you will do: ``` "mystring1".replace(re, "newstring"); ```
[ 0.028559677302837372, -0.22247907519340515, 0.775053858757019, -0.05509580299258232, 0.14970088005065918, -0.06024906039237976, 0.2970089316368103, -0.12307150661945343, -0.46859440207481384, -0.47416016459465027, -0.5675864815711975, 0.6374030113220215, -0.9544851779937744, 0.071183405816...
I received a dotnetnuke 3.0.12 installation in a zip file and made a web site under c:\inetpub\wwwroot and copied the files. When I access default.aspx, I get the error: Could not load type 'DotNetNuke.Common.Global'. You might be missing an assembly, if the installation has the source files, try loading up the proje...
[ 0.38679882884025574, -0.13932682573795319, 0.2868163287639618, -0.33516719937324524, 0.3335704803466797, -0.027657827362418175, 0.40471696853637695, 0.3920804560184479, -0.2513405680656433, -0.8690924048423767, 0.023526765406131744, 0.68461674451828, -0.6282615065574646, 0.2473393678665161...
Why is the Objective-C object type called 'id'? As opposed to, say, 'object'? It is called id because that, literally, is all the type represents - an identifier. Quoting Brad Cox from [Object Oriented Programming: an Evolutionary Approach](https://rads.stackoverflow.com/amzn/click/com/0201548348) (actually, the firs...
[ 0.2696533799171448, 0.08515600115060806, -0.43809449672698975, 0.2753865718841553, 0.0754275992512703, -0.017229532822966576, -0.30371394753456116, 0.018247732892632484, -0.29937946796417236, -0.2979920506477356, -0.04470296576619148, 0.3458192050457001, -0.3776380121707916, 0.005040900781...
I have a Perl app that runs some perforce operations, in the end I would like it to upload the results to SharePoint website. * What is the simplest Perl script that can accomplish a task of adding a document to SharePoint? The script would need to run on Solaris and use as few as possible external libraries as poss...
[ 0.5447360277175903, -0.1483631432056427, 0.32095837593078613, 0.3118205964565277, -0.4110310971736908, -0.1653137058019638, -0.010088721290230751, 0.20500095188617706, -0.24799694120883942, -0.5583106279373169, 0.14453913271427155, 0.5801171660423279, -0.26673346757888794, -0.1168072894215...
I am looking for 1 or a couple liner that's easy to understand. UPDATES based on comments: * Perl Mechanize sounded like a good idea, but for some reason I am not able to authenticate, Error GETing `http://sharepoint Unauthorized ....` I had this: ``` my $m = WWW::Mechanize->new(); $m->credentials($user => $pass);...
[ 0.3972100019454956, 0.33584514260292053, 0.43373918533325195, -0.0142283970490098, -0.07156261056661606, -0.29627421498298645, 0.38767316937446594, -0.3424396514892578, 0.03240970894694328, -0.7328258752822876, 0.08469976484775543, 0.5392711758613586, -0.12273258715867996, 0.22341997921466...
webdav approach with perl on unix? Just found an easy way on windows from perlmonks forum: ``` http://www.perlmonks.org/?node_id=527182 under Windows, you can access a sharepoint site via a UNC name. The URL: sharepoint.domain.dom/sites/Roboticus/Test is accessible via: \\sharepoint.domain.com\sites\Roboticus\Test ``...
[ 0.23245801031589508, -0.1017368882894516, 0.46935978531837463, 0.08590827137231827, -0.4507577121257782, -0.07485472410917282, 0.2026166021823883, 0.12074720114469528, -0.41190338134765625, -0.7694175839424133, 0.14174571633338928, 0.40615230798721313, -0.1418716460466385, 0.23486553132534...
I have an HTML string representing an element: `'<li>text</li>'`. I'd like to append it to an element in the DOM (a `ul` in my case). How can I do this with Prototype or with DOM methods? (I know i could do this easily in jQuery, but unfortunately we're not using jQuery.) **Note:** most current browsers support HTML `...
[ 0.10271449387073517, 0.015797842293977737, 0.2954808473587036, -0.10205461084842682, -0.2728854715824127, -0.04698333144187927, 0.08296816796064377, -0.3180783689022064, -0.3266378939151764, -0.5384129881858826, -0.0006200173520483077, 0.3173474967479706, -0.17781832814216614, 0.1361935883...
libraries use to do to get DOM elements from an HTML string ([with some extra work for IE](https://stackoverflow.com/questions/1848588/why-does-html-work-and-not-innerhtml-or-appendchild/1849100#1849100) to work around bugs with its implementation of `innerHTML`): ``` function createElementFromHTML(htmlString) { var...
[ 0.2877044379711151, -0.05989070236682892, 0.11403363943099976, 0.18544241786003113, 0.1402951031923294, 0.15568138659000397, 0.21219049394130707, -0.3893204629421234, -0.1539713591337204, -0.7184516191482544, -0.09364358335733414, 0.22258159518241882, -0.32709890604019165, 0.15915733575820...
method](http://prototypejs.org/doc/latest/dom/Element/update/). * jQuery has it implemented in its [`jQuery(html)`](https://api.jquery.com/jQuery/#jQuery2) and [`jQuery.parseHTML`](https://api.jquery.com/jQuery.parseHTML/) methods.
[ -0.21544380486011505, -0.0011305443476885557, 0.44473811984062195, 0.2901251018047333, 0.005589100532233715, 0.015259949490427971, 0.13181498646736145, -0.1868259757757187, -0.1523376703262329, -0.3099052906036377, 0.05329303443431854, 0.2204703390598297, -0.3596667945384979, 0.06040233746...
In a VS Package (Visual Studio Extensibility), I have a custom extension registered (for ex ".custx") with XamlLanguageService, so that in Visual Studio when the user opens .custx, it opens up in Xaml Designer/editor just like a .xaml file. However when I compile it as "Page" (BuildAction), the WINFX targets / Compile...
[ 0.3974635601043701, 0.08420407027006149, 0.6281959414482117, -0.09825218468904495, -0.300870418548584, -0.09452790021896362, 0.43359583616256714, -0.17601947486400604, -0.04809750244021416, -0.984143078327179, -0.39554545283317566, 0.719518780708313, -0.31703537702560425, -0.19105173647403...
would suggest simply reusing the XAML file extension (there is no way to work around this check in the targets). Is there a reason you need your own file extension?
[ 0.6002193689346313, 0.023247983306646347, 0.0950126126408577, 0.08013422787189484, 0.05690228193998337, -0.36677780747413635, 0.17878170311450958, 0.07322405278682709, -0.40432944893836975, -0.26119527220726013, -0.19386042654514313, 0.08492209762334824, -0.37275511026382446, 0.06594830751...
I have an encryption/copy protection question. I'm writing an application for a company that uses a dongle. Please don't tell me that software protection is useless, or that I should just let it fly free into the air, or that any time I spend doing this is a waste; this isn't a philosophical question about the validit...
[ 0.6703285574913025, 0.5858064293861389, -0.06981388479471207, 0.11602848768234253, 0.3766528367996216, -0.27451592683792114, 0.21970221400260925, -0.0010568927973508835, -0.049995459616184235, -0.36023470759391785, -0.19966943562030792, 0.5863925218582153, -0.14433129131793976, 0.118673734...
'strong names' in .NET in order to protect the application and the assembly, as explained [in this MSDN article](http://msdn.microsoft.com/en-us/library/wd40t7ad.aspx). Is strong naming enough to ensure that my application can't be easily patched? Or do I need to use some sort of encryption library? If I need to use a...
[ 0.26688024401664734, 0.3007466495037079, 0.11588938534259796, 0.0048717474564909935, 0.06517736613750458, -0.3928859233856201, 0.2670554220676422, -0.21243105828762054, -0.36109521985054016, -0.4646131694316864, -0.35375654697418213, 0.372959166765213, -0.18412548303604126, 0.0500706695020...
point where the sting of piracy is not so keenly felt (I hope). Thanks! Assembly strong naming was never designed to protect against an attacker who is in control of the machine. From the [msdn entry on delay signing](http://msdn.microsoft.com/en-us/library/t07a3dye.aspx): > The following example turns off verificati...
[ 0.04134248197078705, 0.08332819491624832, 0.29989752173423767, 0.027263574302196503, -0.2435259073972702, -0.2522771954536438, 0.38035598397254944, -0.14316394925117493, -0.23960980772972107, -0.3170955777168274, -0.18466901779174805, 0.027933796867728233, -0.3237391412258148, 0.5354630351...
then there is technically speaking nothing to prevent him from doing so. Simply loading your assemblies from an encrypted file is also not very useful because the decryption code itself cannot be encrypted and is therefore an easy target for reverse engineering. As mentioned by other posters, what you are looking for...
[ 0.4668219983577728, 0.06618744879961014, 0.1783515363931656, -0.017279472202062607, -0.11388436704874039, -0.04540819302201271, 0.36276111006736755, -0.02291315235197544, -0.4348629415035248, -0.42524057626724243, -0.059800487011671066, 0.22281596064567566, -0.2930966317653656, 0.166382923...
and an obfuscated build, because the latter is not debuggable. * I like to have an error dialog for unexpected exceptions where the user can click "copy details" and send me a mail with some technical information including the stack trace. With obfuscation however, you can forget about getting anything useful from [Exc...
[ 0.05079284682869911, 0.3232819437980652, 0.24611137807369232, -0.014109615236520767, -0.03274236246943474, -0.2615009844303131, 0.5681347846984863, 0.04197610542178154, -0.2686880826950073, -0.591049075126648, -0.13680317997932434, 0.4728510081768036, -0.27243176102638245, 0.12561143934726...
I am trying to determine if two `HashSet` objects in .NET 3.5 (C#) are equal sets, *i.e.* contain the same values. This seems like something one would obviously want to do but none of the provided functions seem to give you this information. The way I can think to do this is by checking if the count of the two sets ar...
[ 0.2793404459953308, -0.08615574985742569, 0.2882979214191437, -0.3296930491924286, -0.1689513921737671, -0.2188347727060318, 0.31155723333358765, -0.489810049533844, -0.08933809399604797, -0.7056930661201477, -0.09985274821519852, 0.4866233468055725, -0.7022321224212646, -0.131669446825981...
set1.IsSubsetOf(set2)) { // do something } ``` Would this always work? Is there a better way? Why doesn't `HashSet` have a `public bool IsEqualSetWith()` function? Look at the method [SetEquals](https://msdn.microsoft.com/en-us/library/dd412096(v=vs.110).aspx). ``` my_hashset.SetEquals(other); ```
[ 0.054175734519958496, -0.171358123421669, 0.22475172579288483, 0.031449612230062485, 0.08433087170124054, -0.14906226098537445, 0.48427680134773254, -0.34806719422340393, -0.2101939171552658, -0.3807595670223236, -0.15984541177749634, 0.4681103229522705, -0.5829595923423767, -0.22109122574...
**What's a reliable way in JavaScript to determine the media type (e.g. screen, print, handheld) of the page?** I've seen references to `document.styleSheets[0].media`, but I've had no luck using this, either because of browser support issues or because I'm not understanding something. I'm asking because I want someth...
[ 0.6538653373718262, 0.02559552900493145, 0.3958413898944855, 0.025729093700647354, -0.08562707901000977, 0.09249041974544525, 0.04967058449983597, -0.29081475734710693, -0.08727697283029556, -0.6200077533721924, 0.06868381053209305, 0.3005845546722412, -0.35946425795555115, -0.155181571841...
non-inline CSS\*. I tried to just set media-specific inline styles for the element (`<div style="@media print { foo: bar; } @media screen { blargh: bfargle; }">`), but from what I can tell, that's not supported. I know that I can cycle through the stylesheets and check to see if a print-specific linked stylesheet is a...
[ 0.3668804168701172, 0.017954310402274132, 0.330476850271225, 0.13579057157039642, -0.36920562386512756, -0.008655025623738766, 0.2114747017621994, 0.030331341549754143, -0.11783885210752487, -0.5152543187141418, 0.19185882806777954, 0.7773653268814087, -0.6707128882408142, 0.14864234626293...
whether or not I can just reliably pull the media type out of the DOM with JavaScript, **completely independently of CSS**. I've tried that trick of "hide an element for the print view, then check to see if it's visible with JavaScript" but that's always resulted in (when I load up print preview) JavaScript determinin...
[ 0.36628058552742004, 0.0910358652472496, 0.3458188474178314, -0.05443013459444046, -0.05402520298957825, -0.03121909871697426, 0.19023391604423523, -0.32016628980636597, -0.2790289521217346, -0.5894749760627747, 0.013913474045693874, 0.8042881488800049, -0.10564997047185898, 0.019026070833...
understood and am constantly irritated by. > [..], Prototype won't allow an element to be switched to visible if it was declared invisible (`display: none`) with non-inline CSS. This is something that I haven't understood and am constantly irritated by. You probably already seen this but the documentation for e.g. [`s...
[ 0.35958898067474365, 0.17533031105995178, 0.0819639265537262, -0.2749321162700653, -0.15793921053409576, -0.1565839797258377, 0.38469552993774414, 0.08433915674686432, -0.23410934209823608, -0.6910732388496399, 0.08726867288351059, 0.3765840530395508, -0.616061270236969, 0.4067600667476654...
haven't used Prototype before, so I'm not sure if this is the recommended way to wait for the DOM to load, but it seems to work): ``` <!doctype html> <script src="prototype.js"></script> <script> document.observe("dom:loaded", function() { $("victim").show(); }); </script> <style> p#victim {display:none;} </style> <...
[ 0.15792380273342133, 0.08735071122646332, 0.12848567962646484, -0.125411257147789, -0.012228655628859997, 0.08146896213293076, 0.4216466546058655, -0.2497972548007965, -0.180134117603302, -0.8434309959411621, 0.28414294123649597, 0.3482072651386261, -0.34285658597946167, 0.3037201464176178...
for a second. What if another ruleset would modify the value of `display` if the `display: none` wasn't present in our ruleset with the `p#victim` selector? (I.e. we can't assume that e.g. `p` always should be set to `block`, other rulesets may have changed that value.) We can't remove the `display` property from a rul...
[ 0.330074280500412, -0.17589254677295685, -0.08583278208971024, 0.18620797991752625, -0.01649562641978264, -0.20937639474868774, 0.305892676115036, -0.3862799406051636, -0.4303295910358429, -0.4468708634376526, -0.013013049028813839, 0.3108501434326172, -0.15915639698505402, 0.2492581754922...
Of course, we could go on and on with this, but afaik there is no known solution to this problem.) Then why does the inline alternative work? First, lets look at how `show` is implemented: ``` show: function(element) { element = $(element); element.style.display = ''; // <-- the important line return element; }...
[ 0.1307148039340973, 0.07381283491849899, 0.30367210507392883, 0.026553601026535034, -0.2305590808391571, -0.19285407662391663, 0.1351190060377121, -0.21866241097450256, 0.08930515497922897, -0.4542767405509949, -0.01253229845315218, 0.6234779357910156, -0.5689470767974854, 0.12641017138957...
modifies its values. The MDC documentation for [`element.style`](https://developer.mozilla.org/en/DOM/element.style) states that: > Returns an object that represents the element's `style` attribute. Note the last word: *attribute*. `element.style` ≠ the current "calculated" style for the element, it's just an list o...
[ 0.25679948925971985, -0.007376587949693203, 0.654381275177002, -0.15405111014842987, 0.2386307269334793, -0.11563374102115631, 0.5198180079460144, -0.5084446668624878, -0.1537257730960846, -0.5050073862075806, -0.2731033265590668, 0.48256805539131165, -0.3900856673717499, 0.147648155689239...
html> <script src="jquery.js"></script> <script> $(document).ready(function(){ $("#victim").show(); }); </script> <style> p#victim {display:none;} </style> <p id="victim">Hello world! ``` jQuery handles the style sheets stuff correctly, in this case anyway! This isn't as simple to explain as the Prototype solution ...
[ 0.1624445617198944, 0.02878265641629696, 0.6451089978218079, 0.004313761368393898, -0.4980359375476837, -0.38092419505119324, 0.32776346802711487, 0.00461607938632369, -0.2790928781032562, -0.771422266960144, -0.09693213552236557, 0.3400242328643799, -0.2182484269142151, -0.059873826801776...
I have a Director project with 3 scripts (2 behaviors and 1 movie script). I have the following code in my movie script: ``` on startRecording () --do stuff _movie.script["script2"].passGrade(75, 3, 4) end ``` and in one of my behavior scripts, I have the following: ``` on passGrade (acc, dur, tim) member("As...
[ 0.06361975520849228, -0.020552149042487144, 0.270630419254303, -0.10759003460407257, -0.030258307233452797, 0.17216743528842926, 0.40472647547721863, -0.5272733569145203, -0.12286217510700226, -0.40233397483825684, 0.22033771872520447, 0.9090750217437744, -0.2696375250816345, 0.00632569240...
out why. Am I not allowed to call from a movie script to a behavior? Or am I not doing this correctly? The second question is how do I call the ActionScript method? The script is defined as a behavior for the Flash object, which is called `Assessment`, but Director doesn't seem to be able to locate the method. I am us...
[ 0.014176387339830399, 0.0758906677365303, 0.08609305322170258, -0.009334975853562355, -0.2116582840681076, -0.07240410149097443, 0.3591122627258301, -0.48376956582069397, -0.15684887766838074, -0.24824795126914978, 0.24274775385856628, 0.8084191679954529, -0.4680101275444031, 0.08397440612...
on the stage), and send the call to the sprite: sendSprite (flashSpriteNumOrNameOrRef, #passGrade, 75, 3, 4) About calling a function inside the flash sprite, you do more or less the same, but you send the call to the flash sprite, not the member: sprite(flashSpriteNumOrNameOrRef).displayGrade(acc, dur, tim) if the...
[ -0.35556256771087646, -0.022099807858467102, 0.6224769949913025, -0.16956406831741333, -0.21586887538433075, 0.09706775844097137, 0.4207761287689209, -0.4069378674030304, -0.09601954370737076, -0.3370944559574127, -0.497088760137558, 0.7380685806274414, -0.4268501102924347, 0.0695393383502...
My question title explains it all. This is extremely frustrating, especially when working with lots of similar constants. It works for Visual Basic projects but not Visual C#. In general, why do the IDEs seem to be so different for the different languages (e.g. super-charged Intellisense in VB but not in C#)? To me it...
[ 0.3524268865585327, 0.19869986176490784, 0.1526510864496231, 0.32800939679145813, -0.3510668873786926, -0.15211516618728638, -0.012772555463016033, -0.20508606731891632, -0.07804607599973679, -0.5331168174743652, 0.1971084028482437, 0.6081860065460205, -0.03612220659852028, 0.1951192021369...
I have to be missing something obvious here. I don't get why this cast of the results of a linq query returns null and not the typed list I'm requesting. ``` IList<IMyDataInterface> list = query.ToList() as IList<IMyDataInterface>; ``` The complete code to run this is below. This is a knowledge gap I need to bridge....
[ 0.13812625408172607, 0.3206917941570282, 0.1672188639640808, -0.023755576461553574, -0.18550227582454681, -0.08612171560525894, 0.23907014727592468, -0.31673526763916016, -0.034439895302057266, -0.6564953923225403, 0.07573562860488892, 0.4613027274608612, -0.5812744498252869, 0.36598128080...
{ IMyFunctionalInterface myObject = new MyClass(); //myObject.Get() returns null for some reason... IList<IMyDataInterface> list = myObject.Get(); Debug.Assert(list != null, "Cast List is null"); } } public interface IMyFunctionalInterface { IList<IMyDataInterface> Get(); } p...
[ 0.00835300050675869, -0.04647879675030708, 0.2784395217895508, -0.20370599627494812, 0.0149553082883358, 0.325305312871933, 0.3780994117259979, -0.3611881732940674, -0.06326067447662354, -0.8357303142547607, -0.5091452598571777, 0.6488673090934753, -0.7309641242027283, 0.38751065731048584,...
var query = from n in names where n.Contains("a") select new MyDataClass { Name = n.ToString()
[ -0.5028798580169678, -0.30018872022628784, 0.33760514855384827, -0.1679525375366211, 0.08701310306787491, 0.12335794419050217, 0.28616106510162354, -0.331194132566452, 0.009626979939639568, -0.36652854084968567, 0.07080969214439392, 0.4434271454811096, -0.3193505108356476, 0.47082498669624...
}; //There IS data in the query result Debug.Assert(query != null, "result is null"); //but the cast here makes it return null IList<IMyDataInterface> list = query.ToList() as IList<IMyDataInterface>; return list; } } public interface IMyDataInterface { string Name { g...
[ -0.17992109060287476, -0.23979009687900543, 0.1295672506093979, 0.01692485623061657, -0.08243880420923233, 0.06960480660200119, 0.4223543703556061, -0.4629204571247101, 0.15028318762779236, -0.6817876696586609, -0.03140021115541458, 0.48017680644989014, -0.5429789423942566, 0.4096499681472...
: IMyDataInterface { public string Name { get; set; } } ``` The problem here is one of **covariance**. First, your example is a bit too complicated. I have removed some fluff. Also, I've added some diagnostics that illuminate the problem. ``` class Program { static void Main(string[] args) { var ...
[ 0.4270292818546295, 0.09702472388744354, 0.20138554275035858, -0.1806204915046692, 0.05924578011035919, 0.2236841917037964, 0.42081597447395325, -0.07874563336372375, -0.33933165669441223, -0.4687497317790985, -0.2000068873167038, 0.5950050950050354, -0.4501743018627167, 0.628360390663147,...
select new C { S = n }; //There IS data in the query result Debug.Assert(query != null, "result is null");
[ -0.15513376891613007, -0.2441592812538147, 0.03778129070997238, -0.16261960566043854, 0.11763759702444077, -0.15163227915763855, 0.3247053623199463, -0.3940112292766571, 0.1505235880613327, -0.2469872385263443, -0.4883193075656891, 0.5283544063568115, -0.3228144943714142, 0.243054285645484...
//but the conversion here makes it return null var list = query.ToList() as IList<I>; Console.WriteLine(query.ToList().GetType()); // this assert fires. Debug.Assert(list != null, "Cast List is null"); } } interface I { string S { get; set; } } class C : I { public string ...
[ 0.06152983382344246, -0.1311677247285843, 0.4168592691421509, -0.20246541500091553, -0.06915701925754547, -0.11842849105596542, 0.23264680802822113, -0.6641779541969299, -0.18870964646339417, -0.5325640439987183, -0.1916201263666153, 0.692100465297699, -0.531000018119812, 0.191980928182601...
which doesn't work in C# 3.0. In C# 4.0 you should be able to do this, thanks to the new co- and contra-variance of type parameters on generic interfaces. Also, your original question asked about `IQueryable` but that's not relevant here: the query expression you supplied creates an `IEnumerable<string>` not an `IQue...
[ 0.43480154871940613, 0.1076517105102539, 0.3916233777999878, -0.11349727213382721, -0.20848409831523895, 0.032730329781770706, 0.14237433671951294, -0.4356061518192291, 0.03632916137576103, -0.6226601004600525, -0.07796018570661545, 0.5084562301635742, -0.5252982974052429, 0.13266159594058...
`InvalidCastException` with: ``` Additional information: Unable to cast object of type 'System.Collections.Generic.List1[C]' to type 'System.Collections.Generic.IList1[I]'. ```
[ -0.06318926066160202, 0.1895127296447754, 0.1368357092142105, 0.15947656333446503, -0.22151558101177216, 0.15964041650295258, 0.4632440507411957, 0.003398815169930458, 0.009398465044796467, -0.1476508378982544, -0.2136964350938797, 0.4933715760707855, -0.37848055362701416, 0.32293424010276...
I'm looking for a way to input a minified JavaScript file and end up with something readable. I understand that it won't have the original variables, they'll all be single letters, but at least it would have lines breaks and possibly tabs. Is there anything out there? See <http://elfz.laacz.lv/beautify/>. It'll indent...
[ 0.4674707353115082, -0.19347544014453888, 0.18331003189086914, 0.19273968040943146, 0.19936548173427582, 0.09985853731632233, 0.23360581696033478, 0.38595902919769287, -0.18262332677841187, -0.5751457810401917, -0.07493285834789276, 0.37946900725364685, -0.029199279844760895, -0.1829651892...
I have a table and I am highlighting alternate columns in the table using jquery ``` $("table.Table22 tr td:nth-child(even)").css("background","blue"); ``` However I have another `<table>` inside a `<tr>` as the last row. How can I avoid highlighting columns of tables that are inside `<tr>` ? Qualify it with the `>`...
[ 0.04993610456585884, 0.13764145970344543, 0.4117106795310974, -0.043461985886096954, -0.011893360875546932, 0.20859527587890625, 0.09498537331819534, -0.05407523363828659, -0.28573137521743774, -0.8877279758453369, -0.31766781210899353, 0.2404513955116272, 0.10470125079154968, -0.082662746...
I have been asked to pull in columns for use in a web app.I am using asp.net and C#. I was using a dataReader to populate the class variables. The problem is that the dbf file can change. Sometimes rows are added or deleted so my class would have to change every time the data source file changes to represent the column...
[ 0.1046019196510315, 0.23363646864891052, 0.4117700755596161, -0.22929014265537262, -0.206140398979187, 0.3629850745201111, 0.05702424421906471, -0.29121720790863037, -0.015650922432541847, -0.6034521460533142, 0.0025939049664884806, 0.378947377204895, -0.6007362604141235, 0.293716639280319...
id from language where language.handle = 'english') ``` I think this will give you all strings with the
[ 0.01060735434293747, 0.34479621052742004, 0.3533477783203125, -0.22309844195842743, -0.21203792095184326, -0.1526287943124771, 0.24377378821372986, -0.007357419468462467, 0.1712506264448166, -0.31205061078071594, -0.15442946553230286, 0.5330602526664734, -0.42521923780441284, -0.1221536025...
matching translation text where a suitable translation exists in English. Is that what you are trying to get?
[ -0.052525777369737625, -0.06676147133111954, 0.21481844782829285, 0.3050993084907532, -0.1632418930530548, -0.1263154149055481, 0.21567334234714508, 0.18775512278079987, 0.059897348284721375, -0.5938084125518799, -0.1807737946510315, 0.45924195647239685, -0.21669979393482208, -0.2922934889...
I have a Java program using AWT which I would like to run on a headless system. The display for the program does nothing other than display stats. When the program finishes, it exits. There is no user interaction on the display. The program creates an output file which I use in my build system. Is there a way to get t...
[ 0.5430565476417542, 0.10042175650596619, 0.0065964143723249435, -0.18271417915821075, -0.2768312990665436, 0.03327098861336708, 0.3760550916194916, 0.026849880814552307, 0.13095681369304657, -0.7219966053962708, 0.30705082416534424, 0.37537887692451477, -0.37575748562812805, 0.358328878879...
make modifications to the source. Any thoughts on how I could get this to work? The underlying question here is how to run Java applications without an X server; providing a "fake" X server is only one option. In Java 1.4 and up, you can do the following: ``` java -Djava.awt.headless=true ``` This allows applicatio...
[ 0.6571986079216003, 0.12255752831697464, 0.15087807178497314, -0.1588928997516632, -0.11496002972126007, -0.4337179958820343, 0.4899701774120331, -0.048449885100126266, 0.0375874824821949, -0.6062100529670715, -0.022295258939266205, 0.653900146484375, -0.4381590783596039, 0.039377283304929...
How to get a reference to a control from its' string name in C#? [`Page.FindControl`](http://msdn.microsoft.com/en-us/library/31hxzsdw.aspx) If the Control is nested, use `Control.FindControl` from the parent Control. Otherwise, you'll have to write your own [FindControlRecursive](https://blog.codinghorror.com/recursi...
[ 0.23373356461524963, -0.019400300458073616, 0.1822373867034912, 0.3366343379020691, 0.3110978901386261, -0.2150733321905136, 0.07561608403921127, -0.1908058524131775, -0.09168881922960281, -0.3669191002845764, -0.29160216450691223, 0.11176151037216187, -0.5859089493751526, -0.1334798485040...
I'm taking a grad class on software testing and we spent a whole class on the difference between faults, errors, and failures. I was dissatisfied by the definition of a software fault in testing. What's your definition? You might be interested in this [SE Radio](http://www.se-radio.net/podcast/2007-11/episode-77-fault-...
[ 0.3610762655735016, 0.4556595981121063, -0.14687831699848175, -0.040411513298749924, -0.08304034918546677, -0.18786604702472687, 0.7399781346321106, -0.2147478312253952, -0.09911605715751648, -0.09353072196245193, 0.1123608946800232, 0.8944951295852661, -0.122761070728302, 0.07042299211025...
I am wondering whats the best practices regarding functions and objects. For example I want to perform an action called tidy. It will take my data as input and tidy it and return it. Now I can do this in two ways. One using a simple function and the other using a class. ``` Function: $data = tidy($data); Class: $tidy...
[ 0.20873315632343292, -0.1426173597574234, 0.16222146153450012, -0.06337691098451614, -0.2785939872264862, -0.331750750541687, 0.19842417538166046, -0.15693916380405426, -0.2472621351480484, -0.5804513692855835, 0.18459251523017883, 0.4205957353115082, -0.3625011146068573, 0.255543768405914...
using a separate class for db connectivity. But we usually have a single object of that class only. Isn't this kind of contrary to the definition of class and objects in a sense that we are using the class only to intantiate a single object? I kind of dont understand when to use a function and when to use a class. Wha...
[ 0.5261168479919434, -0.007883427664637566, -0.04750627651810646, 0.4096437394618988, -0.3052326440811157, -0.37473493814468384, 0.3593018054962158, -0.21106280386447906, -0.1605537235736847, -0.4030042290687561, 0.20236748456954956, 0.26862505078315735, -0.3007834553718567, 0.1071082949638...
while containing it all in a nice little self-contained chunk.
[ 0.03076731413602829, 0.35358554124832153, -0.2525227963924408, 0.436175137758255, -0.15124885737895966, -0.05786493420600891, 0.06963014602661133, -0.035428836941719055, -0.047566384077072144, -0.09021468460559845, 0.22322602570056915, 0.09213057160377502, 0.021782290190458298, 0.133067861...
I am a graduate student of physics and I am working on writing some code to sort several hundred gigabytes of data and return slices of that data when I ask for it. Here is the trick, I know of no good method for sorting and searching data of this kind. My data essentially consists of a large number of sets of numbers...
[ 0.4422960877418518, 0.3214370012283325, -0.00232033827342093, 0.2857825458049774, 0.03496115282177925, 0.29924651980400085, 0.05530494451522827, -0.011922280304133892, -0.24062280356884003, -0.5640156269073486, -0.04020797461271286, 0.08753103017807007, 0.08143025636672974, 0.3505505919456...
a brute force search). I need to be able to specify a set with k elements and have every set with k+1 elements or more that contains the specified subset returned to me. Simple Example: Suppose I have the following sets for my data: (1,2,3) (1,2,3,4,5) (4,5,6,7) (1,3,8,9) (5,8,11) If I were...
[ -0.0872393399477005, -0.1136496365070343, 0.4224427342414856, -0.02161937579512596, -0.010706898756325245, 0.5532054305076599, 0.2805262506008148, -0.6947392225265503, 0.04649348184466362, -0.38881009817123413, -0.2323066145181656, 0.4686254560947418, -0.30739498138427734, 0.06309902667999...
(50) would return no sets: By now the pattern should be clear. The major difference between this example and my data is that the sets withn my data are larger, the numbers used for each element of the sets run from 0 to 16383 (14 bits), and there are many many many more sets. If it matters I am writing this program i...
[ 0.27135565876960754, 0.16491901874542236, 0.30640512704849243, 0.10425451397895813, 0.012741010636091232, 0.09558647871017456, 0.1297304928302765, -0.6431888341903687, -0.16041520237922668, -0.5636841058731079, -0.04161953926086426, 0.25599074363708496, -0.04730519652366638, -0.03823027014...
does not change. It was all taken in one long set of runs (each broken into 2 gig files). 2.) As for storage space. The raw data takes up approximately 250 gigabytes. I estimate that after processing and stripping off a lot of extraneous metadata that I am not interested in I could knock that down to anywhere from 3...
[ 0.37997952103614807, 0.1468912810087204, 0.13454116880893707, 0.09231789410114288, 0.06877084821462631, -0.028470367193222046, 0.06187135726213455, -0.2722020447254181, -0.4659300744533539, -0.674372673034668, -0.018973471596837044, 0.2639484703540802, -0.07374362647533417, 0.1203113421797...
yet further by adding counters for repeat events rather than simply repeating the events over and over again. 3.) Each number within a processed set actually contains at LEAST two numbers 14 bits for the data itself (detected energy) and 7 bits for metadata (detector number). So I will need at LEAST three bytes per ...
[ 0.6577580571174622, -0.20685216784477234, 0.3195561170578003, 0.3647531569004059, -0.16922122240066528, 0.0614410862326622, 0.38807860016822815, -0.5604608058929443, -0.1666029989719391, -0.44366562366485596, -0.09841866046190262, -0.05178702995181084, -0.07403542846441269, 0.1256718933582...
the median is 5 numbers per set and the average is 6 numbers per set. 5.) While I like the idea of building an index of pointers into files I am a bit leery because for requests involving more than one number I am left with the semi slow task (at least I think it is slow) of finding the set of all pointers common to...
[ 0.22972865402698517, -0.08516295254230499, 0.8173171877861023, -0.21886058151721954, -0.17321130633354187, 0.3374883532524109, 0.18036723136901855, -0.3270811140537262, -0.3291705548763275, -0.77737957239151, -0.07212254405021667, 0.3827279210090637, 0.08635509759187698, -0.116259686648845...
raw data on the system (The remainder of my quota on that system). The system is a dual processor server with 2 quad core amd opterons and 16 gigabytes of ram. 7.) Yes 0 can occur, it is an artifact of the data acquisition system when it does but it can occur. I have recently discovered methods that use Space Filling ...
[ 0.23882129788398743, -0.047632571309804916, 0.34743043780326843, 0.46220314502716064, 0.061451591551303864, 0.26181894540786743, 0.09618008136749268, -0.09122244268655777, 0.022675776854157448, -0.4954526424407959, 0.0054604122415184975, 0.6435279250144958, 0.18136365711688995, 0.010526112...
represents the curve and then retrieving those segments. I believe that this method is far superior to making the insane indexes as suggested because after looking at it, the index would be as large as the data I wished to store, hardly a good thing. A somewhat more detailed explanation of this can be found at: <http...
[ 0.21159207820892334, -0.2200700342655182, 0.20626387000083923, 0.017093967646360397, -0.08687742054462433, 0.1869005560874939, 0.11991390585899353, -0.194168359041214, -0.2618887722492218, -0.22153224050998688, 0.13216237723827362, 0.2712154686450958, -0.007918339222669601, 0.2108993828296...
I am looking for an online resource to learn the Spring MVC stack. Can someone point me in the right direction? I have used this tutorial to start. I found it very helpful. <http://static.springframework.org/docs/Spring-MVC-step-by-step/>
[ 0.22399769723415375, -0.06088949367403984, 0.1216621994972229, -0.03420623391866684, 0.08300922065973282, 0.02431531809270382, 0.13421586155891418, 0.12971794605255127, -0.38728126883506775, -0.479780912399292, 0.04897133260965347, 0.019130708649754524, 0.31508779525756836, 0.1700722873210...
I'm trying to determine how likely it is that my next job will involve the use of a Mac/PC if I am hired as a PHP programmer. With Rails, most shops seem to develop on the Mac. I'm wondering whether the same is true of PHP. Most PHP development houses will have you debug and run your code in a testing environment that ...
[ 0.5071079730987549, 0.25870710611343384, 0.042354848235845566, 0.3148120939731598, 0.09277894347906113, -0.19904421269893646, 0.11592397838830948, 0.27218490839004517, -0.17512859404087067, -0.6788220405578613, 0.23238368332386017, 0.7764869928359985, 0.04129602760076523, -0.23230594396591...
that it is multi-platform at its heart. I would be more worried about things like what version control system are they using and what is their production environment like than what desktop OS you will have to use, as these are the variables that get locked in stone while your desktop machine isn't.
[ 0.36246955394744873, 0.2966458797454834, -0.22476334869861603, 0.35213035345077515, -0.037468455731868744, 0.10014735907316208, -0.13747581839561462, 0.31737565994262695, -0.0774340108036995, -0.30296027660369873, 0.18906335532665253, 0.5471800565719604, -0.0787743553519249, 0.464392602443...
I'm writing an integration test where I will be inserting a number of objects into a database and then checking to make sure whether my method retrieves those objects. My connection to the database is through NHibernate...and my usual method of creating such a test would be to do the following: ``` NHibernateSession....
[ 0.045405950397253036, 0.08694960922002792, 0.22713838517665863, 0.014950819313526154, 0.3111957311630249, -0.04279195889830589, 0.09403468668460846, -0.2977427840232849, -0.25464192032814026, -0.577504575252533, -0.16574664413928986, 0.5274443030357361, -0.2644539773464203, 0.1761164665222...
= 0; DepartmentAdapter deptAdapter = new DepartmentAdapter(); EmployeeAdapter empAdapter = new EmployeeAdapter(); using (TransactionScope txScope = new TransactionScope()) { res += deptAdapter.Insert(dept.DepartmentName); //Custom method made to return Department ID //after in...
[ -0.22416462004184723, -0.4258423149585724, 0.7859477400779724, -0.05814668908715248, 0.4602678120136261, 0.31200528144836426, 0.25504717230796814, -0.19724790751934052, -0.22390881180763245, -0.45026540756225586, -0.5079219937324524, 0.7504165172576904, -0.05900270864367485, 0.355868965387...
emp.EmployeeDeptID = dept.DepartmentID; res += empAdapter.Insert(emp.EmployeeName, emp.EmployeeDeptID); } txScope.Complete(); } return res; } ``` I believe that if I don't include the line `txScope.Complete()` that the data inserted will be rolled back. But unfortunately I don't...
[ 0.1685752272605896, -0.18826662003993988, 0.738536536693573, -0.04465588182210922, 0.2911953032016754, 0.1638307273387909, 0.24114373326301575, -0.018964631482958794, -0.22969992458820343, -0.4398721158504486, -0.35737261176109314, 0.7544084191322327, -0.35293203592300415, 0.34461224079132...