text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
is a real Windows Service, you need to use an internal timer. Have a look at the System.Timers.Timer class. ``` public void OnLoad() { Timer timer = new Timer(); // Add event handler timer.Elapsed += WorkMethod; // Give us more control over the timer. timer.AutoReset = false; SetupTimer(time...
[ 0.20293299853801727, -0.3299050033092499, 0.536179780960083, -0.24245893955230713, 0.3202819526195526, 0.04333743080496788, 0.34539374709129333, -0.23829151690006256, -0.30462920665740967, -0.6448461413383484, -0.4597676694393158, 0.8906757235527039, -0.25079235434532166, 0.337793022394180...
here // Setup the timer for the next cycle. SetupTimer((Timer)sender); } private DateTime GetNextChecktime() { // Return the next time the service should run as a datetime. } ``` The reason for using SetupTimer instead of just using AutoReset = true which would repeat automatically is to synchronize the...
[ 0.5395532250404358, -0.0891488641500473, 0.7397712469100952, -0.12876346707344055, 0.24638903141021729, -0.38343602418899536, 0.5854842662811279, -0.002435002475976944, -0.10405126214027405, -0.9224569797515869, -0.1532801389694214, 0.969217836856842, -0.2556845247745514, -0.06915788352489...
first method. Unless you have more functionality in the service or need to maintain some persistent state it's simpler to just have an application which monitors the folder on startup and then exits. It's also easier to debug and less error prone as the scheduling is done by Windows.
[ 0.08060713857412338, -0.23002341389656067, 0.1089157983660698, 0.1512508988380432, 0.1777988225221634, -0.2864817678928375, 0.08225638419389725, 0.0016880036564543843, -0.19562630355358124, -0.720228374004364, -0.39445698261260986, 0.6987494826316833, -0.47768130898475647, 0.07153838872909...
I am working on a roguelike in my (very little) free time. Each level will basically be a few rectangular rooms connected together by paths. I want the paths between rooms to be natural-looking and windy, however. For example, I would not consider the following natural-looking: ``` B X ...
[ 0.5373048186302185, 0.07179122418165207, 0.12018859386444092, 0.1580386757850647, 0.03214247152209282, -0.22837947309017181, 0.3602047264575958, 0.1566663235425949, -0.13450144231319427, -0.7340934872627258, -0.0006339045939967036, -0.14623861014842987, -0.31127870082855225, 0.201052263379...
XX XX XX AXX ``` I really want something more like this: ``` B X XXXX
[ 0.6081658601760864, 0.4750210642814636, 0.11077580600976944, -0.09692227095365524, -0.49457603693008423, 0.08349496126174927, -0.18654312193393707, 0.32332494854927063, -0.11475129425525665, -0.41456690430641174, -0.15606480836868286, 0.3063642978668213, -0.24501411616802216, 0.10630156099...
X X X X AXXXXXXXX ``` These paths must satisfy a few properties: 1. I must be able to specify an area inside which they are bounded, 2. I must be able to parameterize how windy and lengthy they are, 3. The lines should not look like they started at
[ 0.6022839546203613, 0.007330387830734253, 0.6031255125999451, 0.11746189743280411, -0.26170265674591064, -0.25141096115112305, 0.49681422114372253, 0.11732951551675797, 0.11074760556221008, -0.5226535201072693, -0.18675068020820618, -0.04351010546088219, -0.4961065351963043, 0.016678564250...
one path and ended at the other. For example, the first example above looks as if it started at A and ended at B, because it basically changed directions repeatedly until it lined up with B and then just went straight there. I was hoping to use A\*, but honestly I have no idea what my heuristic would be. I have also c...
[ 0.46074727177619934, -0.19585749506950378, 0.07210347801446915, 0.26893049478530884, -0.03363673388957977, -0.05113353207707405, 0.28276124596595764, 0.1913113296031952, -0.27551427483558655, -0.548599362373352, 0.30545714497566223, 0.0501360148191452, -0.4447963535785675, 0.32254800200462...
"Dijkstra's algorithm," because I also need help with a good heuristic. Before you can figure out how to produce paths, you have to figure out a more precise way to state what you want. One way to do this is assign each path a score, then search for high-scoring paths. Here are some questions to consider: 1. Do you pr...
[ -0.2534223794937134, -0.3887999355792999, 0.2243548482656479, 0.3410186469554901, 0.03121259994804859, -0.11419135332107544, 0.31341415643692017, -0.35434630513191223, -0.18400996923446655, -0.6640443205833435, 0.21221227943897247, 0.08054565638303757, -0.3588803708553314, -0.2348692715167...
to reward steps that are off the main line. For example, on the path from A to B, consider each point, then take three steps and compute the direction between points. Now take the cosine of the difference of that direction and the direction straight from A to B. Negate it. Steps on the line count -1 against you, steps ...
[ -0.15095876157283783, -0.29841020703315735, 0.30997639894485474, 0.2392393946647644, -0.2620113790035248, 0.20721128582954407, 0.5546179413795471, -0.6208265423774719, -0.275743693113327, -0.42483091354370117, 0.09248896688222885, 0.5354128479957581, -0.030440744012594223, -0.2131139487028...
For each path, create a couple of small variations by hand. * Run your scoring function on all the paths. Keep fiddling until you get a scoring function that likes what *you* like. *Then* you'll be ready to think about search algorithms.
[ 0.4188810884952545, -0.14024068415164948, 0.3799659013748169, 0.31286728382110596, -0.002608208917081356, 0.12516604363918304, 0.11262000352144241, 0.009827379137277603, -0.4199705719947815, -0.9037287831306458, 0.2441277801990509, 0.2595972716808319, 0.02720574103295803, -0.13582442700862...
I have a program that I want each person to have their own tab, each tab would be identical, however I would like to remove a tab if I need to. ``` private void addPerson(string name) { TabPage tmp = new TabPage(); ListView tmpList = new ListView(); Button tmpButton = new Button(); this.SuspendLayout(); this...
[ 0.28939729928970337, -0.1890188306570053, 1.178770661354065, -0.3563014268875122, -0.12126708775758743, 0.26824429631233215, 0.22887128591537476, -0.5497830510139465, -0.4454127550125122, -0.32110387086868286, -0.07141909748315811, 0.4574781656265259, -0.6784135103225708, 0.132561102509498...
tmp.Text = name; tmp.UseVisualStyleBackColor = true; //add it to frame this.tabFrame.Controls.Add(tmp); tmpButton.ResumeLayout(true); tmpList.ResumeLayout(true); tmp.ResumeLayout(true); this.tabFrame.ResumeLayout(true); this.ResumeLayout(true); { ``` Name will be in the form "Scott Chamberlain" so I r...
[ 0.2234494686126709, 0.029360143467783928, 0.6104593873023987, -0.11749796569347382, 0.20256903767585754, 0.1546020209789276, 0.43951472640037537, -0.04211616516113281, -0.286780446767807, -0.45339235663414, -0.3077251613140106, 0.48757845163345337, -0.5426532030105591, 0.31530705094337463,...
a simple `TabPage` with a specific `Name` and adding it to `Controls` or `TabPages` works and so does removing it with `RemoveByKey` on both `Controls` and `TabPages`. Is there any code that might later change the name?
[ -0.1119605004787445, -0.038757700473070145, 0.285302996635437, 0.09824886918067932, 0.06097574904561043, -0.3334450423717499, 0.22962819039821625, 0.17529088258743286, -0.14139868319034576, -0.3826986253261566, -0.44740816950798035, 0.2130894660949707, -0.4832197427749634, 0.30705511569976...
I'm sure that there is nothing wrong with my project. Because I have tried it on my ex computer with visual studio 2005 and windows XP pro, and it works error-free. I can compile my project. There are no errors in build phase. But when I try to run my project it says "\*.exe has stopped working". Then I ran it on deb...
[ 0.20068706572055817, 0.40799129009246826, 0.4635172188282013, -0.19481506943702698, 0.23215533792972565, -0.10992700606584549, 0.563515305519104, 0.28538236021995544, 0.024559658020734787, -0.6193444132804871, -0.024044634774327278, 0.6656697988510132, -0.4905032515525818, 0.57075661420822...
Files\Microsoft Visual Studio 9.0\VC\include\GL and glut32.lib to C:\Program Files\Microsoft Visual Studio 9.0\VC\lib I'm not sure I follow your logic for using a join inside your subquery. You're doing the same work twice. You could try: ``` SELECT id FROM y WHERE field1 = 2 AND field2 = 3 AND field3 = 4 AND fiel...
[ 0.3211310803890228, 0.2214658558368683, 0.25528350472450256, -0.24261486530303955, 0.09862266480922699, 0.04270745813846588, 0.24900133907794952, -0.19541360437870026, -0.1206837147474289, -0.6021265387535095, -0.15931682288646698, 0.41535067558288574, -0.5006908178329468, -0.1557901799678...
I have a view containing a UIWebView which is loading a google map (so lots of javascript etc). The problem I have is that if the user hits the 'back' button on the nav bar before the web view has finished loading, it is not clear to me how to tidily tell the web view to stop loading and then release it, without gettin...
[ 0.23934726417064667, 0.10392855852842331, 0.45510852336883545, -0.1862325668334961, -0.15350455045700073, -0.2400641143321991, 0.22281964123249054, 0.03793768584728241, -0.1494235247373581, -0.7744274139404297, 0.13084816932678223, 0.38121339678764343, -0.2541608512401581, 0.48571598529815...
my viewWillDisappear handler I have this ``` map.delegate=nil; [self.map stopLoading]; ``` this seems to handle most cases OK, as nil'ing the delegate stops it sending the didFailLoadWithError to my view controller. However if I release the web view in my view's dealloc method, sometimes (intermittently) I will stil...
[ 0.24130456149578094, -0.04624909162521362, 0.7905453443527222, -0.30950048565864563, -0.38264691829681396, -0.1812524050474167, 0.3219377398490906, -0.18321159482002258, -0.13552749156951904, -0.7160118222236633, -0.079233318567276, 0.6656969785690308, -0.18933916091918945, 0.2504855692386...
release the webview within viewWillDisappear, then I see messages like this: ``` /SourceCache/WebCore/WebCore-351.9.42/wak/WKWindow.c:250 WKWindowIsSuspendedWindow: NULL window. ``` Possibly related, I sometimes (again totally intermittent) get an ugly heisenbug where clicking the back button on some other view's n...
[ 0.21214601397514343, 0.0012870411155745387, 0.8745892643928528, -0.15951421856880188, -0.23101691901683807, -0.210175558924675, 0.2774254083633423, 0.012209786102175713, -0.16706939041614532, -0.5546545386314392, -0.3210996389389038, 0.7552329897880554, -0.08436113595962524, 0.518452465534...
didn't pop corrrectly, just not to the root view. The only way out is to quit the app). At other times the same sequence of pushes and pops on the same views works fine. This particular one is driving me nuts. I think it may be related to the view disappearing before the web view is loaded, i.e. in this case I suspect...
[ 0.4311954081058502, 0.16697822511196136, 0.5349946618080139, -0.062315281480550766, 0.12633290886878967, -0.1453642100095749, 0.492404967546463, 0.3132475018501282, -0.21301884949207306, -0.17963406443595886, 0.0394585095345974, 0.4338383078575134, -0.36039477586746216, 0.34558629989624023...
settings when I can't watch it with gdb :-). From my debug runs, I don't think I'm over-releasing anything. And I only seem to be able to trigger it if at some point I have hit the view that has the web view, and it doesn't happen immediately after that. A variation on this should fix both the leaking and zombie issues...
[ 0.3849053680896759, -0.23344078660011292, 0.7460944652557373, -0.2995055317878723, -0.030114522203803062, -0.2950122058391571, 0.4762684106826782, -0.10271493345499039, -0.24301064014434814, -0.6998671293258667, -0.3416399359703064, 0.8398700952529907, -0.27255409955978394, 0.2090817540884...
(void)webViewDidFinishLoad:(UIWebView *)webView { [self release]; } - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { [self release]; } - (void)viewWillDisappear { if ([webView isLoading]) [webView stopLoading]; } - (void)dealloc { [webView setDelegate:nil]; [web...
[ 0.3823368549346924, -0.11561505496501923, 0.6577147841453552, -0.28336524963378906, -0.11054709553718567, -0.06956618279218674, 0.21980895102024078, -0.20141270756721497, -0.2526434659957886, -0.2850174605846405, -0.34426289796829224, 0.8285112380981445, -0.1781015545129776, 0.263763874769...
I'm developing a Cocoa (Touch) app and there's certain data (like own device information and a list of locations) that I have to persist between different views and controllers. I thought of storing it as instance variables in my App Delegate, but addressing the delegate is quite cumbersome (no joy typing `[[[UIAppli...
[ 0.14277620613574982, 0.21538624167442322, 0.16192412376403809, 0.2079254686832428, 0.21205593645572662, 0.18702664971351624, 0.11819823086261749, 0.07458385080099106, -0.3232909142971039, -0.6031417846679688, 0.05343803018331528, 0.2536848485469818, -0.2873491644859314, 0.12785910069942474...
thought of going one step further and introducing aliases for my singleton classes, so instead of `[State sharedState]`, why not rename the class to `_State` and make a single instance of it called State? ``` #define FOO [[[UIApplication sharedApplication] delegate] locations] ```
[ 0.1767754703760147, -0.03136332333087921, -0.23515668511390686, 0.028307221829891205, 0.06346677988767624, -0.08399044722318649, 0.4878603219985962, 0.06580111384391785, -0.02423294074833393, -0.6100621819496155, 0.1535223424434662, 0.21630245447158813, -0.41273194551467896, 0.630358815193...
**Update**: Please file this under bad ideas. You don't get anything for free in life and here is certainly proof. A simple idea gone bad. It is definitely something to learn from however. Lazy programming challenge. If I pass a function that 50-50 returns true or false for the qsort's comparision function I think tha...
[ 0.30645689368247986, 0.10826440900564194, 0.3793580234050751, -0.0356670543551445, 0.12208528071641922, 0.07017502188682556, 0.5997834801673889, -0.3596261441707611, -0.25645560026168823, -0.7405809760093689, 0.1000315472483635, 0.5565950870513916, -0.3178497552871704, 0.404368132352829, ...
*/ } ``` ... ``` int comp_nums(const int *num1, const int *num2) { float frand = (float) (rand()) / ((float) (RAND_MAX+1.0)); /* 3 */ if (frand >= 0.5f) return GREATER_THAN; return LESS_THAN; } ``` Any pitfalls I need to look for? Is it possible in fewer lines through swapping or ...
[ 0.27167144417762756, -0.03607732057571411, 0.27820825576782227, -0.14260029792785645, -0.007718304637819529, 0.185726597905159, 0.38338160514831543, -0.26498934626579285, -0.08728934079408646, -0.6962317228317261, 0.0646604523062706, 0.48026102781295776, -0.1482936143875122, 0.226506397128...
You have no real idea of what a qsort with a random comparison will do and whether all combinations are equally likely. This is the most important criterion for a shuffle: all combinations must be equally likely. Biased results equal big trouble. There's no way to prove that in your example. You should implement the [...
[ 0.16888298094272614, -0.3416801989078522, -0.0852581039071083, 0.10963034629821777, 0.1254059076309204, -0.22119148075580597, -0.1342334747314453, -0.4846237897872925, -0.20442262291908264, -0.7225807905197144, 0.1281520426273346, 0.33578866720199585, -0.4780557155609131, 0.121527649462223...
I've implemented a View Controller, and I'm trying to do some very basic initialization in initWithNibFile...which I understand to be the designated initializer for View Controller objects. I've tried to put breakpoints on the code, and have put very simple NSLog statements into it as well. Regardless...I'm not seeing...
[ 0.0748271718621254, -0.024937331676483154, 0.42178812623023987, -0.07463933527469635, -0.05220070853829384, -0.03759780526161194, 0.3361029624938965, -0.04704005643725395, -0.10703850537538528, -0.8231999278068542, -0.01967354491353035, 0.5998166799545288, -0.1021571010351181, 0.1207976862...
And the app successfully loads up the View, and I can invoke a ButtonClick method I've coded and connected to this same View Controller. Any suggestions would be appreciated. TC Bad idea. I mean really bad. Your solution gives an **unpredictable** result, not a **random** result and there is a **big** difference. Yo...
[ 0.5236207842826843, -0.29093247652053833, 0.26554346084594727, 0.24541553854942322, 0.07989919185638428, 0.14619657397270203, 0.021759172901511192, -0.1536235809326172, -0.37300920486450195, -0.5399236679077148, 0.11141117662191391, 0.4701603353023529, -0.29843857884407043, 0.0631888806819...
implement the [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher-Yates_shuffle) (otherwise known as the Knuth shuffle).
[ 0.12893448770046234, -0.17098867893218994, 0.14329595863819122, 0.06760606169700623, 0.2840072214603424, -0.31266605854034424, -0.2703627645969391, -0.5430810451507568, 0.039008572697639465, -0.7191519737243652, 0.021315917372703552, 0.3224318027496338, -0.5338637232780457, -0.145828634500...
In every large application there is an ADMIN section. In such cases, when not using ZF, I usually put all the admin stuff in a separate directory with extra security measures (like adding .htaccess based authentication and/or a second login etc). This also makes it pretty obvious in the file tree what file is what. ...
[ 0.17591215670108795, 0.46109819412231445, 0.48077675700187683, 0.0063879345543682575, 0.050764694809913635, -0.4103918969631195, 0.12375853955745697, -0.04913786053657532, 0.05404632166028023, -0.6000190377235413, -0.2527567744255066, 0.49519920349121094, -0.2663809061050415, 0.16904088854...
I guess the simplest was just using a controller for all the admin stuff, but I have too much of that. So I have several admin controllers side by side with the regular app controllers. It makes a mess in my controllers directory - which controller is admin and which is not? I generally create a separate "application" ...
[ 0.09613847732543945, 0.36575937271118164, 0.4810277223587036, 0.4562144875526428, 0.29024961590766907, 0.16308096051216125, -0.1609238237142563, -0.08308172225952148, -0.1537778675556183, -0.6423225402832031, -0.13255023956298828, 0.4881224036216736, -0.34727731347084045, 0.111532174050807...
actual application in numerous other ways. Therefore I think it's a good idea to separate the source code entirely. Some of the source code can still be common, though. Examples include library folders and database models. This approach also gives you larger flexibility when deciding where the admin utility should be ...
[ 0.5781614184379578, 0.09642579406499863, 0.28546252846717834, 0.36460617184638977, -0.053905416280031204, -0.20440466701984406, 0.11893614381551743, -0.14183510839939117, 0.0489092692732811, -0.48724043369293213, -0.10331865400075912, 0.7368901968002319, -0.2444978803396225, -0.04778586700...
Using PyObjC, is it possible to import a Python module, call a function and get the result as (say) a NSString? For example, doing the equivalent of the following Python code: ``` import mymodule result = mymodule.mymethod() ``` ..in pseudo-ObjC: ``` PyModule *mypymod = [PyImport module:@"mymodule"]; NSString *res...
[ 0.1231919527053833, 0.05913032218813896, 0.38289809226989746, 0.12069906294345856, -0.04495125636458397, 0.2155134528875351, -0.043138425797224045, -0.2691223919391632, -0.10404160618782043, -0.3100332021713257, -0.30423176288604736, 0.16566239297389984, -0.4216378331184387, 0.102191939949...
code should work (although it's probably not the best code ever written..) ``` #include <Python.h> int main(){ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; Py_Initialize(); // import urllib PyObject *mymodule = PyImport_Import(PyString_FromString("urllib")); // thefunc = urllib.url...
[ 0.3399779796600342, -0.025988705456256866, 0.3726787865161896, -0.16796700656414032, 0.24265457689762115, -0.062318354845047, 0.42809078097343445, -0.286161333322525, -0.08394581079483032, -0.4424721598625183, -0.4325968027114868, 0.48960983753204346, -0.5530755519866943, -0.12594982981681...
PyTuple_SetItem(theargs, 0, PyString_FromString("http://google.com")); // f = thefunc.__call__(*theargs) PyObject *f = PyObject_CallObject(thefunc, theargs); // read = f.read PyObject *read = PyObject_GetAttrString(f, "read"); // result = read.__call__() PyObject *resu...
[ -0.2660130560398102, -0.14750897884368896, 0.8068287372589111, -0.029076749458909035, 0.11535611003637314, 0.19203220307826996, 0.26899734139442444, -0.4077076017856598, -0.22693662345409393, -0.41258612275123596, -0.732282280921936, 0.43632686138153076, -0.5898951888084412, -0.22789166867...
// print result printf("Result of call: %s", PyString_AsString(result)); } } [pool release]; } ``` Also [this tutorial](http://www.linuxjournal.com/article/8497) is good
[ -0.17782597243785858, 0.08051316440105438, 0.13317783176898956, -0.18738622963428497, 0.17871074378490448, -0.4831383526325226, -0.05597240477800369, 0.12462320178747177, -0.015671730041503906, -0.4649792015552521, -0.39186081290245056, 0.9645895957946777, -0.18830661475658417, -0.23608891...
I have an xsd that looks like this (snippet): ``` <xs:complexType name="IDType"> <xs:choice minOccurs="1" maxOccurs="2"> <xs:element name="FileID" minOccurs="0" maxOccurs="1" type="an..35" /> <xs:element name="IDNumber1" minOccurs="0" maxOccurs="1" type="an..35" /> <xs:element name="Number" minOccu...
[ -0.06245147064328194, 0.042608119547367096, 0.5962952375411987, -0.011020960286259651, -0.04318835213780403, 0.16370604932308197, -0.12390930950641632, -0.39383450150489807, 0.013993017375469208, -0.9368542432785034, 0.16011567413806915, 0.3702338635921478, -0.24759608507156372, 0.25645446...
<xs:element name="BIN" minOccurs="0" maxOccurs="1" type="an..35" /> <xs:element name="Mutual" minOccurs="0" maxOccurs="1" type="an..35" /> </xs:choice> </xs:complexType> <xs:simpleType name="an..35"> <xs:restriction base="an"> <xs:maxLength value="35" /> </xs:restriction> </xs:simpleType> <xs:si...
[ 0.41905808448791504, -0.2054423689842224, 0.4026210606098175, -0.04639315605163574, 0.17625854909420013, -0.12108553200960159, 0.12028548121452332, -0.4902742803096771, -0.006542316637933254, -0.4976872205734253, 0.009988507255911827, 0.36411619186401367, -0.5777817964553833, -0.0134308543...
@XmlElementRef(name = "IDNumber1", namespace = "http://www.surescripts.com/messaging", type = JAXBElement.class), @XmlElementRef(name = "Number", namespace = "http://www.surescripts.com/messaging", type = JAXBElement.class), @XmlElementRef(name = "PNumber", namespace = "http://www.surescripts.com/messag...
[ 0.4516231119632721, -0.14086906611919403, 0.5232409238815308, -0.0414828322827816, -0.07672612369060516, 0.024867581203579903, -0.12670844793319702, -0.27274733781814575, -0.10113787651062012, -0.535729169845581, -0.28031983971595764, 0.33031532168388367, -0.3171331286430359, -0.3539896011...
@XmlElementRef(name = "BIN", namespace = "http://www.surescripts.com/messaging", type = JAXBElement.class), @XmlElementRef(name = "Mutual", namespace = "http://www.surescripts.com/messaging", type = JAXBElement.class) }) protected List<JAXBElement<String>> fileID; /** * Gets the value of the fi...
[ 0.5144783854484558, -0.2591576874256134, 0.4463876783847809, 0.08953551948070526, 0.17004814743995667, -0.13690227270126343, 0.07259870320558548, -0.4416763186454773, -0.07983844727277756, -0.5499311089515686, -0.22333917021751404, 0.5588988661766052, -0.4268297255039215, -0.02266989275813...
list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the fileID property. * * <p> * For example, to add a new item, do as follows: * <pre> * getFileID().add(newItem); * </pre> * * * <p> * Objects of the
[ 0.22251003980636597, -0.39279699325561523, 0.5064772963523865, 0.0012570344842970371, 0.1964619755744934, 0.024776814505457878, 0.0017368519911542535, -0.397093266248703, -0.11008430272340775, -0.9585274457931519, -0.22282001376152039, 0.38336026668548584, -0.38892024755477905, 0.157919734...
following type(s) are allowed in the list * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} * {@link JAXBElement }{@code ...
[ 0.05186834558844566, 0.16496172547340393, 0.48718851804733276, -0.20745645463466644, -0.33483198285102844, 0.0017324986401945353, 0.09573390334844589, -0.40997788310050964, -0.023988960310816765, -0.7036580443382263, -0.33573585748672485, 0.30475369095802307, -0.4154850244522095, 0.2530048...
String }{@code >} * {@link JAXBElement }{@code <}{@link String }{@code >} */ public List<JAXBElement<String>> getFileID() { if (fileID == null) { fileID = new ArrayList<JAXBElement<String>>(); } return this.fileID; } ``` Why is the class generated like this and si...
[ 0.009930046275258064, -0.17909322679042816, 0.22524413466453552, -0.16737669706344604, -0.025953056290745735, -0.015890616923570633, 0.19693000614643097, -0.4606618583202362, -0.14303578436374664, -0.5948125720024109, -0.27634596824645996, 0.47870755195617676, -0.4750325083732605, 0.166461...
I want to create something? How can I have it generate classes for each of the types that simply represent string or something like that? Thanks in advance, Ian This code is generated because your complex type, IDType, contains a choice with a maxOccurrence greater than one, here: <xs:choice minOccurs="1" maxOccurs...
[ 0.6699056029319763, -0.20739471912384033, 0.014734037220478058, 0.05979413911700249, 0.12735460698604584, 0.05310877412557602, 0.1717655509710312, -0.15465252101421356, 0.31088367104530334, -0.7412274479866028, 0.003911399748176336, 0.40038713812828064, -0.33767107129096985, 0.213774427771...
to the list unambiguously by providing: * The data object (in your case a String since all restrictions from String are represented as a Java String) * A `JAXBElement` whose `getValue()` method returns the string The JAXB specification contains fairly detailed and reasonably complex explanations of how to deal with r...
[ 0.40283894538879395, -0.2284436672925949, 0.29295608401298523, -0.0059507363475859165, 0.032835956662893295, -0.05637597292661667, 0.11340729147195816, -0.5787836909294128, -0.3535233438014984, -0.4672416150569916, -0.21031838655471802, 0.49206778407096863, -0.49569225311279297, -0.1175101...
contain a single choice of the elements; Then make IDType contain a sequence of Wrapper elements with minOccurs = 1 and maxOccurs = 2. * Create yourself some helper functions to quickly create the JAXBElements. JAXB puts a Factory class in your target package that can help you - for example, it contains references to t...
[ 0.5834887623786926, -0.20224052667617798, -0.12000055611133575, -0.022473769262433052, 0.1712713986635208, 0.1372954100370407, 0.20117409527301788, -0.2507286071777344, 0.30107173323631287, -0.6982883214950562, -0.09799912571907043, 0.4385542869567871, -0.4040776491165161, -0.3356720805168...
I would like to try out a code in Microsoft Visual C# Express Edition and I'm getting this error: > The type or namespace name 'Properties' does not exist in the namespace 'EducationalSuite.Core' (are you missing an assembly reference?) I right click the Reference but I didn't find the "Properties" either the "Educat...
[ 0.2263573855161667, -0.007413088344037533, 0.21457622945308685, 0.252589613199234, 0.18321093916893005, 0.09444035589694977, 0.09542736411094666, -0.22897060215473175, -0.10429215431213379, -0.7377344965934753, -0.11685705184936523, 0.4139144718647003, -0.20403434336185455, 0.3241881430149...
new List<Rectangle>(); protected int lastHeight = 0; private Image imageFile = null; protected List<Rectangle> hotspots = new List<Rectangle>(); protected Dictionary<int, string> textItems = new Dictionary<int, string>(); protected Dictionary<int, FileInfo> audioItems = new Dict...
[ 0.01930072158575058, -0.4964052140712738, 0.7306085228919983, -0.19253987073898315, 0.23759548366069794, 0.15392012894153595, -0.08027438819408417, -0.4366114139556885, -0.3729001581668854, -0.662450909614563, -0.487454891204834, 0.8046326637268066, -0.3422141969203949, 0.04692370444536209...
countItemsLeft = 6; protected int countItemsRight = 6; protected int imageOffsetTop = 0; protected int imageOffsetBottom = 0; protected bool paintHotSpots = false, colorSwitch = false, paintItemLabels = false; protected Timer timer = new Timer(); public event RectangleIt...
[ 0.2630313038825989, -0.2820734977722168, 0.5066871047019958, -0.11376415938138962, 0.0013626322615891695, 0.13453365862369537, 0.33481061458587646, -0.359774649143219, -0.3157581090927124, -0.1966668963432312, -0.37552231550216675, 0.6092141270637512, -0.39264190196990967, 0.05557679384946...
event RectangleItemClickedDelegate QuestionItemRightClick; protected void OnHotspotClick(Rectangle rect, int index) { if (HotspotClick != null) { HotspotClick(this.RectangleToScreen(rect), index); } } protected void OnQuestionItemRigh...
[ -0.2847214639186859, -0.6050589680671692, 0.19889910519123077, 0.10170292854309082, 0.06990958750247955, -0.12140484899282455, 0.003544874954968691, -0.11678815633058548, -0.13417118787765503, -0.34372052550315857, -0.3634970188140869, 0.5838773250579834, -0.22575341165065765, 0.0383958443...
index) { if (QuestionItemRightClick != null) { QuestionItemRightClick(this.RectangleToScreen(rect), index); } } protected void OnQuestionItemClick(Rectangle rect, int index) {
[ -0.17862576246261597, -0.27918997406959534, 0.36219602823257446, -0.011961697600781918, 0.22802771627902985, -0.11235900968313217, 0.20331531763076782, -0.29727619886398315, 0.016814542934298515, -0.2553580701351166, -0.4312824308872223, 0.5261815190315247, -0.1998501569032669, 0.279958546...
if (QuestionItemClick != null) { QuestionItemClick(this.RectangleToScreen(rect), index); } } public GeoSafariItem() { this.imageFile = EducationalSuite.Core.Properties.Resources.singlepixel;
[ 0.08154547214508057, -0.26143693923950195, 0.34254467487335205, 0.2533967196941376, 0.1655622273683548, -0.20341801643371582, 0.08934865146875381, -0.0608145035803318, 0.010059669613838196, -0.7586328387260437, -0.4783868193626404, 0.7069197297096252, -0.34432879090309143, 0.09832802414894...
timer.Interval = 100; timer.Tick += new EventHandler(timer_Tick); timer.Enabled = true; this.MouseUp += new MouseEventHandler(GeoSafariItem_MouseUp); // Activates double buffering SetStyle(ControlStyles.UserPaint, true); SetStyle(ControlStyles.Al...
[ 0.10216369479894638, -0.563145101070404, 0.6635645627975464, -0.246151402592659, 0.3210023045539856, 0.17755559086799622, 0.3915627896785736, -0.4295673668384552, -0.2764725685119629, -0.5475673079490662, -0.20071721076965332, 0.500909149646759, -0.5292597413063049, -0.13842223584651947, ...
true); SetStyle(ControlStyles.ResizeRedraw, true); this.DoubleBuffered = true; //InitializeComponent(); } public void SetItemText(int index, string text) { if (string.IsNullOrEmpty(text)) {
[ 0.34394338726997375, -0.49994638562202454, 0.6599067449569702, -0.3060227036476135, 0.5023953914642334, -0.10128678381443024, 0.5214062929153442, -0.5127909779548645, 0.09054061770439148, -0.2973460853099823, -0.3442394435405731, 0.6578634977340698, -0.5230641961097717, -0.1460590958595276...
if (this.textItems.ContainsKey(index)) textItems.Remove(index); } else { this.textItems[index] = text; } if (PaintItemLabels)
[ -0.029068494215607643, -0.09473034739494324, 0.5075932741165161, -0.5823401808738708, 0.3240903317928314, 0.17944613099098206, 0.5266614556312561, -0.276836633682251, -0.043487295508384705, -0.5025545954704285, -0.17519421875476837, 0.7426342964172363, -0.6994442939758301, 0.05215799063444...
{ this.Invalidate(); } } public string GetItemText(int index) { if (this.textItems.ContainsKey(index)) { return this.textItems[index];
[ -0.3010479807853699, 0.0224901270121336, 0.5129627585411072, -0.15603965520858765, 0.18996773660182953, -0.11810001730918884, 0.44872593879699707, -0.19964899122714996, 0.048619791865348816, -0.44226616621017456, -0.5491183400154114, 0.6851961612701416, -0.5057995915412903, 0.2657196223735...
} else { return string.Empty; } } public void SetItemAudio(int index, FileInfo file) {
[ 0.35227862000465393, -0.5418209433555603, 0.018917135894298553, 0.1675194501876831, 0.5008996725082397, -0.1896960288286209, 0.1711633950471878, -0.17195600271224976, 0.013676072470843792, -0.43809542059898376, -0.3079928457736969, 0.5903971791267395, -0.6320157051086426, -0.07643162459135...
if ((file == null) && !file.Exists) { if (this.audioItems.ContainsKey(index)) audioItems.Remove(index); } else { this.audioItems[index] = file;
[ 0.0488661453127861, 0.14285366237163544, 0.5711970329284668, -0.2098880410194397, 0.4206188917160034, -0.47846540808677673, 0.21510706841945648, -0.5209087133407593, 0.24526430666446686, -0.3788905739784241, -0.48184773325920105, 0.8267166614532471, -0.594231903553009, 0.6884955763816833, ...
} } public FileInfo GetItemAudio(int index) { if (this.audioItems.ContainsKey(index)) { return this.audioItems[index]; } else
[ 0.27523091435432434, -0.10588762164115906, 0.5399394631385803, 0.07350438088178635, 0.614093542098999, -0.443229079246521, 0.2521992623806, -0.2833104729652405, 0.14443974196910858, -0.5006656646728516, -0.34164145588874817, 1.113000512123108, -0.590546190738678, 0.49199458956718445, 0.0...
{ return null; } } #region Recording Regions bool isRecording = false; int recordingIndex = 0; Point recordTopLeft = Point.Empty; Point
[ -0.3034229576587677, -0.38893234729766846, 0.49354732036590576, 0.12208743393421173, 0.38996702432632446, -0.3464488089084625, 0.3385270833969116, -0.0246010422706604, -0.3752107322216034, -0.5787309408187866, -0.32337814569473267, 0.08947454392910004, -0.032732121646404266, 0.548461019992...
recordBottomRight = Point.Empty; List<Rectangle> recordedRectangles = new List<Rectangle>(); public void StartRecording() { isRecording = true; recordingIndex = 0; selectedIndex = 0; recordedRectangles.Clear(); this.MouseUp +=
[ 0.2694205939769745, -0.3461814224720001, 0.22224688529968262, -0.06639757752418518, 0.6490353345870972, -0.03877690061926842, 0.2593815326690674, -0.2332887202501297, -0.44059228897094727, -0.2567041516304016, -0.22015023231506348, 0.4215199649333954, -0.3368058204650879, 0.213963150978088...
new MouseEventHandler(GeoSafariItemRecord_MouseUp); this.Invalidate(); } public List<Rectangle> FinishRecording() { isRecording = false; this.MouseUp -= new MouseEventHandler(GeoSafariItemRecord_MouseUp); this.Invalidate(); this.Hots...
[ -0.4943077564239502, 0.0017256145365536213, 0.5579577684402466, -0.3099038600921631, 0.3730258345603943, -0.15059396624565125, 0.23068469762802124, -0.1801885962486267, -0.28540852665901184, -0.6470013856887817, -0.6618751287460327, 0.4074179530143738, -0.7002518177032471, 0.12821123003959...
foreach (Rectangle r in recordedRectangles) { this.Hotspots.Add(r); } return recordedRectangles; } private void GeoSafariItemRecord_MouseUp(object sender, MouseEventArgs e) {
[ -0.15614239871501923, -0.04350293427705765, 0.14349663257598877, -0.21587784588336945, 0.5745019316673279, 0.20555643737316132, 0.335660845041275, -0.049092814326286316, -0.324466347694397, -0.4385940730571747, -0.31342101097106934, 0.5282055139541626, -0.5682680606842041, 0.06683675199747...
if (isRecording) { Rectangle size = SizeRect; double ratio = (double)imageFile.Height / (double)size.Height; if (recordTopLeft == Point.Empty) {
[ 0.1636623740196228, -0.22475312650203705, 0.6266205310821533, -0.09297050535678864, 0.19585168361663818, -0.0020285106729716063, -0.12181873619556427, -0.3412915766239166, -0.4841458201408386, -0.5190026760101318, -0.2957347631454468, 0.4953577220439911, -0.1889849752187729, -0.04183488339...
recordTopLeft = new Point( (int)(((double)e.Location.X - (double)size.Left) * ratio), (int)(((double)e.Location.Y - (double)size.Top) * ratio) );
[ 0.08178325742483139, -0.15581722557544708, 0.815074622631073, 0.011900655925273895, 0.47092095017433167, -0.004063152242451906, -0.20826219022274017, -0.1791035681962967, -0.589238166809082, -0.26261648535728455, -0.35096535086631775, 0.17647895216941833, -0.06697894632816315, 0.3917192518...
} else { recordBottomRight = new Point( (int)(((double)e.Location.X - (double)size.Left) * ratio),
[ 0.4066818058490753, -0.25085797905921936, 0.32367897033691406, 0.0003020959557034075, 0.591916024684906, 0.03350715711712837, 0.13380470871925354, -0.1931716650724411, -0.3787442445755005, -0.2232954353094101, -0.029900990426540375, 0.4282580018043518, -0.20298081636428833, 0.3500004112720...
(int)(((double)e.Location.Y - (double)size.Top) * ratio) ); Rectangle r = new Rectangle(recordTopLeft, new Size(recordBottomRight.X - recordTopLeft.X, recordBottomRight.Y - recordTopLeft.Y));
[ -0.1392519772052765, -0.26370877027511597, 0.7989886403083801, -0.02342521958053112, 0.19541530311107635, 0.15546798706054688, -0.27103039622306824, -0.534338116645813, -0.6892378330230713, -0.23300623893737793, -0.4703778028488159, 0.2716805934906006, -0.10946986079216003, 0.3895227015018...
this.recordedRectangles.Add(r); recordingIndex++; selectedIndex++; recordTopLeft = Point.Empty; recordBottomRight = Point.Empty;
[ -0.022426845505833626, -0.2596656382083893, 0.17495346069335938, 0.03316152095794678, 0.5396102666854858, 0.0376976802945137, 0.09629460424184799, -0.24781841039657593, -0.41366785764694214, -0.250396192073822, -0.26090431213378906, 0.12960252165794373, -0.32285547256469727, 0.253350675106...
} } this.Invalidate(); } #endregion void timer_Tick(object sender, EventArgs e) { colorSwitch = !colorSwitch;
[ 0.23804643750190735, -0.5228571891784668, 0.23210106790065765, -0.1933719515800476, 0.34321337938308716, -0.07674166560173035, 0.6017634272575378, -0.20921693742275238, -0.10345211625099182, -0.6518340706825256, -0.02759305201470852, 0.47394707798957825, -0.5614833831787109, 0.264186084270...
if (lastRectangle.Width > 0) { this.Invalidate(lastRectangle); } else { this.Invalidate(); }
[ -0.24402055144309998, -0.47587424516677856, 0.5339993238449097, -0.4215444028377533, 0.3894159495830536, -0.14112430810928345, 0.2814806401729584, -0.23992566764354706, -0.28918692469596863, -0.5889166593551636, -0.47439712285995483, 0.5026967525482178, -0.07942599803209305, 0.218323171138...
} private Rectangle SizeRect { get { int rw, rh, cw = (this.Width - 42),
[ 0.03857491910457611, -0.4019787609577179, 0.5099471807479858, -0.06858794391155243, 0.00986424833536148, 0.24048790335655212, 0.15189801156520844, -0.3778720796108246, -0.30450740456581116, -0.6893508434295654, -0.4019473195075989, 0.45108598470687866, -0.16715490818023682, 0.1837024986743...
ch = (this.Height - 2), ox = 21, oy = 1; rw = cw; rh = ch; double imageRatio = (double)imageFile.Width / (double)imageFile.Height;
[ 0.40622949600219727, 0.0858675092458725, 0.8831021785736084, -0.1533960998058319, -0.3688696324825287, 0.30725952982902527, 0.04163394123315811, -0.40597110986709595, -0.25193533301353455, -0.42875465750694275, -0.24651770293712616, 0.5209111571311951, 0.21448573470115662, 0.17609030008316...
double controlRatio = (double)cw / (double)ch; if (controlRatio > imageRatio) { rw = (int)Math.Round((double)rh * imageRatio); ox += Math.Abs(rw
[ 0.3496869206428528, -0.18819837272167206, 0.5489027500152588, -0.12785358726978302, -0.24104613065719604, 0.17031654715538025, 0.3546907603740692, -0.6941632032394409, -0.16407111287117004, -0.05838068947196007, -0.11419807374477386, 0.7128773331642151, -0.25109347701072693, -0.11784062534...
- cw) / 2; } else if (controlRatio < imageRatio) { rh = (int)Math.Round((double)rw / imageRatio); oy
[ 0.17850425839424133, -0.21519143879413605, 0.6453163623809814, -0.06951864063739777, -0.0825854018330574, 0.2402813732624054, 0.4796864092350006, -0.5812386870384216, -0.09345487505197525, -0.155363529920578, -0.4178240895271301, 0.6497276425361633, -0.010684560984373093, 0.125347077846527...
+= Math.Abs(rh - ch) / 2; } return new Rectangle(ox, oy, rw, rh); } } void GeoSafariItem_MouseUp(object sender, MouseEventArgs e) { Rectangle size = SizeRect;
[ -0.20864471793174744, -0.1759471595287323, 0.5751734375953674, -0.31964126229286194, 0.018214132636785507, 0.2028977870941162, 0.17077209055423737, -0.4379994869232178, -0.3749810457229614, -0.555168867111206, -0.3482162356376648, 0.4853454530239105, -0.44703009724617004, 0.054764010012149...
for (int i = 0; i < hotspots.Count; i++) { Rectangle hotspot = hotspots[i]; double ratio = (double)size.Height / (double)imageFile.Height; Rectangle adjustedRectange = new Rectangle(
[ 0.37941354513168335, -0.47649040818214417, 0.8145712018013, -0.08770839124917984, 0.046036045998334885, 0.3504400849342346, 0.04496103152632713, -0.7203332781791687, -0.28671300411224365, -0.587092399597168, -0.15964867174625397, 0.6227603554725647, -0.61380934715271, -0.16425852477550507,...
size.Left + (int)(hotspot.X * ratio), size.Top + (int)(hotspot.Y * ratio), (int)(hotspot.Width * ratio), (int)(hotspot.Height * ratio)); if (adjustedRectange.Contains(e.Location))
[ 0.2590009868144989, -0.37485837936401367, 0.826264500617981, 0.06482020020484924, 0.388816773891449, -0.04700344428420067, -0.12033996731042862, -0.16828349232673645, -0.09663499891757965, -0.6269562244415283, -0.677823007106781, 0.3349560499191284, -0.2566238343715668, -0.0458023324608802...
{ OnHotspotClick(hotspot, i); return; } } for (int i = 0;
[ -0.09563324600458145, -0.34522080421447754, 0.22011907398700714, -0.06475348770618439, 0.48509880900382996, -0.07567999511957169, 0.3966101408004761, -0.17841093242168427, -0.018037334084510803, -0.4004823565483093, -0.3666895627975464, 0.4889780282974243, -0.6985255479812622, 0.0227594468...
i < lastFlashingItems.Count; i++) { if (lastFlashingItems[i].Contains(e.Location)) { if (e.Button == MouseButtons.Right) OnQuestionItemRightClick(lastFlashingItems[i], i);
[ -0.3496120572090149, -0.3037082552909851, 0.6935777068138123, -0.40013712644577026, 0.6549751162528992, -0.08710174262523651, 0.417765736579895, -0.49182945489883423, 0.04990893974900246, -0.6414419412612915, -0.38651522994041443, 0.36274996399879456, -0.271425724029541, 0.3362005949020386...
else OnQuestionItemClick(lastFlashingItems[i], i); return; } } }
[ -0.22252684831619263, -0.21000511944293976, 0.33423203229904175, -0.3105253279209137, 0.3692816495895386, -0.17327910661697388, 0.4717738628387451, -0.2200063169002533, 0.019855588674545288, -0.5083130598068237, -0.2518182098865509, 0.6935326457023621, -0.131241112947464, 0.198902145028114...
public List<Rectangle> Hotspots { get { return hotspots; } } public Image ImageFile { get { return imageFile; } set {
[ 0.1721552312374115, -0.31834203004837036, 0.398926705121994, 0.20154275000095367, -0.09741803258657455, 0.11228743195533752, -0.34087640047073364, 0.06810479611158371, -0.2633781433105469, -0.9090539813041687, -0.46384987235069275, 0.6409881711006165, -0.756170392036438, -0.265698999166488...
imageFile = value; lastFlashingItems.Clear(); this.Invalidate(); } } public int SelectedIndex { get { return
[ 0.2798944115638733, -0.6157278418540955, 0.4261198341846466, 0.08680180460214615, 0.14869597554206848, 0.1132318452000618, 0.1669996678829193, -0.17443889379501343, 0.009553252719342709, -0.7103847861289978, -0.19310785830020905, 0.5654176473617554, -0.4696418046951294, 0.11885349452495575...
selectedIndex; } set { selectedIndex = value; this.Invalidate(); } } public int CountItemsLeft { get { return countItemsLeft; } set {
[ -0.10389196872711182, -0.5660660266876221, 0.17013177275657654, -0.06465858966112137, 0.19684600830078125, 0.06554924696683884, 0.037164609879255295, -0.5092990398406982, -0.08085624873638153, -0.22980031371116638, -0.23144584894180298, 0.3612091839313507, -0.43014955520629883, 0.116355098...
countItemsLeft = value; lastFlashingItems.Clear(); this.Invalidate(); } } public int CountItemsRight { get { return countItemsRight; }
[ -0.13255265355110168, -0.46222424507141113, 0.6429635882377625, -0.11976085603237152, 0.3085784912109375, -0.26844123005867004, 0.3331259787082672, -0.3211619555950165, -0.20853984355926514, -0.1294202208518982, -0.2773021459579468, 0.6731312274932861, -0.290774941444397, 0.106246873736381...
set { countItemsRight = value; lastFlashingItems.Clear(); this.Invalidate(); } } public int ImageOffsetTop
[ 0.2678110897541046, -0.4386688470840454, 0.6848958134651184, -0.1390083283185959, 0.0994134247303009, -0.002202365081757307, 0.23597674071788788, -0.34325239062309265, -0.24935953319072723, -0.43923479318618774, -0.30157721042633057, 0.6346690058708191, -0.6191128492355347, 0.0699433311820...
{ get { return imageOffsetTop; } set { imageOffsetTop = value; lastFlashingItems.Clear(); this.Invalidate();
[ -0.10302973538637161, -0.46590861678123474, 0.7164265513420105, -0.20813587307929993, 0.09547492116689682, 0.03978799656033516, 0.4561425745487213, -0.03875971958041191, -0.10974787920713425, -0.7044100761413574, -0.4407971501350403, 0.5905144810676575, -0.41906341910362244, -0.02206558734...
} } public int ImageOffsetBottom { get { return imageOffsetBottom; } set { imageOffsetBottom = value;
[ 0.12818728387355804, -0.3972857594490051, 0.43669822812080383, -0.015117483213543892, -0.02514449506998062, 0.06045914441347122, 0.2793317139148712, -0.029994606971740723, 0.03564636409282684, -0.6472859382629395, -0.2956598401069641, 0.7530509233474731, -0.5885050296783447, -0.09586682170...
lastFlashingItems.Clear(); this.Invalidate(); } } public bool PaintHotSpots { get { return paintHotSpots; } set { paintHotSpots = value; this.Invalidate(); } }
[ -0.012106546200811863, -0.28463828563690186, 0.43515950441360474, -0.34534403681755066, 0.1466078907251358, 0.1478269398212433, 0.4584657847881317, -0.1359817385673523, -0.17243146896362305, -0.593132734298706, -0.44911378622055054, 0.6157730221748352, -0.3626411259174347, -0.0271615404635...
public bool PaintItemLabels { get { return paintItemLabels; } set { paintItemLabels = value; this.Invalidate(); } } protected override void OnPaint(PaintEventArgs pe) { Graphics g = pe.Graphics;
[ 0.2112911194562912, -0.10064012557268143, 0.4133017063140869, -0.33095329999923706, -0.10966329276561737, 0.4421178102493286, 0.5935835838317871, -0.24710781872272491, 0.11367415636777878, -0.761310338973999, -0.2516811192035675, 0.6834651827812195, -0.4627392888069153, -0.0176653005182743...
string itemText; SizeF sizeItemText; double topOffset = imageOffsetTop; double bottomOffset = imageOffsetBottom; double topOffsetPct = (double)topOffset / (double)imageFile.Height; double bottomOffsetPct = (double)bottomOffset / (double)imageFile.Height; ...
[ -0.12844790518283844, -0.4343578517436981, 0.6153856515884399, -0.0036839719396084547, -0.4205203652381897, 0.1989058256149292, 0.22308455407619476, -0.24394674599170685, -0.418781578540802, -0.28582963347435, -0.7655782699584961, 0.38029149174690247, -0.4037926495075226, -0.03047720156610...
SolidBrush brush = new SolidBrush(this.BackColor); g.FillRectangle(brush, 0, 0, this.Width - 1, this.Height - 1); g.FillRectangle(Brushes.Ivory, size.X - 25, size.Y, size.Width + 50, size.Height); g.DrawRectangle(Pens.DarkKhaki, size.X - 25, size.Y - 1, size.Width + 50, size.Height ...
[ -0.23864299058914185, -0.4177195727825165, 0.7644274234771729, 0.2618256211280823, -0.4360494017601013, 0.5899530649185181, 0.1446118801832199, -0.6257287263870239, -0.26441481709480286, -0.2989118993282318, -0.21122007071971893, 0.3796450197696686, -0.29185372591018677, 0.343509703874588,...
Rectangle rect, rectItemText; Brush selectedColor = (colorSwitch ? Brushes.Crimson : Brushes.Red); topOffset = topOffsetPct * size.Height; bottomOffset = bottomOffsetPct * size.Height; int tmpHeight = (size.Height - (int)topOffset - (int)bottomOffset) / countItemsLeft; ...
[ 0.19247537851333618, -0.6446614861488342, 0.8512005805969238, -0.07859931141138077, 0.007191089913249016, 0.20528556406497955, 0.17626969516277313, -0.9187243580818176, -0.3659888505935669, -0.37644708156585693, -0.1855151653289795, 0.4674186408519745, -0.311474472284317, 0.251409471035003...
0) { lastHeight = size.Height; lastFlashingItems.Clear(); int actualIndex = 0; for (int i = 0; i < countItemsLeft; i++)
[ 0.13887327909469604, -0.31455227732658386, 0.845827043056488, -0.34242957830429077, 0.41470828652381897, 0.04667571559548378, 0.4725489020347595, -0.4325498044490814, -0.08511937409639359, -0.2791033685207367, -0.23698361217975616, 0.32610148191452026, 0.002602483844384551, 0.1361502856016...
{ int yy = size.Y + (tmpHeight * i) + (int)topOffset; int xx = size.X - 18; rect = new Rectangle(xx, yy, 16, 8);
[ 0.17960421741008759, -0.3168223798274994, 0.6204202771186829, -0.19897522032260895, 0.024165473878383636, 0.37461844086647034, 0.15008151531219482, -0.3588312864303589, -0.401880145072937, -0.45878922939300537, -0.7467907667160034, 0.4334809184074402, -0.3315398395061493, 0.103667430579662...
this.lastFlashingItems.Add(rect); g.FillRectangle((actualIndex == selectedIndex ? selectedColor : Brushes.Khaki), rect); g.DrawRectangle(Pens.DarkKhaki, rect); if (actualIndex == selectedIndex) {
[ 0.1898079812526703, -0.5857871174812317, 0.35309576988220215, 0.016038183122873306, 0.13965186476707458, 0.3898116946220398, -0.005557810887694359, -0.5370733737945557, 0.08250325918197632, -0.5165761113166809, -0.12443921715021133, 0.321827232837677, -0.37212154269218445, 0.25896680355072...
lastRectangle = rect; } itemText = this.GetItemText(actualIndex); if (PaintItemLabels && !string.IsNullOrEmpty(itemText))
[ -0.08378720283508301, -0.5951568484306335, 0.6878697872161865, -0.2910178303718567, 0.3088776767253876, 0.3400161564350128, 0.5550509095191956, -0.1952727884054184, -0.12116105109453201, -0.5151285529136658, -0.2728952169418335, 0.7338583469390869, -0.31306716799736023, -0.1972670555114746...
{ // Draw Text next to each notch sizeItemText = g.MeasureString(itemText, this.Font); int xxx = size.X + 10;
[ -0.10265964269638062, 0.08915307372808456, 0.613620400428772, -0.17417314648628235, 0.00934799388051033, 0.5961625576019287, 0.3101840615272522, -0.49049386382102966, 0.16000644862651825, -0.5994923114776611, -0.31079015135765076, 0.4593038856983185, -0.14488796889781952, -0.21671654284000...
rectItemText = new Rectangle(xxx, yy, Convert.ToInt32(sizeItemText.Width), Convert.ToInt32(sizeItemText.Height)); PaintHotspot(g, Color.White, rectItemText, 200); g.DrawString(itemText, this.Font, Brushes.Black, (float)xxx, (float)yy); }
[ -0.016364211216568947, -0.38038501143455505, 0.7860334515571594, -0.25229474902153015, -0.20377497375011444, 0.48353853821754456, 0.2290353924036026, -0.7026495933532715, -0.053375955671072006, -0.6877543926239014, -0.27961498498916626, 0.7129533886909485, -0.24345840513706207, 0.053673133...
actualIndex++; } tmpHeight = (size.Height - (int)topOffset - (int)bottomOffset) / countItemsRight; for (int i = 0; i < countItemsRight; i++) {
[ 0.2801763415336609, -0.43483126163482666, 0.7601820230484009, 0.12030545622110367, 0.09112819284200668, 0.07206229865550995, 0.4827851951122284, -0.3035457134246826, -0.03128752484917641, -0.05993633717298508, 0.21612638235092163, 0.7970374226570129, 0.13385941088199615, -0.008407864719629...
int yy = size.Y + (tmpHeight * i) + (int)topOffset; int xx = size.X + size.Width + 2; rect = new Rectangle(xx, yy, 16, 8);
[ 0.12541279196739197, -0.37174859642982483, 0.6382129192352295, -0.15829995274543762, -0.11674477159976959, 0.36589688062667847, 0.03679008036851883, -0.35818853974342346, -0.41653889417648315, -0.5929590463638306, -0.7479484677314758, 0.2346031218767166, -0.28028473258018494, 0.09976104646...