Search Results

Search found 1774 results on 71 pages for 'steve melvin'.

Page 63/71 | < Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >

  • D3.js binding an object to data and appending for each key

    - by frshca
    I'm a D3.js newbie and I'm learning how to play around with data. Let's say I have an object with names as keys, and each key has an array of numbers like this: var userdata = { 'John' : [0, 1, 3, 9, 8, 7], 'Harry': [0, 10, 7, 1, 1, 11], 'Steve': [3, 1, 4, 4, 4, 17], 'Adam' : [4, 77, 2, 13, 11, 13] }; For each user, I would like to append an SVG object and then plot the line with the array of values for that user. So here is my assumption of how that would look based on tutorials, but I know it is incorrect. This is to show my limited knowledge and give better understanding of what I'm doing: First I should create the line var line = d3.svg.line().interpolate('basis'); Then I want to bind the data to my body and append an svg element for each key: d3.select('body') .selectAll('svg') .data(userdata) .enter() .append('svg') .append(line) .x(function(d, i) { return i; }) .y(function(d) { return d[i]; }); So am I close??

    Read the article

  • iPhone dev question: "No provisioned iPhone OS is connected" error, I don't know what else to try fo

    - by dsobol
    Howdy, I am trying to compile and install my first application onto my iPhone after setting up a profile and certificate. At this point I am getting the "No provisioned iPhone OS is connected" error when I Build & Go. I am using iPhone OS 3.1.3, and Xcode 3.2.2 on 10.6.3. • I have verified that my iPhone is connected to my development machine (it is seen on the computer by both iTunes and Xcode Organizer (in Organizer, it has the green dot next to it)). • I have rebooted the iPhone and restarted Xcode multiple times. • I have verified that the Bundle Identifier in my appname.plist is set to com.. (with the appropriate values between the angle brackets). I have looked the error message up on the web, and so far have not found a hint that has gotten me over the hump.... Thanks for any and all assistance! Regards, Steve O'Sullivan

    Read the article

  • How to get a Magento product collection as a comma separated list of SKU's

    - by Sam
    Hi All I have a custom module I made for Magento. From the admin, there is a multi-select list of store products. The selected products from this are output in the form of a comma separated list of SKU's - for example: // Get Featured Products from list $configData = Mage::getStoreConfig('featured_products'); $featuredlist = $configData['settings']['featuredlist']; This gives the output in the following format if I < ?php echo $featuredlist ?: cn,asc,ken,steve,nine,ecco,ana Is it possible to output a collection from a category in the same way, as a comma separated list of SKU's? I currently use the following to get a collection: $_productCollection = Mage::getResourceModel('reports/product_collection') ->addAttributeToSelect('*') ->addAttributeToFilter('visibility', $visibility) ->addCategoryFilter($_category); $_productCollection->load()

    Read the article

  • Using Java to retrieve the CPU Usage for Window's Processes

    - by stjowa
    Hello all, I am looking for a Java solution to finding the CPU usage for a running process in Windows. After looking around the web, there seems to be little information on a solution in Java. Keep in mind, I am not looking to find the CPU usage for the JVM, but any process running in Windows at the time. I am able to retrieve the memory usage in Java by using the exec("tasklist.exe ... ") to retrieve and parse process information. Although there is an aggregate CPU cycle timer for each process, I do not see a CPU usage column. Any help would be greatly appreciated. Also, if possible, I would like to stay away from C libraries; however, if there is no other alternative, a solution by that means would be appropriate. Thanks a lot, Steve

    Read the article

  • Do you have any tips for comments code to keep them in step with the code?

    - by Rob Wells
    G'day, I've read both of Steve McConnell's excellent Code Complete books "Code Complete" and "Code Complete 2" and was wondering if people have any other suggestions for commenting code. My commenting mantra could be summed up by the basic idea of expressing "what the code below cannot say". While enjoying this interesting blog post by Jeff about commenting I was still left wondering "When coding, when do you feel a comment is required?" Edit: Oops. Seems to be a duplicate of this question http://stackoverflow.com/questions/121945/how-do-you-like-your-comments so sorry for the noise. Thanks to my, seemingly, SO shadow for pointing it out - wouldn't have thought I was that interesting. Now off to read the original post and see if it is relevant. Edit: I meant to emphasise the best appraoch to ensure that your comments will stay in step with the code. Maybe expressing an intent rather than the mechansim for instance.

    Read the article

  • How do I set an array in one class with another array in another class

    - by Stef
    I've populated and array with data like this in one class... PowerClass.h NSMutableArray pickerArray; @property (nonatomic, retain) NSMutableArray pickerArray; - PowerClass.m @synthesize pickerArray; @implementation NSMutableArray *array = [[NSArray alloc] initWithObjects:@"stef", @"steve", @"baddamans", @"jonny", nil]; pickerArray = [NSMutableArray arrayWithArray:array]; And I'm trying to set the Array in another class WeekClass.h PowerClass *powerClass; NSMutableArray *pickerData; @property (nonatomic, retain) NSMutableArray pickerData; @property (nonatomic, retain) PowerClass *powerClass; WeekClass.m @implementation pickerData = [NSMutableArray arrayWithArray:powerClass.pickerArray]; I have no errors or warnings. It just crashes. The NSLog says that the powerClass.pickerArray is NULL. Please help point me in the right direction.

    Read the article

  • developing iphone apps on windows is it worth the hassel

    - by kalpaitch
    I'm only after a simple solution and won't be developing anything particularly complex. But I'm wondering whether the hassals of developing an iPhone app NOT on MacOS are really that significant to avoid giving it a shot. Bearing in mind that I do have access to a mac every now and again. So I would be able to compile it using the official Apple supported SDK, but I just want to be able to develop it in my own environment (windows laptop). I heard someone mention a while ago that there are various objective C compilers that allow writing code in various other web technologies as well. Are these really valid. And am I alone in thinking Apple's whole attitude towards this is totally imoral. Charging $200 for the privelege of having your app unequivocally rejected etc etc and then not being allowed to look directly at Steve Jobs or his golden retrievers.

    Read the article

  • ASP.NET MVC Alter Markup before Output

    - by youwhut
    Hi, Excuse my limited knoweldge here. In the past I have used Steve Sanderson's method to HTML encode by default at runtime: http://blog.stevensanderson.com/2007/12/19/aspnet-mvc-prevent-xss-with-automatic-html-encoding/ I have a need to alter img src and a href attributes before they are spat out in the user's browser. There is a solution using JavaScript but this is not ideal for several reasons. Intercepting the compiler is not an option because of unnecessarily using Response.Write for trivial HTML. Is there something I can do with HTTP modules or the view engine? Any thoughts? Cheers.

    Read the article

  • Can I set a property on an object that is only declared on the instance type, when I don't know the

    - by WilberBeast
    Let me explain. I have a List into which I am adding various ASP.NET controls. I then wish to loop through the list and set a CssClass, however not every Control supports the property CssClass. What I would like to do is test if the underlying instance type supports the CssClass property and set it, but I'm not sure how to do the conversion prior to setting the property since I don't know the type of each Control object. I know that I can use typeof or x.GetType(), but I'm not sure how to use these to convert the controls back to the instance type in order to test for and then set the property. Actually I seem to have solved this, so I thought that I would post the code here for others. foreach (Control c in controlList) { PropertyInfo pi = c.GetType().GetProperty("CssClass"); if (pi != null) pi.SetValue(c, "desired_css_class", null); } I hope that this helps someone else as I has taken me hours to research these 2 lines of code. Cheers Steve

    Read the article

  • iPhone Simulator Error: dyld: Symbol not found: _objc_collect_if_needed

    - by freespace
    I have been seeing the following error message a lot whenever I run something in the simulator: dyld: Symbol not found: _objc_collect_if_needed Referenced from: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation Expected in: /usr/lib/libobjc.A.dylib in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.sdk/System/Library/Frameworks/Foundation.framework/Foundation I am running XCode 3.2.2 on OS X 10.6.3, and have reinstalled the SDK twice with no avail. This error makes running any code on the simulator something of a Russian Roulette, but with 5 out of 6 chambers loaded. I have checked the files mentioned in the error message, and they all checkout as being present. This sometimes go away if I restart XCode. Other times I have to logout, or even restart. And sometimes nothing works. I have googled this, even tried apple's developer forums. Other than a reference to this in the MonoTouch list, this bug appears to be completely unknown otherwise. Anything help would be greatly appreciated - this is a real PITA. Cheers, Steve

    Read the article

  • Generic Method to find the tuples used for computation in Postgres?

    - by Rahul
    If I have a table col1 | name | pay ------+------------------+------ 1 | Steve Jobs | 1006 2 | Mike Markkula | 1007 3 | Mike Scott | 1978 4 | John Sculley | 1983 5 | Michael Spindler | 1653 The user executes a sum query which sums the pay of people getting paid more than $1500. Is there a way to also implicitly know which tuples have been used which satisfy the condition for sum ? I know you can separately write another query to just return the primary key ids which satisfy the condition. But, Is there any other way to do that in the same query ? probably rewrite the query in some way ? or... any suggestion ?

    Read the article

  • Do you have any tips for comments to keep them in step with the code? [closed]

    - by Rob Wells
    Possible Duplicate: How do you like your comments? G'day, I've read both of Steve McConnell's excellent Code Complete books "Code Complete" and "Code Complete 2" and was wondering if people have any other suggestions for commenting code. My commenting mantra could be summed up by the basic idea of expressing "what the code below cannot say". While enjoying this interesting blog post by Jeff about commenting I was still left wondering "When coding, when do you feel a comment is required?" Edit: Oops. Seems to be a duplicate of this question http://stackoverflow.com/questions/121945/how-do-you-like-your-comments so sorry for the noise. Thanks to my, seemingly, SO shadow for pointing it out - wouldn't have thought I was that interesting. Now off to read the original post and see if it is relevant. Edit: I meant to emphasise the best appraoch to ensure that your comments will stay in step with the code. Maybe expressing an intent rather than the mechansim for instance.

    Read the article

  • Filtering out emoticons using sed

    - by user349222
    Hello, I have a grep expression using cygwin grep on Win. grep -a "\\,,/\|\\m/\|\\m/\\>\.</\\m/\|:u" all_fbs.txt > rockon_fbs.txt Once I identify the emoticon class, however, I want to strip them out of the data. However, the same regexp above within a sed results in a syntax error (yes, I realize I could use /d instead of //g, but this doesn't make a difference, I still get the error.) sed "s/\(\\,,/\|\\m/\|\\m/\\>\.</\\m/\|:u\)*//g" The full line is: grep -a "\\,,/\|\\m/\|\\m/\\>\.</\\m/\|:u" all_fbs.txt | sed "s/\(\\,,/\|\\m/\|\\m/\\>\.</\\m/\|:u\)*//g" | sed "s/^/ROCKON\t/" > rockon_fbs.txt The result is: sed: -e expression #1, char 14: unknown option to `s' I know it's coming from the sed regexp I'm asking about it b/c if I remove that portion of the full line, then I get no error (but, of course, the emoticons are not filtered out). Thanks in advance, Steve

    Read the article

  • How can I store all the properties of a class in an array of objects?

    - by Richard77
    Hello, Let's say I've a class myClass which has few properties, such as property1, property2, perperty3, etc. Now, I'd like to populate an array with each of those properties so that, I can access each of them through its index. Is there an automatic way of doing so? Here's an example from SportsStore (Pro ASPN.NET MVC/Steve Sanderson/Apress) on how to gather all the active controllers in the the 'Assembly'. var controllerTypes = from t in Assembly.GetExecutingAssembly().GetTypes() where typeof(IController).IsAssignableFrom(t) select t; foreach(Type t in controllerTypes) //Do something I wonder if there is some thing like the one above I can use to collect (only) properties of a class and store them in a array, no matter each one's type value (int, string, or custom type) I hope I was able to express myself clearly. Otherwise I can amend the text. Thanks for helping.

    Read the article

  • SQL Server: collect values in an aggregation temporarily and reuse in the same query

    - by Erwin Brandstetter
    How do I accumulate values in t-SQL? AFAIK there is no ARRAY type. I want to reuse the values like demonstrated in this PostgreSQL example using array_agg(). SELECT a[1] || a[i] AS foo ,a[2] || a[5] AS bar -- assuming we have >= 5 rows for simplicity FROM ( SELECT array_agg(text_col ORDER BY text_col) AS a ,count(*)::int4 AS i FROM tbl WHERE id between 10 AND 100 ) x How would I best solve this with t-SQL? Best I could come up with are two CTE and subselects: ;WITH x AS ( SELECT row_number() OVER (ORDER BY name) AS rn ,name AS a FROM #t WHERE id between 10 AND 100 ), i AS ( SELECT count(*) AS i FROM x ) SELECT (SELECT a FROM x WHERE rn = 1) + (SELECT a FROM x WHERE rn = i) AS foo ,(SELECT a FROM x WHERE rn = 2) + (SELECT a FROM x WHERE rn = 5) AS bar FROM i Test setup: CREATE TABLE #t( id INT PRIMARY KEY ,name NVARCHAR(100)) INSERT INTO #t VALUES (3 , 'John') ,(5 , 'Mary') ,(8 , 'Michael') ,(13, 'Steve') ,(21, 'Jack') ,(34, 'Pete') ,(57, 'Ami') ,(88, 'Bob') Is there a simpler way?

    Read the article

  • Autoconf macros for Apache and conf.d install process?

    - by Stephen Burke
    I have a package that is using the autotools to build and install. Part of the package is a website that can be run on the local machine. So in the package there is a .conf file that is meant to be either copied or linked to the /etc/apache2/conf.d directory. What's the standard way that packages would do this? If possible, I'd like for the user not to have an extra step to make the website work. I'd like to have them install the package and then be able to browse to http://localhost/newpackage to get up and running. Also, is there a way that autoconf knows about the apache install or a standard way through then environment some how? If someone could point me in the right direction that would be great. Steve

    Read the article

  • 3G/Edge/GPRS IP addresses and geocoding

    - by LookitsPuck
    Hey all! So, we're looking to develop a mobile website. On this mobile website, we'd like to automatically populate a user's location (with proper fallback) based on their IP address. I'm aware of geocoding a location based on IP address (mapping to latitude, longitude and then getting the location with that information). However, I'm curious how accurate this information is? Are mobile devices assigned IP's when they utilize 3G, EDGE, and GPRS connections? I think so. If that is so, does it map to a relatively accurate location? It doesn't have to be spot on, but relatively accurate would be nice. Thanks! -Steve

    Read the article

  • Arrays in JavaScript

    - by caramel1991
    While reading a book about JavaScript I stumbled across an example: var names = new Array("Paul","Catherine","Steve"); var ages = new Array(31,29,34); var concatArray; concatArray = names.concat(ages); My question is, why doesn't the variable concatArray need to be define as a new Array() in order to store the concatenated data for both arrays name and ages , but when I try to treat the concatArray as an array by adding another line of code "document.write(concatArray[0])", it works just like an array and shows me the data stored in the first element. I just wonder why I'm not declaring the concatArray as a new array, yet it still works as one.

    Read the article

  • Difficulty to start up with basic unit test (Sample from my book -- SportsStore)

    - by Richard77
    Hello, I'm really new in TDD and, actually, I'm trying to follow the sample from my book (SportsStore -- Pro ASP.NET MVC Framework/Steve Sanderson/APRESS). I'm on pages 103-105. Although there are more on this, as new to all of this, I'm concerned with the following statements. ProductsController controller = new ProductsController(repository); var result = controller.List(2); //... regarding the above statements, when I write this (as in the book), var products = result.ViewData.Model as IList<Product>; I get a compiler error "System.Web.MVC.ActionResult" does not contain a definition for ViewData ..." But, when I remove the List() from the statement, then the compiler error disapear. var result = controller.List(2);//Doesn't work var result = controller;//It works Is something wrong there? I checked Apress website for that book, but there is nothing listed as Errata or issue. So I'm really lost. Thanks for helping

    Read the article

  • JavaScript socket vs. Flash socket?

    - by Dr.Dredel
    Steve Jobs just posted this article on why Apple rejects Flash... http://www.apple.com/hotnews/thoughts-on-flash/ I agree that javascript and css can be used to replicate some of Flash's animation, though Flash does all sorts of scaling and tweening that is incredibly powerful, and I'm not sure that there's anything comparable in javascript, if there is, I certainly haven't seen it. However, my question is about the socket. Flash has an incredibly powerful openSocket class that allows you to connect to a server and have the server and the client talk back and forth to one another. As far as I know there is no equivalent class in Javascript. Am I mistaken? Is there some secret mystery Ajax class that replicates the openSocket? If not, then that feature alone makes Flash an invaluable tool. I'm interested in all answers though... and yes this IS a programming question! :)

    Read the article

  • Can't Insert Data Into Tables Containing Auto Increment Primary Key Using PHP Prepared Statements

    - by Drew
    I know I have that my connection to the database works, and a test I did using no auto-increment id worked fine for me. The code below refuses to work and I can't find a a way around it. My table has 3 columns, ID (auto increment), name and value. What do I need to change in order to get this to work? Thanks in advance //create placeholder query $query = "INSERT INTO prepared_test (name, value) VALUES (?,?)"; //prepare the query $stmt = mysqli_prepare($connection, $query); $name = 'steve'; $value = 45; mysqli_bind_param($stmt, array(MYSQLI_BIND_STRING, MYSQLI_BIND_INT), $name, $value); mysqli_execute($stmt); if(mysqli_stmt_affected_rows($stmt) != 1) die("issues"); mysqli_stmt_close($stmt); $connection-close();

    Read the article

  • Deleting a Collection with NHibernate Using the Criteria API

    - by lomaxx
    I think I know what the answer to this question is probably going to be, but I thought I'd go ahead and ask it anyway. It appears that within NHibernate if I do something like this: IList<Customer> customers = Session.CreateCriteria(typeof(Customer)) .Add(Restrictions.Eq("Name", "Steve") .List<Customer>(); And I want to then delete that list of customers. From what I can tell the only way to do it is like this: foreach(var customer in customers) { Session.Delete(customer); } But what I'm wondering is if there's any way I can just go: Session.Delete(customers); And delete the entire collection with a single call?

    Read the article

  • Get Specific Data From Array, Based On Another Value

    - by A Smith
    I have an array that outputs these values: Array ( [0] => stdClass Object ( [ID] => 6585 [COLOR] => red [Name] => steve ) [1] => stdClass Object ( [ID] => 5476 [COLOR] => blue [Name] => sol ) [2] => stdClass Object ( [ID] => 7564 [COLOR] => yellow [Name] => jake ) [3] => stdClass Object ( [ID] => 3465 [COLOR] => green [Name] => helen ) ) Now, I will know the ID of the person, and I need the get the COLOR value for that specific value set. How is this best achieved please?

    Read the article

  • How to override built-in getattr in Python?

    - by Stephen Gross
    I know how to override an object's getattr() to handle calls to undefined object functions. However, I would like to achieve the same behavior for the builtin getattr() function. For instance, consider code like this: call_some_undefined_function() Normally, that simply produces an error: Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'call_some_undefined_function' is not defined I want to override getattr() so that I can intercept the call to "call_some_undefined_function()" and figure out what to do. Is this possible? Thanks, --Steve

    Read the article

  • Limiting the number of threads executing a method at a single time.

    - by Steve_
    We have a situation where we want to limit the number of paralell requests our application can make to its application server. We have potentially 100+ background threads running that will want to at some point make a call to the application server but only want 5 threads to be able to call SendMessage() (or whatever the method will be) at any one time. What is the best way of achieving this? I have considered using some sort of gatekeeper object that blocks threads coming into the method until the number of threads executing in it has dropped below the threshold. Would this be a reasonable solution or am I overlooking the fact that this might be dirty/dangerous? We are developing in C#.NET 3.5. Thanks, Steve

    Read the article

< Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >