Search Results

Search found 1782 results on 72 pages for 'steve moser'.

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

  • 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

  • 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

  • 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

  • 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

  • Help with a MySQL SELECT WHERE Clause

    - by Dr. DOT
    A column in my table contains email addresses. I have a text string that contains the a few usernames of email addresses separated by commas. I can make text sting into an array if necessary to get my SELECT WHERE clause to work correctly. Text string search argument is 'bob,sally,steve' I want to produce a WHERE clause that only returns rows where the username portion of the email address in the table matches one of the usernames in my text string search argument. Thus a row with [email protected] would not be returned but [email protected] would be. Does anyone have a WHERE clause sample that produces this result? Thanks.

    Read the article

  • What do gurus say about Requirements Traceability Matrix?

    - by Jaywalker
    Our organization is at CMMI Level 2, and as part of the requirements of the level, we have to maintain an RTM which more or less contains the following entries for each requirement: Requirement Description Reference Section Functional Specification Document Reference Section Design Document Reference Section Test Cases Document Now, this might be an overkill for a small project. But more importantly, this could be a nightmare to maintain when the requirements/ features keep changing, and documents have to be constantly updated. What do the gurus say about this? Should one avoid such level of documentation or are there any tools to manage when a "change" out dates so many artifacts? And by using the term 'gurus', I am not talking of coding champs; rather people like Steve McConnel or others who have worked on commercial projects of medium to large scale. Quotes/ book references/ articles will suit me. EDIT: It's not just requirements that change. Design Document can change; well, even test cases may change.

    Read the article

  • iPad as programming platform--What future do touch screens have with programming?

    - by user94154
    I read this question a few weeks ago. I thought about it when I first saw the iPad. Do you think it would be possible to set up a development environment on the iPad? I think it would be awesome if there was an InstantRails App, a Django App, maybe even 280 North's Atlas could run on it :). Would you develop using an on-screen keyboard and a 10 inch screen? Steve Jobs seems to think touch-screens are the future of web browsing. What Future does touch have with programming?

    Read the article

  • Change of domain deleted data in Team Foundation Server?

    - by glumesc
    Dear All, Maybe my google-fu is failing me, but I cannot seem to find any information on the following: My Windows user account was recently moved, accidentally, to another domain in my company's Active Directory. While in the other domain, I was unable to access my data stored in TFS 2008 (e.g. shelvesets, pending changes, workspaces, etc). I assume this was because it was associated with my ORIGINALDOMAIN\userId account, rather than NEWDOMAIN\userID account. My account has now been moved back to ORIGINALDOMAIN, however I still cannot see any of my data in TFS. In fact, it appears that all of my data (all my shelvesets!) have been deleted. It is almost as if TFS saw that my userId had disappeared from ORIGINALDOMAIN and assumed that I had been "deleted" and thus deleted all my data. Has anybody else encountered this? Is there hope for my data or am I royally stuffed? Thanks in advance, Steve

    Read the article

  • How can I support conditional validation of model properties

    - by Jeff
    I currently have a form that I am building that needs to support two different versions. Each version might use a different subset of form fields. I have to do this to support two different clients, but I don't want to have entirely different controller actions for both. So, I am trying to come up with a way to use a strongly typed model with validation attributes but have some of these attributes be conditional. Some approaches I can think of is similar to steve sanderson's partial validation approach. Where I would clear the model errors in a filter OnActionExecuting based on which version of the form was active. The other approach I was thinking of would to break the model up into pieces using something like class FormModel { public Form1 Form1Model {get; set;} public Form2 FormModel {get; set;} } and then we would validate appropriately depending on

    Read the article

  • Regular Expression .net flavor

    - by user1440109
    Dont ask how this works but currently it does ("^\|(.?)\|*$")....kinda. This removes all extra pipes...part one....I have searched all over no anwser yet. I am using VB2011 beta...asp web form......vb coding though! I want to capture special character pipe (|) which is used to seperate words...i.e. car|truck|van|cycle problem is users lead with, trail with, use multiple, and use spaces before and after...i.e. |||car||truck | van || cycle. another example: george bush|micheal jordon|bill gates|steve jobs <-- this would be correct but when I do remove space it takes correct space out. so I want to get rid of whitespace leading, trailing, any space before | and space after | and only allow one pipe (|)....in between alphanumeric of course.

    Read the article

  • Multi join query returns to many results and improperly matched

    - by Woot4Moo
    I have the following minimal schema in Oracle: http://sqlfiddle.com/#!4/c1ed0/14 The queries I have run yield too many results and this query: select cat.*, status.*, source.* from cats cat, status status, source source Left OUTER JOIN source source2 on source2.sourceid = 1 Right OUTER JOIN status status2 on status2.isStray =0 order by cat.name will yield incorrect results. What I am expecting is a table that looks like the following however I cannot seem to come up with the correct SQL. NAME AGE LENGTH STATUSID CATSOURCE ISSTRAY SOURCEID CATID Adam 1 25 null null null 1 2 Bill 5 1 null null null null null Charles 7 5 null null null null null Steve 12 15 1 1 1 1 1 In plain English what I am looking for is to return all known cats + their associated cat source + their cat status while retaining null values. The only information I will have is the source that I am curious about. I also only want the cats that have a status of either STRAY or UNKNOWN (null)

    Read the article

  • drupal display submenu when parent has been selected

    - by Steven Cheng
    I've have a menu structure that has a depth of 3 levels on a drupal 6 CMS. When I click on a level 1 that has children, the level 2 menu items display fine. If the level 2 has children, it is not showing the level 3. If I check the expanded box the level 3 is displayed however, it displays all the time irrespective of the level 2 that has been selected. It seems to display whenever it's parent level 1 is selected. For further information, the menu items are a mixture of custom links & content links. i.e. Links I've enetered manually when creating the menu and others generated by when creating a node or view display. All I want is to show the children if there are any for the selected parent. Am I missing something fundamental here? Thanks Steve

    Read the article

  • CSV file read fail (PHP )

    - by user1020069
    I am trying to read a csv file (delimited by commas) but unfortunately, it isn't responding as it ought to. I am not so sure what I am doing wrong here, but I'll paste out the contents of the code and the CSV file both : $row = 0; if($handle = fopen("SampleQuizData.csv","r") !== FALSE) { // WORKS UNTIL HERE, SO FILE IS BEING READ while(!feof(handle)){ $line = fgetcsv($handle, 1024, ",") ; echo $line[2]; // DOES NOT WORK } } And the CSV file is (the emails and names have been changed here to protect the identities of the users) parijat,something,[email protected] matthew,durp, [email protected] steve,vai,[email protected] rajni,kanth,[email protected]

    Read the article

  • Help with regex pulling XML data from response body in PHP

    - by spdaly
    I am working on a project that pulls data from JMS queue using PHP and Zend Framework. The HTTP client response is below. All I need is the XML string. I came up with /(.*)<\/RequestDetails/gs which tests ok on http://gskinner.com/RegExr/ but the preg_match call is returning an empty matches array. I'm going to continue to hunt around for a pattern, but thought I would post here as well. Thanks to all who read, etc... Steve UPDATE: I can't get the code to paste correctly. Here's a link to a pastbin: http://pastebin.com/rQxzcfSg

    Read the article

  • how to effectively keep/update postal and telephone code format for each country?

    - by melaos
    hi there, currently we have a table for regex format for phone and postal code for countries that we use to validate when the user register through our forms. but the problem remains on the maintenance on the correctness of these format, thus what's a good way to ensure that we always have the latest copy of this information? is there a web service/etc that i can use to get this? or does it even make sense to keep all these format but instead use a relaxed method to ensure that the user just keys in something which roughly matches the format? the information is used solely for shipping and billing address. we're using asp.net 2.0 btw. thanks ~steve

    Read the article

  • animating adding/removing layers on iPhone

    - by magesteve
    On the iPhone, when you add a sub layer to a visible view's layer, using either -addSublayer: or -removeFromSuperlayer, shouldn't that sub layer appear or disappear in an animated manner (ie. fade in or fade out gradually)? My program animates using layers (not views). When I change a property of a layer like position or image content, then the change does animate (layer streaks around it's parent layer, the layer fades from the old image to the new image), so I obviously have the layers & view setup correctly. However, when I add or remove a sub layer, the change occurs instantly; there is no animation. Reading the references, it says that if the layer is visible, the sub layer should animate when adder or removed. What am I doing wrong? Has anyone had a similar problem, and was able to find a solution? Thank you, Steve Sheets

    Read the article

  • Issue with android tablayout switch tab

    - by user330915
    I am a new android developer, just tried something with Android Tablayout. There are two tabs and one tab has a GridView and the other one has a DatePicker. I created an activity and layout for each tab. The problem is that when I switch to the gridView, the background is not refreshed, and the images are just drawn over the DatePicker, so through images, the DatePicker still can be seen. It really bothers me. What should I do to have a clean background for imageView? Steve

    Read the article

  • Should I use block identifiers ("end;") in my code?

    - by JosephStyons
    Code Complete says it is good practice to always use block identifiers, both for clarity and as a defensive measure. Since reading that book, I've been doing that religiously. Sometimes it seems excessive though, as in the case below. Is Steve McConnell right to insist on always using block identifiers? Which of these would you use? //naughty and brief with myGrid do for currRow := FixedRows to RowCount - 1 do if RowChanged(currRow) then if not(RecordExists(currRow)) then InsertNewRecord(currRow) else UpdateExistingRecord(currRow); //well behaved and verbose with myGrid do begin for currRow := FixedRows to RowCount - 1 do begin if RowChanged(currRow) then begin if not(RecordExists(currRow)) then begin InsertNewRecord(currRow); end //if it didn't exist, so insert it else begin UpdateExistingRecord(currRow); end; //else it existed, so update it end; //if any change end; //for each row in the grid end; //with myGrid

    Read the article

  • Extending Zend_Log for application-specific need

    - by spdaly
    I am building a Zend Framework application that performs jobs submitted by the user. The actions taken need to be logged to a database. I would like to correlate the job with its log entries. Instead of creating my own logging class, I would like to extend Zend_Log since it provides 99% of the functionality that I need. All I need to do is add a foreign key of the job id to the log data model. Is this possible? I'm also looking for a good example of Zend_Log writing to a database. I haven't searched SO yet. I will do that after I post this. Thanks in advance... Steve

    Read the article

  • what do you expect from flash in the near future?

    - by algro
    The recent article of steve jobs link made me think about the future of flash. I'm learning actionscript 3.0 in my studies but is it the right decision still to go for it? I was pretty sure that I will be able to build application in as3 for iphones/ipads in the near future. It seems to me, while I would stay with flash, the market will be polarized by apple and adobe and you will always work double for both clientele, or just lose half of them. Which decision would you take as a designer, if you were still at university and you intend to become a freelancer?

    Read the article

  • Through Java, make a call to Javascript functions on networked device?

    - by stjowa
    I am doing device monitoring on a networked system. I need to know how to make Javascript calls on that device via its IP address to get certain status information (this device's status is only available through Javascript APIs, not SNMP, etc). I am working in Java. ADDED: The specific device is an Amino set-top-box. It has what it calls JMACX: JavaScript Media Access Control Extensions API specification. It allows you within an HTML document to use that API to get MUCH information about the device (cpu usage, channel info, remote-control options, etc.). I need to get this information within a Java program for specific monitoring purposes. Perhaps possible with HTTP requests? Any input would be greatly appreciated. Thanks, Steve

    Read the article

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