Search Results

Search found 1911 results on 77 pages for 'james howell'.

Page 49/77 | < Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >

  • asp.net 4.0 webforms - how to keep ContentPlaceHolder1_ out of client id's in a simple way?

    - by James Manning
    I'm attempting to introduce master pages to an existing webforms site that's avoided using them because of client id mangling in the past (and me not wanting to deal with the mangling and doing <% foo.ClientID % everywhere :) GOAL: use 'static' id values (whatever is in the server control's id attribute) except for data-bound / repeating controls which would break for those cases and therefore need suffixes or whatever to differentiate (basically, Predictable) Now that the site migrated to ASP.NET 4.0, I first attempted to use ClientIDMode of Static (in the web.config) but that broke too many places doing repeating controls (checkboxes inside gridviews, for instance) since they all resulted with the same id. So, I then tried Predictable (again, just in the web.config) so that the repeating controls wouldn't have conflicting id's, and it works well except that the master page content placeholder (which is indeed a naming container) is still reflecting in the resulting client id's (for instance, ContentPlaceHolder1_someCheckbox). Certainly I could leave the web.config setting as static and then go through all the databound/repeating controls switch them to Predictable, but I'm hoping there's some easier/simpler way to get that effect without having to scatter ClientIDMode attributes in those N number of places (or extend all those databound controls with my own usercontrol that just sets clientidmode, or whatever). I even thought of leaving web.config set to static and doing a master or basepage handler (preinit? not sure if that would work or not) that would go walk Controls with OfType<INamingContainer() (might be a better choice on the type, but that seems like a good starting choice looking at repeater and gridview) and then set those to Predictable so I'd get static for all my 'normal' things outside of repeating controls but not have to deal with static inside things like gridview/repeater/etc. I don't see any way to mark the content placeholder such that it 'opts out' of being included in child id's - setting the ID of the placeholder to empty/blank doesn't work as it's a required attribute :) At that point I figured there was a better/simpler way that I was missing and decided to ask on SO :) Edit: I thought about changing all my 'fetch by id' jquery calls from $('#foo') to fetch_by_id('foo') and then having that function return the 'right one' by checking $('#foo').length and then $('#ContentPlaceHolder1_foo').length (and maybe other patterns) or even just have it return $('#foo, #ContentPlaceHolder1_foo') (again, potentially other patterns) but changing all the places I fetch elements by id seemed pretty ugly too, and I'd like to avoid that abstraction layer if possible to do so easily :)

    Read the article

  • Retrieving top 50 rows from Table using LINQ

    - by James
    Hey, Am new to LINQ, and am trying to retrieve the top 50 rows of a particular table. In SQL Server using an actual query i coudl say "Select TOP 50 from Transactions" , but not sure how i need to do that with LinQ Any pointers that could help ? Thanks !

    Read the article

  • Read Java in as Hex

    - by James
    Hi, I have tried to solve this but I keep coming up with stuff that is no help I'm sure this is easy (when you know how of course ;) ) What I would like to do is read in a file using a byte stream like below: while((read = in.read()) != -1){ //code removed to save space Integer.toHexString(read); System.out.println(read); } When it prints out the Hex to the screen it will print out numbers fine e.g 31 13 12 0 but when it comes to a hex code that should be 01 31 it will print 0 131. I want to read it in to a variable like you would see in a hex editor i.e 00 11 21 31 no single numbers as i need to scan the whole file and look for patterns which I know how to do I'm just stuck on this :/ so in short i need a variabe to contain the two hex characters i.e int temp = 01 not int temp = 0 , I hope this all makes sense, I'm a little confused as it's 3am! If anyone knows how to do this I would be most greatful, p.s thanks for the help in advance this site has saved me loads of research and have learnt a lot! Many thanks.

    Read the article

  • How can I get valgrind to tell me the address of each non-freed block of memory?

    - by James
    Valgrind tells me function xxx allocated memory which was not freed. Fine. It's proving more difficult than usual to trace however. To this end I have created numerous: #ifdef DEBUG fprintf(stderr, "something happening:%lx\n", (unsigned long)ptr); #endif So I just need to match these ptr addresses that are displayed with the addresses of non-freed memory. How can I get valgrind to tell me the address of each non-freed block of memory?

    Read the article

  • How can I get a rails server to use the same databse that cucumber uses during a test?

    - by James
    The cucumber test first makes an entry in the database and posts a form to a second server. This second server does some processing in background and then hits the first app (where the test is being run) with some data that the cucumber test needs to know about. I've tried running the main server via script/server and script/server -e test while the cucumber test is running, but I can't seem to force the server to use the same database that cucumber is using when it runs its step definitions. That is, when the second server pushes some data to a controller in the main server, the main server doesn't know about any entries that cucumber has made in the database. How can I get cucumber and the main server to use the same database?

    Read the article

  • What is the Action returned by the subscribe parameter of IObservable.Create actually for?

    - by James Hay
    The method definition of IObservable.Create is: public static IObservable<TSource> Create<TSource>( Func<IObserver<TSource>, Action> subscribe ) I get that the function is called once the observable is subscribed to, where by I can then call OnNext, OnError and OnComplete on the observer. But why do I need to return an Action from the subscibe parameter and when will it actually be called?

    Read the article

  • Find a free X11 display number

    - by James
    I have some unit tests that need an X11 display so I plan to start Xvfb before running them, but to start Xvfb I will need a free display number to connect it to. My best guess is to see what's free in /tmp/.X11-unix but I'm not sure how to handle the race if many tests try to start simultaneously. sshd must do this, does anyone know how?

    Read the article

  • a class function with if(this==NULL) test got compiled?

    - by James
    I saw this code snippet during our lab and it actually compiles in MSVC2008 and G++. void LinkList< class T ::Insert(T n) { if (this == NULL) // some code here } As far as I know the this must not be null since you cannot call a class functions in c++ if it wasn't instantiated. Is this a valid code? if so what's the reason behind and where it can be useful?

    Read the article

  • Python: For loop problem

    - by James
    I have a PSP page with html embedded. I need to place another for loop so i can insert another %s next to background-color: which will instert a appropriate colour to colour in the html table. For example i need to insert for z in colours so it can loop over the colours list and insert the correct colour. Where ever i try to insert the for loop it doesnt seem to work it most commonly colours each cell in the table 60 times then moves onto the next cell and repeats itself and crashes my web browser. The colours are held in a table called colours. code below: <table> <% s = ''.join(aa[i] for i in table if i in aa) for i in range(0, len(s), 60): req.write('<tr><td><TT>%04d</td>' % (i+1)); for k in s[i:i+60]: req.write('<TT><td><TT><font style="background-color:">%s<font></td>' % (k)); req.write('</TT></tr>') #end %> </table>

    Read the article

  • Why are all response bodies after the first blank in Cucumber?

    - by James A. Rosen
    I'm using Cucumber (0.6.3), Cucumber-Rails (0.3.0), Webrat (0.7.0), and Rails (2.3.5) for some tests. The following scenario passes just fine: Scenario: load one page Given I am on the home page Then I should see "Welcome" The following, however, fails: Scenario: load two pages Given I am on the FAQ pag When I go to the home page Then I should see "Welcome" The problem is that the second @response.body is blank. I added a Rack middleware to get a little more information: class LogEachRequest def initialize(app); @app = app; @count = 0; end def call(env) puts "Processing request # #{@count += 1)" @app.call(env) end end It shows me only one request processed. That is, it only ever prints out Processing request # 1

    Read the article

  • How do I relocate assemblies from a deployment project without breaking application references?

    - by James
    Hi, I have recently refactored a lot of my applications existing code and I am now looking at tidying up the deployment side of things. The existing installer application installs everything in the application folder (with the exclusion of a couple of config files which are located in a sub folder). However, I have multiple applications which all use some common assemblies and my goal is to relocate a these particular assemblies to the "Common Files" folder in the program files directory. NB: I have read a lot about the GAC but I have no experience with it and also read a few horror stories, so trying to get a simple solution for the time being. I managed to get the assemblies installed into the Common Files folder, however, as a result (typical I.T.) I have broken my app! If I copy the assemblies back into the application folder it works fine so the problem is obviously to do with how my app is referencing the assemblies. To get the installer to install the assemblies into the Common Files folder I just updated the Folder property of each assembly in the Detected Dependencies list. My thoughts were when I did that the installer would somehow update my application to tell it to look in that folder for them but that doens't appear to be the case. What exactly am I doing wrong here?

    Read the article

  • How to generate a Makefile with source in sub-directories using just one makefile.

    - by James Dean
    I have source in a bunch of subdirectories like: src/widgets/apple.cpp src/widgets/knob.cpp src/tests/blend.cpp src/ui/flash.cpp In the root of the project I want to generate a single Makefile using a rule like: %.o: %.cpp $(CC) -c $< build/test.exe: build/widgets/apple.o build/widgets/knob.o build/tests/blend.o src/ui/flash.o $(LD) build/widgets/apple.o .... build/ui/flash.o -o build/test.exe When I try this it does not find a rule for build/widgets/apple.o. Can I change something so that the %.o: %.cpp is used when it needs to make build/widgets/apple.o ?

    Read the article

  • Reject (Hard 404) ASP.NET MVC-style URLs

    - by James D
    Hi, ASP.NET MVC web app that exposes "friendly" URLs: http://somesite.com/friendlyurl ...which are rewritten (not redirected) to ASP.NET MVC-style URLs under the hood: http://somesite.com/Controller/Action The user never actually sees any ASP.NET MVC style URLS. If he requests one, we hard 404 it. ASP.NET MVC is (in this app) an implementation detail, not a fundamental interface. My question: how do you examine an arbitrary incoming URL and determine whether or not that URL matches a defined ASP.NET MVC path? For extra credit: how do you do it from inside an ASP.NET-style IHttpModule, where you're getting invoked upstream from the ASP.NET MVC runtime? Thanks!

    Read the article

  • Safely convert UTC datetimes to local time (based on TZ) for calculations?

    - by James
    Following from my last question which @Jon Skeet gave me a lot of help with (thanks again!) I am now wondering how I can safely work with date/times, stored as UTC, when they are converted back to Local Date/Time. As Jon indicated in my last question using DateTimeOffset represents an instant in time and there is no way to predict what the local time would be say a minute later. I need to be able to do calculations based on these date/times. So how can I assure when I pull the dates from the database, convert them to local date/time and do specific calculations on them they are going to be accurate?

    Read the article

  • HelpSpot to Fogbugz to HelpSpot integration

    - by James Ludlow
    Does anyone have a nice example of integration between HelpSpot and Fogbugz? We're using HelpSpot as our customer facing software and ticket management, and then if a developer needs to work on a ticket the data will be pushed to Fogbugz. Obviously we can use the Fogbugz push API that Userscape provides, but this only allows you to specify the title of the incident in Fogbugz. Ideally I want to share title, assigned to, category and status in a two-way integration. Do most people just use emails between the two programs, or has anyone come across a nice third party app? Thanks in advance!

    Read the article

  • Best way to determine variable type and treat each one differently in F#

    - by James Black
    I have a function that will create a select where clause, but right now everything has to be a string. I would like to look at the variable passed in and determine what type it is and then treat it properly. For example, numeric values don't have single quotes around them, option type will either be null or have some value and boolean will actually be zero or one. member self.BuildSelectWhereQuery (oldUser:'a) = let properties = List.zip oldUser.ToSqlValuesList sqlColumnList let init = false, new StringBuilder() let anyChange, (formatted:StringBuilder) = properties |> Seq.fold (fun (anyChange, sb) (oldVal, name) -> match(anyChange) with | true -> true, sb.AppendFormat(" AND {0} = '{1}'", name, oldVal) | _ -> true, sb.AppendFormat("{0} = '{1}'", name, oldVal) ) init formatted.ToString() Here is one entity: type CityType() = inherit BaseType() let mutable name = "" let mutable stateId = 0 member this.Name with get() = name and set restnameval=name <- restnameval member this.StateId with get() = stateId and set stateidval=stateId <- stateidval override this.ToSqlValuesList = [this.Name; this.StateId.ToString()] So, if name was some other value besides a string, or stateId can be optional, then I have two changes to make: How do I modify ToSqlValuesList to have the variable so I can tell the variable type? How do I change my select function to handle this? I am thinking that I need a new function does the processing, but what is the best FP way to do this, rather than using something like typeof?

    Read the article

  • How to obtain specific Excel object library without the corresponding Office version installed.

    - by james-h-l
    I am developing a Excel automation app that read and write to Excel spreadsheet. I have Office 2007 installed on my machine. I therefore can reference the Excel 12.0 Object Library and the Excel 5.0 Object Library. I don't want to use Excel 5.0 because it's really quite old and poorly documented. Therefore I'm referencing Excel 12.0. However the target machine have Office 2003 installed and therefore only have Excel 11.0. So when I compile my program it crashes on the target machine since the referenced library are different. I was wondering is there a way I could obtain the Excel 11.0 without installing Office 03? I tried to find answers from msdn and microsoft support page but couldn't find anything? This is quite strange since it could also happen in the future where developers has newer editions of Office than clients?

    Read the article

< Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >