text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
var item = itemBLL.GetFullItem(itemId); var DropDownListColor = (DropDownList)e.Item.FindControl("DropDownListColor"); //Also tried with : //if(!isPostBack) { DropDownListColor.DataSource = item.ColorList; DropDownList.Color.Databind(); // } End !isPostBack) Label1.test = DropDownListColor.SelectedIndex...
[ 0.12042438983917236, -0.3654717206954956, 0.4329621195793152, -0.22272881865501404, -0.06776659190654755, -0.018094820901751518, 0.5032839775085449, -0.530424952507019, -0.2535015940666199, -0.47168850898742676, -0.09867066144943237, 0.4251082241535187, -0.41693830490112305, 0.097639784216...
- I'm having a "logical" confusion in my head now - how am I to alter elements inside the datalist? Since, as far as I know - I do not have any way to check which of the items in the datalist this particular dropdownlist belongs to... Or? I'm going to try out a few ways and see what I end up with ;) But do please post ...
[ 0.04935615882277489, -0.29597315192222595, 0.41835924983024597, 0.195667564868927, 0.17952832579612732, -0.01565031334757805, 0.042614541947841644, -0.027858678251504898, -0.29208722710609436, -0.6614396572113037, -0.07530643045902252, 0.5382739305496216, -0.2947154939174652, 0.23996762931...
{ DropDownList dropDownListColor = (DropDownList)sender; DataListItem dataListItem = (DataListItem)dropDownListColor.Parent; var item = items[dataListItem.ItemIndex]; var color = item.ItemColor[dropDownListColor.SelectedIndex]; var LabelPrice = (Label)dataLi...
[ -0.024517176672816277, -0.49321162700653076, 0.5729079246520996, 0.028496185317635536, 0.20642238855361938, 0.20964710414409637, 0.16910795867443085, -0.4168684780597687, -0.2139422446489334, -0.4030967950820923, -0.6461727619171143, 0.45050227642059326, -0.25424933433532715, 0.55217182636...
the DataList is data-bound, the AutoPostBack has not been handled yet, i.e. the values in the ItemCreated event are still the original values. You need to handle the SelectedIndexChange event of the dropdown control.
[ -0.14973637461662292, -0.46414098143577576, 0.3258519470691681, 0.3738251030445099, -0.0006131328409537673, -0.04701091721653938, 0.10424219071865082, -0.3013474941253662, -0.27709558606147766, -0.2814610004425049, -0.1507166624069214, 0.47632458806037903, -0.17363213002681732, 0.061590775...
I have a container filled with pairs. I want to iterate in it using the STL generic algorithms (in my case it would be inner\_product, but consider it as a generic problem). The algorithm I am using expects iterators first and last. Can I provide special iterators first and last that will iterate not on the pairs but o...
[ 0.014791511930525303, 0.04633888602256775, 0.24205316603183746, -0.3009938597679138, -0.03736858442425728, 0.2723032534122467, -0.02749774232506752, -0.5266695022583008, 0.13395243883132935, -0.6450039148330688, -0.15274342894554138, 0.7253513932228088, -0.5686179995536804, -0.125142276287...
I think there is also a clever one-liner to do it for me. What would it be? I've looked around and found `boost::transform_iterator`. I've come up with this code. Surprising how well it works: ``` #include <map> #include <algorithm> #include <iostream> #include <string> #include <iterator> #include <boost/iterator/tra...
[ -0.20697414875030518, -0.24916808307170868, 0.593964695930481, -0.36953654885292053, -0.08100059628486633, 0.36280277371406555, 0.3128036558628082, -0.6566036939620972, 0.1756097972393036, -0.5783947706222534, -0.19358524680137634, 0.6851666569709778, -0.37714242935180664, -0.3703759610652...
boost::make_transform_iterator(a.end(), f), std::ostream_iterator<int>(std::cout, " ")); } ``` It's printing `"1 2 "` to the standard output.
[ -0.2954568564891815, -0.36280620098114014, 0.8499742746353149, -0.46098366379737854, 0.050032421946525574, 0.11305338144302368, 0.09225846081972122, -0.3997489809989929, 0.06139933317899704, -0.38592517375946045, -0.4604280889034271, 0.9253357648849487, -0.19441568851470947, -0.45782065391...
I have a winforms application that is doing the following: on each query: 1. Db connect 2. Db query 3. Db disconnect as we are trying to avoid having to keep the db connection open. This suffers from performance as we have to connect / disconnect everytime. What is the idealized model here to have the fastest perfo...
[ 0.1917915642261505, 0.09151425957679749, 0.38457614183425903, 0.004336819984018803, -0.22016426920890808, -0.2859838902950287, 0.31215542554855347, -0.27067193388938904, 0.062183454632759094, -0.7411395311355591, -0.014364262111485004, 0.537786602973938, -0.2694530189037323, 0.157133772969...
have to worry about it.
[ 0.4191659092903137, 0.3837515115737915, -0.0029349811375141144, 0.07996270060539246, 0.016163112595677376, 0.057024531066417694, 0.09086575359106064, 0.11450103670358658, -0.11642079055309296, -0.38660430908203125, 0.02147837169468403, 0.20594480633735657, -0.0915941447019577, -0.126442924...
What is the best way to abstract the episerver infrastructure for easier testing? I have written a post about [TDD with EPiServer](http://marekblotny.blogspot.com/2009/03/tdd-with-episerver.html) recently. Basically the idea is to use Model-View-Presenter design pattern to isolate as much logic as you can from asp.ne...
[ 0.03233925625681877, -0.22565333545207977, -0.010307973250746727, 0.3877749741077423, -0.5281094908714294, -0.07951802015304565, 0.21057946979999542, -0.388519823551178, -0.16579222679138184, -0.39430174231529236, 0.04497244954109192, 0.607121467590332, -0.183067187666893, -0.2160581648349...
I have a very simple model. I want to add a send email routine to on of the methods for the model: ``` $this->Email->delivery = 'smtp'; $this->Email->template = 'default'; $this->Email->sendAs = 'text'; $this->Email->from = 'email'; $this->Email->to = 'email'; $this->Email->subject = 'Error'; ``` I've t...
[ 0.17543411254882812, 0.1577470898628235, 0.5398089289665222, -0.2618531882762909, -0.017269007861614227, -0.03234192728996277, 0.5950051546096802, -0.13995708525180817, -0.15113094449043274, -0.7332759499549866, 0.055302947759628296, 0.43438971042633057, -0.570907711982727, 0.0361248068511...
// $this->Email->bcc = array('secret@example.com'); // copies $this->Email->subject = $subject; $this->Email->replyTo = 'noreply@domain.com'; $this->Email->from = 'MyName <noreply@domain.com>'; $this->Email->template = $template; $this->Email->sendAs = 'text'; //Send as 'html', 'text' or 'both' (def...
[ 0.09370015561580658, -0.3263244926929474, 0.6295766830444336, 0.15048770606517792, -0.11456575989723206, -0.4357134699821472, 0.05548202618956566, -0.4012628495693207, -0.2168235182762146, -0.9165317416191101, -0.17525579035282135, 0.2901028096675873, -0.33028385043144226, 0.09774380922317...
On a more abstract level then [a previous question](https://stackoverflow.com/questions/299729/javascript-to-flash-communication), in my experience there are 3 ways to call a javascript function on an html page from an embedded .swf using AS3: ExternalInterface, fscommand, and navigateToURL. Let's compare and contrast...
[ -0.03437625616788864, 0.023792531341314316, 0.393905907869339, -0.1732034683227539, -0.33654579520225525, 0.2167382538318634, 0.20177732408046722, -0.07847391813993454, -0.21206627786159515, -0.6507903933525085, 0.1537082940340042, 0.8515562415122986, -0.2848965525627136, -0.16156302392482...
communication between JS and Flash easier, so it doens't really make sense to use anything else. Common practice is to check if its available first by evaluating the value of the ExternalInterface.available property before making a call to some JS. This property tells you if the SWF in which you want to call some JS fr...
[ 0.1532866507768631, -0.20213182270526886, 0.37047243118286133, 0.08691924810409546, -0.2630377411842346, -0.2618306279182434, 0.20140628516674042, 0.20012174546718597, -0.07283494621515274, -0.7909853458404541, -0.1550385057926178, 0.7369382977485657, -0.40775108337402344, -0.1390118300914...
only send one argument string with fscommand and have to split it on the JS side.
[ -0.4400985836982727, -0.11524178832769394, 0.21371997892856598, -0.08929536491632462, -0.12363884598016739, -0.16031724214553833, 0.2987063527107239, -0.0006461439770646393, 0.17831028997898102, -0.349223792552948, -0.45125389099121094, 0.4451526701450348, -0.3702037036418915, -0.341955691...
I'm writing a little web-based utility for my brother who needs to merge columns in a CSV file. I know things like this surely exist somewhere, but a large part of this is that is a fun little exercise. Anyways, I'm trying to figure out the best/neatest way to present the part of the UI where he reorders the columns a...
[ 0.23962271213531494, 0.234789177775383, 0.42056626081466675, 0.1808633953332901, -0.13478103280067444, 0.060939982533454895, 0.016232389956712723, 0.14194265007972717, -0.09686943888664246, -0.9332439303398132, 0.17754945158958435, 0.2750777304172516, -0.1979513317346573, -0.16252641379833...
do is make it so that "merged" columns become a nested list under a single item. For example: ``` <ul id="columns"> <li>Column 1</li> <li>Column 2</li> </ul> ``` would become: ``` <ul id="columns"> <li>Column 1<ul class="merge"><li>Column 2</li></ul></li> </ul> ``` This is proving to be a bit more of a pain than...
[ 0.14954224228858948, 0.05821584537625313, 0.5040631890296936, -0.23470911383628845, -0.3985072374343872, 0.008535400964319706, 0.11201931536197662, -0.31196996569633484, -0.10630619525909424, -0.9052944183349609, -0.038651738315820694, 0.026535330340266228, -0.23265831172466278, -0.1249302...
of what I'm asking. @smo: I like the simplicity of your idea, but the problem is that there are several *dozen* different columns, so listing every column once per column would unfortunately be out of the question. @strager: That's pretty much exactly what I've been trying to do, it's just that particulars of making ...
[ 0.44050827622413635, 0.18157067894935608, 0.3133070170879364, 0.11543817073106766, -0.5784347653388977, 0.41898205876350403, 0.05727067589759827, -0.21480317413806915, -0.21307072043418884, -0.6892695426940918, -0.03497082740068436, 0.24045725166797638, -0.4219786524772644, -0.082832358777...
columns (or one of the colums is already merged), extract each column in the group. In your structure, you'd want to make "Column 1" have its own <li> without the child <ul>. * You'd probably want to clone these, as you'll be deleting the original nodes in (6). 2. Create a new <ul> node, adding the proper "merged" cla...
[ -0.31194254755973816, -0.107858806848526, 0.49473029375076294, -0.0265304334461689, -0.07972940802574158, 0.6746763586997986, -0.07312866300344467, -0.22248083353042603, -0.11378803104162216, -0.594937264919281, -0.34612980484962463, -0.2535993456840515, -0.5565183758735657, 0.028128694742...
child of the column list ($('#columns')). 6. Delete the original columns which you were going to merge.
[ -0.15849342942237854, 0.07418584078550339, 0.36114010214805603, 0.10624539107084274, 0.2216760814189911, 0.4854126572608948, 0.058520663529634476, 0.04963921755552292, 0.03291375935077667, -0.698554277420044, -0.16303573548793793, 0.3653566241264343, -0.3159114718437195, 0.350840300321579,...
Unit tests are cheaper to write and maintain, but they don't cover all scenarios. What is the right balance between them? I like [Brian Marick's quadrant](http://www.exampler.com/old-blog/2003/08/21/#agile-testing-project-1) on automated tests where the distinctions are business vs. technology facing and support progra...
[ 0.4433787763118744, -0.08650706708431244, -0.30884531140327454, 0.21878665685653687, -0.06307639181613922, 0.3470221161842346, 0.07596489042043686, -0.5478343963623047, 0.12939494848251343, -0.5074359178543091, 0.2863299250602722, 0.6300876140594482, 0.1187446191906929, 0.02213179878890514...
Given a list of sets: * S\_1 : [ 1, 2, 3, 4 ] * S\_2 : [ 3, 4, 5, 6, 7 ] * S\_3 : [ 8, 9, 10, 11 ] * S\_4 : [ 1, 8, 12, 13 ] * S\_5 : [ 6, 7, 14, 15, 16, 17 ] What the most efficient way to merge all sets that share at least 2 elements? I suppose this is similar to a connected components problem. So the result would ...
[ -0.24689435958862305, -0.10199448466300964, 0.044273052364587784, -0.03882483020424843, -0.0955582857131958, 0.32054218649864197, 0.47358742356300354, -0.5318613052368164, -0.20806066691875458, -0.6082402467727661, -0.2731037735939026, -0.14726977050304413, -0.4534694254398346, 0.413649678...
[ 1, 8, 12, 13 ] (S\_4 shares 1 with S\_1, and 8 with S\_3, but not merged because they only share one element in each) The naive implementation is O(N^2), where N is the number of sets, which is unworkable for us. This would need to be efficient for millions of sets. ``` Let there be a list of many Sets named (S) Pe...
[ -0.11021402478218079, -0.10831141471862793, 0.09705434739589691, -0.2006811648607254, -0.005021024029701948, 0.17875035107135773, 0.542850911617279, -0.6080218553543091, -0.17937710881233215, -0.6055762767791748, -0.19062042236328125, 0.2599409222602844, -0.5224874019622803, -0.02621867321...
Iterate though S, processing them one Set at a time, named (Si). Permutate all ordered pairs in Si. (P1, P2) where P1 <= P2. For each pair examine M(P1, P2) if M(P1, P2) is NULL Continue with the next pair. otherwise
[ -0.20852354168891907, -0.13656707108020782, 0.13759133219718933, -0.3298722207546234, -0.1923772245645523, 0.5069698691368103, 0.18892037868499756, -0.8539167046546936, 0.07024052739143372, -0.6811187267303467, -0.2832133173942566, 0.08092227578163147, -0.5328975915908813, -0.1292397975921...
Merge Si, into the Set pointed to by, M(P1, P2). Remove Si from S, as it has been merged. Move on to processing Set S(i + 1) If Si was not merged, Permutate again through Si
[ -0.18199631571769714, -0.24538734555244446, 0.4164886176586151, -0.011359130032360554, -0.2470434606075287, 0.3059667646884918, -0.0947263091802597, -0.6675390601158142, 0.0009909188374876976, -0.5274496078491211, -0.35396745800971985, -0.15983352065086365, -0.3090454638004303, -0.09212350...
For each pair, make M(P1, P2) point to Si. while At least one set was merged during the pass. ``` My head is saying this is about Order (2N ln N). Take that with a grain of salt.
[ -0.036374207586050034, 0.2301475554704666, 0.21290607750415802, -0.4195552170276642, -0.24121323227882385, 0.43193042278289795, 0.11097712814807892, -0.6200302243232727, -0.019927745684981346, -0.7634543776512146, 0.03306111320853233, 0.016253003850579262, -0.010647432878613472, 0.35272529...
I am using C# and Windows Forms. I have a normal progress bar working fine in the program, but now I have another operation where the duration cannot be easily calculated. I would like to display a progress bar but don't know the best way to start/stop the scrolling marquee. I was hoping for something as simple as sett...
[ 0.33632615208625793, 0.132553830742836, 0.4935377538204193, 0.012568927370011806, 0.0707172304391861, -0.09915754199028015, 0.3169204890727997, 0.4016859531402588, -0.3208787739276886, -0.593894898891449, 0.24127188324928284, 0.6089110374450684, -0.049102604389190674, 0.08271440118551254, ...
style set to `Marquee`. This represents an indeterminate progress bar. ``` myProgressBar.Style = ProgressBarStyle.Marquee; ``` You can also use the [`MarqueeAnimationSpeed`](http://msdn.microsoft.com/en-us/library/system.windows.forms.progressbar.marqueeanimationspeed.aspx) property to set how long it will take the ...
[ 0.3152114450931549, -0.14872902631759644, 0.6705138683319092, 0.060447316616773605, 0.2855550944805145, 0.20428761839866638, 0.2898295521736145, -0.013010683469474316, -0.19521799683570862, -0.9534793496131897, -0.17361459136009216, 0.47459501028060913, 0.0774841234087944, 0.07736705243587...
As the title says really. Does the virtual keyword cause a performance hit? First off, in Actionscript you don't need to explicitly mark a method to be overridden as virtual as you do in C#, the compiler will do this for you. This is why the keyword doesn't show up in any docs because it is irrelevant from the develope...
[ -0.09682167321443558, -0.3879896104335785, 0.10148082673549652, 0.5028135776519775, 0.04100098833441734, -0.4726625680923462, 0.5849106311798096, 0.4977423846721649, -0.4715309739112854, -0.4873832166194916, -0.2268795520067215, 0.768787682056427, -0.18473686277866364, -0.03410203009843826...
when constructing a sealed class, you're going to have explicit markers to every method for that object, when overriding a method you get a marker directly to the new function, the class does not have to look it up at runtime like in a dynamic class.
[ 0.08388300240039825, -0.13960425555706024, -0.019381411373615265, 0.2651970088481903, 0.07175926119089127, -0.16938915848731995, 0.14229907095432281, -0.0933612808585167, 0.031256936490535736, -0.6059656143188477, -0.4805312156677246, 0.12228237837553024, -0.24860064685344696, 0.1943059265...
I want to pass an integer value to a form in .Net so that it can load the right data. I'm using this so that when I double click on a record in a list, a form opens with the data from that record loaded so it can be edited. What is the best way to do this? Should I create a property and set it before calling the Show()...
[ 0.5106421709060669, -0.02485426515340805, 0.05741702765226364, -0.03367782011628151, -0.20224913954734802, -0.3995436728000641, 0.054201558232307434, -0.11466037482023239, -0.1983618438243866, -0.5305248498916626, 0.1897016167640686, 0.38819393515586853, -0.26279860734939575, 0.13968856632...
one value in to the form - only one value will be needed. It shouldn't really matter but this is in C++ .Net. I'd suggest something else. create a static method (to the form you want to open) - pass the parameter to the static method. leave it up to the static method to new up the form, load the data and call the S...
[ 0.30429548025131226, 0.035022564232349396, 0.4870530664920807, 0.16798116266727448, -0.21844834089279175, -0.36892181634902954, -0.10922727733850479, -0.34012892842292786, 0.016621340066194534, -0.38291454315185547, -0.0014668266521766782, 0.6558182835578918, -0.5557875037193298, 0.0317867...
it without copying the code.
[ 0.3089360296726227, 0.2767922282218933, 0.15796339511871338, 0.2832827568054199, 0.0084566380828619, -0.11726744472980499, 0.16978123784065247, -0.0925387591123581, 0.06965268403291702, -0.09847354888916016, -0.09037233144044876, 0.18282601237297058, -0.056625209748744965, 0.06436661630868...
I am trying to fade in a on mouseover and fade out on mouseout: ``` $("p.follow").mouseover(function(){ $(this).fadeTo("slow", 1.00); }) $("p.follow").mouseout(function(){ $(this).fadeTo("fast", 0.50); }) ``` If you go to ryancoughlin.com and on the right side, if you go over it you will see what ...
[ 0.17144103348255157, -0.1969679445028305, 0.8444080352783203, -0.5064288377761841, 0.35381755232810974, 0.22143366932868958, 0.6446570158004761, 0.21777617931365967, 0.28806671500205994, -0.6741663813591003, -0.30414819717407227, 0.40986359119415283, -0.33173108100891113, 0.245330139994621...
I use the jQuery [`hover`](http://docs.jquery.com/Events/hover) event to associate mouseover and mouseout event handlers such that child elements won't result in confusing behavior, and i use the [`stop()`](http://docs.jquery.com/Effects/stop) function to prevent animations from overlapping and canceling each other out...
[ -0.011323667131364346, -0.11935845762491226, 0.27026113867759705, 0.047298889607191086, 0.15530429780483246, 0.2682778239250183, -0.17935164272785187, 0.03568245843052864, 0.02532927691936493, -0.4937705993652344, -0.24043883383274078, 0.42845189571380615, 0.04994240030646324, -0.084750734...
I have some markup for a popup menu that works in firefox but not IE. The problem is that the popup pops under other elements and is impervious to the z-index value. A complete runnable example is below. Now, I know that one fix is not to position the divs as relative, but I can't do that because, in the real code, I'...
[ 0.03804895654320717, 0.016618182882666588, 0.501512348651886, -0.04699111357331276, -0.2003890573978424, -0.15375995635986328, 0.24074974656105042, 0.07528824359178543, 0.04009139910340309, -0.8020976185798645, -0.1204325258731842, 0.7218480110168457, -0.40376293659210205, -0.0334982983767...
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head><title>IE Problem</title> <style type="text/css"> .mydiv{ position: relative; background: yellow; border: solid 1px black; } table{background:bla...
[ -0.26408493518829346, -0.1254674792289734, 0.4533654749393463, -0.059834014624357224, -0.23737694323062897, 0.29381048679351807, 0.003355305176228285, -0.4731634259223938, -0.1006045937538147, -0.5385389924049377, -0.44087865948677063, 0.5131638050079346, -0.4999854564666748, -0.1165237277...
class="menu"><a href="#">Item 2</a></td></tr> </table> </div> </body> </html> ``` The z-index is scoped to within the parent if the parent has position: relative or position: absolute. The solution for your example is to add style="z-index: 2;" to the first "mydiv" and z-index: 1; to the second.
[ -0.0414716899394989, -0.21391068398952484, 0.5377568006515503, 0.13612550497055054, 0.14133556187152863, -0.02100321650505066, -0.133797287940979, -0.01766694337129593, 0.09084951132535934, -0.6669356822967529, -0.35140499472618103, 0.41970157623291016, 0.051365889608860016, 0.212548106908...
Am I doing something wrong or is it not possible to specify a generic class as a constraint to a generic method? I have been playing around with generics and [db4o](http://developer.db4o.com/) (open source object database) and am writing a test program (see code below) to store and retrieve some user defined generic c...
[ 0.3715933561325073, 0.13514365255832672, 0.13552060723304749, -0.11422019451856613, -0.10507478564977646, -0.1383005976676941, 0.483467698097229, -0.4307010769844055, -0.3719755709171295, -0.28231582045555115, 0.2369907945394516, 0.4080948233604431, -0.4148084223270416, 0.36875465512275696...
GetCollectionFromDb<MyCollection1>(Collection1Name); ``` The error message is: ``` The type 'GenericsTest.MyCollection1'cannot be used as type parameter 'T' in the generic type or method 'GenericsTest.Program.GetCollectionFromDb<T>(string)'. There is no implicit reference conversion from'GenericsTest.MyCollection1' ...
[ 0.13228116929531097, -0.07538966834545135, 0.5200810432434082, 0.02512270025908947, 0.018162602558732033, -0.023734550923109055, 0.36874398589134216, -0.24469029903411865, -0.09875194728374481, -0.07864399254322052, -0.2646712064743042, 0.6539182662963867, -0.3805162310600281, 0.3472086191...
} public class Entity2 { public string SomeProperty { get; set; } } public abstract class MyCollectionBase<T> : Collection<T> { protected MyCollectionBase() : this("") { }
[ 0.18143519759178162, -0.3407381772994995, 0.25435376167297363, 0.1076297014951706, 0.2345261424779892, -0.15937262773513794, 0.12484709173440933, 0.016745712608098984, -0.141326442360878, -0.33944785594940186, -0.2679106295108795, 0.5620375871658325, -0.2806682288646698, 0.2575312554836273...
protected MyCollectionBase(string pCollectionName) { CollectionName = pCollectionName; } public string CollectionName { get; set; } } public class MyCollection1 : MyCollectionBase<Entity1> {
[ 0.1168261244893074, -0.09959521144628525, 0.40858203172683716, 0.022727178409695625, 0.3979903757572174, -0.3262264132499695, -0.03723316639661789, -0.13865624368190765, -0.01787710189819336, -0.354547917842865, -0.15493892133235931, 0.7862797379493713, -0.3314387798309326, 0.2568770945072...
public MyCollection1(string pCollectionName) : base(pCollectionName) { } public void DoSomeWorkOnCollection1() {} } public class MyCollection2 : MyCollectionBase<Entity2> {
[ 0.06714172661304474, 0.054509229958057404, 0.3422802984714508, -0.10521902143955231, 0.30124691128730774, 0.013638834469020367, 0.09744914621114731, -0.17437367141246796, 0.14863146841526031, -0.610641598701477, 0.11869564652442932, 0.6063430905342102, -0.37523818016052246, 0.2221589833498...
public MyCollection2(string pCollectionName) : base(pCollectionName) { } public void DoSomeWorkOnCollection2() { } } public class Program {
[ 0.28143933415412903, -0.012448516674339771, 0.2387639582157135, -0.09887221455574036, 0.34894219040870667, 0.1533893495798111, 0.06330627202987671, -0.053524065762758255, 0.14400865137577057, -0.7264609336853027, 0.10362153500318527, 0.6605856418609619, -0.23425805568695068, 0.349761575460...
public static IObjectContainer db = null; public static void Main(string[] args) { const string Collection1Name = "Entity1Collection"; const string Collection2Name = "Entity2Collection"; db = Db4oFactory.OpenFile("Test.db");
[ 0.10566147416830063, -0.07724347710609436, -0.107575923204422, -0.07099556922912598, -0.09105570614337921, 0.07424355298280716, 0.5773218870162964, -0.29514580965042114, 0.1771421730518341, -0.026203760877251625, -0.25097593665122986, 0.44883421063423157, -0.5223855972290039, 0.34083598852...
Entity1 entity1 = new Entity1(); MyCollection1 collection1 = new MyCollection1(Collection1Name); collection1.Add(entity1); db.Store(collection1); Entity2 entity2 = new Entity2();
[ 0.1043219119310379, -0.04588370770215988, 0.38431644439697266, 0.03407765552401543, -0.0845983698964119, 0.18540678918361664, -0.038826439529657364, -0.5194715857505798, 0.020823277533054352, -0.1833045333623886, -0.10568867623806, 0.18964152038097382, -0.3626834750175476, 0.61803644895553...
MyCollection2 collection2 = new MyCollection2(Collection2Name); collection1.Add(entity1); db.Store(collection2); db.Commit(); db.Close(); db = Db4oFactory.OpenFile("Test.db");
[ 0.21345187723636627, 0.14655716717243195, 0.4335578978061676, 0.038618214428424835, 0.026615537703037262, 0.07292483001947403, 0.407868355512619, -0.5262396335601807, 0.2181534767150879, -0.3290386199951172, -0.18284954130649567, 0.2036953717470169, -0.32538846135139465, 0.4920510947704315...
MyCollection1 collection3 = GetCollectionFromDb<MyCollection1>(Collection1Name); } private static T GetCollectionFromDb<T>(string pCollectionName)
[ 0.10730161517858505, -0.3941895365715027, 0.5680240988731384, 0.06075846031308174, 0.20440185070037842, -0.0679359957575798, -0.06572718173265457, -0.07569064944982529, -0.20182983577251434, -0.14213350415229797, -0.08819892257452011, 0.5417467355728149, -0.47179293632507324, 0.37535518407...
where T : MyCollectionBase<T> { IList<T> queryResult = db.Query((T c) => c.CollectionName == pCollectionName);
[ 0.044080764055252075, -0.37950217723846436, 0.3452194035053253, -0.11283084750175476, 0.04726764187216759, 0.19369083642959595, -0.08836542069911957, -0.285110205411911, 0.1739206463098526, -0.4345092177391052, -0.04711291939020157, 0.5599151253700256, -0.52501380443573, 0.3384438753128052...
if (queryResult.Count != 0) return queryResult[0]; return null; } } } ``` Just follow the T: ``` // ... { //... MyCollection1 collection3 = GetCollectionFromDb<MyCollection1>(Collection1Name); } private static T GetCollectionFromDb<T>(string pC...
[ 0.018077485263347626, -0.4625643193721771, 0.7284415364265442, -0.01786850579082966, 0.13965724408626556, -0.1185062974691391, 0.045207325369119644, -0.2315663844347, -0.2565121650695801, -0.1271289885044098, -0.17087319493293762, 0.6894764304161072, -0.32383450865745544, 0.308447241783142...
: MyCollectionBase<T> { IList<T> queryResult = db.Query((T c) => c.CollectionName == pCollectionName); if (queryResult.Count != 0) return queryResult[0]; return null; } ``` would translate into: ``` private static MyCollection1 GetCollectionFromDb<MyCollection1>(string pCollection...
[ -0.1004820168018341, -0.08743514120578766, 0.7235227823257446, -0.20855222642421722, -0.09813621640205383, 0.07743894308805466, 0.0795031487941742, -0.41659626364707947, 0.12811186909675598, -0.3000432550907135, -0.11215293407440186, 0.6080267429351807, -0.4756273329257965, 0.5372158885002...
return null; } ``` Which is not what you want since MyCollection1 derives off MyCollectionBase< Entity1 > and not MyCollectionBase< MyCollection1 >, which is why you got the error. If you want the constraint to work, you will probably have to use a second type identifier to express the type being used in the gene...
[ 0.039511676877737045, 0.021049626171588898, 0.19609934091567993, -0.021131832152605057, 0.02064625918865204, -0.2083619385957718, 0.24163682758808136, 0.010253923945128918, -0.03431296721100807, -0.29040825366973877, 0.022216185927391052, 0.5321115851402283, -0.444039523601532, 0.378590077...
(Django 1.x, Python 2.6.x) I have models to the tune of: ``` class Animal(models.Model): pass class Cat(Animal): def __unicode__(self): return "This is a cat" class Dog(Animal): def __unicode__(self): return "This is a dog" class AnimalHome(models.Model): animal = models.ForeignKey(Animal) ``` I ...
[ -0.2347128987312317, 0.2740153968334198, 0.12140996754169464, -0.2615426480770111, -0.15913797914981842, -0.17239156365394592, 0.05782221257686615, -0.14282511174678802, -0.30436715483665466, -0.44427940249443054, -0.035979434847831726, 0.5139418840408325, -0.5822412371635437, -0.084869772...
a red herring wrt to this question, I think. Even if Animal was not supposed to be abstract, I still have the problem that, for some reason, since the ForeignKey is defined on Animal and not one of its subclasses, the superclass method is being called instead of the subclass. In OO programming when you call object.meth...
[ -0.043523579835891724, -0.08455846458673477, -0.049070246517658234, 0.0197620652616024, -0.08801266551017761, 0.11104367673397064, 0.10439040511846542, -0.038052041083574295, -0.19507908821105957, -0.4856603443622589, -0.004869306460022926, 0.4582538902759552, -0.253936231136322, 0.2034753...
not getting called at all because introspection on the Animal class reveals that it's not defined. So maybe if I define \_\_unicode\_\_ for Animal and have it call subclasses' \_\_unicode\_\_ I could get the desired effect. --- Okay, I think that I understand the ORM issues. Both these answers have helped me understa...
[ 0.10906269401311874, -0.16907049715518951, -0.2720658779144287, -0.06573951244354248, -0.25523388385772705, -0.12907052040100098, 0.4016897678375244, 0.1033836379647255, -0.4065113365650177, -0.3956841230392456, -0.16176319122314453, 0.5929332375526428, -0.4949395954608917, 0.0772605314850...
the superclass table. This PK in the subclass table is named superclass\_ptr. Based upon this I've concocted the following. I'd appreciate feedback. ``` Class Animal(models.Model) def __unicode__(self): if Dog.objects.filter(pk=self.pk).count() > 0: return unicode(Dog.objects.get(pk=self.pk)) elif Cat....
[ -0.27886271476745605, -0.14918993413448334, -0.14382465183734894, -0.02465570904314518, -0.18758520483970642, 0.42025429010391235, 0.2519519329071045, -0.5044198036193848, -0.13607721030712128, -0.5998755097389221, -0.3086601495742798, 0.31917524337768555, -0.4564450979232788, 0.1485910564...
unfortunately Django does not perform any work behind the scenes a la: "I'm an Animal. I know Animals have subclasses Dog and Cat. Specifically, I'm Animal number 3, and furthermore I just checked and there's a Cat number 3 too. That means that I'm actually Cat number 3". Even though this seems entirely possible and ve...
[ 0.17213667929172516, 0.5088465213775635, -0.06357749551534653, -0.4565935432910919, -0.2626994848251343, -0.2047254890203476, 0.1743522435426712, 0.04674534872174263, -0.5192204117774963, -0.030719077214598656, 0.03906765580177307, 0.5490844249725342, -0.43816938996315, -0.0697114244103431...
is being used as a superclass, so you get back an Animal object. To work around this: First, you want the base class to be non-abstract. This is necessary for the ForeignKey anyway, and also ensures that Dog and Cat will have disjunct primary key sets. Now, Django implements inheritance using a OneToOneField. Becaus...
[ -0.1589217334985733, 0.04423457756638527, -0.18377666175365448, -0.21509318053722382, -0.14822956919670105, -0.17415715754032135, 0.031180445104837418, -0.22069145739078522, -0.26798897981643677, -0.5512480735778809, -0.12213274091482162, 0.442877858877182, -0.5390520691871643, 0.042257320...
return self.dog.__unicode__() elif hasattr(self, 'cat'): return self.cat.__unicode__() else: return 'Animal' ``` This also answers your question to Ber about a **unicode**() that's dependent on other subclass attributes. You're actually calling the appropriate method on the sub...
[ -0.0642356276512146, 0.26057854294776917, -0.028955282643437386, -0.43272674083709717, -0.1456364542245865, 0.12925559282302856, 0.40277859568595886, -0.35425829887390137, -0.0947750061750412, -0.6428272128105164, -0.10668424516916275, 0.6123952865600586, -0.4634210467338562, -0.2565304338...
a Cat or Dog instance instead of an Animal. You'll have to take up that question with the devs. :)
[ 0.4007875323295593, 0.039139844477176666, 0.08912753313779831, 0.27709123492240906, -0.16921593248844147, 0.17740216851234436, 0.4211561381816864, -0.15475066006183624, -0.10920483618974686, -0.42949676513671875, 0.07981189340353012, 0.589883029460907, -0.4559724032878876, -0.0340304374694...
What is the equivalent of `/dev/null` on Windows? I think you want `NUL`, at least within a command prompt or batch files. For example: ``` type c:\autoexec.bat > NUL ``` doesn't create a file. (I *believe* the same is true if you try to create a file programmatically, but I haven't tried it.) In PowerShell, you ...
[ 0.35881689190864563, 0.07562615722417831, -0.17205724120140076, -0.12476009875535965, -0.01664939522743225, -0.25148358941078186, 0.29557374119758606, 0.09988521784543991, -0.20047467947006226, -0.38148757815361023, -0.13798990845680237, 0.5443867444992065, -0.3893440067768097, 0.179028257...
From the .net 4.0 previews I have read until now there has been lots of talk on how the next .net version will handle and use cpus with multiple cores. We will have additions like plinq that will help us make use of multiple cores. My question is why should I have to bother my mind with handling multiple cores when all...
[ 0.4476977586746216, -0.16061772406101227, 0.17520402371883392, 0.23931029438972473, -0.0457443967461586, -0.11581597477197647, 0.06773486733436584, 0.14551018178462982, -0.39516881108283997, -0.6748154759407043, 0.1112833321094513, 0.3458472788333893, -0.3216407895088196, 0.125206530094146...
misunderstanding, Could there be made a software that would expose a virtual thread to my application that would be 10 times faster because underlaying it was using 10 cores. I do not want to have different threads doing things in paralell, I just want my one thread running faster. I guess this is not a big problem to...
[ 0.32845818996429443, 0.06655995547771454, 0.02650916390120983, 0.5984082221984863, -0.07892525941133499, 0.12285808473825455, 0.02387157827615738, 0.17050200700759888, -0.48372122645378113, -0.7345800399780273, 0.44403740763664246, 0.43261682987213135, -0.20177061855793, 0.3434255421161651...
and already *is* done within a single core. Microparallelism is a lot easier than "analyse this whole program and make it run in parallel" for obvious reasons. In general, many of the difficult decisions which have to be made when writing a parallel program depend on what you want the program to do, and how it should b...
[ 0.6156055331230164, 0.14507344365119934, 0.01338484138250351, 0.48418793082237244, 0.23980647325515747, 0.10594990104436874, 0.012451283633708954, -0.06086553633213043, -0.39805299043655396, -0.561547040939331, 0.07910078018903732, 0.28522342443466187, -0.44855743646621704, 0.1248086541891...
of making it go faster. There's a really easy physical metaphor for this: a pregnancy takes 9 months. If you have 9 pregnant women, you can end up with 9 babies after 9 months, but you can't make 9 women have 1 baby in 1 month. It just doesn't work like that. Not all problems are parallelisable. (Fred Brooks: “The bear...
[ 0.32653799653053284, -0.049293406307697296, -0.22692878544330597, 0.2036960870027542, 0.16574005782604218, 0.9824709296226501, 0.4897499084472656, 0.329330176115036, -0.7831567525863647, -0.042708609253168106, 0.2951638996601105, -0.15643897652626038, -0.10990732163190842, 0.46253472566604...
Why whenever I compile and run the following code in Visual Studio 2008: ``` double value1 = 10.5; double value2 = 15.5; int whole_number = value1 + value2; Console::WriteLine(whole_number); ``` I get an incorrect value of 26 while the answer is 25. However when I use static casts on the doubles, I get the right an...
[ -0.09440766274929047, 0.23741476237773895, 0.002723517594859004, -0.36402884125709534, -0.2563212513923645, 0.05376451089978218, 0.48340216279029846, -0.5381137728691101, -0.06902651488780975, -0.3591082692146301, -0.0698540210723877, 0.5820902585983276, -0.40487566590309143, -0.2656980156...
you add, then you are going to add `10` and `15`, which results in `25` :)
[ 0.42513081431388855, 0.4551655650138855, 0.46211424469947815, -0.29321837425231934, 0.18307998776435852, 0.43153145909309387, 0.01011186745017767, -0.34010258316993713, -0.16065539419651031, -0.6420497894287109, -0.45845848321914673, 0.5242236852645874, -0.12840841710567474, -0.09236912429...
I've worked on a number of CMS systems using the .NET platform (the CMS management system is in ASP.NET, and the site which renders the content is both ASP.NET and PHP). I've traditionally stored the generated content in classes that serialize to XML, which is stored in MSSQL 2005/2008 in a varchar(max) field. This ha...
[ 0.2009292095899582, 0.363599568605423, 0.1741713583469391, 0.046469829976558685, -0.05383441224694252, -0.07297294586896896, -0.38116762042045593, 0.2634289860725403, -0.2877049744129181, -0.5219204425811768, -0.1312258094549179, 0.43977653980255127, 0.1661759465932846, 0.0721137672662735,...
shops, and if anyone likes or has serious issue with the approach I'm most familiar with. Good, bad, ugly? What would you do? I personally treat the data as any other data that would be stored in the system, for example I have a module built for DNN that stores collection of text data, I have the following collection ...
[ 1.2144017219543457, 0.052461013197898865, 0.601378321647644, 0.2607143521308899, 0.1022726446390152, 0.2196236401796341, 0.13993574678897858, 0.04278484731912613, -0.3369144797325134, -0.5095784068107605, -0.013486398383975029, 0.9070319533348083, -0.032031506299972534, -0.0821099728345871...
Question says it all, I've got a 500,000 line file that gets generated as part of an automated build process on a Windows box and it's riddled with **^M**'s. When it goes out the door it needs to **\*nix** friendly, what's the best approach here, is there a handy snippet of code that could do this for me? Or do I need ...
[ 0.3229227364063263, -0.06634508073329926, 0.3578678369522095, 0.22015173733234406, -0.127494677901268, 0.1809341162443161, -0.21739037334918976, -0.11146391928195953, -0.2743474543094635, -0.27463918924331665, 0.17277221381664276, 0.32005566358566284, -0.3311437666416168, 0.103651255369186...
in-place): ``` perl -pi dos2unix.pl file.dos ``` And here is my (naive) C version: ``` #include <stdio.h> int main(void) { int c; while( (c = fgetc(stdin)) != EOF ) if(c != '\r') fputc(c, stdout); return 0; } ``` You should run it with input and output redirection: ``` dos2unix.exe < fil...
[ -0.12116874754428864, -0.07347243279218674, 0.29653650522232056, -0.20745818316936493, 0.2910902500152588, 0.26820987462997437, 0.10715744644403458, -0.4972109794616699, 0.1750987321138382, -0.42261242866516113, -0.21282276511192322, 0.4992826282978058, -0.33605679869651794, 0.020679930225...
We have a large MS Access project that requires GUI functionality that is difficult / impossible to do in the VBA / access forms environment. Over time, we wish to re-write / migrate to a managed C# environment with WPF as the presentation layer. The only practical way for us to do this is over a longer period of ti...
[ 0.2608811557292938, 0.03739410638809204, 0.3556978404521942, 0.1849682480096817, 0.08338585495948792, -0.1683412790298462, 0.06879281252622604, -0.2083427757024765, -0.301556795835495, -0.8833746910095215, -0.1601671725511551, 0.5050711035728455, -0.13618028163909912, 0.055699046701192856,...
as we convert them? What if you look into Visual Studio Tools for Office (VSTO) ? You can write managed .NET addins for Office in C#, that will integrate as ribbons with office. Now, the problem is that Access add-ins are not supported in VSTO AFAIK. But, take a look [here](http://blogs.msdn.com/andreww/archive/2008/0...
[ 0.25868695974349976, -0.20376892387866974, 0.422893762588501, 0.27067044377326965, 0.00352287944406271, 0.25976264476776123, -0.11493096500635147, -0.17520026862621307, -0.508172869682312, -0.9438558220863342, -0.06890421360731125, 0.5134310722351074, -0.0745219811797142, 0.216059580445289...
move not only GUI, but build proper domain object model in C#. If you decide to try it out, let me know how it turned out :) Good luck anyway. PS something else which maybe is helpful? [Access 2007 Developer Extensions (ADE)](http://msdn.microsoft.com/en-us/office/bb229700.aspx)
[ -0.14054666459560394, -0.2495921552181244, 0.582344114780426, 0.19428271055221558, 0.31546923518180847, 0.048863913863897324, -0.07235664874315262, 0.050953783094882965, -0.37978482246398926, -0.7793220281600952, -0.1923152506351471, 0.46502044796943665, 0.03749731928110123, -0.12141890078...
I know FireBug with YSlow has to be by far my personal favourite. I also use IE developer toolbar when forced to test pages in IE. Is there any other jewels out there hiding?? I use the [Web Developer Extension](https://chrispederick.com/work/web-developer/) for Firefox, has tons of useful options. [![https://addons.m...
[ 0.16210032999515533, 0.10815992206335068, 0.35108882188796997, -0.03009009175002575, -0.2534443140029907, 0.07579046487808228, 0.2976478040218353, 0.09430012851953506, -0.3824910819530487, -0.5401789546012878, -0.1401241421699524, 0.6770622730255127, -0.20280452072620392, -0.17360782623291...
How to solve "Must be MarshalByRefObject" in a good but multiple-inheritance amputated language like C#? The problem is very simple, in several cases you just have to inherit from this class (infrastructure requirements). It does not matter here really, which cases. So, what do you do if you've already inherited from ...
[ 0.43590039014816284, 0.2097008377313614, -0.16571573913097382, 0.34711939096450806, 0.055160585790872574, -0.3976835608482361, 0.3904900848865509, -0.27467986941337585, -0.2518136501312256, -0.5542100071907043, -0.10173256695270538, 0.4026719331741333, -0.10619520395994186, 0.0952061638236...
want to make an object MarshalByRef if you're going to use it in a Remoting / WCF context. This is usually a special-enough case that it's not a pain. Suppose you had a general type, and you wanted to derive from it and specialise it, and then remote the derived type - now you have a problem, because to be remoted an ...
[ 0.14139848947525024, -0.06679403781890869, -0.04319462925195694, 0.06308779120445251, 0.07187063246965408, -0.22980915009975433, 0.2560482621192932, -0.276675283908844, -0.4452197551727295, -0.21357110142707825, -0.31832781434059143, 0.18384861946105957, -0.32918432354927063, 0.22593872249...
C# (and .NET in general) doesn't allow MI, you can't inherit from both. The short answer is that you're sort-of screwed. You either change the general type to inhert from MarshalByRefObject (or go far enough up the chain that you can insert it somewhere effective), or else you can think about mucking about with proxy ...
[ 0.19416144490242004, -0.04680411517620087, 0.14541856944561005, 0.08187804371118546, 0.24255789816379547, -0.23277288675308228, 0.13989011943340302, 0.028917603194713593, 0.08472749590873718, -0.3353370726108551, -0.08779892325401306, 0.29194167256355286, -0.5104307532310486, 0.24516245722...
instance of that proxy type which would instantiate your type and do the work as expected - but all return types from methods have to be [Serializable]. ``` public interface IMyType { string SayHello(); string BaseTypeMethodIWantToUse(); } public class MyType : MyBaseType, IMyType { public string SayHello...
[ 0.2941247224807739, 0.30154797434806824, 0.5675804615020752, -0.18907247483730316, 0.17013005912303925, -0.03183157369494438, 0.3879537284374237, -0.34816503524780273, -0.019844813272356987, -0.7189837694168091, -0.19934237003326416, 0.3886224627494812, -0.5219807624816895, 0.3553714752197...
} public string BaseTypeMethodIWantToUse() { return _instance.BaseTypeMethodIWantToUse(); } } ``` Seems like a lot of work, though. Ultimately if you're in this scenario I'd suggest a redesign or a rethink.
[ 0.20764006674289703, 0.028453253209590912, -0.09849370270967484, -0.18313340842723846, 0.2959810197353363, -0.14495015144348145, 0.3509458005428314, -0.11152609437704086, 0.1728246510028839, -0.6985602378845215, -0.08080248534679413, 0.803217887878418, -0.23765648901462555, 0.2677938044071...
I'm looking for your best solutions for creating a new message instance based on a pre-defined XSD schema to be used within a Biztalk orchestration. Extra votes go to answers with clear & efficient examples or answers with quality referenced links. What exactly are you looking for? Is it just creating a new message wi...
[ 0.5754052400588989, 0.11678248643875122, 0.044259294867515564, 0.4901092052459717, -0.10515693575143814, 0.13593845069408417, 0.13059869408607483, 0.10103520005941391, -0.3102152347564697, -0.6518747210502625, 0.1751164346933365, 0.2146424502134323, -0.23312793672084808, 0.0720555633306503...
then I've found that putting them as embedded resources in a helper C# assembly to be a pretty clean way of doing it.
[ 0.36788028478622437, 0.17637494206428528, 0.07871169596910477, 0.013396012596786022, 0.06349661201238632, -0.04669586196541786, -0.04210682958364487, 0.1810537874698639, -0.2930554151535034, -0.5426265001296997, 0.07707860320806503, 0.5051707625389099, 0.292779803276062, 0.0741722509264946...
I am using the FlexiGrid jQuery plug in and I need to get a JSON object back form my MVC App, simple enough if the FlexiGrid took just the object but I need to add a few items to the response string for it to work properly with FlexiGrid. So here is a portion of my controller code: ``` If Request.QueryString("json") ...
[ -0.04278789833188057, -0.4810430705547333, 1.1544610261917114, -0.0627312883734703, -0.13386377692222595, 0.03825755789875984, 0.23671451210975647, -0.3445920944213867, -0.3272138833999634, -0.7376355528831482, -0.2847183048725128, 0.7766026854515076, -0.5743815898895264, -0.13682855665683...
Return Content(data.ToString()) End If ``` Unfortunately in the above code `Json(objCustomerList)` returns 'System.Web.MVV.JsonResult' instead of the desired JSON string data. I also tried `Json(objCustomerList).ToString()` just to see what would happen and the same thing again. Any ideas? I ended up modifiying the ...
[ 0.06757200509309769, -0.1604403704404831, 0.45429089665412903, 0.011634478345513344, -0.3839397430419922, -0.06847688555717468, 0.31553179025650024, -0.2097407728433609, -0.21689698100090027, -0.5518507361412048, -0.36373376846313477, 0.5428890585899353, -0.5647136569023132, 0.289079397916...
Public total As Integer Public rows As New List(Of FlexigridRow)() End Class Public Shared Function GetFlexiGridJSON(ByVal page As Integer, ByVal total As Integer, ByVal o As Object) As String Dim js As New JavaScriptSerializer Dim flexiGrid As New FlexigridObject Dim i As Inte...
[ 0.05001235008239746, -0.5542338490486145, 0.6708182096481323, -0.22317609190940857, -0.642495334148407, 0.18681155145168304, 0.29267850518226624, -0.27091485261917114, -0.1483181267976761, -0.5854797959327698, -0.36036545038223267, 0.6344069242477417, -0.5096836090087891, 0.005121910013258...
flexiGrid.total = total For Each c In o Dim r As New FlexigridRow() r.id = i r.cell = GetPropertyList(c) flexiGrid.rows.Add(r) i += i Next
[ -0.10806866735219955, -0.43065354228019714, 0.8588765263557434, -0.276500403881073, 0.05163739249110222, 0.4425400197505951, -0.1336723119020462, -0.6194570660591125, -0.49574118852615356, -0.7880488634109497, -0.20009030401706696, 0.4150526821613312, -0.5417248010635376, 0.135779470205307...
Return js.Serialize(flexiGrid) End Function Private Shared Function GetPropertyList(ByVal obj As Object) As List(Of String) Dim propertyList As New List(Of String)() Dim type As Type = obj.[GetType]() Dim properties As PropertyInfo() = type.GetProperties(BindingFlags.Instance Or Bindi...
[ -0.10467636585235596, -0.38815072178840637, 0.6692196726799011, -0.22339048981666565, -0.0646711140871048, 0.05136328935623169, 0.27074745297431946, -0.38328200578689575, -0.20562796294689178, -0.4764084815979004, -0.5492652654647827, 0.6437644362449646, -0.40450045466423035, 0.29285264015...
propertyList.Add(If(o Is Nothing, "", o.ToString())) Next Return propertyList End Function End Class ``` Now in my controller I just call: ``` Return Content(GetFlexiGridJSON(pageIndex, TotalCount, objCustomerList)) ``` As long as the object I pass is a list of objects it works perfectly.
[ -0.00435420498251915, -0.251858651638031, 0.9230612516403198, -0.022697733715176582, 0.11425349861383438, -0.5406595468521118, 0.2823135554790497, -0.14311298727989197, -0.06598963588476181, -0.8142426609992981, -0.4195609390735626, 0.6740326881408691, -0.19314616918563843, 0.1870595365762...
In T-SQL, SPACE() function is used to add spaces to a string. For e.g. ``` @s = 'He' + space(5) + 'llo' ``` Output ``` He llo ``` So is there any function in PL/SQL that is equivalent to SPACE()? Thank you. You can use RPAD or LPAD functions ``` select 'He' || rpad(' ',5,' ') || 'llo' from dual; / ``` o...
[ 0.19220955669879913, -0.014309640973806381, 0.4205194413661957, -0.08351060748100281, -0.13748840987682343, 0.2679804265499115, -0.2341470569372177, -0.15511475503444672, 0.023561615496873856, -0.468730628490448, -0.5766895413398743, 0.4550848603248596, -0.37933915853500366, 0.033080745488...
How to declare a static dictionary object inside a static class? I tried ``` public static class ErrorCode { public const IDictionary<string, string> ErrorCodeDic = new Dictionary<string, string>() { { "1", "User name or password problem" } }; } ``` But the compiler complains that "*A const ...
[ -0.15423770248889923, -0.012637614272534847, 0.16137979924678802, -0.28590917587280273, -0.17465871572494507, 0.09466158598661423, 0.36542224884033203, -0.12203501909971237, 0.056890819221735, -0.35533711314201355, -0.1568802297115326, 0.561948835849762, -0.40320804715156555, 0.14197961986...
= new Dictionary<string, string> { { "1", "Error One" }, { "2", "Error Two" } }; ``` If you want to dictionary items to be readonly (not just the reference but also the items in the collection) then you will have to create a readonly dictionary class that implements IDictionary. Check out ReadOnlyCollection ...
[ 0.19253535568714142, -0.1598784178495407, 0.22685874998569489, -0.12199516594409943, 0.028833623975515366, 0.03185618668794632, 0.2627318799495697, -0.3831319510936737, 0.10583769530057907, -0.49459338188171387, -0.0103511493653059, 0.7080889344215393, -0.30092892050743103, 0.1329874992370...
How do I use [XPathNavigator.Evaluate](http://www1.cs.columbia.edu/~lok/csharp/refdocs/System.Xml.XPath/types/XPathNavigator.html#Evaluate(System.String)) ( or other methods in XPathNavigator) to obtain the ISBN value for the following xml input? ``` <?xml version="1.0"?> <!-- a fragment of a book store inventory data...
[ -0.5295220613479614, 0.1226445809006691, 0.7059603333473206, -0.0037129863630980253, -0.17612017691135406, 0.2884819805622101, 0.19541579484939575, -0.7524656653404236, 0.006096556317061186, -0.030380040407180786, 0.3262719511985779, 0.006516646593809128, 0.31454965472221375, 0.13467057049...
<price>29.95</price> </book> <book genre="novel" publicationdate="1991" bk:ISBN="1-861001-57-6"> <title>Emma</title> <author> <first-name>Jane</first-name> <last-name>Austen</last-name> </author> <price>19.95</price> </book> <book genre="novel" publicationdate="1982" bk:ISBN="1-86100...
[ -0.46999824047088623, 0.3430366814136505, 0.4966457486152649, 0.0004172463668510318, -0.4891487956047058, 0.36899229884147644, 0.15218836069107056, -0.39911267161369324, -0.17822469770908356, 0.23489610850811005, 0.03715403750538826, 0.3361847996711731, -0.1606973558664322, 0.4390879571437...
= new Dictionary<string, string> { { "1", "Error One" }, { "2", "Error Two" } }; ``` If you want to dictionary items to be readonly (not just the reference but also the items in the collection) then you will have to create a readonly dictionary class that implements IDictionary. Check out ReadOnlyCollection ...
[ 0.19253535568714142, -0.1598784178495407, 0.22685874998569489, -0.12199516594409943, 0.028833623975515366, 0.03185618668794632, 0.2627318799495697, -0.3831319510936737, 0.10583769530057907, -0.49459338188171387, -0.0103511493653059, 0.7080889344215393, -0.30092892050743103, 0.1329874992370...
StackOverflow, you're my only hope! I am unfortunate enough to have inherited an ASP.NET 3.5 application roughly 3/4 in development. This project uses Crystal Reports Basic for VS 2008 to generate a PDF file from a data source. Pretty straightforward. Anyway, this project compiles and runs fine on my development mach...
[ -0.21072405576705933, 0.1393321007490158, 0.6819495558738708, 0.06846252828836441, 0.17464004456996918, -0.09418254345655441, 0.25330787897109985, -0.2139272391796112, -0.4443131685256958, -0.396557480096817, 0.20422349870204926, 0.6486042141914368, -0.21990203857421875, -0.061268843710422...
during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: Error in File C:\WINDOWS\TEMP\Report {D3596595-5217-4888-A770-72427B29DE27}.rpt: The user function man...
[ -0.053635288029909134, 0.4880649447441101, 0.5149978399276733, -0.04859273135662079, -0.007505211513489485, -0.13592016696929932, 0.6476665735244751, -0.07805061340332031, -0.35195350646972656, -0.6191137433052063, -0.08671510964632034, 0.731515109539032, -0.29302456974983215, 0.2099269777...
the file **ufmanager.dll** in **C:\Program Files (x86)\Business Objects\Common\2.8\bin**, but I don't know where my app is looking for it. I even tried sticking it in the "bin" folder of my app, but no luck. If any kind soul happens to have seen this error before and knows the fix, I would be *seriously* grateful. Hav...
[ 0.1650991141796112, 0.2291809320449829, 0.706993818283081, -0.1573885828256607, -0.21604429185390472, -0.058250173926353455, 0.575344979763031, -0.11231846362352371, -0.21035178005695343, -0.5782404541969299, -0.022243358194828033, 0.9413679838180542, -0.364398330450058, 0.0982849374413490...
web.config as well as the aspx files which use the CR viewer).
[ 0.2574268877506256, -0.13905711472034454, 0.5897794365882874, 0.29373446106910706, -0.012085438705980778, -0.35830551385879517, -0.15031687915325165, 0.1376103162765503, -0.6291877627372742, -0.902570366859436, -0.3387914001941681, 0.32332736253738403, -0.20234857499599457, 0.2099574953317...
I'm a complete beginner when it comes to programming. I'm taking a stab at PHP, and have seen how powerful the frameworks can be. But should I even consider trying to work with a framework until I have a strong grasp of PHP itself? Note: I'd most likely be using CodeIgnitor, but the question applies to any of the fram...
[ 0.6038529276847839, 0.28514641523361206, -0.19699819386005402, 0.24244526028633118, -0.19484534859657288, -0.34941619634628296, 0.5100542306900024, 0.05990968272089958, -0.02038847655057907, -0.6897781491279602, 0.22057896852493286, 0.6793262362480164, 0.21779966354370117, -0.3060836493968...
experience and start to wonder what's the best way to solve some common problems you have faced before - that will be a good time to give frameworks a try. I would suggest you try to read some of the source code of the different frameworks and see if it makes sense to you. If it doesn't - you are probably not ready ye...
[ 0.4776325821876526, 0.19335679709911346, -0.10206586122512817, 0.44329187273979187, 0.03339476138353348, -0.05292487516999245, 0.33588191866874695, 0.21055354177951813, 0.06688334047794342, -0.7758650779724121, 0.46557047963142395, 0.5836095809936523, 0.3610158860683441, 0.0115984408184885...