Search Results

Search found 1077 results on 44 pages for 'bill paetzke'.

Page 21/44 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • GTK Scolled Window - Keep Scroll Bar at bottom

    - by Bill
    I have a GTK/C++ program that uses a ScrolledWindow. I keep adding data to the list within the scrolled window, and I want to keep focus on the newest item. But I also want to allow the user to scroll through the data to select an old item. Is there a way to do this? I've looked everywhere but can't find anything.

    Read the article

  • Determine image src in onload and onerror event handlers in IE

    - by Bill
    How can I determine the image src of the image that triggered the event in the onload and onerror event handlers in IE? This example code I threw together: <script language="javascript" type="text/javascript" src="jquery.js"></script> <script language="javascript" type="text/javascript"> function loadImages() { var goodImage = new Image(); var missingImage = new Image(); $(goodImage).bind('load', function(event){ $("#log").append( $(event.target).attr('src') + ' WAS FOUND <br>'); }); $(missingImage).bind('load', function(event){ $("#log").append( $(event.target).attr('src') + ' WAS FOUND <br>' ); }); $(goodImage).bind('error', function(event){ $("#log").append( $(event.target).attr('src') + ' IS MISSING <br>'); }); $(missingImage).bind('error', function(event){ $("#log").append( $(event.target).attr('src') + ' IS MISSING <br>'); }); goodImage.src = 'GOOD-IMAGE.GIF'; // this image exists missingImage.src = 'MISSING-IMAGE.GIF'; // this image doesn't exist } </script> </head> <body onload="loadImages();"> <div id="log"></div> works in FF but in IE8 it prints out undefined for the $(event.target).attr('src') part. I thought jQuery was supposed to normalize the event object for IE so that it acted like other browsers? I've tried a number of permutations but haven't been able to get anything to work in IE8. Anyway if anyone has a suggestion on how to figure out the image src in the onload and onerror event handlers that works in IE I would really appreciate it. Or even how to figure out after the images have loaded which have loaded and which haven't (but not graphically - I need to generate an array containing the filenames of the images that didn't load). Thanks!

    Read the article

  • Printing elements of array using ERB

    - by Keva161
    I'm trying to print a simple array defined in my controller into my view with a new line for each element. But what it's doing is printing the whole array on one line. Here's my controller: class TodosController < ApplicationController def index @todo_array = [ "Buy Milk", "Buy Soap", "Pay bill", "Draw Money" ] end end Here's my view: <%= @todo_array.each do |t| %> <%= puts t %><\br> <% end %> Here's the result: <\br> <\br> <\br> <\br> ["Buy Milk", "Buy Soap", "Pay bill", "Draw Money"]

    Read the article

  • Why is debugging better in an IDE?

    - by Bill Karwin
    I've been a software developer for over twenty years, programming in C, Perl, SQL, Java, PHP, JavaScript, and recently Python. I've never had a problem I could not debug using some careful thought, and well-placed debugging print statements. I respect that many people say that my techniques are primitive, and using a real debugger in an IDE is much better. Yet from my observation, IDE users don't appear to debug faster or more successfully than I can, using my stone knives and bear skins. I'm sincerely open to learning the right tools, I've just never been shown a compelling advantage to using visual debuggers. Moreover, I have never read a tutorial or book that showed how to debug effectively using an IDE, beyond the basics of how to set breakpoints and display the contents of variables. What am I missing? What makes IDE debugging tools so much more effective than thoughtful use of diagnostic print statements? Can you suggest resources (tutorials, books, screencasts) that show the finer techniques of IDE debugging? Sweet answers! Thanks much to everyone for taking the time. Very illuminating. I voted up many, and voted none down. Some notable points: Debuggers can help me do ad hoc inspection or alteration of variables, code, or any other aspect of the runtime environment, whereas manual debugging requires me to stop, edit, and re-execute the application (possibly requiring recompilation). Debuggers can attach to a running process or use a crash dump, whereas with manual debugging, "steps to reproduce" a defect are necessary. Debuggers can display complex data structures, multi-threaded environments, or full runtime stacks easily and in a more readable manner. Debuggers offer many ways to reduce the time and repetitive work to do almost any debugging tasks. Visual debuggers and console debuggers are both useful, and have many features in common. A visual debugger integrated into an IDE also gives you convenient access to smart editing and all the other features of the IDE, in a single integrated development environment (hence the name).

    Read the article

  • How to roll my own index in c#?

    - by bill seacham
    I need a faster way to create an index file. The application generates pairs of items to be indexed. I currently add each pair as it is generated to a sorted dictionary and then write it out to a disk file. This works well until the number of items added exceeds one million, at which time it slows to the point that is unacceptable. There can be as many as three million data items to be indexed. I prefer to avoid a database because I do not want to significantly increase the size of the deployment package, which is now less than one-half of one megabyte. I tried Access but it is even slower than the sorted dictionary -if it had an efficient bulk load utility then that might work, but I do not find such a tool for Access. Is there a better way to roll my own index?

    Read the article

  • Shuffling words in a sentence in javascript (coding horror - How to improve?)

    - by Bill Zimmerman
    Hi, I'm trying to do something that is fairly simple, but my code looks terrible and I am certain there is a better way to do things in javascript. I am new to javascript, and am trying to improve my coding. This just feels very messy. All I want to do is to randomly change the order some words on a web page. In python, the code would look something like this: s = 'THis is a sentence' shuffledSentence = random.shuffle(s.split(' ')).join(' ') However, this is the monstrosity I've managed to produce in javascript //need custom sorting function because javascript doesn't have shuffle? function mySort(a,b) { return a.sortValue - b.sortValue; } function scrambleWords() { var content = $.trim($(this).contents().text()); splitContent = content.split(' '); //need to create a temporary array of objects to make sorting easier var tempArray = new Array(splitContent.length); for (var i = 0; i < splitContent.length; i++) { //create an object that can be assigned a random number for sorting var tmpObj = new Object(); tmpObj.sortValue = Math.random(); tmpObj.string = splitContent[i]; tempArray[i] = tmpObj; } tempArray.sort(mySort); //copy the strings back to the original array for (i = 0; i < splitContent.length; i++) { splitContent[i] = tempArray[i].string; } content = splitContent.join(' '); //the result $(this).text(content); } Can you help me to simplify things?

    Read the article

  • How to estimate memory need by XPathDocument for a specific xml file

    - by bill seacham
    Is there any way to estimate the memory requirement for creating an XpathDocument instance based on the file size of the xml? XpathDocument xdoc = new XpathDocument(xmlfile); Is there any way to programmatically stop the process of creating the XpathDocument if memory drops to a very low level? Since it loads the entire xml into memory, it would be nice to know ahead of time if the xml is too big. What I have found is that when I create a new XpathDocument with a big xml file, an outofmemory exception is never fired, but that the process slows to a crawl, only 5 Mb of memory remains a available and the Task Manager reports it is not responding. This happened with a 266 Mb xml file when there was 584 Mb of ram. I was able to load a 150 Mb file with no problems in 18. After loading the xml, I want to do xpath queries using an XpathNavigator and an XpathNodeIterator. I am using .net 2.0, xp sp3.

    Read the article

  • What languages, frameworks, and technologies have you used to implement document searching?

    - by Bill Brasky
    I am at a new company and one of our goals is to implement a document search portal for our team and our clients. I am a bit worried that if we use an external service provider like Salesforce or some other ECM in the cloud there will be a lot of integration work in the future. From a client perspective, these documents will also exist in the same bucket as our structured content (stored in the DB, not a MS Word doc). If you have implemented document searching, what languages, frameworks, and technologies have you used? Do you have any failure stories? I don't have a problem using something out of the box, but I think it is important that we have control over the documents and the API to access them. I would like to use Rails if we go fully custom.

    Read the article

  • map<int,int> default values

    - by Bill Kotsias
    Hello. I have this : std::map<int,int> mapy; ++mapy[5]; Is it safe to assume that mapy[5] will always be 1? I mean, will mapy[5] always get the default value of 0 before '++', even if not explicitly declared, as in my code? Cheers

    Read the article

  • Jquery javascript - How can I let users 'undo' their modifications?

    - by Bill Zimmerman
    Hi, i have a basic jquery app that allows a user to edit and manipulate some lists on a page. What I would like to do is have a button 'restore original list' that the user can press to undo his modifications. What is the best way to do this? I was thinking of just copying the DOM from the list down, and pasting it in a hidden element someplace else on the page. Is this the best way to do this? I also noticed that jquery has a .data() function which I could use if I converted the data to an array and stored it this way. What are the advantages and disadvantages? Also, I'm open to any suggestions people have if there is some method I haven't thought of. Thanks for your help!

    Read the article

  • Why can't I start the Windows Update control panel with WinExec?

    - by Bill
    In Executing Control Panel Items, MSDN says this: Windows Vista Canonical Names In Windows Vista and later, the preferred method of launching a Control Panel item from a command line is to use the Control Panel item's canonical name. According to the Microsoft website this should work: The following example shows how an application can start the Control Panel item Windows Update with WinExec. WinExec("%systemroot%\system32\control.exe /name Microsoft.WindowsUpdate", SW_NORMAL); For Delphi 2010 I tried: var CaptionString: string; Applet: string; Result: integer; ParamString: string; CaptionString := ListviewApplets1.Items.Item[ ListviewApplets1.ItemIndex ].Caption; if CaptionString = 'Folder Options' then { 6DFD7C5C-2451-11d3-A299-00C04F8EF6AF } Applet := 'Microsoft.FolderOptions' else if CaptionString = 'Fonts' then {93412589-74D4-4E4E-AD0E-E0CB621440FD} Applet := 'Microsoft.Fonts' else if CaptionString = 'Windows Update' then { 93412589-74D4-4E4E-AD0E-E0CB621440FD } Applet := 'Microsoft.WindowsUpdate' else if CaptionString = 'Game Controllers' then { 259EF4B1-E6C9-4176-B574-481532C9BCE8 } Applet := 'Microsoft.GameControllers' else if CaptionString = 'Get Programs' then { 15eae92e-f17a-4431-9f28-805e482dafd4 } Applet := 'Microsoft.GetPrograms' //... ParamString := ( SystemFolder + '\control.exe /name ' ) + Applet; WinExec( ParamString, SW_NORMAL); <= This does not execute and when I trapped the error it returned ERROR_FILE_NOT_FOUND. I tried a ExecAndWait( ParamString ) method and it works perfectly with the same ParamString used with WinExec: ParamString := ( SystemFolder + '\control.exe /name ' ) + Applet; ExecAndWait( ParamString ); <= This executes and Runs perfectly The ExecAndWait method I used calls Windows.CreateProcess: if Windows.CreateProcess( nil, PChar( CommandLine ), nil, nil, False, 0, nil, nil, StartupInfo, ProcessInfo ) then begin try Does WinExec require a different ParamString, or am I doing this wrong with WinExec? I did not post the full ExecAndWait method but I can if someone wants to see it.

    Read the article

  • Is there a jQuery widget equal to DOJO's TitlePane?

    - by Bill Caswell
    I like the visual behavior of the DOJO TitlePane widget, but it has too much other bunk for my purpose. http://dojotoolkit.org/reference-guide/dijit/TitlePane.html#dijit-titlepane Is anyone aware of a jQuery widget that provides the same ability to expose and hide content in a stacked manner with the little flippy-arrow, pane highlighting on mouse over, etc? An accordion does not accomplish my goal being able to have multiple panes open at the same time. Thanks in advance.

    Read the article

  • Change a Recursive function that has a for loop in it into an iterative function?

    - by Bill
    So I have this function that I'm trying to convert from a recursive algorithm to an iterative algorithm. I'm not even sure if I have the right subproblems but this seems to determined what I need in the correct way, but recursion can't be used you need to use dynamic programming so I need to change it to iterative bottom up or top down dynamic programming. The basic recursive function looks like this: Recursion(i,j) { if(i>j) return 0; else { //This finds the maximum value for all possible subproblems and returns that for this problem for(int x = i; x < j; x++) { if(some subsection i to x plus recursion(x+1,j) is > current max) max = some subsection i to x plus recursion(x+1,j) } } } This is the general idea, but since recursions typically don't have for loops in them I'm not sure exactly how I would convert this to iterative. Does anyone have any ideas?

    Read the article

  • How to set a TCustomControl's Parent In Create

    - by Bill
    When we create a component as a custom control and the control is dropped on a panel the control always appears on the form rather than the containing control. How do you set the parent of the custom control in Create so that when the button is dropped on panel the buttons parent is the panel? TGlassButton = class(TCustomControl) ... public { Public declarations } constructor Create(AOwner: TComponent); override; ... constructor TGlassButton.Create(AOwner: TComponent); begin inherited; ??????????? inherited Create(AOwner); ???????????? Parent := TWinControl( AComponent ); ?????????????? ... end; The problem is designtime creation not runtime. This works perfectly: procedure TForm10.FormCreate(Sender: TObject); begin GlassButton0 := TGlassButton.Create( Panel1 ); GlassButton0.Parent := Panel1; GlassButton0.Left := 20; GlassButton0.Top := 6; GlassButton0.Width := 150; GlassButton0.Height := 25; GlassButton0.Caption := 'Created At RunTime'; end;

    Read the article

  • Automatically CONCATENATE text on data entry

    - by Bill T
    I am a newbie and need help. I have a table called "Employees". It has 2 fields [number] and [encode]. I want to automatically take whatever number is entered into [number] and store it in [encode] so that it is preceded by the appropriate amount of 0's to always make 12 digits. Example: user enters '123' into [number], '000000000123' is automatically stored in [encode] user enters '123456789' into [number], '000123456789' is automatically stored in [encode] I think i want to write a trigger to accomplish this. I think that would make it happen at the time of data entry. is that right? The main idea is would be something like this: variable1 = LENGTH [number] variable2 = REPEAT (0,12-variable1) variable3 = CONCATENATE (variable2, [number]) [encode] = variable3 I just don't know enough to make this happen ANY help would be FANTASTIC. I have SQL-SERVER 2005 and both fields are text

    Read the article

  • Passing multiple parameters of same column to SQL Server select SP

    - by Bill
    I have a string value in the web.config — for example 2 guids seperated by a ",". I need to query the database dynamically (i.e i have no idea how many values could be seperated by a comma in the web.config) and run a select statement on the table passing these values and getting all that is relevant for example: select * from tablename where columnname = string1 string2 string3 etc etc some strings may only contain 1 guid some may contain 10

    Read the article

  • Is there a better way to write this .htaccess directive?

    - by Bill H
    I want all css, javascript, and image file requests, that are named like this "filename.12345.css" to be re-routed to "filename.css". The ".12345" part will always be numbers and the length can be anywhere from 11 - 15 characters. This directive seems to work OK but I want to make sure there is no error in my logic. RewriteRule ^(.+)\.(.+)\.(js|css|jpg|gif|png)$ $1.$3 Any help would be greatly

    Read the article

  • Highlight the first row in a ListView and a ListBox Control

    - by Bill
    I am attempting to show both a ListView and ListBox on a Windows Form (C#). The difficulty I am having is in having the first row for both the ListView and ListBox highlighted when the application opens. Could someone please steer me in the right direction so that the first row of both the ListView and ListBox are highlighted when the application opens?

    Read the article

  • Any way to create a hidden main window in C#?

    - by Bill
    I just want a c# application with a hidden main window that will process and respond to window messages. I can create a form without showing it, and can then call Application.Run() without passing in a form, but how can I hook the created form into the message loop? Is there another way to go about this? Thanks in advance for any tips!

    Read the article

  • iPhone UIImage Display Controller

    - by Bill Shiff
    Hello, I would like to be able to display a UIImage from within my app and support a lot of the functionality available in the built-in Photos app (i.e., pinch-to-zoom, pan, etc). I don't really want to write a bunch of code that someone has already written, so I'm wondering if there is a library out there already that I could just import into my project. I'm aware of the Three20 project, but I don't want to import a huge library if I don't have to. Is anyone aware of an available library that's already out there for displaying UIImages? Or part of some open-source project that can be pulled out on its own? Thanks!

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >