text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
meaning of the program is at that point. Back at the Dawn of Time we used to worry about "coupling" and "cohesion". Learning an FP will lead you to write systems with optimal (minimal) coupling, and high cohesion.
[ -0.004253365099430084, -0.12569671869277954, 0.4975922405719757, 0.08382228016853333, 0.1413126438856125, 0.08874370157718658, -0.09780621528625488, 0.06499561667442322, 0.05841510742902756, -0.602908194065094, -0.27600833773612976, 0.3238533139228821, -0.19851170480251312, -0.039728593081...
Using Apache Derby with Java (J2ME, but I don't think that makes a difference) is there any way of checking if a database already exists and contains a table? I know of none, except few work around, unlike MySQL where we have that facility of IF EXIST. What you do is, try to connect to the database, if couldn't its li...
[ 0.22807389497756958, -0.10670756548643112, -0.0869172215461731, 0.3048315644264221, -0.14899510145187378, -0.6023789644241333, 0.20123407244682312, -0.2849404513835907, -0.12382062524557114, -0.4067593812942505, 0.28165265917778015, 0.4987425208091736, -0.3903052508831024, -0.1852733194828...
I have seen the similar work around. In Oracle we have dictionary tables to know about the database objects. I doubt if we have anything like that in Derby. **[Edited]** Well, I found that there is a way to know if the table exist. Try, SELECT tablename FROM SYSTABLES. It is for checking the existence of a table, fo...
[ 0.46414121985435486, 0.13059306144714355, -0.05545107647776604, 0.029180623590946198, -0.1427292823791504, -0.03329453244805336, 0.25342893600463867, 0.2813825309276581, 0.02022191509604454, -0.7542272806167603, 0.399094820022583, 0.4972617030143738, -0.07826904207468033, 0.051935561001300...
I am in a compilers class and we are tasked with creating our own language, from scratch. Currently our dilemma is whether to include a 'null' type or not. What purpose does null provide? Some of our team is arguing that it is not strictly necessary, while others are pro-null just for the extra flexibility it can provi...
[ 0.13255396485328674, 0.6711714267730713, -0.6533153653144836, -0.23484615981578827, -0.33503228425979614, -0.021606450900435448, 0.47956839203834534, 0.18706606328487396, 0.156499981880188, -0.25831708312034607, 0.16231247782707214, 0.43056225776672363, -0.44088470935821533, -0.01707783900...
time, I was > designing the first comprehensive type > system for references in an object > oriented language (ALGOL W). My goal > was to ensure that all use of > references should be absolutely safe, > with checking performed automatically > by the compiler. **But I couldn't resist > the temptation to put in a...
[ 0.18193162977695465, 0.7490254640579224, 0.12360847741365433, -0.052147477865219116, -0.24497784674167633, -0.21748222410678864, 0.5638158917427063, 0.045052576810121536, 0.10433456301689148, -0.5393428802490234, 0.13013112545013428, 0.5742671489715576, -0.65175461769104, 0.288085579872131...
In recent years, a number of > program analysers like PREfix and > PREfast in Microsoft have been used to > check references, and give warnings if > there is a risk they may be non-null.** > More recent programming languages like > Spec# have introduced declarations for > non-null references. This is the > solu...
[ 0.16515588760375977, 0.2694638967514038, 0.15406033396720886, 0.07067445665597916, -0.4777427315711975, -0.28545597195625305, 0.6089545488357544, -0.06531740725040436, -0.1785454899072647, -0.4014960825443268, 0.10751151293516159, 0.45977210998535156, -0.48012521862983704, 0.40859088301658...
There is no "Done" button on the `.numberPad` Keyboard Type. When a user finishes entering numeric information in a text field, how can I make the number pad disappear? I could get a "Done" button by using the default keyboard, but then users would have to switch to the numeric keys in order to input numbers. Is there...
[ -0.03249721601605415, -0.09756449609994888, 0.8382963538169861, -0.1692875176668167, 0.20731516182422638, -0.0616469532251358, 0.4709610641002655, -0.18278859555721283, -0.22109699249267578, -0.6563137769699097, -0.2860599458217621, 0.5604607462882996, 0.051958341151475906, 0.0570377111434...
numberToolbar.barStyle = UIBarStyleBlackTranslucent; numberToolbar.items = @[[[UIBarButtonItem alloc]initWithTitle:@"Cancel" style:UIBarButtonItemStyleBordered target:self action:@selector(cancelNumberPad)], [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSp...
[ -0.2790171205997467, -0.1943301558494568, 0.6278620362281799, -0.19003944098949432, -0.054114192724227905, 0.44526076316833496, 0.3277707099914551, -0.5242326259613037, -0.27565810084342957, -0.3570554256439209, -0.3550407886505127, 0.6741214990615845, -0.08729242533445358, -0.135213151574...
[numberTextField resignFirstResponder]; } ```
[ -0.18586915731430054, 0.3832952082157135, 0.29450464248657227, -0.3329986035823822, 0.15962359309196472, -0.29051849246025085, 0.07404354959726334, 0.11138150840997696, -0.26348742842674255, -0.37616264820098877, -0.42126473784446716, 0.6431825757026672, -0.3070250153541565, 0.313725978136...
``` <asp:Repeater ID="rptLessons" runat="server"> <ItemTemplate> <tr> <td><%#Eval("fullname")%></td> <td><%#isCompleted(Eval("totallessons"), Eval("completedlessons"), Eval("totalNumAvail"), Eval("totalNumCorrect"))%></td> <td><%#FormatPercent(Eval("totalnumcorrect") / E...
[ -0.3644392192363739, -0.27600935101509094, 0.46379339694976807, -0.1795138120651245, -0.002069622278213501, 0.38064929842948914, 0.3211832046508789, -0.4157414138317108, -0.46889564394950867, -0.24936406314373016, -0.6963369846343994, 0.49321117997169495, 0.12164822220802307, 0.15178924798...
</ItemTemplate> </asp:Repeater> ``` I can't figure it out but as soon as it hits some NULL data it refuses to move on to drawing the next elements. You need to give a stack trace to be sure. But I can see several issues: 1. DIV#0 errors inside FormatPercent 2. NULL errors. Example Solution (System.Convert.ToIn...
[ -0.05706016719341278, -0.1765795648097992, 0.5340388417243958, -0.0019974596798419952, -0.17634746432304382, 0.041079938411712646, 0.31376510858535767, -0.4524453282356262, -0.16344624757766724, -0.6731380224227905, 0.14122426509857178, 0.46925634145736694, -0.2994963228702545, 0.248034894...
When calling a method that adds an object to a collection in GWT I get a null pointer error. I have no idea why as everything I have done creates a very simple object (only contains a string). Here is the code that calls the function and the function: ``` public class PlantMenu extends VerticalPanel { private Col...
[ 0.08608517050743103, -0.42932960391044617, 0.5936970114707947, -0.30370384454727173, 0.39439091086387634, 0.2653121054172516, 0.2369278371334076, -0.49268561601638794, -0.30066192150115967, -0.6794148087501526, -0.11690155416727066, 0.5098864436149597, -0.35999250411987305, 0.1523017138242...
{ Window.alert(i.next().getPlantName()); }*/ } public Collection<PlantData> createPlants() { PlantData plant1 = new PlantData("Herbs"); PlantData plant2 = new PlantData("Flowers"); PlantData plant3 = new PlantData("Vegetable"); newPlantData.add(plant1); ...
[ -0.01416804175823927, -0.3225077986717224, 0.5521970987319946, -0.3212931156158447, 0.466955304145813, 0.23045243322849274, 0.34218907356262207, -0.3420351445674896, -0.1682462990283966, -0.8105239272117615, -0.578984260559082, 0.2268841564655304, -0.3983443081378937, 0.07855085283517838, ...
newPlantData; } } ``` It errors out (null pointer) when trying to add the first plant, this line: PlantData plant1 = new PlantData("Herbs"); Any help appreciated :) You didn't initialize your collections. Despite, you already told that its not on that line, but I doubt it. Showing a full exception stack would ...
[ 0.18681131303310394, -0.05669919401407242, 0.4008622467517853, -0.2097742110490799, 0.2396419793367386, -0.11866375058889389, 0.08701028674840927, -0.43750113248825073, -0.35726597905158997, -0.7886910438537598, -0.15239180624485016, 0.3483722507953644, -0.6084721684455872, -0.038211014121...
the requirements.
[ 0.38667911291122437, 0.3999950885772705, 0.31193622946739197, 0.08977317065000534, 0.14149439334869385, -0.10332324355840683, -0.13147786259651184, -0.40187492966651917, 0.051469944417476654, -0.46856433153152466, -0.35408103466033936, 0.4512503147125244, 0.0832955464720726, -0.06188704818...
I'm trying to design a class that needs to dynamically allocate some memory.. I had planned to allocate the memory it needs during construction, but how do I handle failed memory allocations? Should I throw an exception? I read somewhere that exceptions should only be used for "exceptional" cases, and running out of m...
[ 0.11933204531669617, 0.05175475776195526, -0.47507303953170776, 0.24965552985668182, 0.0988052636384964, 0.07218443602323532, 0.39421546459198, -0.01885964535176754, -0.3414531946182251, -0.5562283992767334, -0.009832615964114666, 0.44802969694137573, -0.2272728979587555, 0.202118903398513...
The consensus seems to be that running out of memory IS an exceptional case. Will see how to go about this.. Thanks.. :) Assuming you are using new to allocate memory, and are not overriding the `new` operator, it will automatically throw the `std::bad_alloc` exception if it fails to allocate memory properly. > I re...
[ -0.009598805569112301, 0.12036607414484024, 0.11880967020988464, -0.18243080377578735, 0.21514540910720825, -0.2551006078720093, 0.3267522156238556, -0.08846967667341232, -0.4314700961112976, -0.5934038758277893, -0.3361610770225525, 0.34448859095573425, -0.1835525780916214, 0.360347092151...
situation. You may want to return a meaningful error to the user of your application, but if it's a problem caused by lack of memory, you may not even be able to afford the memory to allocate the error message. It's a bit of a catch-22 situation really. There is a defensive programming technique (sometimes called a me...
[ -0.023200886324048042, -0.03554917871952057, -0.12860704958438873, 0.20314469933509827, 0.05691796541213989, 0.08351729810237885, 0.48961350321769714, 0.24960818886756897, -0.42693695425987244, -0.47214481234550476, -0.37875983119010925, 0.36163604259490967, -0.2766517400741577, 0.08567538...
error to the user. This is much better than crashing :)
[ 0.00213167117908597, 0.21462145447731018, 0.011677755042910576, 0.05098338797688484, -0.2035478800535202, -0.003547681961208582, 0.43195870518684387, 0.4880019724369049, -0.10438387095928192, -0.8207820057868958, -0.06422657519578934, 0.6980292797088623, -0.1471940279006958, 0.131059393286...
I want to append some HTML inside this div, and the HTML has to have a click event on it also. ``` <div id="myID"> <p>hello, world!</p> </div> ``` I want to insert a new div inside of the above div, and I want a click event on the new HTML I insert there. There will be some dynamic text inside the ne...
[ 0.187043696641922, 0.08936702460050583, 0.5183830261230469, -0.20471876859664917, 0.05994085222482681, 0.011112933047115803, 0.47771069407463074, 0.13667456805706024, -0.030248194932937622, -0.7382741570472717, -0.2315548211336136, 0.45200496912002563, -0.5892181992530823, 0.36705601215362...
var newDiv = $("<div>").append(someText).click(function () { alert("click!"); }); $(this).append(newDiv); } ) ```
[ 0.0765838697552681, -0.2579827904701233, 0.548819899559021, -0.5995294451713562, 0.3190091848373413, 0.0447523258626461, 0.5155488848686218, -0.28462594747543335, -0.18117310106754303, -0.573957622051239, -0.5101801753044128, 0.7866092324256897, -0.6363591551780701, 0.22303685545921326, ...
How do you programmatically do the following from the iPhone SDK: 1. Programmatically Dial a Phone Number through the iPhone SDK 2. Bypass the **dial / cancel** prompt that the iPhone brings up 3. Send additional DTMF after the number is dialed just like how you would program pauses into a regular phone. I know you c...
[ 0.5094894170761108, -0.29693299531936646, 0.2060846984386444, 0.17924489080905914, 0.13554967939853668, -0.19316589832305908, 0.38207656145095825, -0.34247440099716187, -0.2652347683906555, -0.3749672472476959, -0.03137705475091934, 0.6493976712226868, -0.313912034034729, -0.33449915051460...
phone and dialed a pay per minute number on mute so you didn't notice). However, if you use the tel link, then you should be able to send it "," characters which inserts pauses. So to dial 555-1212, then wait 4 seconds, then do 12345# on the touch tone you would use tel:5551212,,12345# Check out <https://developer.a...
[ 0.22439292073249817, -0.011762076988816261, 0.5674889087677002, -0.08921675384044647, 0.5112349987030029, 0.32092565298080444, 0.41608479619026184, -0.3029513955116272, -0.34886106848716736, -0.2683856189250946, 0.05726901441812515, 0.6350141167640686, -0.3352780044078827, -0.3950537443161...
``` LastAccessed=(select max(modifydate) from scormtrackings WHERE bundleid=@bundleid and userid=u.userid), CompletedLessons=(select Value from scormtrackings WHERE bundleid=@bundleid and userid=u.userid AND param='vegas2.progress'), TotalLessons=100, TotalNumAvail=100, TotalNumCorrect=(SELECT Value FROM scormtrackin...
[ 0.0373624712228775, -0.4156155288219452, 0.7339774966239929, -0.10785084217786789, -0.2341606616973877, 0.13108745217323303, 0.29360321164131165, -0.4484842121601105, -0.4499383866786957, -0.7476626634597778, -0.07041295617818832, 0.5509804487228394, 0.020843947306275368, 0.127572268247604...
the `Repeater`? ### Related Question: > [Why does my repeater keep crashing on Eval(NULL) values?](https://stackoverflow.com/questions/584570/why-does-my-repeater-keep-crashing-on-evalnull-values) You can use the [COALESCE](http://msdn.microsoft.com/en-us/library/ms190349.aspx) function to avoid getting nulls. Basica...
[ 0.09910043329000473, 0.15411780774593353, 0.059015702456235886, 0.140486478805542, 0.006732181180268526, -0.06720361858606339, 0.2607932686805725, 0.09555128216743469, -0.20374423265457153, -0.248739093542099, 0.031443312764167786, 0.4103659391403198, -0.3281954526901245, 0.537580490112304...
I'm writing some code that uses a Tree (a regular tree that can have an unlimited number of nodes, but no crossover, i.e. two parent nodes will not point the the same child node). Anyway, two things: 1) Are there any well-known algorithms for finding a sub-tree within a tree. 2) Are there any Java libraries (or any l...
[ 0.15830136835575104, 0.061671290546655655, 0.11358907073736191, 0.14912930130958557, -0.02792494371533394, -0.07874102890491486, 0.10567659139633179, -0.0875973105430603, -0.3987712562084198, -0.5164352059364319, 0.190983846783638, 0.13297642767429352, -0.1449238806962967, 0.08247306942939...
I'm using the tree as part of game to keep a history of what happens when a certain events happen. For example, an A can hit a B which can hit two A's which can hit another two A's etc. That would look something like: ``` A | B / A / \ A A / \ A A ``` Of course there's more than just A...
[ 0.315898597240448, 0.26600557565689087, -0.1412147581577301, 0.02032030001282692, -0.06274829804897308, -0.03843124210834503, 0.20184579491615295, 0.08004622161388397, -0.44169679284095764, -0.2580997049808502, 0.10619603842496872, 0.2673323154449463, 0.036142248660326004, 0.11301969736814...
tell when, say an A has hit two A's: ``` A / \ A A ``` I want to be able to easily know if the first tree contains that subtree. And I don't want to have to write all the code for doing so if I don't have to :) Looks like a straightforward algorithm: Find the root of the search tree in the game tree and check w...
[ 0.2873793840408325, 0.08666494488716125, 0.05428919568657875, -0.16315717995166779, 0.27599215507507324, -0.011183842085301876, 0.18111878633499146, -0.10256168991327286, 0.04352647066116333, -0.5863338112831116, -0.06081642210483551, 0.515958309173584, -0.09066777676343918, -0.01604439876...
match this tree: ``` A /|\ A C A ``` (i.e. if non-matching children are supposed to be ignored.) Anyway, here's the code I just toyed around with. It's a fully running example and comes with a main method and a simple `Node` class. Feel free to play with it: ``` import java.util.Vector; public class PartialTre...
[ -0.05429837107658386, -0.18517228960990906, 0.2538873553276062, -0.10367029160261154, 0.024904625490307808, 0.043316762894392014, 0.4000121057033539, -0.1788722723722458, 0.01954244263470173, -0.7156171202659607, -0.03138558194041252, 0.42636916041374207, -0.561286211013794, 0.156429618597...
partialMatch(testTree, searchTree); } private static boolean partialMatch(Node tree, Node searchTree) { Node subTree = findSubTreeInTree(tree, searchTree); if (subTree != null) { System.out.println("Found: " + subTree); return true; } return false; } ...
[ -0.923960268497467, -0.3919128477573395, 0.19244135916233063, -0.09589376300573349, 0.04740503430366516, 0.17034269869327545, 0.2348005175590515, -0.003929734695702791, -0.10063060373067856, -0.6061466932296753, -0.4006219506263733, 0.21726647019386292, -0.42492541670799255, 0.301806449890...
findSubTreeInTree(Node tree, Node node) { if (tree.value == node.value) { if (matchChildren(tree, node)) { return tree; } } Node result = null; for (Node child : tree.children) {
[ -0.6918997168540955, -0.25075799226760864, 0.17209362983703613, -0.17486272752285004, 0.4266691505908966, 0.13963519036769867, 0.3063945472240448, -0.2632080614566803, 0.12361500412225723, -0.801276445388794, -0.22274485230445862, 0.31765255331993103, -0.06619644165039062, 0.00350581621751...
result = findSubTreeInTree(child, node); if (result != null) { if (matchChildren(tree, result)) { return result; } } }
[ -0.385751336812973, -0.3017330467700958, 0.20327161252498627, -0.17192678153514862, 0.25189241766929626, 0.07861349731683731, 0.28537338972091675, -0.4070691168308258, 0.09171763807535172, -0.47881537675857544, -0.26036810874938965, 0.32810893654823303, -0.19160418212413788, 0.070899955928...
return result; } private static boolean matchChildren(Node tree, Node searchTree) { if (tree.value != searchTree.value) { return false; } if (tree.children.size() < searchTree.children.size()) { return false; } boolean result =
[ -0.35378897190093994, -0.2531763017177582, 0.2680295705795288, -0.07018842548131943, 0.06242319196462631, 0.08476120233535767, 0.09538644552230835, -0.37922969460487366, -0.06105107441544533, -0.3967590928077698, -0.36194080114364624, 0.3877423405647278, -0.3130563795566559, 0.135355949401...
true; int treeChildrenIndex = 0; for (int searchChildrenIndex = 0; searchChildrenIndex < searchTree.children.size(); searchChildrenIndex++) { // Skip non-matching children in the tree. while (treeChildrenIndex < tree.children.size()
[ -0.023584861308336258, -0.04492031782865524, 0.3573092222213745, -0.16320256888866425, 0.38294219970703125, 0.049866560846567154, 0.681255578994751, -0.34315481781959534, -0.08830137550830841, -0.3732324540615082, -0.4716152846813202, 0.5794972777366638, -0.22172462940216064, 0.06336852908...
&& !(result = matchChildren(tree.children.get(treeChildrenIndex), searchTree.children.get(searchChildrenIndex)))) { treeChildrenIndex++; }
[ -0.0966089740395546, -0.1574009656906128, 0.668260931968689, -0.20771785080432892, 0.3613254427909851, 0.1562630832195282, 0.3461930751800537, -0.36826497316360474, -0.10404716432094574, -0.12262497842311859, -0.5760362148284912, 0.5837375521659851, -0.16220897436141968, 0.1287809461355209...
if (!result) { return result; } } return result; } private static Node createTestTree() { Node subTree1 = new Node('A'); subTree1.children.add(new Node('A')); subTree1.children.add(new Node('A')); Node
[ -0.499564528465271, -0.2217617928981781, 0.16372303664684296, 0.008042917586863041, 0.13042305409908295, 0.20270957052707672, 0.3819435238838196, -0.09903816133737564, -0.2541796863079071, -0.7074429988861084, -0.3154968321323395, -0.1115693673491478, -0.3598341941833496, 0.322987020015716...
subTree2 = new Node('A'); subTree2.children.add(new Node('A')); subTree2.children.add(new Node('C')); subTree2.children.add(subTree1); Node subTree3 = new Node('B'); subTree3.children.add(subTree2); Node root = new Node('A'); root.children.add(subTree3); ...
[ -0.49605149030685425, -0.1918238401412964, 0.15487369894981384, -0.09810320287942886, 0.2831229865550995, 0.32821545004844666, 0.39772602915763855, -0.019238503649830818, -0.5398943424224854, -0.6181546449661255, -0.5324389934539795, -0.17742840945720673, -0.5218664407730103, 0.55051207542...
= new Node('A'); root.children.add(new Node('A')); root.children.add(new Node('A')); return root; } } class Node { char value; Vector<Node> children; public Node(char val) { value = val; children = new Vector<Node>(); } public String toString() { ...
[ -0.21951597929000854, -0.4299054443836212, 0.4438929259777069, -0.245042085647583, 0.2448434680700302, 0.6035891771316528, 0.4585008919239044, -0.6368975639343262, -0.4818810224533081, -0.7369107604026794, -0.49581649899482727, 0.11995293200016022, -0.2577107548713684, 0.3893427848815918, ...
sb.append('('); sb.append(value); for (Node child : children) { sb.append(' '); sb.append(child.toString()); } sb.append(')'); return sb.toString(); } } ```
[ -0.26208990812301636, 0.04164235666394234, 0.47235777974128723, -0.5396121144294739, 0.40600332617759705, 0.4764482378959656, 0.4961604177951813, -0.6853809356689453, -0.2258402556180954, -0.5635756850242615, -0.3655956983566284, -0.00629475386813283, -0.5925611853599548, 0.278891384601593...
I am trying to insert a chunk of HTML into a div. I want to see if plain JavaScript way is faster than using jQuery. Unfortunately, I forgot how to do it the 'old' way. :P ``` var test2 = function(){ var cb = function(html){ var t1 = document.getElementById("test2"); var d = document.createElement(...
[ 0.48504191637039185, 0.14748309552669525, 0.3462110757827759, -0.20986266434192657, 0.08162837475538254, 0.18241658806800842, 0.45296695828437805, -0.403777152299881, 0.10655723512172699, -0.6547568440437317, -0.20819595456123352, 0.41776391863822937, -0.4013313949108124, 0.075174219906330...
console.timeEnd("load data with javascript"); }; console.time("load data with javascript"); $.get("test1.html", cb); } ``` what am i doing wrong here guys? **edit**: Someone asked which is faster, jquery or plain js so i wrote up a test: <https://jsben.ch/FBQYM> plain js is 10% faster I think this...
[ 0.33406394720077515, -0.014914093539118767, 0.4247204065322876, 0.15910457074642181, -0.08117464184761047, -0.19778700172901154, 0.3751407563686371, -0.2315702736377716, -0.13147424161434174, -0.9550453424453735, -0.035737112164497375, 0.6403617262840271, -0.34023019671440125, -0.168669700...
I'm really new to mocks and am trying to replace a private field with a mock object. Currently the instance of the private field is created in the constructor. My code looks like... ``` public class Cache { private ISnapshot _lastest_snapshot; public ISnapshot LatestSnapshot { get { return this._laste...
[ 0.276632159948349, 0.25597628951072693, 0.49047574400901794, -0.12485617399215698, 0.013916652649641037, 0.18601776659488678, 0.4920502305030823, -0.15556055307388306, -0.15034613013267517, -0.7532393336296082, -0.020501719787716866, 0.6251469254493713, -0.13925990462303162, 0.030665040016...
public void Freeze(IUpdates Updates) { ISnapshot _next = this.LastestSnapshot.CreateNext(); _next.FreezeFrom(Updates); this.LastestSnapshot = _next; } } ``` What I'm trying to do is create a unit test that asserts `ISnapshot.FreezeFrom(IUpdates)` is called from within `Cache.Freeze(IUpdat...
[ 0.15643173456192017, 0.026612404733896255, 0.21501456201076508, -0.08491183072328568, 0.16587477922439575, -0.14164520800113678, 0.4812154471874237, 0.04481498524546623, -0.2664254605770111, -0.5533459186553955, -0.24761360883712769, 0.44773125648498535, -0.25776758790016174, 0.13076746463...
test the wrong way then please do point out as well. The actual implementation of `ISnapshot.FreezeFrom` itself calls a heirarchy of other methods with a deep object graph so I'm not too keen on asserting the object graph. Thanks in advance. I'm almost citing techniques from ["Working Effectively with Legacy Code"](h...
[ 0.3035297989845276, -0.02335507422685623, -0.03913925588130951, 0.10909274965524673, -0.03355545178055763, -0.16298554837703705, 0.4310661256313324, -0.4044214189052582, 0.030444134026765823, -0.30910998582839966, 0.057583533227443695, 0.6176101565361023, -0.1797015517950058, 0.09830732643...
mock object instead of the actual private variable. 3. Create a protected factory method for creating `ISnapshot` object, and override it in testing subclass to return an instance of a mock object instead of the real one. This way the constructor will get the right value from the start. 4. Parametrize constructor to ta...
[ 0.36689966917037964, 0.030223872512578964, 0.11924459040164948, 0.06551039963960648, -0.20867934823036194, 0.09480635076761246, 0.3789687156677246, -0.36843180656433105, 0.0675133690237999, -0.2791135609149933, -0.2642650008201599, 0.694209635257721, -0.7787328362464905, -0.171540796756744...
I'm building an animation in flash and as3, I have a function in which I add a stage eventListener, stage.addEventListener(Event.ENTER\_FRAME, setScrollPercent, false, 0, true); Since this event is set inside a function of a function, "two functions deep," How can I reset all stage event listeners from outside of the...
[ 0.02896188385784626, -0.2570725083351135, 0.21283119916915894, -0.2447630614042282, -0.11871030926704407, 0.1529749035835266, 0.27615585923194885, -0.26207780838012695, 0.04208960756659508, -0.7565061450004578, -0.044632915407419205, 0.6909334659576416, -0.1822221279144287, -0.232841894030...
Collector running behind the scenes managing memory. It cleans up a piece of memory once there are no references to it. Well, strong references. All objects by default have a strong reference. Event handlers, since they tend to be a performance bottleneck, have this special ability of declaring themselves weak -- a wea...
[ 0.3360559642314911, -0.24876607954502106, 0.04027765616774559, 0.34268853068351746, -0.42583170533180237, -0.28819936513900757, 0.17707516252994537, -0.2317616045475006, -0.5582746267318726, -0.271841824054718, -0.13647045195102692, 0.5987129807472229, -0.10443002730607986, 0.1720012724399...
having to do a `=null` manually. Which is what you'd otherwise do when you don't specify the parameter. By default, even handlers are created as strong references. However, marking them weak has a side-effect. They can vanish into thin air without you ever knowing about it. Eventually, you will know, but in terms of a...
[ 0.38657256960868835, 0.13021889328956604, 0.17964494228363037, 0.21136173605918884, -0.032643966376781464, -0.0918096974492073, 0.4833473265171051, 0.09345772862434387, -0.29994067549705505, -0.45240527391433716, -0.04279480502009392, 0.2527632415294647, -0.3022567629814148, 0.161071732640...
I'm a total newbie when it comes to SQL. I'm making a site in ASP.NET for doing surveys. A privileged admin user will be able to build a survey. Then lots of other people will respond to the survey. Once I have the set of questions for a new survey, what is the best way to automatically construct a table and an INSERT...
[ 0.5628030896186829, 0.12852761149406433, 0.1697462946176529, 0.303785502910614, -0.11873861402273178, -0.015484916977584362, 0.1112266480922699, -0.04824519529938698, -0.23325471580028534, -0.5291410088539124, 0.35252052545547485, 0.388397216796875, 0.09808149933815002, 0.16230399906635284...
the columns be "answer given for question k of the survey identified by the entry in column 1"? You dont want to build a new table for each survey. Create a surveys table (SurveyID, UserID, Name, etc) Create a Questions Table (QuestionID, SurveyID, QuestionText, SortOrder, etc) optionally, Create an Options table, a...
[ 0.00608464190736413, -0.02687131054699421, 0.42643362283706665, 0.22671599686145782, -0.158240407705307, 0.22044619917869568, -0.06372392922639847, -0.3188512921333313, -0.0983152687549591, -0.6193724274635315, -0.20675969123840332, 0.07251687347888947, -0.23685356974601746, -0.21785384416...
foriegn key.. and so on. **EDIT to answer your edit:** Sorry I should have followed through to cover storing answers as well. You would want another table called SurveyResponses (ResponseID, Name, etc) And another table I'll call ResponseAnswers(ResponseAnswerID, SurveyID, ResponseID, QuestionID, AnswerText/AnswerID...
[ -0.12193488329648972, -0.2624225318431854, 0.8199055790901184, 0.1796744018793106, -0.5135729312896729, 0.45891907811164856, 0.11912845075130463, -0.3888809084892273, -0.23106007277965546, -0.6945025324821472, -0.21690529584884644, 0.4354155659675598, -0.08812913298606873, -0.2157588005065...
Assuming I have a left outer join as such: ``` from f in Foo join b in Bar on f.Foo_Id equals b.Foo_Id into g from result in g.DefaultIfEmpty() select new { Foo = f, Bar = result } ``` How would I express the same task using extension methods? E.g. ``` Foo.GroupJoin(Bar, f => f.Foo_Id, b => b.Foo_Id, (f,b) => ???) ...
[ -0.333587646484375, 0.09622799605131149, 0.47424107789993286, -0.5287074446678162, 0.09507694095373154, 0.14129219949245453, 0.09599702060222626, -0.6260919570922852, 0.13244616985321045, -0.5064681768417358, -0.2571260333061218, 0.5580974221229553, -0.369129478931427, -0.02452719025313854...
foo.Foo_Id, bar => bar.Foo_Id, (x,y) => new { Foo = x, Bars = y }) .SelectMany( x => x.Bars.DefaultIfEmpty(), (x,y) => new { Foo=x.Foo, Bar=y}); ```
[ 0.0781833752989769, 0.04699626937508583, 0.6761273741722107, -0.43682968616485596, 0.18520893156528473, 0.007233808282762766, 0.35417860746383667, -0.440340131521225, -0.10655789077281952, -0.5425030589103699, -0.45315179228782654, 0.7899224758148193, -0.6009273529052734, 0.331144869327545...
Does C++ provide a guarantee for the lifetime of a temporary variable that is created within a function call but not used as a parameter? Here's an example class: ``` class StringBuffer { public: StringBuffer(std::string & str) : m_str(str) { m_buffer.push_back(0); } ~StringBuffer() { ...
[ -0.03601587191224098, -0.3629497289657593, 0.6254994869232178, -0.44304314255714417, 0.4221854507923126, -0.01998993381857872, 0.13383887708187103, -0.35781344771385193, -0.24280445277690887, -0.06793685257434845, -0.3285232484340668, 0.7188221216201782, -0.31458327174186707, 0.03684133291...
return &m_buffer[0]; } private: std::string & m_str; std::vector<char> m_buffer; }; ``` And here's how you would use it: ``` // this is from a crusty old API that can't be changed void GetString(char * str, int maxlength); std::string mystring; GetString(StringBuffer(mystring).Size(MAXLEN), MAXLEN); ``...
[ 0.06156323105096817, -0.044045496731996536, 0.6766320466995239, -0.09921354800462723, 0.2035713791847229, -0.008554616011679173, 0.17096228897571564, -0.05919827148318291, -0.35551729798316956, -0.35146501660346985, -0.2835826277732849, 0.6819027662277222, -0.2853035628795624, 0.3027440011...
a member variable? Thanks. The destructor for that sort of temporaries is called at the end of the full-expression. That's the most outer expression which is not part of any other expression. That is in your case after the function returns and the value is evaluated. So, it will work all nice. It's in fact what make...
[ -0.008015192113816738, -0.03750859200954437, 0.40563130378723145, 0.09599947929382324, 0.06143210083246231, -0.19317413866519928, 0.2776468098163605, 0.043044090270996094, -0.2685522139072418, -0.1722317934036255, -0.3271447718143463, 0.43187105655670166, -0.16264906525611877, 0.2014565318...
in the Standard.
[ -0.009409528225660324, 0.13741882145404816, 0.030799327418208122, -0.0690767765045166, -0.0896414965391159, 0.17062202095985413, 0.21418637037277222, -0.23774969577789307, -0.020784787833690643, -0.240170419216156, -0.31468555331230164, 0.33216720819473267, 0.013323936611413956, -0.1196782...
Python has a standard library module `ftplib` to run FTP communications. It has two means of getting a listing of directory contents. One, `FTP.nlst()`, will return a list of the contents of a directory given a directory name as an argument. (It will return the name of a file if given a file name instead.) This is a ro...
[ 0.0038640727289021015, -0.19139137864112854, 0.06913314759731293, -0.07736380398273468, -0.4057377874851227, -0.05935647711157799, -0.10379645973443985, -0.022344212979078293, -0.5153688192367554, -0.0617779977619648, -0.15371102094650269, 0.5616210699081421, -0.72449791431427, -0.36734321...
the directory given as an argument (or of the file attributes, given a file name). According to [a previous question on Stack Overflow](https://stackoverflow.com/questions/111954/using-pythons-ftplib-to-get-a-directory-listing-portably), parsing the results of `dir()` can be fragile (different servers may return diffe...
[ -0.1809343844652176, 0.016217507421970367, 0.14926789700984955, -0.012555119581520557, -0.03627492114901543, -0.003139859763905406, 0.1844881922006607, -0.15252697467803955, -0.33585846424102783, -0.2427782118320465, -0.124760203063488, 0.668670117855072, -0.2624618709087372, 0.20768947899...
robust solution to identifying directories over FTP? Unfortunately FTP doesn't have a command to list just folders so parsing the results you get from ftp.dir() would be 'best'. A simple app assuming a standard result from ls (not a windows ftp) ``` from ftplib import FTP ftp = FTP(host, user, passwd) for r in ftp.d...
[ -0.4267270565032959, 0.11085175722837448, 0.5780321359634399, -0.22330087423324585, -0.15894436836242676, 0.06906995177268982, 0.4590062201023102, -0.6502954363822937, -0.2859589159488678, -0.6728599667549133, -0.225936621427536, 0.6555249691009521, -0.2236030399799347, 0.02899022586643696...
I am sure am messing around with a lot of casting and such in this code below. It seems like there should be a smoother way. I'm basically trying to use a builder method (CreateNewPattern) to handle creating new objects of the passed sub-class type (by the CreateNewCircularPattern and CreateNewLinePattern methods). I p...
[ 0.5302393436431885, 0.0028253570199012756, 0.3073565661907196, 0.251070111989975, -0.2877456247806549, 0.1385551244020462, 0.20089595019817352, -0.03798249736428261, -0.2099739909172058, -0.5803258419036865, 0.2573226988315582, 0.22340182960033417, -0.14805735647678375, 0.42434147000312805...
suggestions. ``` private CircularHolePattern CreateNewCircularPattern() { var CreatedPattern = CreateNewPattern(typeof(CircularHolePattern)); return (CircularHolePattern)CreatedPattern; } private SingleLineHolePattern CreateNewLinePattern() { var CreatedPattern=CreateNewPattern(typeof(SingleLineHolePattern))...
[ 0.2584509551525116, 0.04739179089665413, 0.45001423358917236, -0.06005135551095009, -0.019408324733376503, 0.3706861734390259, 0.29587000608444214, -0.34081336855888367, -0.12994863092899323, -0.6522153615951538, -0.05881701409816742, 0.01536494679749012, -0.6170758008956909, 0.66625070571...
this.SetActivePattern(newHolePattern); return newHolePattern; } private SingleLineHolePattern CreateNewLinePattern() { return CreateNewPattern<SingleLineHolePattern>(); } private CircularHolePattern CreateNewCircularPattern() { return CreateNewPattern<CircularHolePattern>(); } ``` The `T` is t...
[ 0.22843293845653534, -0.08556565642356873, 0.4079359471797943, -0.1469099074602127, -0.0062780012376606464, 0.00032631098292768, 0.33494338393211365, -0.28119218349456787, 0.022244587540626526, -0.38660329580307007, -0.16068321466445923, 0.37234997749328613, -0.5948516130447388, 0.46736562...
an argument.
[ -0.16251176595687866, 0.20860201120376587, -0.006266606971621513, 0.30215924978256226, -0.5262765288352966, -0.17900758981704712, -0.16729708015918732, -0.15411357581615448, 0.22719287872314453, -0.4645448327064514, -0.10686606168746948, 0.41848549246788025, -0.06810931116342545, 0.1661285...
I want to display an iframe in a .aspx page, and the iframes source should be the same page. I need to use a relative uri. What value should I give the 'src' attribute? I realise this is a little unusual - the page will be displayed in different states depending on parameters passed in, so the iframe won't be displa...
[ 0.035953421145677567, 0.07670212537050247, 0.5770922303199768, -0.18170394003391266, -0.23234595358371735, 0.036619678139686584, -0.040719762444496155, -0.22233915328979492, -0.2527455985546112, -0.8302286863327026, 0.027531659230589867, 0.1994853913784027, -0.18689101934432983, 0.01041576...
<form id="form1" runat="server"> <div> <iframe runat="server" id="myFrame" src="Default.aspx?message=Hello%20World"></iframe> <div id="myDiv" runat="server"></div> </div> </form> </body> </html> ``` Code Behind: ``` using System; using System.Collections.Generic; using System.Linq; using System.W...
[ -0.08063598722219467, -0.03274145722389221, 0.65812087059021, -0.15059968829154968, -0.0019013256533071399, 0.08829079568386078, 0.2935083210468292, -0.40306639671325684, -0.3281974494457245, -0.6767135262489319, -0.39178821444511414, 0.3361973464488983, -0.28087303042411804, 0.20818446576...
!= message) { myDiv.InnerText = message; myFrame.Visible = false; } else {
[ -0.18880531191825867, -0.14837197959423065, 0.329917848110199, -0.3353936970233917, 0.12558580935001373, 0.2647651135921478, 0.8570294976234436, -0.08288510888814926, -0.05297297239303589, -0.5794728994369507, -0.30702725052833557, 0.48554643988609314, -0.4621095657348633, 0.07456555217504...
myDiv.Visible = false; } } } } ```
[ 0.21805185079574585, 0.14774635434150696, 0.19065478444099426, -0.2415810525417328, 0.21753086149692535, -0.18657006323337555, 0.4832320511341095, 0.37166133522987366, -0.07791656255722046, -0.7309792637825012, -0.17429883778095245, 0.666949987411499, -0.2839316427707672, 0.348134696483612...
I have [a project](http://github.com/sambo99/Media-Browser/tree/230114f3fdb977c279a079af4ef57ce0d662a629/FrameGrabProvider/DirectShowLib) that creates thumbnails for a video file, it is heavily based off interop definitions in [directshow.net](http://directshownet.sourceforge.net/index.html). At the moment media brow...
[ 0.7433578968048096, 0.18565072119235992, 0.4634135067462921, 0.14862698316574097, -0.11812343448400497, -0.5107841491699219, 0.057917866855859756, -0.012522040866315365, -0.24220676720142365, -0.6717742681503296, 0.14156009256839752, 0.5187627077102661, -0.14600306749343872, 0.552786052227...
are interop definitions which can easily/tediously be defined by reading through MSDN and translating stuff to C#, if I did this manually I would most likely arrive at the same code (or something incredibly similar). Where do I stand here? How do I get this functionality into my MIT licensed project? Related: <http:...
[ 0.3518032133579254, -0.0686742439866066, 0.21179665625095367, 0.19264034926891327, -0.01505924854427576, -0.23088215291500092, -0.14744460582733154, 0.2788679301738739, -0.5546868443489075, -0.9176441431045532, 0.007442906498908997, 0.43788111209869385, -0.5195904970169067, 0.1288878917694...
be LGPL, but the rest of your project wouldn't. Things get a bit hairier if you want to *statically* link the library's code into your executable. The point of the LGPL is that the end-user must have the freedom to modify (and particularly to upgrade) the library's functionality on their own initiative. If it's a self...
[ 0.5369557738304138, -0.10020631551742554, 0.3428206741809845, 0.10477085411548615, -0.3570493757724762, -0.5359269380569458, 0.09595661610364914, -0.08290954679250717, -0.16421325504779816, -0.4831707775592804, -0.37499457597732544, 0.7615377306938171, -0.6582669615745544, -0.0831166729331...
Provide the object code (intermediary-stage compilation files that get fed to the linker) to your users so that they can take an updated version of the library and link it in manually. This is sort of an ugly solution, but it's allowed. Your best bet is to just use a DLL.
[ 0.7185183763504028, -0.11333131790161133, 0.028025023639202118, 0.43073850870132446, 0.13718588650226593, -0.5156890153884888, 0.11019182205200195, 0.13095881044864655, -0.16739428043365479, -0.7212556004524231, -0.268634557723999, 0.6231692433357239, -0.1425139307975769, -0.02333189174532...
I want to switch 3 views and let them switch from 1-2-3. The first view is to let users input name and password, the second view will show his information to let him confirm and the third view will show him a list of options so he can choose what to do next. The problem is how to switch these views? If I use a navigat...
[ 0.43262845277786255, -0.19488480687141418, 0.6990727186203003, 0.13830851018428802, -0.09913675487041473, 0.0261265579611063, 0.26654428243637085, -0.1722065508365631, -0.06737011671066284, -0.6696276068687439, 0.14318235218524933, 0.6779244542121887, -0.22274431586265564, 0.06053200736641...
I finally made it. I just use NavigationController to switch between UIViews. Now I understand that navigation controller can swith not only from UITableView to UIView, but also from UIView to UIView. Using a UIView class, I can organize all the controls easily in IB.
[ -0.15780732035636902, -0.11109458655118942, 0.8543674945831299, 0.05903548747301102, -0.07319728285074234, -0.12898679077625275, 0.319880872964859, -0.02628881111741066, -0.044437576085329056, -0.9301981329917908, 0.1367483288049698, 0.4358443021774292, 0.2214546650648117, 0.37242287397384...
If I run these commands from a script: ``` #my.sh PWD=bla sed 's/xxx/'$PWD'/' ... $ ./my.sh xxx bla ``` it is fine. But, if I run: ``` #my.sh sed 's/xxx/'$PWD'/' ... $ ./my.sh $ sed: -e expression #1, char 8: Unknown option to `s' ``` I read in tutorials that to substitute environment variables from shell you n...
[ 0.23664924502372742, 0.11279591172933578, 0.0898778885602951, -0.27568304538726807, 0.10041020810604095, -0.11709833145141602, 0.41742950677871704, -0.12181472778320312, -0.10462988913059235, -0.5639981627464294, -0.2643420696258545, 0.9405658841133118, -0.28189215064048767, 0.061749529093...
Potential problems: 1. You may need double quotes, as in `sed 's/xxx/'"$PWD"'/'` 2. `$PWD` may contain a slash, in which case you need to find a character *not* contained in `$PWD` to use as a delimiter. To nail both issues at once, perhaps ``` sed 's@xxx@'"$PWD"'@' ```
[ 0.36831170320510864, 0.07255895435810089, 0.05626077950000763, 0.17275671660900116, -0.20375341176986694, 0.23021787405014038, 0.1589358001947403, 0.20970556139945984, -0.0770358070731163, -0.4331609308719635, -0.29933828115463257, 0.7073168158531189, -0.10217947512865067, -0.0751658007502...
I realise the second one avoids the overhead of a function call (**update**, is actually a language construct), but it would be interesting to know if one is better than the other. I have been using `unset()` for most of my coding, but I've recently looked through a few respectable classes found off the net that use `$...
[ -0.11569658666849136, -0.14436423778533936, 0.0780152902007103, -0.20769436657428741, -0.37482041120529175, -0.20378689467906952, 0.19049660861492157, -0.2184184193611145, -0.04766121506690979, -0.26055604219436646, -0.07181502133607864, 0.4680253565311432, -0.639763593673706, -0.115197084...
will do it when it see fits - by intention as soon, as those CPU cycles aren't needed anyway, or as late as before the script would run out of memory, whatever occurs first. > > > If you are doing `$whatever = null;` then you are rewriting variable's data. You might get memory freed / shrunk faster, but it may steal ...
[ 0.2150825709104538, -0.2587953805923462, 0.42472925782203674, -0.05631973594427109, 0.19989429414272308, -0.05101640522480011, 0.6479323506355286, -0.46050578355789185, -0.5165257453918457, -0.6163471341133118, -0.1532844603061676, 0.5166425108909607, -0.3205665647983551, -0.21989795565605...
as in a parent-child relationship, calling unset() on the parent object will not free the memory used for the parent reference in the child object. (Nor will the memory be freed when the parent object is garbage-collected.) ([bug 33595](http://bugs.php.net/bug.php?id=33595)) --- The question "[difference between unse...
[ -0.1466940939426422, 0.09193982928991318, 0.47899019718170166, -0.18803250789642334, 0.129850372672081, 0.16781418025493622, 0.6025496125221252, -0.2530151307582855, -0.22694870829582214, -0.38903212547302246, -0.4111793041229248, 0.39214026927948, -0.447215735912323, 0.3905326724052429, ...
symbol table entry appears to be faster than removing it. --- * when you try to use a non-existent (`unset`) variable, an error will be triggered and the value for the variable expression will be null. (Because, what else should PHP do? Every expression needs to result in some value.) * A variable with null assigned ...
[ -0.1258561909198761, -0.11147111654281616, 0.32116565108299255, 0.060421574860811234, -0.29600492119789124, -0.2048785537481308, 0.6498526930809021, -0.04091768339276314, 0.033200204372406006, -0.47963401675224304, -0.009055369533598423, 0.06649148464202881, -0.14631518721580505, -0.078832...
I need to use a DLL created using .NET framework. This DLL is made COM visible. I want to use this DLL in an application created using Delphi 2006. I have followed following steps: 1. Registered the DLL using regscr32. 2. Imported the type library using Delphi IDE. It created \_TLB.pas file. Following signature was c...
[ 0.4506416320800781, -0.4567052125930786, 0.7490363717079163, -0.13988396525382996, -0.2347366362810135, -0.19506019353866577, 0.3610660135746002, -0.6852208971977234, -0.1864454299211502, -0.8285039663314819, 0.05995330959558487, 0.4700756371021271, -0.4188593327999115, 0.08846911787986755...
otherConfig: WideString; out returnMessage: WideString): Smallint; begin Result := DefaultInterface.Process(meterBSN, NICSerial, partNumber, otherConfig, returnMessage); end; ``` 3. I tried to call the method using following code snippet. ``` procedure TForm1.buttonClick(Sender...
[ -0.25894808769226074, -0.45643800497055054, 0.9520052671432495, -0.32380640506744385, 0.10914747416973114, 0.2831825017929077, 0.5058838725090027, -0.5577783584594727, -0.1956455409526825, -0.46096643805503845, -0.36726856231689453, 0.6220152378082275, -0.3148792088031769, 0.05369599536061...
valReq := nil; end; end; ``` But I get following error when Process method is called. [![alt text](https://i.stack.imgur.com/AS3AW.png)](https://i.stack.imgur.com/AS3AW.png) Please can you suggest any solution? Try initializing the `WideStrings` (`s1`,`s2`,`s3`,`s4`, and maybe even `o`). If I recall correctly, the...
[ -0.2074613720178604, -0.3500061333179474, 0.6581161022186279, -0.1954466551542282, -0.004260611720383167, 0.2324727177619934, 0.21082106232643127, -0.32443806529045105, -0.2706981897354126, -0.6387390494346619, -0.328460693359375, 0.8276622891426086, 0.053317591547966, -0.2727586328983307,...
What are the advantages and disadvantages of json vs xml for ajax requests? Is there a difference in performance? i.e. are browsers able to process one format faster than the other? In summary, JSON (which can be thought of a subset of JavaScript) is a lot leaner than XML. This has several positive side-effects * JSON...
[ 0.05033662170171738, -0.06467744708061218, 0.012405218556523323, 0.13479265570640564, -0.6846690773963928, -0.27941790223121643, -0.014573192223906517, 0.29822587966918945, -0.2973739504814148, -1.0592572689056396, -0.08136367797851562, 0.4482094645500183, -0.23041722178459167, -0.28680086...
great job of describing JSON. It's also provides a compatibility library for JavaScript that adds support for `JSON.parse` and `JSON.stringify` when not supported by browsers. While `eval` at the time (mid 2009) was used to evaluate JavaScript, it could also evaluate JSON, i.e. parse JSON, but it was considered unsafe...
[ 0.03256288170814514, 0.003868590807542205, 0.15400460362434387, -0.04420304298400879, -0.4612038731575012, -0.3830956220626831, 0.34223124384880066, -0.051982395350933075, -0.2060023546218872, -0.5845207571983337, -0.07716311514377594, 0.5046678781509399, -0.22155778110027313, -0.183310002...
type it, it is also those things that make it a lot slower (it is also a bit verbose in my opinion). But if this is something you really want, you should use it, XML is equally ubiquitous. I will not go into a debate over dynamic or statically typed, but I will say this. It's really easy to add stuff on top of schema-...
[ 0.5662172436714172, -0.019053149968385696, -0.04832325130701065, 0.32722777128219604, -0.40486353635787964, -0.3753352761268616, -0.010351543314754963, 0.559781014919281, -0.012045330367982388, -0.5216829776763916, 0.2634720206260681, 0.3244447112083435, -0.21192438900470734, -0.2954417765...
i have a legacy massive vb6 editor with plenty of 3rd party libraries and controls and recently there is a need to set it up to make it multi thread so i can run a few other forms independently from the main editor form. Basically there's minimum communication between these other forms and the main editor except for ru...
[ 0.3466689884662628, 0.04852573201060295, 0.6385281085968018, -0.045304443687200546, -0.09347262978553772, -0.03105289302766323, 0.2562536895275116, 0.01529795303940773, -0.3082907795906067, -0.5938235521316528, -0.05021987482905388, 0.6353018879890442, -0.622359037399292, 0.221770375967025...
adding a class set to global-multi-use to allow this to happen. Now while doing editing and testing via debugging mode, i found that when i exit a lot of weird crash will happen sometimes. ``` 'main.frm - button click call 'On the button click, create a new object Set obj = CreateObject("MyApp.clsThread") Call obj.New...
[ 0.31063342094421387, 0.043107736855745316, 0.7750611305236816, 0.1232466921210289, -0.012608587741851807, -0.36925458908081055, 0.43498924374580383, -0.07417945563793182, -0.2768273651599884, -0.5032541155815125, -0.3334874212741852, 0.582819938659668, -0.4741467833518982, 0.26653248071670...
must know when i do this,i.e. potential problems,etc?, as i'm fearing that the app seems to be getting more unstable. Or is there a better way to do this? Updates: -------- Instead of forcefully hacking my app into a pseudo multithreading app, i've taken the advice from the good people here and refactor out the comp...
[ 0.4550522267818451, 0.03077261708676815, 0.41535261273384094, 0.20645113289356232, -0.001278155017644167, -0.2816893458366394, 0.9006883502006531, 0.013679809868335724, 0.0038684962783008814, -0.5733165740966797, -0.32900360226631165, 1.0141254663467407, -0.2641110420227051, 0.035055398941...
when referenced from another VB6 EXE. Objects instantiated from a Global Multi-Use Class defined in a ActiveX EXE run in their own context. Object instantiated from a ActiveX DLL are run in the context of the calling EXE. Now multi-threading can be hacked into VB6 but it is very touchy and has a lot of don't (for exam...
[ 0.20878085494041443, -0.16984428465366364, 0.24482016265392303, 0.29069146513938904, -0.2117048054933548, -0.3114355206489563, 0.2838853597640991, 0.12038704752922058, -0.31228044629096985, -0.622231125831604, -0.07398815453052521, 0.593619167804718, -0.5468007326126099, 0.2116759419441223...
on your brief description I would say your best best is to keep your EXE as is but more the forms/modules/classes to a separate EXE and have the original EXE reference the ActiveX EXE. Note that you don't have to compile down to .EXE you can change the extension to .DLL and it is still a activeX EXE. You do this so t...
[ 0.5441299080848694, -0.4070471227169037, 0.2629285454750061, -0.14154139161109924, -0.170531764626503, -0.2772679626941681, 0.17343442142009735, 0.21253785490989685, -0.2748173177242279, -0.629631519317627, -0.390685498714447, 0.5299687385559082, -0.6240654587745667, 0.1057833805680275, ...
Is it possible to update an entry in Lotus Notes via email just like posterous? If it is possible, how can i do that? Thanks. Quite easy. What you need to do is create an agent in the mail database which will process the incoming mail (this will require Domino Designer and the appropriate privileges in the mail DB). ...
[ 0.18788838386535645, -0.04553969204425812, 0.23398345708847046, -0.018583813682198524, -0.12102670222520828, -0.09745560586452484, 0.10122523456811905, 0.09003812074661255, -0.1660127192735672, -0.8635472059249878, 0.31368887424468994, 0.20305992662906647, -0.34867608547210693, -0.15903894...
headers and so on, to decide what to do. One recent one I wrote for someone here follows. When called, it basically runs through the InBox checking each document for a subject heading containing "qwertyuiop", and creates a response email back to the sender containing the same subject with "SUCCESS" appended. Then it ...
[ 0.13217486441135406, -0.11675054579973221, 0.5296199917793274, 0.016577977687120438, -0.33344706892967224, -0.2223077118396759, 0.4440370202064514, -0.19471311569213867, -0.17626261711120605, -0.5096072554588318, -0.1544943004846573, 0.3113085627555847, -0.27695411443710327, -0.06148146092...
As notesdatabase Dim view As NotesView Dim doc As NotesDocument Dim olddoc As NotesDocument Dim subj As String Dim newdoc As NotesDocument Set db = s.CurrentDatabase Set view = db.GetView("($InBox)") If Not view Is Nothing Then Set doc = view.GetFirstDocument While Not d...
[ 0.11074235290288925, -0.006184592377394438, 0.7751556634902954, -0.5547301173210144, -0.07535967230796814, -0.25728943943977356, 0.24444298446178436, -0.2796004116535187, 0.11589670926332474, -0.4635295867919922, -0.37481221556663513, 0.48269346356391907, 0.004806973040103912, 0.3702654540...
Set doc = view.GetNextDocument(doc) subj = olddoc.GetFirstItem("subject").Text If Instr(subj, "qwertyuiop") > 0 Then Set newdoc = New NotesDocument(db) newdoc.SendTo = olddoc.GetFirstItem("inetfrom").Text newdoc.subject = subj
[ -0.14539186656475067, -0.018429990857839584, 0.7109065055847168, -0.3372431993484497, 0.060830436646938324, 0.09513982385396957, 0.2448223978281021, -0.5454517602920532, -0.07799012213945389, -0.7448203563690186, -0.40883517265319824, 0.6409111022949219, -0.14871273934841156, 0.19821430742...
& " SUCCESS" newdoc.form = "Memo" Call newdoc.send(True,True) Call olddoc.RemoveFromFolder( "($InBox)") Call olddoc.PutInFolder( "junk") End If Wend End If End
[ -0.05473357439041138, 0.04134547710418701, 0.6279165744781494, -0.017818858847022057, 0.36328938603401184, -0.3755756616592407, 0.5491430759429932, -0.3691180944442749, -0.1344921886920929, -0.3161832392215729, -0.4115806519985199, 0.5948472619056702, -0.21583324670791626, 0.51446342468261...
Sub ``` What you probably need is a slight modification to this which will open up a different database and change documents in there based on the mail documents. All you really need is a key in the email that can identify which document in the secondary database should be changed, and some logic that can apply the ...
[ 0.29280269145965576, 0.04797086864709854, 0.14948135614395142, 0.3853623867034912, 0.16470064222812653, -0.2229713350534439, 0.06214986741542816, -0.010835505090653896, -0.21341708302497864, -0.6937491297721863, 0.19885621964931488, 0.4399715065956116, -0.25710323452949524, 0.0124165993183...
Is it possible to capture the failure mail. I have created a application for sending mail, i have a log file to store the sent mails. If the sent mail is failure, i just want to find out the failure mail and update the log file. Is it possible! Is there any way to match the sent mail and the failure mail Please help ...
[ 0.08641650527715683, -0.17847618460655212, 0.014748540706932545, 0.4655434787273407, 0.15765848755836487, 0.03434218466281891, 0.15910419821739197, 0.055973004549741745, -0.42060670256614685, -0.3147100806236267, 0.17195935547351837, 0.408925324678421, -0.2208227515220642, -0.1754661649465...
You can then set up a service to analyze these emails.
[ 0.5037518739700317, -0.05212888866662979, 0.003863210091367364, 0.4017903804779053, 0.17056328058242798, -0.3024488389492035, 0.1386445164680481, 0.12261997908353806, 0.019219741225242615, -0.5723262429237366, 0.05364229157567024, 0.3124282956123352, 0.10514233261346817, -0.101975746452808...
I have a windows service that calls a page after a certain interval of time. The page in turn creates some reports. The problem is that the service stops doing anything after 2-3 calls. as in it calls the page for 2-3 times and then does not do any work though it shows that the service is running...i am using timers i...
[ 0.2331181764602661, 0.17948193848133087, 0.6474503874778748, -0.22942915558815002, 0.1435832381248474, -0.1867826133966446, 0.6661052703857422, -0.03209665045142174, -0.11600124090909958, -0.726203978061676, -0.14756645262241364, 0.6953451633453369, -0.37645596265792847, 0.1914067268371582...