Search Results

Search found 25 results on 1 pages for 'u no poo'.

Page 1/1 | 1 

  • Changing the value of a macro at run time

    - by BrandiNo
    I'm working in Visual Studio 2010, using C++ code. What I'm trying to do is change the value of a preprocessor directive during run time, not sure if it's possible but i've tried this.. somefile.h static int mValue = 0; #define POO = mValue; ... #if POO 0 //define class methods #else //define class methods differently } main.cpp main() { //Code calls constructor and methods allowed when POO is 0 //Code increments mValue //Code calls constructor and methods allowed when POO is 1 } How can POO be changed so that class objects uses a different implementation of other methods? Or if it's not possible, what's a another approach to this?

    Read the article

  • Difference Procedural Generation and Random Generation

    - by U-No-Poo
    Today, I got into an argument about the term "procedural generation". My point was that its different from "classic" random generation in the way that procedural is based on a more mathematical, fractal based, algorithm leading to a more "realistic" distribution and the usual randomness of most languages are based on a pseudo-random-number generator, leading to an "unrealistic", in a way, ugly, distribution. This discussion was made with a heightmap in mind. The discussion left me somehow unconvinced about my own arguments though, so, is there more to it? Or am I the one who is, in fact, simply wrong?

    Read the article

  • What is the difference between _Procedural Generation_ and _Random Generation_?

    - by U-No-Poo
    Today, I got into an argument about the term "procedural generation". My point was that its different from "classic" random generation in that procedural generation is based on a more mathematical, fractal-based, algorithm leading to a more "realistic" distribution and the usual randomness of most languages are based on a pseudo-random-number generator, leading to an "unrealistic", in a way, ugly, distribution. This discussion was made with a heightmap in mind. The discussion left me somehow unconvinced about my own arguments though, so, is there more to it? Or am I the one who is, in fact, simply wrong?

    Read the article

  • JavaScript regex refactoring

    - by JamesBrownIsDead
    I'm performing this on a string: var poo = poo .replace(/[%][<]/g, "'<") .replace(/[>][%]/g, ">'") .replace(/[%]\s*[+]/g, "'+") .replace(/[+]\s*[%]/g, "+'"); Given the similar if these statements, can these regexs be comebined somehow?

    Read the article

  • How to determine which date is on friday?

    - by poo
    I have two dropdownlists - one for year and one for weeks. How to determine the chosen weeks date should be the friday. So for example I chose week 34 and year 2011 then I should know the date on friday, in format like this: 2011-08-23. And preferably in javascript too.

    Read the article

  • How to dynamically assigning style properties to element?

    - by poo
    function styling(elem, props) { for (var i in props) { if (i == "color") { elem.style.color = props[i].toString(); } if (i == "background") { elem.style.background = props[i].toString(); } } Using it: styling(links, { color: "blue", background: "yellow" }); I'm not really happy with the if-clauses and I want to dynamically add the style properties to the element, but I'm not sure how to do it. Someone out there would know how to do it? Solved it function styling(elem, props) { for (var i in props) { elem.style[i] = props[i].toString(); } } That seems to do the trick.

    Read the article

  • Why doesn't SQL LIKE work in Microsoft Access?

    - by poo
    I want to my make a search-statement and query things like this select * from table where col like '%vkvk%' But with trial and error I've come to the conclusion that access doesn't work with LIKE or wildcard operators. Does anybody have some other solutions because I ain't so in to access actually, so I really don't know.

    Read the article

  • C++ Allocate Memory Without Activating Constructors

    - by schnozzinkobenstein
    I'm reading in values from a file which I will store in memory as I read them in. I've read on here that the correct way to handle memory location in C++ is to always use new/delete, but if I do: DataType* foo = new DataType[sizeof(DataType) * numDataTypes]; Then that's going to call the default constructor for each instance created, and I don't want that. I was going to do this: DataType* foo; char* tempBuffer=new char[sizeof(DataType) * numDataTypes]; foo=(DataType*) tempBuffer; But I figured that would be something poo-poo'd for some kind of type-unsafeness. So what should I do? And in researching for this question now I've seen that some people are saying arrays are bad and vectors are good. I was trying to use arrays more because I thought I was being a bad boy by filling my programs with (what I thought were) slower vectors. What should I be using???

    Read the article

  • How to prove writing specifications beats code cowboys?

    - by Andrew Grant
    So I have a problem. Or rather my friend has a problem, since I would never write about my company on an internet forum. At my friend's company specification writing is, shall we say, a little underused. There's a deeply ingrained culture of writing code first and asking questions later, whether it's for a library routine or a new tool to inflict on their long suffering designers. This of course leads to situations where functionality is partially correct, incorrect, or just completely missing ("oh, just save before trying anything you may want to undo"). This usually results in a loss of productivity for those poor designers, or beta periods where bug-fixing is largely spent implementing things correctly. My friend's found his suggestions of writing (and testing against) specifications to be generally well received. Most of his colleagues have embraced the wonderful feeling of discovering false-assumptions on paper, instead of at 11pm on a Sunday in the middle of beta. Viva La Revolution! However there are a few who poo-poo anything that stands between their task and a keyboard. They laugh at the thought of actually designing anything, and write code with merry abandon. Mostly these are senior, long employed developers, reluctant to "waste time". The problem is that this second group of heretics invariably produce things (or at least something) quicker than the first. Subsequently this becomes justification along the lines of "It's pointless to write specifications for something as simple as an image resizer! Oh and those bugs where width!=height or the image uses RLE just need a few tweaks". And now the question :) Other than saying "told you so" at the end of a project, what are some good short-term ways to demonstrate how the practice of writing functional or technical specifications leads to better software in the long run? Cheers!

    Read the article

  • Java Appengine APPSTATS causing java out of memory error

    - by aloo
    I have several servlets in my java appengine app that do in memory sorting and take on the order of seconds to complete. These complete error free. However, I recently enabled appstats for appengine and started receiving the following error: java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source) at java.lang.AbstractStringBuilder.append(Unknown Source) at java.lang.StringBuilder.append(Unknown Source) at java.lang.StringBuilder.append(Unknown Source) at java.lang.StringBuilder.append(Unknown Source) at com.google.appengine.repackaged.com.google.protobuf.TextFormat$TextGenerator.write(TextFormat.java:344) at com.google.appengine.repackaged.com.google.protobuf.TextFormat$TextGenerator.print(TextFormat.java:332) at com.google.appengine.repackaged.com.google.protobuf.TextFormat.printUnknownFields(TextFormat.java:249) at com.google.appengine.repackaged.com.google.protobuf.TextFormat.print(TextFormat.java:47) at com.google.appengine.repackaged.com.google.protobuf.TextFormat.printToString(TextFormat.java:73) at com.google.appengine.tools.appstats.Recorder.makeSummary(Recorder.java:157) at com.google.appengine.tools.appstats.Recorder.makeSyncCall(Recorder.java:239) at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:98) at com.google.appengine.api.datastore.DatastoreApiHelper.makeSyncCall(DatastoreApiHelper.java:54) at com.google.appengine.api.datastore.PreparedQueryImpl.runQuery(PreparedQueryImpl.java:127) at com.google.appengine.api.datastore.PreparedQueryImpl.asQueryResultList(PreparedQueryImpl.java:81) at org.datanucleus.store.appengine.query.DatastoreQuery.fulfillEntityQuery(DatastoreQuery.java:379) at org.datanucleus.store.appengine.query.DatastoreQuery.executeQuery(DatastoreQuery.java:289) at org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(DatastoreQuery.java:239) at org.datanucleus.store.appengine.query.JDOQLQuery.performExecute(JDOQLQuery.java:89) at org.datanucleus.store.query.Query.executeQuery(Query.java:1489) at org.datanucleus.store.query.Query.executeWithArray(Query.java:1371) at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:243) at com.poo.pooserver.dataaccess.DataAccessHelper.getPooStream(DataAccessHelper.java:204) at com.poo.pooserver.GetPooStreamServlet.doPost(GetPooStreamServlet.java:58) at javax.servlet.http.HttpServlet.service(HttpServlet.java:713) at javax.servlet.http.HttpServlet.service(HttpServlet.java:806) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at com.google.appengine.tools.appstats.AppstatsFilter.doFilter(AppstatsFilter.java:92) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)

    Read the article

  • Private WCF Web Service

    - by Bram
    I'm kind of a newb to WCF Web Services and have created a service. Here is what I'm after: If someone vists http://somesite.com/Poo.svc they are rejected straight off the bat (404 or something) Only I can add a reference to the service in VS. What I'm after is making the WCF service totally private. Any ideas?

    Read the article

  • When are references declared in a switch statement?

    - by sandis
    To my surprise this code works fine: int i = 2; switch(i) { case 1: String myString = "foo"; break; case 2: myString = "poo"; System.out.println(myString); } But the String reference should never be declared? Could it be that all variables under every case always are declared no matter what, or how is this resolved?

    Read the article

  • PHP Detect if any URL variables have been set

    - by zuk1
    Hey guys, it's kind of hard to explain but basically I want to detect if any variables have been set through the URL. So with my IF statement all of the following should return true: http://domain.com/index.php?m=100 http://domain.com/index.php?q=harhar http://domain.com/index.php?variable=poo&crazy=yes and all the following return false: http://domain.com/index.php http://domain.com/test.php http://domain.com/no_variables.php Any ideas?

    Read the article

  • Why doesn't Java allow for the creaton of generic arrays?

    - by byte
    There are plenty of questions on stackoverflow from people who have attempted to create an array of generics like so: ArrayList<Foo>[] poo = new ArrayList<Foo>[5]; And the answer of course is that the Java specification doesn't allow you to declare an array of generics. My question however is why ? What is the technical reason underlying this restriction in the java language or java vm? It's a technical curiosity I've always wondered about.

    Read the article

  • Visual Studio Talk Show #115 is now online - Entity Framework 4 (French)

    - by guybarrette
    http://www.visualstudiotalkshow.com Matthieu Mezil: Entity Framework 4 Nous discutons avec Matthieu Mezil de la version 4 de Entity Framework (EF4). Entre autres, on évaluera avec Matthieu en quoi cette nouvelle version qui sera inclus avec Visual Studio 2010 permet de concevoir un ORM (Object Relational Mapper) avec une implémentation Agile. Matthieu Mezil est consultant formateur chez Access IT à Paris. MVP C# et speaker INETA, il s’est spécialisé sur l’Entity Framework. Il anime régulièrement des conférences sur ce sujet, notamment dans le cadre d’évènements Microsoft. MCT, Matthieu a également écrit plusieurs formations sur la POO, le langage C# et bien sûr sur l’Entity Framework qu’il anime fréquemment. Dans le cadre de son travail, il est souvent amené à travailler avec le Microsoft Technology Center de Paris. Matthieu est également un bloggeur important: en français sur http://blogs.codes-sources.com/matthieu et en anglais sur http://msmvps.com/blogs/matthieu. Télécharger l'émission Si vous désirez un accès direct au fichier audio en format MP3, nous vous invitons à télécharger le fichier en utilisant un des boutons ci-dessous. Si vous désirez utiliser le feed RSS pour télécharger l'émission, nous vous invitons à vous abonnez en utilisant le bouton ci-dessous. Si vous désirez utiliser le répertoire iTunes Podcast pour télécharger l'émission, nous vous encourageons à vous abonnez en utilisant le bouton ci-dessous. var addthis_pub="guybarrette";

    Read the article

  • CodePlex Daily Summary for Tuesday, November 06, 2012

    CodePlex Daily Summary for Tuesday, November 06, 2012Popular ReleasesMetodología General Ajustada - MGA: 03.04.01: Cambios Parmenio: Se desarrollan las opciones de los botones Siguiente y Anterior en todos los formularios de Identificación y Preparación. Cambios John: Integración de código con cambios enviados por Parmenio Bonilla. Generación de instaladores. Soporte técnico por correo electrónico, telefónico y en sitio.DictationTool: DictationCool-WPF: • Open a media file to start a new dication. • Open a dct file to continue a dictation. • Compare your dictation with original text if exists. • Save your dictation to dct file, and restore it to continue later. • Save the compared result to html file.SSIS Expression Editor & Tester: Expression Editor and Tester v1.0.8.0: Getting Started Download and extract the files, no install required. The ExpressionEditor.zip download contains a folder for each SQL Server version. ExpressionEditor2005 ExpressionEditor2008 ExpressionEditor2012 Changes Fixed issues 32868 and 33291 raised by BIDS Helper users. No functional changes from previous release. Versions There are three versions included, all built from the same code with the same functionality, but each targeting a different release of SQL Server. The downlo...LINQ to Twitter: LINQ to Twitter Beta v2.1.2: Now supports Windows Phone 8. Supports .NET 3.5, .NET 4.0, Silverlight 4.0, Windows Phone 7.1, Windows Phone 8, Client Profile, and Windows 8. 100% Twitter API coverage. Now supports Twitter API v1.1! LINQ to Twitter Samples contains example code for using LINQ to Twitter with various .NET technologies. Downloadable source code also has C# samples in the LinqToTwitterDemo project and VB samples in the LinqToTwitterDemoVB project. Also on NuGet.Resume Search: Version 1.0.0.3: - updates to messages - slight change to UIMCEBuddy 2.x: MCEBuddy 2.3.7: Changelog for 2.3.7 (32bit and 64bit) 1. Improved performance of MP4 Fast and M4V Fast Profiles (no deinterlacing, removed --decomb) 2. Improved priority handling 3. Added support for Pausing and Resume conversions 4. Added support for fallback to source directory if network destination directory is unavailable 5. MCEBuddy now installs ShowAnalyzer during installation 6. Added support for long description atom in iTunesKuick Application & ORM Framework: Version 1.0.15322.29505 - Released 2012-11-05: Fix bugs and add new features.FoxyXLS: FoxyXLS Releases: Source code and samplesMySQL Tuner for Windows: 0.2: Welcome to the second beta of MySQL Tuner for Windows! This release fixes a critical bug in 0.1 where it would not work with recent version of MySQL server. Be warned that there will be bugs in this release, so please do not use on production or critical systems. Do post details of issues found to the issue tracker, and I will endeavour to fix them, when I can. I would love to have your feedback, and if possible your support! Requirements Microsoft .NET Framework 4.0 (http://www.microsoft....Dyanamic Reports (RDLC) - SharePoint 2010 Visual WebPart: Initial Release: This is a Initial Release.HTML Renderer: HTML Renderer 1.0.0.0 (3): Major performance improvement (http://theartofdev.wordpress.com/2012/10/25/how-i-optimized-html-renderer-and-fell-in-love-with-vs-profiler/) Minor fixes raised in issue tracker and discussions.ProDinner - ASP.NET MVC Sample (EF4.4, N-Tier, jQuery): 8: update to ASP.net MVC Awesome 3.0 udpate to EntityFramework 4.4 update to MVC 4 added dinners grid on homepageASP.net MVC Awesome - jQuery Ajax Helpers: 3.0: added Grid helper added XML Documentation added textbox helper added Client Side API for AjaxList removed .SearchButton from AjaxList AjaxForm and Confirm helpers have been merged into the Form helper optimized html output for AjaxDropdown, AjaxList, Autocomplete works on MVC 3 and 4BlogEngine.NET: BlogEngine.NET 2.7: Cheap ASP.NET Hosting - $4.95/Month - Click Here!! Click Here for More Info Cheap ASP.NET Hosting - $4.95/Month - Click Here! If you want to set up and start using BlogEngine.NET right away, you should download the Web project. If you want to extend or modify BlogEngine.NET, you should download the source code. If you are upgrading from a previous version of BlogEngine.NET, please take a look at the Upgrading to BlogEngine.NET 2.7 instructions. If you looking for Web Application Project, ...Launchbar: Launchbar 4.2.2.0: This release is the first step in cleaning up the code and using all the latest features of .NET 4.5 Changes 4.2.2 (2012-11-02) Improved handling of left clicks 4.1.0 (2012-10-17) Removed tray icon Assembly renamed and signed with strong name Note When you upgrade, Launchbar will start with the default settings. You can import your previous settings by following these steps: Run Launchbar and just save the settings without configuring anything Shutdown Launchbar Go to the folder %LOCA...Mouse Jiggler: MouseJiggle-1.3: This adds the much-requested minimize-to-tray feature to Mouse Jiggler.Umbraco CMS: Umbraco 4.10.0 Release Candidate: This is a Release Candidate, which means that if we do not find any major issues in the next week, we will release this version as the final release of 4.10.0 on November 9th, 2012. The documentation for the MVC bits still lives in the Github version of the docs for now and will be updated on our.umbraco.org with the final release of 4.10.0. Browse the documentation here: https://github.com/umbraco/Umbraco4Docs/tree/4.8.0/Documentation/Reference/Mvc If you want to do only MVC then make sur...Skype Auto Recorder: SkypeAutoRecorder 1.3.4: New icon and images. Reworked settings window. Implemented high-quality sound encoding. Implemented a possibility to produce stereo records. Added buttons with system-wide hot keys for manual starting and canceling of recording. Added buttons for opening folder with records. Added Help button. Fixed an issue when recording is continuing after call end. Fixed an issue when recording doesn't start. Fixed several bugs and improved stability. Major refactoring and optimization...Python Tools for Visual Studio: Python Tools for Visual Studio 1.5: We’re pleased to announce the release of Python Tools for Visual Studio 1.5 RTM. Python Tools for Visual Studio (PTVS) is an open-source plug-in for Visual Studio which supports programming with the Python language. PTVS supports a broad range of features including CPython/IronPython, Edit/Intellisense/Debug/Profile, Cloud, HPC, IPython, etc. support. For a quick overview of the general IDE experience, please watch this video There are a number of exciting improvement in this release comp...AssaultCube Reloaded: 2.5.5: Linux has Ubuntu 11.10 32-bit precompiled binaries and Ubuntu 10.10 64-bit precompiled binaries, but you can compile your own as it also contains the source. If you are using Mac or other operating systems, please wait while we try to package for those OSes. Try to compile it. If it fails, download a virtual machine. The server pack is ready for both Windows and Linux, but you might need to compile your own for Linux (source included) Changelog: Fixed potential bot bugs: Map change, OpenAL...New Projects1105p1: just a testAssaultCube Reloaded Launcher: This is the official ACR Launcher For AssaultCube Reloaded. Betting Manager: This project allows the users to store and analyze all their betting activities.BTalk: Simple communicator with encryption capability.Chronozoom Extensions: This project adds a touch interface to the original chronozoom source code, as well as adding an intuitive way to integrate new data into chronozoom easily.CloudClipX: CloudClipx is a simple clipboard monitor that optionally connects to a cloud service where you can upload your most recent clips and retrieve them from your mobcodeplexproject01: The project is okcodeplexproject02: Jean well done summaryDelayed Reaction: Delayed Reaction is a mini library designed to help with application event distribution. Events can fire from any method in your code in any form or window and be distributed to any window that registered for the event. Events can also be fired with a delay or become sticky. Dyanamic Reports (RDLC) - SharePoint 2010 Visual WebPart: SharePoint 2010 Visual Web Part solution to create RDLC reports on fly, based on lists/libraries available in SharePoint 2010 Portal.Eight OData: Consuming an OData feedFreelance: Freelance projectgraphdrawing: graph drawingGrasshoppers Time Board: Application for measure time during floorball match. Can be used also for socker or other game. HCyber: A Cyberminer Search Engine using the KWIC system.lcwineight: lcs win eight projectMeta Protector: MetaProtector is a DotNetNuke module intended to help sites apply additional Meta tags to their markup. MetroEEG: Mindwave for Windows Phone: Windows Phone 8 API for Minewave Mobile EEG Headset. minipp: This is a test project.mleai: A test project for ml.MVC Multi Layer Best Practices App: MVC Multi Layer Best Practices AppNon-Unique Key Dictionary: A dictionary that does not require unique keys for values. nTribeHR: .NET wrapper for TribeHR web services.Object Serialiser: Object Instance to Object Initialiser Syntax serialiserOrchard Metro JS library: Metro JS is a JavaScript plugin for jQuery developed to easily enable Metro interfaces on the web.Pasty Cloud Clipboard Client: A windows forms application for managing your Pasty cloud clipboard. Also includes a separate API wrapper that can be used independently.PowerComboBox: PowerComboBox is an enhanced ComboBox control. Programmed in Visual Basic, PowerComboBox adds 4 new features, Hovering; Backcolour; Checkboxes; Groups.project4: my summaryProjet POO IMA: Projet POO IMAQuickShot: Quickshot is a desktop screen capture utility that allows you to upload your captures directly to the popular image hosting website, imgur. RePro - NFe: Aplicativo de integração com ERP’s para emissão e distribuição de NFe.Resume Search: Search, filter and parse user resumes in PDF, .DOC, .DOCX format into properly organized database format.Script-base POP3 Connector for Exchange: This is a script based POP3 connector for Exchange. It works with all Exchange having "Pickup folder"Squadron for SharePoint 2010: Squadron is a: - Collection of SharePoint 2010 utility modules - Created with Windows Forms application - Plugin enabled modules - Free SRS Subscription Manager: This utility allows you to re-execute subscriptions in Microsoft SQL Server Reporting ServicesStart Screen Button: Windows 8 / Server 2012 taskbar button to bring up the Start Screen. Useful for RDP, VNC, LogMeIn, etc.TableSizer: A Windows Live Writer plugin that automatically sets the width property of every table to a configurable value prior to publishing the post.TodayHumor for Windows: Windows Phone? ?? ??? ?? ?????????. Towers of Hanoi 3D: A simple Towers of Hanoi 3D game for the Windows Store. Developed with the Visual Studio 3D Starter Kit - http://aka.ms/vs3dkitTweet 4 ME: Tweet 4 ME is a Java Micro Edition (MIDP 2.0 CLDC 1.0) based Twitter client built with a custom GUI framework. The application is part of a college project.UWE Bristol - Robotic Pick and Place System 2012: A robot arm pick and place will be trained to repeatedly move an item from one location to another. The training and control input will be from a 4x4 keypad.

    Read the article

  • Backreferences in lookbehind

    - by polygenelubricants
    Can you use backreferences in a lookbehind? Let's say I want to split wherever behind me a character is repeated twice. String REGEX1 = "(?<=(.)\\1)"; // DOESN'T WORK! String REGEX2 = "(?<=(?=(.)\\1)..)"; // WORKS! System.out.println(java.util.Arrays.toString( "Bazooka killed the poor aardvark (yummy!)" .split(REGEX2) )); // prints "[Bazoo, ka kill, ed the poo, r aa, rdvark (yumm, y!)]" Using REGEX2 (where the backreference is in a lookahead nested inside a lookbehind) works, but REGEX1 gives this error at run-time: Look-behind group does not have an obvious maximum length near index 8 (?<=(.)\1) ^ This sort of make sense, I suppose, because in general the backreference can capture a string of any length (if the regex compiler is a bit smarter, though, it could determine that \1 is (.) in this case, and therefore has a finite length). So is there a way to use a backreference in a lookbehind? And if there isn't, can you always work around it using this nested lookahead? Are there other commonly-used techniques?

    Read the article

  • How can I make this method more Scalalicious

    - by Neil Chambers
    I have a function that calculates the left and right node values for some collection of treeNodes given a simple node.id, node.parentId association. It's very simple and works well enough...but, well, I am wondering if there is a more idiomatic approach. Specifically is there a way to track the left/right values without using some externally tracked value but still keep the tasty recursion. /* * A tree node */ case class TreeNode(val id:String, val parentId: String){ var left: Int = 0 var right: Int = 0 } /* * a method to compute the left/right node values */ def walktree(node: TreeNode) = { /* * increment state for the inner function */ var c = 0 /* * A method to set the increment state */ def increment = { c+=1; c } // poo /* * the tasty inner method * treeNodes is a List[TreeNode] */ def walk(node: TreeNode): Unit = { node.left = increment /* * recurse on all direct descendants */ treeNodes filter( _.parentId == node.id) foreach (walk(_)) node.right = increment } walk(node) } walktree(someRootNode) Edit - The list of nodes is taken from a database. Pulling the nodes into a proper tree would take too much time. I am pulling a flat list into memory and all I have is an association via node id's as pertains to parents and children. Adding left/right node values allows me to get a snapshop of all children (and childrens children) with a single SQL query. The calculation needs to run very quickly in order to maintain data integrity should parent-child associations change (which they do very frequently). In addition to using the awesome Scala collections I've also boosted speed by using parallel processing for some pre/post filtering on the tree nodes. I wanted to find a more idiomatic way of tracking the left/right node values. After looking at the answers listed I have settled on this synthesised version: def walktree(node: TreeNode) = { def walk(node: TreeNode, counter: Int): Int = { node.left = counter node.right = treeNodes .filter( _.parentId == node.id) .foldLeft(counter+1) { (counter, curnode) => walk(curnode, counter) + 1 } node.right } walk(node,1) }

    Read the article

1