text
stringlengths
0
30.5k
title
stringclasses
1 value
embeddings
listlengths
768
768
unread on google. This throws a bit of a wrench into the system. My suggestion there, if you really want to try to take care of this, is to assume that the user in general will be touching only more recent stuff, and download the latest couple hundred or so items every time, checking the status on all of them. (This is...
[ 0.43769946694374084, 0.03672049194574356, 0.3983764052391052, 0.329217791557312, 0.0931243970990181, -0.07174806296825409, 0.07928340137004852, 0.15983368456363678, -0.5905897617340088, -0.4614068269729614, 0.0012218659976497293, 0.3586808443069458, 0.14593914151191711, -0.0239028856158256...
reasonably large number of labels, so doing this on a per-label basis will speed things up. I'd suggest, actually, that not only do you check on a per-label basis, but you also spread out the checks, checking a single label each minute rather than everything once every twenty minutes. You can also do this "big check" f...
[ 0.7655730247497559, 0.06016255170106888, 0.2644096612930298, 0.06638214737176895, 0.16642817854881287, -0.501217782497406, 0.045208338648080826, 0.024630554020404816, -0.4528742730617523, -0.5514807105064392, 0.08343842625617981, 0.3842466175556183, 0.0629693791270256, 0.04349360242486, ...
merely to check the status. Unfortunately, I can't see any way around that in the API docs that we have available to us. My only real advice is to minimize the checking of status on non-new items.
[ 0.8000400066375732, 0.20579347014427185, 0.1063959002494812, 0.05515536293387413, 0.3400828540325165, 0.05278535932302475, 0.3001089096069336, 0.15116271376609802, -0.20048527419567108, -0.46709731221199036, 0.19541633129119873, 0.5939164757728577, 0.09182558953762054, 0.06714050471782684,...
Firstly, *Real World Haskell*, which I am reading, says to never use `foldl` and instead use `foldl'`. So I trust it. But I'm hazy on when to use `foldr` vs. `foldl'`. Though I can see the structure of how they work differently laid out in front of me, I'm too stupid to understand when "which is better." I guess it s...
[ -0.192953422665596, -0.05108589679002762, -0.008333693258464336, -0.2557781934738159, -0.6835542917251587, -0.33078277111053467, 0.31618180871009827, 0.004539909306913614, 0.10149631649255753, -0.6800640225410461, -0.3963032364845276, 0.42549166083335876, -0.4434007704257965, -0.2416922003...
"left" and "right" versions. (Side question: which version do they use?) Any insight that can help a smarts-challenged sort like me would be much appreciated! The recursion for `foldr f x ys` where `ys = [y1,y2,...,yk]` looks like ``` f y1 (f y2 (... (f yk x) ...)) ``` whereas the recursion for `foldl f x ys` look...
[ -0.2611179053783417, -0.10816199332475662, 0.6444817185401917, -0.327258437871933, -0.28673356771469116, -0.10052528232336044, 0.22610202431678772, -0.2507511079311371, -0.01601550728082657, -0.3856566250324249, -0.48362621665000916, 0.6312872767448425, -0.19711627066135406, 0.036808833479...
whereas ``` foldl (&&) False (repeat False) ``` never terminates. (Note: `repeat False` creates an infinite list where every element is `False`.) On the other hand, `foldl'` is tail recursive and strict. If you know that you'll have to traverse the whole list no matter what (e.g., summing the numbers in a list), th...
[ -0.21573613584041595, -0.2884069085121155, 0.45781630277633667, -0.19578950107097626, -0.33061107993125916, -0.512554943561554, 0.8206756711006165, -0.34728100895881653, -0.2506382465362549, -0.3456447422504425, -0.49373242259025574, 0.41517776250839233, -0.3243631422519684, 0.087182462215...
I have a mac with a custom PHP 5 install that built from about a year ago. I remember it took all Sunday and I had to compile about 20 times to get it right. The MySQL I have is from entropy and was precompiled. Now I need to get PDO with the MySQL driver working and the driver is not installed. I tried the "pecl inst...
[ 0.08454637974500656, 0.38364291191101074, 0.2709156274795532, 0.18276222050189972, 0.03617309406399727, 0.05919132009148598, 0.5922740697860718, 0.36524420976638794, -0.03393292427062988, -0.9761516451835632, 0.06984762847423553, 0.8966156244277954, -0.31006160378456116, 0.2035727053880691...
failed ``` I'll post whatever paths or messages you need to help me troubleshoot this. Will I have to compile PHP all over again, or can I just compile the pdo\_mysql extension? I hope I don't seem lazy, I just have a lot of code to write and not a lot of time to fight with my PHP configuration. You're going to nee...
[ 0.3133421540260315, 0.38832035660743713, 0.28395962715148926, -0.02372465468943119, 0.2529415190219879, 0.09462616592645645, 0.667489767074585, -0.0560673289000988, -0.13167831301689148, -0.7119262218475342, -0.1989358365535736, 0.8238016963005066, -0.21779775619506836, -0.0471397154033184...
tar xzf PDO_MYSQL-1.0.2.tgz $ cd PDO_MYSQL-1.0.2 $ phpize $ ./configure --with-pdo-mysql=/usr/local/mysql $ make && sudo make install ``` And that should get you to the point where you can configure it.
[ 0.08147472143173218, -0.07341542840003967, 0.2935347855091095, -0.32271653413772583, -0.18106842041015625, -0.015974435955286026, 0.42004671692848206, 0.08925875276327133, 0.18206174671649933, -0.2872418463230133, -0.09908387809991837, 0.9526108503341675, -0.25133344531059265, -0.086447410...
Is there a way to specify some JavaScript to execute on the OnBlur event of an ASP.NET text box? It seems to me like if I add any event handlers to the TextBox object they will just cause postbacks to the server isntead of doing what I want. Basically, I just want to be able to have the textbox be rendered in this HTML...
[ 0.09420100599527359, -0.0047240364365279675, 0.007823079824447632, 0.0932202935218811, -0.3016924262046814, -0.2861376106739044, 0.42835667729377747, -0.22323960065841675, -0.2710243761539459, -0.6376419067382812, -0.1518317461013794, 0.5082006454467773, -0.368257075548172, -0.322352409362...
the textbox to true. That makes the textbox postback when the client-side onchange event is triggered. Switch it to false, and it will act as a normal input-element.
[ 0.08517231047153473, -0.21925298869609833, 0.3892090320587158, 0.07298127561807632, -0.028162362053990364, -0.1702577769756317, 0.5933446288108826, -0.04726069048047066, 0.3633395731449127, -0.31781473755836487, -0.25718697905540466, 0.8514624238014221, -0.36282941699028015, -0.03320174664...
I have the below query, which basically it retrieves the 5 top most books sold: ``` select top 5 count(id_book_orddetails) 'books_sold', bk.* from orderdetails_orddetails ord inner join books_book bk on ord.id_book_orddetails = bk.id_book group by id_book, name_book,author_book,desc_book,id_ctg_book,qt...
[ -0.0722956731915474, 0.3668351471424103, 0.46166977286338806, 0.08888067305088043, -0.06132104992866516, 0.10553675889968872, -0.08032079041004181, -0.28319594264030457, -0.3106253147125244, -0.5491750240325928, -0.23158042132854462, 0.5341090559959412, -0.14120660722255707, 0.260668605566...
that the problem is coming from there. This is because before I changed the `desc_book` to `ntext`, it was of type `nvarchar` and it worked perfectly. The reason I changed the data type of this field is because somehow in PHP website, when I was displaying the book description (a different sp), the description was be...
[ -0.10837075114250183, 0.12923476099967957, 0.12722966074943542, 0.14276812970638275, -0.23858745396137238, 0.10400138795375824, 0.26709631085395813, 0.022074587643146515, -0.40254074335098267, -0.43473294377326965, 0.03360278904438019, 0.35087814927101135, -0.4298318028450012, 0.3111470639...
i fix the SQL query to accommodate for grouping by an `ntext` field?** Just for the record (which I don't think is very relevant), I am using *MS SQL Server 2005* **[UPDATE]** I tried and tested both of [Bill Karwin](https://stackoverflow.com/questions/384923/sql-query-grouping-by-an-ntext-field#384957)'s proposed s...
[ -0.03258916735649109, 0.33441805839538574, 0.2569695711135864, -0.21675540506839752, -0.20118600130081177, 0.18639914691448212, 0.1899603307247162, -0.5812461972236633, -0.24501530826091766, -0.18817055225372314, 0.3146769404411316, 0.31142866611480713, -0.5358295440673828, -0.080291636288...
ord.id_book_orddetails) GROUP BY bk2.id_book ) bc ON (bk.id_book = bc.id_book) ORDER BY books_sold desc; ``` The old PHP "mssql" extension only supports VARCHAR up to 255 bytes in size. This is a known limitation, and it's why Microsoft has been developing a new PHP extension to support modern SQL Server releases....
[ 0.2008475810289383, 0.25829651951789856, 0.6215947270393372, -0.26411691308021545, -0.2613617479801178, 0.14068341255187988, 0.19420252740383148, -0.5325276255607605, -0.23457741737365723, -0.21569328010082245, -0.03240783512592316, 0.35416269302368164, -0.22083449363708496, 0.217776373028...
a subquery: ``` SELECT bk.*, bc.books_sold FROM books_book bk INNER JOIN (SELECT bk2.book_id, COUNT(*) books_sold FROM books_book bk2 INNER JOIN orderdetails_orddetails ord ON (bk2.id_book = ord.id_book_orddetails) GROUP BY bk2.book_id) bc ON (bk.book_id = bc.book_id); ```
[ -0.4252758026123047, 0.1989702582359314, 0.43659499287605286, -0.19457164406776428, 0.07369595021009445, 0.10406463593244553, 0.07838872820138931, -0.5226421356201172, -0.2817554473876953, -0.22458866238594055, -0.5479249358177185, 0.059363748878240585, -0.4313913881778717, 0.0582189969718...
I'm creating an WPF app, so I'm mostly working with the ImageSource class for icons. However, the system tray icon has to be of type `System.Drawing.Icon`. Is it possible to create such an object from a png image? I have tried the following: ``` private static System.Drawing.Icon _pngIcon; public static System.Drawin...
[ 0.26208364963531494, -0.19021639227867126, 0.571543276309967, -0.04394660145044327, -0.07792169600725174, 0.3705540597438812, 0.03777540847659111, -0.10773748904466629, -0.5160009860992432, -0.7405209541320801, -0.04198096692562103, 0.6439719796180725, -0.4100107252597809, -0.0278612487018...
System.Drawing.Bitmap icon = global::BookyPresentation.Properties.Resources.star16; MemoryStream iconStream = new MemoryStream(); icon.Save(iconStream, System.Drawing.Imaging.ImageFormat.Png); iconStream.Seek(0, SeekOrigin.Begin); _pngIcon = new System.Drawing.Icon(iconSt...
[ -0.21973691880702972, -0.3878272771835327, 0.8236382603645325, -0.13028395175933838, 0.03801817074418068, 0.3210589289665222, 0.1323603391647339, -0.18318206071853638, -0.5667279958724976, -0.5476638078689575, -0.13578133285045624, 0.533699095249176, -0.5904022455215454, 0.1201353445649147...
"Argument 'picture' must be a picture that can be used as a Icon." I figured it might be something with the bit depth of the image color as I had some issues with this earlier, but both 32bit and 24bit images didn't work. Is it possible what I'm trying to do? I think you can try something like this before convert your...
[ 0.18909195065498352, -0.077957883477211, 0.47771987318992615, 0.1859700083732605, 0.1081625446677208, 0.2547723054885864, 0.06268790364265442, -0.3298948109149933, -0.3232886791229248, -0.6090188026428223, -0.04610225930809975, 0.725745439529419, -0.1529403030872345, 0.042553361505270004, ...
I have an object not written by myself that I need to clone in memory. The object is not tagged `ICloneable` or `Serializable` so deep cloning through the interface or serialization will not work. Is there anyway to deep clone this object? A non-safe win32 API call maybe? FYI Interfaces marked as `ICloneable` are not n...
[ 0.05095129832625389, 0.17685897648334503, -0.14064878225326538, 0.4892267882823944, 0.3406699597835541, -0.035773858428001404, 0.26651379466056824, 0.15817612409591675, -0.19810277223587036, -0.5084794163703918, -0.010271097533404827, 0.546603262424469, -0.2644980847835541, 0.3360336422920...
easiest methods I know of, since you can clone any complex graph in 3-5 lines of code. Another option would be the `XmlSerializer` if the object can be `XmlSerialized` (You don't specify any attributes for serialization or implement interfaces however if there is an `IDictionary` interface your hosed. Outside of that ...
[ 0.2304309755563736, -0.13449738919734955, 0.1400313824415207, 0.4465589225292206, -0.1440505087375641, 0.13224825263023376, 0.10546989738941193, -0.18759915232658386, -0.4187132716178894, -1.021669864654541, 0.2931961417198181, 0.5773207545280457, -0.39637041091918945, -0.13552314043045044...
I want put a div by iframe over a video containing an active player is it possible ? [You need to convert to utf-16](http://blog.stevehorn.cc/2007/07/sql-2005-xml-column-unable-to-switcth.html) I'm not an expert on XML in SQL Server even though I use it, but we had the same problem last year and it was mis-match of t...
[ 0.3219369649887085, 0.011300190351903439, 0.3530498147010803, -0.16801254451274872, -0.2049819380044937, -0.296246737241745, 0.1820354461669922, -0.030356353148818016, -0.0061333212070167065, -0.6030061841011047, 0.1132737547159195, 0.6088646054267883, -0.3496781885623932, 0.24545416235923...
I want to find out which algorithm is the best that can be used for downsizing a raster picture. With best I mean the one that gives the nicest-looking results. I know of bicubic, but is there something better yet? For example, I've heard from some people that Adobe Lightroom has some kind of proprietary algorithm whic...
[ 0.6475146412849426, -0.20829057693481445, 0.10651630163192749, 0.03647168353199959, -0.1284385323524475, 0.15253470838069916, -0.05415644869208336, 0.33580145239830017, -0.2298242449760437, -0.6622139811515808, 0.19748206436634064, 0.6641374826431274, -0.13291695713996887, -0.0754612013697...
better than bicubic when downsizing a picture. That makes me wonder if interpolation algorithms are the way to go at all. It also reminded me of an algorithm I had "invented" myself, but never implemented. I suppose it also has a name (as something this trivial cannot be the idea of me alone), but I couldn't find it a...
[ -0.010316329076886177, -0.4230439364910126, 0.037454914301633835, 0.16718703508377075, -0.4462013244628906, 0.10377826541662216, 0.11508353054523468, 0.16887204349040985, -0.2739906311035156, -0.42044952511787415, 0.1919221580028534, 0.3750644624233246, -0.2992478907108307, -0.164860710501...
to calculate the areas and colors of these pixels. Then, to get the color of the target pixel, one would simply calculate the average of these colors, adding their areas as "weights". So, if a target pixel would cover 1/3 of a yellow source pixel, and 1/4 of a green source pixel, I'd get (1/3\*yellow + 1/4\*green)/(1/3...
[ 0.47291502356529236, 0.1573718786239624, 0.3250555992126465, -0.12461370974779129, 0.04342736676335335, 0.30354776978492737, -0.19554075598716736, -0.6324006915092468, -0.13307127356529236, -0.4240078628063202, 0.3126595616340637, 0.33759206533432007, -0.3678078353404999, -0.30590251088142...
question came up a lot, so someone (maybe SMPTE, maybe the ASC) gathered a bunch of professional cinematographers and showed them footage that had been rescaled using a bunch of different algorithms. The results were that for these pros looking at huge motion pictures, the consensus was that **Mitchell** (also known as...
[ 0.6815136075019836, 0.021228693425655365, 0.20575812458992004, 0.2360154092311859, 0.052607301622629166, 0.12074117362499237, 0.19215141236782074, -0.45049718022346497, -0.2564045488834381, -0.18035118281841278, 0.21654720604419708, 0.2768472135066986, -0.14001524448394775, -0.108792826533...
a truncated version of sinc. **Lanczos** is one of several practical variants of sinc that tries to improve on just truncating it and is probably the best default choice for scaling down still images. But as usual, it depends on the image and what you want: shrinking a line drawing to preserve lines is, for example, a ...
[ -0.044709738343954086, -0.36752113699913025, 0.21753475069999695, -0.06322358548641205, -0.0728435069322586, 0.20278307795524597, -0.004926976747810841, -0.10938921570777893, -0.24671198427677155, -0.721343457698822, -0.08285782486200333, 0.027857143431901932, -0.1624402105808258, 0.055337...
information](http://www.fxguide.com/featured/Keeping_Your_Renders_Clean/) on scaling algorithms (along with a lot of other stuff about compositing and other image processing) which is worth taking a look at. They also include test images that may be useful in doing your own tests. Now ImageMagick has an [extensive gui...
[ 0.5577166676521301, -0.14827385544776917, 0.5162074565887451, 0.1343885064125061, -0.1597927063703537, 0.0385742112994194, -0.0008205593330785632, -0.29446476697921753, -0.2665986120700836, -0.796413779258728, 0.23143185675144196, 0.6297376751899719, -0.08541683107614517, -0.10528802126646...
exist. But start with Lanczos.
[ 0.40272974967956543, 0.30781009793281555, 0.23151277005672455, 0.13453322649002075, 0.02438322827219963, -0.26174992322921753, 0.38185057044029236, -0.006453182548284531, -0.09581216424703598, -0.5346297025680542, -0.45659542083740234, 0.02950424887239933, -0.4431699216365814, 0.1974259018...
I have a project to designing a website to search Zip codes on a digital map. Somebody advised me to use PHP with postgreSQL or MySQL. My professor wants me to tell him why I chose this for a mapping site. The question is... Is there an expertise web language for GIS site ?? What is the difference if I use MySQL or M...
[ 0.3520587086677551, 0.1372271478176117, 0.1018654927611351, 0.36873647570610046, -0.1630130112171173, 0.1642870157957077, -0.25388994812965393, 0.16641175746917725, -0.24279019236564636, -0.7997266054153442, 0.1770976334810257, 0.37635505199432373, -0.03936289995908737, 0.06304556876420975...
but MySQL has played catch up in the last year or so and has a working method of this in the latest versions. MySQL's version is apparently marginally faster than PostgreSQL, but lacks some of the more advanced spatial features therefore it's pretty much limited to finding records that match a certain range of coordina...
[ -0.0008225688361562788, 0.17373360693454742, 0.5341017246246338, 0.22669176757335663, -0.08177647739648819, -0.23613421618938446, 0.2407924383878708, 0.2599586844444275, -0.20513775944709778, -0.6442535519599915, 0.1822524070739746, 0.262729674577713, -0.01901807077229023, -0.0235139485448...
to performance and Access will never scale. Ideally, you should evaluate what functions each database engine has for dealing with geo-spacial data and choose which one performs the best and has the best features given your application's requirements.
[ -0.06698986887931824, 0.07393258064985275, 0.35225650668144226, 0.43618547916412354, 0.1873522251844406, 0.10450609028339386, 0.0764707401394844, -0.10137861222028732, -0.07899840176105499, -0.8620256781578064, -0.23188073933124542, 0.8594362735748291, 0.026210255920886993, 0.0772147327661...
I was in the process of converting a VS2003 project (.NET 1.1) to VS2008 (.NET 2.0) and had converted all the C# (easy enough). I got a new machine and did the C# conversion on VS2008. We had a C++ layer that wasn't working under .NET 2.0 because of some memory protection issues. The C++ layer was pretty old and was w...
[ 0.20347164571285248, 0.10524365305900574, 0.3621058464050293, 0.05094637721776962, -0.20223329961299896, -0.22213174402713776, 0.35242125391960144, -0.045006509870290756, -0.06275726109743118, -0.7255628108978271, 0.17065007984638214, 0.6906129121780396, -0.33986473083496094, 0.16496431827...
machine crashed. I haven't got time to fix the .NET 2.0 conversion of the C++ bit so still need to build under VS 2003. Question is: Can I install VS 2003 **after** VS2008? Will it mess things up? Installing it in a VM isn't an option because of company policy. thanks I was in the same situation some time ago and in...
[ 0.17103467881679535, 0.24906069040298462, 0.36540621519088745, 0.2857356369495392, 0.18147999048233032, -0.08820484578609467, 0.544487476348877, 0.06249542906880379, -0.2583231031894684, -0.5839378833770752, 0.23660080134868622, 0.9682801961898804, -0.20688731968402863, 0.29619383811950684...
I have a samba network share on a FreeBSD box that I use for development. I have it set up as a shared drive on my WinXP box, and it works fine. However, if I reboot the xp box, the shared drive will not be accessible until I click on it and enter the password, even though I have set it to use the correct username an...
[ 0.5535511374473572, 0.33394894003868103, 0.11135153472423553, 0.17115430533885956, 0.09638133645057678, -0.2962951362133026, 0.4043671190738678, 0.22687503695487976, -0.18735672533512115, -0.893909215927124, 0.1270538866519928, 0.5687165260314941, -0.14104613661766052, 0.36652159690856934,...
be a common samba issue. Thanks! EDIT: So Sorry! I thought I had said I have XP Pro. I actually have the auth stored in the mapped drive, where it says "authenticate using user." I also use the same username for the samba share as the xp login, though not the same pw. to get it to map on startup, you can put this in...
[ 0.13684576749801636, 0.39888882637023926, 0.4241538643836975, -0.12396570295095444, -0.18793952465057373, -0.020546698942780495, 0.40283364057540894, -0.276907354593277, -0.11406707763671875, -0.6980868577957153, 0.22618137300014496, 0.38199782371520996, -0.42158663272857666, 0.13361603021...
call to that batch file so that it runs on startup.... right click under all the values and select new->string value name it something non-descriptive and then modify it by right clicking it and then just put the path to the batch file into the value data field --- I also set up a samba share drive to be mapped ...
[ 0.285125732421875, 0.06863747537136078, 0.14697207510471344, 0.09929715096950531, 0.05283523350954056, -0.21721696853637695, -0.058123547583818436, -0.05679125711321831, -0.08276736736297607, -0.7526810765266418, 0.34107479453086853, 0.6240596771240234, -0.3550019860267639, 0.1075832769274...
I've been working on a project of porting an old solaris CL program to run on Linux, and barring some unrelated hardware issues, that's finished. Now I want a GUI for it, so the user can choose among the various options with drop downs and check boxes, as well as some text input areas for options that aren't so restric...
[ 0.5105912089347839, 0.22620122134685516, 0.607939600944519, 0.110518679022789, 0.2601134181022644, -0.31875577569007874, -0.18674415349960327, 0.12911735475063324, -0.2153749018907547, -0.6617915034294128, -0.2020932137966156, 0.7421010136604309, -0.1767616868019104, -0.04145451635122299, ...
just want something nicer to use than CL.) The only time I've seen something like this done was a PyGTK+ GUI with python bindings for the C code (I think that's what it was; that was my first semester co-opping and I didn't understand very much!). That's a bit more than I want to get into right now; is there a relati...
[ 0.44118791818618774, -0.005792542360723019, 0.38403186202049255, 0.1315019279718399, 0.08148843050003052, -0.3927980959415436, 0.13654574751853943, 0.422859787940979, -0.30325305461883545, -0.4156525433063507, 0.35833752155303955, 0.6163206100463867, -0.26323404908180237, -0.08810728043317...
to register commands with a callback. If you use the command in a Tcl program, it will invoke the callback and provide a mechanism to convert the arguments between a Tcl list (native data structure) and an ARGV style array of char\*. It was designed specifically to be easy to retrofit this sort of wrapper to command-l...
[ 0.1464567929506302, -0.08100686222314835, 0.14308637380599976, -0.00009574220166541636, -0.100568026304245, 0.01725723408162594, -0.013232313096523285, -0.1834844946861267, -0.029496897011995316, -0.47788795828819275, -0.04392978176474571, 0.6053063273429871, -0.37381812930107117, 0.128411...
Embed a Tcl interpreter in your program and use Tcl as an embedded scripting language (possibly including registration of commands and callbacks to your program) * Spawn a process with a full-duplex pipe and send commands via stdin/stdout (you can also attach an event handler to the pipe which is invoked when data is a...
[ 0.22455337643623352, 0.048907384276390076, 0.15995709598064423, -0.1324368715286255, -0.11201093345880508, -0.04004032909870148, 0.16808421909809113, -0.23880085349082947, -0.09829336404800415, -0.38433346152305603, -0.10349614173173904, 0.443867951631546, -0.5062439441680908, 0.0397671535...
quite a lot of electronic resources on the internet. Some good starting points are: [Tcl tutorial](http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html), [TK tutorial](http://www.tkdocs.com/), [Tcl advocacy site](http://www.tcl.tk/about/) (might be worth perusing to help you decide if you want to go down this route),...
[ -0.1847236007452011, 0.017588714137673378, 0.23465871810913086, 0.0452992245554924, -0.31990769505500793, -0.09796387702226639, 0.003565592924132943, -0.10309842973947525, -0.10319304466247559, -0.7715152502059937, -0.08424904942512512, 0.7449603080749512, -0.3930375277996063, -0.131071940...
API is [Lua.](http://www.lua.org/) Both have advantages and disadvantages. The principal strengths of Tcl are the simple and cleanly integrated TK toolkit and good, mature support support from third party libraries (e.g. [Tix](http://sourceforge.net/projects/tixlibrary/)). The main strength of Lua is that the language ...
[ 0.18321533501148224, -0.029974600300192833, 0.5526503920555115, -0.11389941722154617, -0.27593332529067993, 0.06250934302806854, -0.11554867029190063, 0.02600746788084507, -0.0670856162905693, -0.8695749044418335, -0.003168038558214903, 0.24368497729301453, -0.513435959815979, 0.0813923701...
than TK and carries more runtime baggage but has a richer feature set. If you have genuine reason to think that your scripting project will grow into a larger application you might consider Lua. However at a larger scale you're into a substantial development project and [Python](http://www.python.org) or [Ruby](http:...
[ 0.4808029234409332, -0.18520303070545197, 0.025240618735551834, 0.28145360946655273, 0.0040603866800665855, -0.22661161422729492, 0.04575955495238304, -0.06520342826843262, -0.15564970672130585, -0.38160574436187744, -0.17612934112548828, 0.49358099699020386, -0.32625719904899597, 0.254293...
re-casting the application as a plugin API that people can hook their own scripts into. Extra features can be done as scripts and possibly fobbed off onto third parties for maintenance. One of the advantages of a system with a built-in scripting language is that you personally do not necessarily have to implement featu...
[ 0.5093651413917542, -0.19731374084949493, 0.2906670868396759, 0.06508594006299973, 0.14527171850204468, -0.4207844138145447, 0.2201666235923767, -0.024603640660643578, -0.4167042672634125, -0.48391193151474, -0.2928165793418884, 0.43994390964508057, -0.23978836834430695, 0.0198122523725032...
use it, you would have to re-factor your program into a library.
[ 0.42740651965141296, -0.038063544780015945, -0.25580617785453796, 0.4316265881061554, 0.176216721534729, -0.29945674538612366, -0.18130069971084595, 0.029325611889362335, -0.004635374527424574, -0.45265936851501465, 0.27974292635917664, 0.14914308488368988, 0.036784444004297256, -0.0244517...
I'm very new to ActionScript 3, and I've followed this toturial on adobe TV. But I don't get it to work. The thing is that I want the box to move left/right when I click the buttons, but nothing happens. You can download the .fla file here: <http://www.habitats.no/files/AC3.zip> Thanks. This sounds like exactly the ...
[ 0.5360609889030457, -0.18040840327739716, 0.4384213984012604, -0.1671099215745926, 0.12450045347213745, -0.19686387479305267, 0.019454745575785637, -0.06945199519395828, -0.2625460624694824, -0.5020952224731445, 0.15009845793247223, 0.6716290712356567, -0.298765629529953, -0.08334683626890...
and an ARGV style array of char\*. It was designed specifically to be easy to retrofit this sort of wrapper to command-line driven C programs. There are also a variety of other modes you can use to interface the interpreter as well, and it is easy to embed into programs as a scripting language. From memory the availab...
[ 0.46883249282836914, -0.059737637639045715, 0.33678996562957764, 0.04844311997294426, -0.033009760081768036, 0.23234273493289948, 0.02975880354642868, -0.16802331805229187, -0.028589017689228058, -0.5396244525909424, 0.058957651257514954, 0.5344218611717224, -0.30929404497146606, 0.3011957...
also attach an event handler to the pipe which is invoked when data is available) * Less Tcl specific mechanisms such as fork/exec or connection via sockets. Ousterhout's book [Tcl and the TK Toolkit](https://rads.stackoverflow.com/amzn/click/com/020163337X) is a bit dated but has a good guide to the C API. Welch's [P...
[ 0.06121300533413887, -0.11210035532712936, 0.007071613799780607, 0.047484125941991806, -0.04135216772556305, -0.2641482949256897, 0.15107694268226624, -0.26409009099006653, -0.3762565553188324, -0.48943978548049927, -0.03322810307145119, 0.39167022705078125, -0.1357760727405548, -0.0205579...
this route), [Tcl/Tk Wiki](http://wiki.tcl.tk/) and of course [Stackoverflow](https://stackoverflow.com/questions/tagged/tcl). TK will give you a straightforward GUI and is very easy to learn to program - if a little simplistic. It's not as [ugly as it used to be](https://stackoverflow.com/questions/349409/why-are-tk...
[ -0.14877283573150635, -0.0059759533032774925, 0.3697306215763092, -0.03742964565753937, -0.24483555555343628, -0.14540204405784607, -0.12450374662876129, -0.21866634488105774, -0.16511955857276917, -0.7531244158744812, -0.1559639424085617, 0.7306684255599976, -0.4700685739517212, -0.095516...
of Lua is that the language is much nicer but there is no standard GUI toolkit, so the UI is not as nicely integrated. Lua also has much better support for threading in the interpreter, having been designed for this from the ground up. However, if you're wrapping a legacy C/unix application, this is unlikely to be a si...
[ 0.19004718959331512, -0.029942281544208527, 0.16445845365524292, -0.018699876964092255, -0.14121685922145844, 0.03667161241173744, 0.14561067521572113, -0.014079362154006958, -0.1830078363418579, -0.7298166155815125, 0.004884404595941305, 0.1876405030488968, -0.38303735852241516, 0.1487941...
at a larger scale you're into a substantial development project and [Python](http://www.python.org) or [Ruby](http://www.ruby-lang.org/en/) start becoming viable options. As the project gets larger wrapping the C codebase will be a smaller portion of the overall project and third-party library support will be a bigger ...
[ 0.5795265436172485, 0.01864055171608925, -0.10382375866174698, 0.1638326644897461, -0.056064147502183914, -0.18312351405620575, 0.17336133122444153, -0.03359530493617058, -0.4080500900745392, -0.43471425771713257, -0.2725459635257721, 0.4843660295009613, -0.23503230512142181, 0.05754017457...
of a system with a built-in scripting language is that you personally do not necessarily have to implement features. People can write their own extensions in the scripting language or get third parties to do it for them. SWIG is designed to generate wrappers around libraries. It parses the header files and generates a...
[ 0.5471537113189697, 0.012284532189369202, 0.06855005025863647, 0.007510634604841471, 0.24224963784217834, -0.27801987528800964, 0.10122902691364288, 0.09742269665002823, -0.4137556254863739, -0.3889322876930237, -0.31215378642082214, 0.3686773478984833, -0.316707044839859, -0.2091174423694...
We've licensed a commercial product (product not important in this context), which is limited by the number of concurrent users. Users access this product by going through a Spring Controller. We have N licenses for this product, and if N+1 users access it, they get a nasty error message about needing to buy more lice...
[ 0.9541445374488831, 0.06490470468997955, 0.44542768597602844, 0.2508426010608673, 0.2554107904434204, -0.2385830134153366, -0.12965361773967743, -0.10722052305936813, -0.36825406551361084, 0.002906773705035448, 0.12286403030157089, 0.34247949719429016, -0.04592258855700493, 0.3451375961303...
this natively. In lieu of being able to control the tool, I'd like to limit the number of concurrent sessions to the controller to never be more than N. Everyone else can wait. We're using Spring MVC. Any ideas? What you need is a ObjectPool. Check out Apache Commons Pool <http://commons.apache.org/pool> At the app...
[ 0.47390076518058777, -0.10774847865104675, 0.2318752110004425, -0.07371781766414642, 0.049229372292757034, -0.17789112031459808, 0.1233697235584259, -0.16729627549648285, -0.25784042477607727, -0.5985950231552124, 0.1284409612417221, 0.7084515690803528, -0.4271349608898163, 0.3155486583709...
makeObject() { return new CommercialObject(); } } GenericObjectPool pool = new GenericObjectPool(new CommercialObjectFactory()); // The size of pool in our case it is N pool.setMaxActive(N) // We want to wait if the pool is exhausted pool.setWhenExhaustedAction(GenericObjectPool.WHEN_EXHAUSTED_BLOCK) ...
[ 0.3816002905368805, -0.3278670907020569, 0.7140324711799622, -0.2448693811893463, 0.36971330642700195, 0.14297808706760406, 0.11943021416664124, -0.28309452533721924, -0.1353672444820404, -0.45023298263549805, 0.017061324790120125, 0.8625519871711731, -0.5036526322364807, 0.260354638099670...
try { if(obj != null) { pool.returnObject(obj); } } catch(Exception e) { // ignored } } ``` If this is not what you want then you will need to provide more detail about your commercial library.
[ 0.41623494029045105, -0.11062803864479065, -0.06909642368555069, -0.16411817073822021, 0.42961761355400085, -0.2843794822692871, 0.1408056914806366, -0.03509697690606117, -0.056492067873477936, -0.5431866645812988, -0.1087518036365509, 0.6752650141716003, -0.5371823310852051, 0.02101938240...
I've read a few posts where people have stated (not suggested, not discussed, not offered) that PHP should not be used for large projects. Being a primarily PHP developer, I ask two questions: 1. What defines a "large project"? 2. Why not? What are the pitfalls of using PHP I run a small development team and I know ...
[ 0.3979746103286743, 0.3934433162212372, -0.18899410963058472, 0.018759766593575478, -0.39591649174690247, -0.1031513512134552, 0.3162093162536621, 0.13937583565711975, -0.27897021174430847, -0.38242197036743164, 0.3607037365436554, 0.3915216028690338, 0.01526893861591816, 0.070238150656223...
flat out that PHP is a terrible language because you can write code which mixes presentation with logic, or that it lets you allow SQL injection. **That's nothing at all to do with the language, that's the developer.** PHP has proved itself to be highly scalable: Wikipedia is one of the largest and most popular sites ...
[ 0.3991003632545471, 0.11965323984622955, 0.08775878697633743, 0.182327002286911, -0.38238003849983215, -0.23043720424175262, 0.2840844392776489, 0.4492720067501068, -0.37983009219169617, -0.4679366648197174, 0.3043532371520996, 0.5268729329109192, 0.03402257338166237, -0.04942143335938454,...
a bad rap because it's a language which has very low barriers to entry: it's free, you can get very cheap PHP hosting, **[the documentation is the best there is](https://stackoverflow.com/questions/181421/who-has-the-best-documentation-you-have-ever-seen-language-framework-cms-who-ha#181457)**, there's plenty of tutori...
[ 0.30592572689056396, 0.5235128998756409, -0.05824096500873566, -0.07862721383571625, -0.07481022924184799, -0.20877577364444733, 0.6773737072944641, 0.4956605136394501, -0.1670292317867279, -0.40263044834136963, -0.06894607096910477, 0.6431722640991211, -0.2272181212902069, -0.363400280475...
about which is best), and it will treat you good.
[ 0.3561052680015564, -0.04968763515353203, 0.17747221887111664, -0.13974116742610931, 0.12894436717033386, 0.09244142472743988, 0.3434638977050781, -0.005979090929031372, -0.07915802299976349, -0.46157705783843994, 0.08036155998706818, 0.6059826016426086, 0.03661215677857399, -0.09045057743...
This question was originally asking 'What KPIs do you use to in a software development organisation'. Unfortunately it seems that *KPI* is a four-letter word, and the immediate assumption is that KPIs are always mis-used (maybe they are?). So, I've hopefully improved the question to get at the underlying goals which I...
[ 0.5137543678283691, 0.21371638774871826, -0.16017349064350128, -0.061276525259017944, -0.1723625212907791, 0.15323074162006378, 0.3085889518260956, -0.1590213030576706, -0.2179078906774521, -0.44442489743232727, -0.12082348018884659, 0.35315588116645813, 0.014226035214960575, -0.0152016617...
Given all this, how do you know if your process refinements are having a positive impact? If these are *KPIs*, or [SMART goals](<http://en.wikipedia.org/wiki/SMART_(project_management)> please provide individual, or groups, of KPIs/SMART goals that you have found the be effective. If it is some other mechanism please e...
[ 0.3939637541770935, 0.29201069474220276, 0.0047192987985908985, 0.3569902777671814, 0.0043321517296135426, 0.24581068754196167, 0.22696255147457123, -0.131649449467659, -0.557644248008728, -0.6295060515403748, -0.004697893280535936, 0.4547646641731262, 0.14169050753116608, 0.03620750084519...
be interesting to know. Clarifying notes: The question is not about how to best adapt or change a process, or what a good process improvement process is (be it Kaizen, retrospectives, etc). Nor is it about root-cause analysis or other approaches used to determine what specific aspects of a process should be improved....
[ 0.2867571711540222, -0.06872022151947021, -0.13985224068164825, 0.20582357048988342, -0.2656737267971039, 0.18363188207149506, 0.31295347213745117, -0.14417439699172974, -0.35775941610336304, -0.6135431528091431, -0.023089515045285225, 0.37331876158714294, -0.027257900685071945, 0.09498105...
process is best for certain types of software development, rather it is how to improve that process over time. Obviously the specific metric will depend on the process that is involved, and the perceived problem that is trying to be improved. This question is simply designed to get examples of metrics used, which woul...
[ 0.3766893446445465, 0.10543668270111084, 0.08348774909973145, 0.49752163887023926, 0.1983632892370224, 0.05612923949956894, 0.039162419736385345, -0.20593829452991486, -0.24696564674377441, -0.8012155294418335, 0.11126118153333664, 0.542638897895813, 0.10923050343990326, 0.0135219916701316...
- to measure and track at all times, so you just track it will tweaking the process). It is taken as a given that if implemented poorly, the use of metrics can have a detrimental effect as developers game the system or otherwise. It is assumed that the person implementing the process change is aware of this problem an...
[ 0.5737390518188477, 0.2157575488090515, 0.14245158433914185, 0.35753336548805237, 0.17614223062992096, -0.03294388949871063, 0.10345674306154251, -0.08148407936096191, -0.11639661341905594, -0.27406567335128784, -0.0011040805839002132, 0.48887503147125244, 0.0571950264275074, -0.0922693163...
releases are applicable to most if not all organisations. (With obviously different emphasis depending on the specific organisation.) This question has nothing to do with *source lines of code*! In particular, I am not interested in measuring programmer productivity, especially in terms of SLOCs or # of bugs fixed, or...
[ 0.7802194952964783, 0.3233354389667511, 0.1385374665260315, 0.2692881226539612, -0.2605249285697937, -0.2822417914867401, 0.143996924161911, 0.14442084729671478, -0.5138664245605469, 0.08816231042146683, -0.4692677855491638, 0.3030914068222046, -0.11360867321491241, -0.193224236369133, 0...
about KPIs being misused and being ineffective (you don't need to search very hard to find them), but I can't believe that no-one out there tries to continually improve their processes, so there must be some good examples of KPIs out there. I know all about the drawbacks of simplistic metrics that are applied to indiv...
[ 0.46420517563819885, 0.46871012449264526, -0.4196964502334595, 0.12145831435918808, -0.08324123919010162, 0.17996591329574585, 0.6570155620574951, 0.15354180335998535, -0.4174569249153137, -0.23496928811073303, 0.11868179589509964, 0.4282046854496002, -0.06729096919298172, 0.10148237645626...
company, as opposed to a software development company as a whole. For example, a software company should ensure that the products have the right features for the market, but generally that is product management's role, rather than engineering. And yes, there is a complete other discussion as to why and to what extent e...
[ 0.6216088533401489, 0.42435047030448914, 0.016515111550688744, 0.1323462724685669, 0.14576560258865356, -0.09303614497184753, 0.3254023492336273, 0.05793559178709984, -0.3752131164073944, -0.3531425893306732, -0.339717835187912, 0.6867433786392212, 0.3037711977958679, -0.035561975091695786...
as it's measuring actual functionality delivered and tested, acceptable to the customer. The usual other measures, like SLOC, SLOC/staff-hour, etc, fail because of Charlie's First Law of Management, which is: > People will deliver whatever they're > being rewarded to deliver. Set up your measures as SLOC, and you'l...
[ 0.41915595531463623, 0.08879850804805756, 0.3199898302555084, -0.031042251735925674, -0.11744558811187744, 0.1488037109375, 0.3029841482639313, -0.3880537152290344, -0.15238063037395477, -0.5457807183265686, -0.20058010518550873, 0.836713433265686, 0.040378402918577194, -0.1432985365390777...
the stuff that's getting done.
[ 0.5685883164405823, 0.6540171504020691, 0.08738484233617783, -0.23953500390052795, 0.003940192051231861, -0.07674501091241837, -0.029226910322904587, 0.3688373267650604, -0.3312098979949951, -0.41548046469688416, -0.06487031280994415, 0.5068300366401672, 0.337851345539093, 0.04728911072015...
I want to send a custom "Accept" header in my request when using urllib2.urlopen(..). How do I do that? Not quite. Creating a `Request` object does not actually send the request, and Request objects have no `Read()` method. (Also: `read()` is lowercase.) All you need to do is pass the `Request` as the first argument to...
[ 0.32297030091285706, 0.1569092720746994, 0.6936167478561401, 0.008014370687305927, -0.11839818209409714, 0.08049123734235764, 0.15114377439022064, -0.29292428493499756, 0.03617130219936371, -0.6783605217933655, -0.18250128626823425, 0.2528218626976013, -0.31680476665496826, 0.2333812117576...
I want to overload operators < and > to allow the searching of an int value inside a BST (which ain't designed to store ints but rather words). For those who are wondering why is this overload being done on the first place please check [C++ I'm stuck filling this BST with its proper values](https://stackoverflow.com/q...
[ 0.05730447918176651, 0.23746895790100098, 0.23545293509960175, -0.0566084198653698, 0.06985148042440414, -0.08091269433498383, 0.3774903416633606, -0.04398268461227417, 0.07457375526428223, -0.591610848903656, -0.19275152683258057, 0.3454235792160034, -0.479142427444458, 0.2407703250646591...
BST<DataType>::BinNodePointer parent =0; bool found = false; while (!found && locptr != 0) { if (locptr->data > id) // descend left locptr = locptr->left; else if (locptr->data < id) // descend right locptr = locptr->right; else
[ -0.002967808162793517, -0.31227317452430725, 0.6345335841178894, -0.23503926396369934, 0.19211097061634064, -0.02026762068271637, 0.1820152848958969, -0.7144057750701904, 0.03304257243871689, -0.34883514046669006, -0.3981722593307495, 0.15753436088562012, -0.10326360911130905, 0.2763855457...
// item found found = true; } return found ? locptr->data : NULL; } ``` And my attempt so far.. ``` template <typename DataType> bool BST<DataType>::operator >(const int anotherId)const { typename BST<DataType>::BinNodePointer locptr; //undefined pointer, what should I make it point at? ...
[ 0.0033004668075591326, 0.008269163779914379, 0.5639743208885193, -0.20247773826122284, 0.1974605768918991, 0.22690290212631226, 0.04565655440092087, -0.7334931492805481, -0.22788341343402863, -0.5845420360565186, -0.12451712787151337, 0.5014504194259644, -0.28138554096221924, -0.0844915211...
BST(); bool empty() const; DataType& findId (const int id)const; bool operator >(const int anotherId)const; bool operator < (const int anotherId)const; bool search(const DataType & item) const; void insert(const DataType & item); void remove(const DataType & item); void inorder(std::ostream & ou...
[ -0.25441795587539673, -0.3146066665649414, 0.4734092652797699, -0.21465221047401428, -0.04725252091884613, 0.24106711149215698, 0.3565291166305542, -0.3577045798301697, -0.16888193786144257, -0.7874435186386108, -0.5876808762550354, 0.3782092034816742, -0.6968932747840881, 0.15576618909835...
-- data part is default DataType value; both links are null. BinNode() : left(0), right(0) {} // Explicit Value -- data part contains item; both links are null. BinNode(DataType item) : data(item), left(0), right(0) {} }; //end inner class typedef BinNode * BinNodePointer; /***** Priv...
[ -0.5121256113052368, -0.33580482006073, 0.44761401414871216, 0.11816199123859406, -0.07137033343315125, 0.2982029914855957, -0.03247682750225067, -0.487236887216568, 0.0536908321082592, -0.48973238468170166, -0.5804824829101562, 0.26083341240882874, -0.4895627498626709, 0.2752131223678589,...
Locate a node containing item and its parent. Precondition: None. Postcondition: locptr points to node containing item or is null if not found, and parent points to its parent.#include <iostream> ------------------------------------------------------------------------*/ void inorderAux(std::ostream ...
[ -0.8091599345207214, -0.07922056317329407, 0.733812153339386, 0.033551234751939774, 0.5515827536582947, 0.2262435406446457, 0.17279566824436188, -0.11719515174627304, -0.14330874383449554, -0.6210793852806091, -0.6712010502815247, 0.3207431137561798, -0.26547008752822876, -0.15493954718112...
of this BST. Postcondition: Subtree with root pointed to by subtreePtr has been output to out. ------------------------------------------------------------------------*/ void graphAux(std::ostream & out, int indent, BST<DataType>::BinNodePointer subtreeRoot) const; /*------------...
[ -0.647855818271637, -0.04313448816537857, 0.6037521362304688, -0.0313691720366478, -0.12420166283845901, 0.4012419879436493, 0.2894076406955719, -0.045030493289232254, -0.48454514145851135, -0.8095775842666626, -0.6628875732421875, 0.24882560968399048, -0.4128154516220093, -0.1126671209931...
subtree with root pointed to by subtreePtr has been output to out, indented indent spaces. ------------------------------------------------------------------------*/ /***** Data Members *****/ BinNodePointer myRoot; }; // end of class template declaration //--- Definition of constructor template <typen...
[ -0.5027576088905334, -0.14159676432609558, 0.4609140157699585, -0.15974308550357819, 0.10522505640983582, 0.2965991497039795, 0.14237487316131592, -0.4723542332649231, -0.1740291714668274, -0.5419777035713196, -0.6097381114959717, 0.2640042304992676, -0.3606334924697876, -0.072928361594676...
if (locptr->data > id) // descend left locptr = locptr->left; else if (locptr->data < id) // descend right locptr = locptr->right; else // item found found
[ -0.4296230673789978, -0.3680453598499298, 0.6878719925880432, -0.08817656338214874, 0.3286038041114807, -0.0555839017033577, -0.3109024167060852, -0.62333083152771, -0.12944750487804413, -0.3890327513217926, -0.3527315557003021, 0.3419014811515808, -0.017176158726215363, -0.100372105836868...
= true; } return found ? locptr->data : NULL; } template <typename DataType> bool BST<DataType>::operator >(const int anotherId)const { typename BST<DataType>::BinNodePointer locptr; return (locptr->data > anotherId); } template <typename DataType> bool BST<DataType>::operator < (const int anotherI...
[ -0.16630491614341736, -0.2760900557041168, 0.7806758284568787, -0.01058349572122097, 0.009365742094814777, -0.05128507688641548, -0.12130921334028244, -0.279376357793808, 0.00008393835742026567, -0.12426435202360153, -0.4034489691257477, 0.46473589539527893, -0.1362777054309845, 0.17580676...
bool found = false; while (!found && locptr != 0) { if (item < locptr->data) // descend left locptr = locptr->left; else if (locptr->data < item) // descend right locptr = locptr->right; else
[ -0.3618816137313843, -0.30390673875808716, 0.6440294981002808, -0.1985158771276474, 0.17846155166625977, 0.07898540794849396, 0.3034786581993103, -0.6730275750160217, -0.09274281561374664, -0.10228655487298965, -0.396649032831192, 0.4044177234172821, -0.067044198513031, 0.054990004748106, ...
// item found found = true; } return found; } //--- Definition of insert() template <typename DataType> inline void BST<DataType>::insert(const DataType & item) { typename BST<DataType>::BinNodePointer locptr = myRoot, // search pointer parent = 0; // pointer to parent of cur...
[ -0.18041390180587769, -0.24461744725704193, 0.5116894841194153, -0.10374755412340164, 0.4767073392868042, 0.1577368825674057, 0.01945372112095356, -0.3954392373561859, -0.08953298628330231, -0.3511800169944763, -0.29958921670913696, 0.2780618965625763, -0.2676519751548767, 0.08955737948417...
{ parent = locptr; if (item < locptr->data) // descend left locptr = locptr->left; else if (locptr->data < item) // descend right locptr = locptr->right; else // item found
[ -0.38088107109069824, -0.42600467801094055, 0.634286642074585, 0.0001579927047714591, 0.3157264292240143, 0.12321747839450836, -0.05981406569480896, -0.4348064959049225, -0.1933249831199646, -0.39903342723846436, -0.4391857087612152, 0.22509227693080902, -0.07513689994812012, 0.29161688685...
found = true; } if (!found) { // construct node containing item locptr = new typename BST<DataType>::BinNode(item); if (parent == 0) // empty tree
[ -0.24581636488437653, -0.34205886721611023, 0.24416759610176086, -0.017494117841124535, 0.22423779964447021, 0.14219583570957184, 0.22333301603794098, -0.286074697971344, -0.1525523066520691, -0.41844120621681213, -0.3624342679977417, 0.17818592488765717, -0.19207265973091125, 0.1926177293...
myRoot = locptr; else if (item < parent->data ) // insert to left of parent parent->left = locptr; else // insert to right of parent parent->right = locptr; } else std::cout << "Item already
[ -0.10741854459047318, -0.11352317780256271, 0.8359351754188538, -0.11915621161460876, 0.5505841374397278, 0.3753369450569153, -0.1242375299334526, -0.06019480526447296, -0.2837448716163635, -0.3037700951099396, -0.41818585991859436, 0.046718329191207886, -0.02454386278986931, 0.19463631510...
in the tree\n"; } //--- Definition of remove() template <typename DataType> void BST<DataType>::remove(const DataType & item) { bool found; // signals if item is found typename BST<DataType>::BinNodePointer x, // points to node to be deleted parent;
[ -0.3084454834461212, -0.11321740597486496, 0.3492487967014313, -0.2060590237379074, 0.0738014206290245, 0.020677536725997925, 0.2996509075164795, -0.24114367365837097, 0.0021268080454319715, -0.5486275553703308, -0.40424680709838867, -0.11853250861167908, -0.6890047192573547, 0.42214173078...
// " " parent of x and xSucc search2(item, found, x, parent); if (!found) { std::cout << "Item not in the BST\n"; return; } //else if (x->left != 0 && x->right != 0) {
[ -0.2963084876537323, -0.07770010083913803, 0.22441118955612183, -0.2158835083246231, 0.3756779134273529, 0.11838044226169586, 0.07272204756736755, 0.032201990485191345, -0.026988370344042778, -0.3484768867492676, -0.5848201513290405, 0.17582760751247406, -0.2625337839126587, 0.351592212915...
// node has 2 children // Find x's inorder successor and its parent typename BST<DataType>::BinNodePointer xSucc = x->right; parent = x; while (xSucc->left != 0) // descend left { parent = xSucc; xSucc = xSucc->left; }
[ -0.4916677176952362, -0.41190946102142334, 0.41769489645957947, 0.05191875249147415, 0.33111709356307983, 0.02883039601147175, 0.3344624936580658, 0.05706891417503357, 0.12002059072256088, -0.6618088483810425, -0.37634778022766113, -0.1944161206483841, -0.18319487571716309, 0.4291383326053...
// Move contents of xSucc to x and change x // to point to successor, which will be removed. x->data = xSucc->data; x = xSucc; } // end if node has 2 children // Now proceed with case where node has 0 or 2 child typename BST<DataType>::BinNodePointer subtree = x->left; // po...
[ -0.3888973891735077, -0.31816697120666504, 0.5025328993797302, 0.06774698942899704, 0.1388067603111267, 0.18494543433189392, 0.12766744196414948, -0.09148014336824417, -0.07949475198984146, -0.8552477359771729, -0.540509045124054, -0.24085138738155365, -0.23363149166107178, 0.6397964954376...
(subtree == 0) subtree = x->right; if (parent == 0) // root being removed myRoot = subtree; else if (parent->left == x) // left child of parent parent->left = subtree; else
[ -0.6601947546005249, -0.22373196482658386, 0.35564255714416504, -0.11257195472717285, 0.21673408150672913, 0.12516045570373535, 0.4447752833366394, 0.1702374517917633, -0.24327293038368225, -0.495071679353714, -0.6420198082923889, -0.053440313786268234, -0.20869651436805725, 0.169813349843...
// right child of parent parent->right = subtree; delete x; } //--- Definition of inorder() template <typename DataType> inline void BST<DataType>::inorder(std::ostream & out) const { inorderAux(out, myRoot); } //--- Definition of graph() template <typename DataType> inline void BST<DataType>::graph(std...
[ -0.40292245149612427, 0.04994149133563042, 0.4482528567314148, -0.05841477960348129, 0.14293086528778076, 0.2868952453136444, 0.13625352084636688, -0.18714477121829987, -0.10613778233528137, -0.801681399345398, -0.4308699667453766, 0.3240415155887604, -0.4206850826740265, 0.160994827747344...
BST<DataType>::BinNodePointer & parent) const { locptr = myRoot; parent = 0; found = false; while (!found && locptr != 0) { if (item < locptr->data) // descend left { parent = locptr; locptr = locptr->left;
[ -0.18307144939899445, -0.25048336386680603, 0.7079780697822571, -0.2587466239929199, 0.33795619010925293, 0.08842600882053375, 0.3486592173576355, -0.5036802887916565, 0.0013303743908181787, -0.3354933261871338, -0.62895667552948, -0.07703156769275665, -0.08183947205543518, 0.3646459579467...
} else if (locptr->data < item) // descend right { parent = locptr; locptr = locptr->right; } else // item found found = true;
[ -0.27487340569496155, -0.3615943491458893, 0.7060275673866272, -0.10212857276201248, 0.32926294207572937, 0.09162595123052597, 0.024617042392492294, -0.535119891166687, -0.06022949144244194, -0.31750115752220154, -0.3636016845703125, 0.3909113109111786, 0.041981615126132965, 0.001504547079...
} } //--- Definition of inorderAux() template <typename DataType> void BST<DataType>::inorderAux(std::ostream & out, BST<DataType>::BinNodePointer subtreeRoot) const { if (subtreeRoot != 0) { inorderAux(out, subtreeRoot->left); // L operation out << subtreeRoot->data...
[ -0.49397072196006775, -0.18002982437610626, 0.4739713966846466, -0.4195849895477295, 0.4891655147075653, 0.2582787573337555, 0.33128437399864197, -0.4254890978336334, 0.14022980630397797, -0.711840033531189, -0.44475752115249634, 0.47919219732284546, -0.2767852246761322, 0.0459320731461048...
Definition of graphAux() template <typename DataType> void BST<DataType>::graphAux(std::ostream & out, int indent, BST<DataType>::BinNodePointer subtreeRoot) const { if (subtreeRoot != 0) { graphAux(out, indent + 8, subtreeRoot->right); out << std::setw(indent) << " " <<...
[ -0.19352754950523376, -0.11700116097927094, 0.4118843972682953, 0.010284419171512127, -0.007266494445502758, -0.14278779923915863, 0.48433396220207214, -0.3922847509384155, -0.07198967784643173, -0.9727180600166321, -0.30239570140838623, 0.2986837327480316, -0.8318511843681335, -0.06234371...
< in this case, but perhaps I don't quite understand the question. It looks like you intend to have several different kinds of tree nodes, all of which inherit from `DataType`. If that is the case, simply add a const member function to the `DataType` base class: ``` class DataType { private: mutable int in...
[ -0.3327048718929291, -0.06439197063446045, 0.2072165161371231, -0.0013566859997808933, 0.20421257615089417, -0.03370823338627815, 0.15069137513637543, -0.10823237895965576, -0.10204633325338364, -0.6819296479225159, -0.16752836108207703, 0.6331827044487, -0.33479568362236023, 0.30074873566...
virtual ~DataType(); }; ``` Now, in your `findID` loop, you can simply use: ``` while (!found && locptr != 0) { if (locptr->data.id() > id) { locptr = locptr->left; } else if (locptr->data.id() < id) { locptr = locptr->right; } else { found = true; } } ```...
[ -0.11720222979784012, -0.5089727640151978, 0.971606969833374, 0.08644870668649673, 0.5291810035705566, -0.14652881026268005, 0.22886796295642853, -0.14893050491809845, -0.2933058440685272, -0.6352412104606628, -0.28145092725753784, 0.6309280395507812, 0.019250376150012016, 0.18126212060451...
all of the unnecessary hassle of operator overloading.
[ -0.0004979792283847928, 0.3093908429145813, -0.08268655091524124, 0.2714167833328247, 0.32440683245658875, -0.07236841320991516, 0.3022123873233795, -0.18203192949295044, -0.09985487163066864, -0.2899441421031952, -0.11177785694599152, 0.49938899278640747, -0.23993323743343353, -0.05364928...