text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
If I have an unmanaged pointer and I want to transfer a specified number of bytes from that location to a Byte array, what is the best way to do this? i.e. what is the equivalent of Marshal.PtrToString\* methods but where the destination is a Byte() Thanks `Marshal.Copy` has overloads for copying byte arrays to/from ...
[ 0.4269562065601349, 0.03975123539566994, 0.3333415687084198, 0.25726068019866943, 0.06762921065092087, -0.22945497930049896, 0.062398649752140045, -0.25765883922576904, -0.36329981684684753, -0.6829007267951965, 0.1049320176243782, 0.7698986530303955, -0.21197721362113953, 0.15192534029483...
I'm stuck trying to figure out a solution for the problem below. It's quite complicated. So stay with me. I retrieve a field from the `user` table which has his friends' user ids in the form of CSV (3,4,5,6,7) There is another table called `transaction` which looks something like this ``` tid user1 user2 type...
[ 0.4956686794757843, 0.15154866874217987, 0.4976506233215332, 0.18889828026294708, 0.42460522055625916, 0.035668566823005676, -0.2737404406070709, -0.4329838752746582, -0.20364812016487122, -0.38470685482025146, 0.14509446918964386, 0.3550805151462555, -0.11941900849342346, -0.0282561052590...
6 7 bargain 4 4 3 barter 5 3 7 share ``` Now I need to display the transactions of my friends. So I split the CSV, put them in an array and for each friend I'm running the query ``` friends = explode(",","3,4,5,6,7"); for($i=0;$i<=count(friends);$i++) { // I execute...
[ 0.28241869807243347, 0.030918234959244728, 0.528979480266571, -0.0368085578083992, 0.15459492802619934, -0.025618482381105423, 0.16882219910621643, -0.5537519454956055, -0.1181926354765892, -0.2320069968700409, 0.0448840968310833, 0.6640149354934692, -0.3038041591644287, 0.2915450632572174...
or user2 = friends[$i] } ``` Now the same happens for 3, 4, 5, 6, and 7 When the query executes for `4`, the same result comes and hence I'm getting duplicates. I've tried everything. But I'm unable to figure this out. Can someone please suggest a better solution or can this itself be modified? In this particular c...
[ -0.2545788884162903, 0.33035343885421753, 0.14175604283809662, -0.26024049520492554, 0.29011887311935425, 0.13185057044029236, 0.23355156183242798, -0.09218695014715195, -0.3557909429073334, -0.5305279493331909, 0.18112273514270782, 0.6465440988540649, -0.46306079626083374, 0.1270367950201...
Consider the following piece of code. ``` <html> <body> <script> var x = 5; //globally declared function showX() { alert("x="+x); //trying to display global value var x=10; //trying to create and initialize a local x } </script> <input type = "button" value="Show X" onclick="showX()"> </body> </html...
[ -0.11233415454626083, 0.007347920909523964, 0.48019319772720337, -0.25069746375083923, -0.05496329069137573, -0.26655080914497375, 0.13366219401359558, -0.072679802775383, -0.3253568708896637, -0.38943034410476685, -0.33989211916923523, 0.3568251430988312, -0.6495599746704102, 0.0738005191...
the > variables are defined with > function-local scope in that function, > as described in s10.1.3. Otherwise, > they are defined with global scope > (that is, they are created as members > of the global object, as described in > 10.1.3) using property attributes { DontDelete}. Variables are created > when the...
[ -0.036124590784311295, -0.23675978183746338, 0.34023094177246094, 0.17125555872917175, -0.07184667885303497, 0.11690474301576614, 0.19988900423049927, -0.2453785240650177, -0.07426352798938751, -0.5658532977104187, -0.38595256209373474, 0.32960382103919983, -0.39155030250549316, 0.41344103...
AssignmentExpression when > the VariableStatement is executed, not > when the variable is created. So it's not a bug - the local variable is created when the function is entered.
[ -0.2510158121585846, -0.20742355287075043, -0.02521502785384655, 0.1343654841184616, -0.1143878772854805, -0.2974741458892822, 0.3004574179649353, 0.21340671181678772, -0.1427033692598343, -0.5928389430046082, -0.07381687313318253, 0.6944868564605713, -0.6428461074829102, 0.040836546570062...
I'm creating an automated tests that should navigate back a few steps. Is it possible to do so in Watir?? I'm navigating to a resultlist page and want to go back to the start of my test just by clicking back (windows browser). Thnx If you have a Watir::IE object, then #back is a method that does what you are looking f...
[ 0.3391495943069458, 0.02361135557293892, 0.020676039159297943, -0.09076695889234543, -0.2760893702507019, 0.1369757354259491, 0.6908389925956726, -0.2484278529882431, 0.013734385371208191, -0.7371953725814819, 0.3650352358818054, 0.5206133127212524, -0.2959202527999878, -0.0472374036908149...
I have the same problem as in the question [Programmatically added User Control does not create its child controls](https://stackoverflow.com/questions/577353/programmatically-added-user-control-does-not-create-its-child-controls). After reading the question and answer I changed my code which now looks like this: ```...
[ -0.21065934002399445, 0.14898522198200226, 0.3561714291572571, -0.1902293860912323, 0.26771125197410583, 0.17839674651622772, 0.12576647102832794, -0.15937982499599457, -0.2261972874403, -0.526630163192749, -0.01686975732445717, 0.5374848246574402, -0.2766605317592621, 0.31240490078926086,...
taskListItemHolder.Controls.Add(taskListItem); } ``` However, I'm still getting a user control whose child controls haven't been instantiated. Any idea what I'm doing wrong? Thanks in advance You probably want to use this instead: ``` foreach (ITask task in tasks) { TaskListItem taskListItem = LoadControl("~/Tas...
[ -0.24770011007785797, -0.11302591115236282, 0.2749175727367401, 0.053008757531642914, 0.2972378432750702, -0.00828305073082447, 0.18377970159053802, -0.32147514820098877, -0.30919986963272095, -0.6062373518943787, -0.17304831743240356, 0.5301046967506409, -0.4524126648902893, 0.10935395956...
MSDN](http://msdn.microsoft.com/en-us/library/ewtd66a0.aspx) (at the bottom, in the community content).
[ -0.053678981959819794, -0.0521029494702816, 0.3025319278240204, 0.07486499100923538, 0.08943827450275421, -0.17344555258750916, 0.007073292508721352, 0.14312241971492767, -0.5407090187072754, -0.5875023007392883, -0.43121200799942017, 0.1456291377544403, -0.2333817481994629, 0.259394943714...
I'm writing a game in JOGL and need to represent the in-game character. I plan to use skeletal animation for the character movements, and of course the character will be skinned. I can't seem to find any good model loaders for JOGL so I plan to load the filetype myself, based on specs or something. I also plan to use B...
[ 0.13080190122127533, -0.12327726185321808, 0.5531761646270752, 0.16089588403701782, -0.023301880806684494, 0.40840616822242737, -0.13696712255477905, 0.2781504690647125, -0.17567868530750275, -0.9257619380950928, 0.2866344749927521, 0.6682855486869812, 0.00455921096727252, -0.1638853996992...
the loader without having to deobfuscate some random file format, and it needs to support the aforementioned features. Any other info you can give regarding why you chose it and why it's best would be very helpeful too! Thanks! EDIT: I will be writing a Blender MS3D exporter. When I'm finished I will post it [here](h...
[ 0.1563268005847931, -0.015464911237359047, 0.7115699052810669, -0.19890043139457703, -0.41084134578704834, -0.2583707571029663, -0.0372994989156723, 0.18623703718185425, -0.23934784531593323, -0.43759220838546753, -0.053390808403491974, 0.7370409965515137, -0.2739642560482025, -0.289299994...
stuff (which is why I was avoiding Java3D) I think it'll be my best bet to join forces with it, so that's what I'm up to. First of all, thank you to the other two answerers. Also basszero you were right about the blend file, and I should've checked Wikipedia first! It is a near-useless binary dump of Blender's memory. ...
[ 0.38276898860931396, -0.08733634650707245, 0.36071768403053284, -0.020387493073940277, -0.14717097580432892, -0.459159255027771, 0.02485755644738674, 0.21528391540050507, -0.253775030374527, -0.680465042591095, 0.11204477399587631, 0.5969160199165344, -0.15008525550365448, -0.1145391985774...
It ended up being a great decision, because it made me realize, I didn't actually know the difference between an object and a group, and I also didn't know much about materials. It helped me establish the code for these 3D structures. Both answers recommend XML-based formats. I don't want an XML format. I do not belie...
[ 0.4115685224533081, 0.3295341432094574, 0.1341574490070343, 0.3246974050998688, -0.08228414505720139, -0.05056871846318245, -0.08829306066036224, -0.05830663442611694, -0.0669894814491272, -0.7192652821540833, -0.10040494054555893, 0.4481140375137329, -0.018043821677565575, 0.0521749556064...
speaking), it does not have to be flexible or human-readable, and something that I can write an importer for, rather than relying on XML libraries. basszero even said, "at the cost of being XML," and he's completely right; it's a cost that I don't feel is worth the burden. My OBJ loader is done. I separated it from th...
[ -0.07072435319423676, -0.24338829517364502, 0.32616493105888367, 0.1033157929778099, -0.11785633862018585, -0.10422423481941223, 0.12779377400875092, -0.05646466836333275, -0.27012982964515686, -0.7477020025253296, 0.095695361495018, 0.5740413069725037, -0.2446298748254776, -0.077733777463...
ms3d format. The ms3d format supports skeletal rigging (joints) and keyframe skeletal animation, and furthermore supports a texture map and alpha map. In addition, it is an easily-computer-readable binary format that wastes no space (like XML and OBJ do) with human readable tags and labels and such. Blender, unfortun...
[ 0.16406722366809845, 0.11424009501934052, 0.583878219127655, -0.17885765433311462, -0.41933923959732056, -0.062470849603414536, -0.16782234609127045, 0.16855986416339874, 0.0658176839351654, -0.7028322815895081, -0.08669755607843399, 0.5135160684585571, -0.584328293800354, -0.0221894644200...
I've seen of other scripts. The Java side of things should be easy, in fact it will be even easier than the OBJ format because ms3d is more structured. I found [specifications](https://web.archive.org/web/20120404020609/http://local.wasp.uwa.edu.au/~pbourke/dataformats/ms3d/ms3dspec.h) for the ms3d format online, in C...
[ 0.35831955075263977, 0.1780838966369629, 0.19236545264720917, -0.024469196796417236, -0.5043492913246155, -0.09222166240215302, 0.42925897240638733, 0.06446561217308044, -0.03877703472971916, -0.7122018337249756, -0.06926736980676651, 0.45414018630981445, -0.11524051427841187, 0.1304045319...
this is the best solution. And basszero, you are absolutely right, as I've seen from my OBJ loader: "Once you've got it all read in, organization of data (display list, textures, vertex array, vertex buffer, etc) and rendering are a completely different beast." Cruachan: no Java3D for me, I'm sticking with JOGL. I do...
[ 0.027853859588503838, 0.0171789713203907, 0.32998648285865784, 0.17717894911766052, -0.06555702537298203, -0.021449657157063484, 0.3882586658000946, 0.20535634458065033, -0.39264267683029175, -0.8433399200439453, -0.10349848866462708, 0.6917612552642822, -0.2602577805519104, -0.12095806747...
I'm working on a social network web application, and I got a situation where I need to resend reminder emails to users who haven't activated their emails. The problem is when I investigated the DB I found that many emails are duplicated (there was no validation on the email uniqueness apparently. So what I need to do...
[ 0.5228318572044373, 0.4027569890022278, 0.3054769039154053, -0.13959559798240662, -0.08763045817613602, 0.08906159549951553, 0.49561408162117004, 0.014032002538442612, -0.5299966931343079, -0.33413609862327576, 0.1232205405831337, 0.41709044575691223, -0.30453112721443176, -0.0144926803186...
user john with email john@hotmail.com and user john1 with email john@hotmail.com too, I want to retrieve only one of these johns no matter john1 or two) so I thought of tailing the SQL query by (Group By Email). The thing is that I can't select other fields that are not in the group by clause. the solution that I hav...
[ 0.14360743761062622, 0.28665515780448914, 0.4155868887901306, -0.28058433532714844, -0.3131563067436218, 0.09192401170730591, 0.19755414128303528, 0.04061765596270561, -0.3820424973964691, -0.43004605174064636, 0.31899502873420715, 0.4081585109233856, -0.4264167845249176, 0.144555807113647...
if it's not there, I send to it and then add the email to the list. Something like the following: ``` if(!EmailIsInList(email)){ SendActivationEmail(email); AddEmailToList(email) } else { DoNotSend); } ``` Actually I got the problem solved this way, still, I don't like my solution. Any ideas? If we assume t...
[ 0.10256261378526688, -0.04227348789572716, 0.502672553062439, -0.2207040637731552, -0.03948220610618591, 0.0066329254768788815, 0.19297108054161072, -0.27853190898895264, -0.16976211965084076, -0.8288570046424866, 0.02078932337462902, 0.6098109483718872, -0.441882848739624, -0.017216488718...
= 'False' AND NOT EXISTS ( SELECT 1 FROM users AS u2 WHERE u2.email = u1.email AND u2.activated = 'True' ) GROUP BY email ``` You really do want to make sure the email field is indexed, and if it was indexed with a unique composite key of (email, userid) then this would ...
[ 0.1611342579126358, 0.11355413496494293, 0.35198071599006653, -0.026472508907318115, -0.042124826461076736, -0.3163749575614929, 0.2193104326725006, -0.2469293773174286, -0.18266521394252777, -0.5139651298522949, -0.03250199928879738, 0.2256622463464737, -0.21698138117790222, -0.1133736446...
I want to write a RegEx to pull out all the variable values and their names from the variable declaration statement. Say i have int i,k = 10,l=0 i want to write a regex something like int\s^,?|(^,?)\* but this will also accept k = 10 i.e. (without int preceding it) Basically idea is If string starts with int then get...
[ -0.08930210024118423, -0.12447371333837509, 0.5169997215270996, 0.01249555591493845, -0.138119176030159, 0.2159581184387207, 0.1231837049126625, -0.15735095739364624, -0.10697771608829498, -0.5468791127204895, -0.08374911546707153, 0.3747871518135071, -0.37614718079566956, 0.04931984096765...
(comma // next var | '='number // initialization ) ...` ``` then try to convert each group: ``` ^ \s* \w+ \s+ \w+ ? (',' | '=' \d+ ) ... line some type
[ -0.2572934031486511, -0.04717235267162323, 0.5836787819862366, -0.2640536427497864, -0.08217360079288483, 0.3283868432044983, 0.20689532160758972, -0.41677048802375793, 0.15324027836322784, -0.5850229263305664, -0.3435322344303131, 0.14955955743789673, -0.4153516888618469, 0.14374560117721...
at least var optionally more or init some start spaces (some chars) one space (some chars) vars val digits ``` Left as homework to remove spaces and fix up the final regex.
[ -0.22096407413482666, -0.2564418911933899, 0.1381058543920517, -0.10348085314035416, -0.14252756536006927, 0.13990935683250427, 0.37444669008255005, -0.02744608372449875, 0.07077132165431976, -0.32006850838661194, -0.30971214175224304, 0.5632665753364563, 0.12514609098434448, -0.3700295388...
In a [previous question](https://stackoverflow.com/questions/585215/can-i-rewrite-this-more-elegantly-using-linq) about formatting a `double[][]` to CSV format, [it was suggested](https://stackoverflow.com/questions/585215/can-i-rewrite-this-more-elegantly-using-linq/585223#585223) that using `StringBuilder` would be f...
[ 0.20003950595855713, -0.04218072444200516, 0.3399450182914734, -0.11719515919685364, -0.024187298491597176, -0.22501927614212036, 0.39499741792678833, -0.4652539789676666, -0.3686501681804657, -0.5465763807296753, -0.26897409558296204, 0.23128409683704376, -0.30379074811935425, -0.13434776...
the memory cache more times than necessary. If you *don't* have the strings as an array beforehand, it's *probably* faster to use `StringBuilder` - but there will be situations where it isn't. If using a `StringBuilder` means doing lots and lots of copies, then building an array and then calling `String.Join` may well...
[ 0.22179044783115387, -0.09383972734212875, 0.06488296389579773, 0.11185014992952347, 0.00023231797968037426, 0.025946563109755516, 0.18088898062705994, -0.3414602279663086, -0.2390017956495285, -0.6278094053268433, 0.027830038219690323, 0.5528539419174194, -0.1843118965625763, 0.0804800614...
more complex and harder to guess about. I would be surprised to see either way "win" significantly (in complexity terms) with typical data. EDIT: When I'm at home, I'll write up a benchmark which is as painful as possibly for `StringBuilder`. Basically if you have an array where each element is about twice the size of...
[ 0.34871622920036316, 0.05827820673584938, 0.27859702706336975, 0.06799490004777908, -0.12992306053638458, -0.04682224988937378, 0.2058652937412262, -0.09730637073516846, -0.3367086946964264, -0.6692004203796387, -0.009787141345441341, 0.4134120047092438, -0.04972327500581741, 0.04064600914...
concatenation - but `String.Join` will have no problems.
[ -0.48748940229415894, -0.13291718065738678, 0.35447967052459717, -0.09951217472553253, -0.41398778557777405, -0.22161917388439178, 0.08256518840789795, 0.22798997163772583, 0.2063703089952469, -0.4245949685573578, -0.5733852386474609, 0.1796475350856781, -0.2886134386062622, 0.270823299884...
I made a little WPF application with a SQL CE database. I built the following code with LINQ to get data out of the database, which was surprisingly easy. So I thought "this must be LINQ-to-SQL". Then I did "add item" and added a "LINQ-to-SQL classes" .dbml file, dragged my table onto the Object Relational Designer b...
[ 0.03969341143965721, 0.1717834621667862, 0.318057119846344, -0.02094125561416149, -0.17330452799797058, -0.21636728942394257, -0.11851420998573303, -0.2073744386434555, 0.0018192006973549724, -0.45111948251724243, 0.013509748503565788, 0.2967929244041443, -0.5239499807357788, 0.09191028773...
CE. So is the following "LINQ-to-SQL" or not? ``` using System.Linq; using System.Data.Linq; using System.Data.Linq.Mapping; using System.Windows; namespace TestLinq22 { public partial class Window1 : Window { public Window1() { InitializeComponent(); MainDB db = new ...
[ 0.356607049703598, 0.22895847260951996, 0.49082374572753906, -0.06948600709438324, 0.18218356370925903, 0.08359931409358978, -0.02425563894212246, -0.19220231473445892, -0.12860679626464844, -0.7473176717758179, -0.5093613862991333, 0.1315348595380783, -0.35312619805336, 0.5077614188194275...
select new {c.FirstName, c.LastName}; TheListBox.ItemsSource = customers; } } [Database(Name = "MainDB")] public class MainDB : DataContext { public MainDB(string connection) : base(connection) { } public Table<Customers> Customers; } [Table(Name = "Customer...
[ -0.11760041862726212, -0.28358563780784607, 0.5069604516029358, -0.13366585969924927, 0.25173425674438477, 0.38107097148895264, -0.1519218534231186, -0.13539037108421326, -0.40245527029037476, -0.627894401550293, -0.43327265977859497, 0.2163609117269516, -0.1130366325378418, 0.632409751415...
public class Customers { [Column(DbType = "varchar(100)")] public string FirstName; [Column(DbType = "varchar(100)")] public string LastName; } } ``` use the [GeoIP](http://www.maxmind.com/) databse. there is a free one. there are also a lot of GeoIP webServices you can use.
[ 0.11183778941631317, -0.21289986371994019, 0.3296656012535095, 0.17035692930221558, 0.05865640193223953, 0.27044522762298584, -0.20285747945308685, 0.3199090361595154, -0.2699154317378998, -0.6944165825843811, -0.22708538174629211, 0.22663921117782593, -0.3768705427646637, 0.22622136771678...
I'm writing a shader in GLSL and I need to pass it a certain amount of information. The only practical way to pass this information is using a 1-D texture. I'm creating the texture and setting `GL_TEXTURE_MIN_FILTER` and `GL_TEXTURE_MAG_FILTER` to `GL_NEAREST` Now from the shader I need to access the texture so I...
[ 0.019079573452472687, 0.14358775317668915, 0.9212350249290466, 0.01337782945483923, -0.23590582609176636, 0.12110637873411179, -0.037917882204055786, 0.18352751433849335, -0.08928149938583374, -1.1197431087493896, 0.09298090636730194, 0.39495566487312317, 0.003817005781456828, 0.1535978913...
and give me the number in [0,1] which corresponds to the texel I want. ``` idx/(size-1) ``` perhaps? Just make sure idx and size are floats first.
[ 0.16442497074604034, 0.31371748447418213, 0.4189200699329376, 0.006491662934422493, 0.17985400557518005, 0.0240291990339756, -0.34027206897735596, -0.1414756178855896, 0.14646749198436737, -0.598389208316803, 0.015925854444503784, 0.814609169960022, -0.060488730669021606, -0.03750652074813...
I'm having issues with a very strange error in some code I wrote. The basic idea behind the code can be trivialised in the following example: ``` template <class f, class g> class Ptr; ``` template <class a, class b, class c = Ptr<a,b> > class Base { public: Base(){}; }; template <class d, class e> class Derived ...
[ 0.038673896342515945, -0.2693980932235718, 0.5312167406082153, 0.07678411155939102, 0.02860569953918457, 0.1920400708913803, 0.27891668677330017, -0.5512522459030151, -0.1707601398229599, -0.5126480460166931, -0.25641337037086487, 0.1994815468788147, -0.4627644121646881, 0.2591909468173980...
setting so standard pointers are effectively useless). The pointers are designed to 'point' at the base class, and so can point at any inherited class (as demonstrated in the example). Can anyone think of any reason this might *not* work in a non-trivial case (But a case where the object architecture remains identical...
[ 0.08361443132162094, -0.3278776705265045, 0.37039920687675476, -0.11883118003606796, 0.1415518820285797, -0.11728819459676743, 0.46201109886169434, -0.23575758934020996, -0.19036398828029633, -0.5377415418624878, -0.15666653215885162, 0.5463006496429443, -0.6689069867134094, -0.05167561769...
no matching function for call to `Ptr&lt;double, double>::Ptr(Derived&lt;double, double>*)` candidates are . . . (Some removed for simplicity's sake) `Ptr&lt;f, g>::Ptr(Base&lt;f, g, Ptr&lt;f, g> >*) [with f = double, g = double]` Cheers, Ed EDITED (Detailing the error a little better, added info on the compi...
[ -0.14602379500865936, 0.060344185680150986, 0.35123953223228455, -0.06543388962745667, -0.1561121940612793, 0.1674707680940628, 0.5590458512306213, -0.35395318269729614, 0.11811596155166626, -0.4226016700267792, -0.22889237105846405, 0.7142190337181091, -0.3563755452632904, -0.015961207449...
One can measure goodness of fit of a statistical model using [Akaike Information Criterion (AIC)](http://en.wikipedia.org/wiki/Akaike_information_criterion), which accounts for goodness of fit and for the number of parameters that were used for model creation. AIC involves calculation of maximized value of likelihood f...
[ 0.14060354232788086, -0.038909196853637695, -0.3757452666759491, 0.2514741122722626, -0.2747822701931, 0.357994943857193, 0.20615534484386444, -0.5986753702163696, -0.07410532236099243, -0.5426733493804932, 0.10821772366762161, 0.20262832939624786, -0.1508459448814392, 0.3349531590938568, ...
fair evaluation criterion should exclude the influence of the class probabilities which may enable a completely uninformed classifier to trivially achieve high classification accuracy. In this paper a method for evaluating the information score of a classifier''s answers is proposed. It excludes the influence of prior ...
[ -0.07925276458263397, -0.21532902121543884, -0.18512628972530365, 0.5336737036705017, -0.3582719564437866, 0.23616056144237518, 0.1739671528339386, -0.35332024097442627, 0.21430730819702148, -0.26804548501968384, 0.161037415266037, 0.5011725425720215, 0.013874633237719536, 0.20948399603366...
Is there any reason in particular why it's recommended to run memcached on a Linux server? Is it really that bad an idea to run it on a Windows Server box? What about an OS X Server box? The biggest reason that I read is about TCO. In other words, for each windows box that we run memcached on, we have to buy a copy of...
[ 0.45949655771255493, 0.46148261427879333, 0.1296169012784958, 0.35373950004577637, 0.12241335213184357, -0.27521446347236633, -0.01850881054997444, 0.2522848844528198, -0.31715264916419983, -0.3167469799518585, 0.23130029439926147, 0.5858995318412781, -0.16435912251472473, 0.28382074832916...
Windows Server 2003 installed on them, so there's not really much savings to installing Linux. Are there any other compelling reasons to use Linux? Almost all of the FAQs and HOWTOs are written from Linux point of view. Memcache was originally created only for Linux, the ports came later. There is port to Windows, but ...
[ -0.08563441038131714, 0.24371682107448578, 0.4102593958377838, 0.04929102212190628, -0.2989857792854309, -0.19394633173942566, 0.4063221514225006, 0.3164636492729187, -0.2035771608352661, -0.5848039388656616, 0.006938110571354628, 0.7438195943832397, -0.3087173104286194, 0.1849840134382248...
How can I discover if a remote machine is configured with or without hardware or software RAID? All I know is i have 256GB at present, I need to order more space but before I can I need to know how the drives are configured. *df* lists the drive as: ``` /dev/sdb1 287826944 273086548 119644 100% /mnt/db...
[ 0.15113107860088348, 0.23108725249767303, 0.3587322533130646, 0.16534844040870667, 0.30121761560440063, 0.13717122375965118, 0.3601107597351074, -0.3695664703845978, -0.40303218364715576, -0.6410832405090332, -0.14407283067703247, 0.8041308522224426, -0.13772907853126526, 0.408284783363342...
geometry = 36404/255/63, sectors = 299439751168, start = 0 ``` What else should I run and what should I look for? Software RAID would not be /dev/sdb - dev/md0. Nor is it LVM. So it's either real hardware RAID, or a raw disk. `lspci` might show you and RAID controllers plugged in. `dmesg | grep sdb` might tel...
[ 0.147918239235878, 0.03666061908006668, 0.2356463521718979, 0.16869786381721497, 0.052417922765016556, -0.00864717923104763, 0.05549446493387222, -0.11842755973339081, -0.3626247048377991, -0.7371664643287659, -0.23234151303768158, 0.6780614852905273, -0.015526404604315758, -0.039751719683...
Visual Basic 6 sometimes tries to install or complete the installation of other applications when it starts up. Why? I've seen this a number of times over the years and it's very annoying. Recently, I installed Business Objects, just the SDK, plus all service packs to 3.5 on a VM and the first time I go into VB6 it sa...
[ 0.25943613052368164, -0.035970356315374374, 0.37786051630973816, -0.18791164457798004, -0.22175878286361694, -0.05220159515738487, 0.5612534880638123, 0.2174844741821289, -0.02074126899242401, -0.45128360390663147, -0.12833410501480103, 0.7842987179756165, -0.19358591735363007, 0.178543806...
when I open another VB6. This has happened before, because MS Office XP and Office 2003 were updated, I think. Does anyone know what's going on and how to fix it? UPDATE: Using Explorer to Search causes a similar box to open only it wants to install a MS Office 2003 component, which is really a bit mystifying seeing...
[ 0.24831338226795197, 0.12461604177951813, 0.48469921946525574, -0.18963657319545746, -0.17588861286640167, -0.26947054266929626, 0.3558388352394104, 0.08159556239843369, -0.4020961821079254, -0.6934845447540283, -0.2707005441188812, 0.7718256711959839, -0.22931261360645294, 0.2643311917781...
were in the Application event log. ``` Detection of product '{20610409-CA18-41A6-9E21-A93AE82EE7C5}', feature 'Visual_Studio.NET_Professional' failed during request for component '{DD68FEE8-C369-11D1-A173-00A0C90AB50F}' ``` and ``` Detection of product '{20610409-CA18-41A6-9E21-A93AE82EE7C5}', feature 'Visual_St...
[ -0.11149502545595169, 0.055698540061712265, 0.6284868717193604, -0.010388689115643501, 0.107415109872818, 0.11186390370130539, 0.5347470641136169, -0.27757248282432556, -0.026183675974607468, -0.46145546436309814, -0.3957560658454895, 1.0239031314849854, -0.22540609538555145, 0.01361915748...
I'm trying to figure out how I could write an autocompletion algorithm for Lua, but since as with many scripting languages it lacks a static type system I think I need background compilation, but during background compilation it's easy to hit the halting problem so I was wondering if anyone has solved this sort of thin...
[ 0.2339339405298233, 0.015904659405350685, 0.05885829031467438, -0.03302270546555519, -0.049481961876153946, -0.04538297280669212, 0.216129869222641, 0.4856969118118286, -0.5869628190994263, -0.6403770446777344, 0.05386615917086601, 0.4754890203475952, -0.38785484433174133, -0.0654345601797...
replacing all occurences of log4net logging with nlog. look [here](http://logging.apache.org/log4net/release/faq.html), [here](http://karlagius.com/2008/01/02/writing-a-custom-appender-for-log4net/) and [here](http://blog.joachim.at/?p=31)
[ -0.19251634180545807, -0.2525297999382019, 0.31711864471435547, -0.12657269835472107, -0.2614925503730774, 0.19582447409629822, 0.5850380659103394, -0.042443953454494476, -0.7503325939178467, -0.4428512454032898, -0.18302784860134125, 0.28133150935173035, -0.44966748356819153, -0.012689507...
I'm using Delphi 2007, and I am looking for some newer looking glyphs to add to my TBitBtns. Honestly, I'd love something that looks more like the [Tango Desktop](http://tango.freedesktop.org/Tango_Desktop_Project) or KDE4, when it comes to the glyphs. If I can't find anything else, I'll just use the Tango icons, and ...
[ 0.11448140442371368, 0.08934933692216873, 0.30273887515068054, -0.13317245244979858, -0.29450541734695435, 0.12594453990459442, 0.22502858936786652, -0.03060837835073471, -0.3212340474128723, -0.5528196096420288, 0.2608398199081421, 0.5196260809898376, -0.4588211178779602, -0.3500605225563...
to convert the images.
[ 0.34982866048812866, 0.2082703709602356, 0.049285996705293655, 0.18672142922878265, 0.07892347127199173, 0.3454325795173645, 0.08896360546350479, -0.1856764554977417, -0.14111818373203278, -0.4286288022994995, -0.11258692294359207, 0.38220033049583435, 0.01714968867599964, -0.0625693649053...
How do you do case conversion in XSL? ``` <xsl:variable name="upper">UPPER CASE</xsl:variable> <xsl:variable name="lower" select="???"/> ``` In XSLT 1.0 the `upper-case()` and `lower-case()` functions are not available. If you're using a 1.0 stylesheet the common method of case conversion is `translate()`: ``` <xs...
[ -0.4629318416118622, -0.021456047892570496, 0.41228219866752625, -0.24384264647960663, -0.0960901603102684, 0.03868363797664642, 0.02903696894645691, -0.38143911957740784, 0.3590373396873474, -1.0388476848602295, -0.37657907605171204, 0.8815513849258423, -0.3841012120246887, -0.20979748666...
I'm writing an App using WCF where clients subscribe to a server and then updates get pushed back to the clients. The subscribers subscribe to the server using a DuplexPipeChannel calling a Subscribe() method on the server. The server maintains a List<> of subscribers and when there is data to push out to the subscri...
[ 0.47260284423828125, -0.16285522282123566, 0.6883182525634766, -0.09067884087562561, -0.06790817528963089, 0.27745890617370605, 0.04198527708649635, -0.1104467436671257, -0.1869284212589264, -0.6186986565589905, 0.03879072517156601, 0.2963663637638092, -0.3817514181137085, 0.19105863571166...
to one of the subscribers cause the rest of the push calls to be delayed (or worse fail)? I'm sorry if this is an obvious question, but I've been mostly a .Net 2.0 person up until now so I know very little about WCF. My WCF code is loosly based on [this tutorial](http://www.switchonthecode.com/tutorials/wcf-tutorial-...
[ 0.40462726354599, -0.18092629313468933, 0.3286152184009552, -0.1019110456109047, -0.19304922223091125, 0.006329357158392668, 0.2914313077926636, -0.03750104084610939, -0.2712865471839905, -0.46613195538520813, 0.11448953300714493, 0.45780616998672485, -0.4210542142391205, 0.158796340227127...
below. Take a look [here](http://msdn.microsoft.com/en-us/library/ms734701.aspx). Every message you send will receive a result back, whether you actually are expecting data or not. The call will block depending on what your server does. If PushData on the server actually iterates through the subscriber list and sends...
[ 0.310168981552124, -0.6399559378623962, 0.5844835042953491, -0.001994676887989044, -0.09607582539319992, -0.061650969088077545, 0.10004890710115433, -0.13246260583400726, -0.33585742115974426, -0.7104286551475525, 0.14912624657154083, 0.2175450325012207, -0.22735290229320526, 0.34955254197...
takes a long time because the server is actually sending out calls to other clients in the same call, then something is wrong. I would actually not really spawn a new thread each time. Just create a [producer/consumer](http://en.wikipedia.org/wiki/Producer-consumer_problem) pattern on your server side so that whenever ...
[ 0.7787141799926758, -0.26157742738723755, 0.29180148243904114, 0.07376860082149506, -0.02018697001039982, 0.037911299616098404, -0.0045063984580338, 0.34332218766212463, -0.739646315574646, -0.4459489583969116, 0.36961987614631653, 0.4292052686214447, -0.3950931131839752, 0.552262365818023...
I am modifying my XML using LINQ: ``` Dim feedXML As XDocument = XDocument.Parse(m_xmld.OuterXml.ToString()) Dim SortedFields = From field In feedXML.Descendants("fields") Dim sFieldList = From field In SortedFields.Descendants("field") Order By Integer.Parse(field.@position) ``` I am trying to sort...
[ 0.41475462913513184, 0.0952492356300354, 0.6667510271072388, -0.36364367604255676, -0.0006780080148018897, 0.04970717430114746, -0.05687989667057991, -0.3778330981731415, -0.18625065684318542, -0.5405584573745728, -0.16618920862674713, 0.4349280297756195, -0.42930594086647034, 0.2797302305...
field elements, it's relatively easy - but if you've got: ``` <field position="2" /> <non-field /> <field position="1" /> <non-field /> <field position="0" /> ``` then what should the result be afterwards?
[ -0.29102593660354614, -0.028882544487714767, -0.014120781794190407, -0.11907577514648438, 0.11294896900653839, 0.02228766307234764, -0.1979503631591797, -0.6003637909889221, 0.070338673889637, -0.3894211947917938, -0.31507471203804016, 0.5452904105186462, -0.1918344795703888, -0.3652021288...
**Note:** Version 2, below, uses the Sieve of Eratosthenes. There are several answers that helped with what I originally asked. I have chosen the Sieve of Eratosthenes method, implemented it, and changed the question title and tags appropriately. Thanks to everyone who helped! Introduction ------------ I wrote this f...
[ 0.21682590246200562, 0.22384098172187805, 0.2430080622434616, 0.13411742448806763, -0.1775330752134323, 0.201287180185318, 0.0359007902443409, -0.5215161442756653, 0.03374027833342552, -0.7518521547317505, 0.04332304373383522, 0.5301336646080017, -0.3317863643169403, -0.010127218440175056,...
int index = 1; int prime = 1; boolean isPrime = false; while((prime += 2) <= max) { isPrime = true; for(int i = 0; i < index; i++) { if(prime % temp [i] == 0) { isPrime = false;
[ -0.06863196194171906, -0.2406260371208191, 0.23797011375427246, -0.27651774883270264, 0.3389977216720581, 0.044950541108846664, 0.5828851461410522, -0.5066553950309753, 0.25487804412841797, -0.26329123973846436, -0.2577090561389923, 0.6809486150741577, -0.34904152154922485, -0.100606814026...
break; } } if(isPrime) { temp [index++] = prime; } } int [] primes = new int [index]; while(--index >= 0) { primes [index] = temp [index]; } return primes; } ``` My Concern ---------- My
[ 0.0810735896229744, 0.08188723027706146, 0.29040050506591797, -0.08917642384767532, 0.561296284198761, -0.05356011912226677, 0.32567480206489563, -0.38829129934310913, -0.23203906416893005, -0.37403514981269836, -0.37605246901512146, 0.693352997303009, -0.5640791058540344, 0.06241541728377...
concern is that I am creating an array that is far too large for the final number of elements the method will return. The trouble is that I don't know of a good way to correctly guess the number of prime numbers less than a specified number. Focus ----- This is how the program uses the arrays. This is what I want to ...
[ 0.2716454863548279, 0.05772987753152847, 0.1879797726869583, 0.10531628876924515, 0.0025660707615315914, 0.0913831815123558, 0.007730542216449976, -0.22336019575595856, -0.3794335722923279, -0.7050119042396545, 0.13760583102703094, 0.7546504735946655, -0.40017133951187134, -0.1475476324558...
just the prime numbers. 4. I copy each prime number from the huge array to the array of the correct dimension. 5. I return the array of the correct dimension that holds just the prime numbers I generated. Questions --------- 1. Can I copy the whole chunk (at once) of `temp[]` that has nonzero elements to `primes[]` w...
[ 0.3378050923347473, 0.05317021906375885, 0.11689436435699463, 0.14199945330619812, 0.03112581931054592, 0.12089408934116364, 0.30607300996780396, -0.31809136271476746, -0.41239258646965027, -0.36336711049079895, -0.22117634117603302, 0.6887887716293335, -0.48991456627845764, -0.29453265666...
int [] temp = new int [max]; temp [0] = 2; int index = 1; int prime = 1; boolean isPrime = false; while((prime += 2) <= max) { isPrime = true; for(int i = 0; i < index; i++) { if(prime % temp [i] == 0) {
[ -0.04796476662158966, -0.21352322399616241, 0.35397860407829285, -0.3380492031574249, 0.2061104029417038, 0.15939246118068695, 0.6238992810249329, -0.6135934591293335, 0.21158067882061005, -0.2663063704967499, -0.2373657375574112, 0.6448636651039124, -0.3319922983646393, -0.252666234970092...
isPrime = false; break; } } if(isPrime) { temp [index++] = prime; } } return Arrays.copyOfRange(temp, 0, index); } ``` --- Version 3 (thanks to [Paul Tomblin](https://stackoverflow.com/users/3333/paul-tomblin)) which uses the [Sieve of Erastosth...
[ -0.31865230202674866, 0.09896264225244522, 0.3111271560192108, -0.04791649058461189, 0.0549890510737896, 0.244171142578125, 0.3156639635562897, -0.5770478248596191, -0.38014575839042664, -0.4872532784938812, -0.4225514829158783, 0.2846461236476898, -0.40115126967430115, 0.14896686375141144...
[] generatePrimes(int max) { boolean[] isComposite = new boolean[max + 1]; for (int i = 2; i * i <= max; i++) { if (!isComposite [i]) { for (int j = i; i * j <= max; j++) { isComposite [i*j] = true; }
[ 0.10622432827949524, -0.21563325822353363, 0.26174792647361755, -0.15072739124298096, 0.11443306505680084, -0.09333890676498413, 0.6253369450569153, -0.6748881936073303, 0.1156986728310585, -0.12443596869707108, -0.2679288983345032, 0.5768132209777832, -0.4436623752117157, -0.1623525768518...
} } int numPrimes = 0; for (int i = 2; i <= max; i++) { if (!isComposite [i]) numPrimes++; } int [] primes = new int [numPrimes]; int index = 0; for (int i = 2; i <= max; i++) { if (!isComposite [i]) primes [index++] = i; } return primes; } ``` Your method of finding...
[ -0.06420625746250153, -0.13197064399719238, 0.022428365424275398, -0.3284094035625458, 0.26003894209861755, 0.1384974867105484, 0.16887378692626953, -0.5709142684936523, -0.1523195207118988, -0.41497722268104553, -0.1440320909023285, 0.6454322934150696, -0.42835861444473267, 0.057912826538...
every single element of the array with every possible factor is hideously inefficient. You can improve it immensely by doing a [Sieve of Eratosthenes](http://en.wikipedia.org/wiki/Sieve_of_Erastosthenes) over the entire array at once. Besides doing far fewer comparisons, it also uses addition rather than division. Divi...
[ 0.14993585646152496, 0.16551068425178528, -0.36341729760169983, -0.05188451334834099, -0.3734700381755829, 0.5736916661262512, 0.12270750850439072, -0.654038667678833, -0.36543992161750793, -0.886495053768158, 0.12437142431735992, 0.16193807125091553, -0.23435679078102112, 0.23108547925949...
The following asp label fails to be displayed in the browser, can someone please tell me what I am doing wrong. I expect to see the value `<abc>` but instead I get nothing. ``` <asp:Label ID="Label1" runat="server" Text="&lt;abc&gt;"></asp:Label> ``` By the way, I realize that I can accomplish the same thing doin...
[ -0.0428488664329052, -0.09337768703699112, 0.12183631211519241, -0.06693422794342041, -0.061939503997564316, -0.2684068977832794, 0.8019490838050842, -0.04322011023759842, -0.3469316065311432, -0.5939977765083313, -0.19438868761062622, 0.33703598380088806, -0.6610554456710815, -0.020199855...
is this behavior by design and if it’s by design what’s the reason for such design? Thank you very much. Believe it or not, but you can include entities without escaping them, thus: ``` <asp:Label runat="server" ID="myLabel" Text="<abc>" /> ``` This will render an <abc> tag. **Edit:** OK, sorry, you want to displa...
[ 0.2849658727645874, 0.24073487520217896, 0.13094072043895721, 0.10234671831130981, -0.16067853569984436, -0.1211983934044838, 0.3830249011516571, -0.4975114166736603, -0.1905703842639923, -0.5197883248329163, -0.05910400673747063, 0.7435829639434814, -0.4330659508705139, 0.1826974153518676...
will render an ampersand to the client. Followed by **lt;**, the result is a correct client-side entity reference (**&lt;**). Which will render as **<**. To answer you questions explicitly: Yes, using entity references in ASP.NET attributes is (obviously) OK, since it's an XML format. This is not really a 'decision' o...
[ -0.046678248792886734, -0.005149734206497669, 0.765504002571106, 0.13873431086540222, -0.053286921232938766, -0.16681644320487976, 0.2261529564857483, -0.06822837889194489, -0.09062298387289047, -0.7136288285255432, -0.4421573281288147, 0.7040689587593079, -0.11228010058403015, -0.08156437...
I'm new to JQuery, so this is probably a very dumb question. I've used JQuery to make the elements in a table draggable. I asked [a question](https://stackoverflow.com/questions/552951/how-can-i-make-my-jquery-draggable-droppable-code-faster) about how to make it faster, and the best response I had so far was to disa...
[ 0.14747388660907745, -0.03149589151144028, 0.2910763919353485, 0.1453440934419632, -0.08792164921760559, -0.07474248856306076, -0.13533957302570343, 0.06857085227966309, -0.4837324321269989, -0.3648945689201355, 0.1258956342935562, 0.22668586671352386, -0.3107565939426422, -0.1554439514875...
do this: ``` $(document).ready ( function() { $('.draggable_div').draggable ( { addClasses: false, scroll: false, axis: 'x', start: function(event, ui) { $(this).css('background-color','#ddddff'); var $cells = $(this).parent().parent().child...
[ 0.21232759952545166, -0.24920646846294403, 0.6269229054450989, 0.04156026616692543, 0.5510733127593994, 0.28836506605148315, -0.06471237540245056, -0.16357073187828064, -0.26017606258392334, -0.4499337077140808, -0.43079674243927, 0.37039414048194885, -0.3528239130973816, 0.158215805888175...
} } ); ... ``` Firebug is telling me that I've successfully added the "draggable\_td" class to the cells in the right row. But how do I make that trigger the change? The way I have the code set up at the moment, droppable is attached like this: ``` $('.droppable_td').droppable ( { addClasses...
[ 0.2936522662639618, -0.20273394882678986, 0.6893299221992493, -0.12416587769985199, 0.34310901165008545, -0.011608069762587547, 0.11387547850608826, -0.14746306836605072, -0.0646732896566391, -0.2853482961654663, -0.31395238637924194, 0.6930909752845764, -0.5285848379135132, -0.04292328283...
}, out: function(event, ui) { $(this).css('background-color', null); }, drop: function(event, ui) { etc... ``` I know that code works, because if I put that class in the appropriate < td> elements in the HTML it all works (just very slowly). In other words: If I have all cells ...
[ 0.48748037219047546, -0.20057451725006104, 0.2223542034626007, -0.05292734131217003, 0.2543811798095703, 0.013891544193029404, 0.36611032485961914, -0.31934958696365356, -0.4142239987850189, -0.49001750349998474, -0.16084040701389313, 0.3516741394996643, -0.5012297034263611, -0.24355480074...
which cells are droppable inside your draggable's start event. ``` start: function(event, ui) { $(this).css('background-color','#ddddff'); var $cells = $(this).parent().parent().children(); $cells.addClass("droppable_td"); $cells.droppable({...}); } ```
[ 0.06218457594513893, -0.43281471729278564, 0.45104774832725525, 0.11510037630796432, 0.4139542877674103, 0.344723641872406, -0.0889471024274826, 0.011716194450855255, -0.31362396478652954, -0.255542129278183, -0.38361674547195435, 0.21010209619998932, -0.4048771858215332, -0.00564315309748...
I'm currently working on cross-platform applications and was just curious as to how other people tackle problems such as: * Endianess * Floating point support (some systems emulate in software, VERY slow) * I/O systems (i.e. display, sound, file access, networking, etc. ) * And of course, the plethora of compiler diff...
[ 0.5243421196937561, 0.2039947211742401, 0.18652722239494324, 0.370076060295105, -0.109310083091259, 0.020180657505989075, -0.4035240411758423, 0.2803363800048828, -0.23121437430381775, -0.7378164529800415, 0.10755311697721481, 0.5092165470123291, -0.025900989770889282, 0.2810327410697937, ...
good answers on here, ranging from how to handle the differences yourself, to library suggestions (even the suggestion of just giving in and using wine). I'm not actually looking for a solution (already have one), but was just curious as to how others tackle this situation as it is always good to see how others think/c...
[ 0.10846368223428726, 0.31814029812812805, 0.004108102060854435, 0.43626099824905396, 0.1365988701581955, 0.214424729347229, -0.16637174785137177, 0.14218159019947052, -0.23836645483970642, -0.5865293741226196, 0.18984690308570862, 0.6675378680229187, 0.16164910793304443, -0.050059586763381...
already written for them (Sony actually recommends that you write your own rendering engine from scratch and just use their OpenGL implementation, which doesn't quite follow the standards anyway, as a reference). **Endianess** All of our assets can be custom made for each system. All of our raw data (except for tex...
[ 0.4051326513290405, 0.08583849668502808, 0.5051142573356628, 0.2640455961227417, 0.02660314179956913, 0.002957247896119952, -0.23210768401622772, 0.08241532742977142, -0.03651408478617668, -0.6756815910339355, -0.07716771215200424, 0.41100355982780457, 0.331818550825119, 0.0908544138073921...
to do this, thus, it is insulated from the other systems as well). **Floating point support** Most modern systems do floating point values fine, the exception to this is the Nintendo DS (and GBA, but thats pretty much a dead platform for us these days). We handle this through 2 different classes. The first is a "fi...
[ 0.058335043489933014, -0.007108110468834639, 0.39286085963249207, 0.43625423312187195, -0.035085566341876984, -0.14571133255958557, -0.18942701816558838, -0.12500864267349243, -0.25003790855407715, -0.21087759733200073, 0.037310171872377396, 0.18529704213142395, -0.14069613814353943, 0.210...
a wrapper around the float for the most part, the only difference is that it also implements the shift operators. By implementing the shift operators, we can then use bit shifts for fast multiplications/divisions on the DS and then seamlessly transition to platforms that work better with floats (like the XBox360). **I...
[ 0.3917417824268341, -0.35861971974372864, 0.6180569529533386, 0.523740828037262, -0.2385736107826233, -0.06564661115407944, -0.15179994702339172, -0.3302236497402191, 0.13333939015865326, -0.41726070642471313, 0.15283887088298798, 0.5061554908752441, -0.06712431460618973, -0.00443468475714...
and networking (really only the DS differs in protocol by much, but then they each have their own server system that you have to use). The way we ended up tackling this was by simply writing fairly high level wrappers for each of the systems (e.g. meshes for graphics, key mapping systems for controllers, etc.) and ha...
[ 0.3309403657913208, -0.05245861038565636, 0.2989860475063324, 0.6587851643562317, 0.04285892844200134, -0.30914127826690674, -0.37192660570144653, -0.06761352717876434, -0.42979905009269714, -0.5949736833572388, 0.034258414059877396, 0.601439356803894, -0.3300028443336487, -0.1941934674978...
problems with compilers, we usually log the information on a local wiki (so others can see what to look out for and the workarounds to go with it) and if possible, write a macro that will handle the situation for us. While its not the most elegant solution, it works and seeing how some compilers a simply broken in cert...
[ 0.06865512579679489, 0.4689449667930603, -0.07415226846933365, 0.4196086823940277, -0.1649106740951538, -0.16279320418834686, 0.49002623558044434, 0.1445426642894745, -0.2607080042362213, -0.5400378108024597, -0.1422284096479416, 0.7090057134628296, -0.45137590169906616, -0.131625860929489...
the third party libraries (boost being the most famous) you are using. One rarely writes everything from scratch...
[ 0.11283069849014282, -0.11502769589424133, -0.20840324461460114, 0.42046666145324707, -0.03454768285155296, -0.34079211950302124, 0.12556736171245575, 0.18402265012264252, -0.2436702847480774, -0.34958600997924805, -0.3021615147590637, 0.6347659230232239, -0.09878355264663696, -0.345020025...
I read [this question](https://stackoverflow.com/questions/580984/how-do-you-get-the-object-reference-of-an-object-in-java-when-tostring-and-hash) and thought that would easily be solved (not that it isn't solvable without) if one could write: ``` @Override public String toString() { return super.super.toString()...
[ -0.23031453788280487, 0.2450043261051178, 0.1547752022743225, -0.024243034422397614, 0.04666978493332863, -0.3169769048690796, 0.4849129915237427, -0.09355151653289795, -0.2812213599681854, -0.503171980381012, -0.1675088107585907, 0.4768359363079071, -0.22154881060123444, -0.11855497211217...
be able to bypass the parent class's behaviour. It makes sense to sometimes be able to bypass your *own* class's behaviour (particularly from within the same method) but not your parent's. For example, suppose we have a base "collection of items", a subclass representing "a collection of red items" and a subclass of th...
[ 0.05052705854177475, -0.38045305013656616, 0.201541468501091, -0.010178996250033379, 0.05046600475907326, 0.096941739320755, 0.444998174905777, -0.4874773323535919, -0.5518885850906372, -0.6488078236579895, -0.5706616044044495, 0.5582358837127686, -0.5592562556266785, 0.0918351411819458, ...
if (!item.isRed()) { throw new NotRedItemException(); } super.add(item); } } public class BigRedItems extends RedItems { @Override public void add(Item item) { if (!item.isBig()) { throw new NotBigItemException();
[ -0.08057685941457748, -0.5100181698799133, 0.4858405888080597, -0.19172805547714233, -0.08910719305276871, -0.015909468755126, 0.44577527046203613, -0.48924222588539124, -0.28889742493629456, -0.5909911394119263, -0.5124778151512146, 0.7482953667640686, -0.5568099617958069, 0.2593783438205...
} super.add(item); } } ``` That's fine - RedItems can always be confident that the items it contains are all red. Now suppose we *were* able to call super.super.add(): ``` public class NaughtyItems extends RedItems { @Override public void add(Item item) { // I don't care if it's red o...
[ 0.1658109426498413, -0.21960404515266418, 0.43186479806900024, -0.011124754324555397, -0.03937463089823723, 0.11395592242479324, 0.600757360458374, -0.3066217005252838, -0.3919166624546051, -0.4927273690700531, -0.22419364750385284, 0.6130925416946411, -0.7506832480430603, 0.19972787797451...
in `RedItems` is broken. Does that make sense?
[ 0.05533360317349434, 0.2875964045524597, -0.0005954669322818518, 0.11987181752920151, -0.12051771581172943, -0.09091696888208389, 0.37483304738998413, -0.07622867077589035, -0.2805477976799011, -0.3073404133319855, -0.24934639036655426, 0.1882743239402771, -0.2249804139137268, 0.2889268398...
I'm developing Piano App for iPhone. I'd like to develop smooth-scrollable keyboard (like Music Sampler). I put a custom view(1440px x 120px) in UIScrollView. I wanted to use OpenGL because Quartz is too slow. But I couldn't make OpenGL view in 1440px. Any idea to make a faster & large-sized custom view? Thank you. ...
[ -0.18415813148021698, 0.021587330847978592, 0.5330237150192261, -0.1784566342830658, -0.049527719616889954, 0.47192326188087463, 0.02637777291238308, -0.15228109061717987, -0.057981859892606735, -0.8665063381195068, 0.1287292242050171, 0.6497256755828857, -0.3015501797199249, 0.00289741251...
protected boolean flushCache (Control control) {...} protected abstract void layout (Composite composite, boolean flushCache); } ``` I'm relatively new to SWT programming (former Swing programmer), but encountered similar situations in which the layout wasn't properly updated. I was usually able to resolve them u...
[ 0.012585400603711605, 0.1386243999004364, 0.016590412706136703, -0.3253145217895508, 0.27378425002098083, 0.10050412267446518, 0.1780071258544922, -0.2966768443584442, -0.23337168991565704, -0.5816271901130676, 0.13418741524219513, 0.6367546916007996, -0.39860057830810547, -0.0327242203056...
I'm starting my 2nd class in C# programming through Kaplan online school. I have some limited interaction with the professor and the class online, but nothing like in an actual school. I'm about to go through "Modern Software Development Using C#.NET" by Richard Wiener. It seems the book as a extremely heavy focus on U...
[ 0.03728853911161423, 0.2720170319080353, 0.5331031680107117, 0.27585235238075256, 0.1700146496295929, -0.27207016944885254, 0.20323514938354492, 0.35202834010124207, -0.19637206196784973, -0.8285805583000183, -0.08014021068811417, 0.31888964772224426, 0.3653445541858673, -0.089562639594078...
UML and intermediate C# programming? Some companies will use UML everywhere. Some use it nowhere. I'm not a big fan myself - I prefer ad-hoc diagrams and plenty of other communication (notes on the diagram, actual *talking* etc). The good thing about an ad-hoc approach is that you can leave it as vague as you like or ...
[ 0.1726888120174408, 0.1634252816438675, -0.19078980386257172, 0.184739351272583, -0.3296473026275635, -0.22193783521652222, 0.17413264513015747, 0.24188649654388428, -0.03872617706656456, -0.6308282613754272, 0.011363238096237183, 0.7867123484611511, 0.06077660247683525, -0.499781757593154...
We have an external .js file that we want to include in a number of different pages. The file contains code for sorting a table on the client-side, and uses the ▲ and ▼ characters in the script to indicate which column is sorted and in which direction. The script was originally written for an ASP.Net page to offload s...
[ -0.005280957091599703, 0.0023545098956674337, 0.2421153038740158, -0.18572314083576202, -0.1488906741142273, 0.06067681685090065, -0.022967441007494926, 0.03929063305258751, -0.1678788810968399, -0.6709422469139099, 0.023089392110705376, 0.030557775869965553, -0.49149325489997864, -0.17740...
pages where we want to include the script. For these pages the encoding is more of a hodgepodge depending on who wrote the page when and what tool they were using (notepad, vs6, vs2005, other html helper). Often no encoding is specified in the page so it's up to the browser to pick, but there's really no hard rule for ...
[ 0.16801466047763824, 0.10939598828554153, 0.5570869445800781, 0.20498579740524292, -0.3236861526966095, -0.014713598415255547, 0.17182442545890808, 0.01619831845164299, -0.16204115748405457, -0.8833851218223572, -0.14150001108646393, -0.04468454793095589, -0.18942265212535858, -0.017600411...
can I make the script adjust for the various potential encodings so that the "special" characters always show up correctly? Are there different characters I could be using, or a trick I missed to make the html entities work from javascript? Here is the snippet where the characters are used: ``` // get sort direction,...
[ -0.10213494300842285, -0.02174947038292885, 0.4883251190185547, -0.08924847841262817, 0.026378275826573372, 0.28178590536117554, 0.2120743840932846, -0.5116447806358337, 0.10989994555711746, -0.601953387260437, 0.14559896290302277, 0.4874962866306305, -0.1961616575717926, -0.35569733381271...
(!SimpleTableSort(t.id, self.cellIndex, dir, sortType)) return; //remove all arrows for (var c = 0,cl=t.rows[0].cells.length;c<cl;c+=1) { var cell = t.rows[0].cells[c]; cell.innerHTML = cell.innerHTML.replace(" ▲", "").replace(" ▼", ""); } // set new arrow self.innerHTML += arrow; ``` For the curious, the c...
[ -0.38934946060180664, 0.277043879032135, 0.45923981070518494, -0.15190252661705017, -0.04560039937496185, 0.4433496296405792, 0.5711162686347961, -0.6007198691368103, -0.12122682482004166, -0.40455228090286255, -0.18350501358509064, 0.40695562958717346, -0.37089383602142334, -0.00850206706...
I have the following expression ``` var q = from c in D1 join dp in (from e in E1 group e by e.ID into g
[ -0.25304627418518066, 0.1094500869512558, 0.36114516854286194, -0.45015984773635864, -0.17115366458892822, 0.04378208518028259, 0.2767011225223541, -0.6820589900016785, 0.30810117721557617, -0.44794532656669617, -0.41729217767715454, 0.3562557101249695, -0.2731991410255432, 0.0919795930385...
select new { ID = g.Key, Cnt = g.Count() }) on c.ID equals dp.ID into dpp from v in dpp.DefaultIfEmpty() select new { c.ID, Cnt= v.Cnt ?? 0 }; ``` How can i
[ 0.15132378041744232, -0.19441469013690948, 0.6795747876167297, -0.01984984241425991, 0.29288679361343384, 0.11810268461704254, -0.07430332154035568, -0.465058296918869, -0.20874343812465668, -0.47648268938064575, -0.11793359369039536, 0.648340106010437, -0.1430777758359909, 0.4610329568386...