Search Results

Search found 2013 results on 81 pages for 'matt lewis'.

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

  • Accessing preloaded images from parent script too use in child script. How?

    - by Matt
    I'm trying to update an image in a parent window with clickable links in a child window. I've preloaded the images in the parent window with one javascript file. "scriptss.js" My problem is I need to access the preloaded images of the parent window with the childscript "scriptremote.js" Thanks again for all the JS Help! The JS (scriptss.js) var newWindow = null; window.onload = init; var i = 0; image_object = new Image(); myImages = new Array(); // declare array myImages[0]="images/img1.jpg" // load array myImages[1]="images/img2.jpg" myImages[2]="images/img3.jpg" myImages[3]="images/img4.jpg" myImages[4]="images/img5.jpg" myImages[5]="images/img6.jpg" Here's the HTML for parent window: <img src="" width="200px" height="200px" id="myimage" name="myimage" /></img> Here's the JS for child window: window.onload = init; function init() { } function first_image() { window.parent.image_object.src = myImages[3]; //Problem happens here I think document.getElementById("myimage")window.parent.src = window.parent.image_object.src; } The HTML Child Window <h1>My Remote</h1> <a href="#" id="first" onclick="first_image()" >First Image</a> </br>

    Read the article

  • CSS 3 columns, why is the third column taking over the other 2?

    - by Matt Dawdy
    Here is the smallest amount of code that clearly illustrates my problem: <html> <body> <div style="float: left; width: 200px;">One</div> <div style="float: left; width: 200px;">Two</div> <div style="background-color: #f0f;">Three</div> </body> </html> The first 2 divs are supposed to be 2 left columns. The 3rd should take up the rest of the page. Eventually, I'm going to add options to hide and show the 2 columns on the left. But, why is the color purple extending all the way to the browser's left edge? I am trying to get it to start at the word "Three".

    Read the article

  • Calling a constructor to reinitialize variables doesn't seem to work?

    - by Matt
    I wanted to run 1,000 iterations of a program, so set a counter for 1000 in main. I needed to reinitialize various variables after each iteration, and since the class constructor had all the initializations already written out - I decided to call that after each iteration, with the result of each iteration being stored in a variable in main. However, when I called the constructor, it had no effect...it took me a while to figure out - but it didn't reinitialize anything! I created a function exactly like the constructor - so the object would have its own version. When I called that, it reinitialized everything as I expected. int main() { Class MyClass() int counter = 0; while ( counter < 1000 ) { stuff happens } Class(); // This is how I tried to call the constructor initially. // After doing some reading here, I tried: // Class::Class(); // - but that didn't work either /* Later I used... MyClass.function_like_my_constructor; // this worked perfectly */ } ...Could someone try to explain why what I did was wrong, or didn't work, or was silly or what have you? I mean - mentally, I just figured - crap, I can call this constructor and have all this stuff reinitialized. Are constructors (ideally) ONLY called when an object is created?

    Read the article

  • Postion of & to denote reference type

    - by Matt H
    I was wondering whether to put the ampersand (&) after the variable type or before the variable name. To put it simply, I want to know which one is the conventional style or the standard, or if it is entirely down to preference. int &x; or int& x;

    Read the article

  • Signs that a SQL statement is dangerous

    - by Matt
    Hi, I want to develop a function in PHP that checks how dangerous a SQL statement is. When i say dangerous i mean, certain symbols, characters or strings that are used to get data from a database that the user shouldnt see. For example: SELECT * FROM users WHERE userId = '1' can be injected in several ways. Although i clean the params, i also want to monitor how safe the query is to run. Thanks in advance

    Read the article

  • Reading from CSVs in Python repeatedly?

    - by matt
    I'm trying to check the value of extracted data against a csv I already have. It will only loop through the rows of the CSV once, I can only check one value of feed.items(). Is there a value I need to reset somewhere? Is there a better/more efficient way to do this? Thanks. orig = csv.reader(open("googlel.csv", "rb"), delimiter = ';') goodrows = [] for feed in gotfeeds: for link,comments in feed.items(): for row in orig: print link if link in row[1]: row.append(comments) goodrows.append(row)

    Read the article

  • How can I handle validation of non-latin script input in PHP?

    - by Matt
    I am trying to adapt a php application to handle non-latin scripts (specifically: Japanese, simplified Chinese and Arabic). The app's data validation routines make frequent use of regular expressions to check input, but I am not sure how to adapt the \w character type to other languages without installing additional locales on the system (which I cannot rely on). Previous developers to have worked on the app have simply added needed characters to the regexes as the number of languages we supported grew (you frequently see "[\wÀÁÂÃÄÅÆÇÈÉ... etc" in the code), but I can't really do this for all the alphabets I need to support now. Does anybody out there have some advice on how to tackle this?

    Read the article

  • iphone app working on most devices but not a few

    - by Matt Facer
    Hi there. I have recently been rewriting some of my iphone app because a couple of users have said it was crashing on certain events. The event in question is when I add a new XIB to the view using the following code AddItemViewController * add_item = [[AddItemViewController alloc] initWithNibName:@"AddItem" bundle:[NSBundle mainBundle]]; [self presentModalViewController:add_item animated:YES]; [add_item setViewFormat:2]; [add_item release]; it works perfectly on my iphone and a mate's ipod touch (both running 3.1.3) but another user on an ipod touch also with 3.1.3 says it crashes when the function above is called. Why could this be happening? Surely if it works on one device it should work on another?! Is there a better way to add a view which maybe doesnt crash? I have also disabled all the code on the loading xib - so it literally is loading a near blank page. It's SO annoying!! Thanks for any help.

    Read the article

  • How to switch data pins on/off on parallel port?

    - by Matt
    I want to simply switch certain data pins on and off, so that they can control a set of relays. I'm not asking about the hardware bit (should be easy), but I don't know where to begin writing the software. I don't want a high level library that can send bytes to a device - I literally want to switch on/off certain pins. I'm running Linux and I want to do this in Java, so would I just need a library? It would be nice if the library has good documentation and is easy to use, but if not then a short example code will help me get started.

    Read the article

  • PHP - How do i display the first 20 li then have a link to display more (gallery)

    - by Matt Rogers
    I want to display about 20 li on a page with a link at the bottom that says something like 'display more'. This link will then clear the first 20 and display the next 20. How should i go about doing this. (I am creating a gallery) I was thinking about using PHP and MySQL. However for what I am doing I do not really need to store it in a database so is there an easier way of doing it only using html, php or javascript? thanks

    Read the article

  • style a navigation link when a particular div is shown

    - by Matt Meadows
    I have JQuery working to show a particular div when a certain link is clicked. I have managed to apply the effect I'm after with the main navigation bar through id'ing the body tag and using css to style when the id is found. However, i'd like to apply the same effect to the sub navigation when a certain div is present. How the main navigation is styled: HTML: <nav> <ul> <li id="nav-home"><a href="index.html">Home</a></li> <li id="nav-showreel"><a href="showreel.html">Showreel</a></li> <li id="nav-portfolio"><a href="portfolio.html">Portfolio</a></li> <li>Contact</li> </ul> </nav> CSS: body#home li#nav-home, body#portfolio li#nav-portfolio { background: url("Images/Nav_Underline.png") no-repeat; background-position: center bottom; color: white; } (Other links havent been added to styling as those pages are still in development) How the sub navigation is structured: <nav id="portfolioNav"> <ul> <li id="portfolio-compositing"><a id="compositingWork" href="#">Compositing</a></li> <li id="portfolio-animation"><a id="animationWork" href="#">Animation</a></li> <li id="portfolio-motionGfx"><a id="GFXWork" href="#">Motion Graphics</a></li> <li id="portfolio-3D"><a id="3DWork" href="#">3D</a></li> </ul> </nav> As you can see, its similar format to the main navigation, however i've tried the same approach and it doesn't work :( The Javascript that switches the divs on the navigation click: <script type="text/javascript"> $(document).ready(function() { $('#3DWork').click(function(){ $('#portfolioWork').load('portfolioContent.html #Portfolio3D'); }); $('#GFXWork').click(function(){ $('#portfolioWork').load('portfolioContent.html #motionGraphics'); }); $('#compositingWork').click(function(){ $('#portfolioWork').load('portfolioContent.html #PortfolioCompositing'); }); $('#animationWork').click(function(){ $('#portfolioWork').load('portfolioContent.html #PortfolioAnimation'); }); }); </script> JSFiddle for full HTML & CSS : JSFiddle File The effect I'm After:

    Read the article

  • Credit card validation with regexp using test()

    - by Matt
    I'm trying to complete some homework and it appears the book might have gotten it wrong. I have a simple html page that allows user to pick a credit card in our case american express. The user then enters a number and evalutes that number based on a regular expression. My question ends up being when test() evaluates the number it returns a boolean or a string? I should then compare that string or boolean? True == true should fire off the code in a nested if statement. Heres what the book gives me as valid code: if(document.forms[0].cardName.value == "American Express") { var cardProtocol = new RegExp("^3[47][0-9]{13}$"); //REGEX ENTRY HERE if(cardProtocol.test(document.forms[0].cardNumber.value)) document.forms[0].ccResult.value = "Valid credit card number"; } The above code doesn't work in firefox. I've tried modifying it with 2 alerts to make sure the number is good and the boolean is good...and still no luck: if(document.forms[0].cardName.value == "American Express") { var cardProtocol = new RegExp("^3[47][0-9]{13}$"); //REGEX ENTRY HERE <------ alert(document.forms[0].cardNumber.value) alert(cardProtocol.test(document.forms[0].cardNumber.value)) if((cardProtocol.test(document.forms[0].cardNumber.value)) == true ) // <--Problem { document.forms[0].ccResult.value = "Valid credit card number"; } else { document.forms[0].ccResult.value = "Invalid credit card number"; } } Any ideas? the if loop is the culprit but I'm not figuring out why it is not working. Please throw up the code for the if loop! Thanks for the help!

    Read the article

  • How to distinguish between new and returning anonymous Drupal users?

    - by Matt V.
    Is there an easy way (or a module) in Drupal to distinguish between anonymous users who have never created an account versus those who are returning but are not currently logged in? For non-returning (ie, completely new) users, I'd like to have a front page that is very streamlined and focused on registration as the call-to-action. However, if someone is a returning user but not currently logged in, I'd like to present a lot more information on the front page and have login as the main call-to-action. I realize both pages would still need to have both login and register options available, I just want to make the focus significantly different between the two.

    Read the article

  • How to get the value of an attribute from XML file in PHP?

    - by Matt
    Hi, Sorry if this seems like an easy question, but I've started pulling hair out on this... I have a XML file which looks like this... <VAR VarNum="90"> <option>1</option> </VAR> I'm trying to get the VarNum. So far I've been successful using the follow code to get the other information: $xml=simplexml_load_file($file); $option=$xml->option; I just can't get VarNum (the attribute value I think?) Thanks!

    Read the article

  • CSS: How to set remaining width as %, but having knowledge of only pixels

    - by Mega Matt
    Hi all, I've seen this question asked in a couple other contexts on SO, but I thought it would be worth asking again for my particular case. I'm trying to create some re-usable CSS classes for more consistency and less clutter on my site, and I'm stuck on trying to standardize one thing I use frequently. I have a container div that I don't want to set the height for (because it will vary depending on where on the site it is), and inside it is a header div, and then an unordered list of items, all with CSS applied to them. It looks a lot like this: I want the unordered list to take up the remaining room in the container div, knowing that the header div is 18px tall. I just don't know how to specify the list's height as "the result of 100% minus 18px". Does anyone have any advice in this situation? Thanks very much.

    Read the article

  • Javascript Date: Ensure getMinutes(), getHours(), getSeconds() puts 0 in front if necessary

    - by Mega Matt
    Hi all, Looking for a creative way to be sure values that come from the getHours, getMinutes, and getSeconds() method for the javascript Date object return "06" instead of 6 (for example). Are there any parameters that I don't know about? Obviously I could write a function that does it by checking the length and prepending a "0" if need be, but I thought there might be something more streamlined than that. Thanks.

    Read the article

  • Most common account names used in ssh brute force attacks

    - by Charles Stewart
    Does anyone maintain lists of the most frequently guessed account names that are used by attackers brute-forcing ssh? For your amusement, from my main server's logs over the last month (43 313 failed ssh attempts), with root not getting as far as sshd: cas@txtproof:~$ grep -e sshd /var/log/auth* | awk ' { print $8 }' | sort | uniq -c | sort | tail -n 13 32 administrator 32 stephen 34 administration 34 sales 34 user 35 matt 35 postgres 38 mysql 42 oracle 44 guest 86 test 90 admin 16513 checking

    Read the article

  • Ubuntu 10.04 (LTS) DomU on Debian Wheezy Dom0 Xen 4

    - by mdjp
    I have been forced to move from a Centos Dom0 xen 3 Centos + Ubuntu Lucid DomUs To Debian Wheezy Dom0 Xen 4 Ubuntu Lucid DomUs However although I can create new DomUs on wheezy I cannot get them to boot. pygrub returns Error: Bootloader didn't return any data I have ensured that the disks are the correct way around in the xen.cfg and also that the grub config is correct. If I try to run pygrub manually eg /usr/bin/pygrub /dev/volgroup/disk I get Illegal instruction can anyone offer me any advice on this? Thanks Matt

    Read the article

  • Chef bootstrap giving 401 unauthorized

    - by loddy1234
    I'm trying to bootstrap a new chef node by running: knife bootstrap <server ip> -x lewis -N gitlab --sudo But I get the following output: [Mon, 03 Sep 2012 14:45:17 +0000] INFO: *** Chef 10.12.0 *** [Mon, 03 Sep 2012 14:45:17 +0000] INFO: Client key /etc/chef/client.pem is not present - registering [Mon, 03 Sep 2012 14:45:17 +0000] INFO: HTTP Request Returned 401 Unauthorized: Failed to authenticate. Ensure that your client key is valid. [Mon, 03 Sep 2012 14:45:17 +0000] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out [Mon, 03 Sep 2012 14:45:17 +0000] FATAL: Net::HTTPServerException: 401 "Unauthorized" My chef server is running Ubuntu 12.04 x32 and the machine I'm trying to bootstrap is running CentOS 6.3 x64 Any idea what's going wrong?

    Read the article

  • links for 2010-05-17

    - by Bob Rhubart
    Government 2.0 Expo 2010 - May 25-27, 2010 Washington DC WIKI page covering Oracle's sponsorship of Government 2.0 Expo 2010 in Washington, DC USA. (tags: architect enterprise2.0 oracle otn) @myfear: DOAG 2010 Conference and Exhibition CfP still running "In more than 300 speakers slots the DOAG 2010 Conference, which takes place November 16th-18th, 2010 in Nuremberg, provides current information on the successful use of the Oracle products as well as practical tips and tricks and exchange of experience. Stay up to date with informations and follow @doagkonferenz on twitter." -- Oracle ACE Director Marcus Eisele (tags: oracle otn oracleace DOAG) @oracle_ace: MySQL Track at ODTUG Kaleidoscope "It looks like MySQL will be making a splash in DC this year at ODTUG Kaleidoscope. The conference organizers have announced a new MySQL track. Is this a good thing? MySQL is not really an Oracle tool, per se. It is, however, an Oracle database. As a database geek, and as an Oracle ACE Director, I like it." -- Oracle ACE Director Lewis Cunningham (tags: oracle otn oracleace mysql ODTUG) @ORACLENERD: Exadata Quotes Oracle ACE Chet "ORACLENERD"Justice leverages Hollywood to share his thoughts on Oracle Exadata. (tags: oracle otn oracleace exadata) Anthony Shorten: Accessing JMX for Oracle WebLogic 11g Anthony Shortens illustrates one way to allow "a console like jconsole to remotely monitor and manage Oracle WebLogic using the JMX Mbeans." (tags: oracle otn weblogic java ejb jmx) The Aquarium: Oracle Blogs, Tweeters, Feeds and Planets The Aquarium shares "some useful links to Oracle-related content that I recently discovered, as seen from the perspective of a 'Sun classic' Oracle employee." (tags: oracle sun blogs community) Anthony Shorten: JMX Based Monitoring - Part Two - JVM Monitoring The second article in Anthony Shorten's series focusing on the JMX based monitoring capabilities possible with the Oracle Utilities Application Framework. (tags: oracle otn virtualization jvm jmx java)

    Read the article

  • Alice In Wonderland: Good, but not Great

    - by Theo Moore
    We went to see Alice In Wonderland today. We both like Tim Burton a lot (the stranger the better) and like Johnny Depp very well also. After seeing all the previews and such, we were fired up to see this film. Honestly, I thought it was good but not great. I was prepared to be wow-ed, but I wasn't. Perhaps I expected too much. I did like it, but I'll not own it nor would I expect to see it again...unless someone I know decides they want to see it. I was about to say something to reassure you that I wasn't going to provide any spoilers but two things occurred to me: one, I never give spoilers and two, why worry about spoilers for a film that so closely follows a book? My comments about the film are hard to describe, but the basic gist is that it doesn't really feel like it..."works" to me. I can't get any more specific than that, much as I'd like to do so. Something about it seems sort of disjointed and not in that Alice way you'd expect. My only specific comment is that I didn't like the actor who plays Alice very well. She was very flat and just didn't sell he character to me. She seemed a bit, well, plastic. Depp was as good as you'd expect him to be, I am happy to say. Obviously Lewis Carroll couldn't have imagined this made into film, but I can't help thinking that he'd see this and say that Depp was the perfect Mad Hatter. So, I'd definitely recommend seeing it (we saw it in 3D which was cool, but not really necessary) at least once, but don't be surprised if you're kinda meh afterwards.

    Read the article

  • The Retail Week Conference 2012 - Interview with Paul Dickson

    - by user801960
    Recently we attended the Retail Week Conference at the Hilton London Metropole Hotel in London. The conference proves to be an inspirational meeting of retail minds and the insight gained from both the speakers and the other delegates is invaluable. In particular we enjoyed hearing from Charlie Mayfield, Chairman at John Lewis Partnership, about understanding how the consumer is viewing the ever changing world of retail; a session on how to encourage brand-loyal multichannel activities from Robin Terrell of House of Fraser with Alan White of the N Brown Group, Vince Russell from The Cloud and Lucy Neville-Rolfe from Tesco; and a fascinating session from Tim Steiner, Chief Executive of Ocado, about how the business makes it as easy as possible for consumers to shop on their various platforms, which included some surprising usage statistics. Oracle's own Vice President of Retail, Paul Dickson, also held a session with Richard Pennycook, Group Finance Director at Morrisons, about the role of technology in accelerating and supporting the business strategy. Morrisons' 'Evolve' programme takes a litte-and-often approach to updating its technology infrastructure to spread cost and keep the adoption process gentle for staff, and the session explored how the process works and how Oracle's technology underpins the programme to optimise their operations using actionable insight. We had a quick chat with Paul Dickson at the session to get his thoughts on the programme - the video is below. We also filmed the whole presentation, so keep checking back on this blog if you're interested in seeing it.

    Read the article

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