Search Results

Search found 2332 results on 94 pages for 'j green'.

Page 17/94 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Debugging Minimum Translation Vector

    - by SyntheCypher
    I implemented the minimum translation vector from codezealot's tutorial on SAT (Separating Axis Theorem) but I'm having an issue I can't quite figure out. Here's the example I have: As you can see in top and bottom left images regardless of the side the of the green car which red car is penetrating the MTV for the red car still remains as a negative number also here is the same example when the front of the red car is facing the opposite direction the number will always be positive. When the red car is past the half way through the green car it should switch polarity. I thought I'd compensated for this in my code, but apparently not either that or it's a bug I can find. Here is my function for finding and returning the MTV, any help would be much appreciated: Code

    Read the article

  • SSRS 2008 R2 KPIs with bullet graphs

    Key Performance Indicators are typically displayed in a scorecard with stop light indicators, which are either red, amber or green light icons. The limitation for these kind of indicators is that you can see the actual and target values in two different fields as well as see the status of the KPI in red, amber or green color. If the user wants to figure out the thresholds associated with the KPI, these values are generally not visible. Further, representing the threshold values in the scorecard itself defeats the purpose of the scorecard. The scorecard should display the KPI's status in the most summarized form and use a minimal amount of space on the dashboard. In this tip we would look at how to address this issue.

    Read the article

  • Ubuntu won't wake after pm-suspend

    - by Matus
    i have ubuntu 12.04 on my Zotac AD-02. Problem is when i run pm-suspend. zotac goes to sleep (it shows red led, and green light is flashing) but when i send magic packet to WOL it hangs ... it stops flashing and LED is green as its turned on but SSH wont run and it won't react to mouse or anything. I've read that sometimes it has something to do with graphics. It is mainly for DLNA and PLEX so i don't use any graphic component so if there is the problem tell me how to disable it :) is there some log or anything i can post? im fairly good at bash but not at all in ubuntu or debian. so i can't find any log. Thanks EDIT: here is lscpi if it helps

    Read the article

  • Windows 8 Style Ultimate Tile Theme Backgrounds [Wallpaper Pack]

    - by Asian Angel
    Are you excited about Windows 8? Then add a Windows 8 Tile look to your desktop with this awesome wallpaper pack! Note 1: The wallpapers are set up in a .themepack format but can be easily opened/unzipped with a file zipping software such as IZarc, 7-Zip, PeaZip, etc. Note 2: The wallpapers come in two groups. Group #1 (1920*1080) comes with red, yellow, green, blue, and black wallpapers while Group #2 (1728*1080) comes with red, yellow, green, and blue wallpapers. Ultimate Tile Themepack [deviantART] What is a Histogram, and How Can I Use it to Improve My Photos?How To Easily Access Your Home Network From Anywhere With DDNSHow To Recover After Your Email Password Is Compromised

    Read the article

  • Nearest color algorithm using Hex Triplet

    - by Lijo
    Following page list colors with names http://en.wikipedia.org/wiki/List_of_colors. For example #5D8AA8 Hex Triplet is "Air Force Blue". This information will be stored in a databse table (tbl_Color (HexTriplet,ColorName)) in my system Suppose I created a color with #5D8AA7 Hex Triplet. I need to get the nearest color available in the tbl_Color table. The expected anaser is "#5D8AA8 - Air Force Blue". This is because #5D8AA8 is the nearest color for #5D8AA7. Do we have any algorithm for finding the nearest color? How to write it using C# / Java? REFERENCE http://stackoverflow.com/questions/5440051/algorithm-for-parsing-hex-into-color-family http://stackoverflow.com/questions/6130621/algorithm-for-finding-the-color-between-two-others-in-the-colorspace-of-painte Suggested Formula: Suggested by @user281377. Choose the color where the sum of those squared differences is minimal (Square(Red(source)-Red(target))) + (Square(Green(source)-Green(target))) +(Square(Blue(source)-Blue(target)))

    Read the article

  • Changing color of HighlighBrushKey in XAML

    - by phil
    Hi, I have the following problem. The background color in a ListView is set LightGreen or White, whether a boolflag is true or false. Example Screen Window1.xaml: <Window.Resources> <Style TargetType="{x:Type ListViewItem}"> <Style.Triggers> <DataTrigger Binding="{Binding Path=BoolFlag}" Value="True"> <Setter Property="Background" Value="LightGreen" /> </DataTrigger> </Style.Triggers> </Style> </Window.Resources> <StackPanel> <ListView ItemsSource="{Binding Path=Personen}" SelectionMode="Single" SelectionChanged="ListViewSelectionChanged"> <ListView.View> <GridView> <GridViewColumn DisplayMemberBinding="{Binding Path=Vorname}" Header="Vorname" /> <GridViewColumn DisplayMemberBinding="{Binding Path=Nachname}" Header="Nachname" /> <GridViewColumn DisplayMemberBinding="{Binding Path=Alter}" Header="Alter" /> <GridViewColumn DisplayMemberBinding="{Binding Path=BoolFlag}" Header="BoolFlag" /> </GridView> </ListView.View> </ListView> </StackPanel> Window1.xaml.cs: public partial class Window1 : Window { private IList<Person> _personen = new List<Person>(); public Window1() { _personen.Add(new Person { Vorname = "Max", Nachname = "Mustermann", Alter = 18, BoolFlag = false, }); _personen.Add(new Person { Vorname = "Karl", Nachname = "Mayer", Alter = 27, BoolFlag = true, }); _personen.Add(new Person { Vorname = "Josef", Nachname = "Huber", Alter = 38, BoolFlag = false, }); DataContext = this; InitializeComponent(); } public IList<Person> Personen { get { return _personen; } } private void ListViewSelectionChanged(object sender, SelectionChangedEventArgs e) { Person person = e.AddedItems[0] as Person; if (person != null) { if (person.BoolFlag) { this.Resources[SystemColors.HighlightBrushKey] = Brushes.Green; } else { this.Resources[SystemColors.HighlightBrushKey] = Brushes.RoyalBlue; } } } } Person.cs: public class Person { public string Vorname { get; set; } public string Nachname { get; set; } public int Alter { get; set; } public bool BoolFlag { get; set; } } Now I want to set the highlight color of the selected item, depending on the boolflag. In Code-Behind I do this with: private void ListViewSelectionChanged(object sender, SelectionChangedEventArgs e) { Person person = e.AddedItems[0] as Person; if (person != null) { if (person.BoolFlag) { this.Resources[SystemColors.HighlightBrushKey] = Brushes.Green; } else { this.Resources[SystemColors.HighlightBrushKey] = Brushes.RoyalBlue; } } } } This works fine, but now I want to define the code above in the XAML-file. With <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Green" /> I can overwrite the default-value. However, it works, but the color is set to Green for all selected items. I have tried different ways to switch the color of HighlightBrushKey between Green and Blue in XAML, depending on the boolflag, but I didn't succeed. May you can help me and give me some examples?

    Read the article

  • Public class DiscoLight help

    - by luvthug
    Hi All, If some one can point me in the right direction for this code for my assigment I would really appreciate it. I have pasted the whole code that I need to complete but I need help with the following method public void changeColour(Circle aCircle) which is meant to allow to change the colour of the circle randomly, if 0 comes the light of the circle sgould change to red, 1 for green and 2 for purple. public class DiscoLight { /* instance variables */ private Circle light; // simulates a circular disco light in the Shapes window private Random randomNumberGenerator; /** * Default constructor for objects of class DiscoLight */ public DiscoLight() { super(); this.randomNumberGenerator = new Random(); } /** * Returns a randomly generated int between 0 (inclusive) * and number (exclusive). For example if number is 6, * the method will return one of 0, 1, 2, 3, 4, or 5. */ public int getRandomInt(int number) { return this.randomNumberGenerator.nextInt(number); } /** * student to write code and comment here for setLight(Circle) for Q4(i) */ public void setLight(Circle aCircle) { this.light = aCircle; } /** * student to write code and comment here for getLight() for Q4(i) */ public Circle getLight() { return this.light; } /** * Sets the argument to have a diameter of 50, an xPos * of 122, a yPos of 162 and the colour GREEN. * The method then sets the receiver's instance variable * light, to the argument aCircle. */ public void addLight(Circle aCircle) { //Student to write code here, Q4(ii) this.light = aCircle; this.light.setDiameter(50); this.light.setXPos(122); this.light.setYPos(162); this.light.setColour(OUColour.GREEN); } /** * Randomly sets the colour of the instance variable * light to red, green, or purple. */ public void changeColour(Circle aCircle) { //student to write code here, Q4(iii) if (getRandomInt() == 0) { this.light.setColour(OUColour.RED); } if (this.getRandomInt().equals(1)) { this.light.setColour(OUColour.GREEN); } else if (this.getRandomInt().equals(2)) { this.light.setColour(OUColour.PURPLE); } } /** * Grows the diameter of the circle referenced by the * receiver's instance variable light, to the argument size. * The diameter is incremented in steps of 2, * the xPos and yPos are decremented in steps of 1 until the * diameter reaches the value given by size. * Between each step there is a random colour change. The message * delay(anInt) is used to slow down the graphical interface, as required. */ public void grow(int size) { //student to write code here, Q4(iv) } /** * Shrinks the diameter of the circle referenced by the * receiver's instance variable light, to the argument size. * The diameter is decremented in steps of 2, * the xPos and yPos are incremented in steps of 1 until the * diameter reaches the value given by size. * Between each step there is a random colour change. The message * delay(anInt) is used to slow down the graphical interface, as required. */ public void shrink(int size) { //student to write code here, Q4(v) } /** * Expands the diameter of the light by the amount given by * sizeIncrease (changing colour as it grows). * * The method then contracts the light until it reaches its * original size (changing colour as it shrinks). */ public void lightCycle(int sizeIncrease) { //student to write code here, Q4(vi) } /** * Prompts the user for number of growing and shrinking * cycles. Then prompts the user for the number of units * by which to increase the diameter of light. * Method then performs the requested growing and * shrinking cycles. */ public void runLight() { //student to write code here, Q4(vii) } /** * Causes execution to pause by time number of milliseconds */ private void delay(int time) { try { Thread.sleep(time); } catch (Exception e) { System.out.println(e); } } }

    Read the article

  • ComboBox values disappears after selected when objects used for display

    - by Gakk
    I have a combobox where I want to display objects and have enum values returned. When first opened the combobox displays the items as supposed, but after a value is chosen it seems to disappear from the list. But if the combobox is active I can use the keyboard to navigate up and down between the other values, so they are in the list but only invisible. I have created a little test application to show my problem. When started the application shows the combobox with all the choices (the two first are type of Object, the third is a String): After the blue line is selected and when the combobox is opened again this line is missing: When the line with the text "Green" is selected that line is still showing: If I had chosen the red line the only thing that would still be in the list is the test "Green". I am using .NET Framework 3.5. Any hints or tips to why the elements disappears? Here are all the code needed after starting a blank project in Visual Studio. MainWindow.xaml.cs: using System; using System.Collections.Generic; using System.Diagnostics; namespace Test { public partial class MainWindow { public MainWindow() { InitializeComponent(); } private ColorComboBoxValue _activeColor; public ColorComboBoxValue ActiveColor { get { return _activeColor; } set { _activeColor = value; Debug.WriteLine("ActiveColor: " + _activeColor.Color); } } } public class ColorList : List<ColorComboBoxValue> { } public class ColorComboBoxValue { public Color Color { get; set; } public Object Object { get; set; } } public enum Color { Red, Blue, Green } } MainWindow.xaml: <Window x:Class="Test.MainWindow" x:Name="window" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:local="clr-namespace:Test" Title="ComboBoxTest" Height="100" Width="200"> <Window.Resources> <local:ColorList x:Key="ColorList"> <local:ColorComboBoxValue Color="Red"> <local:ColorComboBoxValue.Object> <Path Data="M0,0 L0,30 60,30 60,0 Z" Fill="Red"/> </local:ColorComboBoxValue.Object> </local:ColorComboBoxValue> <local:ColorComboBoxValue Color="Blue"> <local:ColorComboBoxValue.Object> <Path Data="M0,0 L0,30 60,30 60,0 Z" Fill="Blue"/> </local:ColorComboBoxValue.Object> </local:ColorComboBoxValue> <local:ColorComboBoxValue Color="Green"> <local:ColorComboBoxValue.Object> <System:String>Green</System:String> </local:ColorComboBoxValue.Object> </local:ColorComboBoxValue> </local:ColorList> </Window.Resources> <ComboBox ItemsSource="{Binding Source={StaticResource ColorList}}" SelectedItem="{Binding ActiveColor, ElementName=window}"> <ComboBox.ItemTemplate> <DataTemplate> <ContentPresenter Content="{Binding Path=Object}"/> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox> </Window>

    Read the article

  • How does Windows 7 taskbar "color hot-tracking" feature calculate the colour to use?

    - by theyetiman
    This has intrigued me for quite some time. Does anyone know the algorithm Windows 7 Aero uses to determine the colour to use as the hot-tracking hover highlight on taskbar buttons for currently-running apps? It is definitely based on the icon of the app, but I can't see a specific pattern of where it's getting the colour value from. It doesn't seem to be any of the following: An average colour value from the entire icon, otherwise you would get brown all the time with multi-coloured icons like Chrome. The colour used the most in the image, otherwise you'd get yellow for the SQL Server Management Studio icon (6th from left). Also, the Chrome icon used red, green and yellow in equal measure. A colour located at certain pixel coordinates within the icon, because Chrome is red -indicating the top of the icon - and Notepad++ (2nd from right) is green - indicating the bottom of the icon. I asked this question on ux.stackoverflow.com and it got closed as off-topic, but someone answered with the following: As described by Raymond Chen in this MSDN blog article: Some people ask how it's done. It's really nothing special. The code just looks for the predominant color in the icon. (And, since visual designers are sticklers for this sort of thing, black, white, and shades of gray are not considered "colors" for the purpose of this calculation.) However I wasn't really satisfied with that answer because it doesn't explain how the "predominant" colour is calculated. Surely on the SQL Management Studio icon, the predominant colour, to my eyes at least, is yellow. Yet the highlight is green. I want to know, specifically, what the algorithm is.

    Read the article

  • problem transferring Win 7 operating system hard drive to be used as external hard drive

    - by itserich
    Win 7 Asus MA479 8GB Ram hard drives are 500GB The operating system was a Caviar Green, and I tried to exchange it for a Caviar Blue. The Caviar Blue took the install correctly, but the Green, the prior operating system hard drive, will not allow itself to be used as an external hard drive. I use TrueCrypt and tried to format the Green and it freezes each time at the very end of the encyrption of the partition. I took the Blue out of the system and tried to encrypt it, and same problem. I think there must be something on the hard drive that shows it was a system drive and it causes a conflict. I have tried writing over the system hard drive to fully erase everything but that does not work, it still freezes. The drives will work in a different pc, i.e. other pc where it never was the system drive. The external hard drive is connected esata through Thermaltake. I have used TrueCrypt on various pc's for years including this Win7 with no problem. Thank you.

    Read the article

  • Overlap problem with Android ListView selector

    - by virsir
    I am trying to style my ListView with two 9-patch background images (16px * 9px), one dark image for default state and another green image for selected and pressed state. It works except for just one problem that when I select or press one list item, it seems that the selected item overlap the next one a little bit as I can see some pixels of the green background image is on the top of next item. How to fix that?

    Read the article

  • Business enum to DatContract Enum conversion in WCF

    - by chugh97
    I have an enum namespace Business { public enum Color { Red,Green,Blue } } namespace DataContract { [DataContract] public enum Color { [EnumMember] Red, [EnumMember] Green, [EnumMember] Blue } } I have the same enum as a datacontract in WCF with same values. I need to convert the Business enum to the DataContract enum using a translator. Hoe can I achieve this?

    Read the article

  • Create array of objects based on another array?

    - by xckpd7
    I want to take an array like this: var food = [ { name: 'strawberry', type: 'fruit', color: 'red', id: 3483 }, { name: 'apple', type: 'fruit', color: 'red', id: 3418 }, { name: 'banana', type: 'fruit', color: 'yellow', id: 3458 }, { name: 'brocolli', type: 'vegetable', color: 'green', id: 1458 }, { name: 'steak', type: 'meat', color: 'brown', id: 2458 }, ] And I want to create something like this dynamically: var foodCategories = [ { name: 'fruit', items: [ { name: 'apple', type: 'fruit', color: 'red', id: 3418 }, { name: 'banana', type: 'fruit', color: 'yellow', id: 3458 } ] }, { name: 'vegetable', items: [ { name: 'brocolli', type: 'vegetable', color: 'green', id: 1458 }, ] }, { name: 'meat', items: [ { name: 'steak', type: 'meat', color: 'brown', id: 2458 } ] } ] What's the best way to go about doing this?

    Read the article

  • How to convert between Enums where values share the same names ?

    - by Ross Watson
    Hi, if I want to convert between two Enum types, the values of which, I hope, have the same names, is there a neat way, or do I have to do it like this...? enum colours_a { red, blue, green } enum colours_b { yellow, red, blue, green } static void Main(string[] args) { colours_a a = colours_a.red; colours_b b; //b = a; b = (colours_b)Enum.Parse(typeof(colours_b), a.ToString()); } Thanks, Ross

    Read the article

  • adding opacity's of the PhoneAccentBrush to a Silverlight toolbox pie chart

    - by Doug
    Hi there, i am working on a windows phone application and i am using the pie chart - i am relatively new to the silverlight control toolbox. i want to make my pie chart use different opacity's of the PhoneAccentBrush as its colour pallete. (ie if the accent colour is green then i use the green and then a 0.8,0.6,0.4,0.2 opacity of the colour as my pie charts pallete) i have tried a few things, but none of them worked - has anyone accomplished this and if so how? thanks in advance Doug

    Read the article

  • PHP form values after POST in dropdown

    - by FFish
    I have a form with 'selected' values pulled from the database. Now I want the user to edit the values. When the data is send I want to show the new values. When I submit my form I always get the 'green' value? What am I doing wrong here? <?php // pulled from db $color = "blue"; // update if (isset($_POST['Submit'])) { echo "write to db: " . $_POST['name'] . " + " . $_POST['color']; } ?> <html> <form name="form1" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <label for="name">Name:</label> <input type="text" name="name" size="30" value="<?php echo (isset($_POST['name'])) ? $_POST['name'] : ""; ?>"> <br /> <label for="color">Color:</label> <select name="color"> <option <?php echo (isset($_POST['color']) || $color == "red") ? 'selected="selected"' : ''; ?> value="red">red</option> <option <?php echo (isset($_POST['color']) || $color == "blue") ? 'selected="selected"' : ''; ?> value="blue">blue</option> <option <?php echo (isset($_POST['color']) || $color == "green") ? 'selected="selected"' : ''; ?> value="green">green</option> </select> <br /> <input type="submit" name="Submit" value="Update"> </form> </html>

    Read the article

  • Split html text in a SEO friendly manner

    - by al nik
    I've some html text like <h1>GreenWhiteRed</h1> Is it SEO friendly to split this text in something like <h1><span class="green">Green</span><span class="white">White</span><span class="red">Red</span></h1> Is the text still ranking well and is it interpreted as a single word 'GreenWhiteRed'?

    Read the article

  • Groovy sorting string asc

    - by srinath
    How to sort string names in array on ascending order . I tried sort method but it fails to sort on name basis . def words = ["orange", "blue", "apple", "violet", "green"] I need to achieve like this : ["apple", "blue", "green", "orange", "violet" ] thanks in advance.

    Read the article

  • UIColor app crashing

    - by coure06
    i have a global variable UIColor *textColor; I am update this variable by the code textColor = [UIColor colorWithRed:fr green:fg blue:fb alpha:1.0]; then assigning this color to Label like this myLabel.textColor = textColor; It only work once, when i again call with updated values and assign label new values app crashes... textColor = [UIColor colorWithRed:fr green:fg blue:fb alpha:1.0]; myLabel.textColor = textColor;

    Read the article

  • Winforms Checkbox : CheckState property Indeterminate renders differently

    - by joedotnot
    In C# environment, setting a checkbox's CheckState property to Indeterminate displays a "green square" inside the checkbox. In VB environment, this displays as a "grayed out check" (which is less intuitive, even for "dummy" users). How do i make Indeterminate state look like a "green square" in VB.NET ? Btw, i am using VS2008, Winforms 2.0. (Btw2: I tried to create two tags CheckState Indeterminate, which is more appropriate to my question, but disallowed by StackOverflow due to points!)

    Read the article

  • finding shortest valid path in a colored-edge graphs

    - by user1067083
    Given a directed graph G, with edges colored either green or purple, and a vertex S in G, I must find an algorithm that finds the shortest path from s to each vertex in G so the path includes at most two purple edges (and green as much as needed). I thought of BFS on G after removing all the purple edges, and for every vertex that the shortest path is still infinity, do something to try to find it, but I'm kinda stuck, and it takes alot of the running time as well... Any other suggestions? Thanks in advance

    Read the article

  • GUI design for color blindness

    - by Phillip Ngan
    It is common to represent status of an item in a GUI using the colors: red, yellow, green, to mean error, warning, and OK (or something equivalent). However, 7-10% of men have difficulty distinguishing between red and green because of color blindness. So far I've looked at Color Scheme Designer which simulates how people with different color blindnesses would perceive a set of colors, but I'm interested in hearing how you have approached this problem and how successful it was.

    Read the article

  • excel change 4 rows / 48 col to 48 rows / 4 col

    - by GoodOlPete
    Hi, I've selected 4 database records of 48 fields into excel as below: FirstName LastName Age Address1 ....................... Andy smith 23 53 high st billy ball 43 23 the avenue charles brown 76 rose cottage dave green 43 station rd I want to display them as firstname andy billy charles dave lastname smith ball brown green age 23 43 76 43 address1.............................. Can anyone suggest how to do this?

    Read the article

  • multiple Button click

    - by Bharat
    hello there i have 5 buttons in row (btn1,btn2,btn3,btn4,btn5) and 1 OK button when i click indivisually to each button of 5 buttons its color changes to red and after click on OK button the color of buttons which are red turns green the problem is that i don't know how to insert induvisual record of each button of which color is green in access database help me if you have any answer

    Read the article

  • sort given set of colors in VIBGYOR order

    - by Vijay Selvaraj
    Hi, how do i order a given set of colors from the rainbow in VIBGYOR order. say i input the seven colors in the following order { red, blue, green, yellow, indigo, violet, orange} and i should print the output as {violet, indigo, blue, green, yellow, orange, red}, irrespective of the order i give the output should be as above. Can someone suggest me about implementing this in java program? Thanks, -Vijay

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >