Search Results

Search found 959 results on 39 pages for 'george kas'.

Page 26/39 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Numeric representation of a color

    - by George Johnston
    What would be the best format to numerically represent a color in .NET so that I wouldn't have to use the Color object? Right now I am saving the color as a the HTML representation, but in order to use it I have to parse it out. I am dealing with a 800x600 canvas that stores a color value for each pixel and I need to be able to render the color out as quick as possible without bloating my application out to storing 500k+ color objects.

    Read the article

  • Predicates and Lists

    - by George
    Hello guys, I have a generic list. Some elements of this list belong to a parent element. I retrieved all these elements from a database and i want to recursively build a tree with them. So, here's what i'm thinking: Here is my predicate: public static bool FindChildren(Int32 parentId,CategoryMapping catMapping) { if (catMapping.parentId == parentId) { return true; } else { return false; } } root = list[0]; root.childrenElements = root.FindAll(FindChildren(root.id,???) I can't figure out how this would work. How can i do this kind of predicate?

    Read the article

  • Why isn't my div scrolling horizontally when adding multiple images?

    - by George
    I have an outer div, and inside of that, I have an inner div which contains a list of images. When the images are wider than the outer div, I want to have it scroll horizontally, but instead, it just puts the image on the next line instead of expanding. If I add many rows, the div does scroll vertically, but horizontally, it doesn't do it. This happens on every browser I've tried - Firefox, Chrome, IE, and Safari. Here is the css: #grid-container { left:33px; position:relative; width:300px; } #grid { width:310px; height:400px; overflow:auto; margin-bottom: 15px; } #grid-container ul { width:305px; } #grid-container li { float:left; list-style-type:none; padding:5px 15px 5px 15px; height:88px; text-align:center; } .image-row { float:left; margin-left: 10px; } .grid-image { height:50px; margin-left:-20px; } Here is the html: <div id="grid-container"> <div id="grid"> <div id="row1" class="image-row"> <ul> <li> <img id="img1" class="grid-image" src="images/img1.jpg"> </li> <li> <img id="img2" class="grid-image" src="images/img2.jpg"> </li> <li> <img id="img3" class="grid-image" src="images/img3.jpg"> </li> <li> <img id="img4" class="grid-image" src="images/img4.jpg"> </li> </ul> </div> <div id="row1" class="image-row"> <ul> <li> <img id="img5" class="grid-image" src="images/img5.jpg"> </li> <li> <img id="img6" class="grid-image" src="images/img6.jpg"> </li> </ul> </div> </div> </div> The problem is img4 is showing on the second row (with img5 and img5 on the third row), even though it should on the first row and the grid div should scroll horizontally. It does scroll vertically. Can I force the div to expand? If I remove the width from the grid div, I do get the horizontal scroll bar, but the image is still on the second row.

    Read the article

  • Converting BindingList(Of T) to Array

    - by George
    Public Class Orders Inherits System.ComponentModel.BindingList(Of Order) End Class Public Sub DataBind(ByVal Orders() As Orders) End Sub Dim MyOrders() As Order = Orders.ToArray SuperListBinder.DataBind(MyOrders) '<<Error occurs on this line I don't understand this error. I think that I am passing the appropriate data type to a sub. I don't understand the meaning of "Cannot convert object of type x to an object of type x! Note that, if relevant, my Solution File contains ,multiple projects and that they are all project references. Error: Error 1 Value of type '1-dimensional array of BESI.BusinessObjects.Order' cannot be converted to '1-dimensional array of BESI.BusinessObjects.Orders' because 'BESI.BusinessObjects.Order' is not derived from 'BESI.BusinessObjects.Orders'. C:\My\Code\BESI\BesiAdmin\Forms\Activity.vb 17 34 BesiAdmin

    Read the article

  • Hide or Disable? In this example and in general...

    - by George
    I have the following set of controls. Scenario 1: If you select one of the first 3 radio buttons and click enter, focus will jump to the Passport Number text box. If the user selects "Other", the "Other, Please Specify" textbox is enabled and, for convenience, screen focus (the cursor is moved) to that textbox. Scenario 2: The "specify Other" text box is hidden until the user clicks on the Other Radio button. Upon doing so, the textbox is made visible and the cursor is placed in this textbox. Which scenario do you feel is a better approach? Perhaps you have another variation? Please state your reasoning. I would also appreciate it if you could make a generalized statement as to when hiding is better than disabling or vice versa, but I am also interested in this particular example. Thanks. Afetrthought: Perhaps, in the 2nd example, the "Please Specify" text would only appear after the user has selected the 'Other' radio button.

    Read the article

  • New or not so well-known paradigms, syntax features and behaviours of programming languages?

    - by George B
    I've designed some educational programming languages and interpreters for them, but my problem always was that they ended up "normal" and "boring", mostly similar to some kind of existing language (ASM and BASIC). I find it really hard to come up with new ideas for syntax features, "neat things" and new or very modified programming paradigms for it. I always thought that it was hard to come up with good new things not fun/useless new things for this case. I wondered if you could help me out with your creativity: What features in terms of language syntax and built-in functions as well as maybe even new paradigms can I work into my language to keep it useless but more fun, enjoyable, interesting and/or different to program in?

    Read the article

  • How to move value from the stack to ST(0)?

    - by George Edison
    I am having trouble believing the following code is the most efficient way to move a value from the stack to ST(0): .data var dd 4.2 tmp dd ? .code mov EAX, var push EAX ; top of stack now contains a value ; move it to ST(0) pop EAX mov tmp, EAX fld tmp Is the temporary variable really necessary? Further, is there an easier way to get a value from the stack to ST(0)?

    Read the article

  • How to add a slot to my main window in Qt builder?

    - by George Edison
    I am using Qt Builder to create a simple window. I used the menu editor to add a menu. Now, I figured out how to connect one of the menu items to the close() method of the main window. My problem is how to add a slot to the main window. Here is what I have: private slots: void OnAbout(); However, I can't get this method to show up in the 'Signals and Slots Editor'. How can I get it to show up?

    Read the article

  • jQuery UI problem: why do the elements go flying around the screen?

    - by George Edison
    Yes, I know the title sounds a little suspicious. I will try to explain this the best I can... The code below is supposed to have the blue div slide down beside the red div. The first time you hit the Show the div button, it works. Also, the Hide the div works. Then when I click to show the div again, it appears to the right of where it is supposed to be! Why is this?!? Note: You can find a live example of the code here <html> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Demo</title> <style type='text/css'> #red { background-color: red; width: 200px; height: 150px; position: absolute; } #blue { background-color: blue; width: 150px; height: 200px; position: absolute; display: none; } #tester_1 { top: 300px; left: 300px; position: absolute; } #tester_2 { top: 350px; left: 300px; position: absolute; } </style> </head> <script type="text/javascript" src="jquery.js"></script> <script type='text/javascript'> function Show() { $('#blue').position({ of: $('#red'), my: 'left top', at: 'right top'}).slideDown(); } function Hide() { $('#blue').hide(); } </script> <body> <div id='red'></div> <div id='blue'></div> <button id='tester_1' onclick='Show()'>Show the <kbd>div</kbd></button> <button id='tester_2' onclick='Hide()'>Hide the <kbd>div</kbd></button> </body> </html>

    Read the article

  • Adding new "columns" to csv data file in Tcl

    - by George
    Hi All, I am dealing with a "large" measurement data, approximately 30K key-value pairs. The measurements have number of iterations. After each iteration a datafile (non-csv) with 30K kay-value pairs is created. I want to somehow creata a csv file of form: Key1,value of iteration1,value of iteration2,... Key2,value of iteration1,value of iteration2,... Key2,value of iteration1,value of iteration2,... ... Now, I was wondering about efficient way of adding each iteration mesurement data as a columns to csv file in Tcl. So, far it seems that in either case I will need to load whole csv file into some variable(array/list) and work on each element by adding new measurement data. This seems somewhat inefficient. Is there another way, perhaps?

    Read the article

  • How to capture a 'sub-section' of a URL in a rewrite rule?

    - by George Edison
    I know the title is a little bit strange, but here is what the URLs look like: /user/xxx/page /user/xxx/page?error=yyy The rule for the first URL looks something like this: RewriteRule ^user/(\d+)/page$ something.pl?id=$1 [L] And to make it work with the second URL, it becomes: RewriteRule ^user/(\d+)/page(error=\d+)?$ something.pl?id=$1 [L] My question is... how do I capture the error number? I tried both of these: RewriteRule ^user/(\d+)/page(error=(\d+))?$ something.pl?id=$1&error=$2 [L] RewriteRule ^user/(\d+)/page(error=(\d+))?$ something.pl?id=$1&error=$3 [L] But it isn't working... How can I do this?

    Read the article

  • How to remove margin at top of table?

    - by George Edison
    I have the following HTML: <div></div> <table> <tr><td>Test</td></tr> </table> ...and the following CSS: div { /* nothing yet */ } table { margin: 0px; border-collapse: collapse; padding: 0px; } No matter what I do, there is still a gap between the table and the DIV. This occurs on Google Chrome 5.0.375.70 beta on Linux. (And it seems to occur on other Webkit-based browsers too.) How can I get rid of the space?

    Read the article

  • How to refer to object in JavaScript event handler?

    - by George Edison
    Note: This question uses jQuery but the question has nothing to do with jQuery! Okay so I have this object: var box = new BigBox(); This object has a method named Serialize(): box.AddToPage(); Here is the method AddToPage(): function AddToPage() { $('#some_item').html("<div id='box' onclick='this.OnClick()'></div>"); } The problem above is the this.OnClick() (which obviously does not work). I need the onclick handler to invoke a member of the BigBox class. How can I do this? How can an object refer to itself in an event handler?

    Read the article

  • How to set result of function as global variable.

    - by George
    I'm sure this is really simple and I'm drawing a giant blank, but how do you set the result of a function as a global variable? Example, I want to set the first "color" in array "colors" as global variable "color" (I know the example doesn't make much practical sense, but it's just to illustrate my question): var color = ""; function selectColor () { var colors = ["blue","red","green","yellow"]; var color = colors[0]; return color; } window.onload = function () { selectColor (); alert(color); }

    Read the article

  • PRoblems with encondig in ASP.MVC

    - by George
    Hello experts! I'm having a weird issue here. I have a bunch of Views, in which i have characters like this: é, á, ó, etc. In one of my views I can fetch data from the database with accents just fine, but in another one I simply get the "weird" characters :P WHat can i be doing wrong? Do i need to configure something in order to this work? Thanks!

    Read the article

  • I read 3 pages of a JQuery book and here's my reaction and question

    - by George
    My jQuery reaction to the language's flexible "selectors" is probably rooted in this experience: I once had managed a project where a developer constructed a web page that was used by users to provide very flexible search parameters for a search screen using dynamic sql string building based on the user's specified search parameter. The resulting queries were usually very complicated and involved joins to many tables. One of the options that the user had was to choose from one of 3 an options. Depending on the user's choice for this option, the resulting SQL would need to query a different set of database columns. For example, if choice option "A" were selected, the resulting database columns queried would be prefixed with "A_"; if option "B" were selected, he resulting database columns queried would be prefixed with "B_" and so on. The developer choice to write all the complete SQL assuming that the user selected, for example, option "A" and therefore first constructed SQLs of this type: SQL = "SELECT A_COL1, A_COL2, A_COL3 FROM TABLE ..." and then after constructing one of a million possible variations on the Query From Hell, did something like this: If UserOption = "B" then SQL = SQL.Replace("A_","B_") 'replace everywhere End if He insisted that this was the easiest was to code it, and while I understood that, I was concerned about maintenance of this code. You see, this worked for a while, but as the search options grew and the database columns evolved, the various "REPLACE small substring" with another small substring had unexpected consequences when applied to an evolving database and new search options. My feeling is that code should be written as much as possible such that you can add to it without fear of breaking what is already there. I feel a better approach, though a bit more work, would have been to write a function to return the appropriate target column based on a common set name and the user selected option. OK, so what does this have to do with jQuery selectors? Are the ultra flexible JQuery selectors kind of like perform a "replace all" on a SQL string? Handy as hell but potentially creating a maintenance nightmare?

    Read the article

  • How to use clearInterval() and then make changes to the DOM?

    - by George D.
    I have this code and the problem I have is that I want to stop the loop and then replace the text 'Done!' that comes from the sms-loader.php script with the "textnew" string. Problem is that the loop occurs one more time so the text in the div.checkstatus field is again replaced by the calling php script. The strange thing is that I see the log message and again I get a new (and final) request, although the ordering is the opposite (first stop then replace text()) in my script. I need to understand why this is happening. $(document).ready(function() { var interval = ""; $('.checkstatus').each(function(){ var msgid = $(this).data('msg') $this = $(this), hid = $this.data('history'), textnew = '<a href="sms-dstatus.php?id='+msgid+'&sid=' +hid+ '&amp;keepThis=true&amp;TB_iframe=true&amp;height=430&amp;width=770" title="Delivery Status" class="thickbox"><img src="../template/icons/supermini/chart_curve.png" alt="status" width="16" height="16" /></a>'; interval = setInterval(function() { $this.load('../pages/sms-loader.php?id='+msgid); // stop the loop if($this.text()=='Done!'){ // stop it clearInterval(interval); console.log(textnew); this.html(textnew); /// this line is the problem } }, 5000); // 5 secs }); });

    Read the article

  • How to get this JavaScript class member to return a value?

    - by George Edison
    I have a JavaScript class that has a method: function someClass() { this.someMethod = someClass_someMethod; } function someClass_someMethod() { // make an AJAX request } The problem is that someClass_someMethod() needs to return the value of the AJAX request. I'm using jQuery's $.getJSON() method to fetch the data. The data needs to be returned but it seems the only way to get the data is through a callback. How can this be done?

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >