Search Results

Search found 2581 results on 104 pages for 'mike crittenden'.

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

  • UIScrollView - with paging enabled, can I "change" the page width?

    - by Mike McMaster
    What's the simplest way to have a scroll view (with pagingEnabled set to YES) have a page width set to something other than the scroll view's bounds? Let me give an example. Suppose I have a scroll view with 10 items, each 150 pixels wide, and my scroll view is 300 pixels wide. If I start with views 1 and 2 visible and scroll horizontally to the right, I want the next "page" to show items 2 and 3. If I scroll one more page to the right, I would see items 3 and 4. Has anyone done this? If not, what strategy would you use?

    Read the article

  • How do I export a package symbol to a namespace in Perl?

    - by Mike
    I'm having trouble understanding how to export a package symbol to a namespace. I've followed the documentation almost identically, but it seems to not know about any of the exporting symbols. mod.pm #!/usr/bin/perl package mod; use strict; use warnings; require Exporter; @ISA = qw(Exporter); @EXPORT=qw($a); our $a=(1); 1; test.pl $ cat test.pl #!/usr/bin/perl use mod; print($a); This is the result of running it $ ./test.pl Global symbol "@ISA" requires explicit package name at mod.pm line 10. Global symbol "@EXPORT" requires explicit package name at mod.pm line 11. Compilation failed in require at ./test.pl line 3. BEGIN failed--compilation aborted at ./test.pl line 3. $ perl -version This is perl, v5.8.4 built for sun4-solaris-64int

    Read the article

  • How can I tell Phusion Passenger which python to use?

    - by Mike
    I'm using Phusion Passenger with a ruby app and I'd also like to set it up to work with an django appengine app I'm working on. Googling for "passenger_wsgi.py" I was able to get the following very simple non-django app working on passenger: passenger_wsgi.py: def application(environ, start_response): response_headers = [('Content-type','text/plain')] start_response('200 OK', response_headers) return ['Hello World!\n'] However, if I add the line import django.core.handlers.wsgi into the mix, I get 'An error occurred importing your passenger_wsgi.py'. By printing out the sys.path I've discovered that at least part of the reason is because Passenger is using the wrong python installation on my machine. How can I configure Passenger (on apache) to use /opt/local/bin/python2.5 instead of the system default python?

    Read the article

  • unix shell, redirect output but keep on stdin

    - by Mike
    I'd like to have a shell script redirect stdout of a child process in the following manner Redirect stdout to a file Display the output of the process in real time I know I could do something like #!/bin/sh ./child > file cat file But that would not display stdout in real time. For instance, if the child was #!/bin/sh echo 1 sleep 1 echo 2 The user would see "1" and "2" printed at the same time

    Read the article

  • Javascript parent and child window functions

    - by Mike Thornley
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>Lab 9-3</TITLE> <SCRIPT LANGUAGE="JavaScript"> <!-- function myFunction(){ myWin = open("","","width=200,height=200"); with(myWin.document){ open(); write("<HTML><HEAD><TITLE>Child Window</TITLE>"); write("<SCRIPT>function myTest(){"); write("alert('This function is defined in the child window "); write("and is called from the parent window.'); this.focus();}"); write("</SCRIPT></HEAD><BODY><H3>Child Window</H3><HR>"); write("<FORM><INPUT TYPE='button' VALUE='parent window function' "); // Use opener property write("onClick='opener.winFunction();'>"); write("<P><INPUT TYPE='button' VALUE='close window' "); write("onClick='window.close();'>"); write("</FORM></BODY></HTML>"); close(); } } function winFunction(){ alert("This function is defined in the parent window\n" + "and is called from the child window."); myWin.focus(); } //--> </SCRIPT> </HEAD> <BODY> <H3>CIW Web Languages</H3> <HR> <FORM NAME="myForm"> <INPUT TYPE="button" VALUE="open new window" onClick="myFunction();"> <!-- Invoke child window function --> <input type="button" value="Click to open child window" onclick="javascript:void(myWin.myTest());"/> </FORM> <P> </BODY> </HTML> To explain further what my initial query was, the code above, should open the child window (myWin) with the second button, the 'Open child window' button without the need to open the window with the first button or do anything else. It should simply call the myWin.myTest()function The child window will open when the second button is pressed but needs to have the child window open first (first button push) before it'll work. This is not the intended purpose, the 'Open child window' button should work without anything else needing to be done. For some reason the parent window isn't communicating with the myWin window and myTest fucntion. It's not homework, it's part of a certification course lab and is coded in the manner I have been shown to understand as correct. DTD isn't included as the focus is the JavaScript. I code correctly with regards to that and other W3C requirements.

    Read the article

  • How can I set opacity of the reflection when using -webkit-box-reflect?

    - by Mike Palmer
    I've been playing with the -webkit-box-reflect property in Chrome and can achieve a reflection that fades with the following code (it's example code from the Webkit blog): -webkit-box-reflect: below 5px -webkit-gradient( linear, left top, left bottom, from(transparent), color-stop(0.5, transparent), to(white) ); Problem is, I want to set the opacity for the mask to a more subtle setting, but it seems to be choking on rgba(). Has anybody been able to successfully get different levels of opacity? Any help is appreciated, thanks!

    Read the article

  • Javascript how can I trigger an event that was prevented

    - by Mike Robinson
    In my app a user clicks a link to another page. I'd like to track that in Omniture with a custom event, so I've bound the omniture s.t() event to the click event. How can I make certain the event fires before the next page is requested? I've considered event.preventDefault() on the click event of the link, but I actually want the original event to occur, just not immediately.

    Read the article

  • size of an image

    - by Mike
    From times to times I have to know the width and height of images. I am using the following code: UIImage *imageU = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"myImage.png"]]; CGFloat imageW = CGImageGetWidth(imageU.CGImage); CGFloat imageH = CGImageGetHeight(imageU.CGImage); My question is that if it is there any other way to know the width and height of an image, in pixels, without having to load the image on a variable, that's probably consuming memory. Can the dimensions be read from the file directly without loading the whole image? thanks.

    Read the article

  • Help installing delayed_job

    - by Mike
    I'm trying to use collectiveidea's delayed_job gem The installation instructions include Rake tasks are not automatically loaded from gems, so you’ll need to add the following to your Rakefile: begin require 'delayed/tasks' rescue LoadError STDERR.puts "Run `rake gems:install` to install delayed_job" end Where is my Rakefile? And what is a Rakefile?

    Read the article

  • JUnit4 + Eclipse "An internal error occured during Launching"

    - by Mike
    Hello I'm trying to run JUnit4 test cases on Eclipse 3.4.2 but it's not even starting for me. I am sure that I properly have junit-4.7.jar in my build path and the test application. Here is a simple example that illustrates my problem package test; import org.junit.Before; import org.junit.Test; public class UTest { @Test public void test() { } @Before public void setUp() throws Exception { } } This compiles fine Then I do "Run JUnit Test case" from Eclipse and I get an error dialog with this message "Launching UTest' has encountered a problem An internal error occurred during: "Launching UTest". java.lang.NullPointerException I'm not sure how to figure out what exactly generating this NullPointerException. Some pointers would be appreciated

    Read the article

  • sorting a list of objects by value php

    - by Mike
    I have a list of objects: class Beer { var $name; var $id; var $style; var $brewery; var $rate; function getName() { return $this->name; } function getID() { return $this->id; } function getStyle() { return $this->style; } function getBrewery() { return $this->brewery; } function getRate() { return $this->rate; } } After doing some research online on how to accomplish this, this is my code: usort($localBeersList, "cmp"); function cmp($a, $b) { if ($a->getRate() == $b->getRate()) { return 0; } return ($a->getRate() < $b->getRate()) ? -1 : 1; } If I try and output my list after this I do not get anything.

    Read the article

  • How do I confirm a pdf loaded correctly with Watir webdriver testing

    - by Mike Rose
    This is a general type question that I dont know what code I could post that would help get an answer. So I apologize in advance, but if some piece of code would help, please let me know and Ill add it. The question is, how do I confirm that a pdf loaded in a web browser when using Ruby/Cucumber/Watir Webdriver? My test clicks on a random link that should load a pdf in a new browser window, so I cant check the url because it will vary with each test. Any ideas how I can make sure the correct pdf loads after clicking the link that should load it?

    Read the article

  • php, get an end date based on start date and number of months

    - by mike
    Hi! I need to calculate an end date based on todays date and a number of months. For example, todays date 04/01/2010 and the number of months is 6. Are there any functions I can use to do some math that would return "10/01/2010"? Also, I think it's important to note that I am storing the result in MySQL as a "DATETIME" so I guess I would have to do something with the time as well... ??? Thanks!

    Read the article

  • How to create a language these days?

    - by Mike
    I need to get around to writing that programming language I've been meaning to write. How do you kids do it these days? I've been out of the loop for over a decade; are you doing it any differently now than we did back in the pre-internet, pre-windows days? You know, back when "real" coders coded in C, used the command line, and quibbled over which shell was superior? Just to clarify, I mean, not how do you DESIGN a language (that I can figure out fairly easily) but how do you build the compiler and standard libraries and so forth? What tools do you kids use these days?

    Read the article

  • PHP: Where to place return 'false' value?

    - by Mike
    Is one of the following functions better than the other, in terms of where to place the 'return false' statement? Function #1: function equalToTwo($a, $b) { $c = $a + $b; if($c == 2) { return true; } return false; } Function #2: function equalToTwo($a, $b) { $c = $a + $b; if($c == 2) { return true; } else { return false; } } Thanks!

    Read the article

  • Firefox proxy dilemma

    - by Mike L.
    Any idea why when using system proxy settings in firefox, it can not accept a proxy such as: user:[email protected]:port ??? IE will allow and connect to a proxy in this format. Not only does firefox not work, but it does not prompt for the password, nor attempt to make a connection to the proxy. Basically get a "proxy server not found" error. Anybody know a way around this? I am working on a proxy switching program for IE & Firefox, and I would like to use system-wide proxy settings. If I just store the server:port combination, firefox prompts for the password, as well as IE. Then they can be cached and it will not ask again. Maybe my only option is to programmatically cache the user/pass? Anybody know a way to do this? I am pretty sure IE stores them at HTTP basic authentication passwords and I can add them with AddCredential. After saving a password for a proxy in firefox, it shows up in saved passwords in a format like "moz-proxy://server:port" anybody know how to programmatically add a saved password to firefox? Thanks

    Read the article

  • Creating a "mountable" File System, where to start?

    - by Mike Curry
    A friend and I are thinking about creating a simple file system for learning purposes. We're going to write it in C/C++, and try to get it to a mountable state from within linux. We've both been coding or over 16 years (32 combined), so I suppose its just a matter of finding some documentation, and a ton of learning. My question is, where could I find out more information? (Documentation for creating a file system, requirements of mounting a file system in linux, etc) Where do we start? Edit: I should also mention, this would not be a boot-able file system, just a file system used for storage, though I am not too sure if that matters or not.

    Read the article

  • Best direction for displaying game graphics in C# App

    - by Mike Webb
    I am making a small game as sort of a test project, nothing major. I just started and am working on the graphics piece, but I'm not sure the best way to draw the graphics to the screen. It is going to be sort of like the old Zelda, so pretty simple using bitmaps and such. I started thinking that I could just paint to a Picture Box control using Drawing.Graphics with the Handle from the control, but this seems cumbersome. I'm also not sure if I can use double buffering with this method either. I looked at XNA, but for now I wanted to use a simple method to display everything. So, my question. Using the current C# windows controls and framework, what is the best approach to displaying game graphics (i.e. Picture Box, build a custom control, etc.)

    Read the article

  • What exactly does it mean when $_FILES is empty?

    - by Mike
    I am working on an upload script and when testing my error checks, I attempted to upload a 17MB TIFF file. When I do this the $_FILES array is empty. The script works fine for what I need it to do, which is to upload JPEG files. My solution is to test if $_FILES is empty or not before continuing with the upload script. Can anybody explain why $_FILES is empty when a TIFF is attempted to be uploaded? Is my solution, to check if $_FILES is empty or not, an okay one?

    Read the article

  • Can we run two simultaneous non-nested loops in Perl?

    - by Mike
    Part of my code goes like this: while(1){ my $winmm = new Win32::MediaPlayer; $winmm->load('1.mp3'); $winmm->play; $winmm->volume(100); Do Some Stuff; last if some condition is met; } Problem is: I want the music to be always on when I'm in the Do Some Stuff stage in the while loop. But the length of the music is so short that it will come to a full stop before I go to the next stage, so I want the music to repeat itself, but the Win32::Mediaplayer module does not seem to have a repeat mode, so I'm thinking of doing an infinite loop for the music playing part. Like this: while(1){ my $winmm = new Win32::MediaPlayer; $winmm->load('1.mp3'); $winmm->play; $winmm->volume(100); } while(2){ Do some stuff; last if some condition is met } But based on my current Perl knowledge if I'm in the while(1) part, I can never go to the while(2) part. Even if it comes to a nested loop, I have to do something to break out of the inside loop before going to the other part of the outside loop. The answer to my question "Can we run two simultaneous non-nested loops in Perl?" may be a NO, but I assume there is some way of handling such situation. Correct me if I'm wrong. Thanks as always for any comments/suggestions :) UPDATE I really appreciate the help from everyone. Thanks :) So the answer to my question is a YES, not a NO. I'm happy that I've learned how to use fork() and threads to solve a real problem :)

    Read the article

  • How can I retrieve the values of controls in the form that posted?

    - by Mike at KBS
    I know this has got to be the simplest-sounding question ever asked about ASP.Net but I'm baffled. I have a form wherein my visitor will enter name, address, etc. Then I am POSTing that form via the PostBackUrl property of my Submit button to another page, where the fields are supposed to be all re-formed into new hidden fields, then POSTed again to Paypal. My problem is I cannot get at the values entered by the visitor in the original page. Any time I put in "runat='server'", ASP.Net completely changes the ID of the control, making it impossible to figure out how to access. In the POSTed form I tried Request.Form["_txtFirstName"] and that turned up null. Then I tried ((TextBox)PreviousPage.FindControl("_txtFirstName")).Text and that was null, too. I've tried variations on those. I cannot figure out how I'm supposed to get at these controls. Why does this stuff need to be so difficult?

    Read the article

  • What's the justification behind disallowing partial PUT?

    - by Mike
    Why does an HTTP PUT request have to contain a representation of a 'whole' state and can't just be a partial? I understand that this is the existing definition of PUT - this question is about the reason(s) why it would be defined that way. i.e: What is gained by preventing partial PUTs? Why was preventing idempotent partial updates considered an acceptable loss?

    Read the article

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