Search Results

Search found 1682 results on 68 pages for 'colors'.

Page 19/68 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Firefox/Google Chrome extension to darken pages & reduce eye strain

    - by megafish
    Is there an extension or add-on like Stylish which lets you easily toggle back and forth between affected (Stylish) and standard (or untainted) view? I've tried changing colors in Firefox (Settings Content Colors) but there is no quick toggle between the states. Firefox or Google Chrome, whichever one has the extension. Doesn't matter since I'll switch to using that as my primary development browser.

    Read the article

  • Objective C defining UIColor constants

    - by futureelite7
    Hi, I have a iPhone application with a few custom-defined colors for my theme. Since these colors will be fixed for my UI, I would like to define the colors in a class to be included (Constants.h and Constants.m). How do I do that? (Simply defining them does not work because UIColors are mutable, and would cause errors - Initalizer not constant). /* Constants.h */ extern UIColor *test; /* Constants.m */ UIColor *test = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0]; Thanks!

    Read the article

  • VB.NET 2008 - Anonymous Function

    - by James Brauman
    Hi, On Form Load I populate a menu with all possible colors so they user can pick a color. However when they pick a color the forecolor of my label is not changed. Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' When the form loads, we want to populate the color menu item with all the possible colors that we could change the label to. For Each currentColor As KnownColor In [Enum].GetValues(GetType(KnownColor)) ' Declare the knowColor again - we must do this to be able to do anonymous delegates in VB.NET Dim actualCurrentColor As KnownColor = currentColor ' Get the name for this color Dim colorName As String = [Enum].GetName(GetType(KnownColor), actualCurrentColor) ' Create a new menu item for this color Dim newMenuItem As ToolStripMenuItem = New ToolStripMenuItem(colorName) ' Add a handler to this menu item so when it is clicked, we change the heading color AddHandler newMenuItem.Click, Function(s As System.Object, events As System.EventArgs) (HeadingLabel.ForeColor = Color.FromKnownColor(actualCurrentColor)) ' Add the menu item to the colors menu ColorToolStripMenuItem.DropDownItems.Add(newMenuItem) Next End Sub What am I doing wrong? Thanks

    Read the article

  • jQuery jPicker > Assign color of jPicker from a text link (not from jPicker)

    - by Scott B
    I've got a list of frequently used hex colors that I'd like to list under my jPicker bound input text field and I'd like to figure out how to change the value of the jPicker active color without opening the jPicker color selector palette. I've managed to create a function that updates the input field thats bound to the jPicker, but the colors of the background and picker.gif do not update. I'd like to force the background colors to update as if the color was selected from jPicker itself. Here's my code for the activation link... <span onclick=doColor(1,'cc9900')>cc9900</span> And here's the js handler function doColor(el, color) { if(el){$('#theme_header_color').attr('value', color);} else{$('#theme_sidebar_color').attr('value', color);} }

    Read the article

  • Canvas context used but not updated on canvas

    - by John Doe
    I am developing an small html5 game, where I have the following code: if(object.blocks){ var blocks = object.blocks, that = this; each(blocks,function(index){ that.blocks.push(new Block(this[index])); }); } I receive an object with some configuration and instantiate blocks with it. It works fine, but the Block class has an method, called draw: this.draw = function (ctx){ if(ctx){ var colors = ['#FF0000','#FFFF00','#0000FF','#00FF00'], color = Math.round(Math.random() * colors.length-1); ctx.fillStyle = colors[color]; ctx.fillRect(this.x,this.y,this.width,this.height); } }; It was working before I moved it into the Block class, but now it draws nothing. This is the code that calls draw: render: function(ctx){ each(this.blocks,function(index){ this[index].draw(ctx); }); } The context comes from the html page, from the main canvas.

    Read the article

  • Modify cmd.exe properties using the command prompt

    - by CodexArcanum
    Isn't that nicely recursive? I've got a portable command prompt on my external drive, and it has a nice .bat file to configure some initial settings, but I'd like more! Here's what I know how to set from .bat: Colors = (color XY) where x and y are hex digits for the predefined colors Prompt = (prompt $p$g) sets the prompt to "C:\etc\etc " the default prompt Title = (title "text") sets the window title to "text" Screen Size = (mode con: cols=XX lines=YY) sets the columns and lines size of the window Path = (SET PATH=%~d0\bin;%PATH%) sets up local path to my tools and appends the computer's path So that's all great. But there are a few settings I can't seem to set from the bat. Like, how would I set these up wihtout using the Properties dialogue: Buffer = not screen size, but the buffer Options like quick edit mode and autocomplete Popup colors Font. And can you use a font on the portable drive, or must it be installed to work? Command history options

    Read the article

  • How to determine UINavigationBar custom view text/shadow color for different styles in UISplitViewCo

    - by Cal
    I have a splitview with a pop over master view using UINavigationController. The problem is I have some custom text views in the header of the nav controller and when it switches to the pop-over view the style of the nav bar changes. This makes the colors of the text clash since they are no longer using the correct settings for the new navbar style. How do you determine the proper default text colors for a given navigation bar (style)? The issue is because I'm using a split view in the iPad but you should be able to determine the proper colors for an iPhone nav bar too.

    Read the article

  • Adding childs to list of parents with jquery /mvc2

    - by John Landheer
    Hi, I have a table of products on my page, each product has zero or more colors, the colors are shown as a list beneath the product. After the colors I have a button to add a color. The button will do an ajax call with the parent product id to a controller which will return a JSON object with color information. My problem is where to store the product id in the DOM, should I put it in a hidden field and use jquery in the click event of the "add color" to get to it? What is the best way to do this? TIA, John EDIT: The page is initially rendered on the server so I don't want to use jquery to add the id's to the page.

    Read the article

  • Component properties working at designtime but not runtime

    - by delphi-rulez-2010
    I am creating a component that uses a collection and collection items of panels. I can't seem to get the colors to work at runtime, but yet they seem to work just fine at design time. You can download the component source code here: http://www.shaneholmes.net/pasfiles/ There is a Consoles (Tcollection) property, status colors property, and a Edit mode property Each console (TCollectionItem) has a status property when changed, the consoles property is changed based on the components StatusColors property. When the components EditMode property is set to true, you can move the panels around at runtime. Question: Why does the colors only work at designtime and not runtime. thanks

    Read the article

  • How to customize the ColorPicker class in Adobe flex3.0?

    - by Ankur Sharma
    i have to make the colorpiker tool of flex, to be a customized one, i beleive you have seen the color picker tool of flex, when you click on the colorpicker, a swatch panel gets open, right?? now in that swatch, there are three compoenents, one is thw colorbox(on top left), beside right to this is the text field holding the hex code of the color and below these two tools, is the colors present in the small rectangles, now my need is this, i want to add three more buttons on the top empty space after textfield, so that structure of the colors pciker looks like this colorbox | textfield | button1 | button2 | button3 color rectangles, showing all default colors i beleive u understood, what i meant here, so plzz help me out in making a custom colorpciker class, thanx Namaste

    Read the article

  • iPhone switch statement using enum

    - by Boris
    I have defined an enum in a header file of a class : typedef enum{ RED = 0, BLUE, Green } Colors; - (void) switchTest:(Colors)testColor; and in the implementation file I have : - (void) switchTest:(Colors)testColor{ if(testColor == RED){ NSLog(@"Red selected"); } switch(testColor){ case RED: NSLog(@"Red selected again !"); break; default: NSLog(@"default selected"); break; } } My code compiles correctly without warrnings. When calling the switchTest method with RED, the output is : "Red selected" but once the first line of the switch runs, the application quits unexpectedly and without warrnings/errors. I don't mind using if/else syntax but I would like to understand my mistake.

    Read the article

  • CSS border and the :hover dynamic pseudo-class

    - by dbasch
    Hi All, I have built a persistent dropline menu with two levels using only CSS. It is pretty standard. It is a nested set of UL's and the UL's :hover state is what shows and hides the sub menu levels. Something like this: | *Pets* | Colors | Cars | | Cats | Dogs | Birds| Goats | Sheep | | Pets | *Colors* | Cars | | Red | Orange | Green | Blue| Yellow | I then added a 1px border at the bottom of the first level UL element. Like this: | *Pets* | Colors | Cars | -------------------------------------- | Cats | Dogs | Birds| Goats | Sheep | When I hover over a first level item (Pets), and then move the mouse down to the second level (Cats), the entire second level disappears. I finally figured out that the UL's 1px border is not included in the hover area for the UL. Can I add a border to the bottom of a dropline menu level without messing up the menu hovering? Thanks!

    Read the article

  • Plotting 3D Polygons in python-matplotlib

    - by Developer
    I was unsuccessful browsing web for a solution for the following simple question: How to draw 3D polygon (say a filled rectangle or triangle) using vertices values? I have tried many ideas but all failed, see: from mpl_toolkits.mplot3d import Axes3D from matplotlib.collections import PolyCollection import matplotlib.pyplot as plt fig = plt.figure() ax = Axes3D(fig) x = [0,1,1,0] y = [0,0,1,1] z = [0,1,0,1] verts = [zip(x, y,z)] ax.add_collection3d(PolyCollection(verts),zs=z) plt.show() I appreciate in advance any idea/comment. Updates based on the accepted answer: import mpl_toolkits.mplot3d as a3 import matplotlib.colors as colors import pylab as pl import scipy as sp ax = a3.Axes3D(pl.figure()) for i in range(10000): vtx = sp.rand(3,3) tri = a3.art3d.Poly3DCollection([vtx]) tri.set_color(colors.rgb2hex(sp.rand(3))) tri.set_edgecolor('k') ax.add_collection3d(tri) pl.show() Here is the result:

    Read the article

  • How to have a dynamic theme color in WPF

    - by Ingó Vals
    In WPF I have a few resource dictionaries and in them styles for my panels and controls in my app. I'm reusing the same colors again and again. I actually have 5 colors and they give my app a good color-scheme. However if I wan't to change the theme I have to go into the RD's and change each and every color there. I would like to somewhere have the colors set but don't know how or where. I tried to put a color tag in one RD but as soon as I referenced it in the same RD Visual Studio crashed. Also the best solution would be that I could have the color as a dynamic setting in the app itself so users could even change it themselves.

    Read the article

  • Issue when I'm trying to draw gradient in swift

    - by bagusflyer
    I got an error when I was trying to draw gradient in Swift code: GradientView.swift:31:40: Could not find an overload for '__conversion' that accepts the supplied arguments Here is my code: let context : CGContextRef = UIGraphicsGetCurrentContext() let locations :CGFloat[] = [ 0.0, 0.25, 0.5, 0.75 ] let colors = [UIColor.redColor().CGColor,UIColor.greenColor().CGColor,UIColor.blueColor().CGColor, UIColor.yellowColor().CGColor] let colorspace : CGColorSpaceRef = CGColorSpaceCreateDeviceRGB() let gradient : CGGradientRef = CGGradientCreateWithColors(colorspace, colors, locations) //CGGradientCreateWithColors(colorspace,colors,locations) let startPoint : CGPoint = CGPointMake(0, 0) let endPoint : CGPoint = CGPointMake(500,500) CGContextDrawLinearGradient(context, gradient,startPoint, endPoint, 0); The problem is the CGGradientCreateWithColors takes CFArray not a normal Swift Array. I have no idea how to convert CFArray to Array and can't find anything in Apple's document. Any idea? Thanks

    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

  • Component properties working at designt time but not runtime - ???

    - by delphi-rulez-2010
    I am creating a component that uses a collection and collection items of panels. I can't seem to get the colors to work at runtime, but yet they seem to work just fine at design time. You can download the component source code here: http://www.shaneholmes.net/pasfiles/ There is a Consoles (Tcollection) property, status colors property, and a Edit mode property Each console (TCollectionItem) has a status property when changed, the consoles property is changed based on the components StatusColors property. When the components EditMode property is set to true, you can move the panels around at runtime. Question: Why does the colors only work at designtime and not runtime. thanks

    Read the article

  • Referencing movie clips from within an actionscript class

    - by Ant
    Hi all, I have been given the task of adding a scoring system to various flash games. This simply involves taking input, adding functionality such as pausing and replaying and then outputting the score, time left etc. at the end. I've so far successfully edited two games. Both these games used the "actions" code on frames. The latest game I'm trying to do uses an actionscript class which makes it both easier and harder. I'm not very adept at flash at all, but I've worked it out so far. I've added various movie clips that are to be used for displaying the pause screen background, buttons for replaying etc. I've been showing and hiding these using: back._visible = true; //movie clip, instance of back (back.png) I doubt it's best practice, but it's quick and has been working. However, now with the change of coding style to classes, this doesn't seem to work. I kinda understand why, but I'm now unsure how to hide/show these elements. Any help would be greatly appreciated :) I've attached the modified AS. class RivalOrbs extends MovieClip { var infinite_levels, orbs_start, orbs_inc, orbs_per_level, show_timer, _parent, one_time_per_level, speed_start, speed_inc_percent, max_speed, percent_starting_on_wrong_side, colorize, colors, secs_per_level; function RivalOrbs() { super(); mc = this; this.init(); } // End of the function function get_num_orbs() { if (infinite_levels) { return (orbs_start + (level - 1) * orbs_inc); } else if (level > orbs_per_level.length) { return (0); } else { return (orbs_per_level[level - 1]); } // end else if } // End of the function function get_timer_str(secs) { var _loc2 = Math.floor(secs / 60); var _loc1 = secs % 60; return ((_loc2 > 0 ? (_loc2) : ("0")) + ":" + (_loc1 >= 10 ? (_loc1) : ("0" + _loc1))); } // End of the function function frame() { //PLACE PAUSE CODE HERE if (!Key.isDown(80) and !Key.isDown(Key.ESCAPE)) { _root.offKey = true; } else if (Key.isDown(80) or Key.isDown(Key.ESCAPE)) { if (_root.offKey and _root.game_mode == "play") { _root.game_mode = "pause"; /* back._visible = true; btn_resume._visible = true; btn_exit._visible = true; txt_pause._visible = true; */ } else if (_root.offKey and _root.game_mode == "pause") { _root.game_mode = "play"; } _root.offKey = false; } if (_root.game_mode == "pause" or paused) { return; } else { /* back._visible = false; btn_resume._visible = false; btn_exit._visible = false; txt_pause._visible = false; */ } if (show_timer && total_secs != -1 || show_timer && _parent.timesup) { _loc7 = total_secs - Math.ceil((getTimer() - timer) / 1000); var diff = oldSeconds - (_loc7 + additional); if (diff > 1) additional = additional + diff; _loc7 = _loc7 + additional; oldSeconds = _loc7; trace(oldSeconds); mc.timer_field.text = this.get_timer_str(Math.max(0, _loc7)); if (_loc7 <= -1 || _parent.timesup) { if (one_time_per_level) { _root.gotoAndPlay("Lose"); } else { this.show_dialog(false); return; } // end if } // end if } // end else if var _loc9 = _root._xmouse; var _loc8 = _root._ymouse; var _loc6 = {x: _loc9, y: _loc8}; mc.globalToLocal(_loc6); _loc6.y = Math.max(-mc.bg._height / 2 + gap / 2, _loc6.y); _loc6.y = Math.min(mc.bg._height / 2 - gap / 2, _loc6.y); mc.wall1._y = _loc6.y - gap / 2 - mc.wall1._height / 2; mc.wall2._y = _loc6.y + gap / 2 + mc.wall1._height / 2; var _loc5 = true; for (var _loc4 = 0; _loc4 < this.get_num_orbs(); ++_loc4) { var _loc3 = mc.stage["orb" + _loc4]; _loc3.x_last = _loc3._x; _loc3.y_last = _loc3._y; _loc3._x = _loc3._x + _loc3.x_speed; _loc3._y = _loc3._y + _loc3.y_speed; if (_loc3._x < l_thresh) { _loc3.x_speed = _loc3.x_speed * -1; _loc3._x = l_thresh + (l_thresh - _loc3._x); _loc3.gotoAndPlay("hit"); } // end if if (_loc3._x > r_thresh) { _loc3.x_speed = _loc3.x_speed * -1; _loc3._x = r_thresh - (_loc3._x - r_thresh); _loc3.gotoAndPlay("hit"); } // end if if (_loc3._y < t_thresh) { _loc3.y_speed = _loc3.y_speed * -1; _loc3._y = t_thresh + (t_thresh - _loc3._y); _loc3.gotoAndPlay("hit"); } // end if if (_loc3._y > b_thresh) { _loc3.y_speed = _loc3.y_speed * -1; _loc3._y = b_thresh - (_loc3._y - b_thresh); _loc3.gotoAndPlay("hit"); } // end if if (_loc3.x_speed > 0) { if (_loc3._x >= m1_thresh && _loc3.x_last < m1_thresh || _loc3._x >= m1_thresh && _loc3._x <= m2_thresh) { if (_loc3._y <= mc.wall1._y + mc.wall1._height / 2 || _loc3._y >= mc.wall2._y - mc.wall2._height / 2) { _loc3.x_speed = _loc3.x_speed * -1; _loc3._x = m1_thresh - (_loc3._x - m1_thresh); _loc3.gotoAndPlay("hit"); } // end if } // end if } else if (_loc3._x <= m2_thresh && _loc3.x_last > m2_thresh || _loc3._x >= m1_thresh && _loc3._x <= m2_thresh) { if (_loc3._y <= mc.wall1._y + mc.wall1._height / 2 || _loc3._y >= mc.wall2._y - mc.wall2._height / 2) { _loc3.x_speed = _loc3.x_speed * -1; _loc3._x = m2_thresh + (m2_thresh - _loc3._x); _loc3.gotoAndPlay("hit"); } // end if } // end else if if (_loc3.side == 1 && _loc3._x > 0) { _loc5 = false; } // end if if (_loc3.side == 2 && _loc3._x < 0) { _loc5 = false; } // end if } // end of for if (_loc5) { this.end_level(); } // end if } // End of the function function colorize_hex(mc, hex) { var _loc4 = hex >> 16; var _loc5 = (hex ^ hex >> 16 << 16) >> 8; var _loc3 = hex >> 8 << 8 ^ hex; var _loc2 = new flash.geom.ColorTransform(0, 0, 0, 1, _loc4, _loc5, _loc3, 0); mc.transform.colorTransform = _loc2; } // End of the function function tint_hex(mc, hex, amount) { var _loc4 = hex >> 16; var _loc5 = hex >> 8 & 255; var _loc3 = hex & 255; this.tint(mc, _loc4, _loc5, _loc3, amount); } // End of the function function tint(mc, r, g, b, amount) { var _loc4 = 100 - amount; var _loc1 = new Object(); _loc1.ra = _loc1.ga = _loc1.ba = _loc4; var _loc2 = amount / 100; _loc1.rb = r * _loc2; _loc1.gb = g * _loc2; _loc1.bb = b * _loc2; var _loc3 = new Color(mc); _loc3.setTransform(_loc1); } // End of the function function get_num_levels() { if (infinite_levels) { return (Number.MAX_VALUE); } else { return (orbs_per_level.length); } // end else if } // End of the function function end_level() { _global.inputTimeAvailable = _global.inputTimeAvailable - (60 - oldSeconds); ++level; _parent.levelOver = true; if (level <= this.get_num_levels()) { this.show_dialog(true); } else { _root.gotoAndPlay("Win"); } // end else if } // End of the function function get_speed() { var _loc3 = speed_start; for (var _loc2 = 0; _loc2 < level - 1; ++_loc2) { _loc3 = _loc3 + _loc3 * (speed_inc_percent / 100); } // end of for return (Math.min(_loc3, Math.max(max_speed, speed_start))); } // End of the function function init_orbs() { var _loc6 = this.get_speed(); var _loc7 = Math.max(1, Math.ceil(this.get_num_orbs() * (percent_starting_on_wrong_side / 100))); for (var _loc3 = 0; _loc3 < this.get_num_orbs(); ++_loc3) { var _loc2 = null; if (_loc3 % 2 == 0) { _loc2 = mc.stage.attachMovie("Orb1", "orb" + _loc3, _loc3); _loc2.side = 1; if (colorize && color1 != -1) { this.colorize_hex(_loc2.orb.bg, color1); } // end if _loc2._x = Math.random() * (mc.bg._width * 4.000000E-001) - mc.bg._width * 2.000000E-001 - mc.bg._width / 4; } else { _loc2 = mc.stage.attachMovie("Orb2", "orb" + _loc3, _loc3); _loc2.side = 2; if (colorize && color2 != -1) { this.colorize_hex(_loc2.orb.bg, color2); } // end if _loc2._x = Math.random() * (mc.bg._width * 4.000000E-001) - mc.bg._width * 2.000000E-001 + mc.bg._width / 4; } // end else if _loc2._width = _loc2._height = orb_w; _loc2._y = Math.random() * (mc.bg._height * 8.000000E-001) - mc.bg._height * 4.000000E-001; if (_loc3 < _loc7) { _loc2._x = _loc2._x * -1; } // end if var _loc5 = Math.random() * 60; var _loc4 = _loc5 / 180 * 3.141593E+000; _loc2.x_speed = Math.cos(_loc4) * _loc6; _loc2.y_speed = Math.sin(_loc4) * _loc6; if (Math.random() >= 5.000000E-001) { _loc2.x_speed = _loc2.x_speed * -1; } // end if if (Math.random() >= 5.000000E-001) { _loc2.y_speed = _loc2.y_speed * -1; } // end if } // end of for } // End of the function function init_colors() { if (colorize && colors.length >= 2) { color1 = colors[Math.floor(Math.random() * colors.length)]; for (color2 = colors[Math.floor(Math.random() * colors.length)]; color2 == color1; color2 = colors[Math.floor(Math.random() * colors.length)]) { } // end of for this.tint_hex(mc.side1, color1, 40); this.tint_hex(mc.side2, color2, 40); } else { color1 = -1; color2 = -1; } // end else if } // End of the function function get_total_secs() { if (show_timer) { if (secs_per_level.length > 0) { if (level > secs_per_level.length) { return (secs_per_level[secs_per_level.length - 1]); } else { return (secs_per_level[level - 1]); } // end if } // end if } // end else if return (-1); } // End of the function function start_level() { trace ("start_level"); _parent.timesup = false; _parent.levelOver = false; _parent.times_up_comp.start_timer(); this.init_orbs(); mc.level_field.text = "LEVEL " + level; total_secs = _global.inputTimeAvailable; if (total_secs > 60) total_secs = 60; timer = getTimer(); paused = false; mc.dialog.gotoAndPlay("off"); } // End of the function function clear_orbs() { for (var _loc2 = 0; mc.stage["orb" + _loc2]; ++_loc2) { mc.stage["orb" + _loc2].removeMovieClip(); } // end of for } // End of the function function show_dialog(new_level) { mc.back._visible = false; trace("yes"); paused = true; if (new_level) { this.init_colors(); } // end if this.clear_orbs(); mc.dialog.gotoAndPlay("level"); if (!new_level || _parent.timesup) { mc.dialog.level_top.text = "Time\'s Up!"; /* dyn_line1.text = "Goodbye " + _global.inputName + "!"; dyn_line2.text = "You scored " + score; //buttons if (_global.inputTimeAvailable > 60) btn_replay._visible = true; btn_resume._visible = false; btn_exit._visible = false; txt_pause._visible = false; sendInfo = new LoadVars(); sendLoader = new LoadVars(); sendInfo.game_name = 'rival_orbs'; sendInfo.timeavailable = _global.inputTimeAvailable; if (sendInfo.timeavailable < 0) sendInfo.timeavailable = 0; sendInfo.id = _global.inputId; sendInfo.score = level*_global.inputFactor; sendInfo.directive = 'record'; //sendInfo.sendAndLoad('ncc1701e.aspx', sendLoader, "GET"); sendInfo.sendAndLoad('http://keyload.co.uk/output.php', sendLoader, "POST"); */ } else if (level > 1) { mc.dialog.level_top.text = "Next Level:"; } else { mc.dialog.level_top.text = ""; } // end else if mc.dialog.level_num.text = "LEVEL " + level; mc.dialog.level_mid.text = "Number of Orbs: " + this.get_num_orbs(); _root.max_level = level; var _this = this; mc.dialog.btn.onRelease = function () { _this.start_level(); }; } // End of the function function init() { var getInfo = new LoadVars(); var getLoader = new LoadVars(); getInfo.directive = "read"; getInfo.sendAndLoad('http://keyload.co.uk/input.php', getLoader, "GET"); getLoader.onLoad = function (success) { if (success) { _global.inputId = this.id; _global.inputTimeAvailable = this.timeavailable; _global.inputFactor = this.factor; _global.inputName = this.name; } else { trace("Failed"); } } _root.game_mode = "play"; /* back._visible = false; btn_exit._visible = false; btn_replay._visible = false; btn_resume._visible = false; txt_pause._visible = false; */ l_thresh = -mc.bg._width / 2 + orb_w / 2; t_thresh = -mc.bg._height / 2 + orb_w / 2; r_thresh = mc.bg._width / 2 - orb_w / 2; b_thresh = mc.bg._height / 2 - orb_w / 2; m1_thresh = -wall_w / 2 - orb_w / 2; m2_thresh = wall_w / 2 + orb_w / 2; this.show_dialog(true); mc.onEnterFrame = frame; } // End of the function var mc = null; var orb_w = 15; var wall_w = 2; var l_thresh = 0; var r_thresh = 0; var t_thresh = 0; var b_thresh = 0; var m1_thresh = 0; var m2_thresh = 0; var color1 = -1; var color2 = -1; var level = 1; var total_secs = 30; var gap = 60; var timer = 0; var additional = 0; var oldSeconds = 0; var paused = true; var _loc7 = 0; } // End of Class

    Read the article

  • Display System Information on Your Desktop with Desktop Info

    - by Asian Angel
    Do you like to monitor your system but do not want a complicated app to do it with? If you love simplicity and easy configuration then join us as we look at Desktop Info. Desktop Info in Action Desktop Info comes in a zip file format so you will need to unzip the app, place it into an appropriate “Program Files Folder”, and create a shortcut. Do NOT delete the “Read Me File”…this will be extremely useful to you when you make changes to the “Configuration File”. Once you have everything set up you are ready to start Desktop Info up. This is the default layout and set of listings displayed when you start Desktop Info up for the first time. The font colors will be a mix of colors as seen here and the font size will perhaps be a bit small but those are very easy to change if desired. You can access the “Context Menu” directly over the “information area”…so no need to look for it in the “System Tray”. Notice that you can easily access that important “Read Me File” from here… The full contents of the configuration file (.ini file) are displayed here so that you can see exactly what kind of information can be displayed using the default listings. The first section is “Options”…you will most likely want to increase the font size while you are here. Then “Items”… If you are unhappy with any of the font colors in the “information area” this is where you can make the changes. You can turn information display items on or off here. And finally “Files, Registry, & Event Logs”. Here is our displayed information after a few tweaks in the configuration file. Very nice. Conclusion If you have been looking for a system information app that is simple and easy to set up then you should definitely give Desktop Info a try. Links Download Desktop Info Similar Articles Productive Geek Tips Ask the Readers: What are Your Computer’s Hardware Specs?Allow Remote Control To Your Desktop On UbuntuHow To Get Detailed Information About Your PCGet CPU / System Load Average on Ubuntu LinuxEnable Remote Desktop (VNC) on Kubuntu TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 Test Drive Windows 7 Online Download Wallpapers From National Geographic Site Spyware Blaster v4.3 Yes, it’s Patch Tuesday Generate Stunning Tag Clouds With Tagxedo Install, Remove and HIDE Fonts in Windows 7

    Read the article

  • Can a Printer Print White?

    - by Jason Fitzpatrick
    The vast majority of the time we all print on white media: white paper, white cardstock, and other neutral white surfaces. But what about printing white? Can modern printers print white and if not, why not? Read on as we explore color theory, printer design choices, and why white is the foundation of the printing process. Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites. Image by Coiote O.; available as wallpaper here. The Question SuperUser reader Curious_Kid is well, curious, about printers. He writes: I was reading about different color models, when this question hit my mind. Can the CMYK color model generate white color? Printers use CMYK color mode. What will happen if I try to print a white colored image (rabbit) on a black paper with my printer? Will I get any image on the paper? Does the CMYK color model have room for white? The Answer SuperUser contributor Darth Android offers some insight into the CMYK process: You will not get anything on the paper with a basic CMYK inkjet or laser printer. The CMYK color mixing is subtractive, meaning that it requires the base that is being colored to have all colors (i.e., White) So that it can create color variation through subtraction: White - Cyan - Yellow = Green White - Yellow - Magenta = Red White - Cyan - Magenta = Blue White is represented as 0 cyan, 0 yellow, 0 magenta, and 0 black – effectively, 0 ink for a printer that simply has those four cartridges. This works great when you have white media, as “printing no ink” simply leaves the white exposed, but as you can imagine, this doesn’t work for non-white media. If you don’t have a base color to subtract from (i.e., Black), then it doesn’t matter what you subtract from it, you still have the color Black. [But], as others are pointing out, there are special printers which can operate in the CMYW color space, or otherwise have a white ink or toner. These can be used to print light colors on top of dark or otherwise non-white media. You might also find my answer to a different question about color spaces helpful or informative. Given that the majority of printer media in the world is white and printing pure white on non-white colors is a specialty process, it’s no surprise that home and (most) commercial printers alike have no provision for it. Have something to add to the explanation? Sound off in the the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.     

    Read the article

  • Customizing Flowcharts in Oracle Tutor

    - by [email protected]
    Today we're going to look at how you can customize the flowcharts within Oracle Tutor procedures, and how you can share those changes with other authors within your company. Here is an image of a flowchart within a Tutor procedure with the default size and color scheme. You may want to change the size of your flowcharts as your end-users might have larger screens or need larger fonts. To change the size and number of columns, navigate to Tutor Author Author Options Flowcharts. The default is to have 4 columns appear in each flowchart, but, if I change it to six, my end-users will see a denser flowchart. This might be too dense for my end-users, so I will change it to 5 columns, and I will also deselect the option to have separate task boxes. Now let's look at how to customize the colors. Within the Flowchart options dialog, there is a button labeled "Colors." This brings up a dialog box of every object on a Tutor flowchart, and I can modify the color of each object, as well as the text within the object. If I click on the background, the "page" object appears in the Item field, and now I can customize the color and the title text by selecting Select Fill Color and/or Select Text Color. A dialog box with color choices appears. If I select Define Custom Colors, I can make my selections even more precise. Each time I change the color of an object, it appears in the selection screen. When the flowchart customization is finished, I can save my changes by naming the scheme. Although the color scheme I have chosen is rather silly looking, perhaps I want others to give me their feedback and make changes as they wish. I can share the color scheme with them by copying the FCP.INI file in the Tutor\Author directory into the same directory on their systems. If the other users have color schemes that they do not want to lose, they can copy the relevant lines from the FCP.INI file into their file. If I flowchart my document with the new scheme, I can see how it looks within the document. Sometimes just one or two changes to the default scheme are enough to customize the flowchart to your company's color palette. I have seen customers who have only changed the Start object to green and the End object to red, and I've seen another customer who changed every object to some variant of black and orange. Experiment! And let us know how you have customized your flowcharts. Mary R. Keane Senior Development Director, Oracle Tutor

    Read the article

  • Can one draw a cube using different method/drawing mode?

    - by den-javamaniac
    Hi. I've just started learning gamedev (in particular android EGL based) and have ran over a code from Pro Android Games 2 that looks as follows: /* * Copyright (C) 2007 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package opengl.scenes.cubes; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.IntBuffer; import javax.microedition.khronos.opengles.GL10; public class Cube { public Cube(){ int one = 0x10000; int vertices[] = { -one, -one, -one, one, -one, -one, one, one, -one, -one, one, -one, -one, -one, one, one, -one, one, one, one, one, -one, one, one, }; int colors[] = { 0, 0, 0, one, one, 0, 0, one, one, one, 0, one, 0, one, 0, one, 0, 0, one, one, one, 0, one, one, one, one, one, one, 0, one, one, one, }; byte indices[] = { 0, 4, 5, 0, 5, 1, 1, 5, 6, 1, 6, 2, 2, 6, 7, 2, 7, 3, 3, 7, 4, 3, 4, 0, 4, 7, 6, 4, 6, 5, 3, 0, 1, 3, 1, 2 }; // Buffers to be passed to gl*Pointer() functions // must be direct, i.e., they must be placed on the // native heap where the garbage collector cannot vbb.asIntBuffer() // move them. // // Buffers with multi-byte datatypes (e.g., short, int, float) // must have their byte order set to native order ByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length*4); vbb.order(ByteOrder.nativeOrder()); mVertexBuffer = vbb.asIntBuffer(); mVertexBuffer.put(vertices); mVertexBuffer.position(0); ByteBuffer cbb = ByteBuffer.allocateDirect(colors.length*4); cbb.order(ByteOrder.nativeOrder()); mColorBuffer = cbb.asIntBuffer(); mColorBuffer.put(colors); mColorBuffer.position(0); mIndexBuffer = ByteBuffer.allocateDirect(indices.length); mIndexBuffer.put(indices); mIndexBuffer.position(0); } public void draw(GL10 gl) { gl.glFrontFace(GL10.GL_CW); gl.glVertexPointer(3, GL10.GL_FIXED, 0, mVertexBuffer); gl.glColorPointer(4, GL10.GL_FIXED, 0, mColorBuffer); gl.glDrawElements(GL10.GL_TRIANGLES, 36, GL10.GL_UNSIGNED_BYTE, mIndexBuffer); } private IntBuffer mVertexBuffer; private IntBuffer mColorBuffer; private ByteBuffer mIndexBuffer;} So it suggests to draw a cube using triangles. My question is: can I draw the same cube using GL_TPOLYGON? If so, isn't that an easier/more understandable way to do things?

    Read the article

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