Search Results

Search found 119 results on 5 pages for 'iain fraser'.

Page 3/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • Parent control software for iPhone

    - by Fraser Orr
    My kids both have iPod Touches and I'd like to apply some parental controls. I have had a look and I know there are some really limited features on the phone itself, and a variety of filtered browsers. However, none of them are really hitting what I want. The features I am looking for are: Filtered web (as above) Filtered access to Youtube and music Control over how often they are allowed to play games (like 1 hour per day) Whitelist control over who they can skype (or maybe facetime, but I am an android user so can't hook that net.) Any suggestions?

    Read the article

  • setting the PATH for Git (not for me)

    - by Iain
    Hi, I'm running OSX 10.6.5 with Git 1.7.1 I have git installed in a non-standard location (though that really should be the standard on a mac;-) in /Library/Frameworks/Git.framework. My own PATH is set fine, git works fine, until... I set up a pre-commit hook with a Ruby script: $ git commit -m "added some Yard documentation" .git/hooks/pre-commit: line 1: #!/usr/bin/env: No such file or directory The pre-commit.sample runs ok, so it appears that git can't find /usr/bin/env, or much else as I've tried shebanging it directly to ruby etc. Just /bin/sh is ok. So, where does Git get it's PATH? because it's not using mine or this wouldn't be happening. And more to the point, how do I get it to see /usr/bin/env ? I've tested the ruby script already, it works. Just to add: $ cat /etc/paths /usr/bin /bin /usr/sbin /sbin /usr/local/bin $ cat /etc/paths.d/git /Library/Frameworks/Git.framework/Programs The first few lines of the Ruby script (which runs via ./pre-commit or ruby pre-commit) #!/usr/bin/env ruby -wKU class String def expand_path File.expand_path self end def parent_dir File.dirname self.expand_path end end

    Read the article

  • non-interactive ssh sudo... prompts for the password in plain text

    - by Iain
    I'm running some non-interactive ssh commands. The ssh authentication is taken care of fine through the ssh agent, but if I run a command that requires sudo then the password prompt in my terminal is plain text. For example: ssh remotemachine "sudo -u www mkdir -p /path/to/new/folder" will prompt me for the password in plain text. Does anyone know how I can get it to use the normal secure prompt or that I can pass the password via a switch? (as then I can set up a secure prompt on this side before I send the command) Any help is much appreciated.

    Read the article

  • All MySQL Databases lost overnight

    - by Iain
    After a call from a customer to say that his website is down, I find that MySQL on our RackSpace Cloud Windows 2008 server was not running. I restarted MySQL but got the 'Access denied for user' error in the browser for all websites with MySQL database. When I look in MySql Server 5.5/data there are no folders other than mysql and performance_schema. It appears all the databases and data have been wiped. Does anyone know what might have happened and where the data has gone? To top that I just found this server is missing from our backup service. ps appears to be after windows update at 4:01 this morning.

    Read the article

  • Google+ Platform Office Hours for February 1st 2012

    Google+ Platform Office Hours for February 1st 2012 Jenny Murphy and Jonathan Beri represented Google. Fraser Cain, Abraham Williams and Allen Firstenberg joined us from the developer community. This week we discussed the new configuration options for the Google+ Badge. You can read more about these new features on the platform blog: googleplusplatform.blogspot.com Please join the discussion on our support forum: groups.google.com Learn more about our office hours on Google Developers: developers.google.com From: GoogleDevelopers Views: 4150 55 ratings Time: 47:51 More in Science & Technology

    Read the article

  • jQuery AJAX see redirect as status 200 not 302?

    - by Max Fraser
    I am using jQuery and the jQuery.form plugin to submit my form (also using ASP.Net MVC). Problem is the user is in a section of the site that uses forms authentication and if their auth cookie expires during their time on the page instead of getting back a status of 302, which would be the redirect to the login page, I still get 200? In FireBug I see the 302 Found and then my login page is served next as a 200 which is the status code sent back to my Ajax call. How do I detect that they have been logged out if I never see the 302 sent back to the jQuery form plugin?

    Read the article

  • Expire Output Cache ASP.Net MVC

    - by Max Fraser
    I am using the standared outputcache tag in my MVC app which works great but I need to force it to be dumped at certain times. How do I achieve this? The page that gets cached is built from a very simple route {Controller}/{PageName} - so most pages are something like this: /Pages/About-Us Here is the output cache tag that is at the top of my .aspx v iew page just to be clear: <@ OutputCache Duration="100" VaryByParam="None" %> So in another action on the same controller where content is updated I need to dump this cache, or even all of it - it's a very small app so not a big deal deal to dump all cached items.

    Read the article

  • WPF slow to start on x64 in .NET Framework 4.0

    - by Robert Fraser
    I've noticed that if I build my WPF application for Any CPU/x64, it takes MUCH longer to start (on the order of about 20 seconds) or to load new controls than it does if started on x86 (in release & debug modes, inside or outside of VS). This occurs with even the simplest WPF apps. The problem is discussed in this MSDN thread, but no answer was provided there. This happens only with .NET 4.0 -- in 3.5 SP1, x64 was just as fast as x86. Interestingly, Microsoft seems to know about this problem since the default for a new WPF project in VS2010 is x86. Is this a real bug or am I just doing it wrong? EDIT: Possibly related to this: http://stackoverflow.com/questions/2788215/slow-databinding-setup-time-in-c-net-4-0. I'm using data binding heavily.

    Read the article

  • Extending Perforce to use a custom content diff tool for certain file extensions

    - by Fraser Graham
    I have various custom binary files stored in perforce and for many of the file types I have built a custom diff tool to show the content creators a diff of the actual changes to the file. E.g. If the file holds simple key value pairs as a compressed binary blob the diff tool would load each version into an in memory format and generate a list of additions, deletions and edits to the file presented in a nice clean report view. Much like the built in image diff tool in P4V i'd like to be able to use my own diff tool for certain file extensions within my depot and allow the users to use the existing P4V interface to pick revisions to diff between and examine history. So, I am aware you can write add-ins to P4V but I can't find any documentation on it and I'd like to know if this kind of extension functionality is available in P4V and how to use it?

    Read the article

  • Optimizing multiple dispatch notification algorithm in C#?

    - by Robert Fraser
    Sorry about the title, I couldn't think of a better way to describe the problem. Basically, I'm trying to implement a collision system in a game. I want to be able to register a "collision handler" that handles any collision of two objects (given in either order) that can be cast to particular types. So if Player : Ship : Entity and Laser : Particle : Entity, and handlers for (Ship, Particle) and (Laser, Entity) are registered than for a collision of (Laser, Player), both handlers should be notified, with the arguments in the correct order, and a collision of (Laser, Laser) should notify only the second handler. A code snippet says a thousand words, so here's what I'm doing right now (naieve method): public IObservable<Collision<T1, T2>> onCollisionsOf<T1, T2>() where T1 : Entity where T2 : Entity { Type t1 = typeof(T1); Type t2 = typeof(T2); Subject<Collision<T1, T2>> obs = new Subject<Collision<T1, T2>>(); _onCollisionInternal += delegate(Entity obj1, Entity obj2) { if (t1.IsAssignableFrom(obj1.GetType()) && t2.IsAssignableFrom(obj2.GetType())) obs.OnNext(new Collision<T1, T2>((T1) obj1, (T2) obj2)); else if (t1.IsAssignableFrom(obj2.GetType()) && t2.IsAssignableFrom(obj1.GetType())) obs.OnNext(new Collision<T1, T2>((T1) obj2, (T2) obj1)); }; return obs; } However, this method is quite slow (measurable; I lost ~2 FPS after implementing this), so I'm looking for a way to shave a couple cycles/allocation off this. I thought about (as in, spent an hour implementing then slammed my head against a wall for being such an idiot) a method that put the types in an order based on their hash code, then put them into a dictionary, with each entry being a linked list of handlers for pairs of that type with a boolean indication whether the handler wanted the order of arguments reversed. Unfortunately, this doesn't work for derived types, since if a derived type is passed in, it won't notify a subscriber for the base type. Can anyone think of a way better than checking every type pair (twice) to see if it matches? Thanks, Robert

    Read the article

  • Wrappers/law of demeter seems to be an anti-pattern...

    - by Robert Fraser
    I've been reading up on this "Law of Demeter" thing, and it (and pure "wrapper" classes in general) seem to generally be anti patterns. Consider an implementation class: class Foo { void doSomething() { /* whatever */ } } Now consider two different implementations of another class: class Bar1 { private static Foo _foo = new Foo(); public static Foo getFoo() { return _foo; } } class Bar2 { private static Foo _foo = new Foo(); public static void doSomething() { _foo.doSomething(); } } And the ways to call said methods: callingMethod() { Bar1.getFoo().doSomething(); // Version 1 Bar2.doSomething(); // Version 2 } At first blush, version 1 seems a bit simpler, and follows the "rule of Demeter", hide Foo's implementation, etc, etc. But this ties any changes in Foo to Bar. For example, if a parameter is added to doSomething, then we have: class Foo { void doSomething(int x) { /* whatever */ } } class Bar1 { private static Foo _foo = new Foo(); public static Foo getFoo() { return _foo; } } class Bar2 { private static Foo _foo = new Foo(); public static void doSomething(int x) { _foo.doSomething(x); } } callingMethod() { Bar1.getFoo().doSomething(5); // Version 1 Bar2.doSomething(5); // Version 2 } In both versions, Foo and callingMethod need to be changed, but in Version 2, Bar also needs to be changed. Can someone explain the advantage of having a wrapper/facade (with the exception of adapters or wrapping an external API or exposing an internal one).

    Read the article

  • Use of @keyword in C# -- bad idea?

    - by Robert Fraser
    In my naming convention, I use _name for private member variables. I noticed that if I auto-generate a constructor with ReSharper, if the member is a keyword, it will generate an escaped keyword. For example: class IntrinsicFunctionCall { private Parameter[] _params; public IntrinsicFunctionCall(Parameter[] @params) { _params = @params; } } Is this generally considered bad practice or is it OK? It happens quite frequently with @params and @interface.

    Read the article

  • How do I set a matplotlib colorbar extents?

    - by Adam Fraser
    I'd like to display a colorbar representing an image's raw values along side a matplotlib imshow subplot which displays that image, normalized. I've been able to draw the image and a colorbar successfully like this, but the colorbar min and max values represent the normalized (0,1) image instead of the raw (0,99) image. f = plt.figure() # create toy image im = np.ones((100,100)) for x in range(100): im[x] = x # create imshow subplot ax = f.add_subplot(111) result = ax.imshow(im / im.max()) # Create the colorbar axc, kw = matplotlib.colorbar.make_axes(ax) cb = matplotlib.colorbar.Colorbar(axc, result) # Set the colorbar result.colorbar = cb If someone has a better mastery of the colorbar API, I'd love to hear from you. Thanks! Adam

    Read the article

  • $.jQTouch.goTo is not a function Options

    - by Max Fraser
    I am trying to use the goTo function to rotate between images, here is my basic JS: <script type="text/javascript" charset="utf-8"> $.jQTouch(); $(function () { $('.touch').live('swipe', function (event, info) { alert('called' + info.direction); var id = $(this).parent().next().attr("id"); alert(id); $.jQTouch.goTo(id, 'slide'); }); }); </script> This works great up until I get to the $.jQTouch.goTo(id, 'slide'); line and then I get the following error: $.jQTouch.goTo is not a function How do I access this goTo function?

    Read the article

  • Embed resource in .NET Assembly without assembly prefix?

    - by Robert Fraser
    Hi all, When you embed a reosurce into a .NET assembly using Visual Studio, it is prefixed with the assembly name. However, assemblies can have embedded resources that are not assembly-name-prefixed. The only way I can see to do this is to disassemble the assembly using ildasm, then re-assemble it, adding the new resource -- which works, but... do I really need to finish that sentence? (Desktop .NET Framework 3.5, VS 2008 SP1, C#, Win7 Enterprise x64) Thanks, All the best, Robert

    Read the article

  • How can I plot NaN values as a special color with imshow in matplotlib?

    - by Adam Fraser
    example: import numpy as np import matplotlib.pyplot as plt f = plt.figure() ax = f.add_subplot(111) a = np.arange(25).reshape((5,5)).astype(float) a[3,:] = np.nan ax.imshow(a, interpolation='nearest') f.canvas.draw() The resultant image is unexpectedly all blue (the lowest color in the jet colormap). However, if I do the plotting like this: ax.imshow(a, interpolation='nearest', vmin=0, vmax=24) --then I get something better, but the NaN values are drawn the same color as vmin... Is there a graceful way that I can set NaNs to be drawn with a special color (eg: gray or transparent)?

    Read the article

  • How to interpret trackpad pinch gestures to zoom IKImageBrowserView

    - by Fraser Speirs
    I have an IKImageBrowserView that I want to be able to pinch-zoom using a multi-touch trackpad on a recent Mac laptop. The Cocoa Event Handling Guide, in the section Handling Gesture Events says: The magnification accessor method returns a floating-point (CGFloat) value representing a factor of magnification ..and goes on to show code that adjusts the size of the view by multiplying height and width by magnification + 1.0. This doesn't seem to be the right approach for zooming IKImageBrowserView, whose zoomValue property is clamped between 0.0 and 1.0. So, does anyone know how to interpret the event in -[NSResponder magnifyWithEvent:] to zoom IKImageBrowserView?

    Read the article

  • wx Menu disappears from frame when shown as a popup

    - by Adam Fraser
    I'm trying to create a wx.Menu that will be shared between a popup (called on right-click), and a sub menu accessible from the frame menubar. The following code demonstrates the problem. If you open the "MENUsubmenu" from the menubar the item "asdf" is visible. If you right click on the frame content area, "asdf" will be visible from there as well... however, returning to the menubar, you will find that "MENUsubmenu" is vacant. Why is this happening and how can I fix it? import wx app = wx.PySimpleApp() m = wx.Menu() m.Append(-1, 'asdf') def show_popup(evt): ''' R-click callback ''' f.PopupMenu(m, (evt.X, evt.Y)) f = wx.Frame(None) f.SetMenuBar(wx.MenuBar()) frame_menu = wx.Menu() f.MenuBar.Append(frame_menu, 'MENU') frame_menu.AppendMenu(-1,'submenu', m) f.Show() f.Bind(wx.EVT_RIGHT_DOWN, show_popup) app.MainLoop() Interestingly, appending the menu to MenuBar works, but is not the behavior I want: import wx app = wx.PySimpleApp() m = wx.Menu() m.Append(-1, 'asdf') def show_popup(evt): f.PopupMenu(m, (evt.X, evt.Y)) f = wx.Frame(None) f.SetMenuBar(wx.MenuBar()) f.MenuBar.Append(m, 'MENU') f.Show() f.Bind(wx.EVT_RIGHT_DOWN, show_popup) app.MainLoop()

    Read the article

  • xcode syntax color coding explained?

    - by Max Fraser
    Can anyone give me a quick rundown of the color syntax meanings in xcode? I am running into some problems and understanding the color coding I am sure will help me out. Currently I have some variables that are light blue and I think they need to be black but I am not sure of the difference? masterViewController=[[UINavigationController alloc] initWithDestination: destination]; I believe my masterViewController here should be colored black and not the light blue it is currently colored - I am assuming I defined or initialized something wrong somewhere. First day in xCode so I am pretty damn confused!

    Read the article

  • Drawing Directed Acyclic Graphs: Minimizing edge crossing?

    - by Robert Fraser
    Laying out the verticies in a DAG in a tree form (i.e. verticies with no in-edges on top, verticies dependent only on those on the next level, etc.) is rather simple without graph drawing algorithms such as Efficient Sugimiya. However, is there a simple algorithm to do this that minimizes edge crossing? (For some graphs, it may be impossible to completely eliminate edge crossing.) A picture says a thousand words, so is there an algorithm that would suggest: instead of: EDIT: As the picture suggests, a vertex's inputs are always on top and outputs are always below, which is another barrier to just pasting in an existing layout algorithm.

    Read the article

  • Is enemy / bot A.I. part of the model or controller in an MVC game

    - by Iain
    It could be part of the model because it's part of the business logic of the game. It could be part of the controller because it could be seen as simulating player input, which would be considered part of the controller, right? Or would it? What about a normal enemy, like a goomba in Mario? UPDATE: Wow, that's really not the answer I was expecting. As far as I could tell, A.I. is an internal part of the autonomous game system, hence model. I'm still not convinced.

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >