Search Results

Search found 1574 results on 63 pages for 'adam hardy'.

Page 7/63 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Using regular expressions to remove relative path slashes

    - by Adam Carlile
    Hey Guys I am trying to remove all the relative image path slashes from a chunk of HTML that contains several other elements. For example <img src="../../../../images/upload/1/test.jpg /> would need to become <img src="http://s3.amazonaws.com/website/images/upload/1/test.jpg" /> I was thinking of writing this as a rails helper, and just passing the entire block into the method, and make using Nokogiri or Hpricot to parse the HTML instead, but I don't really know. Any help would be great Cheers Adam

    Read the article

  • Sphinx, reStructuredText show\hide code snippets

    - by Adam Matan
    Hi, I've been documenting a software package using Sphinx and reStructuredText. Within my documents, there are some long code snippets. I want to be able to have them hidden as default, with a little "Show\Hide" button that would expand them (Example). Is there a standard way to do that? If not, I think I will suggest this feature to the developers. Thanks, Adam

    Read the article

  • Intro to GPU programming

    - by Adam Davis
    Everyone has this huge massively parallelized supercomputer on their desktop in the form of a graphics card GPU. What is the "hello world" equivalent of the GPU community? What do I do, where do I go, to get started programming the GPU for the major GPU vendors? -Adam

    Read the article

  • Pythonic reading from config files

    - by Adam Matan
    Hi, I have a python class which reads a config file using ConfigParser: Config file: [geography] Xmin=6.6 Xmax=18.6 Ymin=36.6 YMax=47.1 Python code: class Slicer: def __init__(self, config_file_name): config = ConfigParser.ConfigParser() config.read(config_file_name) # Rad the lines from the file self.x_min = config.getfloat('geography', 'xmin') self.x_max = config.getfloat('geography', 'xmax') self.y_min = config.getfloat('geography', 'ymin') self.y_max = config.getfloat('geography', 'ymax') I feel that the last four lines are repetitive, and should somehow be compressed to one Pythonic line that would create a self.item variable for each item in the section. Any ideas? Adam

    Read the article

  • ASP.NET MVC framework port for Java EE?

    - by Adam Asham
    So I've played some with the new, not yet final release of ASP.NET MVC framework and I find it to be very nice and elegant. However at work we are tied to Java for the time being, so I'm wondering this: is there a port of the framework out there for Java people like myself? I realize that webforms isn't going to be available unfortunately but what about the routing framework? /Adam

    Read the article

  • Python: using doctests for classes

    - by Adam Matan
    Hi, Is it possible to use Python's doctest concept for classes, not just functions? If so, where shall I put the doctests - at the class' docstring, or at the constructor's docstring? To clarify, I'm looking for something like: class Test: """ >>> a=Test(5) >>> a.multiply_by_2() 10 """ def __init__(self, number): self._number=number def multiply_by_2(self): return self._number*2 Thanks in advance, Adam

    Read the article

  • Changing IIS URL Rewrite config location

    - by adam
    Hi When used at site level, the IIS7 URL Rewrite 2 module saves its configuration in the web.config file of that site. I'm using Sitecore CMS, and best practice is to store any web.config customisations in a separate config file for ease of upgrading, staging/production setups etc. Is there any way to specify a different config file for IIS7 redirects? I know that application-level rewrites are stored in ApplicationHost.config, but I have several sites running on the server and would like to keep them separated. Thanks, Adam

    Read the article

  • eclipse+bzr (Or: DVCS + IDE)

    - by Adam Matan
    Hi, I have some projects on bzr code repositories shared with colleagues. Problem is, I really want to switch to eclipse in some projects, but I don't want to pollute the repository with the unnecessary metadata eclipse creates in its Workspaces. Any idea how to keep Eclipse's metadata outside my bzr repo? Adam

    Read the article

  • Google Maps iPhone API Terrain View

    - by Adam
    We're using MapKit on an iPhone app to display a Google Map with terrain view. However, the terrain view only shows when the user has an active Internet connection, the moment the user's Internet is off, the terrain on the map disappears and it appears flat. Is there any way to keep the terrain view on even when the user isn't on an active internet connection? Thanks! Adam

    Read the article

  • Programatically find common European street names

    - by Adam Matan
    Hi, I am in the middle of designing a web form for German and French users. Within this form, the users would have to type street names several times. I want to minimize the annoyance to the user, and offer autocomplete feature based on common French and German street names. Any idea where I can a royalty-free list? Thanks a bunch, Adam

    Read the article

  • PostgreSQL: SELECT all fields, filter some

    - by Adam Matan
    Hi, In one of our databases, there is a table with dozens of columns, one of which is a geometry column. I want to SELECT rows from the table, with the geometry transformed to another SRID. I want to use something like: `SELECT *` in order to avoid: SELECT col_a, col_b, col_c, col_d, col_e, col_f, col_g, col_h, transform(the_geom, NEW_SRID), ..., col_z Any ideas? Adam

    Read the article

  • Win32: How do I get the listbox for a combobox

    - by Adam Tegen
    I'm writing some code and I need to get the window handle of the listbox associated with a combo box. When looking in spy++, it looks like the parent of the listbox is the desktop, not the combo box. How can I programmatically find the listbox window handle? I know I'd be looking for a window class of ComboLBox that belongs to my process, but how do I narrow that down to the specific one I am looking for? Adam

    Read the article

  • When learning C, should one only refer to resources published from 2007 onward?

    - by Adam Siddhi
    I ask this question because the international standardization subcommittee for programming languages, or ISO/IEC JTC1/SC22 Programming languages, states on this page: http://www.open-std.org/JTC1/SC22/WG14/www/standards that Technical Corrigendum 3, the latest one, was published in 2007. Now I take it that this means the C language it self was changed and that the books and tutorials pre-2007 may contain outdated information. Please correct me if I am wrong. Thanks, Adam

    Read the article

  • How to use gnlcomposition to concatenate video files?

    - by Hardy
    Hi All, I am trying to concatenate two video files with the gnonlin components of the gstreamer. The pipeline I am using is gst-launch-0.10 gnlcomposition { gnlfilesource name="s1" location="/home/s1.mp4" start=0 duration=2000000000 media-start=0 media-duration=2000000000 gnlfilesource name="s2" location="/home/s2.mp4" start=2000000000 duration=2000000000 media-start=0 media-duration=2000000000 } ! queue ! videorate ! progressreport name="Merging Progress" ! ffmpegcolorspace ! ffenc_mpeg4 ! ffmux_mp4 ! filesink location="/home/merge.mp4" As a result I am getting only the second file for the duration specified in the parameters. Tried several things and also searched on google but I could not figure out the problem with the above command. Can anyone point what i am doing wrong? Any other way of concatenating multiple files into one based on time is welcome too. Thanks

    Read the article

  • Why is IHttpAsyncHandler being called over IHttpHandler?

    - by Tim Hardy
    I made a custom handler that derives from MvcHandler. I have my routes using a custom RouteHandler that returns my new handler for GetHttpHandler(), and I override ProcessRequest() in my custom handler. The call to GetHttpHandler is triggering a breakpoint and my handler's constructor is definitely being called, but BeginProcessRequest() is being called on the base MvcHandler instead of ProcessRequest(). Why are the async methods being called when I haven't done anything to call them? I don't want asynchronous handling, and I certainly didn't do anything explicit to get it. My controllers all derive from Controller, not AsyncController. I don't have the source code with me right now, but I can add it later if needed. I was hoping someone might know some of the reasons why BeginProcessRequest might be called when it's not wanted.

    Read the article

  • How to add monsters to a Pokemon game?

    - by Michael J. Hardy
    My friends and I are starting a game like Pokemon and we wanted to know how will we add monsters to the game? We're using VisualBasic because my friend's brother said it would be easier. So far we can put pictures of the monsters on the screen and you can click to attack and stuff. Right now when we want to add a monster we have to make a new window. This will take us a long time to make all the windows for each type of monster. Is there a tool or something to make this go faster? How do game companies do this?

    Read the article

  • How to order a HasMany collection by a child property with Fluent NHibernate mapping

    - by Geoff Hardy
    I am using Fluent NHibernate to map the following classes: public abstract class DomainObject { public virtual int Id { get; protected internal set; } } public class Attribute { public virtual string Name { get; set; } } public class AttributeRule { public virtual Attribute Attribute { get; set; } public virtual Station Station { get; set; } public virtual RuleTypeId RuleTypeId { get; set; } } public class Station : DomainObject { public virtual IList<AttributeRule> AttributeRules { get; set; } public Station() { AttributeRules = new List<AttributeRule>(); } } My Fluent NHibernate mappings look like this: public class AttributeMap : ClassMap<Attribute> { public AttributeMap() { Id(o => o.Id); Map(o => o.Name); } } public class AttributeRuleMap : ClassMap<AttributeRule> { public AttributeRuleMap() { Id(o => o.Id); Map(o => o.RuleTypeId); References(o => o.Attribute).Fetch.Join(); References(o => o.Station); } } public class StationMap : ClassMap<Station> { public StationMap() { Id(o => o.Id); HasMany(o => o.AttributeRules).Inverse(); } } I would like to order the AttributeRules list on Station by the Attribute.Name property, but doing the following does not work: HasMany(o => o.AttributeRules).Inverse().OrderBy("Attribute.Name"); I have not found a way to do this yet in the mappings. I could create a IQuery or ICriteria to do this for me, but ideally I would just like to have the AttributeRules list sorted when I ask for it. Any advice on how to do this mapping?

    Read the article

  • Setting processor affinity on CSC.exe launched by CoreCompile MSBuild Task

    - by Hardy
    I am wondering if there is simple way to ensure that when a c# project is compiled the CSC.exe launched inherits the parent processor affinity settings, or perhaps of a way where by i can supply this. I have been trying to accomplish this by launching a bat file from vs.net cmd prompt like start /affinity 01 custombuild.cmd and inside my custombuild.cmd i have @echo off msbuild Libraries.sln /t:rebuild /p:Configuration=Release;platform=x64 /m:1 :END The command line call to Csc.exe this generates looks like the following C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe ... ignoring the rest for brevity. What i 'd like to see is the CSC.exe to inherit the processor affinity or a simple way to be able to override how csc.exe call is generated so i can make it into a start /affinity 01 C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe ... ignoring the rest for brevity. I also noticed that CoreCompile target is defined in Microsoft.CSharp.targets, should i be considering overriding MSBuildToolsPath variable so i can sneak in my own version. This feels rather hacky. Any help would be much appreciated.

    Read the article

  • Commutative (operational transform) diffs for databases

    - by barrycarter
    What Unix program generates "diff"s between text files (or INSERT/UPDATE/DELETEs for databases) in such a way that the order that the "diff"s are applied in is irrelevant, and the result is the same regardless of order. Etherpad used to do something like this. Example (for a given document or database): % Adam makes a change X, then Bob makes a change Y, then Adam makes another change Z. % However, because of network latency, Adam sees the changes in this order: XZY, while Bob sees them in this order: YXZ. % However, the code/changes are written so that XYZ and YXZ yield the same result. Note: ideally, this can be done without having to do X/Y/Z inverse at any point. I have read http://stackoverflow.com/questions/2043165/operational-transformation-library but I'm not sure this really does what I want.

    Read the article

  • Force calling the derived class implementation within a generic function in C#?

    - by Adam Hardy
    Ok so I'm currently working with a set of classes that I don't have control over in some pretty generic functions using these objects. Instead of writing literally tens of functions that essentially do the same thing for each class I decided to use a generic function instead. Now the classes I'm dealing with are a little weird in that the derived classes share many of the same properties but the base class that they are derived from doesn't. One such property example is .Parent which exists on a huge number of derived classes but not on the base class and it is this property that I need to use. For ease of understanding I've created a small example as follows: class StandardBaseClass {} // These are simulating the SMO objects class StandardDerivedClass : StandardBaseClass { public object Parent { get; set; } } static class Extensions { public static object GetParent(this StandardDerivedClass sdc) { return sdc.Parent; } public static object GetParent(this StandardBaseClass sbc) { throw new NotImplementedException("StandardBaseClass does not contain a property Parent"); } // This is the Generic function I'm trying to write and need the Parent property. public static void DoSomething<T>(T foo) where T : StandardBaseClass { object Parent = ((T)foo).GetParent(); } } In the above example calling DoSomething() will throw the NotImplemented Exception in the base class's implementation of GetParent(), even though I'm forcing the cast to T which is a StandardDerivedClass. This is contrary to other casting behaviour where by downcasting will force the use of the base class's implementation. I see this behaviour as a bug. Has anyone else out there encountered this?

    Read the article

  • IIS6.0 asking for credentials after MS Updates

    - by Adam M.
    We have an IIS6.0 Server running on a Windows 2003 Server. Last weekend it went though maintenance, and updated a quite a few Windows updates, it is now brought up to current updates (as of March 29th). Previous to these updates we could connect to the Web page via the hostname or via a alias (there is a DNS and a WINS alias (the alias is the same name in both) that are both pointing to the system). Now since the updates it asks for credentials to access the page, when trying to access the page via IP, or by name. If you use the alias it will go right into the page. I had added a new alias in DNS and tried to access it via this name with the same effect. So it appears that the WINS alias allows the page to show up properly. I have seen this KB but http://support.microsoft.com/kb/871179 though not sure if it really is relevant to this issue. As it does refer to the 3 strikes rules to display the 401.1 error. The IIS Application pool is running under a domain account. Teh default page is allowing Anonymous login under a local account. Any thoughts? Thanks Adam

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >