text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
is taken to be `1`. However, in C++ there are no tentative definitions, and a definition that does not include the size and does not contain an initializer that can tell the size is an invalid C++ program. For the reason why your code goes grazy, you are doing ``` MyCoords[0] = {0, 0} ``` Which the compiler will r...
[ -0.11134777963161469, 0.3112260103225708, 0.45202139019966125, -0.139628604054451, -0.12622720003128052, -0.3067607879638672, -0.11790036410093307, -0.1177499070763588, -0.409623920917511, -0.18217936158180237, -0.35991227626800537, 0.2552858293056488, -0.25570693612098694, 0.2741123735904...
(1999 version of C) introduced so-called compound literals. It allows you to write ``` MyCoords[0] = (coords){0, 0}; ``` And it will actually do what you want it to do - creating a right hand side value of type `coord` and assigns it to the left hand side. But you should just, already from a compatibility reason (ma...
[ -0.1491723656654358, 0.233547180891037, 0.3666967749595642, -0.07018563896417618, -0.25832659006118774, -0.4902479350566864, 0.10183896869421005, -0.009853010065853596, -0.08347813785076141, -0.09912984818220139, 0.01586328260600567, 0.6903464198112488, -0.5530163645744324, -0.136348515748...
I'm looking for a method of storing routing information in my web.config file in addition to the Global.asax class. The routes stored in the configuration file would need to take higher precedence than those added programmatically. I've done my searching, but the closest I can come up with is the RouteBuilder on Codep...
[ 0.3057507276535034, -0.030771585181355476, 0.5079327821731567, -0.10132087022066116, -0.02019030787050724, -0.20703545212745667, 0.22929994761943817, -0.022615237161517143, -0.24070316553115845, -0.9127830266952515, 0.36347681283950806, 0.2936147153377533, -0.5289608836174011, 0.2442918270...
be defined in C++. What you can do is to make it just a declaration by putting `extern` before it. ``` extern coords MyCoords[]; ``` Then, in the .cpp file that initializes it, you can then create (define) that array - beware you should do it at namespace scope, outside any function, of course: ``` coords MyCoords...
[ 0.26163581013679504, 0.03000904619693756, 0.33733320236206055, -0.09889719635248184, 0.2040824294090271, -0.17082583904266357, 0.03426872938871384, -0.21935322880744934, 0.047519031912088394, -0.40865495800971985, -0.2561628520488739, 0.7591723203659058, -0.6482877731323242, -0.14309051632...
local array and then initialize the vector using a copy of the elements of that array: ``` coords c[] = ....; MyCoords.insert(MyCoords.end(), c, c + sizeof c / sizeof *c); ``` Well, in C, it is slightly different than in C++. You *can* define an array whose dimension isn't known. What happens is that it's taken to b...
[ -0.10492336004972458, -0.17273057997226715, 0.23397429287433624, -0.21878618001937866, -0.0639970600605011, 0.010499808005988598, 0.06804916262626648, -0.06960152834653854, -0.1400499939918518, -0.5935097336769104, -0.2975076735019684, 0.5034770369529724, -0.3411738872528076, 0.05552229657...
size is taken to be `1`. However, in C++ there are no tentative definitions, and a definition that does not include the size and does not contain an initializer that can tell the size is an invalid C++ program. For the reason why your code goes grazy, you are doing ``` MyCoords[0] = {0, 0} ``` Which the compiler w...
[ -0.011209020391106606, 0.2941294014453888, 0.40628930926322937, -0.18298691511154175, -0.06682303547859192, -0.21741610765457153, -0.09921968728303909, -0.14251920580863953, -0.46232369542121887, -0.29371771216392517, -0.3144427239894867, 0.34975045919418335, -0.18038946390151978, 0.295350...
reason (1999 version of C) introduced so-called compound literals. It allows you to write ``` MyCoords[0] = (coords){0, 0}; ``` And it will actually do what you want it to do - creating a right hand side value of type `coord` and assigns it to the left hand side. But you should just, already from a compatibility rea...
[ 0.012678144499659538, 0.05617068335413933, 0.2593262195587158, -0.06442871689796448, -0.07834824919700623, -0.45906925201416016, 0.0777958407998085, -0.3334850072860718, -0.022822529077529907, -0.024523409083485603, 0.17142289876937866, 0.763531506061554, -0.5219876170158386, -0.3042353689...
Does anyone know which characters are allowed in a VS project name? Is there a reference somewhere? > * Cannot contain any of the following characters: / ? : & \ \* " < > | # % > * Cannot contain unicode characters > * Cannot contain surrogate characters > * Cannot be reserved names including 'CON', 'AUX', 'PRN', 'COM1...
[ 0.39330679178237915, 0.12863266468048096, 0.16019432246685028, 0.3085142970085144, 0.12676072120666504, -0.07152227312326431, 0.2734789550304413, 0.07389751821756363, -0.2889110743999481, -0.6409777402877808, -0.14100190997123718, 0.18968597054481506, -0.19033902883529663, 0.20523850619792...
the name | to get the error.
[ -0.0863184928894043, 0.10176240652799606, 0.07545682787895203, -0.06567975878715515, -0.13870997726917267, 0.03764840587973595, 0.5481752157211304, 0.1500069499015808, -0.11636901646852493, -0.29060330986976624, -0.32895752787590027, 0.3058851361274719, -0.25345614552497864, 0.331203311681...
I have a simple OpenGL:ES application running (it is a game). The game loads and presents the user with a "new game button" and then you are in the game. I'm using touchesBegan / touchesEnded to handle the touches. Then I take the coordinates and process them accordingly. I also have an NSTimer running at 30Hz that ca...
[ 0.06760752201080322, -0.06525649130344391, 0.960646390914917, -0.08491833508014679, 0.2579883635044098, 0.02930150181055069, 0.16872777044773102, 0.1509043425321579, -0.01636107638478279, -1.2626171112060547, 0.15245608985424042, 0.6220521330833435, 0.1561184674501419, 0.024161556735634804...
device and it appears that after I get the first touchesEnded event come in, the device is bombarded by touchesEnded calls. I NEVER get another touchesBegan call when this happens. If I press home and come back into the game, everything will usually work fine. Here is the code for my input, as it exists in my EAGLVie...
[ -0.450910747051239, -0.028190691024065018, 0.8125152587890625, -0.22934527695178986, 0.2953038811683655, -0.05952664837241173, 0.20579424500465393, -0.32796934247016907, -0.16969063878059387, -1.0743416547775269, -0.06964533030986786, 0.5465766191482544, -0.06416528671979904, 0.06309846043...
HandleTouchEvent:firstTouch]; } #pragma mark #pragma mark touchesEnded #pragma mark - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent*)event { UITouch *touch = [touches anyObject]; lastTouch = [touch locationInView:self]; [(MyGameAppDelegate*)[[UIApplication sharedApplication] delegate] HandleTouc...
[ -0.48849284648895264, -0.13662782311439514, 1.1095577478408813, -0.20564664900302887, -0.40179818868637085, 0.15107277035713196, 0.2301493138074875, -0.6644315719604492, -0.135844424366951, -0.7957888841629028, -0.14457686245441437, 0.28812891244888306, 0.020826172083616257, 0.189208567142...
glBindTexture(GL_TEXTURE_2D, [_textures[kTexture_Background] name]); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); [self resetGame]; } } } ``` And here is the code that configures the timer th...
[ -0.2319750189781189, 0.026468243449926376, 0.6682935953140259, -0.30726444721221924, -0.57489013671875, 0.009594973176717758, 0.4565403461456299, -0.293326735496521, -0.06176120787858963, -0.6163026690483093, -0.11402879655361176, 0.888144850730896, -0.4241526424884796, -0.0745624974370002...
second call to start the NSTimer \_timer = [NSTimer scheduledTimerWithTimeInterval:(1.0 / kRenderingFPS) target:self selector:@selector(renderScene) userInfo:nil repeats:YES]; This caused the program to be starved for mainline execution time as it was constantly servicing the timer routines. The PERFORMANCE ANALYZE...
[ -0.29971081018447876, -0.19916146993637085, 0.5688906311988831, -0.17495055496692657, 0.17661599814891815, -0.09709999710321426, 0.5194863677024841, -0.09455956518650055, -0.2426539659500122, -0.7139936685562134, 0.05759443715214729, 0.9158841967582703, -0.25788959860801697, -0.06769692897...
Writting an asp.net shopping cart. I am leveraging the session for state but I also want to store basic info in a cookie. This info would be the items / qty. I am aware of the cookie size limitations but here the question. Are there any sources of information on performance cost in terms of writting to a cookie as opp...
[ 0.5656875967979431, -0.27289077639579773, 0.3783062994480133, 0.3061172068119049, -0.34296974539756775, 0.36236572265625, 0.08044999092817307, -0.2538076639175415, -0.3472312092781067, -0.717765212059021, 0.23331740498542786, 0.6143237948417664, -0.023760374635457993, 0.09959451109170914, ...
using a cookie. In my experience writing a cookie is a lot less cost than making a database call but how much data do you want to store and does it break the functionality if the client blocks cookies? If you wish to persist session using a cookie, why not make an identifier cookie once when they arrive first time for...
[ 0.5171459913253784, -0.12532606720924377, -0.057598087936639786, 0.3010086119174957, -0.17669492959976196, -0.13192659616470337, 0.35003551840782166, -0.3790994882583618, -0.1818767786026001, -0.7612268924713135, 0.20744319260120392, 0.5623118877410889, -0.22290225327014923, 0.325197219848...
to the site later offer to restore their last basket from the DB by getting the cookie identifier.
[ 0.38613542914390564, 0.11224052309989929, 0.19870434701442719, 0.13916470110416412, -0.15933507680892944, -0.04897010326385498, 0.4208206534385681, 0.1694992482662201, -0.10549159348011017, -0.3668021857738495, 0.04507337883114815, 0.031454626470804214, 0.2272193282842636, 0.44232106208801...
I am not sure what is wrong with this (keep in mind I'm kinda sorta new to C++) I have this class: ``` Foo { string name; public: SetName(string); } string Foo::SetName(string name) { this->name = name; return this->name; }; ////////////////////////////////////////////// //This is where I am trying to r...
[ 0.16795958578586578, 0.3537212908267975, 0.38943028450012207, -0.11508989334106445, 0.05810052901506424, -0.438190758228302, 0.43354231119155884, -0.14768986403942108, 0.03141796216368675, -0.4627689719200134, -0.011671452783048153, 0.6029514074325562, -0.587227463722229, 0.286825150251388...
instead to create new Foo on the heap. The object on the stack will be freed when the function ends, so you are returning a pointer to an invalid place in memory. Here is the correct code. ``` Foo * ReturnFooPointer() { Foo * foo_ptr = new Foo(); return foo_ptr; } ``` Remember later to delete the pointer yo...
[ -0.1293206512928009, 0.2205917239189148, 0.5464453101158142, -0.40137091279029846, 0.3667744994163513, 0.1686287522315979, 0.2266923487186432, -0.289874792098999, -0.34123435616493225, -0.36552777886390686, -0.39775145053863525, 0.6139757037162781, -0.4231833815574646, -0.01792923919856548...
I am having trouble doing this: ``` CALayer *myLayer = myUIImageView.layer; //works, no error from compiler CGRect visRect = myLayer.visibleRect; //fat error, see below ``` The Error I get is: > error: request for member > 'visibleRect' in something not a > structure or union but the documentation says: > visib...
[ 0.4766305088996887, 0.15821979939937592, 0.38791388273239136, -0.18161596357822418, -0.17579594254493713, -0.10340358316898346, 0.5098239183425903, -0.37201207876205444, -0.10049360245466232, -0.8863815665245056, 0.16622582077980042, 0.4628700315952301, -0.40865686535835266, 0.150267466902...
just tried this on a brand new project and it worked as expected. The following is what I added to the ViewController. ``` #import <QuartzCore/QuartzCore.h> ``` ... ``` - (void)viewDidLoad { [super viewDidLoad]; CALayer *test_layer = self.view.layer; CGRect test_rect = test_layer.visibleRect; NSLog(...
[ 0.19566203653812408, -0.10474283993244171, 0.6482540369033813, -0.04719146341085434, -0.14395742118358612, 0.02534359320998192, 0.5489560961723328, -0.03544534742832184, -0.14682838320732117, -0.667486310005188, 0.0957527682185173, 0.6775879859924316, -0.013416999019682407, -0.068767800927...
I have a page with a mix of HTML and GWT components. I'd like to not make the content viewable to the user until the content has completely loading (perhaps showing a simple loading dialog during the process). What is the easiest way of achieving this? I use a PopupPanel with autohide set to false and modal set to tru...
[ 0.6718593239784241, -0.02934396080672741, 0.11341173201799393, 0.032104749232530594, -0.37519314885139465, -0.18352706730365753, 0.3571397364139557, 0.12863294780254364, -0.053163956850767136, -0.7481352090835571, -0.11631125211715698, 0.6626066565513611, -0.07061523199081421, -0.232217699...
I have a table like this: ``` A B C D E F G H I 10 23998 16755 27656 17659 19708 20328 19377 18925 20 37298 33368 53936 41421 44548 40756 40985 37294 ``` I use this command to plot ``` plot "C:/file.txt" using 1:2 with lines smooth bezier, "C:/file.txt" using 1:3 with lines smooth bezier, ... ``` However, all th...
[ -0.25237610936164856, 0.1505526751279831, 0.5531219840049744, -0.13377197086811066, -0.07481250911951065, 0.1830853670835495, -0.10622582584619522, -0.3312932252883911, -0.36474356055259705, -0.7391130328178406, -0.05724161118268967, 0.28555920720100403, -0.2955671548843384, 0.121515385806...
I know how to put the icon on each tab, that is no problem. I also ran across this : [Stack Overflow thread on pretty much same thing][1] I followed one of the links from that question and found [this][2] Pretty much, it said to use a selector defined in the XML, sure, did that. But there is no id associated w/ it so...
[ 0.23551999032497406, 0.12116038054227829, 0.2594183385372162, -0.10692737251520157, -0.25268206000328064, -0.1905892938375473, 0.049371108412742615, -0.1228523701429367, -0.4403436481952667, -0.5075096487998962, 0.2565978169441223, 0.5259655117988586, -0.27748724818229675, -0.0010719429701...
and obviously missing something. ``` <selector android:id="@+id/myselector" xmlns:android="http://schemas.android.com/apk/res/android"> <!-- Non focused states --> <item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:dr...
[ 0.17636466026306152, 0.1431942582130432, 0.36445915699005127, -0.14739015698432922, 0.004338165745139122, 0.32464686036109924, 0.15708456933498383, -0.3886684775352478, -0.007301937788724899, -0.48649096488952637, -0.22155031561851501, 0.5289775729179382, -0.3802802264690399, 0.14172774553...
--> <item android:state_focused="true" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/lightlogo" /> <item android:state_focused="true" android:state_selected="true" android:state_pressed="false" android:dra...
[ 0.0985320508480072, 0.14641617238521576, 0.49136659502983093, -0.34036126732826233, 0.06690169870853424, 0.7596151828765869, 0.2913741171360016, -0.7001777291297913, 0.26433801651000977, -0.558211624622345, -0.2402101457118988, 0.6644449830055237, -0.28175780177116394, -0.00640416936948895...
android:drawable="@drawable/lightlogo" /> </selector> ``` In my code, an example tab is generated using : ``` host.addTab(host.newTabSpec("three") .setIndicator("map",drawables) .setContent(new Intent(this, Map.class))); ``` Right now drawable is just a reference to a drawabl...
[ 0.03999488428235054, 0.08588214963674545, 0.73549884557724, -0.30712461471557617, -0.4391171634197235, 0.3082384765148163, -0.09829596430063248, -0.4030225872993469, 0.024148667231202126, -0.8895522356033325, 0.09301236271858215, 0.6675735712051392, -0.6170344352722168, -0.1537106931209564...
It presents a different drawable depending on the state of the View it's being assigned to. As a drawable, you should save it as an xml file within the `res/drawable` folder of your project (for example `tabselector.xml`). To use it for the Tabhost, you need to construct the TabActivity as you normally would (as shown...
[ -0.08633635193109512, -0.03540327772498131, 0.6576768755912781, -0.07057216018438339, -0.15935450792312622, 0.3021659851074219, 0.059544749557971954, -0.21839788556098938, 0.001080585177987814, -0.7418743371963501, -0.18239958584308624, 0.42651915550231934, -0.4408899247646332, 0.030511062...
point.
[ -0.18105046451091766, 0.25610360503196716, 0.27504202723503113, 0.024361124262213707, -0.0877666249871254, -0.013548895716667175, 0.10013508051633835, -0.08623300492763519, 0.057289429008960724, -0.764549732208252, -0.025551704689860344, 0.03397948667407036, 0.10939782112836838, 0.58926278...
Which is more important: The design of the database? Or the design of the application code? There is a lot of information out there about reusable code (from Carl Franklin at [dnrtv.com](http://dnrtv.com), [CSLA.net](http://csla.net), et. al.), but I don't see too much information about Database Design and its impact ...
[ 0.5362786650657654, 0.42188283801078796, -0.08545703440904617, 0.08869475871324539, -0.03349678963422775, -0.05072760209441185, -0.020859330892562866, -0.2932814955711365, -0.24264654517173767, -0.33741140365600586, -0.07004419714212418, 0.34656405448913574, -0.13785132765769958, 0.2408174...
is significantly harder than simply refactoring code which depends on a stable database. The reason is simple; refactoring your DB structure usually forces code changes; the reverse is rarely true. Quite simply, your code depends on your database more than your database depends on your code. (If this is not the case, ...
[ 0.5484495759010315, 0.43361562490463257, -0.006534290499985218, 0.13703598082065582, -0.26206937432289124, -0.26253676414489746, 0.43527206778526306, -0.25281310081481934, -0.05668657645583153, -0.5716570615768433, 0.20901112258434296, 0.7430576682090759, -0.2944779694080353, 0.45448312163...
interesting than coding interesting solutions. Essentially, to someone who likes to solve "tricky problems" (which tends to be the people who blog more), the coding side is more interesting than the fundamental design issues. And while the fundamental design issues aren't "sexy", they're extremely important (and Databa...
[ 0.32920995354652405, 0.12940533459186554, -0.16795311868190765, 0.5302370190620422, 0.03984670341014862, -0.34340545535087585, 0.07917293906211853, 0.4509095251560211, -0.05394129455089569, -0.5527338981628418, -0.1562240719795227, 0.572685182094574, -0.009869080036878586, -0.2390954345464...
Where can I get the 10.6 SDK for XCode? I have the beta of Snow Leopard, and I installed XCode off of the DVD, but it only installed the 10.5 and 10.4 SDKs. I need to build against 10.6 to verify a bug for Apple. [ADC Member Site](https://connect.apple.com). Login and select downloads. If you're a Premier or Select mem...
[ 0.7459238171577454, -0.06996969133615494, 0.07527230679988861, 0.09952238202095032, -0.08700866997241974, -0.3886399269104004, 0.505251944065094, -0.054614901542663574, -0.3782300651073456, -0.42352283000946045, -0.012317569926381111, 0.2921317517757416, -0.3875665068626404, 0.086824946105...
**EDIT** With one of the below answers, I was able to correct this issue for the rendering within a table. I'm still seeing this issue within my ListViews. I've tried this CSS for the ListView, but it has not corrected the issue. ``` /* FIX FOR CALENDAR IN TABLE */ .DateTime_Edit { white-space: nowrap; } .DateT...
[ -0.0927477478981018, -0.0804128348827362, 0.9704423546791077, -0.2331600785255432, 0.021731046959757805, 0.1314752697944641, 0.19863951206207275, -0.1067764014005661, -0.25838232040405273, -0.7635765671730042, -0.0752994492650032, 0.3806135654449463, -0.005196298006922007, 0.14459060132503...
margin: 0; } /* LISTVIEW, NOT WORKING */ .DateTime_Edit table.listview { border: solid 0 #FFFFFF; width: 0; height: 0; padding: 0; margin: 0; } .DateTime table.listview tr td { border: solid 0 #FFFFFF; padding: 0;
[ -0.2851640582084656, -0.39164701104164124, 1.1509428024291992, -0.022923972457647324, -0.001476966543123126, 0.11611947417259216, 0.20596784353256226, -0.2718626856803894, -0.10898520797491074, -0.4179188907146454, -0.15648609399795532, 0.44245126843452454, 0.00006966960791032761, 0.135337...
margin: 0; } ``` --- **WITHIN A LISTVIEW** [alt text http://www.imageunload.com/public/15867/CSSIssue2.png?no\_history](http://www.imageunload.com/public/15867/CSSIssue2.png?no_history) **WITHIN A TABLE** [alt text http://www.imageunload.com/public/15852/CSSIssue.jpg?no\_history](http://www.imageunload.c...
[ -0.28572317957878113, -0.1381678432226181, 0.6051485538482666, 0.019952181726694107, -0.3920896351337433, 0.21251551806926727, -0.13220760226249695, -0.4060976803302765, 0.011640091426670551, -0.5848105549812317, 0.132513627409935, 0.40449199080467224, 0.027721155434846878, -0.259092241525...
style for the table noted above, within the .css file itself. (order of precedence for css is where it appears in the .css file...) Having a specific style for that control would prevent other styles from doing the same thing in the future. I wrote this style, placed it at the end of the Site.css file and wrapped my e...
[ 0.08684802055358887, -0.17652377486228943, 0.8043652176856995, -0.18678642809391022, 0.09581536054611206, -0.01669546402990818, 0.09270920604467392, -0.10682523250579834, -0.20872659981250763, -0.6809435486793518, -0.0575689859688282, 0.19795095920562744, -0.17289292812347412, 0.0890713483...
margin: 0 !important; } .DateTime_Edit table tr td { border: solid 0 #FFFFFF !important; background-color: #FFFFFF !important; padding: 0 !important; margin: 0 !important; } ``` Edit: Added background-color to the 'td'. Added !important to everything (may not be needed) Hopefully the default Site.css...
[ -0.05793299153447151, -0.13195396959781647, 0.7824162840843201, -0.12038624286651611, 0.09272360801696777, -0.11710572987794876, 0.13359369337558746, -0.1146492287516594, -0.2154788076877594, -0.6444255709648132, -0.24348734319210052, 0.3932201564311981, -0.24459107220172882, 0.05367087572...
I'm working on giving a python server a GUI with tkinter by passing the Server's root instance to the Tkinter window. The problem is in keeping information in the labels up to date. For instance, the server has a Users list, containing the users that are logged on. It's simple enough to do this for an initial list: `...
[ 0.35252752900123596, 0.11150024086236954, 0.23293396830558777, -0.12625408172607422, -0.014159543439745903, -0.21172508597373962, 0.2644132971763611, 0.1609119474887848, -0.13624775409698486, -0.8078916072845459, 0.21775279939174652, 0.5624542832374573, -0.18845151364803314, 0.248179569840...
could use callbacks on the server instance. Install a callback that updates the label whenever the user-list changes. If you can't change the server code, you would need to poll the list for updates every few seconds. You could use the Tkinter event system to keep track of the updates. ``` def user_updater(self): ...
[ -0.046890441328287125, -0.22694365680217743, 0.6906785368919373, -0.11332111805677414, 0.03327307105064392, 0.14627233147621155, 0.36215245723724365, -0.20693664252758026, -0.23389534652233124, -0.7191011309623718, -0.14734652638435364, 0.548534631729126, -0.4161822497844696, 0.25760951638...
How do people make reusable databases that can be used for many products? For example,if we have a database designed for a school...Can it be easily modified to be given to a college? What is the way to create a database that can be used as a product to give solution to many customers with coding just once? Thanks A...
[ 0.973770022392273, 0.13849391043186188, -0.3524637520313263, 0.9124810695648193, 0.3380213677883148, -0.27896106243133545, -0.003971893340349197, 0.06721045076847076, -0.37270060181617737, -0.48525163531303406, 0.1781768649816513, 0.32540714740753174, 0.16046859323978424, 0.029046049341559...
schedule courses into rooms, whereas an elementary school needs to put students into grades and split grades into classrooms based on available space and teachers. Your design needs to take into consideration all of the requirements it is expected to solve and then implement those. The more generic you make the progra...
[ 0.7944383025169373, 0.1203036904335022, -0.2251763641834259, 0.3606862425804138, 0.22904229164123535, -0.013514995574951172, 0.14745931327342987, -0.04077015817165375, -0.1349010169506073, -0.8353965878486633, -0.2903904616832733, 0.27282148599624634, 0.04826943948864937, -0.02602478303015...
some schools will need to enforce one teacher per subject or classroom while another school might require multiple teachers. The more requirements you expect to meet, the more complex the application becomes. In industry big applications tend to be written so that they can be extended; a core set of functionality is p...
[ 0.5814468860626221, -0.06420638412237167, 0.04510464146733284, 0.36650368571281433, 0.23731355369091034, -0.30535662174224854, 0.4364219605922699, -0.0352938286960125, -0.28589898347854614, -0.629319965839386, -0.4973389208316803, 0.34927284717559814, -0.13926100730895996, -0.0649655237793...
you are not writing code only once. The most important step is to come up with a data model that is flexible enough to extend later on, but isn't so flexible that it is impossible to develop for. The hardest part is usually getting the cardinality of relationships correct. For example, you might say a class has one te...
[ 0.11456949263811111, 0.1418057531118393, -0.36964303255081177, 0.454779714345932, 0.012309529818594456, -0.039421070367097855, 0.5057443380355835, 0.11942607164382935, -0.2024032473564148, -0.8557637929916382, -0.09052611887454987, 0.5634275674819946, -0.09101900458335876, -0.1948120743036...
given enough programmer time.
[ 0.2581646144390106, -0.013781285844743252, 0.014980694279074669, 0.3158637285232544, -0.1238536462187767, -0.06350063532590866, 0.0691453143954277, 0.10383981466293335, -0.021108152344822884, -0.29566052556037903, 0.017294131219387054, 0.21304430067539215, 0.08364766836166382, -0.060801830...
I would like to add a 5-10 day weather forecast to a website. I'm having trouble finding a website that provides an embed code for forecasts. The few I've found look awful (circa 1990's). I was just wondering if there was a halfway clean-looking solution that I might be overlooking in my endless Google searches. Flash,...
[ 0.5583962202072144, 0.27836570143699646, 0.31692126393318176, 0.09569588303565979, 0.12605895102024078, -0.09308380633592606, 0.33480948209762573, 0.3857578933238983, -0.37865015864372253, -0.6851254105567932, 0.242767795920372, 0.2353983074426651, -0.1597423255443573, 0.14605440199375153,...
also mention that this weather app is on it's own page. So, bigger is better. If I don't find one big enough, I'll just implement it into a floating window (jQuery Overlay, to be exact) instead of it's own page. [Forecast.io](http://forecast.io/) offers a very slick weekly forecast [embed solution](http://blog.forecast...
[ 0.3825751841068268, -0.10787218809127808, 0.6964280009269714, 0.1648312211036682, -0.18613681197166443, 0.11390658468008041, 0.047023575752973557, 0.49631914496421814, -0.36610883474349976, -0.8774471282958984, 0.10766316950321198, 0.3695070147514343, 0.1871798187494278, -0.179953500628471...
In C# I can do this to expose a property via WCF ``` [ServiceContractAttribute()] public interface IFoo { int Length { [OperationContract()] get; [OperationContract()] set; } } ``` I have to do it that way since OperationContract decorates a method but not a property. I'm working with a legacy interfa...
[ 0.25907784700393677, 0.13789469003677368, 0.3394275903701782, -0.2448020726442337, -0.11221052706241608, -0.3926469385623932, 0.28118371963500977, -0.23997482657432556, -0.03952177241444588, -0.7037854194641113, -0.16666626930236816, 0.7339291572570801, -0.3819793462753296, 0.2152290642261...
does not allow you to specify attributes on the `get` or `set`.
[ 0.2005852907896042, 0.06939521431922913, -0.08472831547260284, 0.28806591033935547, 0.0903514176607132, -0.2209206223487854, 0.05710636451840401, 0.31714439392089844, 0.058521538972854614, -0.28959619998931885, -0.08509313315153122, 0.39357542991638184, -0.04229378700256348, 0.043100096285...
When showing my main window, I make a list of objects from linq-to-sql: ``` using (var context = new Data.TVShowDataContext()) { Shows = new ObservableCollection<Data.Show>(context.Shows); listShows.ItemsSource = Shows; } ``` Now, when I doubleclick an item in my list, I want to use the selected object i...
[ 0.13552239537239075, 0.0028889428358525038, 0.8218402862548828, -0.1642359495162964, -0.15382730960845947, 0.03584637865424156, 0.10356055945158005, -0.38622111082077026, -0.4901186525821686, -0.748025119304657, -0.2104819118976593, 0.35863637924194336, -0.41364040970802307, 0.216423586010...
as a result of binding a list to the shows season-list, and the season-list needs to be populated or something: ``` <ListBox Name="listSeasons" ItemsSource="{Binding Seasons}"/> ``` Now, what I would like to know, is how this is supposed be done? Would I need to make a new DataContext-object and retrieve the select...
[ 0.27006351947784424, -0.12681852281093597, 0.6108882427215576, 0.1356838494539261, -0.05301773175597191, -0.4665699303150177, 0.26468831300735474, -0.1093922108411789, -0.4621279239654541, -0.37796011567115784, -0.19012992084026337, 0.09208738058805466, -0.39486274123191833, 0.488394826650...
when trying to log-in at this [site](http://www.ucuzhizmet.com/) (user:polopolo,pass:samara) the result is a blank page. I know that the problem is with the sending of headers and the *ouput\_buffering* in the php.ini file. I had the same problem on another host but the problem was fixed when I changed *output\_bufferi...
[ 0.09965416043996811, 0.17041988670825958, 0.12245761603116989, -0.020676735788583755, 0.03742973133921623, 0.19904707372188568, 0.48477113246917725, 0.19825071096420288, -0.21357662975788116, -0.6457576155662537, -0.08228525519371033, 0.027320953086018562, -0.34198370575904846, 0.166652277...
this option as the whole system worked already on another server. But my colleague did some changes I was unaware of...The lesson learned: teamwork is important and don't let anybody do the thinking for you. Still it is a mystery to me how come after trying everything to display errors and especially the "Cannot modify...
[ -0.018915418535470963, -0.18745280802249908, 0.2874038815498352, 0.37647002935409546, -0.3488098084926605, -0.24386878311634064, 0.7558827996253967, -0.07250972092151642, -0.36624881625175476, -0.5275959968566895, -0.021975036710500717, 0.7175441980361938, -0.2099321335554123, -0.060741133...
if PHP has already begun outputting the *body* of the document, it cannot then output a header because they headers ended when the body started. Output buffering prevents PHP from outputting any part of the *body* of the document until the output buffer is flushed (or PHP exits). This allows you to output headers at a...
[ 0.15501408278942108, 0.03507399559020996, 0.32442018389701843, 0.06470425426959991, -0.24434466660022736, -0.22788669168949127, 0.5190867185592651, 0.05684879049658775, -0.42893287539482117, -0.31704097986221313, -0.053674016147851944, 0.43857061862945557, -0.3479846119880676, 0.1105472967...
If (and only if) you are viewing this on a restricted developers-only site (which you aren't), you may turn on display\_errors in your PHP configuration, which will display errors on the page as it is rendered. This is generally considered an unsafe setting on publicly accessible servers, because of the potential for a...
[ 0.28661003708839417, 0.27614977955818176, 0.1141144335269928, -0.035148363560438156, 0.18809369206428528, -0.3452940583229065, 0.6785480976104736, 0.3523913025856018, -0.22194233536720276, -0.6286405920982361, -0.2660001516342163, 0.4206361174583435, -0.24489906430244446, 0.257555425167083...
I have to make a handshake page in php that will take a querystring that is encrypted for a function in Java/JSP and decrypt it in PHP fir use in an application. I have found this to be a good starting point <http://propaso.com/blog/?cat=6> but it encrypts in PHP and decrypts in PHP, the reverse of what I need to do. ...
[ 0.06648916006088257, 0.3465607762336731, 0.6160159111022949, -0.08355933427810669, -0.1472460925579071, -0.45948541164398193, 0.319751501083374, -0.29623112082481384, -0.14751848578453064, -0.39505091309547424, 0.18583178520202637, 0.2644960582256317, -0.01607638970017433, 0.02768652141094...
of a good link to help me get this process reversed and encrypt in JSP and decrypt in PHP. Thanks You need to have an IV that is not predictable for a given message. Hard-coding the IV makes it predictable. So you need to devise some way to pass the IV with the ciphertext. The IV doesn't have to be kept secret though,...
[ 0.24600297212600708, -0.008925975300371647, 0.4632452726364136, 0.4249485731124878, -0.3310260474681854, -0.30067428946495056, 0.39133507013320923, -0.01446712389588356, -0.07476679235696793, -0.6399288773536682, 0.054428014904260635, 0.04614124819636345, -0.21319331228733063, -0.040907967...
from the data. The linked example completely ignores this, and that is an error. If a `CipherOutputStream` is used, a partial final block will be truncated silently from the ciphertext. If the `Cipher` object is used directly, an partial block will cause the `doFinal` method to raise an exception. Instead, use somethin...
[ -0.3030061423778534, -0.06930986791849136, 0.3910040557384491, -0.21931864321231842, -0.03694842755794525, 0.0630137026309967, 0.5110847353935242, -0.614861786365509, -0.32512134313583374, -0.6334577202796936, -0.40762564539909363, 0.14311392605304718, -0.32930994033813477, 0.0832114145159...
n = input.read(buf, 0, buf.length); if (n < 0) break; cos.write(buf, 0, n); } cos.flush(); ``` Where is the JSP receiving plaintext to be encrypted? How do you want the JSP to format its output (including the IV)?
[ -0.0651828944683075, -0.13517051935195923, 0.45791372656822205, -0.35338667035102844, 0.13335466384887695, -0.0046081990003585815, 0.15617555379867554, -0.25073114037513733, -0.3962070345878601, -0.28420892357826233, -0.18478381633758545, 0.45418158173561096, -0.5232479572296143, -0.109269...
I'm trying to write some code to convert data from a object type field (come from a DataSet) into it's destination (typed) fields. I'm doing (trying at least) it using dynamic conversion. It seems to work fine for strings, int, DateTime. But it doesn't work for unsigned types (ulong, uint). Below there's a simple cod...
[ 0.40526095032691956, -0.05104147642850876, 0.33110836148262024, -0.047256410121917725, 0.22807586193084717, 0.23280328512191772, 0.10972054302692413, 0.07948072999715805, 0.10507652908563614, -0.7361001372337341, 0.23595309257507324, 0.6020839214324951, -0.4711324870586395, 0.2349885404109...
target = (T) value; } public static void Main() { ulong ul; string str; int i; DateTime dt; object ul_o = (object) 2; object str_o = (object) "This is a string"; object i_o = (object)1;
[ -0.12164957076311111, -0.5070852041244507, 0.4733649492263794, -0.4961046278476715, 0.05064636841416359, 0.35936009883880615, 0.3524481952190399, 0.28832703828811646, -0.11580048501491547, -0.42725670337677, -0.5508109927177429, 0.3234584629535675, -0.5789418816566467, 0.4529241621494293, ...
object dt_o = (object) DateTime.Now; Console.WriteLine("Cast"); CastIt(ul_o, out ul); CastIt(str_o, out str); CastIt(i_o, out i); CastIt(dt_o, out dt); Console.WriteLine(ul); Console.WriteLine(str); Console.WriteLine(i); Console.WriteLine(dt.ToS...
[ -0.19323882460594177, -0.09043990820646286, 0.584373950958252, -0.3357104957103729, 0.1738358438014984, 0.29777124524116516, 0.32232803106307983, -0.1602417528629303, -0.16195447742938995, -0.7025806903839111, -0.2715027332305908, 0.4777912497520447, -0.41654253005981445, 0.395974755287170...
can't unbox from a boxed `int` to `ulong`. Two options: 1) Box a `ulong` instead: ``` object ul_o = (object) 2UL; ``` or ``` ulong tmp = 2; object ul_o = tmp; ``` 2) Make `CastIt<T>` use `Convert.ChangeType`: ``` public static void CastIt<T>(object value, out T target) { target = (T) Convert.ChangeType(val...
[ 0.12434621900320053, -0.11115992069244385, 0.3927389681339264, -0.4075457453727722, -0.08594273030757904, 0.1491927206516266, 0.142708420753479, -0.23695030808448792, 0.13946400582790375, -0.75632244348526, -0.1704721301794052, 0.5212257504463196, -0.7257041335105896, 0.09413671493530273, ...
I'm working with a legacy WebLogic application that contains a web-service application and a standalone, command-line application. Both need access to a common database and I would like to try and get the command-line application use a pooled connection to the web-server's JDBC connection. (The standalone application c...
[ 0.38468945026397705, 0.24930121004581451, -0.013768699020147324, -0.19228321313858032, 0.0333888903260231, -0.16635675728321075, -0.04817987605929375, -0.3118796944618225, -0.07871569693088531, -0.8920888304710388, 0.006754179019480944, 0.566476047039032, -0.2541150450706482, 0.23419715464...
"weblogic.jndi.WLInitialContextFactory"); ht.put(Context.PROVIDER_URL, "t3://localhost:7001"); ctx = new InitialContext(ht); DataSource ds = (DataSource) ctx.lookup ("dbOracle"); Connection conn = null; conn = ds.getConnection(); // <-- Exception raised here // conn = ds.getConnection(username...
[ -0.012854639440774918, -0.1815306395292282, 0.6887463927268982, -0.036847539246082306, 0.05696297064423561, -0.2616974413394928, 0.4765278995037079, -0.12227379530668259, -0.08744727820158005, -0.7565562725067139, -0.33172255754470825, 0.33889803290367126, -0.2208314836025238, 0.6047249436...
difficulties. - I got the idea for this from a [WebLogic app note](http://download.oracle.com/docs/cd/E12840_01/wls/docs103/jdbc/programming.html). Any ideas on what I have overlooked? **EDIT 1.1:** I'm seeing a "java.lang.ClassCastException: java.lang.Object" exception. **EDIT 2:** When I perform the following: ``...
[ -0.6109788417816162, 0.2577827274799347, 0.3331497609615326, 0.013582520186901093, 0.26299750804901123, -0.10404554009437561, 0.4306846857070923, -0.34952062368392944, -0.20240816473960876, -0.5987281799316406, 0.09511106461286545, 0.8737820386886597, -0.14641430974006653, -0.1356079876422...
'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1240411101452> <BEA-080003> <RuntimeException thrown by rmi server: weblogic.jdbc.common.internal.RmiDataSource.getConnection() java.lang.ClassCastException: java.lang.Object. java.lang.ClassCastException: java.lang.Object at weblogic.iiop.IIOPOutputSt...
[ -0.332813560962677, 0.3733638525009155, 0.1298302263021469, -0.06207814812660217, -0.20792655646800995, 0.21584951877593994, 0.5081913471221924, -0.6190975308418274, -0.33696097135543823, -0.47425562143325806, -0.25896716117858887, 0.3301248848438263, -0.2926453948020935, 0.284493178129196...
at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:59) at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:1016) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200) at weblogic.work.ExecuteThread.run(ExecuteThread.java:172) ``` This exception l...
[ 0.21251119673252106, 0.3567603528499603, 0.05193079262971878, -0.004343762993812561, -0.19530491530895233, 0.00783245638012886, 0.44487854838371277, -0.4425319731235504, -0.07852108776569366, -0.3665678799152374, 0.06365197896957397, 0.42953309416770935, -0.21536041796207428, -0.0895436182...
jar files in the classpath of the client. Your client is essentially speaking RMI to the WebLogic Server. The WebLogic Server connection pool you configured knows how to speak to Oracle. It shouldn't matter what JDBC driver you use in your connection pool.
[ 0.21029284596443176, 0.4350343644618988, 0.15445685386657715, -0.0705837830901146, -0.389577180147171, 0.04122116416692734, 0.2507316768169403, 0.04664956405758858, -0.0054639489389956, -0.3091455101966858, 0.3281353712081909, 0.7247211933135986, -0.24744278192520142, 0.33080461621284485, ...
I would like to write a program that sets an environment variable in an instance of the shell (cmd.exe) it was called from. The idea is that I could store some state in this variable and then use it again on a subsequent call. I know there are commands like SetEnvironmentVariable, but my understanding is that those o...
[ 0.5390036702156067, -0.29163363575935364, 0.13807465136051178, 0.03516313061118126, 0.06973863393068314, -0.07173722237348557, 0.024313637986779213, -0.04900470748543739, -0.14786572754383087, -0.3805629014968872, 0.0006312511977739632, 0.5249916911125183, -0.381144642829895, 0.25354245305...
don't have a way of returning a 2nd time to the originally pushed directory. A common techniques is the write an env file, that is then "call"ed from the script. ``` del env.var foo.exe ## writes to env.var call env.var ```
[ 0.2939221262931824, -0.06447859853506088, 0.5486533045768738, -0.12572404742240906, 0.2202252447605133, -0.21617217361927032, 0.29515156149864197, 0.05416107550263405, -0.24105611443519592, -0.5613555908203125, -0.43258950114250183, 0.6697664260864258, -0.3473737835884094, 0.06450577080249...
I have this problem to solve that I have no idea how to do it because there's only a few system calls we can use to solve it and I don't see how they are helpful for the situation. **The Exercise:** I have matrix with size [10][1000000] with integers and for each line I create a new process with fork(). The idea of...
[ 0.22090919315814972, 0.003513885661959648, 0.2537353038787842, -0.09405990689992905, 0.020994188264012337, 0.42408812046051025, 0.27587974071502686, -0.164383664727211, -0.19181407988071442, -0.5951271653175354, 0.32927417755126953, 0.06804104894399643, -0.1801415979862213, 0.1408312767744...
step is to print the total of occurrences of that number on each line **by order**. And in the end, the grand total of occurrences of that number. **The Calls:** The system calls I can use are described like this in the document for this exercise: * `pid_t fork(void);` * `void exit(int status);` * `pid_t wait(int ...
[ -0.13782520592212677, 0.06022953614592552, 0.5242992043495178, -0.1882486492395401, 0.11572682112455368, 0.27893489599227905, 0.4113854467868805, -0.267074316740036, -0.3062204122543335, -0.5653472542762756, 0.09512148052453995, 0.6046777963638306, -0.3295367360115051, 0.17835229635238647,...
a number? **Another Problem:** I don't exactly understand the difference between `wait()` and `waitpid()` and how/where to use one over the other. Besides the man pages, are there any more documentation where I can see code examples and such to understand them better? Or can someone explain me the differences and p...
[ 0.1502481997013092, -0.19458994269371033, -0.14170034229755402, 0.3420340120792389, 0.21289633214473724, 0.33892133831977844, 0.04106265306472778, -0.12813982367515564, -0.28268563747406006, -0.29103800654411316, 0.10273396223783493, 0.20811761915683746, 0.03908052295446396, 0.395050525665...
signed or unsigned by the program retrieving the data. You also get an 8 bit value identifying the signal number and core dump status of the terminated child. AFAIK, either the status or the signal bits are always zero (and often both - when the process exits successfully). If you don't know that the numbers to be ret...
[ 0.040447771549224854, 0.01792716793715954, 0.1608715057373047, 0.20874255895614624, 0.35755684971809387, 0.23683284223079681, 0.08793182671070099, -0.007828335277736187, -0.4132983982563019, -0.2684440016746521, -0.23137779533863068, -0.00044279173016548157, 0.034716349095106125, 0.2764841...
will be less than 255, or that overflows don't matter. Neither is satisfactory as a conclusion outside a homework exercise, but in the 'real world', you are not limited to just 4 system calls either. See also [Exit codes bigger than 255?](https://stackoverflow.com/questions/179565/exitcodes-bigger-than-255-possible). ...
[ -0.20997953414916992, -0.10513004660606384, 0.4951440393924713, -0.053946174681186676, 0.3651379644870758, 0.21275708079338074, 0.3306908905506134, -0.16871827840805054, -0.3254684805870056, -0.4990052878856659, -0.28000420331954956, 0.4602549076080322, -0.20418418943881989, 0.025306826457...
high 8 bits of the (16-bit) status word encode the exit status. See `<sys/wait.h>` and macros WIFEXITED(), WEXITSTATUS(), etc.
[ 0.016643764451146126, -0.1654597967863083, 0.2871079742908478, -0.3042472302913666, 0.5467005372047424, 0.5089678168296814, 0.08107240498065948, 0.04977733641862869, -0.08042579889297485, -0.3461053967475891, -0.14715969562530518, 0.30581262707710266, -0.023351134732365608, 0.1023606583476...
I have written an application that receives media files from a central server and plays those files according to a playlist. All works well. A client has contacted us and wants to use our application to play some audio files as presentations in a kiosk-style application. So far, so good, our application can handle this...
[ 0.7445734143257141, 0.34424644708633423, 0.4688445031642914, 0.33445969223976135, 0.18569648265838623, -0.17230981588363647, -0.14804989099502563, -0.036819085478782654, -0.19806629419326782, -0.6336236000061035, -0.0759531706571579, 0.8124606609344482, -0.060214150696992874, 0.14132529497...
audio file with the presentation in multiple languages, and each language in a different channel. We would then require a sound card that could decode each channel and output it on a different headphone socket. Thing is, while I'm think the theory is sound, I have absolutely no idea whether this is feasible and what wo...
[ 0.40527766942977905, 0.12572991847991943, 0.48551228642463684, 0.3640359938144684, 0.0017453102627769113, -0.29383352398872375, -0.06593605130910873, 0.04153450205922127, -0.03858015686273575, -0.4377477169036865, -0.31771591305732727, 0.8902536630630493, -0.1221000924706459, 0.25513201951...
hardware (USB sound card would be fine) that we could use to decode the stream. Thanks! The var `errorBox = function(...` needs to change to: ``` $.errorBox = function(... ``` then you can call it on the jquery object. Secondly, for clarity you may want to use `$('#eboxcontent')` instead of `document.getElementById...
[ 0.20357854664325714, -0.24667304754257202, 0.6405690908432007, -0.05705695599317551, 0.0027372557669878006, -0.19419601559638977, 0.301614373922348, 0.21437472105026245, -0.007527165114879608, -0.8681387305259705, 0.012944094836711884, 0.7760561108589172, 0.01157047413289547, 0.23418544232...
Given the following code: ``` // Connect to MySQL up here $example_query = $database->prepare('SELECT * FROM table2'); if ($example_query === false) die('prepare failed'); $query = $database->prepare('SELECT * FROM table1'); $query->execute(); while ($results = $query->fetch()) { $example_query = $database->prep...
[ 0.18951457738876343, 0.24239520728588104, 0.17459389567375183, -0.31857404112815857, -0.027287889271974564, 0.18908223509788513, 0.47521838545799255, -0.3153173327445984, -0.26044368743896484, -0.7473354935646057, -0.11218804121017456, 0.39457014203071594, -0.30204614996910095, 0.153069034...
MySQL has some kind of max\_connections setting that is set to 1 and a connection is kept open until the WHILE loop is completed so when I try to prepare a new query it says "nope too many connected already" and shits out. Any ideas? **EDIT:** Yes I know there's no need to do it twice, in my actual code it only gets ...
[ 0.24736608564853668, -0.025550847873091698, 0.4848650395870209, 0.09510533511638641, 0.025960147380828857, -0.22741684317588806, 0.3542608320713043, 0.27572986483573914, -0.36028963327407837, -0.9149400591850281, 0.026058731600642204, 0.3832501471042633, -0.22857195138931274, 0.11921993643...
code I gave is obviously very watered down to just illustrate the issue. I've kept this answer language agnostic since a language wasn't given. When the object is serialized, all the require information to rebuild it is encoded in way which can be retrieved. This typically includes the type of the object, as well as t...
[ 0.23466971516609192, 0.26194897294044495, -0.04585868865251541, 0.19270047545433044, -0.1389903575181961, 0.1733834147453308, 0.4328339397907257, -0.1974656879901886, -0.016829639673233032, -0.6833735108375549, -0.0964479073882103, 0.6351574659347534, -0.1511305272579193, 0.138191521167755...
object in memory without having to actually call the constructor. There are lots of little details which this doesn't explain, but this is the general idea of serialization/deserialization.
[ -0.1717362254858017, 0.05898056924343109, -0.1572006791830063, 0.3439764678478241, -0.02753792330622673, 0.05444067716598511, 0.18470105528831482, 0.06460568308830261, -0.31537312269210815, -0.4908354878425598, -0.0178702212870121, 0.09082696586847305, -0.23784160614013672, 0.6444777846336...
How do I mock a page request for a .net MVC page? Using RhinoMocks: ``` var httpContext = MockRepository.GenerateMock<HttpContextBase>(); var httpRequest = MockRepository.GenerateMock<HttpRequestBase>(); httpContext.Expect( c => c.Request ).Return( httpRequest ).Repeat.Any(); ... set up expectations on request.....
[ -0.0873613953590393, -0.015325047075748444, 0.7735199928283691, -0.03790688142180443, -0.15798108279705048, 0.24029098451137543, 0.5148929357528687, -0.531151533126831, -0.15865465998649597, -0.8389704823493958, 0.08163175731897354, 0.7390630841255188, -0.14992554485797882, 0.0917382985353...
controller ); ...invoke action, check assertions... httpContext.VerifyAllExpectations(); httpRequest.VerifyAllExpectations(); ```
[ 0.07447492331266403, -0.3926938772201538, 0.6821450591087341, 0.3947664201259613, 0.12724481523036957, -0.24689504504203796, 0.3299805819988251, -0.2063409388065338, -0.10809089243412018, -0.4110700488090515, -0.17199987173080444, 0.45974668860435486, -0.26128509640693665, 0.12556284666061...
How do I generate a default comment for cvs? I'd like every checkin comment to start with "Change #: " and be available for the user to edit. I know this can be done globally in the repository. Can it also be done as a single user on the client side? I am using command line cvs. We already have verification that the...
[ 0.5386627912521362, -0.05494736507534981, 0.3738565146923065, -0.07403086870908737, -0.041709672659635544, 0.016349701210856438, -0.013230944983661175, 0.10834412276744843, -0.26080620288848877, -0.5440155267715454, -0.06547725945711136, 0.86308354139328, -0.28756341338157654, 0.0721031650...
locally/client side? You can use the rcsinfo file to specify a template to use for the check in. See this [page](http://www.cvsnt.org/manual/html/rcsinfo.html) for details. This is done server side, so you need your template files on your server. Also, as noted above, you can override the template with your own che...
[ 0.5273210406303406, -0.21145246922969818, 0.3216004967689514, -0.1383524090051651, 0.08325449377298355, -0.4693813920021057, 0.13029137253761292, 0.19452722370624542, -0.3852795958518982, -0.6357036828994751, 0.004316269885748625, 0.8491212725639343, -0.2033558189868927, -0.150637239217758...
I'd like an iterator in C++ that can only iterate over elements of a specific type. In the following example, I want to iterate only on elements that are SubType instances. ``` vector<Type*> the_vector; the_vector.push_back(new Type(1)); the_vector.push_back(new SubType(2)); //SubType derives from Type the_vector.push...
[ -0.04173877090215683, -0.0991571769118309, 0.615999162197113, -0.2720700800418854, 0.08586420118808746, 0.3282112181186676, 0.06116874888539314, -0.5053794384002686, 0.027486713603138924, -0.7417694926261902, 0.043967194855213165, 0.3266237676143646, -0.6967824101448059, 0.2380873560905456...
item = dynamic_cast<SubType*>(*the_iterator); if( item != 0 ) ... //only SubType(2) and SubType(4) should be in this loop. ++the_iterator; } ```
[ -0.09330296516418457, -0.2899143397808075, 0.37719371914863586, -0.23227350413799286, 0.04743734002113342, 0.12003051489591599, 0.4568904936313629, -0.6011598110198975, -0.2859634757041931, -0.15518955886363983, -0.2735113799571991, 0.39815637469291687, -0.5943513512611389, 0.3576104938983...
Setting CLS compliance for an entire .NET assembly is possible. But how is it actually done? E.g. with Visual Studio 2008? Visual Studio adds a directive for the compiler, and the compiler checks the code for some more strict rules than in the native programming language. You can add the CLS compliant attribute to all...
[ 0.4407521188259125, 0.2478264719247818, 0.5467362403869629, -0.016457660123705864, -0.05026712641119957, -0.47411048412323, 0.13564532995224, -0.37941858172416687, -0.2100093960762024, -0.1551818698644638, -0.3536956310272217, 0.6294970512390137, -0.5026466846466064, -0.3195086121559143, ...
This may be a trivial question, but I will ask it anyway: **can updates in three or four tables in one database trigger updates to one or two tables in another database (in MS SQL 2005?)** I am happy to create any amount of T-SQL necessary, and I also have VS 2008 with C# ability but have never written a trigger like t...
[ 0.4720400869846344, 0.2718968391418457, 0.6085196733474731, -0.17181845009326935, 0.0007332582026720047, -0.12296821177005768, 0.4009076654911041, 0.015506312251091003, -0.3340918719768524, -0.5407551527023315, 0.09841129928827286, 0.7845776081085205, -0.13140635192394257, -0.1869401931762...
want the data update as part of the repository at all. They feel that it is external to the project and should be handled without interaction. Anyone have any suggestions on what to pursue? Links to ideas already out there would be fantastic. A trigger only kicks off when one table is updated,inserted or deleted. If y...
[ 0.53597491979599, -0.11351508647203445, 0.3395581543445587, 0.3985852003097534, 0.12032889574766159, -0.3238782584667206, -0.2655337154865265, -0.08002213388681412, -0.6025226712226868, -0.49543723464012146, 0.012942314147949219, 0.4342835545539856, 0.0031847506761550903, 0.209399580955505...
real time updates are not required, you could have a job that runs periodically to handle the changes needed. Not knowing exactly what you want to do, it is hard to say what is the best way to handle your particular situation. Whatever you do with the triggers, remember triggers operate on sets of data not one row at a...
[ 0.41962969303131104, -0.20442861318588257, 0.2607989013195038, 0.3413936495780945, 0.35362330079078674, -0.09165428578853607, 0.271885484457016, 0.012478225864470005, -0.25494518876075745, -0.6743464469909668, -0.035987988114356995, 0.8923069834709167, -0.47790345549583435, -0.371800065040...
hours at a time when someone needs to put in 3,000,000 new records for a new client.
[ 0.738554835319519, 0.27532994747161865, 0.11149385571479797, 0.23815570771694183, 0.3461460769176483, -0.2103746235370636, 0.20295178890228271, -0.004924131091684103, -0.5291378498077393, -0.19412380456924438, -0.07347802072763443, 0.4936029016971588, -0.021962590515613556, 0.2135272473096...
I want to be able to take, as input, a character pointer to a number in base 2 through 16 and as a second parameter, what base the number is in and then convert that to it's representation in base 2. The integer can be of arbitrary length. My solution now does what the atoi() function does, but I was curious purely out...
[ -0.004804710857570171, 0.3101968467235565, 0.28706714510917664, -0.016613883897662163, -0.11317618191242218, 0.6606095433235168, -0.10044817626476288, -0.3131854832172394, -0.1993602216243744, -0.4627765119075775, -0.05398709326982498, 0.35344722867012024, -0.07638572156429291, 0.104372233...
For instance: 0xF1E ---> (F = 1111) (1 = 0001) (E = 1110) ---> 111100011110 0766 ---> (7 = 111) (6 = 110) (6 = 110) ---> 111110110 1000 ---> ??? ---> 1111101000 However, my problem is that I want to do this look up table method for odd bases, like base 10. I know that I could write the algorithm like atoi does and ...
[ 0.21447807550430298, 0.1589852273464203, 0.12353678792715073, -0.12320902943611145, -0.34431707859039307, 0.1349538117647171, 0.23737087845802307, -0.41170555353164673, -0.24638313055038452, -0.5877460837364197, 0.11253088712692261, 0.24156349897384644, -0.35540130734443665, -0.09398622065...
anyone had any clever way to figure out how to generate a generic look up table for Base X -> Base 2. I know that for base 10, you can't just give it one digit at a time, so the solution would likely have to lookup a group of digits at a time. I am aware of the multiply and add solution but since these are arbitrary l...
[ 0.1461615115404129, 0.2202618271112442, 0.011044163256883621, 0.03410663455724716, -0.06612177938222885, 0.16471561789512634, 0.13353373110294342, -0.1707080453634262, -0.545488715171814, -0.5270012617111206, 0.044871650636196136, 0.36503326892852783, -0.31994113326072693, -0.1158229783177...
base `b` symbols returning `n` bits so that ``` n = log2(b) * m ``` for positive integers `b`, `n` and `m`. So if `b` is not a power of two, there will be no (simple) look up table solution. I do not think that there is a solution. The following example with base 10 illustrates why. ``` 65536 = 1 0000 0000 0000 00...
[ 0.221492737531662, 0.37447893619537354, 0.24370133876800537, -0.3809572160243988, -0.06616489589214325, 0.32423776388168335, 0.20287880301475525, -0.4065021872520447, -0.4267965853214264, -0.18732330203056335, -0.254467248916626, 0.12266900390386581, -0.2592954933643341, 0.3678062856197357...
number of bits. ``` 55535 = 0 1101 1000 1111 0000 ```
[ -0.08951503038406372, 0.3299899399280548, 0.23268219828605652, 0.03914773464202881, 0.0717240646481514, 0.42423802614212036, 0.2686302661895752, -0.12015607953071594, -0.39932310581207275, -0.21445243060588837, -0.1249958798289299, 0.006786946207284927, -0.20680513978004456, 0.481704354286...