text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
Where, ClassA has an operator as such, that returns ClassB: ``` class ClassA { public: ClassA(); ClassB &operator[](int index); } ``` If I want to access said operator from within ClassA's constructor, as so: ``` ClassA::ClassA() { // How do I access the [] operator? } ``` At the moment, as a work-aro...
[ -0.3400033712387085, -0.10300984233617783, 0.12372935563325882, -0.17869214713573456, 0.19663263857364655, -0.06795379519462585, -0.04361638426780701, -0.17127490043640137, 0.02898435667157173, -0.6848912239074707, -0.38209137320518494, 0.5261939167976379, -0.25195813179016113, 0.135432764...
get { /* ... */ } set { /* ... */ } } void ClassA() { this[0] = new ClassB(); } } ``` **Note:** I'm using g++ Try the following ``` (*this)[0] = ... ```
[ -0.2741108536720276, -0.20443634688854218, 0.369150310754776, -0.24378657341003418, 0.10743235051631927, -0.17637881636619568, 0.42846712470054626, -0.31884846091270447, -0.0683804377913475, -0.5379679799079895, -0.4117240905761719, 0.8008624911308289, -0.37313342094421387, -0.127619042992...
Say you have ``` char *= "name:454"; ``` What is the best way to parse name and the number, thus std:string id would equal to "name"; double d would equal to 454; STL please, no boost. ``` #include <iostream> #include <sstream> #include <string> int main() { /* output storage */ std::string id; double d...
[ 0.043075449764728546, 0.07032724469900131, 0.5380570292472839, -0.4201522469520569, 0.10063114017248154, 0.18923142552375793, 0.09495227038860321, -0.40273749828338623, -0.23480495810508728, -0.5071290135383606, -0.531349778175354, 0.6189162731170654, -0.319044291973114, 0.0461664125323295...
s.replace(off, 1, 1, ' '); std::istringstream iss(s); iss >> id >> d; std::cout << "id = " << id << " ; d = " << d << '\n'; } return 0; } ``` Though, I'd just write my own parser or use the C scanner function for speed.
[ 0.086677186191082, -0.22006596624851227, 0.6648123264312744, -0.13951736688613892, -0.05374990403652191, 0.08704886585474014, 0.18976463377475739, -0.27296894788742065, -0.020172176882624626, -0.8443592190742493, -0.4984219968318939, 0.243675097823143, -0.49073347449302673, 0.0839907824993...
I need to be able to connect, disconnect, and re-connect a dial-up networking connection in a C# .NET Framework application. Creating the connection in the phone-book might also be useful/necessary. Are there any classes or libraries written for C# or .NET out there that wrap all this functionality nicely for me? Anyo...
[ 0.5561536550521851, 0.02756938524544239, 0.34767773747444153, 0.17110459506511688, 0.0491114966571331, -0.08952846378087997, 0.31539979577064514, -0.2497863620519638, -0.3535751700401306, -0.8746199011802673, 0.004935009870678186, 0.47366246581077576, -0.1248440071940422, -0.02771823666989...
I am working on trying to better understand the [jQuery.each()](http://docs.jquery.com/Core/each) method. Here's an example I came up with, not very practical, but it performs an action on each selected item from the selected set of elements returned: ``` // Loop over each link. $( "#links a.number" ).each( // For ea...
[ 0.17264686524868011, -0.143893763422966, 0.4413436949253082, -0.09856858849525452, -0.05252530425786972, 0.0777822807431221, 0.3044002950191498, -0.35413146018981934, -0.25223037600517273, -0.4951641857624054, -0.0042041572742164135, 0.42929932475090027, -0.5173264145851135, 0.267172902822...
}); }); ``` What are some examples of practical uses of the .each method you are using in your code? What exactly does $(this) represent? Note there are two types of jQuery's *each*, the one iterates over and returns jQuery objects, the other is a more generic version. **Core/each** Example: Create a csv of all t...
[ 0.11942983418703079, -0.05823919177055359, 0.6830017566680908, -0.2094840109348297, -0.08806286752223969, 0.08829154819250107, 0.2484545111656189, -0.6005540490150452, -0.04353503882884979, -0.3820507824420929, -0.21639971435070038, 0.45677778124809265, -0.4674997627735138, 0.2075311094522...
hrefs = hrefs + (hrefs.length > 0 ? "," + href : href); } }); alert(hrefs); ``` **Utilities/jQuery.each** Iterating over an array or the elements of an object: (via: [jQuery Documentation](http://docs.jquery.com/Utilities/jQuery.each#objectcallback)) ``` $.each( { name: "John", lang: "JS" }, function(i, n...
[ 0.03481493517756462, 0.07522919028997421, 0.7266407608985901, -0.3683343827724457, -0.05216429755091667, 0.4347051680088043, 0.3766864240169525, -0.6404467225074768, -0.4263485372066498, -0.35787418484687805, -0.7865283489227295, 0.6177055239677429, -0.44148606061935425, 0.0889104157686233...
Where is the correct place to initialize a class data member? I have the class declaration in a header file like this: Foo.h: ``` class Foo { private: int myInt; }; ``` Then I try to set a value to myInt in the corresponding .cpp file: Foo.cpp: ``` int Foo::myInt = 1; ``` I get a compiler error for redefini...
[ -0.16377317905426025, 0.17046354711055756, 0.1520879566669464, 0.08874135464429855, -0.1308830976486206, 0.14071445167064667, 0.0864962488412857, -0.18948929011821747, -0.05638348311185837, -0.6167897582054138, 0.0013637990923598409, 0.2699029743671417, -0.26159030199050903, 0.195258870720...
one where there is only one copy that is shared by every instance of the class. Those can be initialized as you tried. (See JaredPar's answer for the syntax) For integral values, you also have the option of initializing a static const right in the class definition: ``` class Foo { private: static const int myInt ...
[ 0.07839774340391159, -0.4353910982608795, 0.2295365035533905, 0.04634448513388634, -0.06102239340543747, -0.07060212641954422, -0.11136730760335922, -0.21258153021335602, -0.1591218262910843, -0.4370013177394867, -0.16083179414272308, 0.6535822153091431, -0.661796510219574, -0.001844029058...
I'm working on a java swing application that will be used in a psychology experiment and the researchers have requested that I make the program "black out the screen" in order that there should be no outside stimuli for the user. They want the swing app to be truly full-screen and without any type of title bar or minim...
[ 0.40643757581710815, 0.22361543774604797, 0.328246146440506, -0.3478442430496216, -0.0973578467965126, -0.14811451733112335, 0.24036729335784912, -0.23422090709209442, -0.179229274392128, -0.33124661445617676, -0.0677003264427185, 0.5868301391601562, -0.16639240086078644, -0.00681741628795...
// Can only do this when the frame is not visible fr.setUndecorated(true); } GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(); try { if (gd.isFullScreenSupported()) { gd.setFullScreenWindow(fr); } else { // Can't run fullscreen, need to bodge around it (setS...
[ 0.19504497945308685, -0.20095118880271912, 0.8868994116783142, -0.16970618069171906, -0.205601766705513, -0.008694062940776348, 0.4303760528564453, -0.1527959555387497, -0.33099693059921265, -0.7882592678070068, -0.15902212262153625, 0.8476799130439758, -0.23765793442726135, -0.02129261940...
I have a Flash (AS3) component library that I'm distributing, and I want to make sure that it's fully documented for each release. One of the things I really liked about Microsoft's automatic doc generation for C# was that I could have my compiler generate warnings (on every compile) for any public member that wasn't d...
[ 0.6491106152534485, 0.4172945022583008, -0.142652690410614, 0.064121313393116, -0.1764511615037918, -0.5195730924606323, 0.15004126727581024, 0.24701453745365143, -0.2707071900367737, -0.5332408547401428, -0.05293988808989525, 0.5504082441329956, -0.1850096881389618, -0.12357626110315323, ...
to work from within Eclipse / Flex Builder, but I'm okay using Ant. Depending on what the "project" is. If it's an application, bundle it. If it's a library, don't. EDIT: To elaborate a bit more: When making an application, you usually don't want to burden (or rely on) the user with installing and upgrading to the ...
[ 0.8278677463531494, -0.01746206544339657, -0.09562166035175323, 0.12053588032722473, -0.27059701085090637, -0.02461608126759529, 0.15440601110458374, -0.1590079516172409, -0.17367489635944366, -0.9813190698623657, 0.18371844291687012, 0.6604940891265869, -0.43328747153282166, -0.2484495788...
different PHP versions are often annoying. When making a library, otoh, you don't want to cause more side effects than absolutely necessary and want to give all the power to it's user (which in this case is a developer). If your library needs SomeLib 2.3.5, but the app that uses your library needs SomeLib 2.3.7, then ...
[ 0.46187081933021545, -0.07070107758045197, 0.17519880831241608, 0.3231923282146454, -0.30276694893836975, -0.4361713230609894, 0.31619998812675476, -0.31839945912361145, 0.11304786056280136, -0.4081747829914093, 0.03764210268855095, 0.42261165380477905, -0.391853004693985, -0.1511642336845...
I'm getting the LNK2005: already defined in (...) error when building my project in Visual Studio 2008. I've referenced other related questions, but mine seems to be a bit more complicated due if nothing else to the number of files I'm working with. First, I think it will be helpful for me to map out the #include stat...
[ -0.008912185207009315, -0.3145372271537781, 0.4897925853729248, -0.10023371875286102, -0.2996770739555359, 0.03214224800467491, -0.021116260439157486, -0.46342429518699646, 0.023485099896788597, -0.6822348833084106, 0.12978272140026093, 0.5887936353683472, -0.15529069304466248, -0.08916071...
AudioHandler class which has member objects of Chorus classes [Chorus.cpp] ->AudioHandler.h definitions for the members of Modulator and Chorus classes [AudioHandler.cpp] ->Chorus.cpp definitions for the members of AudioHandler class [ChorusUnit.cpp] ->AudioHandler.cpp the file containing the main() function that...
[ 0.21875888109207153, -0.07541780173778534, 0.4211873710155487, 0.1261231154203415, -0.010158178396522999, 0.07738862931728363, 0.032692547887563705, -0.42460963129997253, 0.13488472998142242, -0.29443609714508057, 0.050274547189474106, 0.5855265259742737, -0.16181480884552002, 0.1155248656...
AudioHandler.obj. Also there is another set of the same error type that says every single definition found in Chorus.cpp and AudioHandler.cpp in file ChorusUnit.obj is already defined in AudioHandler.obj. There is probably a pretty straightforward solution, but I am not particularly experience (being mostly a Java pro...
[ 0.47418293356895447, 0.16647522151470184, 0.28297048807144165, 0.08923596143722534, -0.2835703194141388, -0.152810201048851, 0.23810505867004395, 0.016330111771821976, -0.3039771616458893, -0.44512903690338135, 0.282268226146698, 0.43433278799057007, -0.2743338942527771, 0.1777555197477340...
is not what you probably want. The reason is, that all .cpp files (unless you've done something special in your IDE) are compiled separately, then linked. When you #include another .cpp file, the file's text is literally included; therefore, all objects defined in the included file appear in the including file as well...
[ 0.3185018002986908, 0.022608553990721703, 0.11555784940719604, 0.16823038458824158, 0.09073392301797867, -0.3683053255081177, -0.0015553153352811933, 0.08233895897865295, -0.3144744038581848, -0.4007422924041748, -0.3689291477203369, 0.2279265969991684, -0.4868072271347046, 0.2322482913732...
Is it possible to add Vault file version number into this file's source? You can use `$Revision: $` to specify the revision number in a comment of your source file. You must enable Keyword Expansion for your repository by using the Admin Tool and changing Repository Options. Check "Enable keyword expansion" in the keyw...
[ 0.20754176378250122, -0.01569669134914875, 0.39259064197540283, 0.42842212319374084, 0.36962419748306274, -0.10131785273551941, 0.16748133301734924, -0.09151876717805862, -0.48983338475227356, -0.5655958652496338, -0.34673258662223816, 0.5020325183868408, 0.1685456782579422, 0.131133779883...
I formatted and reinstalled my system today. I reinstalled VS 2008, but all my .aspx pages are no longer syntax highlighted (the text editor displays them in plain black font color) and IntelliSense isn't working on these pages either. The font color issue appears for .css files, too. And I also cannot see aspx pages ...
[ 0.08596933633089066, -0.14726553857326508, 0.749177098274231, 0.13548637926578522, -0.3002234101295471, -0.0892748162150383, 0.7915113568305969, 0.10336630791425705, -0.23390178382396698, -0.9632920026779175, -0.16055834293365479, 0.8294079303741455, -0.027242062613368034, 0.06535425037145...
How to insert a newline before a pattern within a line? For example, this will insert a newline *behind* the regex pattern. ``` sed 's/regex/&\n/g' ``` How can I do the same but *in front* of the pattern? Given this sample input file, the pattern to match on is the phone number. ``` some text (012)345-6789 ``` ...
[ 0.17626994848251343, -0.07806866616010666, 0.4233422577381134, -0.05226508527994156, 0.019706005230545998, -0.02219388633966446, 0.388597697019577, -0.009173504076898098, -0.07555679231882095, -0.8301549553871155, -0.14112412929534912, 0.36608171463012695, -0.4683672785758972, -0.085711792...
I have seen `SQL` that uses both `!=` and `<>` for ***not equal***. What is the preferred syntax and why? I like `!=`, because `<>` reminds me of `Visual Basic`. Technically they function the same if you’re using SQL Server AKA T-SQL. If you're using it in stored procedures there is no performance reason to use one ov...
[ 0.5686501264572144, 0.22165977954864502, -0.18154986202716827, -0.04918152466416359, -0.28911474347114563, -0.06894795596599579, -0.022553512826561928, 0.02040988579392433, -0.15279604494571686, -0.6881245970726013, -0.030730366706848145, 0.8425362706184387, -0.08206281065940857, 0.1972401...
I'm looking for a quick way to create a list of values in C#. In Java I frequently use the snippet below: ``` List<String> l = Arrays.asList("test1","test2","test3"); ``` Is there any equivalent in C# apart from the obvious one below? ``` IList<string> l = new List<string>(new string[] {"test1","test2","test3"}); ...
[ 0.42164885997772217, 0.03742261976003647, -0.1955486536026001, -0.1576356440782547, -0.24763350188732147, 0.02238931879401207, 0.25054118037223816, -0.35575205087661743, -0.12175082415342331, -0.7245871424674988, -0.002799175912514329, 0.43620815873146057, -0.4563412368297577, -0.299819052...
I have a table with a smallint column that contains percentages as whole numbers (i.e., 50, 75, 85, etc.) When I divide this column by 100, as in ``` SELECT MY_COLUMN/100 AS PCT_AS_FRACTION FROM MY_TABLE ``` the result is rounded to the nearest whole number. For example, for a row that contains the number "50", I g...
[ 0.09448163956403732, 0.25394368171691895, 0.18248504400253296, -0.13390225172042847, -0.13864383101463318, 0.5275171995162964, -0.07974499464035034, -0.47065097093582153, -0.17260687053203583, -0.5044125914573669, 0.317921906709671, 0.2877718210220337, 0.218552365899086, 0.2440107613801956...
you tried dividing MY\_COLUMN by 100.0?
[ 0.3776395618915558, 0.3171844780445099, 0.09773249924182892, -0.0728965625166893, 0.05818859860301018, 0.11424434930086136, 0.17574219405651093, -0.05738966912031174, -0.08719337731599808, -0.22193896770477295, 0.5052421689033508, 0.20862315595149994, -0.21606476604938507, 0.25748500227928...
In my company we often value the software to be almost the same as concurrent software on the market. While this is one way I'm interested of other (maybe more academic) ways of value and put a price on software. Any ideas or methods that have been succesful for you? I've done some contract work in the past, and I bas...
[ 0.8413785696029663, 0.258187472820282, -0.0568750835955143, -0.0367443673312664, 0.30285173654556274, 0.44278740882873535, -0.01668931543827057, 0.20755283534526825, -0.12952293455600739, -0.6473506093025208, 0.32070210576057434, 0.8729803562164307, 0.38026562333106995, 0.23079811036586761...
fees, documentation, training, etc. Then I compared that to the industry standard. In my case it was usually cheaper, and I still made money. Thus both the client and myself were happy. Edit: Mind you the above method is for a single client, with a custom software solution, and a simple unlimited-use license.
[ 0.747830867767334, 0.13964082300662994, 0.31182169914245605, 0.15211747586727142, 0.21619510650634766, -0.08522506058216095, 0.02294229157269001, -0.034505899995565414, -0.2852671146392822, -0.29990339279174805, 0.1310487985610962, 0.6952458024024963, -0.1736835241317749, -0.12588453292846...
I have something similar to the following: ``` SELECT c.id FROM contact AS c WHERE c.id IN (SELECT s.contact_id FROM sub_table AS s LEFT JOIN contact_sub AS c2 ON (s.id = c2.sub_field) WHERE c2.phone LIKE '535%') ORDER BY c.name ``` The problem is that the query takes a very very very long time (>2m...
[ -0.17726391553878784, 0.09374331682920456, 0.42305421829223633, 0.030075328424572945, 0.11186975240707397, -0.12908639013767242, 0.10359805077314377, -0.3873312175273895, 0.0072204661555588245, -0.5804502964019775, -0.1894460767507553, 0.46215954422950745, -0.004425727762281895, 0.25243929...
methods and keys are being used appropriately and the same ways. The subquery doesn't return more than 200 IDs. What could be causing the subquery method to take so much longer? BTW, I know the query above can be written with joins, but the query I have can't be--this is just a simplified version. Using MySQL 5.0.22...
[ 0.24725298583507538, -0.061040062457323074, 0.5103744864463806, 0.2575560212135315, -0.09327834099531174, -0.21243679523468018, 0.488429456949234, -0.23625893890857697, -0.1527283638715744, -0.4313506484031677, 0.43975579738616943, 0.5500960946083069, -0.4679645001888275, 0.241773754358291...
The "goto" statement comes straight out of ASM or any other assembler language. Here's a link: <http://be2.php.net/manual/en/control-structures.goto.php> I'm wondering: what can this do to make my code more well-organized? How can I implement this in larger projects, without screwing it up. Since the goto will allow ...
[ 0.7588855028152466, -0.13360470533370972, -0.2608320415019989, 0.37358012795448303, -0.4440211057662964, -0.37213560938835144, 0.1732160747051239, -0.07868991047143936, -0.176781564950943, -0.16823862493038177, -0.2227582037448883, 0.23568794131278992, -0.3154170513153076, -0.0505756586790...
I'm still wondering: why would PHP bother to add it to the language. If they didn't see something in it, they wouldn't do it... so why? Also: [A discussion here on StackOverflow about "goto" in general](https://stackoverflow.com/questions/46586/goto-still-considered-harmful) EDIT2: Seeing as this question induced a l...
[ 0.710426390171051, 0.7203730940818787, 0.1286134570837021, -0.07514315098524094, -0.1051858589053154, -0.11942947655916214, 0.1805376410484314, 0.13506723940372467, -0.21656067669391632, -0.11586139351129532, -0.05110311508178711, -0.12880335748195648, -0.15836942195892334, 0.3557779490947...
he said some stuff about "back in my day..." After discussing that a bit, he came back to the goto statement, saying that even back in his days as a student, they allready knew it wasn't a smart idea to use it, but they didn't have much better back then. Try/catch was still years away and error handling hardly excis...
[ 0.7264130115509033, -0.10854986310005188, 0.048344433307647705, 0.34864842891693115, -0.14407643675804138, -0.04845171049237251, 0.06560246646404266, 0.07776736468076706, -0.19725161790847778, -0.17604553699493408, -0.03332483395934105, -0.13777826726436615, -0.3806804418563843, 0.10734365...
printing;", or something like that, to start the printing of your data. And in this manner, you gradually debugged your code. He agrees that the use of goto in the modern programming world is pretty useless. The only use he finds justified is an "emergency break", to be used in extreme debugging and unexpected situat...
[ 0.17189769446849823, 0.2228350043296814, 0.23398837447166443, 0.19852451980113983, -0.12706884741783142, -0.22116227447986603, 0.3424324691295624, -0.07245766371488571, -0.3831357955932617, -0.2768518626689911, -0.23260997235774994, 0.46083930134773254, -0.23824335634708405, -0.07837434113...
you shouldn't need to use goto. I think it's a mistake that they're adding it in, as it just leads to lazy programming. See <http://www.procata.com/blog/archives/2004/07/29/goto-in-php/> For a good commentary on the addition of this to PHP, and also, here on stack overflow, [GOTO still considered harmful?](https:/...
[ 0.24480512738227844, 0.23124125599861145, 0.06822740286588669, 0.13216295838356018, -0.09654489159584045, -0.38021066784858704, 0.3375072777271271, 0.18726994097232819, -0.5171769857406616, -0.012397294864058495, -0.050605520606040955, 0.3307061493396759, -0.2863816022872925, 0.18017414212...
I'm using SQL Server 2005. I'm looking at opening a SQL connection, looping though a collection and running an update query (stored procedure or parameterized query) with the data from the collection item, then closing the connection. Which is going to give me better performance and why? It is difficult to say with ce...
[ 0.00994682963937521, 0.09599807858467102, 0.27803927659988403, 0.013537217862904072, -0.20096895098686218, -0.23593196272850037, 0.02568156085908413, -0.026935188099741936, -0.2572433054447174, -0.5270721316337585, 0.17100371420383453, 0.521239697933197, -0.3361743986606598, 0.156240060925...
serialize your object into XML. Then you can use Xquery, Open XML or sp\_XML\_preparedocument to retrieve your data in a set based manner from the XML and perform the update statement.
[ 0.2958950400352478, -0.12192419916391373, 0.6332390904426575, 0.4059104025363922, -0.07218172401189804, -0.3205847144126892, -0.1311194747686386, -0.03251997381448746, -0.27633851766586304, -0.5197969675064087, -0.33553382754325867, 0.3669920563697815, -0.17961826920509338, 0.1978646069765...
Let's say there are 2 tables Table1 { ID, Name, Other } and Table2 { ID, Name, Other }. Both of them have identical records with the same IDs except that in Table1 all Name values are NULL. How can I import Name values from Table2 to Table1 using T-SQL (SQL Server 2008)? ``` Update Table1 Set Table1.Name = Table2.Name ...
[ -0.3786413073539734, 0.009912555105984211, 0.36724016070365906, -0.021257838234305382, -0.15632860362529755, -0.01739744283258915, -0.06115831062197685, -0.18844203650951385, -0.36194321513175964, -0.538301408290863, 0.07726668566465378, 0.21700473129749298, -0.18328166007995605, 0.1357293...
I have a large number of text files (1000+) each containing an article from an academic journal. Unfortunately each article's file also contains a "stub" from the end of the previous article (at the beginning) and from the beginning of the next article (at the end). I need to remove these stubs in preparation for run...
[ 0.5553573369979858, 0.5989964008331299, 0.3772087097167969, 0.1549757421016693, -0.012216528877615929, -0.4406992495059967, 0.022752942517399788, -0.049899209290742874, -0.004066335037350655, -0.48736512660980225, -0.043603040277957916, 0.25016117095947266, 0.07158740609884262, 0.496837168...
both cases. A script that compared each file to the next file and then removed 1 copy of the duplicate text would be perfect. This seems like it would be a pretty common issue when programming so I am surprised that I haven't been able to find anything that does this. The file names sort in order, so a script that co...
[ 0.3192150294780731, 0.1677270382642746, 0.08156900852918625, 0.0796368420124054, -0.2960745096206665, -0.03777102380990982, 0.28847622871398926, -0.19953908026218414, -0.22678759694099426, -0.46813011169433594, -0.006800755858421326, 0.5043482780456543, -0.21765391528606415, -0.00383556121...
am an academic doing content analysis of old journal articles for a project in the history of psychology. I am no programmer, but I do have 10+ years experience with linux and can usually figure things out as I go. Thanks for your help **FILENAME: bul\_9\_5\_181.txt** SYN&STHESIA ISI the majority of Portugese wor...
[ -0.07444990426301956, 0.19992728531360626, 0.13741612434387207, -0.059093695133924484, -0.15057192742824554, 0.28252530097961426, 0.44566574692726135, 0.16682502627372742, -0.3611820638179779, -0.5948730707168579, 0.0573853924870491, 0.09356822818517685, -0.14726172387599945, 0.21772883832...
22, S28-539MEDEIROS-E-ALBUQUERQUE. Sur un phenomene de synopsie presente par des millions de sujets. / . de psychol. norm, et path., 1911, 8, 147-151. MYERS, C. S. A Case of Synassthesia. Brit. J. of Psychol., 1911, 4, 228-238. AFFECTIVE PHENOMENA — EXPERIMENTAL BY PROFESSOR JOHN F. .SHEPARD University of Michigan Th...
[ -0.035862602293491364, 0.5251747965812683, -0.4274401068687439, 0.00542706623673439, -0.34855344891548157, 0.7621687650680542, 0.5830445289611816, -0.6376520395278931, -0.1660463660955429, -0.5605043768882751, -0.05124901980161667, 0.15623608231544495, -0.13597509264945984, 0.2408519834280...
various groupings, they are accompanied by characteristic feelings in each subject. He records the chest breathing, and curves from a sphygmograph and a water plethysmograph. Each experiment began with a normal record, then the stimulus was given, and this was followed by a contrast stimulus; lastly, another normal was...
[ 0.12028566002845764, -0.09562619030475616, -0.04785925894975662, -0.03613043203949928, -0.10273884236812592, 0.6941506862640381, 0.4046270549297333, -0.7102751135826111, -0.15755802392959595, -0.3749596178531647, -0.008905057795345783, 0.2646764814853668, -0.04697279632091522, -0.118077278...
to have been increased or decreased during a reaction period with each type of feeling. The feeling state accompanying a given rhythm is always complex, but the result is referred to that dimension which seemed to be dominant. Only a few disconnected extracts from normal and reaction periods are reproduced from the rec...
[ 0.2283087521791458, -0.19581927359104156, 0.2949220538139343, -0.07997457683086395, -0.11660809069871902, 0.11134815961122513, 0.338561475276947, -0.3928241431713104, -0.6430427432060242, -0.09100961685180664, 0.11922913789749146, 0.375179260969162, 0.11869107931852341, -0.0819419324398040...
depth of 182 JOHN F. SHEPARD breathing, in the inspiration-expiration ratio, and in the pulse rate and size. The arm volume shows a tendency to rise with respiratory waves. Agreeableness shows Here's is the beginning of another possible solution in Perl (It works as is but could probably be made more sophisticated i...
[ 0.32738664746284485, 0.2740105390548706, 0.3936944007873535, -0.05091848969459534, 0.15151697397232056, 0.21263669431209564, 0.15207786858081818, -0.28560951352119446, -0.31267985701560974, -0.46624085307121277, 0.15490660071372986, 0.3616794943809509, 0.028540225699543953, 0.0331336669623...
lines leaving only one copy of any given line in the set of files as a whole. You can either just run the file in the directory containing the text files with no argument or alternately specify a file name containing the list of files you want to process in the order you want them processed. I recommend the latter as ...
[ 0.36383792757987976, -0.21243970096111298, 0.41364234685897827, 0.17122720181941986, -0.1620195209980011, 0.256994366645813, -0.05142071470618248, 0.20117495954036713, -0.289276659488678, -0.7130630612373352, -0.17042449116706848, -0.0627545639872551, -0.49983692169189453, 0.30133631825447...
correct files to one another as it just runs down the list (entered or generated by the glob command). If you specify the list, you can guarantee that they will be processed in the correct order and it doesn't take that long to set it up properly. The script simply opens two files and makes note of the first three lin...
[ 0.18563169240951538, -0.17430824041366577, 0.7644211649894714, 0.017797645181417465, 0.2486961930990219, -0.07889802008867264, 0.197305828332901, 0.008187736384570599, -0.19815777242183685, -0.7239274978637695, -0.26297247409820557, 0.4829694628715515, -0.3466164767742157, -0.0304733365774...
three lines of the second file. There is an off chance that there are not three lines from the second file in the last one but in all the files I spot checked that seemed to be the case because of the journal name header and page numbers. One line definitely wasn't enough as the journal title was often the first line a...
[ 0.22803395986557007, -0.02692611701786518, 0.33111146092414856, 0.22928762435913086, -0.43015292286872864, 0.09801770746707916, 0.45237597823143005, 0.3093777894973755, -0.19163016974925995, -0.5813770294189453, 0.17382927238941193, 0.3045765161514282, -0.37908416986465454, 0.4470242559909...
be changed by this process. Here's the script: ``` #!/usr/bin/perl use strict; my @files; my $count = @ARGV; if ($count>0){ open (IN, "$ARGV[0]"); @files = <IN>; close (IN); } else { @files = glob "bul_*.txt"; } $count = @files; print "Processing $count files.\n"; my $lastFile=""; foreach(@files){ ...
[ -0.07307636737823486, -0.3014562726020813, 0.9503189921379089, -0.5136809349060059, 0.3125004172325134, 0.3428075909614563, 0.198427215218544, -0.39810964465141296, -0.4322151839733124, -0.6326112151145935, -0.5491130352020264, 0.5943979024887085, -0.4144260287284851, 0.29253172874450684, ...
= $fileBLines[0]; if ($line0 =~ /\(/ || $line0 =~ /\)/){ $line0 =~ s/\(/\\\(/; $line0 =~ s/\)/\\\)/; } my $line1 = $fileBLines[1]; my $line2 = $fileBLines[2];
[ -0.339072048664093, -0.7024869918823242, 0.8429098129272461, -0.441957026720047, 0.03683485835790634, 0.49017325043678284, 0.3679240643978119, -0.06295700371265411, 0.14927799999713898, -0.5563421249389648, -0.6268903613090515, 0.31673967838287354, -0.37271198630332947, 0.02821264415979385...
open (FILEA,"$lastFile"); my @fileALines = <FILEA>; close (FILEA); my $newName = "$lastFile.new"; open (OUT, ">$newName"); my $i=0; my $done = 0; while ($done != 1 and $i < @fileALines){ if ($fileALines[$i] =~ /$line0/
[ -0.2651228606700897, -0.2773149907588959, 0.6919755339622498, -0.5231556296348572, 0.43392646312713623, 0.2117663025856018, 0.2985018193721771, -0.20268777012825012, -0.03441113233566284, -0.6459827423095703, -0.6354677677154541, 0.5014395713806152, -0.11183369159698486, 0.250446081161499,...
&& $fileALines[$i+1] == $line1 && $fileALines[$i+2] == $line2) { $done=1; } else { print OUT $fileALines[$i];
[ -0.07977845519781113, -0.36368516087532043, 0.5830098986625671, -0.33780086040496826, 0.24590511620044708, 0.21899442374706268, 0.34592536091804504, -0.32560476660728455, -0.01887846738100052, -0.4255755543708801, -0.6343583464622498, 0.6258906722068787, -0.46261104941368103, -0.0462031662...
$i++; } } close (OUT); } $lastFile = $_; } ``` **EDIT:** Added a check for parenthesis in the first line that goes into the regex check for duplicity later on and if found escapes them so that they don't mess up the duplicity check.
[ 0.03476133570075035, 0.08148875087499619, 0.4316907227039337, -0.3034415543079376, 0.14620636403560638, 0.09254693984985352, 0.4077317714691162, -0.24443240463733673, -0.22128508985042572, -0.5404183268547058, -0.2877989709377289, 0.4048026204109192, -0.454219788312912, 0.0329856313765049,...
I wrote a simple applet to have as a base fr making games, and it's already using up >50% of my CPU. I'm on a 3ghz P4 with 1.5gb ram, so I know it shouldn't take up THAT much. ``` import java.awt.*; import java.applet.*; public class applettest extends Applet implements Runnable { long lastFrame; public voi...
[ 0.20342695713043213, 0.10493116080760956, 0.5930454134941101, -0.4880516827106476, 0.36397111415863037, 0.4390857517719269, 0.3477781116962433, -0.11774814128875732, -0.2256384789943695, -1.0299659967422485, -0.0718175545334816, 0.8924975395202637, -0.46166735887527466, -0.0347252003848552...
public void run() { while(true) { // code here repaint(); try{ // wait 16 milliseconds to cap frame rate to 60 fps while (System.nanoTime() < lastFrame
[ 0.6358686089515686, -0.5039970278739929, 0.5487855672836304, 0.04885990172624588, 0.4396459460258484, 0.1832311898469925, 0.3600428104400635, -0.32833245396614075, -0.20514793694019318, -0.6957167983055115, -0.061227947473526, 0.5809249877929688, -0.13494233787059784, 0.281074196100235, ...
+ 160000000) { Thread.yield(); } lastFrame = System.nanoTime(); } catch(Exception e){} } } } ``` Try
[ 0.11349084228277206, -0.4151490032672882, 0.5867071151733398, -0.08526583015918732, 0.36307889223098755, -0.06582678109407425, 0.09501264989376068, -0.290706068277359, -0.24278825521469116, -0.6277677416801453, -0.14799495041370392, 0.3481566607952118, -0.18018527328968048, 0.4899153113365...
replacing your [**busy wait**](http://en.wikipedia.org/wiki/Busy_waiting) with ``` lastFrame = System.currentTimeMillis(); while(true) { repaint(); long msSleep = 16 - (System.currentTimeMillis() - lastFrame); lastFrame = System.currentTimeMillis(); if(nsToSleep > 0) { Thread.sleep(msSleep); ...
[ 0.31731441617012024, -0.32091763615608215, 0.9972994923591614, -0.23717562854290009, 0.6133738160133362, 0.19353291392326355, 0.25751447677612305, 0.08146612346172333, -0.6553096771240234, -0.7322895526885986, -0.3801451027393341, 0.6908703446388245, -0.10253532975912094, 0.442938029766082...
guarantee that the time between frames is **at least 16ms**. If your render time is less than 16ms, and there aren't any other threads hogging the CPU, it will run at 60fps. Your original solution will enforce the 16ms minimum, but it has to keep [polling](http://en.wikipedia.org/wiki/Busy_waiting) the system time ove...
[ 0.43596431612968445, -0.20682944357395172, 0.9774003624916077, -0.0690843015909195, 0.12795129418373108, 0.19967176020145416, 0.5230379104614258, -0.27729105949401855, -0.5513360500335693, -0.8215752840042114, -0.5053951144218445, 0.8922911882400513, -0.08360162377357483, -0.12967284023761...
I am doing a maprouting application. Several people have suggested me, that I do a datastructure where I split the map in a grid. In theory it sounds really good, but I am not to sure because of the bad performance I get when I implement it. In the worst case you have to draw every road. If you divide the map in a gri...
[ 0.5838184356689453, 0.1598178744316101, 0.1692332923412323, 0.04218943044543266, -0.09816447645425797, 0.20952002704143524, -0.11193873733282089, -0.2983885109424591, -0.3609113395214081, -0.9374330043792725, 0.43985140323638916, 0.2880787253379822, -0.010042723268270493, 0.333289980888366...
through it). If I have to zoom in I can see some smartness in using a grid, but if I keep it in a list I can just decrease the numbers of roads each time I zoom in. As it is now(by using the list) it is not really fast, so I am all for making it faster. But in practice dividing in a grid makes it slower for me. Any s...
[ 0.156373992562294, 0.05113207548856735, 0.3994835615158081, 0.005316188558936119, -0.14757154881954193, -0.028404265642166138, 0.2035864144563675, -0.058580365031957626, -0.36022624373435974, -0.7926377058029175, 0.1409919261932373, 0.26663872599601746, -0.2107352763414383, 0.2484564781188...
).join(',') ) ``` You can extend this, with a little pre-processing, to vary whether you want to sort ascending or descending with each key. Hope this helps!
[ 0.2661559283733368, 0.1114354282617569, 0.4660411775112152, -0.1437235176563263, 0.4437694549560547, 0.049176182597875595, 0.3426492512226105, -0.2446347326040268, -0.2709032893180847, -0.6140795350074768, -0.33615294098854065, 0.19560390710830688, -0.21404960751533508, 0.05924447625875473...
What do you see as the advantages and disadvantages of Amazon Web Services S3 compared with Google Application Engine? The cost per gigabyte for the two is, at the time I ask, roughly similar; I have not seen any widespread complaints about the quality of service; so I think the decision of which one to use may depend ...
[ 0.3625929057598114, 0.08042000234127045, 0.15030425786972046, 0.33671852946281433, -0.1452498584985733, -0.02997070550918579, 0.1688222885131836, 0.05451527237892151, -0.25580257177352905, -0.3933956027030945, -0.24674060940742493, 0.4535433351993561, -0.30991896986961365, 0.18276336789131...
bandwidth limit is reached; non-static requests will be fulfilled until your bandwidth or CPU limit is reached. With respect to your non-static requests, you can provide any logic you are able to express in Python, so you can be choosy about who you serve. Amazon's API treats all your content as blobs in a bucket, and...
[ 0.5799744725227356, -0.18553736805915833, 0.3804160952568054, 0.3444654047489166, -0.24775242805480957, -0.0482279472053051, 0.16680064797401428, 0.23085251450538635, -0.3954971730709076, -0.6379936337471008, -0.06836119294166565, 0.36772462725639343, -0.24940171837806702, 0.29704749584198...
you see between the two? Are there other cloud storage services you like? [Zetta](http://www.zetta.net) had a press release today, but they're looking for a minimum of ten terabytes on the beta application, and none of my clients are there (yet); and [Joyent](http://www.joyent.com) will probably do something in the nea...
[ 0.3004859387874603, -0.17900045216083527, 0.251839280128479, 0.2122008502483368, -0.14819082617759705, 0.10471586138010025, 0.09184706956148148, -0.0318397618830204, -0.43108925223350525, -0.34117868542671204, -0.08622658997774124, 0.7594850063323975, -0.11103472858667374, 0.05594747141003...
as a simple CDN, and that if you want to use it as one you'll have to do some work. S3 does the job out of the box, all you have to do is grab a third-party interface app. If you want to do something non-standard with file access on S3, then probably Amazon expects you to spring for a server instance on EC2. Once this...
[ 0.009787316434085369, -0.2503073215484619, 0.1364733725786209, 0.21392188966274261, -0.18583108484745026, -0.24821126461029053, -0.005123088136315346, 0.016158737242221832, -0.32200542092323303, -0.6723096966743469, -0.09053738415241241, 0.7866084575653076, -0.011141853407025337, -0.120509...
(up to 1GB storage, 1GB bandwidth and 1.3 million hits a day are free: <http://code.google.com/appengine/docs/quotas.html>). Depending on your use, this might be significant, or it might be irrelevant on the scale of your total bandwidth costs. Coincidentally, I have just this last couple of days looked at GAE for the...
[ 0.3760312497615814, 0.04717026650905609, 0.26681774854660034, -0.1651935875415802, -0.3168680667877197, 0.040136758238077164, 0.35597285628318787, 0.043024029582738876, -0.4129840135574341, -0.574269711971283, -0.06559107452630997, 0.6677379608154297, 0.0002321195788681507, -0.127200663089...
effort than loading a bunch of files onto S3, but less effort than maintaining EC2 server(s). However, I haven't used Amazon. [Edited to add: this sounds like the advantages are all with Amazon for commercial purposes. This may well be true, but then GAE is not yet mature and presumably will get better from here fairl...
[ 0.5100254416465759, -0.2757924795150757, 0.24194800853729248, 0.15072377026081085, -0.16215814650058746, -0.13171400129795074, 0.11984077841043472, 0.20402798056602478, -0.2798885107040405, -0.32933688163757324, 0.02943437173962593, 0.4295055568218231, 0.11934265494346619, 0.03015470504760...
a good fit for the BigTable data paradigm, then it might scale better on GAE than EC2. For storage I assume that S3 is already good enough for all reasonable purposes, and Google's clever architecture gives GAE no advantages to compensate when all you're doing is serving files.] \* Except that Google has just offered ...
[ 0.033964648842811584, -0.17681483924388885, 0.13972997665405273, -0.07256341725587845, -0.07955414801836014, -0.22529016435146332, 0.3644072413444519, -0.003973900806158781, -0.14616091549396515, -0.6679980158805847, -0.1582612246274948, 0.5219517946243286, -0.05685119703412056, -0.1456756...
We have a DLL that monitors changes in status and looks for events from a separate, purchased product. Actually, it is a ScreenPop API from Siemens, for those of you who may know what that is. I am using C#.NET 3.5 as the platform. This API takes a looong time to initialize, so we want to use a separate thread to init...
[ 0.4335709512233734, -0.3935888111591339, 0.43470191955566406, 0.2796269953250885, 0.10691938549280167, 0.04900291562080383, -0.18287356197834015, 0.5544926524162292, -0.3130781352519989, -0.7478135228157043, 0.10726995766162872, 0.3689243197441101, -0.0670795664191246, 0.18428902328014374,...
currently implemented doesn't work, or at least doesn't work reliably. Within the ScreenPop class, there is an initialization method where all the long-running startup code is placed. This is called from the constructor of the class, like this: ``` public ScreenPop( string Address, int Ext, CallbackStatusType pStatusF...
[ -0.07963545620441437, -0.10604764521121979, 0.4917272627353668, -0.04257702827453613, 0.23919415473937988, -0.06980665028095245, 0.06400012969970703, 0.22580178081989288, -0.33353933691978455, -0.7873930931091309, -0.33247867226600647, 0.2969111502170563, -0.42531299591064453, 0.2809536159...
code to do the screen pop - right now it just displays the data from the event. There is a lot of glue missing, but I hope you get the point. The problem with this approach is the GUI is not updated. I know the events fire and the event handlers run, and the callback functions are getting called and they seem like th...
[ 0.4396577775478363, 0.018689339980483055, 0.0106785474345088, 0.21946674585342407, 0.028627263382077217, -0.2367144674062729, 0.34377965331077576, 0.11908331513404846, -0.3516330122947693, -0.5368978977203369, 0.16714692115783691, 0.9043166637420654, -0.32537034153938293, -0.20696456730365...
request... Thanks, Dave You can never update the GUI from a different thread - only from the UI thread, which is the one that started the application. You need to use the Control.Invoke method to run code on the UI thread. Form instance, frmMain.Invoke.
[ 0.1893225461244583, -0.3363341689109802, 0.6205928921699524, 0.1860797256231308, -0.1588921993970871, -0.33587267994880676, 0.3610950708389282, -0.0004937447956763208, -0.13777634501457214, -0.7409338355064392, -0.2475990504026413, 0.8248713612556458, -0.33835068345069885, 0.07721766829490...
I am working on a development copy of a MySQL / InnoDB database that is about 5GB. I need to restore it pretty frequently for testing alter scripts, and using the mysqldump file is taking quite a while. The file itself is about 900MB and takes around an hour to load in. I've removed data inserts for unimportant tables...
[ 0.21964755654335022, 0.300829142332077, 0.28383275866508484, -0.0009373886859975755, 0.11820133775472641, 0.12267489731311798, 0.22045183181762695, -0.05411918833851814, -0.21313132345676422, -0.9780452847480774, 0.27820131182670593, 0.5761055946350098, -0.0003128115786239505, 0.0590424872...
to 'reset' the db, but is this viable with InnoDB? Is the ibdata file for one database? I only see one, even though I have multiple InnoBD db on this box. Thanks! I believe you can just copy the file named for the database (with the server daemon down) and all should be well. It seems like something that a little test...
[ 0.5356512665748596, -0.04732996225357056, 0.08752312511205673, 0.17668138444423676, -0.129982590675354, -0.14458681643009186, 0.35837042331695557, -0.04296107217669487, -0.34957319498062134, -0.40093642473220825, 0.24054451286792755, 0.5180671215057373, -0.24897605180740356, 0.133929148316...
I have a logging system where some events are repeated infinitely. for example: 12:03 - Restart attempted 12:03 - Restart failed 12:02 - Restart attempted 12:02 - Restart failed 12:01 - Restart attempted 12:01 - Restart failed This might go on for days. I imagine there are standard ways that systems ...
[ 0.42892858386039734, 0.10799558460712433, 0.1990051120519638, 0.24457082152366638, 0.1715678721666336, 0.04144249111413956, 0.7031936645507812, 0.1335143744945526, -0.7280409336090088, -0.12066551297903061, 0.3316062092781067, 0.42685356736183167, -0.25505322217941284, 0.1655512899160385, ...
attempted [3 times since 12:01] 12:03 - Restart failed [3 times since 12:01] 12:02 - Something 11:23 - Restart attempted [17 times since 11:21] ```
[ 0.32714444398880005, 0.3146970570087433, 0.3041631877422333, 0.18199223279953003, 0.4599264860153198, 0.13439130783081055, 1.19968581199646, -0.13975252211093903, -0.489999383687973, -0.2566523253917694, 0.08777819573879242, 0.5207011103630066, -0.17324824631214142, -0.05929393321275711, ...
Refactored from [bug\_report\_view.cc](http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/views/bug_report_view.cc) and [bug\_report\_view.h](http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/views/bug_report_view.h), I extracted `send_report()`, `report_phishing()`, a few other smaller functio...
[ -0.2865866422653198, 0.2664969861507416, 0.37623634934425354, 0.01440427079796791, -0.41417866945266724, 0.06979566067457199, 0.3317534625530243, -0.2619408071041107, -0.17903350293636322, -0.6217790842056274, -0.18478338420391083, 0.43841204047203064, -0.6214702725410461, 0.29297682642936...
to the URLFetcher class constructor. The constructor expects a GURL &, you are passing a `std::wstring` called `post_url`. You will need to perform some kind of conversion between the two. Possibly something like this would be appropriate: ``` GURL post_url(l10n_util::GetString(IDS_BUGREPORT_POST_URL)); URLFetcher* fe...
[ -0.172330841422081, -0.05973103642463684, 0.435726523399353, -0.05681292340159416, -0.04795123264193535, 0.09780220687389374, 0.18252703547477722, 0.16559100151062012, 0.0206696018576622, -0.7198452949523926, -0.4290944039821625, 0.3579753041267395, -0.5015181303024292, 0.4692399799823761,...
to a variable referenced only in that one function, but changed the type.
[ -0.026482420042157173, -0.16866745054721832, 0.014186582528054714, 0.01230592466890812, -0.04088321328163147, 0.04839685559272766, -0.04494381323456764, -0.01817786693572998, -0.0498434416949749, -0.037980448454618454, -0.2469063550233841, 0.28118112683296204, -0.619316577911377, 0.3734528...
I posted this community wiki in the hopes of creating a thread of expertise. My question is thus ... "Where do the experts go to learn about the newest coding techniques?". I'm basically looking for the leading/bleeding edge of architecture, design, development and theory. I know conferences and trade shows are proba...
[ 1.0094064474105835, 0.3596985340118408, -0.1367550790309906, 0.22834496200084686, 0.027322260662913322, -0.05527971312403679, 0.08853055536746979, 0.5508831143379211, 0.06561481952667236, -0.5636898279190063, -0.19955141842365265, 0.2944503724575043, 0.19729281961917877, -0.049332853406667...
but the websites need not be geared towards C#. **Blogs** * **Martin Fowler**, the best starting point I think. (<http://martinfowler.com/>) + articles like *"Consumer-Driven Contracts: A Service Evolution Pattern", "Mocks Aren't Stubs", "Inversion of Control Containers and the Dependency Injection pattern"* (<http:/...
[ 0.5641006231307983, 0.17797771096229553, 0.25427812337875366, 0.0724559873342514, -0.08439552038908005, -0.05486215278506279, 0.0986814945936203, 0.13685768842697144, -0.3084120750427246, -0.5949974656105042, -0.38560035824775696, 0.5519591569900513, 0.09704502671957016, -0.144619449973106...
applications and devteams** * **pattern&practices** home: <http://msdn.microsoft.com/en-us/practices/default.aspx>, and P&P products * *SCSF*, the Smart Client Software Factory home. Learn about desktop enterprise systems. (<http://msdn.microsoft.com/en-us/library/aa480482.aspx>) * *WCSF*, the Web Client Software Fact...
[ 0.2507976293563843, 0.10783234238624573, 0.4187690317630768, 0.08499403297901154, 0.025776224210858345, -0.047375038266181946, -0.06369846314191818, -0.255306214094162, -0.5598662495613098, -0.9097124934196472, -0.4655425250530243, 0.3985198438167572, -0.02933797426521778, 0.18295146524906...
I have a problem with **DataContextChanged** not being raised on a logical child of my custom Panel control. I've narrowed it down to this: Starting from a wizard-generated WPF application I add: ``` private void Window_Loaded( object sender, RoutedEventArgs e ) { var elt = new FrameworkElement(); ...
[ 0.2788778245449066, -0.01832885481417179, 0.4758792221546173, -0.21932844817638397, -0.023892078548669815, 0.09389308840036392, 0.40791285037994385, -0.4385538399219513, -0.030700314790010452, -0.7094417810440063, -0.008300794288516045, 0.6822201013565063, -0.30182239413261414, 0.152772650...
**DataContext** is an [inheritable dependency property](http://msdn.microsoft.com/en-us/library/ms753197.aspx). Now, I add event handlers for **DataContextChanged** both on the Window (this) and its logical child: ``` this.DataContextChanged += delegate { Debug.WriteLine( "this:DataContextChanged" ); };...
[ -0.0524054616689682, -0.18663227558135986, 0.4981931746006012, 0.05895961821079254, 0.022347938269376755, -0.1262626051902771, 0.020707041025161743, -0.3294534683227539, -0.1118660494685173, -0.8335777521133423, -0.06137150898575783, 0.5254043936729431, -0.35971149802207947, 0.150380298495...
FrameworkContentElements to my control which aren't supposed to be visual children. What's going on here? Should I do something more besides AddLogicalChild() to make it work? (Fortunately, there is a rather simple workaround - just bind the DataContext of the element to the DataContext of the window) ``` BindingO...
[ 0.10643286257982254, 0.1922721415758133, 0.5639978051185608, 0.15932071208953857, -0.023152533918619156, -0.10058259218931198, 0.2865689992904663, -0.5210064649581909, 0.11058145016431808, -0.7693274617195129, -0.12008747458457947, 0.581371009349823, -0.2832643985748291, 0.1666931211948394...
by the base implementation, too.
[ 0.5677191615104675, 0.26178520917892456, 0.16682857275009155, 0.11462794244289398, -0.021453633904457092, -0.2561386227607727, 0.043072659522295, -0.013409712351858616, -0.09252383559942245, 0.030547065660357475, -0.1078055128455162, 0.20928692817687988, -0.0518747940659523, -0.10611648857...
How do I implement error handling elegantly? For example, my data access layer can potentially throw 2 types of errors: 1) not authorized access, in which case the page should hide everything and just show the error message 2) errors that inform the user that something like this already exists in the database (say name...
[ 0.1493396759033203, 0.28434330224990845, 0.09983415901660919, 0.2668398916721344, -0.022216277197003365, -0.2564782202243805, 0.40201452374458313, -0.09981593489646912, -0.26393377780914307, -0.5055805444717407, 0.09636693447828293, 0.3199177086353302, -0.17103099822998047, 0.2006624937057...
problems potentially: 1) Every stored proc has a return field p\_error where it contains an error message. Upon getting the data from DB, I need to check this field to see what type of an error has been returned, so I can throw an appropriate exceptions. So, I still need to store my error types/error messages somewher...
[ 0.004563143011182547, 0.30809006094932556, 0.19487790763378143, 0.01942872628569603, 0.033694133162498474, 0.10555490106344223, 0.2924595773220062, -0.10220175981521606, -0.43428468704223633, -0.6967579126358032, 0.037202876061201096, 0.703534722328186, -0.3335714042186737, 0.2638143301010...
exceptions equals the number of error message types. Am I missing something here? Much thanks to everyone! Create your own exception layer. DALExceptionManager DuplicateException DatabaseException BLLExceptionManager NotAuthorizedException InvalidDateException In your Presentation Layer, Add this references an...
[ 0.31864944100379944, 0.25622522830963135, 0.1644795536994934, 0.2820153832435608, -0.36120352149009705, -0.33506760001182556, 0.37251347303390503, -0.10639319568872452, -0.43970248103141785, -0.6369825601577759, 0.16428959369659424, 0.46208375692367554, -0.5088558197021484, 0.0009896069532...
Considering the following two usage scenarios (exactly as you see them, that is, the end-user will only be interested in using `Vector2_t` and `Vector3_t`): [1]Inheritance: ``` template<typename T, size_t N> struct VectorBase { }; template<typename T> struct Vector2 : VectorBase<T, 2> { }; template<typename T> stru...
[ -0.3243776559829712, -0.32550114393234253, 0.06929074227809906, 0.30758991837501526, -0.051979824900627136, 0.18728594481945038, -0.23211397230625153, -0.4361970126628876, -0.21076910197734833, -0.7953681945800781, -0.19324791431427002, 0.815540075302124, -0.27564889192581177, 0.0166534595...
seems to avoid all that, but at the expense of me having to repeat myself multiple times. What other advantages/disadvantages did I miss, and in your opinion, which route should I take? What you ultimately want, i think, is to have the user type ``` Vector<T, N> ``` And depending on `N`, the user will get slight d...
[ 0.037278544157743454, -0.13617663085460663, 0.14954641461372375, 0.007871970534324646, -0.09346362948417664, 0.2224339097738266, -0.002283405279740691, -0.3349502980709076, -0.1388714611530304, -0.8057084679603577, 0.25280436873435974, 0.6735407710075378, -0.3721000850200653, 0.23732221126...
N> { }; ``` And implement the few functions that depend only on N being some specific value in the appropriate base-class. You may add a protected destructor into them, to prevent users deleting instances of `Vector` through pointers to `VectorBase` (normally they should not even be able to name `VectorBase`: Put tho...
[ 0.3940713405609131, -0.33006343245506287, -0.24754688143730164, 0.2994198501110077, 0.006318940781056881, -0.2945426106452942, 0.04070671275258064, -0.428419828414917, -0.17046627402305603, -0.5003728866577148, 0.04644111543893814, 0.5928763151168823, -0.35695892572402954, 0.14830291271209...
and then `enable_if` (using `boost::enable_if`) to enable or disable them for particular values of `N`, or use a int-to-type transformer like this which is much simplier ``` struct anyi { }; template<size_t N> struct i2t : anyi { }; template<typename T, size_t N> struct Vector { // forward to the "real" function ...
[ -0.2298009991645813, -0.11175820976495743, 0.618882417678833, -0.42232224345207214, -0.09044599533081055, 0.36609673500061035, 0.10643713176250458, -0.43929523229599, -0.09678187966346741, -0.4571322202682495, -0.38934218883514404, 0.7453041076660156, -0.3017538785934448, -0.19358219206333...
... } // general case void some_special_function(anyi) { ... } }; ``` That way, it is completely transparent to the user of `Vector`. It also won't add any space overhead for compilers doing the empty base class optimization (quite common).
[ 0.003242644015699625, -0.1735961139202118, 0.23405762016773224, -0.061348676681518555, -0.14598481357097626, -0.18649587035179138, 0.07747773081064224, 0.22191311419010162, -0.17440247535705566, -0.5928762555122375, -0.18512886762619019, 0.5410549640655518, -0.3683833181858063, -0.15735414...
We are designing a web site and have run into some UI challenges that would be neatly solved with a tabbed interface. Users will interact with different elements of the site (there are some basic view/edit/copy/paste functions available) and having only one object in one tab visible at a time simplifies things quite a ...
[ 0.5737895369529724, 0.06491933763027191, 0.27113819122314453, 0.25632810592651367, 0.09586034715175629, -0.25435078144073486, 0.18606241047382355, 0.24865727126598358, -0.15399521589279175, -0.668851912021637, 0.21817883849143982, 0.5094112157821655, -0.06717906892299652, -0.04975256696343...
we reached the point where everyone is comfortable with tabs and we can use them without reservation? Usability is important-- more so for this project than most. If naive users are confused by a tabbed interface it just won't work and we'll have to find another way. Tabs are becoming common place enough that I wouldn...
[ 0.6130784153938293, 0.018149834126234055, 0.39907315373420715, 0.4221940040588379, -0.03873272240161896, -0.18762286007404327, 0.3505091667175293, -0.045442674309015274, -0.1912652850151062, -0.7012159824371338, 0.046656928956508636, 0.6341580748558044, -0.09653782099485397, 0.116256430745...
two main ways of doing this: 1. Load every tab but the first using AJAX. The tabs themselves should be links to the content that the AJAX fetches. 2. Keep all of your information on the page, but hide it using JavaScript. When you cycle through the tabs, they are populated from the hidden parts of the page. A...
[ 0.4858490228652954, -0.30622154474258423, 0.04116715118288994, 0.28012940287590027, -0.42537572979927063, -0.23659302294254303, 0.015027744695544243, 0.1199699267745018, -0.2269178181886673, -0.8750662803649902, -0.08157676458358765, 0.29550397396087646, -0.18870431184768677, -0.1886852979...
While clensing [PII](http://en.wikipedia.org/wiki/Personally_identifiable_information) from test data I have been stuck with a challenging scenario: cascading the changes through the foreign key relationships in the data. Given the focus on privacy and regulations should this practice be discouraged? If the PII itself ...
[ 0.37382206320762634, 0.15913733839988708, 0.4918981194496155, 0.17167535424232483, 0.061081234365701675, -0.14810557663440704, 0.04323440045118332, -0.4795628488063812, -0.3820383846759796, -0.543030321598053, 0.4076763689517975, -0.05918169766664505, -0.12548023462295532, 0.59623903036117...
Patient Identifier eliminates > the need for the repetitive use and > disclosure of an individual's personal > identification information (i.e. name, > age, sex, race, marital status, place > of residence, etc.) for routine > internal and external communications > (e.g. orders, results, medication, > consultati...
[ 0.2439158707857132, 0.28789836168289185, 0.45996907353401184, 0.2187291979789734, -0.08769345283508301, -0.002091670408844948, 0.23188431560993195, -0.29984304308891296, 0.08361591398715973, -1.0446267127990723, -0.008171603083610535, 0.2799375355243683, -0.14227132499217987, 0.29172062873...
and multiple care settings. > Therefore, the integrity and security > of the patient information depend on > the use of a reliable Unique Patient > Identifier. The privacy issue hinges not so much on the identifier itself, but on the security and privacy of the data that the identifier is used to access, and how t...
[ 0.2528119385242462, 0.3307109773159027, 0.2521819770336151, 0.3619876503944397, 0.2788254916667938, 0.17063596844673157, 0.11613473296165466, -0.27920910716056824, -0.11714824289083481, -0.7928901314735413, 0.046716880053281784, 0.6083998084068298, -0.15984879434108734, 0.326576828956604, ...