text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
for name in lst) >>> names_dict {'Tom': 0, 'Mike': 1, 'Dick': 0, 'Harry': 1, 'Bob': 2, 'John': 1} ```
[ 0.003268571337684989, 0.2469094842672348, 0.41306254267692566, -0.3348715901374817, 0.27772438526153564, 0.4316953122615814, 0.09509674459695816, 0.21457497775554657, -0.07922761142253876, -0.48917722702026367, -0.4415285587310791, 0.48945721983909607, -0.21747255325317383, 0.2107678055763...
I'm looking for a Rails plugin that eases the development of a "friends" system or social networking system for the latest versions of Ruby on Rails. Before anyone says it...I know, I should probably create it myself, from scratch. And I am fully capable of this (I think). I'm just looking for a good plugin that can a...
[ 0.27124547958374023, 0.26569491624832153, -0.022915586829185486, 0.08173488080501556, 0.19338300824165344, -0.029464025050401688, 0.385414183139801, 0.2296365350484848, 0.09182749688625336, -0.5392211079597473, 0.24724850058555603, 0.486496239900589, -0.23751096427440643, -0.18334561586380...
comparison. Thanks in advance... You could look into <http://lovdbyless.com/> This is a free open-source Rails social networking app which should give you plenty of ideas and pointers. Ronald
[ 0.7845692038536072, 0.15989993512630463, -0.03662217780947685, 0.4713888168334961, -0.14204876124858856, -0.2941756546497345, 0.054071880877017975, 0.28898099064826965, -0.3814919888973236, -0.3363855183124542, 0.280998170375824, 0.35273605585098267, 0.1062554121017456, -0.0411032177507877...
I have a listbox with 20 colors. It looks something like this: 1:Red 2:Green 3:Blue 4:Orange 5:Red 6:Yellow 7:Orange 8:Red 9:Green .... It gets the data from an ObjectDataSource which in turn gets it's data from a method which returns a datatable. I want a dropdown which basically has 2 items, Order By # and Order By...
[ 0.21728543937206268, -0.3756145238876343, 0.5991537570953369, -0.027995260432362556, -0.11576441675424576, 0.3731904923915863, 0.04624532535672188, 0.008042769506573677, -0.42964404821395874, -0.7383773922920227, 0.18002928793430328, 0.18172316253185272, -0.4054247736930847, 0.039577931165...
parameter, you can define it like so: ``` <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="SelectMethod" TypeName="MyDataObject"> <asp:Parameter Direction="input" Type="string" Name="sortExpression"> </asp:Parameter> </asp:Obj...
[ -0.10626136511564255, -0.34582120180130005, 0.6167009472846985, 0.1531614363193512, -0.10069289058446884, 0.23723164200782776, -0.2723509967327118, -0.25292709469795227, -0.03416014835238457, -0.4734630286693573, 0.09724238514900208, 0.6395545601844788, -0.0996677353978157, 0.1082489266991...
public DataView SelectMethod(string sortExpression) { DataTable table = GetData(); DataView dv = new DataView(table); dv.Sort = sortExpression; return dv; } ``` Then in the wizard for the ObjectDataSource you can bind that Parameter to the dropdown SelectedValue. Make the value...
[ -0.09696086496114731, -0.42739441990852356, 0.5824125409126282, 0.006460519041866064, -0.10802613943815231, -0.09226568043231964, 0.23233962059020996, -0.2089676558971405, -0.12970130145549774, -0.6462921500205994, -0.29012948274612427, 0.6317263841629028, -0.29186126589775085, 0.237311169...
I'm trying to write an ActiveRecord find query with no success. Please help! This feature of my project is kind of a blog with Digg-like features: each registered user can add a star to the blog post itself or any of its replies. So here are the relevant model classes: * BlogPost (has\_many Replies) * Reply (belongs...
[ 0.4425605535507202, -0.17929396033287048, 0.5977705717086792, -0.17078743875026703, -0.09031538665294647, -0.0630497857928276, 0.3093460500240326, -0.024699022993445396, -0.13356150686740875, -0.43288373947143555, 0.12445007264614105, 0.4594488739967346, -0.43901607394218445, -0.1362804323...
blog\_post.rb that will return the total number of starrings for the BlogPost object as well as all of its Reply classes. That is, if a blog post has 10 stars, and it has two replies which each have 5 stars, it should return 20. How do I write this query without making a jillion database transactions? I would suggest ...
[ 0.6315152645111084, 0.12974324822425842, 0.5270799398422241, 0.023116273805499077, -0.516643762588501, 0.08254113793373108, 0.13400021195411682, -0.13220494985580444, -0.055947188287973404, -0.2903069853782654, 0.3427257835865021, 0.47513753175735474, -0.3720824718475342, 0.155750364065170...
starrable_id=#{blogpost.id}` and `select count(starrings.id) from starrings join replies on starrings.starrable_type='Reply' and starrable_id=replies.id and replies.blog_post_id=#{blogpost.id}` Note: I didn't test this SQL and may have misspelled something or made a typo. You can run SQL counts with 'Starring.coun...
[ 0.7722863554954529, -0.08630385249853134, 0.595819890499115, -0.1853354275226593, -0.13537198305130005, 0.12365397810935974, -0.06739790737628937, -0.3874985873699188, -0.19766533374786377, -0.4101659953594208, 0.2961726188659668, 0.47161075472831726, -0.5843014121055603, -0.01708276756107...
I'm in the process of selecting an AMI for my website on the Amazon EC2 network. It seems like the Ubuntu instances come in either 32 or 64 bit flavors. Presumably the 64 bit systems give you more memory address space, which is good. However, I'm wondering if it is a problem finding pre-compiled binaries. Am I better o...
[ 0.13362684845924377, 0.132797509431839, 0.05005302280187607, 0.15425431728363037, -0.294583261013031, 0.10598573833703995, 0.06683694571256638, 0.1454574167728424, -0.08027184009552002, -0.8615196347236633, 0.043099597096443176, 0.5319206118583679, -0.4244275987148285, 0.1108655259013176, ...
only run on `m1.small`, while 64-bit AMIs only run on `m1.large` and `m1.xlarge` instances (plus the respective High CPU variants). Larger instances obviously cost more money, with price theoretically scaling linearly with performance. However, I've found that large and xlarge instances actually have a little more per...
[ 0.11001373827457428, -0.016071157529950142, 0.2387850284576416, 0.22213181853294373, 0.09499818086624146, -0.05059438571333885, 0.1270126849412918, 0.15721385180950165, -0.10710759460926056, -0.7583415508270264, -0.18693307042121887, 0.7477618455886841, -0.24515724182128906, -0.22657468914...
How can I recursively delete all files & directories that match a certain pattern? e.g. remove all the ".svn" directories and the files they contain? (Sadly DOS only) Since you're looking for a DOS solution, last week's post was almost identical and the consensus was: [Command line tool to delete folder with a specif...
[ -0.07602960616350174, -0.1540629267692566, 0.5553014874458313, -0.004300177097320557, -0.039698511362075806, -0.34253382682800293, 0.5512460470199585, -0.17924189567565918, -0.5163498520851135, -0.5570973753929138, -0.4639703929424286, 0.5613917112350464, 0.016243036836385727, 0.2386468946...
later: I think the reason people end up needing to recursively delete the .svn/\_svn folders is because they've directly copied their local working copy to a new location in order to do a folder comparison of their modified version compared to a clean export, i.e. after something goes awry with the modified local worki...
[ 0.2764691412448883, 0.04134224355220795, 0.23283693194389343, 0.08311470597982407, 0.13105803728103638, -0.09090321511030197, 0.12185388803482056, 0.3064548969268799, -0.3906169831752777, -0.4884074032306671, -0.2775641083717346, 0.6481791138648987, -0.047287072986364365, 0.171143710613250...
I'm trying to scale this but I'm a little green when it comes to creating JS functions. I managed to get this far on my own, but alas... When a span gets a value of whatever (in this case, a city name), I want the select box to automatically match it. And I want to scale this by getting rid of all these else if's. ``...
[ 0.3292529881000519, -0.32511913776397705, 0.9255375266075134, 0.07435928285121918, 0.137809157371521, 0.09185649454593658, -0.12083826214075089, -0.4700694680213928, -0.34300023317337036, -0.5773007869720459, -0.18771997094154358, 0.3918587267398834, -0.456739604473114, -0.1782206445932388...
option[value=Los Angeles]').attr('selected', 'true'); } else if (whereEvent == 'Tokyo') { $('select#field1 option[value=Tokyo]').attr('selected', 'true'); } else if (whereEvent == 'London') { $('select#field1 option[value=London]').attr('selected', 'true'); } else if (whereEvent == 'Sydney') { $('sele...
[ 0.10594023764133453, -0.5290296077728271, 0.5577122569084167, 0.24949102103710175, 0.600061297416687, 0.24760639667510986, -0.061651088297367096, -0.381026029586792, -0.16982193291187286, -0.623748242855072, -0.5512577891349792, 0.6855692267417908, -0.1429448127746582, -0.16011124849319458...
var filter = 'select#field1 option[value=' + whereEvent + ']'; $(filter).attr('selected', 'true'); } ``` Or you could do: ``` $(document).ready(function() { var filter = $('span#field2').html(); $('select#field1 option').each(function(){ this.selected = (this.value == filter); ...
[ 0.06441570073366165, -0.7675225734710693, 0.6002739667892456, -0.29957902431488037, 0.1326218545436859, -0.05231831222772598, -0.06729687005281448, -0.4478081166744232, -0.22270849347114563, -0.7632551193237305, -0.40149691700935364, 0.8048820495605469, -0.6157292127609253, -0.373072832822...
Right now I have vector3 values represented as lists. is there a way to subtract 2 of these like vector3 values, like ``` [2,2,2] - [1,1,1] = [1,1,1] ``` Should I use tuples? If none of them defines these operands on these types, can I define it instead? If not, should I create a new vector3 class? If this is some...
[ 0.2388269007205963, -0.24878539144992828, 0.3491916358470917, -0.0880335196852684, -0.3429877758026123, 0.17817886173725128, 0.09218856692314148, -0.17621195316314697, -0.46886682510375977, -0.789055585861206, 0.1099429801106453, 0.5186165571212769, -0.4156985282897949, -0.1082751750946044...
I've read the manual many times, I've scoured the posts offered by Google on the subject, I have even bought a couple of books that deal with ZF. Now, why am I still confused? I can, using Zend\_Form, make a form that validates and functions fine. What I cannot do it make a form that looks exactly like I want it to lo...
[ 0.5730901956558228, 0.14770105481147766, 0.188350111246109, 0.11549439281225204, 0.20338119566440582, 0.06337108463048935, 0.01747487299144268, -0.04043712466955185, -0.21090638637542725, -0.6641460061073303, 0.010690107941627502, 0.6962203979492188, -0.12048862129449844, 0.136813685297966...
these sorts of things? Something that makes me feel like the framework is saving me time rather than costing? I could forego Zend Form... make my own form, have its action hit a page to validate and process the posted data and I could do it about as fast as I can type but I really want to "get" this and be able to use ...
[ 0.7864086031913757, -0.011548466980457306, 0.12208458036184311, 0.4153021275997162, 0.1130976602435112, -0.030129127204418182, 0.12627013027668, 0.011318659409880638, -0.16196595132350922, -0.4841444790363312, 0.1906571090221405, 0.507188618183136, 0.03479091450572014, -0.18862928450107574...
"getting things done" with zend form? Barrett Conrad's advice is what I would have suggested. Also, keep in mind that you don't need to use a form object to render your form. One thing you could do is create a form in your view script that has elements with the same name as a form class. Your HTML form: ``` <form ac...
[ 0.35888418555259705, -0.342134028673172, 0.29692888259887695, 0.023801565170288086, 0.053039416670799255, -0.5232610702514648, 0.31651079654693604, -0.6717268824577332, 0.1812153309583664, -0.6258705854415894, -0.2392982393503189, 0.31839561462402344, -0.18668635189533234, -0.1945652663707...
{ $username = $this->createElement('text','username'); $username->setRequired(true); $this->addElement($username); $password = $this->createElement('password','password'); $password->setRequired(true); $this->addElement($password); } } ``` Your form class r...
[ 0.21513894200325012, 0.14467865228652954, 0.5529063940048218, -0.13511277735233307, -0.10416682809591293, -0.09360802918672562, 0.3426154553890228, -0.5714254975318909, 0.059218645095825195, -0.6344555616378784, -0.3911237120628357, 0.37972715497016907, -0.42243731021881104, -0.11300123482...
your post/get vars against that form: ``` $form = new LoginForm(); if ($this->_request->isPost()) { if ($form->isValid($this->_request->getParams())) { // do whatever you need to do } else { $this->view->errors = $form->getMessages(); } } ``` You can display the the error messages at the ...
[ 0.2612713575363159, -0.0405506007373333, 0.6226716637611389, -0.1049698069691658, -0.1660606414079666, 0.021354487165808678, 0.4335733652114868, -0.2878177762031555, -0.07190527021884918, -0.9140037894248962, -0.35496097803115845, 0.35176947712898254, -0.32532453536987305, 0.06203319504857...
strength of Zend\_Form is in its validation and filtering properties, in my opinion. This gives you that strength. The main draw back to a solution like this is that your view script HTML form can become out-of-sync with your form class.
[ 0.0453348234295845, -0.2728554308414459, 0.4052680730819702, 0.114785335958004, -0.2537192404270172, -0.5341371297836304, 0.3391588032245636, -0.3247775137424469, 0.2621653974056244, -0.4669397175312042, 0.17663879692554474, 0.48354533314704895, 0.028481781482696533, -0.15950454771518707, ...
### Duplicate of: [How can I evaluate a C# expression dynamically?](https://stackoverflow.com/questions/53844/how-can-i-evaluate-a-c-expression-dynamically) See also: [C# eval equivalent?](https://stackoverflow.com/questions/4629/c-eval-equivalent) --- How to evaluate expression. Maybe like: ``` int a=1; int b=3; i...
[ 0.11910078674554825, 0.21837936341762543, -0.013522177934646606, 0.1642826646566391, -0.21899640560150146, 0.15263772010803223, 0.5276360511779785, -0.2770041227340698, -0.3482237458229065, -0.29985544085502625, 0.10850154608488083, 0.4487718641757965, -0.4715205132961273, -0.1296854913234...
We were just today discussing it, so I went on a little search but found nothing, zip, nada. What is the future of ms's cmd shell? Do they intend to replace it completely with powershell in the future versions of windows, or just ship powershell as a parallel alternative ? Does anyone have any links, articles, ... wh...
[ 0.17798835039138794, -0.01228490099310875, 0.48602649569511414, 0.2784501612186432, 0.2704210877418518, -0.2843846380710602, 0.052649904042482376, 0.6063475012779236, -0.453231543302536, -0.40119555592536926, -0.15574012696743011, 0.7344303131103516, -0.17868423461914062, 0.446616202592849...
cmd /c, and replicating the exact same mechanism for powershell would be a duplication of effort. So, I suppose the cmd.exe remains.
[ 0.10994718223810196, 0.24600288271903992, 0.30451637506484985, 0.21573889255523682, 0.15231087803840637, -0.2334492951631546, -0.29304036498069763, 0.32988494634628296, -0.037299685180187225, -0.2738493084907532, -0.07524940371513367, 0.5990894436836243, -0.04926449805498123, 0.22548224031...
As a database architect, developer, and consultant, there are many questions that can be answered. One, though I was asked recently and still can't answer good, is... > "What is one of, or some of, the best methods or techniques to keep database changes documented, organized, and yet able to roll out effectively eithe...
[ 0.3970707356929779, 0.2109643965959549, -0.13350658118724823, 0.33842989802360535, 0.18607325851917267, -0.15991975367069244, 0.05653144046664238, -0.25400716066360474, -0.21545468270778656, -0.5639565587043762, 0.05270252749323845, 0.5888827443122864, -0.09764819592237473, -0.039014410227...
like to know about techniques used without a lot of extra third-party involvement. The easiest way I have seen this done without the aid of an external tool is to create a "schema patch" if you will. The schema patch is just a simple t-sql script. The schema patch is given a version number within the script and this nu...
[ 1.0371921062469482, 0.024039164185523987, 0.4576679468154907, 0.17125335335731506, 0.3180234134197235, -0.3327496349811554, 0.15845945477485657, 0.3057899475097656, -0.10928609222173691, -0.8564959764480591, 0.08545800298452377, 0.6358076333999634, -0.23239721357822418, 0.21435795724391937...
and run all schema patches in between. Afterwards the schema version table is updated with whatever date/time the patch was executed to store for the next run. A good book that goes into details like this is called [Refactoring Databases](https://rads.stackoverflow.com/amzn/click/com/0321293533). If you wish to use a...
[ 0.2350711226463318, -0.011325644329190254, 0.06509176641702652, -0.0017476048087701201, -0.0567220039665699, -0.06870025396347046, 0.3825279176235199, -0.08476854115724564, -0.42346078157424927, -0.6599431037902832, -0.04989095404744148, 0.5677968263626099, -0.1482265740633011, 0.022615335...
you are not interested in an external tool, but I thought I would add that for other readers anyways.
[ 0.3409944474697113, 0.018775900825858116, -0.06845373660326004, 0.2692502737045288, 0.15162096917629242, -0.22094900906085968, 0.027522392570972443, 0.30010470747947693, 0.025011960417032242, -0.37818312644958496, 0.09409571439027786, 0.5261783599853516, 0.22016505897045135, -0.16168569028...
Are there any good image, photo browser or carousel controls for Delphi? I would prefer something free if available. It's not free, but [TMS Software GUI Motions](http://www.tmssoftware.com/site/guimotions.asp) seems to be quite stunning: ![TMS Software GUI Motions](https://www.tmssoftware.com/site/img/screens/guim_tn...
[ 0.1812497079372406, -0.2610974907875061, 0.5898572206497192, 0.31684041023254395, 0.049844615161418915, -0.15694856643676758, -0.20728376507759094, -0.17298449575901031, -0.7977311611175537, -0.49454933404922485, 0.03589252382516861, 0.56821209192276, 0.10200939327478409, -0.26058408617973...
In Javascript how can I tell if a checkbox has focus or not? I thought there would be a method or property called isfocused. But apparently not. By in focus I mean they've tabbed to it using the keyboard and at this point pressing space would check the box. Create an event handler that is wired to the onfocus event. ...
[ 0.20532363653182983, -0.35396820306777954, 0.15250159800052643, -0.20002274215221405, -0.22063282132148743, -0.2136167734861374, 0.07234762609004974, 0.15462449193000793, -0.09836694598197937, -0.7874133586883545, -0.21655690670013428, 0.772657573223114, -0.4990743100643158, -0.51195526123...
I am trying to alter style at print-time: Is there an event in javascript that you can listen for for when file>>print is called? What is it? Also - is there a handler for when printing is finished? What is it? or if there is a better way to do this with some other means, such as style sheets, how do you do that? **D...
[ 0.6188132762908936, 0.037219054996967316, 0.30591753125190735, -0.044914692640304565, -0.405004620552063, -0.032654643058776855, -0.06588100641965866, -0.16975732147693634, -0.22465598583221436, -0.9461015462875366, 0.05500112101435661, 0.39708083868026733, -0.419916033744812, 0.0265695806...
block. ``` @media print { div.box { width:100px; } } @media screen { div.box { width:400px; } } ```
[ 0.16629426181316376, -0.1939581334590912, 0.5509196519851685, -0.07669119536876678, -0.10729119926691055, -0.020922036841511726, 0.10743431746959686, -0.17263132333755493, -0.2771860361099243, -1.0132766962051392, -0.35812631249427795, 0.33066263794898987, -0.30495670437812805, 0.148502334...
Is there a possibility to checkout from a repo based on the properties of a svn-versioned file? That would be a special kind of sparse checkout. For example to checkout only files with "svn:corelib" == "yes". Or is the only chance just to checkout the whole repo and to delete the unwanted files later? For example with...
[ 0.09154631942510605, -0.3077754080295563, 0.1825050711631775, 0.2528781592845917, -0.3501112461090088, -0.09307005256414413, 0.3189242482185364, -0.050317976623773575, -0.4104042649269104, -0.30228525400161743, -0.07852501422166824, 0.5911910533905029, -0.29752665758132935, -0.019735064357...
probably have to search all files in the repository manually to get a list of the ones with the property set and just check those out. If it's reasonable for you to put the corelib and non-corelib files in separate repositories, or even separate directory trees within the same repository, that is almost certainly the ...
[ 0.28764110803604126, 0.20485402643680573, -0.22375759482383728, 0.3978174328804016, 0.26606863737106323, -0.12392253428697586, 0.00041310524102300406, 0.07630590349435806, -0.06314821541309357, -0.5920570492744446, -0.07470595836639404, 0.4082832932472229, 0.02092558518052101, 0.3225593864...
I have a string containing the [UNIX Epoch time](https://en.wikipedia.org/wiki/Unix_time), and I need to convert it to a Java Date object. ``` String date = "1081157732"; DateFormat df = new SimpleDateFormat(""); // This line try { Date expiry = df.parse(date); } catch (ParseException ex) { ex.getStackTrace(); } ...
[ -0.03819501772522926, -0.022785823792219162, 0.742034375667572, -0.366975873708725, 0.3093278110027313, 0.1884460300207138, 0.1031627282500267, -0.3690459430217743, -0.21256671845912933, -0.3782568871974945, -0.1754014492034912, 0.44038400053977966, -0.05013130605220795, 0.2875687777996063...
so you'd want to multiply the long from parseLong() by 1000 to convert to milliseconds, which is what Java's Date constructor uses, so: ``` Date expiry = new Date(Long.parseLong(date) * 1000); ```
[ 0.10944996774196625, -0.08918067812919617, 0.4894471764564514, -0.38501065969467163, 0.2968222200870514, 0.1413760930299759, -0.02237844467163086, -0.15035586059093475, -0.16000482439994812, -0.3086634874343872, 0.021141549572348595, -0.09027017652988434, 0.2241830974817276, 0.346131801605...
I have highly optimized piece of C++ and making even small changes in places far from hot spots can hit performance as much as 20%. After deeper investigation it turned out to be (probably) slightly different registers used in hot spots. I can control inlineing with always\_inline attribute, but can I control register ...
[ 0.4343053996562958, 0.1601925492286682, 0.04086414352059364, 0.11610301584005356, -0.08478099852800369, -0.07824385911226273, 0.34613534808158875, -0.1292656660079956, -0.06042497605085373, -0.5053374767303467, 0.08935742825269699, 0.7051419019699097, -0.49565085768699646, -0.1119273900985...
target specific register name. For more info on this I suggest you take a look at the gcc documentation: <http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Local-Reg-Vars.html> My suggestion however is not to mess with the register allocation unless you have **very good reasons** for it. If you allocate some registers you...
[ 0.41140228509902954, 0.03123517893254757, 0.04965691640973091, -0.017396701499819756, -0.5591893196105957, -0.0015874907840043306, 0.32441446185112, -0.2616872489452362, -0.06240370124578476, -0.8137089610099792, 0.07233010232448578, 0.7006527781486511, -0.676702618598938, -0.0666699633002...
is not forced to use the register for the variable. It's only forced to use the register if the variable is used at all. E.g. if the variable it does not survive an optimization pass it won't be used. Also the register can be used for other variables as well.
[ 0.11177517473697662, -0.1643579602241516, 0.37510809302330017, 0.19726033508777618, 0.06749454140663147, -0.09456723183393478, 0.2633579671382904, -0.0602339468896389, -0.12649965286254883, -0.2728208899497986, -0.34774497151374817, 0.37032538652420044, -0.47342196106910706, 0.202857509255...
I want to enable NSZombies for my iPhone app. I have read several articles online and I am still unsure of the exact procedure. I know I have to set the Environment Variables, which I have done: ``` NSZombieEnabled = YES NSDebugEnabled = YES NSDeallocateZombies = NO ``` I think (I'm not sure), I have to import NSD...
[ -0.008725335821509361, 0.24528998136520386, 0.07625408470630646, -0.29956814646720886, 0.29446345567703247, -0.21157708764076233, 0.40444639325141907, 0.14604005217552185, -0.2946302890777588, -0.8584038615226746, -0.22995050251483917, 0.6732194423675537, -0.6338585019111633, 0.03089611232...
up in the project window, even though I can locate it in the Finder.(Is this normal behavior?). So I opened up main and added: ``` #ifdef TARGET_IPHONE_SIMULATOR #import <Foundation/NSDebug.h> #endif ``` I am not sure if that is right either. After this I still can't get the NSZombie to work (unless I have misunder...
[ 0.26232996582984924, 0.12767985463142395, 0.2851252257823944, -0.059943582862615585, 0.32421600818634033, -0.20906443893909454, 0.4403907358646393, 0.14829842746257782, -0.43475326895713806, -0.6687738299369812, -0.0952269434928894, 0.6579691171646118, -0.28506600856781006, -0.135729551315...
to include NSDebug.h or import any special frameworks to use NSZombies. Basically, turn 'em on in your environment variables, and then, if you attempt to message a dealloc'd object, THEN you'll see something in your console, along the lines of: `2009-02-10 21:17:08.546 MyApp[16926:20b] *** -[CFString _cfTypeID]: messa...
[ -0.04036986082792282, 0.00952264852821827, 0.5748661160469055, -0.4248931109905243, 0.06087758392095566, -0.3372260332107544, 0.25949689745903015, 0.028356343507766724, -0.39511120319366455, -0.7845592498779297, -0.25405311584472656, 0.47268548607826233, -0.43374237418174744, 0.15907299518...
Just started programming in C++. I've created a Point class, a std::list and an iterator like so: ``` class Point { public: int x, y; Point(int x1, int y1) { x = x1; y = y1; } }; std::list <Point> pointList; std::list <Point>::iterator iter; ``` I then push new points onto pointLis...
[ -0.08690765500068665, -0.02114800736308098, 0.4445594251155853, -0.3759637475013733, 0.18370497226715088, -0.13554085791110992, 0.16435401141643524, -0.14025002717971802, -0.134743332862854, -0.650812566280365, -0.16406525671482086, 0.30937033891677856, -0.40766826272010803, 0.234251156449...
iter++) { Point currentPoint = *iter; glVertex2i(currentPoint.x, currentPoint.y); } ``` --- Update ------ You guys were right, the problem isn't in my iterating the list. It appears the problem is when I am attempting to push something on to the list. Exact error: > mouse.cpp: In function `void mouseHandl...
[ -0.47313621640205383, -0.2011537253856659, 1.053883671760559, -0.27740728855133057, -0.006805487908422947, 0.2716134786605835, -0.0034914955031126738, -0.37097519636154175, -0.24840399622917175, -0.45796266198158264, -0.15526989102363586, 0.21910598874092102, -0.2359965294599533, 0.2984642...
them onto the list here. That should be a valid bit of code. ``` #include <iostream> #include <list> class Point { public: int x, y; Point(int x1, int y1) { x = x1; y = y1; } }; int main() { std::list<Point> points; points.push_back(Point(0, 0)); points.push_back(Point(1...
[ -0.28752395510673523, 0.08069503307342529, 0.8410089612007141, -0.43714383244514465, 0.06453898549079895, 0.4178624451160431, 0.1150936484336853, -0.2804475426673889, -0.3643914759159088, -0.44426101446151733, -0.6340194344520569, 0.07538973540067673, -0.47636035084724426, 0.23156422376632...
Point test = *iter; std::cout << test.x << ", " << test.y << "; "; } std::cout << std::endl; return 0; } ``` Using this code: ``` jasons-macbook41:~ g++ test.cpp jasons-macbook41:~ ./a.out 0, 0; 1, 1; 2, 2; jasons-macbook41:~ ``` Although I wouldn't create a temporary copy of the Point as yo...
[ -0.43312376737594604, 0.1838519126176834, 0.25884050130844116, -0.13211672008037567, -0.03629625588655472, 0.1701313704252243, 0.07660099864006042, -0.33017945289611816, -0.007997616194188595, -0.40762320160865784, -0.28183498978614807, 0.1846024990081787, -0.1900659054517746, -0.145421892...
your new problem, drop the "new" from the construction line. That's creating a pointer to a Point, as opposed to a Point on the stack. This would be valid: ``` Point* temp = new Point(0, 0); ``` Or this: ``` Point temp = Point(0, 0); ``` And you'd be better off with the latter.
[ -0.13082514703273773, 0.23033533990383148, 0.31211987137794495, -0.04368409514427185, 0.03572896122932434, 0.0010946854017674923, 0.1657358705997467, -0.2857952415943146, -0.3399679958820343, -0.5470623970031738, -0.197032168507576, 0.5070517063140869, -0.4025461673736572, 0.19795429706573...
In C++ I'd write something like this: ``` if (a == something && b == anotherthing) { foo(); } ``` Am I correct in thinking the Clojure equivalent is something like this: ``` (if (= a something) (if (= b anotherthing) (foo))) ``` Or is there another way to perform a logical "and" that I've missed? A...
[ -0.034390464425086975, 0.033741626888513565, 0.28296828269958496, -0.3196811079978943, -0.2147260159254074, -0.315934419631958, 0.2927020490169525, -0.2613027095794678, -0.20235450565814972, -0.12858347594738007, 0.022531770169734955, 0.5801811218261719, -0.498134583234787, -0.322554767131...
much use. In Common Lisp and Scheme ``` (and (= a something) (= b another) (foo)) ```
[ 0.10490910708904266, 0.26210954785346985, 0.06410394608974457, -0.5149960517883301, -0.17928336560726166, -0.3292069435119629, 0.20663830637931824, -0.05222572386264801, -0.08676473796367645, -0.3104719817638397, -0.46664583683013916, 0.526409924030304, -0.4616861343383789, -0.300124913454...
We need to involve our customer development partners in our development process. We're more or less following Agile methodologies. Some customer partners are remote, others closer. We need to minimize travel costs. Our customers are in health care and tend to be busy, expensive, and hard to schedule. What practices a...
[ 0.43289417028427124, 0.27730587124824524, -0.1305011659860611, 0.35245198011398315, 0.5437049269676208, 0.0651223361492157, 0.15862314403057098, 0.045366596430540085, 0.03046063520014286, -1.0670171976089478, -0.02980523742735386, 0.6244164109230042, 0.17351917922496796, -0.043395373970270...
to the customer site to configure/install a demo rig. The engineer works with the customer on a test and demo setup/plan that will provide an environment that the customer believes replicates the important aspects of the deployment environment but isolates the demo system from existing infrastructure (so that we can pu...
[ 0.9175411462783813, 0.40887999534606934, 0.03453816473484039, -0.08603163063526154, 0.6576860547065735, 0.12179352343082428, 0.05791255831718445, -0.5181286334991455, -0.10430271178483963, -0.41845643520355225, -0.1839054673910141, 0.8806453943252563, 0.35060909390449524, -0.28217974305152...
submit all crashes as bugs to our bug tracker. This way we at least know what went wrong, even if we don't know what's going right. For each release/build that shows up on the customer's test rig, we provide a (short) screencast, narrated by the project lead or primary developer, demo-ing any new features. The release...
[ 0.7633199691772461, 0.26051294803619385, -0.054295096546411514, 0.4640480577945709, 0.3741185665130615, -0.24497567117214203, 0.2817218601703644, 0.16706731915473938, -0.041950348764657974, 0.014730275608599186, -0.4778382480144501, 0.4163723587989807, 0.03649522364139557, -0.3284473717212...
the customer's liaison an account on *our* calendar server and configure their calendar app to make use of that account. This then goes both ways--we can schedule time (on site, phone, email, etc.) with the customer and they can do the same with our developers.
[ 0.5858235955238342, 0.21908675134181976, 0.6745775938034058, 0.06154162809252739, 0.22780704498291016, 0.0703168660402298, 0.08129313588142395, 0.08181559294462204, 0.033057402819395065, -0.6964249610900879, -0.14713777601718903, 0.43428608775138855, 0.2546524107456207, -0.2012142837047577...
Is there a way (ideally easy) to make headings and sections autonumber in HTML/CSS? Perhaps a JS library? Or is this something that is hard to do in HTML? I'm looking at an application for a corporate wiki but we want to be able to use heading numbers like we always have in word processors. 2016 update. Please see [S...
[ 0.4564493000507355, 0.21990446746349335, 0.3453088402748108, 0.012487499043345451, -0.07597755640745163, 0.01448204554617405, 0.3268764019012451, -0.33762839436531067, -0.447284072637558, -0.37032264471054077, 0.10100766271352768, 0.24159248173236847, 0.028352616354823112, 0.05599564313888...
souls that are still living in corporate microcosms made of IE7 and tears. --- See [this other question](https://stackoverflow.com/questions/349060/report-section-style-list-numbering-in-css) if you're wondering how to do it in CSS, the answer might be what you are looking for. But titel has a good proposition too, d...
[ 0.7534606456756592, 0.20761744678020477, 0.23394669592380524, 0.3101499676704407, -0.05614006891846657, 0.10729630291461945, -0.09997013956308365, -0.132802352309227, 0.057643454521894455, -0.6402888298034668, -0.1395045965909958, 0.5239626169204712, -0.0034934317227452993, 0.0288173872977...
would of course be easy to use something like [jQuery](http://jquery.com/) to do the increment also. Something like this untested snippet: ``` $(document).ready(function() { $('h1').each(function(index) { $(this).html((index + 1) + '. ' + $(this).html()); }); }); ``` Don't forget to include the jquery.js fil...
[ 0.18878290057182312, 0.0301168505102396, 0.6589477062225342, 0.22668972611427307, 0.11734132468700409, -0.44528424739837646, -0.02697555162012577, 0.09358420968055725, -0.06052125617861748, -0.5600443482398987, -0.39022162556648254, 0.42508333921432495, -0.09139591455459595, 0.001235045143...
I'm starting a new job Monday and part of the job description is to maintain outsourced Flash web pages that only consist of Rich UI Forms and very little animations. I don't have any experience with Flash or Flex but being a programmer the Flex IDE appears to be much more suitable to me, which brings me to my question...
[ 0.87807697057724, -0.0787491723895073, 0.17536689341068268, -0.05438128486275673, -0.3935129642486572, -0.20676477253437042, -0.06778813898563385, -0.028771353885531425, -0.28906822204589844, -0.8931182622909546, 0.030519960448145866, 0.7444790005683899, 0.006347533315420151, -0.0983958542...
both pretty much the same except with eclipse you can use it for a load of other types of development projects (namely java). So really what your asking is 'Can I maintain a Web Application developed in Flash using the Eclipse IDE?' The answer to this is yes and no. Of course you can use eclipse to maintain the code...
[ 0.7758352756500244, -0.018244421109557152, 0.045589376240968704, 0.08878474682569504, -0.3838978111743927, -0.213883176445961, -0.17203795909881592, -0.25289246439933777, -0.11309117078781128, -0.5984355807304382, -0.09515851736068726, 0.842420756816864, -0.16287095844745636, -0.3816693127...
in and create a pure Actionscript 3. The reason i say yes and no is that if you have a flash project then chances are (but not guaranteed) is that you will have FLA files that will contain animations, assets and maybe even code. If this is the case then you can not use Eclipse to manage these files. Basically... if t...
[ 0.38752079010009766, 0.029563624411821365, 0.15500065684318542, -0.0061389971524477005, -0.09701955318450928, -0.42116713523864746, 0.2011130154132843, -0.19793012738227844, 0.11266795545816422, -0.2898086905479431, -0.04082878679037094, 0.7793053984642029, -0.5396662354469299, -0.46097669...
I want to create a 100% object oriented framework in PHP with no procedural programming at all, and where everything is an object. Much like Java except it will be done in PHP. Any pointers at what features this thing should have, should it use any of the existing design patterns such as MVC? How creating objects for ...
[ 0.4214123487472534, 0.1825481653213501, 0.06665932387113571, 0.24765127897262573, -0.4489951431751251, -0.3883274793624878, 0.37609100341796875, 0.22518925368785858, -0.09763435274362564, -0.6242385506629944, 0.152557373046875, 0.5381177663803101, -0.2601102888584137, -0.02371898479759693,...
linking to an existing framework as your answer and saying 'this does what you want'. Some features I'd like to have are: * Very easy CRUD page generation * AJAX based pagination * Ajax based form validation if possible, or very easy form validation * Sortable tables * Ability to edit HTML templates using PHP I've go...
[ 0.5636112093925476, 0.3002626895904541, 0.4467417597770691, -0.0013088274281471968, -0.36828407645225525, -0.46040281653404236, 0.14414173364639282, 0.20029982924461365, -0.28244444727897644, -0.6823480725288391, 0.03879305347800255, 0.6933184862136841, -0.14798986911773682, -0.05845847353...
understandable model. Furthermore, it does on application level what OOP does on class level, that is, it keeps things separated. Nice addition to MVC is [Intercepting Filter](http://java.sun.com/blueprints/corej2eepatterns/Patterns/InterceptingFilter.html) pattern. It helps to attach filters for pre- and post-processi...
[ -0.004422985017299652, -0.3062370717525482, 0.5299311280250549, -0.10376785695552826, -0.15116490423679352, -0.06010415032505989, 0.1752854436635971, -0.3067365884780884, -0.5068004727363586, -0.5616405010223389, -0.0850134938955307, 0.34033164381980896, -0.4808158576488495, -0.14224630594...
Smarty template engine. I find this technique EXTREMELY flexible, quick, and easy to use. Object representing view should implement `__set` method so every property gets propagated into Smarty template. Additionally `__toString` method should be implemented to support views nesting. See example: ``` $s = new View(); $...
[ 0.1544533371925354, -0.19607248902320862, 0.5603742003440857, -0.024601804092526436, 0.24217167496681213, -0.005454962607473135, -0.17195728421211243, -0.49250948429107666, -0.30689096450805664, -0.6745944619178772, -0.1349610984325409, 0.5098891258239746, -0.4500954747200012, -0.136017084...
HTML. Look at [complete implementation here](https://tigermouse.svn.sourceforge.net/svnroot/tigermouse/view/core-views/View.class.php). By the way, using one of Intercepting Filters you can wrap the returned view with HTML footer and header, so you don't have to worry about returning complete page from your controller....
[ 0.22264166176319122, -0.19424180686473846, 0.32628703117370605, 0.030265841633081436, -0.4077955484390259, -0.07419060915708542, 0.27336248755455017, -0.4556063115596771, -0.25118857622146606, -0.8449710607528687, 0.011559915728867054, 0.09445473551750183, -0.2970077395439148, -0.309891700...
also should return error messages so you can update the form (via Ajax or page reload). Another handy element is automatic translation class for changing data in db to be suitable for user interface. For example, if you have INT(1) field in db representing boolean state and use checkbox in HTML that results in empty s...
[ -0.15720203518867493, -0.18796662986278534, 0.18907637894153595, 0.2950061857700348, -0.40790823101997375, -0.2998836636543274, 0.423233300447464, -0.016096943989396095, -0.15351003408432007, -0.9954093098640442, -0.06325379759073257, 0.6996198892593384, -0.276851087808609, 0.0061043817549...
controller code even during very complex transformations (like [the one converting Wiki syntax](https://tigermouse.svn.sourceforge.net/svnroot/tigermouse/lib/translation/) into HTML). Also **i18n** problems can be solved using object oriented techniques. I like using `__` function (double underscore) to get localised ...
[ -0.21859557926654816, -0.42726799845695496, 0.5711243152618408, 0.3223298490047455, -0.14239190518856049, -0.395547091960907, 0.06571990251541138, -0.10851433873176575, -0.3895479738712311, -0.7558161616325378, -0.015189731493592262, 0.5415313839912415, -0.288767009973526, 0.30263212323188...
I described it in my [other Stackoverflow answer](https://stackoverflow.com/questions/228672/php-access-control-system/325805#325805). Finally, if you would like to play with existing code that is fully object oriented, take look at [Tigermouse framework](http://tigermouse.epsi.pl/). There are some UML diagrams on the...
[ 0.24686911702156067, -0.02654067799448967, -0.07666172832250595, -0.008438472636044025, 0.11826855689287186, -0.15593264997005463, 0.26981762051582336, 0.1367066502571106, -0.35715237259864807, -0.470389723777771, 0.007773939054459333, 0.3688030242919922, 0.00031231832690536976, -0.2852883...
Web Client Software Factory(WCSF) and Smart Client Software Factory(SCSF) both use MVP pattern. **M**-Model can be shared. **V**-View has to be different as both are on different platform(Desktop/Web). I want to know can the **P**-Presenter can be shared or can I be exactly same for both and how. [SQLAlchemy extens...
[ 0.4516219198703766, -0.060393404215574265, 0.28049615025520325, 0.028563769534230232, -0.2553309500217438, 0.05731011927127838, 0.008824027143418789, 0.11745213717222214, -0.7574754357337952, -0.7179944515228271, 0.21482229232788086, 0.11251705884933472, -0.209065780043602, 0.3387745320796...
I'm re-engineering a PHP-driven web site which uses a minimal database. The original version used "pseudo-prepared-statements" (PHP functions which did quoting and parameter replacement) to prevent injection attacks and to separate database logic from page logic. It seemed natural to replace these ad-hoc functions wit...
[ 0.4408799409866333, 0.2999161183834076, -0.0578375868499279, 0.13803623616695404, -0.1164843812584877, -0.16540192067623138, 0.3839908540248871, 0.08584188669919968, 0.049935344606637955, -0.42328107357025146, 0.07610541582107544, 0.5066031813621521, -0.27862676978111267, -0.22232154011726...
Most are in the form `SELECT foo,bar FROM baz WHERE quux = ? ORDER BY bar LIMIT 1`. The most complex statement in the lot is simply three such selects joined together with `UNION ALL`s. * Each page hit executes *at most* one statement and executes it only once. * I'm in a hosted environment and therefore leery of slamm...
[ 0.3165767192840576, 0.3050064146518707, 0.2621092200279236, -0.07022587954998016, -0.2103530466556549, 0.3116944432258606, 0.03138655051589012, -0.21550524234771729, -0.07775460183620453, -0.4272584319114685, -0.084095798432827, 0.4059261083602905, -0.11237626522779465, 0.04445861652493477...
retaining the benefit of parametrization and injection defense? Or do the binary calls used by the prepared statement API perform well enough compared to executing non-prepared queries that I shouldn't worry about it? **EDIT:** Thanks for all the good advice, folks. This is one where I wish I could mark more than one...
[ 0.397680401802063, 0.4446149468421936, 0.15100257098674774, 0.08395501226186752, -0.15500491857528687, -0.19462032616138458, 0.4499751329421997, -0.33708643913269043, -0.011005730368196964, -0.36407145857810974, -0.026746153831481934, 0.6555333733558655, 0.054529059678316116, -0.1164577901...
native database prepared statements, but still allows query bindings to prevent sql injection and keep your sql tidy. From what I understand, PDO::MYSQL\_ATTR\_DIRECT\_QUERY turns off query bindings completely.
[ -0.04145253449678421, 0.321289598941803, 0.06382957845926285, 0.016397759318351746, -0.242744579911232, -0.4336269497871399, 0.4016176164150238, 0.1377665102481842, 0.04695035517215729, -0.5240678191184998, -0.05025624483823776, 0.6731524467468262, -0.3866564929485321, 0.38718506693840027,...
I have a `IEnumerable<T>` collection with Name and FullName as items in it. There are around 5000 items in it. I want to display the FullNames sorted by its lenght, so first the longest name to the shortest name displays. How can I do it in most optimized manner? This answer is effectively the same as spoon16's but wi...
[ 0.034471988677978516, -0.01629067026078701, 0.5143839716911316, -0.08014614135026932, -0.028283026069402695, 0.1352846324443817, 0.1038120910525322, -0.3950946033000946, -0.19350367784500122, -0.8420211672782898, -0.054574623703956604, 0.2045675814151764, -0.1295997053384781, 0.25063124299...
I have a huge file with lots of links to files of various types to download. Each line is one download command like: wget 'URL1' wget 'URL2' ... and there are thousands of those. Unfortunately some URLs look really ugly, like for example: <http://www.cepa.org.gh/archives/research-working-papers/WTO4%20(1)-charles....
[ 0.16417953372001648, 0.2369299978017807, 0.3262941837310791, 0.10593287646770477, -0.09491942822933197, 0.05291727930307388, 0.35073885321617126, 0.202074334025383, -0.23325446248054504, -0.730682373046875, -0.24272848665714264, 0.29857540130615234, -0.09392155706882477, 0.3411317467689514...
and not single quotes (') around the URL. If that still doesn't work, try escaping the paren characters `(` and `)` with a backslash: `\(` and `\)` Which shell are you using? Bash? zsh?
[ 0.508097767829895, 0.35964441299438477, 0.0382528118789196, -0.3097555637359619, 0.1248692125082016, 0.03479762375354767, 0.15089306235313416, -0.19275017082691193, -0.1503870189189911, -0.12905453145503998, -0.30470940470695496, 0.7090421319007874, -0.1863841563463211, 0.04310813546180725...
In Java, i like to use constructs such as ``` List<String> list = new ArrayList<String>() {{add("foo");}}; ``` Is there a way to do this in 1 line in C#, too? I think what you want is an array initializer ``` List<string> list = new List<string>() { "foo" }; ``` Multiple items should be comma-separated ``` List<...
[ 0.15714676678180695, -0.02121860906481743, -0.06304710358381271, -0.4348842203617096, -0.11878547072410583, -0.06478448957204819, 0.02997617982327938, -0.33200594782829285, -0.3089037835597992, -0.6289910674095154, -0.06525039672851562, 0.4261050522327423, -0.6892595291137695, -0.296426594...
I am trying to merge multiple excel files using DataTable.Merge() option ``` For Each fileName As String In Directory.GetFiles("C:\TEMP\.", "*.xls") Dim connectionString As String = String.Format("Provider=Microsoft.Jet.OLEDB.4.0; data source={0}; Extended Properties=""Excel 8.0;HDR=NO;IMEX=1;""", fileName...
[ 0.013676833361387253, -0.23542280495166779, 0.788623034954071, -0.15103097259998322, -0.1688476949930191, 0.05015846714377403, 0.24376541376113892, -0.4770182967185974, -0.050721608102321625, -0.8281992077827454, -0.13504290580749512, 0.5332317352294922, -0.42636409401893616, 0.25650370121...
table1.Merge(TempTable) MsgBox(fileName) Next DataGridView1.DataSource = table1 MsgBox(table1.Rows.Count) ``` But gives following error while merging ``` <target>.ColumnName and <source>.ColumnName have conflicting properties: DataType property mismatch. ``` This is due to one column in excel i...
[ -0.14893557131290436, 0.1234593316912651, 0.4030683934688568, -0.09268690645694733, -0.15864887833595276, 0.17651908099651337, 0.25991109013557434, -0.26874804496765137, -0.06466900557279587, -0.8909332156181335, -0.05458967015147209, 0.38456571102142334, -0.5780242681503296, -0.0144777223...
When I use conditional breakpoint in VS2005 instead of using temporary code to check specific conditions, I noticed it takes more time and the execution speed is decreased!! Do you know why? and how to resolve this issue? Exmaple: ``` int sequence = atoi(m_SequenceNumber.GetAscii()); if( sequence == 392914)//...
[ -0.061263784766197205, -0.2345285266637802, 0.28665870428085327, -0.18013308942317963, 0.08871930837631226, 0.16533440351486206, 0.6315467357635498, -0.3092818558216095, -0.33631032705307007, -0.6304593086242676, -0.046574972569942474, 0.4886544644832611, -0.3588173985481262, 0.03111110255...
to use a memory watchpoint than a conditional breakpoint. A conditional breakpoint (as others have pointed out) has to run additional code each time the execution pointer goes past that point in order to determine if it would break or not - obviously this takes additional time. A memory watchpoint of a certain type get...
[ 0.21587485074996948, -0.027515696361660957, 0.18513067066669464, 0.24913159012794495, 0.23477314412593842, -0.04483582451939583, -0.008930613286793232, -0.14340312778949738, -0.32368260622024536, -0.6702133417129517, -0.15471147000789642, 0.381700336933136, -0.16592413187026978, -0.0974208...
set it on a line of code, but rather on an address in memory. This suggests the obvious limitation, it only works for things you can actually take the address of, such as global variables and dynamically allocated areas of memory (using `new` etc). You are limited in how much memory you are allowed to watch (based on t...
[ 0.4732917547225952, -0.4429810047149658, 0.31140974164009094, 0.32297828793525696, 0.2195696383714676, -0.31476306915283203, -0.05323556065559387, 0.013116598129272461, -0.33433470129966736, -0.6417680382728577, 0.12218514084815979, 0.3401153087615967, -0.08150402456521988, 0.2165992707014...
the address of the memory and the size in bytes. Whenever the value changes your watchpoint will fire. This is particularly useful for figuring out memory corruption issues.
[ 0.030228620395064354, 0.1716035157442093, 0.3728124499320984, 0.15779243409633636, 0.12936541438102722, 0.13934332132339478, 0.18793149292469025, -0.18708914518356323, -0.44094887375831604, -0.5149363279342651, -0.2901952266693115, 0.6936517953872681, 0.05257190018892288, 0.139005035161972...
Can someone help me with the getopt function? When I do the following in main: ``` char *argv1[] = {"testexec","-?"}; char *argv2[] = {"testexec","-m","arg1"}; int cOption; /* test for -? */ setvbuf(stdout,(char*)NULL,_IONBF,0); printf("\n argv1 "); while (( cOption = getopt (2, argv1, "m:t:n:fs?")) != -1) { sw...
[ -0.22755567729473114, -0.01915164291858673, 0.3211730718612671, -0.014860350638628006, 0.38983064889907837, 0.2108260691165924, 0.6559985876083374, -0.21340666711330414, 0.01026296615600586, -0.6663991212844849, -0.3883504569530487, 0.8225110173225403, -0.1709544062614441, -0.4410972595214...
printf("\n -? Arg "); break; case 'n': printf("\n -n Arg : %s \n",optarg); break; } } printf("\n argv2 "); while (( cOption = getopt (3, argv2, "m:t:n:fs?")) != -1) { switch(cOption){ case 'm': printf("\n -m Arg : %s \n",optarg);
[ -0.2625848948955536, -0.372806578874588, 0.43419039249420166, -0.3543826937675476, 0.4328974783420563, 0.17751432955265045, 0.3131483495235443, -0.33406862616539, -0.25616908073425293, -0.33311232924461365, -0.8234274387359619, 0.8620570302009583, -0.45293259620666504, -0.13515765964984894...
break; case '?': printf("\n -? Arg : %s \n",optarg); break; case 'n': printf("\n -n Arg : %s \n",optarg); break; } } ``` I'm running this code on rhel3 which uses old
[ -0.23915371298789978, 0.14764073491096497, 0.16426385939121246, -0.44039031863212585, 0.3538925349712372, -0.0774274468421936, 0.6064795851707458, -0.11895178258419037, -0.18859530985355377, -0.43298691511154175, -0.5503939986228943, 0.6796136498451233, -0.556512176990509, 0.09268907457590...
libc version. I don't know which one to be exact. Now the problem is getopt doesn't work the second time with argv2. But if I comment out the first getopt call with argv1 , it works. Can someone tell me what am I doing wrong here? argv1 and 2 must end in 0: ``` char* argv1[] = {"par1", "par2", 0}; ``` *Edit*: OK, ...
[ -0.37877601385116577, 0.04268429055809975, 0.42031583189964294, -0.2210458517074585, -0.24161246418952942, -0.055970460176467896, 0.586834192276001, -0.306656152009964, -0.28606969118118286, -0.7452871203422546, -0.088096022605896, 0.720678985118866, -0.7624457478523254, -0.059475537389516...
same argv, or when scanning a new argument vector. So, making optind=1 between the two calls at getopt makes it work as expected.
[ -0.2943750023841858, -0.4466160833835602, 0.43283629417419434, -0.1677505522966385, -0.02915278449654579, 0.010090058669447899, -0.07285121083259583, -0.4155115783214569, -0.2040444016456604, -0.8170105218887329, -0.2109169363975525, 0.8307627439498901, -0.3832092583179474, -0.410676598548...
I've written a stored procedure that takes in a date parameter. My concern is that there will be confusion between `American` and `British` date formats. What is the best way to ensure that there is no ambiguity between dates such as `02/12/2008`. One possibility would be for users to enter a date in a format such as `...
[ 0.33581769466400146, 0.3005545735359192, 0.3736446499824524, 0.055373482406139374, -0.02906438708305359, -0.03528175875544548, 0.06662149727344513, 0.09079058468341827, -0.09380518645048141, -0.1528986245393753, 0.049463555216789246, 0.093413345515728, 0.19210104644298553, 0.30205154418945...
. . . One issue is that I'm expecting this stored proc to be called directly without a front end so validation ouside of the proc is not an option. Is it a good idea to take the day, month and year as separate parameters? I've ended up taking a string paramater for the date and require users to enter the month as a wor...
[ 0.04226171225309372, 0.2778462767601013, 0.5186492800712585, -0.2595737874507904, -0.04983217269182205, 0.29691678285598755, 0.2207665890455246, 0.0746542289853096, -0.15605056285858154, -0.2821880280971527, -0.09240468591451645, 0.1985500305891037, 0.1879517287015915, 0.35355374217033386,...
or "%Mar%" etc.
[ -0.0808400809764862, 0.35704681277275085, 0.348169207572937, -0.07611551880836487, 0.07676070928573608, 0.009255114011466503, 0.10197212547063828, -0.13791635632514954, 0.1872325837612152, -0.14279669523239136, -0.291995108127594, 0.7981019616127014, -0.09769301861524582, 0.316263139247894...
I’ve been trying to wrap my head around how to expose my domain objects to the client. Whether I’m using a rich client or I’m using the web, I want to use the MVP and repository patterns. What I’m trying to wrap my head around is how I expose my repository and model, which will be on the server. Is it even possible to...
[ 0.3466188311576843, 0.24706816673278809, -0.029248453676700592, 0.24531863629817963, -0.12519466876983643, -0.09014181792736053, 0.2480889856815338, 0.20631267130374908, -0.4907464385032654, -0.7661105394363403, -0.12323159724473953, 0.3841836750507355, -0.11310113966464996, 0.511219739913...
don’t want to have to keep loading the complex domain object from the database or passing it all over the wire every time I want to do an operation. Some complex logic might be that certain areas of the screen might be disabled or invisible based on the users permissions in combination with the state of the object. Val...
[ 0.7270001769065857, 0.22565437853336334, 0.20925289392471313, 0.08553867787122726, 0.1171412467956543, -0.27755531668663025, 0.39042147994041443, -0.06513581424951553, -0.36692941188812256, -0.4877084493637085, 0.1336214393377304, 0.6446729898452759, -0.3952717185020447, 0.2549256086349487...
free rein. You don’t have to expose your objects across service boundaries, so you can make them a rich as you would like. I’m trying to create an N-teir architecture that is rich and works when the client calling the model is on a different machine. You can expose your domain objects like any other object through REST...
[ 0.21868041157722473, -0.1436668485403061, 0.38330078125, 0.294611394405365, -0.06960619986057281, -0.2759622037410736, 0.3078359067440033, -0.03660165145993233, -0.22770914435386658, -0.393701434135437, -0.05615774914622307, 0.6267790794372559, -0.2482471764087677, 0.25813060998916626, 0...
single service call to use multiple repositories and perform various aggregations, the things you expose over any kind of web-service should be more or less complete results. The operations you expose on the service should not expose individual repositories but rather focus on meaningful operations that provide a given...
[ 0.5545352101325989, 0.21345196664333344, -0.0024478810373693705, 0.20695193111896515, 0.060725945979356766, -0.17369376122951508, 0.1915867030620575, 0.018089167773723602, -0.4204561412334442, -0.5651059746742249, -0.41596418619155884, 0.2805681526660919, -0.315722793340683, 0.087294489145...
When my script sleeps for 50sec my IDE locks up which is very annoying. I cant switch tabs, look through my source, type code, etc. It happens in pylde and pyscripter, i havent tried other IDEs. What can i do to fix this? i'm actually doing ``` for i in range(0, timeInSeconds): time.sleep(1) ``` hoping the IDE wil...
[ 0.40079760551452637, 0.2912113070487976, 0.45904767513275146, -0.009185227565467358, -0.13295701146125793, -0.18814192712306976, 0.6844720244407654, 0.026997674256563187, -0.02592690847814083, -1.0080071687698364, 0.1296728551387787, 0.5549647212028503, -0.16734561324119568, 0.118523828685...
control that behaviour, otherwise I think your only choice would be to change IDE. (Or, run your code from outside the IDE)
[ 0.5525597333908081, -0.22731198370456696, -0.011625334620475769, 0.0203882846981287, -0.011973507702350616, -0.14057360589504242, 0.4135967791080475, -0.11175534874200821, -0.1850646436214447, -0.2655285596847534, -0.0938095971941948, 0.6602531671524048, -0.5122538805007935, -0.07754859328...
In a Windows batch file, when you do the following: > `set myvar="c:\my music & videos"` the variable `myvar` is stored with the quotes included. Honestly I find that very stupid. The quotes are just to tell where the string begins and ends, not to be stored as part of the value itself. How can I prevent this fro...
[ 0.7495752573013306, 0.46224263310432434, 0.6750806570053101, -0.19116055965423584, -0.22509445250034332, -0.06656209379434586, 0.2728188633918762, -0.32035353779792786, -0.17735211551189423, -0.21025876700878143, -0.053675781935453415, 0.5788483023643494, -0.058209750801324844, 0.214720323...
under "Variable names can include Spaces"
[ 0.11969874799251556, 0.19704559445381165, -0.07832450419664383, 0.0403631329536438, 0.21677358448505402, -0.44268783926963806, -0.15922090411186218, 0.023210080340504646, -0.3204318881034851, -0.08980263769626617, -0.6853619813919067, 0.1714041382074356, -0.10618904232978821, 0.33758315443...