Search Results

Search found 270 results on 11 pages for 'lawrence johnston'.

Page 5/11 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >

  • Is this the best way to get the size of a Paper via CUPS?

    - by Lawrence Johnston
    I've got a CUPS job control file. I need to get the actual dimensions of the print that was made. This is the way I've figure out to do it: Get the paper name using the media attribute. (e.g. Letter) Get the printer uri from the printer-uri attribute. (e.g. ipp://localhost/printers/MyPrinter) Get the printer name by passing the printer uri to the IPP_GET_PRINTER_ATTRIBUTES operation and getting the printer-name attribute. (e.g. MyPrinter) Get the path to the PPD passing the printer name to the the cupsGetPPD method. Open the PPD passing the path to the PPD to the ppdOpenFile method. Get the paper size by passing the PPD and paper name to the ppdPageSize method. This will work, but it seems a bit roundabout. Is there a more efficient way of getting what I need?

    Read the article

  • Can't get findnext property of range class error

    - by Lawrence Knowlton
    I am trying to parse a report in Excel 2007. It is basically a report of accounting charge exceptions. The report has sections with a header for each type of exception. There are types of exceptions that are deleted from the report. I'm using a Do While loop to find each header and if the section needs to be deleted I have it do so. If nothing needs to be deleted the code works fine, but right after a section is deleted I get an "Unable to get the FindNext property of the Range Class" error. Here is my code: Sub merge_All_Section_Headers() ' Description: ' The next portion macro will find and format the Tranaction Source rows in the file ' by checking each row in column A for the following text: TRANSA. If a cell ' has this text in it, it is selected and a function called merge_text_cells ' is run, which performs concatenation of each Transaction Source header row and ' deletes the text from the rest of the cells with broken up text. ' lastRow = ActiveSheet.UsedRange.Rows.Count + 1 Range(lastRow & ":" & lastRow).Delete ActiveSheet.PageSetup.Orientation = xlLandscape With ActiveSheet.Range("A:A") Dim searchString As String searchString = "TRANSA" 'The following sets stringFound to either true or false based on whether or not 'the searchString (TRANSA) is found or not): Set stringFound = .Find(searchString, LookIn:=xlValues, lookat:=xlPart) If Not stringFound Is Nothing Then firstLocation = stringFound.Address Do stringFound.Select lastFound = stringFound.Address merge_Text_Cells If ((InStr(ActiveCell.Text, "CHARGE FILER") = 0) And _ (InStr(ActiveCell.Text, "CREDIT FILER") = 0) And _ (InStr(ActiveCell.Text, "PA MIDNIGHT FINAL") = 0) And _ (InStr(ActiveCell.Text, "BAD DEBT TURNOVER") = 0)) Then section_Del 'Function that deletes unwanted sections End If Range(lastFound).Select Set stringFound = .FindNext(stringFound) Loop While Not stringFound Is Nothing And stringFound.Address <> firstLocation End If End With Like I said it works fine when the section_Del is commented out. Any ideas as to how to remedy this would be greatly appreciated. Thanks!

    Read the article

  • sysklogd ignores my log facilities

    - by Synther Lawrence
    I'm using sysklogd 1.5.5. All I want is to get local0 entries in /var/log/vr file. My conf: *.*;local0.none /var/log/messages local0.* /var/log/vr When I do logger -p local0.info "local0 test from logger" the message appear in /var/log/vr file. That's ok. But the following sends message to /var/log/messages instead of /var/log/vr: #include <stdlib.h> #include <syslog.h> int main(int argc, char const* argv[]) { openlog(NULL, LOG_PID, LOG_LOCAL0); syslog(LOG_INFO, "local0 test from app\n"); closelog(); return 0; } Where am I wrong?

    Read the article

  • How do I conditionally redirect the output of a command to /dev/null?

    - by Lawrence Johnston
    I have a script. I would like to give this script a quiet mode and a verbose mode. This is the equivalent of: if $verbose then redirect="> /dev/null" fi echo "Verbose mode enabled" $redirect # This doesn't work because the redirect isn't evaluated. I'd really like a better way of doing this than writing if-elses for every statement affected. eval could work, but has obvious side effects on other variables.

    Read the article

  • How can I get the domain name for a user logged into a Mac via Active Directory

    - by Lawrence Johnston
    In my Cocoa app how can I get the current user's domain when they're logged in via Active Directory? I need to determine two things: 1. If the current user is logged on to an Active Directory domain (only need to handle Active Directory). 2. If 1, the domain of the user. I've found references to Directory Services and the Open Directory Programming Guide but the latter is 10.6 only (I must support 10.5+) and I could not find any examples for the former that gave me an idea of what I needed to do.

    Read the article

  • Jquery Templeate, droping last item off in the each

    - by Lawrence
    Currently I am using jquery templating with some json data, I have a couple images that I am getting and I would like to drop the last image that I am getting from my json data. Right now I have this coded ( this only a snippet of the spot I am having the problem at): <div class="altViews"> <ul class="clearfix"> {{each(i,addImage) AdditionalImages}} <li class="altImage"> <img src="http://images.url.com/images/products/${addImage}" alt="${Name}" id="${addImage}"/> </li> {{/each}} </ul> </div> SO the main help I need is to be able to drop the last li, I just dont know how to use my index to do that.

    Read the article

  • Is there a good GUI SVN app for Mac (better than XCode)

    - by Lawrence Johnston
    Hey everybody, I'm looking for a more robust and fully featured GUI SVN manager for Mac than what is built into XCode (which works, but only as long as you don't need anything beyond the bare basics and doesn't work for versioning scripts and such created in other editors). I can use the terminal commands, but I'd really like the option of using a GUI. On windows I use TortoiseSVN and Visual SVN, which do pretty much everything I need, but as far as I'm aware there's nothing even remotely resembling those on the Mac side.

    Read the article

  • Would Python make a good substitute for the Windows command-line/batch scripts?

    - by Lawrence Johnston
    I've got some experience with Bash, which I don't mind, but now that I'm doing a lot of Windows development I'm needing to do basic stuff/write basic scripts using the Windows command-line language. For some reason said language really irritates me, so I was considering learning Python and using that instead. Is Python suitable for such things? Moving files around, creating scripts to do things like unzipping a backup and restoring a SQL database, etc.

    Read the article

  • Dynamic themes and custom styles

    - by Lawrence Kesteloot
    I've got an app with two themes (dark and light) that can be selected at runtime. This works. I also have a ListView with rows that can have one of three different layouts, each of which has a style (say, different colors). This also works. But I can't get these two features to work together. I really need six different styles, three for one theme (dark) and three for the other (light), but I can't figure out how to choose a style for a list item based on the current theme, or get that effect any other way by using XML files. My three layouts each point to a custom theme that sets the color, but that overrides whatever theme I've got set. Themes can only contain items that are "styleable", so I can't put my own custom items in there. There may be a way to do this programmatically, but I was hoping to do it declaratively. Any ideas?

    Read the article

  • jquery: validate that text field is numeric

    - by George Johnston
    I have simple issue -- I would like to check a field to see if it's numeric if it is not blank. I'm not using any additional plugins, just jQuery. My code is as follows: if($('#Field').val() != "") { if($('#Field').val().match('^(0|[1-9][0-9]*)$')) { errors+= "Field must be numeric.<br/>"; success = false; } } ...It doesn't seem to work. Where am I going wrong? Thanks, George

    Read the article

  • Draw simple circle in XNA

    - by George Johnston
    I want to draw a 2d, filled, circle. I've looked everywhere and cannot seem to find anything that will even remotely help me draw a circle. I simply want to specify a height and width and location on my canvas. Anyone know how? Thanks!

    Read the article

  • Can't get Secondary UITableViewController to display inside a UITabBarController

    - by Paul Johnston
    I've programmatically created a UITabBarController that is loaded in my App Delegate like this: - (void)applicationDidFinishLaunching:(UIApplication *)application { tabBarController = [[UITabBarController alloc] init]; myTableViewController = [[MyTableViewController alloc] init]; UINavigationController *tableNavController = [[[UINavigationController alloc] initWithRootViewController:myTableViewController] autorelease]; myTableViewController.title = @"Tab 1"; [myTableViewController release]; mySecondTableViewController = [[MySecondTableViewController alloc] init]; UINavigationController *table2NavController = [[[UINavigationController alloc] initWithRootViewController:mySecondTableViewController] autorelease]; mySecondTableViewController.title = @"Tab 2"; [mySecondTableViewController release]; tabBarController.viewControllers = [NSArray arrayWithObjects:tableNavController, table2NavController, nil]; [window addSubview:tabBarController.view]; [window makeKeyAndVisible]; } Now the issue I have is that I can get into the views no problem, but when I try and click onto any item in the Table View, I can't get a secondary table view to appear in any tab. The tabs work absolutely fine, just the secondary views. I'm using the code below in my myTableViewController to run when selecting a specific row (the code reaches the HELP line, and crashes)... - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSUInteger row = [indexPath row]; // this gets the correct view controller from a list of controllers SecondaryViewController *svc = [self.controllers objectAtIndex:row]; /*** HELP NEEDED WITH THIS LINE ***/ [self.navigationController pushViewController:svc animated:YES]; } Simply put, I'm trying to switch views to the new view controller whilst keeping the tabs available and using the navigation to go back and forth (like in the iTunes App). Any help appreciated. Thanks

    Read the article

  • Django MOD_PYTHON ERROR

    - by Cato Johnston
    I have had django running with mod_python for awhile now but today I get the following error MOD_PYTHON ERROR ProcessId: 4551 Interpreter: 'thatch' ServerName: 'thatch' DocumentRoot: '/var/www/thatch' URI: '/' Location: '/' Directory: None Filename: '/var/www/thatch/' PathInfo: '' Phase: 'PythonHandler' Handler: 'django.core.handlers.modpython' Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch default=default_handler, arg=req, silent=hlist.silent) File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 1202, in _process_target module = import_module(module_name, path=path) File "/usr/lib/python2.5/site-packages/mod_python/importer.py", line 304, in import_module return __import__(module_name, {}, {}, ['*']) ImportError: No module named django.core.handlers.modpython This is my virtual host configuration <VirtualHost *:80> ServerName thatch DocumentRoot /var/www/thatch <Location "/"> SetHandler python-program PythonPath "['/var/www/thatch'] + sys.path" PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE thatch.settings PythonOption django.root /var/www/thatch PythonDebug On </Location> <Location "/media"> SetHandler None </Location> <LocationMatch "\.(jpg|gif|png|css|js)$"> SetHandler None </LocationMatch> </VirtualHost> Any ideas why this is happening?

    Read the article

  • Find coordinate by angle

    - by George Johnston
    I am developing in application in XNA which draws random paths. Unfortunately, I'm out of touch with graphing, so I'm a bit stuck. My application needs to do the following: Pick a random angle from my origin (0,0), which is simple. Draw a circle in relation to that origin, 16px away (or any distance I specify), at the angle found above. (Excuse my horrible photoshoping) The second circle at (16,16) would represent a 45 degree angle 16 pixels away from my origin. I would like to have a method in which I pass in my distance and angle that returns a point to graph at. i.e. private Point GetCoordinate(float angle, int distance) { // Do something. return new Point(x,y); } I know this is simple, but agian, I'm pretty out of touch with graphing. Any help? Thanks, George

    Read the article

  • VB6 App + .Net component working as compiled app but not in VB6 IDE

    - by Craig Johnston
    I have a VB6 App that uses a .Net component (via a .tlb reference in the VB6 app) which is working fine when executed as a compiled app, but it produces an error from the VB6 IDE a certain point when it is trying to use the .NET component. I should note that the error occurs when the .NET component is meant to be invoking a third party reporting component. What could the problem be? Could the VB6 IDE be looking in a different location for certain DLLs? The .tlb is in the same location as the application executable so I don't why there should be a problem. I need to have the application running in the IDE in order to debug and step through the code.

    Read the article

  • Problems with Snow Leopard, Django & PIL

    - by Cato Johnston
    Hi I am having some trouble getting Django & PIL work properly since upgrading to Snow Leopard. I have installed freetype, libjpeg and then PIL, which tells me: --- TKINTER support ok --- JPEG support ok --- ZLIB (PNG/ZIP) support ok --- FREETYPE2 support ok but when I try to upload a jpeg through the django admin interface I get: Upload a valid image. The file you uploaded was either not an image or a corrupted image. It works fine with PNG files. Any Ideas?

    Read the article

  • Turn Texture Blending off in XNA

    - by George Johnston
    I am currently drawing single colored pixels to my texture in XNA. However, there seems to be blending occuring, as the color I draw on the screen gets blended with my background color. How can I turn this off so that the color I draw is only the color I draw? this.spriteBatch.Draw(texture, new Rectangle(x, y, 1, 1), [My Color]);

    Read the article

  • VB.NET: how to require CheckedListBox to have at least one item selected in WinForms

    - by Craig Johnston
    With the CheckListBox in VB.NET in VS2005, how would you make it compulsory that at least one item is selected? Can you select one of the items at design time to make it the default? EDIT: How can I make it so the last item the user tries to uncheck is the one that stays checked? So it's like the user tries to uncheck the only checked item but can't because it checks back straightaway.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >