Search Results

Search found 4637 results on 186 pages for 'john threepwood'.

Page 129/186 | < Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >

  • C# - Common way to format listview controls on forms?

    - by John M
    In a C# Winform application (3.5) there are numerous forms each with different listview controls. While each listview control uses different datasets the basic formatting of each remains the same. Basic formatting takes this form: /* appearance */ this.lstA.View = View.Details; this.lstA.AllowColumnReorder = true; this.lstA.CheckBoxes = false; this.lstA.FullRowSelect = true; this.lstA.GridLines = false; this.lstA.Sorting = SortOrder.Ascending; What I would like to do is create a class that can be used to set the initial format of the listview. How do I pass the listview (by reference?) to the class so that the appearance properties can be set?

    Read the article

  • tortoisesvn - Error REPORT request failed on ../../../!svn/vcc/default

    - by John
    Users attempting to check out files from a particular Subversion 1.4.x repository with Apache 2.2 on Windows 2003 have suddenly begun getting an error message in their log windows upon checkout with TortoiseSVN 1.4: Error REPORT request failed on '/[path_to_repo]/!svn/vcc/default' Error REPORT of '/[path_to_repo]/!svn/vcc/default': 200 OK (http://[server_name]) This started following an hd crash on the server and subsequent restore of about 10 subversion repositories. Only one repository is having this problem after an attempted working directory reconciliation. The repo owner reconcile their working directory with the repository by modifying/deleting the hidden .svn directories (though this was not advised). I can't find anything on the Internets that represents my situation. The restored server is exactly as the original and no other repositories on this server are throwing errors. Any ideas on 1) what this error is and 2) how to fix it?

    Read the article

  • Generating HTML Programmatically in C#, Targeting Printed Reports

    - by John Passaniti
    I've taken over a C# (2.0) code base that has the ability to print information. The code to do this is insanely tedious. Elements are drawn onto each page, with magic constants representing positioning. I imagine the programmer sitting with a ruler, designing each page by measuring and typing in the positions. And yes, one could certainly come up with some nice abstractions to make this approach rational. But I am looking at a different method. The idea is that I'll replace the current code that prints with code that generates static HTML pages, saves them to a file, and then launches the web browser on that file. The most obvious benefit is that I don't have to deal with formatting-- I can let the web browser do that for me with tags and CSS. So what I am looking for is a very lightweight set of classes that I can use to help generate HTML. I don't need anything as heavyweight as HTMLTextWriter. What I'm looking for is something to avoid fragments like this: String.Format("<tr><td>{0}</td><td>{1}</td></tr>", foo, bar); And instead take have this kind of feel: ... table(). tr(). td(foo). td(bar) Or something like that. I've seen lightweight classes like that for other languages but can't find the equivalent (or better) for C#. I can certainly write it myself, but I'm a firm believer in not reinventing wheels. Know anything like this? Know anything better than this?

    Read the article

  • Sharing memory between modules

    - by John Holecek
    Hi, I was wondering how to share some memory between different program modules - lets say, I have a main application (exe), and then some module (dll). They both link to the same static library. This static library will have some manager, that provides various services. What I would like to achieve, is to have this manager shared between all application modules, and to do this transparently during the library initialization. Between processes I could use shared memory, but I want this to be shared in the current process only. Could you think of some cross-platform way to do this? Possibly using boost libraries, if they provide some facilities to do this. Only solution I can think of right now, is to use shared library of the respective OS, that all other modules will link to at runtime, and have the manager saved there.

    Read the article

  • Perl, Net::Traceroute::PurePerl return value

    - by John R
    This is a sub routine that I copied from CPAN. It works fine as it is when I run it from the command line. I have a similar function from Net::Traceroute that also works fine AND allows me to return the string with a SOAP call. The problem comes when I try to return the ~string(?) from the function below with a SOAP call. sub tr { use Net::Traceroute::PurePerl; my $t = new Net::Traceroute::PurePerl( backend => 'PurePerl', # this optional host => 'www.whatever.com', debug => 0, max_ttl => 30, query_timeout => 2, packetlen => 40, protocol => 'udp', # Or icmp ); $t->traceroute; $t->pretty_print; return $t; #print $t; } The output looks like a string except the last part of the string looks like this: 28 * * * 29 * * * 30 * * * Net::Traceroute::PurePerl=HASH(0x11fa6bf0) I don't know what is different about Net::Traceroute::PurePerl that won't allow me to return the value with SOAP since the Net::Traceroute version does allow me to return it with SOAP.

    Read the article

  • Forcing size of a complex Flash object.

    - by John
    As I've found recently, setting width/height properties on a Sprite only forces the Sprite to fit the given dimensions by scaling the actual size, which is calculated by Flash based on the rendered content. This leaves me confused. If I have a custom Sprite subclass which draws using Graphics, how can I do layout before an initial render - the size will be zero until it is first drawn? For a more complex issue, let's say I have a 2D game world with objects spread over a wide area with world coordinates from (0,0) to (5000,5000), where each object has a size of maybe up to 100x100. I want to have a Flash component which is the "game window", and has a fixed size like 400x300, rendering part of the game world. So how do I force the game window size to 400x300 pixels? I can draw a 400x300 rectangle to get the size correct but then if I draw any objects which are partly in-view, they can screw this up. Is the right approach to provide a custom setSize(w,h) method which is used rather than width & height setters? But even so, is there no way to make a Sprite force to the size I want? Do you really have to catch it every render and re-scale it?

    Read the article

  • Wrapping a Flash/AS3 Sprite as a Flex MXML component

    - by John
    For my game, I am making the main game view as a plain Flash/AS3 class, something like: public class GameArena extends Sprite This is simply a big rectangle in which game objects are drawn, so no need for fancy UI and I want to keep the main game engine Flex-free so I can use Sprites rather than heavier Flex components. However for the entire game/app, I do still want to use Flex for GUI/layout. So I thought I could create a Flex class subclassing UIComponent, which has a GameView object as a child... now I can use this in MXML as a standard Flex component. e.g. public class ArenaView extends UIComponent { public var gameArena:GameArena; override protected function createChildren():void { super.createChildren(); if (!gameArena) { gameArena = new GameArena(); gameArena.width = 200; gameArena.height = 200; addChild(gameArena); } } } Then I have a simple line in my main App MXML like: <logic:Arena x="0" y="0" width="50%" height="100%" name="TestArenaPanel" /> But so far while my code compiles, the Flash class isn't getting rendered. Maybe it's something simple, but I wanted to ask if this is a reasonable approach, or there is something better? BTW: I've had the "should Flex be used" conversation many times. If you want to discuss that please do so in comments, but keep answers on topic.

    Read the article

  • Programming in a noisy office [closed]

    - by John Isaacks
    Can anyone recommend any techniques or advice for working in a noisy office? I know some people wear headphones and listen to music but I prefer silence. I work in a room with 4 others, there are no walls between us, we just each have our own desk. There is usually always someone talking, or on the phone, or on the intercom. Has anyone else had to deal with this? What did you do? What would you recommend?

    Read the article

  • Limiting object allocation over multiple threads

    - by John
    I have an application which retrieves and caches the results of a clients query. The client then requests different chunks of data and the application sends the relevant results and removes them from the cache. A new requirement for this application is that there needs to be a run-time configurable maximum number of results which may be cached. I've taken the naive approach and implemented this by using a counter under a lock which is incremented every time a result is cached and decremented whenever a result is removed from the cache. Unfortunately, this has drastically reduced the applications performance when processing a large number of concurrent requests. I have tried both a critical section lock and spin-lock; the performance improves a bit with a spin-lock, but is still unacceptably slow. Is there a better way to solve this problem which may improve performance? Right now I have a thread pool that services requests and each request is tied to a Request object which stores that cached results for that particular request. Here is a simplified pseudo code version of my current implementation: void ResultCallback( Result result, Request *request ) { lock totalResultsCached lock cachedLimit if( totalResultsCached + 1 > cachedLimit ) { unlock cachedLimit unlock totalResultsCached //cancel the request return; } ++totalResultsCached; unlock cachedLimit unlock totalResultsCached request.add(result) } void SendResults( int resultsToSend, Request *request ) { while ( resultsToSend > 0 ) { send(request.remove()) lock totalResultsCached --totalResultsCached unlock totalResultsCached --resultsToSend; } }

    Read the article

  • R: How to separate character output in a loop?

    - by John
    I'm blanking on the best way to paste a list of strings together to go into an SQL statement... I'm having trouble with the separator bar | printing at the beginning when I don't want it to: foo = "blah" paste_all_together = NULL for (n in 1:4) { paste_together = paste(foo ,sep = "") paste_all_together = paste(paste_all_together, paste_together, sep = "|") } > paste_all_together [1] "|blah|blah|blah|blah" I just want it to print out "blah|blah|blah|blah". Do I need a nested loop, or is there a better itterator in R for doing this? Or perhaps a better way to input SQL statements?

    Read the article

  • Best way to use the same HTML on static web-pages

    - by John
    If you use dynamic pages like JSP or asp.net, you can have your page template included, and then content added. But what if you have no server-side component and all pages are just HTML/JS? You can of course create a template then copy it for each page, but then if you want to change something you risk having to modify every page, even if you put most styling in CSS properly. Are there any non-awful ways to do this? I could see that an iframe could be used to load the content into the central page but that sounds nasty. Does HTML provide any way to include a base file and add to it?

    Read the article

  • Why does Ruby 1.9.2 remove "." from LOAD_PATH, and what's the alternative?

    - by John Feminella
    The latest changesets to Ruby 1.9.2 no longer make the current directory . part of your LOAD_PATH. I have a non-trivial number of Rakefiles that assume that . is part of the LOAD_PATH, so this broke them. Was there a particular justification for doing this? As for a fix, adding $: << "." everywhere works, but seems incredibly hacky and I don't want to do that. What's the preferred way to make my Rakefiles 1.9.2+ compatible?

    Read the article

  • Comma separated values in a database field

    - by John Doe
    I have a products table. Each row in that table corresponds to a single product and it's identified by a unique Id. Now each product can have multiple "codes" associated with that product. For example: Id | Code ---------------------- 0001 | IN,ON,ME,OH 0002 | ON,VI,AC,ZO 0003 | QA,PS,OO,ME What I'm trying to do is create a stored procedure so that I can pass in a codes like "ON,ME" and have it return every product that contains the "ON" or "ME" code. Since the codes are comma separated, I don't know how I can split those and search them. Is this possible using only TSQL? Edit: It's a mission critical table. I don't have the authority to change it.

    Read the article

  • How to tell if string time-A is before time-B?

    - by John Isaacks
    if I have 4 variables startTime; endTime; startMerid; endMerid; startMarid and endMarid are either going to be 'AM' or 'PM'. but startTime and endTime are going to be strings like 'dd:dd' so it may be start:12:30 PM and end:5:30 PM How can I validate that the end time is not before the start time? Thanks!!

    Read the article

  • Java execution details in System.out

    - by John
    As I remember there is a magic command line option in Java that turn on writing of operations that are currently executed to console. The output was looked like byte code. I do not mean -verbose, because it prints only class loading, while this option outputs information like memory allocation etc.

    Read the article

  • Javascript append to onClick event

    - by John Hartsock
    Guys I have the following Code which I know doesnt work correctly. Yes I know how to do this in JQuery but In this case I cannot use jquery. Please no jquery answers. <form> <input type="text" name="input1" onclick="alert('hello')"> <input type="text" name="input2"> <input type="text" name="input3"> </form> <script type="text\javascript"> window.onload = function () { var currentOnClick; for (var i = 0; i < document.forms[0].elements.length; i++) { currentOnClick = document.forms[0].elements[i].onclick; document.forms[0].elements[i].onclick = function () { if (currentOnClick) { currentOnClick(); } alert("hello2"); } } } </script> What Im trying to do is iterate through the form's elements and add to the onclick function. But due to the fact that in my last iteration currentOnClick is null this does not run as expected. I want to preserve each of the elements onclick methods and play them back in the new fuction Im creating. What I want: When input1 is clicked, alert "hello" then alert "hello2" When Input2 is clicked, alert "hello2" When Input3 is clicked, alert "hello2"

    Read the article

  • Ruby hash value truthiness and symbols

    - by John Topley
    Could somebody please explain why the variable named foo remains true in the code below, even though it's set to false when the method is called? And why the symbol version behaves as expected? def test(options = {}) foo = options[:foo] || true bar = options[:bar] || :true puts "foo is #{foo}, bar is #{bar}" end >> test(:foo => false, :bar => :false) foo is true, bar is false I've only tried this using Ruby 1.8.7.

    Read the article

  • T-SQL Question : Query to XML

    - by Juvil John Soriano
    anyone can show me how to generate from this data ------------------------DATA-------------------------- Key ParentKey 5 NULL 25 5 33 25 26 5 27 5 34 27 28 5 29 5 to this XML result? ---------------------RESULTS-------------------------- <record key="5" parentkey = ""> <record key="25" parentkey = "5"> <record key="33" parentkey = "25"></record> </record> </record> <record key="25" parentkey = "5"> <record key="26" parentkey = "5"> <record key="27" parentkey = "5"> <record key="34" parentkey = "27"></record> </record> </record> <record key="28" parentkey = "5"> <record key="29" parentkey = "5"> </record>

    Read the article

  • How can I view the all inherited url-resolution rules affecting a given directory?

    - by john.designop.us
    I work on two sites hosted on the same server, using the same CMS configurations and identical .htaccess files in their respective document roots. One site is letting me use the CMS's clean-url mode, and the other isn't. Site #2 functions fine in ?=messy-url mode, but when I turn clean urls on in the admin panel, and request a rewritten URL, I get a 404 error served before the CMS sees the request. I've contacted the server administrator, but he isn't inclined to provide support and the site owners are beholden to this hosting provider. I have shell access to the Linux-based server, and I can verify that mod_php and mod_rewrite are active, but I don't know what more I can do to troubleshoot this issue. Is there any way to identify directives upstream that may be differentiating the way http requests are handled by the two sites? Thanks!

    Read the article

  • Maximized MFC window has dead region at the top

    - by John Calsbeek
    I'm trying to make a MFC window fullscreen whenever it is maximized. This window is being used to draw OpenGL content. So far it works fine—it fills the entire screen with the exception of the taskbar—but there's a dead black region at the top of the screen, 62 pixels in height. It's pretty darn close to the height of the Windows 7 taskbar, but it pretty much stays the same regardless of if the taskbar is on autohide or on a different side of the screen. When I get a CWind::OnSize callback, the height that is given is 988, which is 62 pixels short of the actual screen height (1050). I've tried to manually set the window height to 1050 with SetWindowPos, I've tried to give Windows the screen dimensions in CWnd::OnGetMinMaxInfo, and I've tried to give the screen dimensions to glViewport instead of the 988 pixels that I'm being given. None of these seem to work. I'm accomplishing the fullscreening with a call to… ModifyStyle(0, WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_SYSMENU | WS_CAPTION | WS_POPUP, 0); …in the SIZE_MAXIMIZED CWnd::OnSize callback, which works fine, except for this dead region. I don't know if it's an OpenGL thing or a Win32 thing or a MFC thing. The GetClientRect function for my window reports the false 988 height. The same OpenGL rendering code works fine in my Mac OS X build. Curiously enough, I have gotten the dead region to move around a bit when I play with the taskbar (autohiding it, moving it around the screen, etc.). I've gotten the dead area to shrink to about half—not sure if the other half went to the bottom of the window or not.

    Read the article

  • [MS-DOS] Read command-line parameters to .bat from file

    - by John
    I have a build.bat file which uses %1 internally... so you might call: build 1.23 I wanted it to read the parameter from a separate file, so I tried putting "1.23" in version.txt and doing: build < version.txt But it doesn't work. Isn't this how piping works? Is what I want possible and if so how?

    Read the article

< Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >