Search Results

Search found 2492 results on 100 pages for 'dave maple'.

Page 71/100 | < Previous Page | 67 68 69 70 71 72 73 74 75 76 77 78  | Next Page >

  • In AS3/Flex, how can I get from flat data to hierarchical data?

    - by Dave S
    I have some data that gets pulled out of a database and mapped to an arraycollection. This data has a field called parentid, and I would like to map the data into a new arraycollection with hierarchical information to then feed to an advanced data grid. I think I'm basically trying to take the parent object, add a new property/field/variable of type ArrayCollection called children and then remove the child object from the original list and clone it into the children array? Any help would be greatly appreciated, and I apologize ahead of time for this code: private function PutChildrenWithParents(accountData : ArrayCollection) : ArrayCollection{ var pos_inner:int = 0; var pos_outer:int = 0; while(pos_outer < accountData.length){ if (accountData[pos_outer].ParentId != null){ pos_inner = 0; while(pos_inner < accountData.length){ if (accountData[pos_inner].Id == accountData[pos_outer].ParentId){ accountData.addItemAt( accountData[pos_inner] + {children:new ArrayCollection(accountData[pos_outer])}, pos_inner ); accountData.removeItemAt(pos_outer); accountData.removeItemAt(pos_inner+1); } pos_inner++; } } pos_outer++; } return accountData; }

    Read the article

  • c# Create a unique name with a GUID

    - by Dave Rook
    I am creating a back up solution. I doubt there is anything new in what I'm trying to achieve. Before copying the file I want to take a backup of the destination file in case anything becomes corrupt. This means renaming the file. I have to be careful when renaming in case the file already exists and adding a 01 to the end is not safe. My question is, based upon not finding the answer else where, would adding a GUID to the file name work. So, if my file was called file01.txt, renaming the file to file01.txtGUID (where GUID is the generated GUID), I could then perform my back up of that file (at this instance having 2 back ups) and then, after ensuring the file has copied (by comparing length of file to the source), delete the file with the GUID in the name. I know the GUID is not 100% guaranteed to be unique but would this suffice?

    Read the article

  • pitfalls with mixing storage engines in mysql with django?

    - by Dave Orr
    I'm running a django system over mysql in amazon's cloud, and the database default is innodb. But now I want to put a fulltext index on a couple of tables for searching, which evidently requires myisam. The obvious solution is to just tell mysql to ALTER TABLE to myisam, but are there going to be any issues with that? One that comes to mind is that I'll have to remember to do that any time I build a new version of the database, which should theoretically be rare, but there doesn't seem to be a way to tell django to please set the storage engine at the table level. I guess I could write a migration (we use south). Any other things I might be missing? What could possibly go wrong?

    Read the article

  • How to create a web server?

    - by Dave
    I understand that there are already alot of web server out there. But i feel like creating one for learning purpose. Is it something i should try to figure out and any guides or tutorials on this?

    Read the article

  • How do you manage web navigation info in your application?

    - by Dave
    I’m building an application where different users will have different menu items available to them depending on what they’ve paid for. There will also be multiple levels to the menu hierarchy. What’s the best approach to this problem? I’m assuming I need a database table that represents the menu hierarchy, including the parent-child relationships of the nodes in the navigation as well as the sorting of the items. Then another table which I use to manage whether a user is authorized to access a particular item in that table. When I render the view, I’d reference the menus, and the access rights of the user to output the menu, and I’d also need a function to check that same authorization from each controller in case a user manually types in a URL of a controller they’re not supposed to have access to. Is this the right approach? Any suggestions for caching this to prevent the constant look-ups of this type of info? I’m open to any suggestions on how you may have approached this type of requirement.

    Read the article

  • iPhone framework three20

    - by Dave
    What's the best way to customize the Table Items to include two images. I'd like to set one as a background with another layered above it along with text. Any help is much appreciated.

    Read the article

  • A new MEF error I've not seen before -- "The export is not assignable to type..."

    - by Dave
    I was very surprised to get this error today, as it's one that I've never encountered before. Everything in the code looked okay, so I did some searches. The previous questions and their respective answers didn't help. This one was solved when the poster made sure his assembly references were consistent. I don't have this issue right now because I'm currently referencing another project in my solution. This one was solved when the poster was instructed to use ImportMany, but I am already using it (I think properly, too) to try to load multiple plugins This one was solved when the poster realized that there was a platform target mismatch. I've already gone through my projects to ensure that everything targets x86. So here's what I am trying to do. I have a plugin that owns a connection to a device. I might also need to be able to share that connection with another plugin. I decided that the cleanest way to do this was to create an interface that would allow the slave plugin to request its own connection to the device. Let's just call it IConnectionSharer. If the slave plugin does not need to borrow this connection and has its own, then it should use its own implementation of IConnectionSharer to connect to the device. My "master" plugin (the one that owns the connection to the device) implements IConnectionSharer. It also exports this via ExportAttribute. My "slave" plugin assembly defines a class that also implements and exports IConnectionSharer. When the application loads, the intent is for my slave plugin, via MEF, to enumerate all IConnectionSharers and store them in an IEnumerable<IConnectionSharer>. It does so like this: [ImportMany] public IEnumerable<IConnectionSharer> AllSharedConnections { get; set; } But during part composition, I get the error the export 'Company.MasterPlugin (ContractName="IConnectionSharer")' is not assignable to type 'IConnectionSharer'. The error message itself seems clear enough -- it's as if MEF thinks my master plugin doesn't inherit from IConnectionSharer... but it does! Can anyone suggest further debugging strategies? I'm going to start the painful process of single stepping through the MEF source.

    Read the article

  • conversion from C++ to C

    - by Dave
    Hi I am interested by converting some code from C++ to C (mostly because i need to use the library with/from other C program and other language) . C is a better gateway for that I am interested to replicate few C++ concept like inheritance for inst . Does anyone know good references or has already work on some similar issues. For inst how to deal with inheritance , adding new members variable/ methods to child class , ... Thx for your help

    Read the article

  • JQuery cycle plugin + PNG overlay + Image alt text as title conflict

    - by Dave
    I am trying to achive the following: Create an image gallery using the JQuery Cycle plugin that shows images with titles (taken from the alt text) Each image has a PNG absolutley posiioned over the top to achieve rounded corners effect Here's my gallery HTML: <div id="slideshow" class="pics"> <div class="photo-container" > <img src="/path/to/image" alt="alt text as title" /> <img class="mask" src="path/to/mask" /> </div> </div><!-- /slideshow --> <div id="title"></div> Here's my Jquery gallery function: $(function() { $('#slideshow').after('<div id="nav" class="nav"><span style="margin: 0 5px 0 30px;">next image</span>').cycle({ fx: 'fade', timeout: 0, cleartypeNoBg: true, pager: '#nav', next: '#slideshow', before: onBefore }); function onBefore() { $('#title').html(this.alt); } $('#nav a').after('<span>&gt;</span>') }); </script> Here is my CSS that handles the mask: .photo-container { position: relative; display: block; overflow:hidden; border: none; } img.mask { position: absolute; top: 0; left: 0; overflow:hidden; border: none; } The above does not output the alt text into the "title" div. When I remove the mask, it works: <div id="slideshow" class="pics"> <img src="/path/to/image" alt="alt text as title" /> </div><!-- /slideshow --> <div id="title"></div> Any ideas why the additonal div / image is casuing the title to not display? Thank you

    Read the article

  • Flow charts and algorithms

    - by Dave
    Hello there, I am from a networking background and completely new to algorithm and flow charts, so could you please assist me with the following? Draw flow charts for the following algorithmss: State whether a number entered at the keyboard is even or odd. Calculate the mean of a five numbers entered by the user from the keyboard Count the number of characters and the number of words that are in a text file Many thanks in advance!

    Read the article

  • Problems with my JS array undefined x 7

    - by Dave
    I have an array im trying to loop through to create a new type of array specific to my current page. My array looks like this: //$_SESSION['data'] = Array ( [0] => 1 [1] => 0 [2] => Tom [8] => 1 [4] => 1 [5] => Array ( [7] => Array ( [0] => Andrew [1] => 1 [2] => 1 [4] => 0 [5] => avatar.jpg [6] => 1 ) ) [6] => Array ( [0] => 1 [1] => 2 ) ) So in my JS file i have this: var stats = <? echo $_SESSION['data'][5]); ?> ; //this is the array my_data = new Array(); for(var key in stats){ if(key in my_data){} else { //prevent double entry my_data[key] = new Array(); my_data[key][0] = stats[key][6]; my_data[key][1] = stats[key][5]; my_data[key][2] = stats[key][2]; my_data[key][3] = stats[key][0]; } } console.log(my_data); Now in console.log i get this : [undefined × 7, Array[4] 0: "1" 1: "avatar.jpg" 2: "1" 3: "Andrew" length: 4 __proto__: Array[0] ] I'm wondering why it is saying undefined x7?

    Read the article

  • Python - Memory Leak

    - by Dave
    I'm working on solving a memory leak in my Python application. Here's the thing - it really only appears to happen on Windows Server 2008 (not R2) but not earlier versions of Windows, and it also doesn't look like it's happening on Linux (although I haven't done nearly as much testing on Linux). To troubleshoot it, I set up debugging on the garbage collector: gc.set_debug(gc.DEBUG_UNCOLLECTABLE | gc.DEBUG_INSTANCES | gc.DEBUG_OBJECTS) Then, periodically, I log the contents of gc.garbage. Thing is, gc.garbage is always empty, yet my memory usage goes up and up and up. Very puzzling.

    Read the article

  • SSIS Permissions issue

    - by Dave
    Hi All, How can we set permissions for users to only allow them to download SSIS packages from the production server and but deny them permissions to run any package in the Server. http://msdn.microsoft.com/en-us/library/ms141053(SQL.90).aspx If i assign users to any of the DB roles db_dtsadmin, db_dtsltduser, and db_dtsoperator they will automatically have permission to run the package. Appreciate your inputs. Thanks!

    Read the article

  • Need Help Loading and Manipulating Bitmap Data

    - by Dave
    Using VB6, I need to load a bitmap image and subsequently manipulate some of its data - specifically, I want to rotate a section within the image, and in the end keep the image intact with the rotated section. How do I (1) find out where an image gets loaded into memory (a physical address), and (2) in what format is it stored, a 1-D array, 2-D array, or what? Maybe you can even suggest a better way to do this. Thanks.

    Read the article

  • Help me make a jquery AJAXed divs' links work like an iframe.

    - by Dave
    I want to make a few divs on the same page work similar to iframes. Each will load a URL which contains links. When you click on those links I want an AJAX request to go out and replace the div's html with new html from the page of the clicked link. It will be very similar to surfing a page inside an iframe. Here is my code to initially load the divs (this code works): onload: $.ajax({ url: "http://www.foo.com/videos.php", cache: false, success: function(html){ $("#HowToVideos").replaceWith(html); } }); $.ajax({ url: "http://www.foo.com/projects.php", cache: false, success: function(html){ $("#HowToProjects").replaceWith(html); } }); This is a sample of code that I'm not quite sure how to implement but explains the concept. Could I get some help with some selectors(surround in ?'s) and or let me know what is the correct way of doing this? I also want to display a loading icon, which I need to know where the right place to place the function is. $(".ajaxarea a").click(function(){ var linksURL = this.href; // var ParentingAjaxArea = $(this).closest(".ajaxarea");; $.ajax({ url: linksURL, cache: false, success: function(html){ $(ParentingAjaxArea).replaceWith(html); } }); return false; }); $(".ajaxarea").ajaxStart(function(){ // show loading icon });

    Read the article

  • How do I select an option using Spring's form:select tag?

    - by Dave
    I'm using Spring 3.1.1.RELEASE. Using the form:select tag, how do I specify which option should be selected? I want the first one to be selected, but when I put <form:select path="parentOrganization"> <form:option value="" label="Select an Org Type or Parent Org" /> <form:options items="${orgTypesWoParents}" itemValue="id" itemLabel="description" /> <form:option value="" label="=======================" /> </form:select> the last one is selected. I want to preserve the order of how everything is displayed, which is why I've arranged things in this way.

    Read the article

  • ORB forwards to a wrong location

    - by dave-keiture
    I have an orbd started at a virtual host (with the IP A), with some remote object registered. Box that hosts virual boxes has IP B. When client tries to connect to the ORB at A to acquire the NamingContext, ORB replies with a LocationForward message poiniting to host B and port 1049 (like if another ORB would be started at that host). NamingContext is returned successfully, but obviously I'm not able to acqure the objects, registered at the NamingContext (at ORB hosted at A) by the name. Could anyone please explain what's happening? How can I access the orb hosted at A remotely? Thanks in advance.

    Read the article

  • Int - number too large. How to get program to fail?

    - by Dave
    Hi Problem: How do you get a program to fail if a number goes beyond the bounds of its type? This code below gives the wrong answer for sum of primes under 2 million as I'd used an int instead of a long. [TestMethod] public void CalculateTheSumOfPrimesBelow2million() { int result = PrimeTester.calculateTheSumOfPrimesBelow(2000000); // 2million Assert.AreEqual(1, result); // 1,179,908,154 .. this was what I got with an int... // correct answer was 142,913,828,922 with a long } public static class PrimeTester { public static int calculateTheSumOfPrimesBelow(int maxPrimeBelow) { // we know 2 is a prime number int sumOfPrimes = 2; int currentNumberBeingTested = 3; while (currentNumberBeingTested < maxPrimeBelow) { double squareRootOfNumberBeingTested = (double)Math.Sqrt(currentNumberBeingTested); bool isPrime = true; for (int i = 2; i <= squareRootOfNumberBeingTested; i++) { if (currentNumberBeingTested % i == 0) { isPrime = false; break; } } if (isPrime) sumOfPrimes += currentNumberBeingTested; currentNumberBeingTested += 2; // as we don't want to test even numbers } return sumOfPrimes; } }

    Read the article

  • MKMapView Pins Refreshing Color on Click

    - by Dave C
    Hello, I have several custom MKPinAnnotationView on my map with different images(colored pins). Everything works fine until I either click on a pin or change the map to a different view(satellite/road)... when I do either of these, my pins will revert back to the classic red color. Any help would be greatly appreciated.

    Read the article

< Previous Page | 67 68 69 70 71 72 73 74 75 76 77 78  | Next Page >