text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
Are there automatic ways to sync comments between an interface and its implementation? I'm currently documenting them both and wouldn't like to manually keep them in sync. UPDATE: Consider this code: ``` interface IFoo{ /// <summary> /// Commenting DoThis method /// </summary> void DoThis(); } class...
[ -0.17074429988861084, -0.16358089447021484, 0.5501507520675659, -0.07285178452730179, -0.0014926692238077521, -0.12203333526849747, 0.1160135492682457, -0.3019792437553406, 0.0439191535115242, -0.8687758445739746, 0.03355046361684799, 0.8341882824897766, -0.6704913973808289, -0.13355185091...
tooltips. You can do this quite easily using the Microsoft Sandcastle (or NDoc) `inheritdoc` tag. It's not officially supported by the specification, but custom tags are perfectly acceptable, and indeed Microsoft chose to copy this (and one or two other tags) from NDoc when they created Sandcastle. ``` /// <inheritdoc...
[ 0.15627819299697876, -0.2036130279302597, 0.1480311155319214, 0.18475955724716187, -0.042188867926597595, -0.5478237271308899, 0.31055691838264465, -0.3283118009567261, -0.14741092920303345, -0.47351548075675964, -0.0582762286067009, 0.6973173022270203, -0.4783419072628021, -0.238837286829...
mentions, but it would seem to be exactly what you're looking for nonetheless.) As a note, this sounds like a perfectly fair idea to me, though I've observed that some people think you should always respecify comments in derived and implemented classes. (I've actually done it myself in documenting one of my libraries ...
[ 0.6656301617622375, -0.00509400200098753, 0.08283662050962448, 0.35115984082221985, -0.25913482904434204, -0.2881510853767395, 0.0679277628660202, 0.07062005996704102, -0.232352152466774, -0.7420794367790222, 0.1643391251564026, 0.6280983686447144, 0.0017683006590232253, -0.002512639388442...
of the actual XML file it uses for input, which means you can distribute *this modified version* along with your library DLL instead of the one built directly by Visual Studio, which means you have the comments in intellisense as well as the documentation file (CHM, whatever).
[ 0.35681548714637756, -0.13234061002731323, 0.32104113698005676, 0.09513524174690247, -0.12182632833719254, -0.23151730000972748, -0.14724977314472198, 0.17956136167049408, -0.05050227791070938, -0.7849559187889099, -0.3676730990409851, 0.4399157166481018, -0.22179557383060455, -0.077275894...
I install PHP using the [PHP installer](http://www.php.net/downloads.php). And so, the PEAR package [is not included](http://forums.codewalkers.com/pear-packages-47/no-go-pear-bat-file-47151.html). The question now is [I need PEAR](http://www.symfony-project.org/book/1_2/03-Running-Symfony) for [Symfony upgrade purpose...
[ 0.2985534071922302, 0.2125241756439209, 0.32828670740127563, -0.09360253810882568, -0.23292765021324158, 0.21940211951732635, 0.26615291833877563, -0.16657176613807678, -0.2854501008987427, -0.3558533489704132, -0.14607681334018707, 0.7208980321884155, -0.06489192694425583, -0.213013112545...
I have text file with a row like this: ``` SendersTimeSeriesIdentification: COMPANY_A/COMPANY_B/REF_7/20090505 ``` I'd like to replace all non-word chars in the value part with the character `n`, like this: ``` SendersTimeSeriesIdentification: COMPANYnAnCOMPANYnBnREFn7n20090505 ``` But there are similar strings a...
[ -0.15619127452373505, 0.3548237085342407, 0.3564300835132599, -0.2736854553222656, 0.17123766243457794, 0.2399202138185501, 0.11443571746349335, 0.25578680634498596, -0.23086819052696228, -0.5183590650558472, -0.02837267518043518, 0.568399965763092, -0.2901398241519928, 0.32613369822502136...
the PEAR option under extension menu when selecting the components for PHP installation in order to install PEAR package. [http://lh4.ggpht.com/\_SDci0Pf3tzU/SgBXLClDWEI/AAAAAAAAEuI/TgnBA\_SEHFs/s400/pear%20install.jpg](http://picasaweb.google.com/lh/photo/Cmv4KsLwUiF4spw3tDzfHw?feat=embedwebsite)
[ 0.1698652058839798, -0.03352104872465134, 0.15345804393291473, 0.24292783439159393, -0.26866936683654785, 0.5746725797653198, 0.5117583274841309, -0.03735114634037018, -0.34368520975112915, -0.3045908212661743, -0.16139554977416992, 0.3757771849632263, -0.21991194784641266, -0.109633490443...
Say I have a form on which a number of buttons exist. Everything works as it should when the buttons are clicked. How do I go about assigning keyboard shortcuts to my buttons so that Alt+A runs the action of Button A, Alt+B runs the action of button B etc. seems like this would be trivial to do but I've not been able ...
[ 0.052842214703559875, 0.05039605498313904, 0.7256104946136475, -0.17965257167816162, -0.18356600403785706, 0.37138569355010986, 0.0722014382481575, -0.3125980794429779, -0.32259824872016907, -0.52983558177948, -0.09985637664794922, 0.466012567281723, -0.2747729420661926, -0.076567657291889...
I'm working on some application, that uses a TreeView control to represent business objects. Currently the link between business objects and TreeNodes is maintained through the Tag property of the TreeNode. Im not very happy with this, because I think the link is not "tight" enough. For example there could be an TreeNo...
[ -0.23498837649822235, -0.06613186746835709, 0.2672293186187744, -0.1092560738325119, -0.1758962869644165, 0.08554249256849289, 0.3610939681529999, -0.0184724573045969, -0.33101439476013184, -0.37929967045783997, -0.26564666628837585, 0.6461651921272278, -0.47493118047714233, 0.058697406202...
public Action Action { get ... } public ActionTreeNode(Action action) : base() { if (action == null) throw new ArgumentNullException("action", "Paramter action must not be null."); mAction = action; } public void UpdateState() { switch (mAction.Ac...
[ 0.040027689188718796, -0.548517644405365, 0.26033368706703186, -0.23547105491161346, 0.27451446652412415, 0.23740577697753906, 0.47424599528312683, -0.3626619279384613, -0.25229018926620483, -0.254963755607605, -0.5598446130752563, 0.7560725808143616, -0.5116109251976013, -0.19423791766166...
{ case ActionState.Passed: SelectedImageIndex = 3; ImageIndex = 3; break; case ActionState.Failed: SelectedImageIndex = 2;
[ -0.12385464459657669, -0.20405475795269012, -0.009326726198196411, -0.11518395692110062, 0.1844371110200882, 0.21497021615505219, 0.5634274482727051, -0.4239317774772644, 0.0031809855718165636, -0.4282102584838867, -0.34592708945274353, 0.25394558906555176, -0.4813721477985382, 0.093137174...
ImageIndex = 2; break; ... } return; } } ``` With this minimal approach I have to cast every time I call a property or method of the base class that returns a TreeNode object like in "(ActionTreeNode)myNode.Parent". The solution would be
[ -0.19276206195354462, -0.23976793885231018, 0.4622178375720978, -0.10561211407184601, -0.15766024589538574, -0.0413256399333477, 0.20254144072532654, -0.12081143260002136, -0.1961478292942047, -0.7110095620155334, -0.15115098655223846, 0.5904380679130554, -0.5096685886383057, -0.0279167182...
to override/overwrite every method or property and return an object of ActionTreeNode type. What do you think, is it more suitable to take the minimal approach or would you take the effort to reimplement all the methods, properties in order to avoid casting? Thanks. I like the minimal approach. If you are worried about...
[ 0.04838821291923523, 0.03128186985850334, -0.14900146424770355, -0.06611249595880508, -0.08714901655912399, -0.17002056539058685, 0.42834511399269104, -0.09468813240528107, -0.24415405094623566, -0.41230207681655884, -0.0810500904917717, 0.4489353895187378, -0.6038103103637695, 0.058332722...
forget the null check on the return value though, should the parent not be an ActionTreeNode...
[ -0.024776244536042213, -0.24487102031707764, -0.17660604417324066, 0.01846579648554325, 0.17925354838371277, -0.49585744738578796, 0.5145188570022583, 0.07899314910173416, -0.33704861998558044, -0.33123332262039185, -0.32876282930374146, 0.3713865578174591, -0.198433980345726, 0.0303530171...
Say i have a stringsteam in C++, and I want to do different operations to it like: Searching for a sequence of characters, Converting block of text into int (in the middle of the line), Moving the get pointer back and forth and so on. What is the standard/common way of doing this kind of things with stringstreams? Yo...
[ 0.19211943447589874, -0.0010567037388682365, 0.28592854738235474, -0.10554841160774231, -0.12571634352207184, 0.08176469057798386, 0.0006318519590422511, 0.07738816738128662, -0.17437423765659332, -0.45199769735336304, -0.02234322763979435, 0.42195311188697815, -0.3063056468963623, 0.04663...
I want to Switch from Web Designer to Front End Developer or web developer PHP, which skill should I get , Is it Easy to switch from Designer to Developer. I have two years Exp. in Web Designing. Please suggest. Or should i stick to the Designing what is the **Next BIG thing** for Designer after DIV layout. My Curren...
[ 0.6612747311592102, 0.058383580297231674, 0.11483989655971527, 0.02898230589926243, -0.0996209979057312, -0.1160561740398407, 0.14218689501285553, 0.33240416646003723, -0.2574145793914795, -0.9068217277526855, 0.12014878541231155, 0.510778546333313, 0.24558062851428986, 0.04844747483730316...
Front-End Web Development none-the-less. I started with Standards-based HTML and CSS and then started working back in the day on the Views and Helper functions in MVC frameworks (with a good team doing the controllers, models etc.) Ask a competent Web Developer to give you a basic web-server architecture and process d...
[ 0.5808894634246826, 0.18329831957817078, 0.13732920587062836, 0.12244187295436859, -0.3084302544593811, -0.15033486485481262, -0.04152456298470497, -0.047647200524806976, 0.2641485333442688, -0.4688470959663391, -0.19037212431430817, 0.8431297540664673, 0.18200869858264923, -0.009715394116...
I can't help you with the PHP side of things :) Some books worth reading: * [The Design of Everyday things](https://rads.stackoverflow.com/amzn/click/com/0465067107) - Don Norman * [Don't make me think](https://rads.stackoverflow.com/amzn/click/com/0321344758) - Steve Krug * Anything by Luke Wroblewski such as [Web F...
[ 0.24089489877223969, 0.2743627727031708, -0.08554720133543015, 0.23014412820339203, -0.2618436813354492, -0.11816859245300293, 0.6127983927726746, 0.2585591971874237, -0.15081016719341278, -0.4721682369709015, -0.12718059122562408, 0.28186658024787903, -0.31101617217063904, 0.0474223308265...
I need to profile an application compiled with intel's compiler via VC++. I'm using VTune to profile my code. My understanding is that in release mode I won't have the debug information that is necessary for the profiler to profile my code while in debug mode, the result of the profiling will not be pertinent. What s...
[ 0.37798047065734863, 0.22719518840312958, 0.17365817725658417, 0.09235403686761856, -0.23774218559265137, -0.19014796614646912, 0.370731920003891, -0.051895685493946075, 0.0032404251396656036, -0.8371801376342773, -0.24250036478042603, 0.798101544380188, -0.12919220328330994, 0.15373875200...
debugging information. Because of the optimisations, some functions may be missing from the debugging information due to inlining, but VTune will cope with that.
[ -0.15084291994571686, -0.08900628983974457, -0.020052121952176094, 0.13383924961090088, -0.08145628124475479, 0.04363526403903961, 0.46721315383911133, 0.007993432693183422, 0.03222738578915596, -0.2532521188259125, -0.5665149688720703, 0.5584855079650879, -0.370445191860199, -0.0889799743...
I have a rails application which processes incoming emails via IMAP. Currently a method is used that searches the parts of a TMail object for a given content\_type: ``` def self.search_parts_for_content_type(parts, content_type = 'text/html') parts.each do |part| if part.content_type == content_type ...
[ 0.18828706443309784, -0.024592453613877296, 0.5807405114173889, 0.01454244926571846, -0.22888894379138947, 0.19851458072662354, 0.30845099687576294, -0.13952472805976868, -0.03194265812635422, -0.7280725836753845, 0.08097522705793381, 0.14928358793258667, -0.20692656934261322, 0.1424632519...
end end end end return false end ``` These emails are generally in response to a html email it sent out in the first place. (The original outbound email is never the same.) The body text the method above returns contains the full history of the email and I would like to just parse out the repl...
[ 0.19805923104286194, 0.1619948446750641, 0.707207202911377, -0.06312169134616852, -0.2223900556564331, -0.3769018352031708, 0.52494215965271, -0.1195216178894043, 0.1323617696762085, -0.28966936469078064, -0.25310662388801575, 0.33140406012535095, -0.3469036817550659, 0.2550598382949829, ...
the mail as I have seen in a 37 signals application. 2. Is there another way to ignore the client specific additions to the email, other than write a multitude of regular expressions (which I haven't yet attempted) for each and every mail client? They all seem to tack on their own bit at the top of any replies. I have ...
[ 0.2979159355163574, 0.018406517803668976, 0.44448819756507874, 0.03619065508246422, -0.27214515209198, 0.3339335024356842, 0.22988541424274445, 0.23416376113891602, -0.3893914818763733, -0.5703433156013489, 0.04250147193670273, 0.38629958033561707, -0.42811429500579834, -0.1786160469055175...
implementation really isn't too difficult. The hard part is just testing all the different email clients and services you want to support and figuring out how to identify each one. Generally, you can use either the message ID or the X-Mailer or Return-Path header to determine where an incoming email came from. Here's ...
[ 0.17092455923557281, -0.21883925795555115, 0.12817637622356415, -0.06152487173676491, 0.05875290930271149, -0.04721444845199585, 0.04358924925327301, -0.11283904314041138, -0.015854686498641968, -0.5798016786575317, 0.0238458551466465, 0.5268763303756714, -0.32423463463783264, 0.1090880706...
email.message_id('') x_mailer = email.header_string('x-mailer') # For optimization, this list could be sorted from most popular to least popular email client/service rules = [ [ 'Gmail', lambda { message_id =~ /.+gmail\.com>\z/}, /^.*#{FROM_NAME}\s+<#{FROM_ADDRESS}>\s*wrote:.*$/ ], [ 'Yahoo! Mail', lambd...
[ -0.1461484581232071, 0.17705731093883514, 0.5420405268669128, -0.1465398520231247, -0.08884633332490921, 0.27712610363960266, 0.09317104518413544, -0.08745203912258148, -0.08509185165166855, -0.5961277484893799, -0.13715557754039764, 0.4723617434501648, -0.7578178644180298, -0.010761779733...
/^\s*_+\s*\nFrom: #{FROM_NAME}.*$/ ], # TODO: other email clients/services # Generic fallback [ nil, lambda { true }, /^.*#{FROM_ADDRESS}.*$/ ] ] # Default to using the whole body as the reply (maybe the user deleted the original message when they replied?) notes = email.body source = nil # Tr...
[ 0.13090947270393372, -0.23401086032390594, 0.5963249206542969, 0.11852648854255676, -0.14689643681049347, 0.024832947179675102, 0.5801708698272705, -0.06437744945287704, -0.4560118317604065, -0.2596380412578583, -0.3951958417892456, 0.40059158205986023, -0.3209223449230194, 0.0699902772903...
search. reply_match = email.body.match(r[2]) if reply_match notes = email.body[0, reply_match.begin(0)] source = r[0] next true end end end [notes.strip, source] end ```
[ -0.19299010932445526, 0.08541128039360046, 1.0972166061401367, -0.3044171929359436, 0.14196424186229706, -0.30835437774658203, 0.22592008113861084, -0.3352568745613098, 0.055263448506593704, -0.6491380929946899, -0.5096502304077148, 0.5309476256370544, -0.24089084565639496, 0.2205856740474...
What I found so far are some online resources like this: <http://www.torsten-horn.de/techdocs/java-hibernate.htm> (GER) <https://www.hibernate.org/5.html> (Hibernate Docs) <http://docs.jboss.org/hibernate/stable/core/reference/en/html/tutorial.html> <http://www.manning.com/bauer2/chapter2.pdf> (Sample chapter of Ja...
[ -0.044584762305021286, -0.08324071764945984, 0.34922143816947937, 0.05674311891198158, -0.3483797609806061, -0.04051341488957405, 0.5788701176643372, -0.3505362570285797, -0.13242420554161072, -0.5972149968147278, 0.08903441578149796, 0.5089271664619446, 0.09311097115278244, -0.20088548958...
How do I prevent colors form bleeding into one another when using the vb .net Graphics.Drawstring method. This Occurs with colors that really shouldnt be used together eg green/orange and black and red. Thanks There are two problems. The lack of a BEGIN, and also, the SELECT needs to be within each of the IF statements...
[ 0.4293559789657593, -0.19562584161758423, 0.15631327033042908, -0.026421241462230682, 0.14628265798091888, -0.013444197364151478, 0.17911244928836823, -0.6321179270744324, 0.0015688013518229127, -0.9480180144309998, 0.1721649318933487, 0.6832755208015442, -0.4423120319843292, 0.12811599671...
TBL_REPAIR_ORDER.ORDERID INNER JOIN TBL_PROPERTY ON TBL_REPAIR_ORDER.PROPREF = TBL_PROPERTY.PROPREF WHERE (TBL_PARTORDER.RAISED IS NOT NULL) AND (TBL_PARTORDER.RAISED BETWEEN CONVERT(DATETIME,@STARTDATE, 103) AND DATEADD(hh,23,CONVERT(DATETIME,@ENDDATE, 103))) AND (TBL_PROPERTY.CONTRACT = @CONTRACT) AND DATEDIFF(mi, TB...
[ -0.0647316500544548, 0.03136160969734192, 0.30281439423561096, -0.436379611492157, 0.2070656567811966, 0.8695328831672668, 0.23950457572937012, -0.7130104899406433, -0.1296662986278534, -0.8376176953315735, -0.33114880323410034, 0.5072420835494995, -0.06364259123802185, 0.26473841071128845...
TBL_REPAIR_ORDER ON TBL_PARTORDER.ORDERID = TBL_REPAIR_ORDER.ORDERID INNER JOIN TBL_PROPERTY ON TBL_REPAIR_ORDER.PROPREF = TBL_PROPERTY.PROPREF WHERE (TBL_PARTORDER.RAISED IS NOT NULL) AND (TBL_PARTORDER.RAISED BETWEEN CONVERT(DATETIME,@STARTDATE, 103) AND DATEADD(hh,23,CONVERT(DATETIME,@ENDDATE, 103))) AND (TBL_PROPER...
[ 0.016092129051685333, 0.22353136539459229, 0.43713754415512085, -0.34316369891166687, 0.043458059430122375, 1.207836627960205, 0.4781266450881958, -0.889533519744873, -0.32833391427993774, -0.6191516518592834, -0.31562352180480957, 0.5530988574028015, -0.04514066502451897, 0.40635123848915...
COUNT(*) FROM TBL_PARTORDER INNER JOIN TBL_REPAIR_ORDER ON TBL_PARTORDER.ORDERID = TBL_REPAIR_ORDER.ORDERID INNER JOIN TBL_PROPERTY ON TBL_REPAIR_ORDER.PROPREF = TBL_PROPERTY.PROPREF WHERE (TBL_PARTORDER.RAISED IS NOT NULL) AND (TBL_PARTORDER.RAISED BETWEEN CONVERT(DATETIME,@STARTDATE, 103) AND DATEADD(hh,23,CONVERT(D...
[ -0.24847765266895294, 0.14270158112049103, 0.4670662581920624, -0.31190595030784607, -0.027172883972525597, 1.1013814210891724, 0.311404287815094, -0.7475998401641846, -0.41862407326698303, -0.6121521592140198, -0.23240412771701813, 0.2602349519729614, 0.2189445048570633, 0.509310305118560...
(SELECT COUNT(*) FROM TBL_PARTORDER INNER JOIN TBL_REPAIR_ORDER ON TBL_PARTORDER.ORDERID = TBL_REPAIR_ORDER.ORDERID INNER JOIN TBL_PROPERTY ON TBL_REPAIR_ORDER.PROPREF = TBL_PROPERTY.PROPREF WHERE (TBL_PARTORDER.RAISED IS NOT NULL) AND (TBL_PARTORDER.RAISED BETWEEN CONVERT(DATETIME,@STARTDATE, 103) AND DATEADD(hh,23,C...
[ -0.23706968128681183, 0.09968136996030807, 0.5166677832603455, -0.23759825527668, 0.24156735837459564, 0.9071022868156433, 0.3398594260215759, -0.9140974879264832, -0.342964768409729, -0.637275755405426, -0.3679025173187256, 0.4220829904079437, 0.07171270996332169, 0.442854106426239, 0.0...
AS PlusFortyEightHour END ELSE BEGIN SELECT (SELECT COUNT(*) FROM TBL_PARTORDER INNER JOIN TBL_REPAIR_ORDER ON TBL_PARTORDER.ORDERID = TBL_REPAIR_ORDER.ORDERID INNER JOIN TBL_PROPERTY ON TBL_REPAIR_ORDER.PROPREF = TBL_PROPERTY.PROPREF WHERE (TBL_PARTORDER.RAISED IS NOT NULL) AND (TBL_PARTORDER.RAISED BETWE...
[ -0.04083925113081932, -0.23474478721618652, 0.9905321002006531, -0.4103155732154846, 0.25786134600639343, 0.8235799074172974, 0.38900232315063477, -0.671438992023468, -0.1961141973733902, -0.6410311460494995, -0.31648629903793335, 0.8507518172264099, -0.13480634987354279, 0.288733333349227...
AND (TBL_PROPERTY.CONTRACT = @CONTRACT) AND (TBL_REPAIR_ORDER.ORIGIN = @ORIGIN) AND DATEDIFF(mi, TBL_PARTORDER.RAISED, TBL_PARTORDER.RECEIVED) BETWEEN 61 AND 120) AS TwoHour, (SELECT COUNT(*) FROM TBL_PARTORDER INNER JOIN TBL_REPAIR_ORDER ON TBL_PARTORDER.ORDERID = TBL_REPAIR_ORDER.ORDERID INNER JOIN TBL_PROPE...
[ -0.027111321687698364, 0.0439303033053875, 0.194854736328125, -0.4366134703159332, 0.09465249627828598, 1.0566142797470093, 0.30333611369132996, -0.7482218742370605, -0.24756783246994019, -0.7231606245040894, -0.22235210239887238, 0.5323240756988525, 0.10970363020896912, 0.3831206262111664...
TBL_PROPERTY.PROPREF WHERE (TBL_PARTORDER.RAISED IS NOT NULL) AND (TBL_PARTORDER.RAISED BETWEEN CONVERT(DATETIME,@STARTDATE, 103) AND DATEADD(hh,23,CONVERT(DATETIME,@ENDDATE, 103))) AND (TBL_PROPERTY.CONTRACT = @CONTRACT) AND (TBL_REPAIR_ORDER.ORIGIN = @ORIGIN) AND DATEDIFF(mi, TBL_PARTORDER.RAISED, TBL_PARTORDER.RECEI...
[ -0.08519395440816879, 0.05898037180304527, 0.39872753620147705, -0.23558467626571655, 0.18563148379325867, 1.2191221714019775, 0.3749001920223236, -0.5408028364181519, -0.39463382959365845, -0.6390043497085571, -0.21499589085578918, 0.42058080434799194, 0.10679668933153152, 0.5068400502204...
TBL_PARTORDER INNER JOIN TBL_REPAIR_ORDER ON TBL_PARTORDER.ORDERID = TBL_REPAIR_ORDER.ORDERID INNER JOIN TBL_PROPERTY ON TBL_REPAIR_ORDER.PROPREF = TBL_PROPERTY.PROPREF WHERE (TBL_PARTORDER.RAISED IS NOT NULL) AND (TBL_PARTORDER.RAISED BETWEEN CONVERT(DATETIME,@STARTDATE, 103) AND DATEADD(hh,23,CONVERT(DATETIME,@ENDDAT...
[ -0.29707491397857666, 0.14097288250923157, 0.39332547783851624, -0.21483707427978516, -0.042567819356918335, 1.038820505142212, 0.45243555307388306, -0.7804914116859436, -0.3627527356147766, -0.6163488030433655, -0.08047831058502197, 0.28516677021980286, 0.06533265113830566, 0.574607610702...
AND 2880) AS FortyEightHour, (SELECT COUNT(*) FROM TBL_PARTORDER INNER JOIN TBL_REPAIR_ORDER ON TBL_PARTORDER.ORDERID = TBL_REPAIR_ORDER.ORDERID INNER JOIN TBL_PROPERTY ON TBL_REPAIR_ORDER.PROPREF = TBL_PROPERTY.PROPREF WHERE (TBL_PARTORDER.RAISED IS NOT NULL) AND (TBL_PARTORDER.RAISED BETWEEN CONVERT(DATETIME...
[ 0.06285695731639862, 0.1332981139421463, 0.5345532894134521, -0.36259886622428894, 0.256380558013916, 1.0684560537338257, 0.20770636200904846, -0.4649016857147217, -0.20311760902404785, -0.22197116911411285, -0.07430245727300644, 0.49429255723953247, -0.11003243178129196, 0.326409429311752...
I am new to jQuery. Any help would be appreciated I have two radio button and two text box in which i displayed the date using jquery. When i click on Radio1 then in both the text box i should be able to select date but when i click on Radio2 then i shouldn't be able to select the date in text2 field. text2 field sho...
[ 0.0046194870956242085, 0.11184670031070709, 0.7551575899124146, -0.28739431500434875, -0.09593164175748825, -0.45135170221328735, 0.4293687641620636, -0.30982211232185364, 0.059066638350486755, -0.5858896970748901, 0.03150489926338196, 0.5203100442886353, -0.1431337296962738, 0.20902903378...
{ document.forms[0].text2.style.backgroundColor = "#eeeeee"; document.forms[0].text2.readOnly = 1; document.forms[0].text2.value = "Not applicable!"; document.forms[0].number = disbaled; } } // --> </script> <script> $(document).ready(function() { $("#text1").datepicker ({ showOn: 'button', buttonImag...
[ 0.06299718469381332, -0.24810723960399628, 0.8794683814048767, -0.23699355125427246, 0.4772913157939911, 0.19405919313430786, -0.04609110578894615, -0.22661010921001434, 0.035671208053827286, -0.49745866656303406, -0.3860465884208679, 0.6271178722381592, -0.29242274165153503, -0.0430950894...
numberOfMonths: 2, minDate:1 }) }) </script> </head> <body> <form> <input type=radio name="update" value="yes" checked onclick="setReadOnly(this)"> Radio1 <br /> <input type=radio name="update" value="no" onclick="setReadOnly(this)"> Radio2 <br /> <input name="text1" type="text"> <input name="text2" type=...
[ -0.11423483490943909, -0.00828640442341566, 0.8347169756889343, -0.373664528131485, 0.35207483172416687, -0.056560058146715164, 0.5663900375366211, -0.5535025000572205, 0.06517495214939117, -0.5427099466323853, -0.6098824143409729, 0.9328524470329285, -0.3468451201915741, -0.08054100722074...
$('#text2').val('Not applicable!'); $('#text2').datepicker('disable'); $('#number').attr('disabled',true); } } ``` **EDIT:** While the above code works just fine, as pointed out by @Deviant, the related methods could be chained to take full advantage of jQuery's powerful features. ``` function setReadOn...
[ 0.17693012952804565, -0.13478314876556396, 0.5726067423820496, -0.24256190657615662, 0.2618330717086792, 0.08386778086423874, 0.4287830591201782, -0.09245029091835022, -0.15204791724681854, -0.30992817878723145, -0.5270910263061523, 0.7128901481628418, -0.4851502478122711, 0.06606889516115...
.datepicker('enable'); $('#number').removeAttr('disabled'); } else { $('#text2').css('backgroundColor','#eeeeee') .attr('readonly','readonly') .val('Not applicable!') .datepicker('disable'); $('#number').attr('disabled',true); } } ```
[ 0.07964041084051132, -0.23290245234966278, 0.3682031035423279, -0.0005596920964308083, 0.5960917472839355, 0.10898330062627792, 0.3651246130466461, 0.12990863621234894, -0.14675143361091614, -0.44975197315216064, -0.5336781144142151, 0.5694438219070435, -0.6386086344718933, 0.0654406920075...
I have a problem with my site. I want that the shadow stops at the end of my textbox. [![ShadowProblem](https://i.stack.imgur.com/Kjq0K.jpg)](https://i.stack.imgur.com/Kjq0K.jpg) HTML ``` <body> <div id="shadow" class="floatfix"> <div id="shadowleft"></div> <div id="shadowtop"><img src="img/shadowcornerleft.png" a...
[ -0.11014660447835922, -0.24168740212917328, 0.9227660894393921, -0.3319501280784607, 0.03176705166697502, 0.3095695376396179, 0.38261571526527405, -0.11924555152654648, -0.038303520530462265, -0.473734587430954, -0.2603525221347809, 0.802497386932373, -0.2786339521408081, -0.27178627252578...
a much simpler way to do this. Make a new background image 960px wide by 10px high that has your shadow at either side of it. (You may need to tweak the width to get 920px of white in the middle with the shadows down the sides) Use your `#shadow` div to add that background around `#content` eg: ``` #shadow { width: 9...
[ 0.3403835892677307, -0.2632467746734619, 0.5879071950912476, 0.05154639109969139, -0.13276617228984833, -0.02395210973918438, 0.015171248465776443, -0.1628120243549347, -0.1927749216556549, -0.6251521110534668, -0.13517408072948456, 0.684144139289856, 0.06978949159383774, -0.26181274652481...
Can I make C# start Outlook in the code? In VB6 we use object 'Outlook.Application' and write:' ``` Set oOutlook = CreateObject("Outlook.Application") Set oNameSpace = oOutlook.GetNamespace("MAPI") Set oInbox = oNameSpace.Folders(1) 'Set oInbox = oInbox.Folders("Inbox") oInbox.Display 'oOutlook.Quit 'Close All ...
[ 0.09543651342391968, 0.2767947316169739, 0.43940454721450806, -0.08763737976551056, -0.003937088418751955, 0.08552104234695435, 0.15557248890399933, 0.10477206110954285, 0.11466771364212036, -0.7704444527626038, -0.10816813260316849, 0.46858564019203186, -0.24567976593971252, 0.12546177208...
Is there a way I can modify the URL of the current page without reloading the page? I would like to access the portion **before** the # hash if possible. I only need to change the portion **after** the domain, so it's not like I'm violating cross-domain policies. ``` window.location.href = "www.mysite.com/page2.php...
[ 0.22011427581310272, 0.09290319681167603, 0.8224401473999023, -0.0884912982583046, -0.046418651938438416, -0.22237610816955566, 0.410613089799881, -0.3795970678329468, -0.442215234041214, -0.8199604153633118, -0.3874027132987976, 0.6055136919021606, -0.20413710176944733, 0.2110996097326278...
window.history.pushState({"html":response.html,"pageTitle":response.pageTitle},"", urlPath); } ``` You can then use `window.onpopstate` to detect the back/forward button navigation: ``` window.onpopstate = function(e){ if(e.state){ document.getElementById("content").innerHTML = e.state.html; doc...
[ 0.03340936824679375, -0.25194045901298523, 0.8732325434684753, -0.1149791032075882, 0.11158664524555206, 0.18754221498966217, 0.25189903378486633, -0.028185183182358742, -0.24192456901073456, -0.8572511076927185, -0.47319474816322327, 0.39459118247032166, -0.3442930281162262, 0.19836865365...
When a new version of a framework or language appears (e.g. .NET 3.5, SQL2008), what approach do people take to when to adopt/upgrade? Generally developers will say as soon as possible (they want it on their CV and from a management perspective giving them what they want provides a motivation boost) but commercially t...
[ 0.6850830912590027, 0.350663959980011, 0.1303764283657074, 0.06199708953499794, 0.17263473570346832, -0.3666916787624359, 0.29550155997276306, 0.060891151428222656, -0.14120028913021088, -0.6861036419868469, -0.34158697724342346, 0.569466769695282, 0.16930119693279266, -0.01297550834715366...
the new technology" approach doesn't work. Are people driven by specific requirements (the need to use a new feature, a potential or existing client demanding support for it), do they formally assess it (in which case what are the criteria) or do they upgrade as a matter of routine (in which case when - leading edge v...
[ 0.5410656929016113, 0.24169088900089264, 0.497914582490921, 0.34379568696022034, 0.3837672173976898, -0.21412310004234314, 0.03523862361907959, -0.3322386145591736, -0.1743781715631485, -0.2758265435695648, -0.1599498987197876, 0.7582215070724487, 0.1058235764503479, 0.2111557573080063, ...
"if it ain't broke don't fix it" is a common management policy that says "tomorrow's dollars aren't worth as much as today's, so don't plan for future improvements." Eventually technical debt accumulates to the point where the product can no longer limp along. The most common breaking point is when some piece of the i...
[ 0.4709438383579254, 0.4222952127456665, 0.007718763779848814, 0.21088820695877075, 0.33357295393943787, -0.01894339732825756, 0.2585068345069885, 0.39655300974845886, -0.2089313119649887, -0.10045894980430603, -0.5109730362892151, 0.47785186767578125, -0.07311875373125076, 0.34527084231376...
official "support sunset" announcement from Oracle/Sun. Bad technical management, of course, leads to technical bankruptcy.
[ 0.47052061557769775, 0.199344202876091, 0.3901955187320709, -0.029320409521460533, 0.2636698782444, -0.33678507804870605, 0.005439528729766607, 0.08406778424978256, 0.17930637300014496, 0.14395858347415924, -0.6264311671257019, 0.32804161310195923, 0.05562747269868851, -0.0672602728009224,...
I have seen in many weblogs when we select text the background color of the text changes rather than usual blue. [This Tech](http://www.quirksmode.org/css/selection.html) Works in Firefox and Safari, is there any method available for Internet Explorer? It can't be done in IE with pure CSS and I don't know of any pre-pa...
[ 0.5759667158126831, -0.09191200882196426, -0.07737936824560165, 0.24798856675624847, 0.04776063561439514, -0.16963225603103638, 0.07155083119869232, 0.25001537799835205, -0.2265070527791977, -0.691602885723114, 0.019733568653464317, 0.31988921761512756, -0.13759565353393555, -0.00684141460...
A customer (photographer) asked me, if it was possible to write some kind of software for cellphones, so he could physically connect it to his professional digital camera (Canon or Nikon) and transfer the pictures (or a subset) to the cellphone. I am trying not to put constraints on cellphone platform (Symbian, Window...
[ 0.31408870220184326, 0.2608260214328766, 0.3226338028907776, 0.2130310982465744, 0.06055939197540283, -0.330798476934433, -0.016027923673391342, -0.10325689613819122, -0.3385741710662842, -0.4223722219467163, 0.00025940273189917207, 0.5119897723197937, -0.19823218882083893, -0.541556656360...
most interested in are these two: [Mastering Ajax, Part 10: Using JSON for data transfer](http://www.ibm.com/developerworks/web/library/wa-ajaxintro10/index.html?S_TACT=105AGX08&S_CMP=EDU) [Mastering Ajax, Part 11: JSON on the server side](http://www.ibm.com/developerworks/web/library/wa-ajaxintro11.html?S_TACT=105AG...
[ 0.048100169748067856, 0.17964695394039154, -0.048639729619026184, -0.04199399799108505, -0.4213411808013916, -0.30078163743019104, 0.1845102608203888, 0.052610162645578384, -0.350716233253479, -0.45075568556785583, -0.26682671904563904, 0.4094066917896271, 0.24995402991771698, -0.159093648...
I'm trying to use $.post within a function, get the results, then return the function true or false based on the results of the $.post callback. However, the callback seems to occur, AFTER the return event of the parent function. Here's the current code the ret variable is always undefined but if I alert() it within t...
[ -0.0426008477807045, -0.09853364527225494, 0.6664073467254639, -0.3285645544528961, 0.26390764117240906, 0.24246761202812195, 0.5445609092712402, -0.3902149200439453, 0.09243118017911911, -0.5713022947311401, -0.27694442868232727, 0.7455938458442688, -0.4892668128013611, 0.2260896861553192...
}); alert(ret); return ret; } ``` As you've discovered the post is done asynchronously. If you want it to be synchronous, you'll need to use the [`ajax`](http://docs.jquery.com/Ajax/jQuery.ajax#options) method and set the `async` parameter to false. It would be better, however, to acknowledge that the post i...
[ 0.1329500675201416, -0.07864883542060852, 0.20083953440189362, -0.16078563034534454, -0.0020105810835957527, -0.17749495804309845, 0.5602100491523743, -0.0068352119997143745, 0.05748285725712776, -0.4022851884365082, -0.4889553487300873, 0.745682418346405, -0.43194830417633057, -0.04523440...
to do something other than the alert, but without knowing what it's hard to advise you how to refactor this. **EDIT**: I understand that your code is checking to see if something exists, but it is checking that for a purpose. If we knew what the purpose was, then it might be possible to recommend how to accomplish tha...
[ 0.8396259546279907, 0.03596034646034241, 0.009247079491615295, 0.24525436758995056, -0.032281387597322464, -0.5008336901664734, 0.3493577837944031, -0.04210434854030609, 0.07685195654630661, -0.3597815930843353, 0.15414492785930634, 0.5879237651824951, -0.14279592037200928, -0.372736722230...
//ActionScript code > import mx.controls.Menu; > import flash.events.MouseEvent; > > > > ``` > private var menu12:Menu; > > private function init():void { > menu12 = new Menu(); > menu12.labelField = "@label"; > menu12.dataProvider = xmlDP; > menu12....
[ -0.13418899476528168, -0.20773087441921234, 0.1581997126340866, -0.26511499285697937, 0.09676048904657364, 0.34167301654815674, 0.3026103675365448, -0.585615873336792, -0.20699644088745117, -0.4509963095188141, -0.31396427750587463, 0.5503153204917908, -0.5112239122390747, -0.2316015362739...
menu12.width = popUpButton.width; > popUpButton.popUp = menu12; > } > > ``` // XML Info ``` <menu1 label="Some introduction" /> <menu2 label="Disabled State (disabled)." enabled="false" /> <sep1 type="separator" /> <menu3 label="parent"> <menu4 label="c...
[ -0.15410201251506805, -0.20225754380226135, 0.04360658675432205, -0.1987931728363037, 0.037894539535045624, 0.5382482409477234, 0.06001259759068489, -0.2942914068698883, -0.2191123515367508, -0.8204852938652039, -0.46723490953445435, 0.18884433805942535, -0.17133960127830505, -0.0360502600...
</menu3> <menu5 label="parent (disabled)" enabled="false"> <menu6 label="child1" /> <menu7 label="child2" /> <menu8 label="child3" /> </menu5> <menu9 type="separator" /> <menu10 type="separator" /> <menu11 id="leftButton" label="Left" type="rad...
[ -0.285856693983078, 0.24403338134288788, 0.27616119384765625, -0.33620718121528625, 0.20724335312843323, 0.33365142345428467, 0.1974296271800995, -0.6229594349861145, -0.07804039865732193, -0.41727158427238464, -0.38328784704208374, 0.6687285900115967, -0.15644784271717072, 0.1485838592052...
/> <menu12 id="rightButton" label="Right" type="radio" groupName="radioGroup" enabled="false" /> <menu13 id="popupButton" label="Popup" type="radio" groupName="radioGroup" enabled="false" /> </root> ``` // component ``` <mx:PopUpButton id="popUpButton" label="Please select an item" ...
[ 0.18654344975948334, 0.17153093218803406, 0.5147106647491455, 0.10729420185089111, 0.03308285027742386, 0.0308512095361948, -0.02319670468568802, -0.41177690029144287, -0.015408022329211235, -0.631668746471405, -0.48499569296836853, 0.6170545816421509, -0.07630729675292969, 0.1321852505207...
Event name for each Menu Item: ``` <menu4 label="child1" eventName="child1Event" /> ``` And add an Event Listener for each known Event when the parent component is initialized: ``` private function init():void { menu12 = new Menu(); ... addEventListener("child1Event", child1EventHandler); } private fu...
[ -0.2603085935115814, -0.0007245512679219246, 0.22596387565135956, -0.1603134423494339, 0.06105315312743187, 0.39492860436439514, -0.0007418410386890173, -0.26485031843185425, -0.12342674285173416, -0.556731104850769, -0.48577308654785156, 0.7100101709365845, -0.06898146122694016, 0.0229146...
alert(event.type); } ); } ``` Add an itemClick Event Handler: ``` private function popUpButton_itemClickHandler(event:MenuEvent):void { if (event.item.@eventName != null) dispatchEvent(new Event(event.item.@eventName)); } <mx:PopUpButton id="popUpButton" label="Please select an i...
[ -0.1075834184885025, -0.24710968136787415, 0.41388827562332153, -0.05155082419514656, 0.269982248544693, 0.1877717822790146, 0.15501880645751953, -0.29215025901794434, -0.31525176763534546, -0.5226439833641052, -0.6958155035972595, 0.684163510799408, -0.531441867351532, 0.21046318113803864...
``` int main() { int var = 0;; // Typo which compiles just fine } ``` This is the way C and C++ express [NOP](http://en.wikipedia.org/wiki/NOP).
[ 0.07691435515880585, 0.044643841683864594, 0.07950227707624435, -0.3386843800544739, -0.13727979362010956, -0.08496956527233124, 0.03392728790640831, 0.04980980232357979, -0.27130404114723206, -0.41448450088500977, -0.40385469794273376, 0.2548363208770752, -0.394370973110199, -0.1378524750...
I have a html form for uploading a file, which is as follows: ``` $uploadhtml = htmlspecialchars(json_encode("<form action='up.php' method='post' enctype='multipart/form-data'> <label for='file'>Filename:</label> <input type='file' name='file' id='file'/> <br /> <input type='hidden' name='pk' value='".$pk."'> <input ...
[ 0.11896004527807236, 0.06161360815167427, 0.9124799370765686, -0.09281130135059357, -0.1767084151506424, 0.015659093856811523, 0.15961335599422455, -0.5476276278495789, -0.022648628801107407, -0.5591363310813904, -0.15966248512268066, 0.4938657879829407, -0.1362001597881317, -0.08281850069...
I have a list of addresses in two separate tables that are slightly off that I need to be able to match. For example, the same address can be entered in multiple ways: * 110 Test St * 110 Test St. * 110 Test Street Although simple, you can imagine the situation in more complex scenerios. I am trying to develop a simp...
[ 0.5173403024673462, 0.12898802757263184, 0.530691921710968, 0.10556649416685104, -0.17314781248569489, 0.48732656240463257, 0.1271749585866928, -0.305554062128067, 0.05185190215706825, -0.8504419326782227, 0.38847875595092773, 0.25320109724998474, -0.03116573765873909, -0.2016165852546692,...
first 5 of the zipcode as well so in the above example, the full key might look like "11TEST44680". I am looking for ideas for an effective algorithm or resources I can look at for considerations when developing this. Any ideas can be pseudo code or in your language of choice. We are only concerned with US addresses....
[ 0.4501477777957916, 0.12222912162542343, 0.16280724108219147, 0.08992920070886612, 0.12204200029373169, 0.07559899240732193, 0.3084961175918579, 0.2016293853521347, -0.07570578902959824, -0.8676714897155762, 0.14868758618831635, 0.2635185718536377, -0.05071534961462021, 0.00292893894948065...
Please be mindful that this is an initial dump of data from a government source so suggestions of how users can clean it are helpful as I build out the application but I would love to have the best initial I possibly can by being able to match addresses as best as possible. I'm working on a similar algorithm as we spea...
[ 0.8439104557037354, 0.27411311864852905, 0.33935269713401794, 0.26135069131851196, 0.2323731929063797, -0.30273935198783875, 0.34181728959083557, 0.24411816895008087, -0.2040242701768875, -0.6084537506103516, 0.11910580098628998, -0.2917693257331848, 0.06999345123767853, 0.0265117716044187...
should be shot IMHO], so trying to handle rural routes, general deliveries, large volume receivers, multiple countries, province vs. state vs. county, postal codes vs. zip codes, spelling mistakes is no small or simple task. Spelling mistakes alone was no small feat - especially when you get to countries that use Fren...
[ 0.5140753984451294, 0.2559882402420044, -0.027336137369275093, 0.4402697682380676, -0.22362065315246582, 0.3424983620643616, 0.48561036586761475, -0.4023197293281555, -0.24602007865905762, -0.4308883845806122, 0.03518384322524071, 0.3637322783470154, -0.288240522146225, -0.4239695370197296...
been entered in the correct context (i.e. feminine vs. masculine). What if the address has largely been entered correctly but has an incorrect province or postal code? One place to start your search is the [**Levenstein Distance Algorithm**](http://en.wikipedia.org/wiki/Levenstein_Distance) which I've found to be real...
[ 0.4949726164340973, 0.2401566207408905, 0.41303256154060364, 0.11468613147735596, -0.11161834746599197, 0.003914469387382269, 0.36294153332710266, -0.22068871557712555, -0.11763005703687668, -0.8402896523475647, -0.001552785630337894, -0.16926857829093933, 0.2143654078245163, 0.14538757503...
there and have overcome all the issues I've mentioned so far, having someone else working on the same problem would be really helpful to bounce ideas off. Cheers - [ben at afsinc dot ca]
[ 0.35168763995170593, 0.353515088558197, 0.6068520545959473, 0.09559200704097748, 0.1620885133743286, -0.38997408747673035, 0.44893357157707214, 0.4197079539299011, -0.3078048527240753, -0.5366787910461426, 0.038677264004945755, 0.5886422991752625, 0.537662148475647, -0.06487241387367249, ...
I have two entity classes annotated in the following way ``` @Entity class A { @ManyToMany(mappedBy="A", cascade=CascadeType.ALL) private List<B> b; .. } @Entity class B { @ManyToMany(cascade=CascadeType.ALL) private List<A> a; .. } ``` If I store an instance of the class 'B', the relations are stored...
[ 0.5365428924560547, 0.01722755841910839, 0.305431604385376, -0.23400841653347015, -0.10625836253166199, 0.10077077150344849, 0.34587404131889343, -0.5539291501045227, -0.1237678974866867, -0.4829162061214447, 0.3434281647205353, 0.24189934134483337, -0.5745608806610107, 0.479589581489563, ...
I've tried different variations of removing the mappedBy-parameter and defining a JoinTable (and columns), but I've been unable to find the correct combination. The shortest answer seems to be you cannot and it makes sense. In a bidirectional many-to-many association one side must be master and is used to persist chang...
[ 0.019322706386446953, -0.09796054661273956, 0.005887153092771769, -0.2663452625274658, -0.4138803780078888, 0.14854252338409424, 0.4880160391330719, -0.42605552077293396, -0.2423071712255478, -0.3825741708278656, -0.12863421440124512, 0.2248457372188568, -0.693389356136322, 0.1453957110643...
you would end up with the following entries in the join table: ``` a1_id, b_id a2_id, b_id ``` But upon loading, how would JPA know that you intended to only let b know about a2 and not a1 ? and what about a2 that should not know about b ? This is why you have to maintain the bidirectional association yourself (and...
[ -0.009449301287531853, 0.20036514103412628, -0.14867417514324188, -0.044431209564208984, -0.34201017022132874, 0.06334544718265533, 0.23045246303081512, -0.27858853340148926, -0.2554096281528473, -0.2267976999282837, 0.011466429568827152, 0.2787267565727234, -0.31414303183555603, 0.1868785...
I've created a usercontrol in the C# (ASP.NET) designer. It works fine (when I compile / run) and doesn't kick out any errors. I'm using it in a GridView, if that makes a difference. Sometimes, when I'm in the designer (for the page, not the control) it gives me a red box and tells me it can't display the user control...
[ 0.16733942925930023, 0.036045800894498825, 0.5000011324882507, -0.0660964846611023, -0.2538338303565979, -0.025584600865840912, -0.048079799860715866, 0.04159695282578468, -0.197800874710083, -0.7426939010620117, 0.10430789738893509, 0.6961513161659241, -0.30976104736328125, -0.02659793570...
going on here or what I can do about it? Thanks. The shortest answer seems to be you cannot and it makes sense. In a bidirectional many-to-many association one side must be master and is used to persist changes to the underlying join table. As JPA will not maintain both side of the association, you could end up with a...
[ 0.20189163088798523, 0.05670075863599777, 0.10676707327365875, -0.16401945054531097, -0.2637450098991394, 0.2024325430393219, 0.552196204662323, -0.3980293273925781, -0.21349750459194183, -0.3294737637042999, -0.16237694025039673, 0.3134475350379944, -0.49609610438346863, 0.260596334934234...
b_id ``` But upon loading, how would JPA know that you intended to only let b know about a2 and not a1 ? and what about a2 that should not know about b ? This is why you have to maintain the bidirectional association yourself (and make the above example impossible to get to, even in memory) and JPA will only persist...
[ 0.15958182513713837, 0.22172720730304718, -0.21049746870994568, -0.09860328584909439, -0.23424693942070007, -0.022934863343834877, 0.26211076974868774, -0.2895672917366028, -0.3236114978790283, -0.20268012583255768, 0.0200438741594553, 0.4258507788181305, -0.36773183941841125, 0.0854873284...
I've run into a little theoretical problem. In a piece of code I'm maintaining there's a set of macros like ``` #define MAX_OF_2(a, b) (a) > (b) ? (a) : (b) #define MAX_OF_3(a, b, c) MAX_OF_2(MAX_OF_2(a, b), c) #define MAX_OF_4(a, b, c, d) MAX_OF_2(MAX_OF_3(a, b, c), d) ...etc up to MAX_OF_8 ``` What I'd li...
[ 0.05626799166202545, 0.30275341868400574, 0.22347813844680786, -0.13072974979877472, 0.22633486986160278, 0.27986329793930054, 0.08907456696033478, -0.3342391848564148, -0.3772360682487488, -0.6878566741943359, -0.02722034603357315, 0.6323701739311218, -0.36525067687034607, -0.040290594100...
of inputs */ #define MAX_OF_N(x, ...) MAX_OF_N(x, MAX_OF_N(__VA_ARGS__)) ``` ...which, of course, is not valid preprocessor code. *Ignoring that this particular case should probably be solved using a function rather than a preprocessor macro*, is it possible to define a variadic MAX\_OF\_N() macro? Just for clari...
[ -0.10965882986783981, 0.04000711068511009, 0.27012553811073303, -0.04571662098169327, 0.08502326160669327, 0.27941200137138367, 0.06435000896453857, -0.24063988029956818, -0.3138432800769806, -0.6393183469772339, -0.14856861531734467, 0.8432260155677795, -0.4759494960308075, -0.04820514842...
only code that I've seen do something like this was *not* variadic, but used default values the user had to pass: ``` x = MAX_OF_8 (a, b, -1, -1, -1, -1, -1, -1) ``` assuming all values were non-negative. Inline functions should give you the same for C++ at least. As you state, it's probably better left to a functi...
[ 0.175759956240654, 0.04780946299433708, 0.1441197246313095, -0.030499372631311417, -0.3563344180583954, 0.17047500610351562, 0.353858083486557, 0.06758804619312286, -0.1616273671388626, -0.22726276516914368, 0.2232610285282135, 0.7190024256706238, -0.5033861398696899, -0.002745705656707287...
I have a simple select from a typed dataset: ``` var productlist = from prds in dsProducts.sk_products.AsEnumerable() join prdcat in dsProducts.sk_productscategories.AsEnumerable() on prds.Field<int>("productid") equals prdcat.Field<int>("productid") where prdcat.Field<int>("categoryid") == c...
[ -0.2586521804332733, -0.3168560564517975, 0.5053051710128784, -0.19446811079978943, -0.20952251553535461, 0.106850266456604, -0.3379666209220886, -0.40515607595443726, -0.2043934166431427, -0.5806996822357178, -0.17990858852863312, 0.2386074662208557, -0.3891236186027527, 0.286461144685745...
with a distinct on one of it's columns: ``` public List<string, string> GetDistinctManufacturerList(? productlist, int manufacturerid) { manufacturers = from prdz in productlist where prdz.Field<int>("manufacturerid") == manufacturerid select prdz; [...] } ``` With what type of object should I refer ...
[ 0.5228027105331421, 0.035511743277311325, 0.5135592222213745, -0.3780880570411682, -0.014045785181224346, 0.5310692191123962, -0.3209187686443329, -0.31896770000457764, -0.17615105211734772, -0.517508864402771, -0.24977585673332214, 0.3678695261478424, -0.21794958412647247, 0.6945968270301...
Is there any tool to generate test data based on specific requirements? e.g. Size, file type Your question is quite open ended ... You can find some data useful for testing in many areas, usually related to natural languages, by searching for the word "corpus". If want to generate random data, go and hack a Perl scr...
[ 0.8174746036529541, 0.11088890582323074, -0.35105258226394653, 0.5637997388839722, -0.23695793747901917, -0.23595620691776276, 0.11751453578472137, 0.2644733488559723, -0.13332541286945343, -0.4088040292263031, 0.22597581148147583, 0.43847334384918213, 0.0038458616472780704, 0.199352204799...
test the *performance* of their code while forgetting to check the result was correct. If you are lucky enough to have the possibility to do a round trip, like for example with compression / decompression, the random data generation can provide useful and catch corner cases you would not have thought of
[ 0.3917531967163086, -0.12176946550607681, -0.37615254521369934, 0.5839829444885254, -0.004646850749850273, -0.384958416223526, 0.3853853642940521, -0.16615557670593262, -0.24686475098133087, -0.4429861903190613, -0.17771506309509277, 0.24723008275032043, 0.16668391227722168, -0.03252060338...
I have an interface that defines the ability to persist an entity to a data store. I'm having trouble thinking of a name for it. Any ideas? ``` public interface IInterfaceForDefiningADataPersistenceOperation<T> { void Store(T entity); } ``` `IRepository` ?
[ 0.1278819590806961, -0.031622689217329025, 0.2042316496372223, 0.1805211454629898, 0.4583270847797394, -0.12963177263736725, 0.24778418242931366, 0.17746539413928986, -0.1534334421157837, -0.5252191424369812, 0.030680587515234947, 0.6586194038391113, -0.23853830993175507, 0.459567070007324...
I'm using the DataContractSerializer to serialize an objects properties and fields marked with DataMember attributes to xml. Now a have another use case for the same class, where I need to serialize other properties and other fields. Are there a way to add "another DataMemberAttribute" that can be used for my other ...
[ 0.24480114877223969, -0.19591805338859558, 0.2712145745754242, 0.17837126553058624, -0.08101954311132431, -0.11917305737733841, -0.16174347698688507, -0.059833236038684845, -0.1370379626750946, -0.5811465978622437, -0.09129489958286285, 0.4549809992313385, -0.21185654401779175, 0.219755977...
code * use a "buddy class" * use external metadata (such as a file) * use code-based configuration (i.e. via a DSL) In reality, I expect the first will be the simplest choice.
[ 0.3006032705307007, -0.2626059651374817, 0.008333333767950535, 0.4359537363052368, 0.17084458470344543, -0.42010506987571716, 0.28802254796028137, -0.11781098693609238, -0.05258578434586525, -0.5261021256446838, -0.4850451648235321, 0.5099741816520691, -0.3205704987049103, 0.01884543895721...
I have a small problem where I want to find the next "active" item in a list with linq. Then next "active" item is defined by a startDate and EndDate. Here is an example list. ``` //-- Create Lists of turns IList<Turn> turns= new List<Turn>(){ new Turn(){Name = "Turn 1", StartDate = DateTi...
[ -0.24187026917934418, -0.09933943301439285, 0.6480668783187866, -0.2399747520685196, -0.02702670730650425, 0.18405061960220337, -0.06698717176914215, -0.03834940493106842, -0.32458674907684326, -0.6351732611656189, -0.07410997897386551, 0.3991553783416748, -0.04456767067313194, 0.258489996...
2", StartDate = DateTime.Parse("2009-06-01"), EndDate = DateTime.Parse("2009-06-01") } , new Turn(){Name = "Turn 3", StartDate = DateTime.Parse("2009-07-01"), EndDate = DateTime.Parse("2009-07-02") } , new Turn(){Name = "Turn 4", StartDate = DateTime.Parse("2009-08-01"), EndDate = DateTime.P...
[ -0.4835219085216522, -0.11304666846990585, 0.9370108246803284, -0.415340781211853, 0.07081930339336395, 0.33947744965553284, 0.1772899031639099, -0.06154778227210045, -0.3857778310775757, -0.44655439257621765, -0.3519729971885681, 0.33899345993995667, 0.14831258356571198, 0.367978334426879...
select turn).FirstOrDefault<Turn>(); ``` Is there a good solution to find the next turn by using startDate/endDate properties on Turn. I have tryed to first order the list by startdate and the find First one in the list, but I wounder if there is a more "safe" way to get it that dosen't need the list in correct order...
[ -0.15905487537384033, -0.20177358388900757, 0.5936795473098755, -0.1940470188856125, 0.17109467089176178, 0.007839699275791645, -0.16111156344413757, -0.1773824691772461, -0.23626449704170227, -0.6988273859024048, -0.11489775776863098, 0.471072256565094, -0.08498319238424301, 0.19709482789...
know that it is sorted, you can leave that out, of course. ``` turns.OrderBy(t => t.StartDate).FirstOrDefault(t => t.StartDate > today); ``` **UPDATE** I missed your last lines. Yes, you can do it without sorting the list explicitly. You have to search the list for the item with a start date after today and ther mu...
[ -0.076613649725914, -0.01722630113363266, 0.3772374391555786, -0.09897945076227188, 0.08609505742788315, -0.09187638014554977, 0.02510300651192665, -0.25916796922683716, -0.661530077457428, -0.6958565711975098, -0.39921531081199646, 0.15881191194057465, -0.2633107602596283, 0.3853274583816...
turns.All(u => u.StartDate <= today || u.StartDate > t.StartDate)) ``` This assumes that the turns are non-overlapping. If they overlapp, you must use `First` instead of `Single` or add additional constraints to get a unique result. **And finally: use the the sorting solution - this solution is by no means safer than...
[ 0.20096150040626526, -0.04438101500272751, 0.4205009341239929, -0.08593375235795975, -0.05147039145231247, 0.10893730074167252, -0.2727537453174591, -0.25779953598976135, -0.6283279657363892, -0.6711642742156982, -0.12110330909490585, 0.14572888612747192, -0.15556390583515167, 0.2163423597...
As I understand it, XML is a subset of SGML conceived to simplify it and encourage a more widespread usage. I guess most useful features was brought into XML, but are there any features in SGML powerful enough to motivate using it instead of XML (and accepting the overhead in complexity)? One advantage of SGML, if yo...
[ 0.6532243490219116, -0.23014850914478302, 0.23294773697853088, -0.017072582617402077, -0.23930659890174866, -0.4406655430793762, -0.0904327854514122, -0.09908565878868103, -0.3731881380081177, -0.6024474501609802, -0.07222210615873337, 0.6925398111343384, -0.510861873626709, -0.17342439293...
end tags, which is why you can write <p>foo ... <p>bar without closing the tags. Or you can omit tags altogether, which is why <body> is optional in HTML. But XML was invented exactly because all these variants make parsing SGML pretty complicated. You will probably find more capable XML editors than SGML editors nowa...
[ 0.21561649441719055, -0.053079754114151, 0.7077123522758484, 0.05622411519289017, -0.5171040296554565, -0.4741956889629364, -0.013999033719301224, -0.1461191177368164, -0.21824876964092255, -0.4163135886192322, -0.10271744430065155, 0.3017081618309021, -0.3590308129787445, -0.0973735228180...
Why does the following: ``` class A(object): def __init__(self, var=[]): self._var = var print 'var = %s %s' % (var, id(var)) a1 = A() a1._var.append('one') a2 = A() ``` result in: ``` var = [] 182897439952 var = ['one'] 182897439952 ``` I don't understand why it is not using a new instance ...
[ -0.16630209982395172, 0.10581400245428085, 0.12713494896888733, -0.27976173162460327, -0.17280182242393494, 0.23236964643001556, 0.28596043586730957, -0.43264225125312805, -0.4236580431461334, -0.508575975894928, -0.07870075106620789, 0.5321819186210632, -0.5796375870704651, 0.147772774100...
each time, do this: ``` class A(object): def __init__(self, var=None): if var is None: var = [] self._var = var ```
[ -0.30647605657577515, 0.13298946619033813, 0.11488315463066101, -0.3377399444580078, 0.018304701894521713, 0.08601990342140198, 0.5056109428405762, -0.15577615797519684, -0.20635250210762024, -0.5309785604476929, -0.42062950134277344, 0.6321399807929993, -0.357192724943161, 0.2442853599786...
I'm currently writing myself a little C# back up program. I'm using a standard windows form for the interface, and am calling cmd.exe as a new process, and then using XCOPY from within this new process. Every thing's working great, except for this last feature I want to add in, which is the ability to break the operati...
[ 0.38649627566337585, 0.18136823177337646, 0.5995638966560364, 0.011039847508072853, 0.021369725465774536, -0.034206558018922806, 0.12631437182426453, 0.08559439331293106, -0.056907493621110916, -0.8507673144340515, 0.04156399890780449, 0.7990243434906006, -0.21142807602882385, 0.4379714727...
I've also tried sending 0x03 and "/x03", both of which I've read on other forum posts are hex code for ctrl+c. Nothing I'm sending is registered though, and exiting the process kills the user interface, but leaves the xcopy.exe working in the background. Killing xcopy.exe manually results in it leaving the file it was ...
[ 0.544002890586853, 0.16152256727218628, 0.3671232759952545, 0.02970736473798752, -0.2741277813911438, -0.22364185750484467, 0.3410831093788147, 0.27808332443237305, -0.20491056144237518, -0.5114686489105225, -0.0734531432390213, 0.2459358274936676, -0.16560177505016327, 0.36889156699180603...
working with cmd.exe. However, since processes support standard input redirection, it seems like something that should work... to me at least. I've put the basic outline of my code below, in case it helps identify where I'm messing up. ``` string XCopyArguments = "\"" + dir.FullName + "\" \"" + destination + "\" /D /S...
[ -0.07585069537162781, 0.042922310531139374, 0.8170827627182007, -0.19736804068088531, 0.2148086279630661, -0.020615244284272194, 0.4117352366447449, -0.4349593222141266, -0.24113284051418304, -0.6411211490631104, -0.29906728863716125, 0.8550136685371399, -0.3513298034667969, 0.068114273250...