text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
I work on) you will find yourself with a lot less work and probably get the job done significantly faster. Also, remember that it's not just the SDK of the hardware vendor you have to take into account. While you need that specific SDK as each device is different (i.e. the SDK I linked to earlier *will not* work on th...
[ 0.5109694004058838, 0.27302488684654236, 0.23797178268432617, 0.18890832364559174, 0.08158967643976212, -0.04544488340616226, 0.074164018034935, -0.05049782246351242, 0.008321386761963367, -0.942145586013794, -0.1792619824409485, 0.758552610874176, 0.07792966067790985, 0.16603867709636688,...
pushing all things .NET these days, so as updates are made to the OS, less updates are made to the C++ SDK and *much more* functionality now relies on using .NET Not that you *couldn't* do it in C++, it's just that they haven't done a lot of the work for you that they *did* do in the .NET SDK. Ok...that was long, but ...
[ 0.269271582365036, -0.04647834971547127, 0.1297641396522522, -0.08543137460947037, -0.3016124963760376, -0.15717603266239166, 0.12431550025939941, 0.18701237440109253, -0.2299448400735855, -0.721346914768219, 0.12815554440021515, 0.643608033657074, -0.07717089354991913, 0.19037719070911407...
I have a DIV like the following: ``` <td> <DIV> <script type="text/javascript"> // link to some js </script> </DIV> </td> ``` The .js renders the latest article abstract inside the div. However it renders it in Calibri 10px. I want that any content inside the DIV should be rendered as Ver...
[ 0.38164255023002625, 0.20397412776947021, 0.4582705795764923, -0.1886887103319168, -0.42516282200813293, -0.23549573123455048, 0.298057496547699, -0.08113027364015579, 0.17955772578716278, -0.8158515691757202, -0.20177769660949707, 0.5712772607803345, -0.48017415404319763, 0.20951958000659...
adding have their own style declarations, then you will need to use more Javascript to override them. Otherwise, You should be able to give your div a class, apply your styles to that class, then they should propagate through to any contents inside. e.g. css: ``` .myClass { font-family: Verdana; font-size: 10p...
[ 0.4969378113746643, 0.10144778341054916, 0.5278069972991943, -0.2886260151863098, -0.2040889412164688, 0.24876467883586884, 0.20025278627872467, -0.32238447666168213, -0.14983825385570526, -0.6696158051490784, -0.20876961946487427, 0.4138222634792328, -0.496612548828125, 0.132177472114563,...
I'm trying to read binary data to load structs back into memory so I can edit them and save them back to the .dat file. readVector() attempts to read the file, and return the vectors that were serialized. But i'm getting this compile error when I try and run it. What am I doing wrong with my templates? \*\*\*\*\*\*\...
[ -0.1370120644569397, -0.03358614444732666, 0.486086368560791, -0.05010551959276199, -0.011098762974143028, 0.24692578613758087, 0.46861815452575684, -0.4718906283378601, -0.09435990452766418, -0.8383554220199585, -0.1308063119649887, 0.5789658427238464, -0.6276447772979736, -0.069863222539...
Description; int Quantity; int wholesaleCost; int retailCost; int dateAdded; } ; int main(void) { cout << "Welcome to the Inventory Manager extreme! [Version 1.0]" << endl; ifstream in("data.dat"); vector<InventoryItem> structList; readVector<InventoryItem>( in ); while (1) ...
[ 0.11798573285341263, -0.5902149081230164, 0.6235114336013794, -0.14201582968235016, 0.2826775014400482, 0.20871113240718842, 0.028476685285568237, 0.1310410350561142, 0.06348568201065063, -0.746005654335022, -0.4959385097026825, 0.6362138390541077, -0.15560683608055115, 0.351788729429245, ...
cout << "1: Add a new record " << endl; cout << "2: Display a record " << endl; cout << "3: Edit a current record " << endl; cout << "4: Exit the program " << endl; cout << endl; cout << "Enter a command 1-4: "; getline(cin , line);
[ 0.02837480418384075, -0.21759887039661407, 0.543851912021637, -0.304330050945282, 0.37960463762283325, 0.07367590814828873, 0.006359649356454611, -0.11735504120588303, 0.12351828813552856, -0.37344834208488464, -0.6754216551780701, 0.4398920238018036, -0.4452626705169678, 0.251400887966156...
int rValue = checkCommand(line); if (rValue == 1) { cout << "You've entered a invalid command! Try Again." << endl; } else if (rValue == 2){ cout << "Error calling command!" << endl; } else if (!rValue) {
[ -0.035172075033187866, -0.12442054599523544, 0.72173672914505, -0.37202873826026917, -0.11018494516611099, 0.24582260847091675, 0.8268253803253174, -0.5527236461639404, -0.06623008847236633, -0.2664838135242462, -0.3019978404045105, 0.8090265393257141, -0.28864437341690063, 0.1903304010629...
break; } } system("pause"); return 0; } int checkCommand (string line) { int intReturn = atoi(line.c_str()); int status = 3; switch (intReturn) { case 1: break; case 2: break;
[ 0.008439676836133003, -0.5199191570281982, 0.2732653021812439, -0.40345171093940735, 0.32614395022392273, 0.09243606775999069, 0.5879848003387451, -0.3628673553466797, -0.15038754045963287, -0.15047724545001984, -0.6439138054847717, 0.4697410762310028, -0.339840829372406, 0.094348408281803...
case 3: break; case 4: status = 0; break; default: status = 1; break; } return status; } template<typename T> void writeVector(ofstream &out, const vector<T> &vec) {
[ 0.1365591436624527, -0.4446049928665161, 0.536256730556488, -0.24897539615631104, 0.28687411546707153, 0.18788787722587585, 0.30471399426460266, -0.391120970249176, 0.13242271542549133, -0.41197559237480164, -0.20926333963871002, 0.5861078500747681, -0.44365036487579346, 0.0658546835184097...
out << vec.size(); for(vector<T>::const_iterator i = vec.begin(); i != vec.end(); i++) { out << *i; } } ostream& operator<<(std::ostream &strm, const InventoryItem &i) { return strm << i.Item << " (" << i.Description << ")"; } template<typename T> vector<T> readVector(ifstream &in) { size_t...
[ -0.3388734757900238, -0.4900353252887726, 0.7738301157951355, -0.32170432806015015, 0.12493085116147995, 0.5865717530250549, -0.11083173751831055, -0.6652978658676147, -0.3746366500854492, -0.6646999716758728, -0.3218134343624115, 0.46051162481307983, -0.5416218042373657, 0.083406545221805...
in >> tmp; vec.push_back(tmp); } return vec; } ``` Compiler errors: ``` 1>------ Build started: Project: Project 5, Configuration: Debug Win32 ------ 1>Compiling... 1>Project 5.cpp 1>.\Project 5.cpp(124) : warning C4018: '<' : signed/unsigned mismatch 1> .\Project 5.cpp(40) : see reference to...
[ -0.25674110651016235, -0.21949316561222076, 0.35274434089660645, -0.24399049580097198, -0.06469426304101944, 0.25129085779190063, 0.5510057806968689, -0.4728184938430786, -0.2588493824005127, -0.6210978627204895, -0.4211280643939972, 0.30149027705192566, -0.42300260066986084, 0.01571652293...
] 1>.\Project 5.cpp(127) : error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'InventoryItem' (or there is no acceptable conversion) 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\istream(1144): could be 'std::basic_istream<_Elem,_Traits> &std::operator >><std...
[ -0.4299107789993286, 0.048089563846588135, 0.11495702713727951, -0.28870540857315063, 0.26976996660232544, 0.31399065256118774, 0.5026827454566956, -0.39968574047088623, -0.02582979016005993, -0.6167494654655457, -0.18302206695079803, 0.520991861820221, -0.33161160349845886, 0.116273134946...
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\istream(1146): or 'std::basic_istream<_Elem,_Traits> &std::operator >><std::char_traits<char>>(std::basic_istream<_Elem,_Traits> &,signed char &)' 1> with 1> [ 1> _Elem=char, 1> _Traits=std::char_traits<char> 1> ...
[ -0.5263518691062927, 0.39531466364860535, 0.32940661907196045, -0.17068766057491302, 0.1369154006242752, 0.4491415321826935, 0.24492526054382324, -0.217218816280365, -0.14230141043663025, -0.4512498676776886, -0.40237611532211304, 0.7845574617385864, -0.5500500202178955, -0.009824115782976...
with 1> [ 1> _Elem=char, 1> _Traits=std::char_traits<char> 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\istream(1150): or 'std::basic_istream<_Elem,_Traits> &std::operator >><std::char_traits<char>>(std::basic_istream<_Elem,_Traits> &,unsigned ch...
[ -0.33123815059661865, 0.056291792541742325, 0.4304695427417755, -0.29255712032318115, 0.1360701322555542, 0.3370741903781891, 0.3286430835723877, -0.30150628089904785, 0.046785738319158554, -0.6743971109390259, -0.3351670205593109, 0.74039626121521, -0.4068076014518738, -0.0911891162395477...
_Traits=std::char_traits<char> 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\istream(155): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(std::basic_istream<_Elem,_Traits> &(__cdecl *)(std::basic_istream<_Elem,_Traits> &))' 1> wit...
[ -0.40070682764053345, 0.0542021282017231, 0.4452260732650757, -0.18831504881381989, 0.08788347244262695, 0.3079308867454529, 0.209893137216568, -0.33900973200798035, 0.08240561932325363, -0.7431765794754028, -0.14482370018959045, 0.6192973256111145, -0.4539322853088379, -0.0260390583425760...
(x86)\Microsoft Visual Studio 9.0\VC\include\istream(161): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(std::basic_ios<_Elem,_Traits> &(__cdecl *)(std::basic_ios<_Elem,_Traits> &))' 1> with 1> [ 1> _Elem=char, 1> _Traits=std::char_traits...
[ -0.5157322883605957, 0.2957228124141693, 0.4638833701610565, -0.36418333649635315, 0.1305246204137802, 0.45737424492836, 0.46370136737823486, -0.24116559326648712, -0.17116259038448334, -0.5829131007194519, -0.39647677540779114, 0.595687210559845, -0.6612980961799622, -0.23732377588748932,...
[ 1> _Elem=char, 1> _Traits=std::char_traits<char> 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\istream(175): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(std::_Bool &)' 1> with 1> [ 1> _...
[ -0.3934883177280426, 0.20850025117397308, 0.4763750731945038, -0.23882223665714264, 0.06864164024591446, 0.3676692545413971, 0.28286558389663696, -0.40862905979156494, -0.021473197266459465, -0.6115112900733948, -0.3538677990436554, 0.718672513961792, -0.2699786424636841, -0.07058688998222...
_Traits=std::char_traits<char> 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\istream(194): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(short &)' 1> with 1> [ 1> _Elem=char, 1> _Traits=std::char_trai...
[ -0.365231454372406, 0.1803571581840515, 0.4681698679924011, -0.0410669781267643, 0.10614956170320511, 0.420617014169693, 0.23837685585021973, -0.45258912444114685, -0.03951956331729889, -0.9114386439323425, -0.03184422478079796, 0.6389698386192322, -0.3535763621330261, -0.02354241721332073...
'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(unsigned short &)' 1> with 1> [ 1> _Elem=char, 1> _Traits=std::char_traits<char> 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\istream(247): or 'std::basic_i...
[ -0.26305416226387024, 0.2754001021385193, 0.4923440217971802, -0.2574607729911804, -0.0030307970009744167, 0.45988184213638306, 0.46934399008750916, -0.3478720486164093, -0.09513338655233383, -0.5190514326095581, -0.3286297023296356, 0.5015937089920044, -0.5311210751533508, -0.055978618562...
_Elem=char, 1> _Traits=std::char_traits<char> 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\istream(273): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(unsigned int &)' 1> with 1> [ 1> _Elem=char, 1> ...
[ -0.5293320417404175, 0.2966618537902832, 0.6531312465667725, -0.19818110764026642, 0.3102843761444092, 0.4534904360771179, 0.3512289524078369, -0.6559643149375916, -0.038429535925388336, -0.8117641806602478, -0.3697962164878845, 0.7463148832321167, -0.29924359917640686, -0.1588961780071258...
] 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\istream(291): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(long &)' 1> with 1> [ 1> _Elem=char, 1> _Traits=std::char_traits<char> 1> ] 1> C:\Program ...
[ -0.4765946567058563, 0.19226178526878357, 0.4133375585079193, -0.1078600063920021, 0.038589488714933395, 0.3424801826477051, 0.269013911485672, -0.5880172848701477, -0.22304071485996246, -0.7493913173675537, -0.17246678471565247, 0.8180213570594788, -0.48501625657081604, -0.183050468564033...
with 1> [ 1> _Elem=char, 1> _Traits=std::char_traits<char> 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\istream(329): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(__int64 &)' 1> with 1> [ 1> ...
[ -0.4794340133666992, 0.05419077351689339, 0.42070361971855164, -0.23861300945281982, -0.0026001587975770235, 0.41776540875434875, 0.3514646291732788, -0.4360424280166626, 0.09694502502679825, -0.5848032832145691, -0.277569442987442, 0.6140596866607666, -0.3075154423713684, -0.0443197190761...
_Traits=std::char_traits<char> 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\istream(348): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(unsigned __int64 &)' 1> with 1> [ 1> _Elem=char, 1> _Traits=std...
[ -0.5011062622070312, 0.045142754912376404, 0.3761962652206421, -0.16309025883674622, 0.13126230239868164, 0.36793914437294006, 0.29910680651664734, -0.3889528214931488, 0.10426927357912064, -0.7433490753173828, -0.10842914879322052, 0.6230345964431763, -0.36918726563453674, -0.073368817567...
Files (x86)\Microsoft Visual Studio 9.0\VC\include\istream(367): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(float &)' 1> with 1> [ 1> _Elem=char, 1> _Traits=std::char_traits<char> 1> ] 1> C:\Program Files (x86)\Microsoft ...
[ -0.4610934257507324, 0.28728240728378296, 0.387836754322052, -0.12892811000347137, 0.2189089059829712, 0.504173994064331, 0.38140788674354553, -0.33365902304649353, -0.1374521106481552, -0.618369996547699, -0.40360814332962036, 0.6652408242225647, -0.5439577102661133, -0.03256300836801529,...
[ 1> _Elem=char, 1> _Traits=std::char_traits<char> 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\istream(404): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(long double &)' 1> with 1> [ 1> ...
[ -0.19818374514579773, 0.058570366352796555, 0.42557236552238464, -0.13800561428070068, 0.19940058887004852, 0.42047426104545593, 0.3605964481830597, -0.42283695936203003, -0.00038645724998787045, -0.5646582841873169, -0.3662477135658264, 0.6726469397544861, -0.3698346018791199, -0.13768176...
_Traits=std::char_traits<char> 1> ] 1> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\istream(422): or 'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(void *&)' 1> with 1> [ 1> _Elem=char, 1> _Traits=std::char_trai...
[ -0.4442185163497925, 0.1446472853422165, 0.3904745876789093, -0.032945942133665085, 0.19327127933502197, 0.488349974155426, 0.2296278029680252, -0.4539487659931183, -0.037693388760089874, -0.8510670065879822, -0.12258327752351761, 0.6247963309288025, -0.313909649848938, -0.0460524596273899...
'std::basic_istream<_Elem,_Traits> &std::basic_istream<_Elem,_Traits>::operator >>(std::basic_streambuf<_Elem,_Traits> *)' 1> with 1> [ 1> _Elem=char, 1> _Traits=std::char_traits<char> 1> ] 1> while trying to match the argument list '(std::ifstream, InventoryItem)' 1>Bu...
[ -0.19517409801483154, 0.370163232088089, 0.41868939995765686, -0.03021804615855217, -0.0890856608748436, 0.4793244004249573, 0.8466199636459351, -0.4434855580329895, -0.09885544329881668, -0.4928531348705292, 0.0025128291454166174, 0.573409914970398, -0.1586216241121292, 0.0680922567844390...
think and now I got another one. Will you PLEASE just help me on this one too! What the heck does this mean ?? ``` readVector( in ); // error C2783 ``` This should be: ``` readVector<InventoryItem>( in ); ``` Argument dependent lookup does not help deduce the templates, hence explicit specification is required. ...
[ 0.004557424690574408, -0.16686215996742249, 0.3778388798236847, -0.017063796520233154, 0.16894368827342987, 0.07897404581308365, 0.2739546000957489, -0.17095217108726501, -0.19892284274101257, -0.7822607159614563, -0.11708014458417892, 0.7189229726791382, -0.4505824148654938, -0.2311780601...
It seems to me, from both personal experience and SO questions and answers, that SQL implementations vary substantially. One of the first issues for SQL questions is: What dbms are you using? In most cases with SQL there are several ways to structure a given query, even using the same dialect. But I find it interestin...
[ 0.4339420199394226, 0.2342653125524521, -0.10891342163085938, 0.2509921193122864, -0.22046488523483276, -0.2620282471179962, 0.39354413747787476, -0.06556118279695511, 0.024489950388669968, -0.5653984546661377, 0.17437827587127686, 0.5704963207244873, -0.347155898809433, -0.018235523253679...
be as portable as possible. In your work with SQL, how strongly do you prefer standard SQL syntax? How actively do you eschew propriety variations? Please answer without reference to proprietary preferences for the purpose of perceived better performance, which most would concede is usually a sufficiently legitimate d...
[ 0.5427148342132568, 0.3530651330947876, 0.21817995607852936, 0.21015924215316772, 0.16898784041404724, -0.3784307539463043, 0.08771612495183945, -0.013624446466565132, -0.07717874646186829, -0.7182254791259766, -0.2813740372657776, 0.6400293111801147, -0.06013408675789833, -0.1520191282033...
a clear separation of duties. The query is to be optimized only by the DBMS itself or the DBAs tuning of the DBMS. Real databases, like DB2/z :-), process standard SQL plenty fast. The reason we enforce this is to give the customer choice. They don't like the idea of being locked into a specific vendor any more than ...
[ 0.16022375226020813, -0.056621141731739044, 0.20957447588443756, 0.3791693449020386, 0.07971630990505219, -0.3651735186576843, 0.06824879348278046, 0.0044832960702478886, -0.0685623288154602, -0.46448376774787903, -0.40710100531578064, 0.6762480735778809, -0.1631600558757782, -0.0036811518...
I got a problem with a button control in asp.net webforms. After using mvc a bit i started using foreach in the aspx files in webforms too, instead of repeaters, mostly cause of all the junk viewstate a repeater creates. It works great when you just iterate over html controls. But i got a hard time with button contro...
[ -0.1101544126868248, -0.18809016048908234, 0.7007986307144165, -0.21654850244522095, -0.2617185115814209, 0.04932405427098274, 0.44937869906425476, -0.1674324870109558, -0.39751312136650085, -0.6679973602294922, -0.1329478919506073, 0.5856577754020691, -0.4798465371131897, 0.26948827505111...
is ugly. The #1 benefit of using ASP.NET (especially MVC) is separating the logic and presentation. I cringe every time I have to look in an aspx file for executing code. If you don't like the ViewState "junk" then just turn it off for that control! ``` <asp:Repeater ID="MyRepeater" runat="server" EnableViewState="fa...
[ 0.26748308539390564, 0.2746783196926117, 0.4162822961807251, -0.03773120045661926, -0.34313738346099854, -0.1846856027841568, 0.30445072054862976, -0.08701752126216888, -0.143122598528862, -0.733613908290863, 0.1424601525068283, 0.7294535636901855, -0.3856671452522278, 0.011500132270157337...
put them inside the server tag instead of outside. It's counter-intuitive, but sometimes you have to do it that way.
[ 0.8076287508010864, 0.022957319393754005, 0.055663980543613434, 0.1562066674232483, 0.13093402981758118, -0.04981505870819092, 0.06544662266969681, -0.10119594633579254, -0.13647910952568054, -0.3883083164691925, 0.277982234954834, 0.16176030039787292, -0.04356249049305916, -0.294071942567...
Let's say I have a Ruby class: ``` class MyClass def self.property return "someVal" end def self.property=(newVal) # do something to set "property" success = true return success # success is a boolean end end ``` If I try and do `MyClass.property=x`, the return value of the whole statement ...
[ 0.1602601706981659, 0.16130733489990234, 0.27243572473526, -0.15517930686473846, -0.21978843212127686, -0.3554246723651886, 0.42794182896614075, -0.02273460663855076, -0.06697890907526016, -0.23098748922348022, -0.2844446003437042, 0.6570885181427002, -0.11089473217725754, 0.29406419396400...
why not? Is there any conceivable downside to allowing an "equals setter" operation return a value? One downside is that you would break the chained assignment semantics: ``` $ irb irb(main):001:0> x = y = 3 => 3 irb(main):002:0> p x 3 => nil irb(main):003:0> p y 3 => nil irb(main):004:0> ``` Consider: ``` x = My...
[ 0.04658391699194908, -0.06244583800435066, 0.299559086561203, -0.04184629023075104, -0.13033728301525116, -0.24495753645896912, 0.3447110950946808, -0.2618865966796875, -0.10563494265079498, -0.2806888818740845, 0.00999878253787756, 0.8091095089912415, -0.49300575256347656, 0.2688843607902...
parallel assignments :) Nice question!
[ 0.04148554801940918, -0.0906510204076767, 0.19003896415233612, 0.6415973901748657, -0.26761242747306824, 0.04492852836847305, -0.003724372014403343, 0.16451475024223328, -0.22016802430152893, -0.5785430669784546, 0.11026859283447266, 0.22420600056648254, -0.16272695362567902, -0.1028920859...
Regarding the "standard" way to put comments inside Python source code: ``` def func(): "Func doc" ... <code> 'TODO: fix this' #badFunc() ... <more code> def func(): "Func doc" ... <code> #TODO: fix this #badFunc() ... <more code> ``` I prefer to write general comments as str...
[ 0.19893686473369598, 0.28856635093688965, 0.06062942370772362, -0.1878947764635086, -0.7511201500892639, -0.1005629152059555, 0.1568019986152649, 0.3106514811515808, -0.41790837049484253, -0.5967649221420288, -0.07922613620758057, 0.6234695315361023, -0.3445170819759369, -0.098645739257335...
I think the `#` character looks ugly with comment blocks. As far as I know these strings don't do anything. Are there disadvantages in doing this? Don't misuse strings (no-op statements) as comments. Docstrings, e.g. the first string in a module, class or function, are special and definitely recommended. Note that **...
[ 0.45815080404281616, 0.30853548645973206, -0.04238076135516167, 0.16053129732608795, -0.1991756409406662, -0.2602435052394867, 0.2273445576429367, -0.13723541796207428, -0.22253718972206116, -0.6344047784805298, -0.15165741741657257, 0.7968708276748657, -0.10074213892221451, -0.06008615717...
the following (potential) disadvantages: * It confuses people who don't know that the string does nothing. * Comments and string literals are highlighted differently in code editors, so your style may make your code harder to read. * It might affect performance and/or memory usage (if the strings are not removed durin...
[ 0.436675101518631, -0.02110031060874462, 0.010845325887203217, 0.24859575927257538, -0.3832858204841614, -0.3796750009059906, 0.5257931351661682, 0.15454883873462677, -0.16646210849285126, -0.5790328979492188, -0.18625567853450775, 0.8533788323402405, -0.2648843824863434, -0.40194573998451...
We've got a large classic asp application and we consider migrating to either asp.net or php. I don't want to talk about the pros and cons of either one, but I'd rather like to know whether there are ways to avoid a complete rewrite in one shot when migrating to php. We simply can't stop maintaining the current codebas...
[ 0.5319037437438965, 0.10783158242702484, 0.2077048271894455, 0.10275281965732574, -0.17159119248390198, -0.13908997178077698, 0.10017457604408264, 0.1782905012369156, -0.3848375678062439, -0.5747109651565552, 0.11792942136526108, 0.43433353304862976, 0.03155620023608208, 0.1447491049766540...
keep on running. Is such an approach possible with php? Does anyone has got experiences with such a migration or could point me to some good readings? The ability to share session state between ASP Classic and ASP.NET isn't an intrinsic feature of either language, though it's fairly easy to accomplish. Microsoft provi...
[ 0.419552206993103, -0.1493825912475586, 0.21351327002048492, 0.09540057927370071, -0.13719801604747772, -0.014290056191384792, 0.43653228878974915, 0.07625547051429749, -0.4688132107257843, -0.5371460318565369, -0.0020358909387141466, 0.33083924651145935, -0.151119202375412, -0.12023633718...
is loaded. It's a little extra work in PHP, but shouldn't be more than a few extra days of coding and testing. PHP runs pretty well on IIS6 in my limited experience and support for it is supposedly even better in IIS7. The only snag I've hit in is that a most of the PHP code out there assumes you're running on Linux/U...
[ 0.42381787300109863, 0.06884776055812836, 0.5146444439888, 0.14449679851531982, -0.19114160537719727, -0.48122578859329224, 0.2124631404876709, 0.11056448519229889, -0.34590381383895874, -0.42254918813705444, 0.09397321939468384, 0.7069321274757385, -0.10979700833559036, -0.118613682687282...
Good luck!
[ 0.13670220971107483, 0.4217955768108368, 0.25213631987571716, -0.05525233969092369, 0.0448741652071476, -0.18355154991149902, 0.4942242205142975, 0.7961543202400208, -0.2177674025297165, -0.38759371638298035, -0.11550375074148178, 0.07360458374023438, 0.2953273355960846, 0.0479179695248603...
As most of you may be following my line of questions already know, i'm trying to create a program that can serialize multiple structs to a .dat file, read them back in via loading it's serialization, edit the contents, and then re-write them to the file and so on. It's a inventory program I am trying to do and I can't ...
[ 0.6233323216438293, -0.010469182394444942, 0.2906588017940521, 0.20328295230865479, -0.12768584489822388, 0.10313412547111511, 0.06542783230543137, 0.09813174605369568, -0.3022390902042389, -0.7933639287948608, 0.4266171157360077, 0.38979974389076233, -0.3427557051181793, 0.301859915256500...
thousand. Oh wait... this time I ran it the size of my vector was 5,172,285. Thats a pretty big vector full of structs. There aren't any run-time or compile errors, but I am pretty sure I am doing something wrong. The file i'm loading in is completely blank too. **Code:** ``` // Project 5.cpp : main project file. #i...
[ 0.31112736463546753, -0.1801745444536209, 0.7747747302055359, 0.07844331860542297, -0.0011274553835391998, 0.4807262122631073, -0.22700919210910797, -0.3535645604133606, -0.2711810767650604, -0.7110781073570251, 0.42064714431762695, 0.4750368893146515, -0.06833532452583313, 0.2602612674236...
int retailCost; int dateAdded; } ; int main(void) { cout << "Welcome to the Inventory Manager extreme! [Version 1.0]" << endl; ifstream in("data.dat"); if (in.is_open()) { cout << "File \'data.dat\' has been opened successfully." << endl; } else { cout << "Error opening data.dat" << endl; return 0;} ...
[ 0.04136720672249794, -0.4351876378059387, 0.7813400626182556, -0.12073905020952225, 0.21462957561016083, -0.0748419389128685, 0.11923322081565857, 0.050495389848947525, 0.033711984753608704, -0.5901172757148743, -0.4861999452114105, 0.7624581456184387, -0.1900746375322342, -0.0464865528047...
string line = ""; cout << "There are currently " << structList.size() << " items in memory."; cout << endl; cout << "Commands: " << endl; cout << "1: Add a new record " << endl; cout << "2: Display a record " << endl; cout << "3: Edit a current record " << endl;
[ -0.17446552217006683, -0.27576500177383423, 0.449220210313797, -0.31734544038772583, 0.1546316146850586, 0.09113315492868423, -0.05318351462483406, -0.10123205929994583, -0.1515679508447647, -0.37732428312301636, -0.5323492884635925, 0.19312046468257904, -0.3444129526615143, 0.257266521453...
cout << "4: Exit the program " << endl; cout << endl; cout << "Enter a command 1-4: "; getline(cin , line); int rValue = checkCommand(line); if (rValue == 1) { cout << "You've entered a invalid command! Try Again." <<
[ -0.06349573284387589, -0.08054805546998978, 0.6448556184768677, -0.47013166546821594, 0.3183809220790863, 0.17975984513759613, 0.5830398201942444, -0.30030393600463867, -0.04321720078587532, -0.2552815079689026, -0.5975508689880371, 0.6611078977584839, -0.3777511417865753, 0.19522960484027...
endl; } else if (rValue == 2){ cout << "Error calling command!" << endl; } else if (!rValue) { break; } } system("pause"); return 0; } int checkCommand (string line) { int intReturn = atoi(line.c_str()); int status = 3; switch (intReturn)
[ 0.05083330348134041, -0.3693939447402954, 0.6298671960830688, -0.3994673490524292, 0.18914397060871124, 0.17912161350250244, 0.6195321083068848, -0.5211236476898193, -0.17091907560825348, -0.23061662912368774, -0.48498356342315674, 0.6524277329444885, -0.17219887673854828, 0.15966796875, ...
{ case 1: break; case 2: break; case 3: break; case 4: status = 0;
[ -0.222128763794899, -0.0973682627081871, -0.0844859853386879, -0.09732615202665329, 0.6327181458473206, -0.2336997538805008, 0.17614363133907318, -0.006145562045276165, -0.026481550186872482, 0.037109993398189545, -0.6888020038604736, 0.4790361821651459, -0.363951712846756, 0.1477651745080...
break; default: status = 1; break; } return status; } template<typename T> void writeVector(ofstream &out, const vector<T> &vec) { out << vec.size(); for(vector<T>::const_iterator i = vec.begin(); i != vec.end(); i++) { out << *i; } } ostream &operator<...
[ -0.14375844597816467, -0.4280862510204315, 0.7201162576675415, -0.20507630705833435, 0.3162246346473694, 0.42266178131103516, 0.2521800398826599, -0.5667791366577148, -0.19404169917106628, -0.6621955037117004, -0.37743091583251953, 0.4707496166229248, -0.4552536606788635, 0.133380770683288...
out << i.Quantity; out << i.wholesaleCost << i.retailCost; out << i.dateAdded; return out; } istream &operator>>(istream &in, InventoryItem &i) { in >> i.Item >> i.Description; in >> i.Quantity; in >> i.wholesaleCost >> i.retailCost; in >> i.dateAdded; return in; } template<typename T>...
[ 0.010209290310740471, -0.41226738691329956, 0.6153538823127747, -0.23335887491703033, 0.3967902958393097, 0.503355085849762, -0.18807926774024963, -0.45485812425613403, -0.27601656317710876, -0.7462315559387207, -0.2930590808391571, 0.4042757749557495, -0.25886988639831543, 0.2629654109477...
T tmp; in >> tmp; vec.push_back(tmp); } return vec; } ``` Can someone simply show me how to turn this in to a program that can actually write serialized vectors full of structs to a file, and then read them back in so I can edit them and store them back for loading later? Oh my goodness what ...
[ 0.38824719190597534, -0.09772767126560211, 0.23475557565689087, 0.23554085195064545, -0.01701091043651104, -0.32670167088508606, 0.31132617592811584, 0.1929890215396881, -0.2045508474111557, -0.6047569513320923, 0.2099359780550003, 0.4726038873195648, -0.15399478375911713, 0.34369617700576...
The first line in readVector is this: ``` in >> size; ``` What do you suppose is actually going to end up in size? Since it is empty, this will result in an error, which you aren't detecting. The variable `size` will remain uninitialised - hence you see weird values in it, since it takes whatever value happened to b...
[ 0.06937188655138016, -0.20551227033138275, 0.2408735156059265, 0.08331303298473358, -0.14804363250732422, -0.30151131749153137, 0.09620309621095657, 0.11221086233854294, -0.016490232199430466, -0.5174128413200378, 0.09561044722795486, 0.3283006250858307, -0.4152239263057709, 0.289362549781...
variable. I suggest you should figure out how to run your program in a debugger, you will be able to step through your code and see what the values of the variables are at a given time.
[ 0.3579077422618866, -0.15853340923786163, 0.08098657429218292, 0.42104649543762207, 0.04035429283976555, 0.00017304038919974118, 0.10519855469465256, -0.03196094557642937, 0.05755487456917763, -0.2586856186389923, 0.18174763023853302, 0.7144637703895569, -0.2445523589849472, 0.237435892224...
I have developed a Java swing application, then I have deployed it through a .jar package. I run my application on my PC double-clicking over the .jar file and everything goes fine, everything goes fine from command line (dos prompt) too. Here my problem. I have tried to run my app on another PC: * same OS (Window...
[ 0.14172664284706116, 0.2776784300804138, 0.35566896200180054, -0.04835975542664528, -0.003392099402844906, -0.23037131130695343, 0.546360969543457, -0.2056516706943512, -0.27830055356025696, -0.6805065274238586, -0.05766068026423454, 0.9699258804321289, -0.33104556798934937, 0.024149710312...
this error be due to some conflict between JRE and JInitiator? Does anybody had the same trouble? Thanks --- edit: executing .jar files from gui is associated to the "javaw" command A quick description might be - jinitiator installs as a fully implemented JRE with some additional features for cached downloads when...
[ 0.328889936208725, -0.10010340064764023, 0.4227384328842163, 0.1146748960018158, -0.18607264757156372, -0.20861095190048218, 0.3819015324115753, 0.04333021119236946, -0.1266695111989975, -0.6248301267623901, 0.05353369936347008, 0.890545666217804, -0.026824941858649254, 0.17906777560710907...
at a different JRE. examine: * HKEY\_CLASSES\_ROOT\jarfile\shell\open\command and see if the path to javaw.exe is correct. (or even included) * HKEY\_LOCAL\_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\java.exe and javaw.exe and javaws.exe to check the path there also.
[ -0.17719005048274994, 0.10369729995727539, 0.28539660573005676, -0.11588950455188751, 0.24929770827293396, 0.0014876757049933076, 0.30286845564842224, 0.06487326323986053, -0.29867756366729736, -0.8299623727798462, -0.2923118770122528, 0.37140950560569763, -0.14125144481658936, -0.13535003...
I've implementation of UnaryOperation like this ``` struct Converter { Converter( std::size_t value ): value_( value ), i_( 0 ) {} std::string operator() ( const std::string& word ) { return ( value_ & ( 1 << i_++ ) ) ? word: std::string( word.size(), ' ' ); ...
[ -0.01879984140396118, -0.09977571666240692, 0.6372063755989075, -0.5432283878326416, 0.03361209109425545, 0.10364033281803131, 0.46461251378059387, -0.24648480117321014, 0.15849396586418152, -0.83762526512146, -0.2539721429347992, 0.6617396473884583, -0.48029762506484985, 0.428267747163772...
std::size_t i_; }; ``` And I use it like ``` std::vector v; // initialization of v std::transform( v.begin(), v.end(), std::back_inserter( result ), Converter( data ) ); ``` My **question** is can I rely on my assumption that algorithm will call my 'Converter operator ()' in the o...
[ -0.09891968965530396, -0.21158094704151154, 0.5965771675109863, -0.2701491713523865, -0.20183826982975006, 0.2692500054836273, 0.04265779256820679, -0.5932600498199463, -0.041733015328645706, -0.5400946140289307, -0.47643592953681946, 0.7406920194625854, -0.4617964029312134, -0.04022062942...
avoid possible problem if any. Thanks. **Edit:** I am aware of "no Side effect" requirements in the standard for the transform algorithm. I can't find what is exactly "side effect" for functors in the same standard. Maybe there is some good-looking-boost-like solution for this task? Qute from standard: > 25.2.3 Tr...
[ 0.18734052777290344, 0.13272668421268463, 0.49051424860954285, -0.07076115161180496, 0.06303471326828003, -0.1775738000869751, 0.2176259607076645, -0.08743884414434433, -0.023206012323498726, -0.40272969007492065, -0.2106713354587555, 0.8429123759269714, -0.12307410687208176, 0.06529379636...
it will works on almost all stl implementations. **Suggested solution** It seems I know one way to do what you need: use boost::counting\_iterator - for iterate over two containers; it will looks like: ``` bool bit_enabled( size_t data, unsigned char number ) { return ( data & 1 << number ) != 0; } std...
[ -0.12457054853439331, -0.304788738489151, 0.7346038818359375, -0.30265286564826965, 0.1345835030078888, 0.046892765909433365, 0.22253121435642242, -0.35151395201683044, 0.00020073461928404868, -0.6690110564231873, -0.16036301851272583, 0.7681029438972473, -0.2139878123998642, -0.1666602045...
size_t number ) { return bit_enabled( data, number ) ? word : std::string( ' ', word.length() ); } const size_t data = 7; const boost::array< std::string, 3 > vocabulary = { "a", "b", "c" }; std::vector< std::string > result; std::transform( vocabulary.begin(), vocabulary.end(), boost::counting_iterato...
[ 0.01726018637418747, -0.4394088089466095, 0.6759960651397705, -0.2206917405128479, -0.011526526883244514, 0.2668352425098419, 0.1580534428358078, -0.7019553780555725, -0.16977718472480774, -0.3937981128692627, -0.3878505527973175, 0.816434919834137, -0.26983457803726196, -0.076194137334823...
found [interest article](http://www.ddj.com/cpp/184403769) which contain definition of Side Effect by standard. > The Standard defines a side effect as > follows: Accessing an object > designated by a volatile lvalue, > modifying an object, calling a library > I/O function, or calling a function > that does any o...
[ 0.2700253427028656, 0.2908279597759247, 0.5445820093154907, -0.12532347440719604, 0.3888179659843445, -0.19044087827205658, 0.047139640897512436, -0.05596711114048958, -0.251515656709671, -0.43246179819107056, -0.24326932430267334, 0.4248524010181427, -0.20584580302238464, 0.43783479928970...
variables/member variables as in your case etc). "Not produce side effect" mean - don't changing execution environment. But in c++ standard we have more low-level defintion for Side effect. Thing what you do in your example named as **Stateful** functor. Standard doesn't say about "Statefull" functors, but als...
[ 0.23448018729686737, -0.2528613805770874, 0.0752074271440506, 0.08352568745613098, 0.00011758843902498484, -0.26579704880714417, 0.479323148727417, -0.4286607503890991, -0.20606395602226257, -0.37901410460472107, 0.016935983672738075, 0.5324611663818359, -0.3207011818885803, 0.104170724749...
I am trying to understand what's the correspondent of servlets and applets in .NET but I don't have much experience in JAVA. I am thinking applets could be compared to the silverlight stuff, meaning you code independently from the browser, but then it's not like that since (between other things) you can re-use an appl...
[ 0.4499243497848511, 0.08450254797935486, -0.06963788717985153, 0.04957219585776329, -0.33828315138816833, -0.07648808509111404, 0.32802510261535645, 0.058961838483810425, -0.23603057861328125, -0.7538473606109619, -0.09792039543390274, 0.24984057247638702, -0.2868293523788452, 0.0582740418...
there isn't a direct equivelent, but siverlight is probably the closest (although its closer to Flash/JavaFX)
[ 0.01253148727118969, -0.3630954325199127, 0.6231030225753784, -0.15909922122955322, -0.5124672651290894, -0.11993853002786636, -0.2136441320180893, 0.09542976319789886, -0.049267154186964035, -0.5944250226020813, -0.0614154152572155, 0.19627894461154938, -0.1715584546327591, -0.29646977782...
We have project which uses gcc and make files. Project also contains of one big subproject (SDK) and a lot of relatively small subprojects which use that SDK and some shared framework. We use precompiled headers, but that helps only for re-compilation to be faster. Is there any known techniques and tools to help wi...
[ 0.6834465861320496, 0.07584597915410995, -0.2743278443813324, 0.3492974638938904, -0.027405109256505966, -0.3391314148902893, 0.01872536912560463, -0.19706204533576965, -0.22579538822174072, -0.5069136023521423, -0.12235803157091141, 0.4103124439716339, -0.2519568204879761, 0.0198757592588...
power into it. Use ccache to avoid recompiling files you have already compiled and distcc to distribute the build time among more machines. Use make -j where N is the number of cores+1 if you compile locally, or a bigger number for distributed builds. That flag will run more than one compiler in parallel. Refactoring ...
[ 0.6321408152580261, -0.24296586215496063, 0.17126207053661346, 0.0837656781077385, -0.12723390758037567, -0.047547195106744766, 0.3403768837451935, -0.6864069104194641, -0.3556520938873291, -0.534050464630127, 0.02175569161772728, 0.31384825706481934, -0.4074631929397583, 0.177232041954994...
then instantiate them in only one compilation unit.
[ 0.25537368655204773, 0.17399738729000092, -0.1557311713695526, 0.21588170528411865, -0.05223976820707321, -0.019765162840485573, -0.15379370748996735, -0.4315924048423767, -0.12521511316299438, -0.47978833317756653, 0.006437851581722498, 0.15006382763385773, -0.2587936818599701, -0.0343287...
Lets say I have some markup like this: ``` <html> <head> <style type="text/css"> #container { margin: 0 auto; width: 900px; background: green; } </style> </head> <body> <div id="container"> </div> </body> </html> ``` Imagine "container" is filled with hundreds of a's for ...
[ 0.2076328992843628, 0.16249246895313263, 0.42815881967544556, -0.11800673604011536, -0.179556742310524, 0.17914433777332306, -0.283031165599823, -0.25693443417549133, -0.1966623067855835, -0.8784250020980835, 0.030012214556336403, 0.017698079347610474, 0.05413234978914261, 0.08181112259626...
50px; padding-right: 50px; ``` Now from what I (thought) I understood, this would mean that if 100 a's fitted per line before, only 80 or so would fit now. In other words, "container" would remain the same width but grow *downwards*. However, what I am seeing is that the size of "container" is increasing horizontall...
[ 0.2113649994134903, -0.26858049631118774, 0.5873969793319702, -0.10825277864933014, 0.004646602086722851, 0.5340178608894348, -0.2696351408958435, -0.3738941550254822, -0.3782338500022888, -0.6617570519447327, -0.17464390397071838, 0.2807910442352295, -0.02185167744755745, -0.0047559901140...
original width plus padding either side PW----WP - smaller width plus padding either side ``` [Box model](http://www.w3.org/TR/CSS2/box.html) courtesy of [Can Berk Güder](https://stackoverflow.com/users/2119/can-berk-g252der)
[ 0.05670977756381035, -0.2536480724811554, 0.2335870862007141, -0.02504648081958294, -0.08317244797945023, 0.260730504989624, -0.2283395379781723, -0.4142231345176697, -0.3032965362071991, -0.3343717157840729, -0.4102693796157837, -0.13009855151176453, 0.07342400401830673, -0.17350755631923...
I need to enable the **"Allow service to interact with desktop"** option in the *service properties* through command line. How to accomplish that? I tried the **"sc"** command. But I can't achieve what I need. Have you tried "sc config servicename type= interact type= own" Also: <http://social.microsoft.com/Foru...
[ 0.15527819097042084, 0.002050472656264901, 0.6248682737350464, -0.14039120078086853, 0.0563860721886158, -0.07135766744613647, 0.4520733058452606, 0.03365780785679817, -0.3486463129520416, -1.007874608039856, 0.022740771993994713, 0.3071395456790924, 0.06336697936058044, 0.4558214545249939...
Here is the question: How would your trim a block of text to the nearest word when a certain amount of characters have past. I'm not trying to limit a certain number words or letters, but limit the letters and cut it off at the nearest word. Say I had two strings: ``` "This is a block of text, blah blah blah" "this i...
[ 0.022155797109007835, -0.03190465271472931, 0.22249501943588257, -0.12766452133655548, -0.36362946033477783, 0.38009870052337646, 0.1377190351486206, -0.0998373031616211, -0.10286720842123032, -0.3507331907749176, -0.3594858646392822, 0.26936113834381104, -0.3051590621471405, -0.2337582856...
there any clean solution to this problem? See the [wordwrap](http://php.net/manual/en/function.wordwrap.php) function. I would probably do something like: ``` function wrap($string) { $wstring = explode("\n", wordwrap($string, 27, "\n") ); return $wstring[0]; } ``` (If your strings already span across severeal ...
[ 0.30410757660865784, -0.08566033840179443, 0.02983543463051319, -0.1604245901107788, 0.033207960426807404, -0.18366840481758118, 0.7668986320495605, 0.03359583392739296, -0.2073478251695633, -0.38996943831443787, -0.10512351989746094, 0.7605634331703186, -0.37479376792907715, 0.13702872395...
I'm using Orbited as a Comet server on localhost. It is listening to ports: ``` 9000 for http 61613 for stomp ``` My JavaScript debugger is reporting error: *JSON is not defined* in the line: ``` var vals = JSON.parse(payload); ``` What could be the cause and how do I resolve this issue? The JSON library is not b...
[ 0.47791606187820435, -0.06954848766326904, 0.32024163007736206, 0.1051524356007576, -0.289224773645401, -0.2797967791557312, 0.37685471773147583, -0.05001536011695862, -0.2850746512413025, -0.5246684551239014, -0.14496281743049622, 0.4780769646167755, -0.35082024335861206, 0.26422804594039...
I'm building a web service and have a node that accepts a POST to create a new resource. The resource expects one of two content-types - an XML format I'll be defining, or form-encoded variables. The idea is that consuming applications can POST XML directly and benefit from better validation etc., but there's also an ...
[ 0.6015426516532898, 0.316731333732605, 0.46283265948295593, -0.02417573891580105, 0.006711317226290703, -0.23513370752334595, 0.2532714903354645, 0.0985800176858902, 0.06094961240887642, -0.9831156134605408, -0.07187290489673615, 0.19723528623580933, -0.3443191349506378, 0.3358440101146698...
[...etc...] Accept: text/html,application/xhtml+xml, [...etc...] Accept-Language: en-gb,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Content-Type: application/x-www-form-urlencoded Content-Length: 41 field1=value1&field2=value2&field3=valu...
[ 0.09922320395708084, 0.324830561876297, 0.5795554518699646, 0.056342173367738724, -0.014918805100023746, -0.05503438040614128, 0.2567159831523895, -0.4348796010017395, 0.019202260300517082, -0.3621494472026825, -0.35180869698524475, 0.3736095428466797, -0.2757754623889923, 0.09590718895196...
default encoding of a HTTP POST is ISO-8859-1. else you have to look at the Content-Type header that will then look like ``` Content-Type: application/x-www-form-urlencoded ; charset=UTF-8 ``` You can maybe declare your form with ``` <form enctype="application/x-www-form-urlencoded;charset=UTF-8"> ``` or ``` <f...
[ 0.14315709471702576, -0.04690607637166977, 0.7216383218765259, -0.08486476540565491, -0.2923344671726227, -0.015895526856184006, 0.44604238867759705, -0.03354771062731743, 0.24436159431934357, -0.8040952086448669, -0.38987794518470764, -0.18466651439666748, -0.3747696578502655, 0.078178219...
I am building a web application which will generate XML from a database based on a specific schema and depending on certain input parameters (such as dates or search terms) carried on a querystring. Is the best approach to write a web service which returns the required XML or to write an ashx handler that outputs the ...
[ 0.5435077548027039, 0.056414324790239334, 0.30622556805610657, -0.04158570617437363, -0.11475200206041336, -0.19698116183280945, 0.07636164128780365, -0.31446921825408936, -0.06873557716608047, -0.5960584282875061, -0.15333200991153717, 0.315216988325119, -0.24535678327083588, 0.0398156419...
Is there an easy way or online tool for checking a site's SSL vulnerability issues? From the [PCI](https://www.pcisecuritystandards.org/) standards I see that a site has to force SSLv3 or TLSv1 protocols and high security encryption algorithms. And I need to check if my site is compliant with those PCI DSS standards. ...
[ 0.2664330303668976, 0.13093598186969757, 0.25768372416496277, 0.01729108951985836, -0.16871029138565063, -0.13273879885673523, 0.44982442259788513, -0.43684250116348267, -0.4076351523399353, -0.5122551321983337, -0.2647695243358612, 0.46160581707954407, -0.38138365745544434, 0.126911461353...
{ "test", 42 }; TheTypeYouWantToInstantiate instance = Construct<TheTypeYouWantToInstantiate>(paramTypes, paramValues); // ... public static T Construct<T>(Type[] paramTypes, object[] paramValues) { Type t = typeof(T); ConstructorInfo ci = t.GetConstructor( BindingFlags.Instance | BindingFlags.N...
[ 0.3167911469936371, -0.15083345770835876, 0.37612757086753845, 0.04240940511226654, 0.009241210296750069, 0.37605682015419006, 0.7569341659545898, -0.698049783706665, -0.14534549415111542, -0.5415489077568054, -0.4219641089439392, 0.3427658677101135, -0.5032764673233032, 0.3183152079582214...
Following on from [How do you test the performance of a website?](https://stackoverflow.com/questions/53738/how-do-you-test-the-performance-of-a-website) : What tools/sites/services do you use to find out the performance of your website from multiple locations around the world? There are always complaints that sites...
[ 0.49300050735473633, -0.013440842740237713, 0.19116444885730743, 0.42934539914131165, 0.0021640341728925705, -0.31326186656951904, 0.1708148717880249, 0.10418521612882614, -0.28319844603538513, -0.48034635186195374, 0.26334449648857117, 0.35791537165641785, 0.505949079990387, -0.2467013001...
the HTML itself, using the same pipelining rules as browsers use), and they can test not just from datacenter locations but end-user broadband connections - but they're very expensive. It's also worth using a tool like [YSlow](http://developer.yahoo.com/yslow/) to do basic analysis of your app and point out the thing...
[ 0.3973105251789093, 0.017699096351861954, 0.5074256658554077, 0.3358398675918579, -0.13471285998821259, -0.28580692410469055, 0.2087676227092743, 0.12368161231279373, -0.28465551137924194, -0.6685196161270142, -0.01787877455353737, 0.5114226937294006, 0.024677656590938568, -0.4823007583618...
I've got an enum with possible values: ``` public enum Language { English = 1, French = 2, German = 3 } ``` Now i want my class to be dynamic in the sense that it can cater for multiple values based on the enum list. So if the enum list grew i can capture all possible values. Her...
[ -0.036912333220243454, -0.2143278419971466, -0.035586029291152954, -0.03608299419283867, 0.05932004004716873, 0.21863843500614166, 0.26827797293663025, 0.4398449957370758, -0.2877081036567688, -0.6491405367851257, -0.33167314529418945, 0.2996479868888855, -0.36820679903030396, 0.1657556444...
public string EnglishValue { get; set; } public string FrenchValue { get; set; } public string GermanValue { get; set; } } ``` But i want something that doesnt need to recompile if the enum list (or any list) grows: Is it possible to express something like: ``` public class Locale { ...
[ 0.16681194305419922, -0.3095442056655884, 0.12981674075126648, -0.2679906189441681, 0.10079559683799744, -0.12620367109775543, 0.7077415585517883, 0.5269184112548828, 0.17549455165863037, -0.7066260576248169, -0.6454585194587708, 0.5457029342651367, -0.38269442319869995, 0.0511922314763069...
``` I am open to any suggestions or design patterns that can nicely deal with this problem. Thanks Just use a Dictionary. ``` public class Locale : Dictionary<Language, string> { } ``` Whatever you do, if you change the enum, you have to recompile, but what you probably mean is "maintain" the Locale class.
[ 0.33226341009140015, 0.24895194172859192, 0.1488090604543686, -0.06886276602745056, 0.10924072563648224, -0.19589929282665253, 0.48213768005371094, 0.4513379633426666, 0.02951798215508461, -0.8549672365188599, -0.3472987413406372, 0.7425193786621094, -0.10840422660112381, 0.134027823805809...
I have a Java program running on Windows (a Citrix machine), that dispatches a request to Java application servers on Linux; this dispatching mechanism is all custom. The Windows Java program (let's call it `W`) opens a listen socket to a port given by the OS, say 1234 to receive results. Then it invokes a "dispatch" ...
[ 0.5481641292572021, 0.043464820832014084, 0.19958491623401642, -0.06529088318347931, 0.01854514703154564, 0.32789847254753113, 0.19203539192676544, -0.21059224009513855, -0.25951164960861206, -0.6710895299911499, -0.023229200392961502, 0.3556070029735565, -0.1843695193529129, 0.15457399189...
of servers and within 2 seconds, all servers have finished processing their jobs and try to send the results back to the `W`'s socket. I can see in the logs that 9 jobs are received by `W` (this number varies from test to test). So, I try to look for the 4 remaining jobs. If I do a `netstat` on this Windows box, I see...
[ 0.35491278767585754, 0.03222395107150078, 0.5400895476341248, 0.06635677069425583, 0.2331279069185257, 0.018347876146435738, 0.37351447343826294, -0.0007799792219884694, -0.5176628232002258, -0.7286196351051331, -0.36496952176094055, 0.5590629577636719, -0.355957955121994, 0.34027758240699...
S6:57642 ESTABLISHED TCP W:4373 S7:48295 ESTABLISHED ``` If I do a thread dump of `W`, I see 4 threads trying to read from these sockets, and apparently stuck in `java.net.SocketInputStream.socketRead0(Native Method)`. If I go on each of the `S` boxes and do a `netstat`, I see that some bytes are still i...
[ 0.22377987205982208, -0.1583642214536667, 0.31155306100845337, -0.2485492080450058, -0.13129301369190216, -0.07239591330289841, 0.2709652781486511, -0.01732901856303215, -0.3435475826263428, -0.701388418674469, -0.35903507471084595, 0.3030731678009033, -0.37209951877593994, 0.2514427006244...
Foreign Addr State tcp 0 6385 S1:48197 W:4373 ESTABLISHED tcp 0 6005 S1:48198 W:4373 ESTABLISHED tcp
[ -0.14537514746189117, 0.04017772525548935, 0.5676326751708984, -0.007936450652778149, -0.08785498142242432, 0.13956287503242493, -0.08444610238075256, -0.15089812874794006, -0.027390114963054657, -0.00015142816118896008, -0.33982908725738525, 0.2738763988018036, -0.5074480772018433, 0.4021...
0 6868 S6:57642 W:4373 ESTABLISHED tcp 0 6787 S7:48295 W:4373 ESTABLISHED ``` If I do a thread dump of the servers, I see the threads are also stuck in `java.net.SocketInputStream.socketRead0(Native Method)`. I would expect a write, but
[ 0.11084704101085663, 0.09315387904644012, 0.2344794124364853, -0.20524004101753235, -0.10526125878095627, -0.0958457663655281, 0.2472812980413437, -0.034260306507349014, -0.2692899703979492, -0.25063571333885193, -0.1963716447353363, 0.26313716173171997, -0.42329809069633484, 0.35752597451...
maybe they're waiting for an ACK? (Not sure here; would it show in Java? Shouldn't it be handled by the TCP protocol directly?) Now, the very strange thing is: after 15 minutes (and it's always 15 minutes), the results are received, sockets are closed, and everything continues as normal. This used to always work bef...
[ 0.34833621978759766, -0.12975932657718658, 0.7349011898040771, 0.27868765592575073, 0.20996059477329254, -0.2620665729045868, 0.3139246106147766, 0.33613836765289307, -0.44129687547683716, -0.3769896924495697, -0.283316433429718, 0.36421075463294983, 0.08309348672628403, 0.490270733833313,...
I thought that it could be some protection against DDOS? I'm no network expert so I asked for help, but nobody's available to help me. I spent 30 minutes with a guy capturing packets with Wireshark (formerly Ethereal), but for "security reasons," I cannot look at the result. He has to analyze this and get back to me. ...
[ 0.6028615832328796, 0.10879654437303543, 0.13722527027130127, 0.3919171392917633, -0.06956269592046738, -0.19286805391311646, 0.4222206473350525, 0.07237917929887772, -0.2041328400373459, -0.5292922854423523, 0.16100198030471802, 0.21697905659675598, -0.2545921206474304, 0.1654253304004669...
in your local network, then I don't envisage this being a programming issue (re. the `flush()` comments). Is network connectivity between the 2 machines normal otherwise ? Can you transfer similar quantities of data via (say) FTP with no problem. Can you replicate this issue by knocking together a client/server script...
[ 0.2853548228740692, -0.22238607704639435, 0.38015156984329224, 0.3879316449165344, -0.128642737865448, -0.1885070651769638, 0.41801220178604126, -0.040260300040245056, -0.43929219245910645, -0.8833341002464294, 0.008308588527143002, 0.5059335827827454, 0.1178736537694931, -0.02444427646696...
What are your TCP configuration parameters set up to be (on both W and S - I'm thinking about the OS-level parameters). Is there anything there that would suggest or lead to a 15m figure. Not sure if that's any help.
[ 0.4601961374282837, -0.13090893626213074, 0.22047196328639984, 0.34349197149276733, 0.15161898732185364, -0.13994018733501434, -0.03295784816145897, 0.22089198231697083, -0.36469289660453796, -0.25300905108451843, 0.39432963728904724, 0.4677615165710449, -0.14062464237213135, -0.1282428056...
I haven't done enterprise work in Java, but I often see the [reverse-domain-name package naming convention](https://stackoverflow.com/questions/420945/java-package-name-convention-failure). For example, for a Stack Overflow Java package you'd put your code underneath package `com.stackoverflow`. I just ran across a Py...
[ 0.2422155737876892, 0.35348591208457947, -0.1968184858560562, -0.3246555030345917, -0.12791436910629272, -0.18695010244846344, 0.052277468144893646, -0.1500406414270401, -0.2026732712984085, -0.39394980669021606, 0.023269617930054665, 0.6422241926193237, -0.17930690944194794, -0.0552284941...