Search Results

Search found 1059 results on 43 pages for 'jon hopkins'.

Page 33/43 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • Vim (Windows) - new help files do not work

    - by Jon
    I have downloaded several new plugins which come with a help file. None of them seem to work from within Vim. I have the Windows version of gVim and the install dir contains a folder called: vimfiles vim72 Both folder contain a plugin and doc folder. Where am I supposed to put the plugin? So when I use :help [helpfile], it says it cannot find it, but I can see it in the doc folder.

    Read the article

  • PHP classes, parse syntax errors when using 'var' to declare variables

    - by jon
    I am a C# guy trying to translate some of my OOP understanding over to php. I'm trying to make my first class object, and are hitting a few hitches. Here is the beginning of the class: <?php require("Database/UserDB.php"); class User { private var $uid; private var $username; private var $password; private var $realname; private var $email; private var $address; private var $phone; private var $projectArray; public function _construct($username) { $userArray = UserDB::GetUserArray($username); $uid = $userArray['uid']; $username = $userArray['username']; $realname = $userArray['realname']; $email = $userArray['email']; $phone = $userArray['phone']; $i = 1; $projectArray = UserDB::GetUserProjects($this->GetID()); while($projectArray[$i] != null) { $projectArray[$i] = new Project($projectArray[$i]); } UserDB.php is where I have all my static functions interacting with the Database for this User Class. I am getting errors using when I use var, and I'm getting confused. I know I don't HAVE to use var, or declare the variables at all, but I feel it is a better practice to do so. the error is "unexpected T_VAR, expecting T_VARIABLE" When I simply remove var from the declarations it works. Why is this?

    Read the article

  • graphs and charts on the iPhone

    - by Jon
    My client has requested data to be presented in a graphical format on the iPhone (a pie chart or something similar). I am wondering how others have handled this - A.) deliver the raw data to the phone and somehow build the chart on the phone, or B.) have the back-end services build the chart and deliver it (png format) to the phone? Thanks for any advice.

    Read the article

  • jquery image swap works in one html file but not another

    - by Jon
    I have two header templates for my site. One for the blog section and one for everything else. The below code swaps an image in my nav menu, on hover. It works for one template but not the other. The html code is pretty much identical in both header templates. Please help me!! $(document).ready(function(){ $('.nav-home, .nav-port, .nav-exp, .nav-cont, .nav-blog').hover(function(){ $(this).attr('src','/images/' + $(this).attr('class') + '-hover.gif'); }, function(){ $(this).attr('src','/images/' + $(this).attr('class') + '.gif'); }); });

    Read the article

  • Are there any test data generator tools which can be used with selenium/Nunit?

    - by Jon
    Hi, I was wondering if there was anything that provides test data for injecting into Nunit tests? I'm sure I came across something recently that does this but I couldn't find it again. Basically the idea is that I could use selenium and Nunit to create new customers within the system automatically. So I could have selenium type in customer names generated from test generator (the < DataGenerator is just an imaginary class): e.g. dim sFirstName as string = < DataGenerator >.GetRandomFirstName() dim sLastName as string = < DataGenerator >.GetRandomLastName() selenium.type("firstname_field",sFirstName) selenium.type("lastname_field",sLastName ) I've already seen SQLDataGenerator from Redgate which has a cmd line wrapper class, but I was wondering if there was anything else.

    Read the article

  • How can I (reasonably) precisely perform an action every N milliseconds?

    - by Jon Cage
    I have a machine which uses an NTP client to sync up to internet time so it's system clock should be fairly accurate. I've got an application which I'm developing which logs data in real time, processes it and then passes it on. What I'd like to do now is output that data every N milliseconds aligned with the system clock. So for example if I wanted to do 20ms intervals, my oututs ought to be something like this: 13:15:05:0000 13:15:05:0020 13:15:05:0040 13:15:05:0060 I've seen suggestions for using the stopwatch class, but that only measures time spans as opposed to looking for specific time stamps. The code to do this is running in it's own thread, so should be a problem if I need to do some relatively blocking calls. Any suggestions on how to achieve this to a reasonable (close to or better than 1ms precision would be nice) would be very gratefully received.

    Read the article

  • C# - Printing the Form

    - by Jon
    I am using the code from MS to print a form however it looks like the form needs to be visible with a Show/ShowDialog() to work. I am trying to use the code for a form that I don't want to show. Any ideas?

    Read the article

  • Ajax auto-populate from field when another form field is filled out

    - by Jon
    Has anyone used javascript/ajax to take data from one form field and put it into another? I'm trying to create a form that when one text input is filled out a second is auto-populated with the first letter of the word that is in the first text input. I'm thinking I can limit the second text input to one character to help get the desired result, but I'm not having luck finding the javascript to get the second text input to auto-populate from the first. Any suggestions?

    Read the article

  • Get the selected file in an Explorer window

    - by Jon Fournier
    I'd like to know how, if possible, to get the path of the selected file in an open Windows Explorer window. If not, would it at least be possible to get the folder path of an open Windows Explorer window? The end reason I'm doing this, is a software tool I'm writing requires a user to select a file. I figure if they're already moving the file around with Windows Explorer and then start my tool up, it'd be good not to have to make them navigate to the folder again in the file open dialog box. My software would then be able to identify if it's got the right file extension and if so, just ask the user if they want to import that file. Thanks.

    Read the article

  • Working with Japanese filenames in PHP 5.3 and Windows Vista?

    - by Jon
    I'm currently trying to write a simple script that looks in a folder, and returns a list of all the file names in an RSS feed. However I've hit a major wall... Whenever I try to read filenames with Japanese characters in them, it shows them as ?'s. I've tried the solutions mentioned here: http://stackoverflow.com/questions/482342/php-readdir-problem-with-japanese-language-file-name - however they do not work for some reason, even with: header('Content-Type: text/html; charset=UTF-8'); setlocale(LC_ALL, 'en_US.UTF8'); mb_internal_encoding("UTF-8"); At the top (Exporting as plain text until I can sort this out). What can I do? I need this to work and I don't have much time.

    Read the article

  • A non-blocking server with java.io

    - by Jon
    Everybody knows that java IO is blocking, and java NIO is non-blocking. In IO you will have to use the thread per client pattern, in NIO you can use one thread for all clients. Now my question follows: is it possible to make a non-blocking design using only the Java IO api. (not NIO) I was thinking about a pattern like this (obviously very simplified); List<Socket> li; for (Socket s : li) { InputStream in = s.getInputStream(); byte[] data = in.available(); in.read(data); // processData(data); (decoding packets, encoding outgoing packets } Also note that the client will always be ready for reading data. What are your opinions on this? Will this be suitable for a server that should at least hold a few hundred of clients without major performance issues?

    Read the article

  • How do I display core data on second view controller?

    - by jon
    I am working on my first core data iPhone application. I am using a navigation controller, and the root view controller displays 4 rows. Clicking the first row takes me to a second table view controller. However, when I click the back button, repeat the row tap, click the back button again, and tap the row a third time, I get an error. I have been researching this for a week with no success. I can reproduce the error easily: Create a new Navigation-based Application, use Core Data for storage, call it MyTest which creates MyTestAppDelegate and RootViewController. Add new UIViewController subclass, with UITableViewController and xib, call it ListViewController. Copy code from RootViewController.h and .m to ListViewController.h and .m., changing the file names appropriately. To simplify the code, I removed the trailing “_” from all variables. In RootViewController, I added #import ListViewController.h, set up an array to display 4 rows and navigate to ListViewController when clicking the first row. In ListViewController.m, I added #import MyTestAppDelegate.h” and the following code: - (void)viewDidLoad { [super viewDidLoad]; if (managedObjectContext == nil) { managedObjectContext = [(MyTestAppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext]; } .. } The sequence that causes the error is tap row, return, tap row, return, tap row - error. managedObjectContext is synthesized for the third time. I appreciate your patience and your help, as this makes no sense to me. ADDENDUM: I may have a partial solution. http://www.iphonedevsdk.com/forum/iphone-sdk-development/41688-accessing-app-delegates-managed-object-context.html If I do not release the managedObjectContext in the .m file, the error goes away. Is that ok or will that cause me issues? - (void)dealloc { [fetchedResultsController release]; // [managedObjectContext release]; [super dealloc]; } ADDENDUM 2: See solution below. Sorry for the formatting issues - this was my first post.

    Read the article

  • Make All Types Constant by Default in C++

    - by Jon Purdy
    What is the simplest and least obtrusive way to indicate to the compiler, whether by means of compiler options, #defines, typedefs, or templates, that every time I say T, I really mean T const? I would prefer not to make use of an external preprocessor. Since I don't use the mutable keyword, that would be acceptable to repurpose to indicate mutable state. Potential (suboptimal) solutions so far: // I presume redefinition of keywords is implementation-defined or illegal. #define int int const #define ptr * const int i(0); int ptr j(&i); typedef int const Int; typedef int const* const Intp; Int i(0); Intp j(&i); template<class T> struct C { typedef T const type; typedef T const* const ptr; }; C<int>::type i(0); C<int>::ptr j(&i);

    Read the article

  • C# Check for missing number in sequence

    - by Jon
    I have an List<int> which contains 1,2,4,7,9 for example. I have a range from 0 to 10. Is there a way to determine what numbers are missing in that sequence? I thought LINQ might provide an option but I can't see one In the real world my List could contain 100,000 items so performance is key

    Read the article

  • Purely functional equivalent of weakhashmap?

    - by Jon Harrop
    Weak hash tables like Java's weak hash map use weak references to track the collection of unreachable keys by the garbage collector and remove bindings with that key from the collection. Weak hash tables are typically used to implement indirections from one vertex or edge in a graph to another because they allow the garbage collector to collect unreachable portions of the graph. Is there a purely functional equivalent of this data structure? If not, how might one be created? This seems like an interesting challenge. The internal implementation cannot be pure because it must collect (i.e. mutate) the data structure in order to remove unreachable parts but I believe it could present a pure interface to the user, who could never observe the impurities because they only affect portions of the data structure that the user can, by definition, no longer reach.

    Read the article

  • is this possible: c# collection of Type with constrains, or collection of generic type?

    - by Jon
    I'm trying to store types in a collection, so that i can later instantiate objects of the types in the collection. But I'm not sure how to do this the best way. What i have so far: List<Type> list = new List<Type>(); list.Add(typeof(MyClass)); var obj = (MyClass)Activator.CreateInstance(list[0]); I would like to have some constrains on the Type, or better yet, just a generic type in the collection instead of an instantiated Type object. Is this possible?

    Read the article

  • jQuery - Show id, based on selected items class?

    - by Jon Hadley
    I have a layout roughly as follows: <div id="foo"> <!-- a bunch of content --> </div> <div id="thumbnails"> <div class="thumb-content1"></div> <div class="thumb-content2"></div> <div class="thumb-content3"></div> </div> <div id="content-1"> <!-- some text and pictures, including large-pic1 --> </div> <div id="content-2"> <!-- some text and pictures, including large-pic2 --> </div> <div id="content-3"> <!-- some text and pictures, including large-pic3 --> </div> etc .... On page load I want to show 'foo' and 'thumbnails' and hide the three content divs. As the user clicks each thumbnail, I want to hide foo, and replace it with the matching 'content-x'. I can get my head round jQuery show, hide and replace (although, bonus points if you want to include that in your example!). But how would I extract and construct the appropriate content id, from the thumbnail class, then pass it to the show hide code?

    Read the article

  • How to check dates don't overlap in a table using TSQL.

    - by Jon
    I have a table with start and finish datetimes that I need to determine if any overlap and not quite sure the best way to go. Initially I was thinking of using a nested cursor as shown below which does work, however I'm checking the same records against each other twice and I'm sure it is not very efficient. eg: this table would result in an overlap. id start end ------------------------------------------------------- 1 2009-10-22 10:19:00.000 2009-10-22 11:40:00.000 2 2009-10-22 10:31:00.000 2009-10-22 13:34:00.000 3 2009-10-22 16:31:00.000 2009-10-22 17:34:00.000 Declare @Start datetime, @End datetime, @OtherStart datetime, @OtherEnd datetime, @id int, @endCheck bit Set @endCheck = 0 DECLARE Cur1 CURSOR FOR select id, start, end from table1 OPEN Cur1 FETCH NEXT FROM Cur1 INTO @id, @Start, @End WHILE @@FETCH_STATUS = 0 AND @endCheck = 0 BEGIN -- Get a cursor on all the other records DECLARE Cur2 CURSOR FOR select start, end from table1 and id != @id OPEN Cur2 FETCH NEXT FROM Cur2 INTO @OtherStart, @OtherEnd WHILE @@FETCH_STATUS = 0 AND @endCheck = 0 BEGIN if ( @Start > @OtherStart AND @Start < @OtherEnd OR @End > @OtherStart AND @End < @OtherEnd ) or ( @OtherStart > @Start AND @OtherStart < @End OR @OtherEnd > @Start AND @OtherEnd < @End ) BEGIN SET @endCheck = 1 END FETCH NEXT FROM Cur2 INTO @OtherStart, @OtherEnd END CLOSE Cur2 DEALLOCATE Cur2 FETCH NEXT FROM Cur1 INTO @id, @Start, @End END CLOSE Cur1 DEALLOCATE Cur1

    Read the article

  • What's the simplest way to extract the last section of an IP address?

    - by Jon Cage
    I have an IP address which I want to grab the last chunk of as an integer. So from "192.168.1.150" I'd get 150. This is the code I'd concocted (I'm using C++/CLI), but somehow it feels rather clunky: String^ ipString = "192.168.1.150"; int lastDot = ipString->LastIndexOf('.'); int lastSection = int::Parse(ipString->Substring(lastDot, ipString->Length-lastDot)); Is there a simpler way of doing this?

    Read the article

  • PHP mySQL query's and PHP Variables

    - by jon
    I'm trying to make an OO Login system for a project I'm working on, and am having trouble with inserting variables into the query strings. In the code below, if I replace "$TBL_NAME" with the actual table name it works. Why isn't $TBL_NAME translating to the value of $TBL_NAME? class UserDB { private $TBL_NAME = "users"; public static function CheckLogin($username, $password) { Database::Connect(); $username = stripslashes($username); $password = stripslashes($password); $username = mysql_real_escape_string($username); $password = mysql_real_escape_string($password); $sql="SELECT uid FROM $TBL_NAME WHERE username='$username' AND password='$password' "; $result =mysql_query($sql); $count=mysql_num_rows($result); if ($count==1) return true; else return false; } The Query is returning false.

    Read the article

  • Detecting video playing in browser from a screenshot -- OpenCV

    - by Jon
    I would like to draw a rectangle around a video playing on my screen. For example, I am watching a YouTube video in my browser. I would like to be able to take a screenshot, analyze that screenshot, and then draw a rectangle around where the YouTube video is playing. I have just started looking into how I might be able to to this. I came across OpenCV. I understand that OpenCV covers many computer vision techniques. Would any of them be particularly well suited for this task? Also, is this something that can be done in real time? Finally, is there a technique that would work for both in browser and full screen? Thanks!

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >