Search Results

Search found 9439 results on 378 pages for 'color depth'.

Page 8/378 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Jqgrid set cell background color

    - by sachin
    In "Custom data tooltips in jqGrid 3.4" discussion, came to know how to use setcell to change the color of the text inside a cell of jqgrid. How can we change the background color of the cell? Tried the following jQuery("#list").setCell (row,col,'',{ background-color:'red'}) jQuery("#list").setCell (row,col,'','',{ bgcolor:'red'} Thanks.

    Read the article

  • android listview set dynamically background color of views

    - by Sephy
    Hi everybody, I know that there have quite a lot of answers to similar questions but I couldn't find any solution to my question, so new topic : I'm creating a listview, with one basic view per row, my try is to change the background color of the view by .setbackgroundcolor, but nothing's doing the trick... I define an array of color at the beginning of my resources and i'm trying to display it, I also tried to put the array in the class, write the color like #00FF00, int, and I wanted to try 0x...... but as my colors are in an array, I can't do 0x+myColorsArray[i] because Eclipse tells me that it's not a proper hex color... I'm getting a bit desperate... thanks for any help

    Read the article

  • ls color schemes

    - by adam n
    What's your favorite color scheme for ls in bash? There's lots of vim color schemes out there, but I'm having trouble finding any for ls. Does anyone know any good websites with sample ls color schemes? If you've made a custom one, attach a screenshot, along with the line to put in ~/.bash_profile. export LSCOLORS=DxGxcxdxCxegedabagacad

    Read the article

  • Android color picker - updating color array

    - by zorglub76
    Hi all, I'm trying to create a color picker for Android that looks like a minimalistic version of Gimp's. So, it has a hue slider and a rectangle with saturation/value variants of a color chosen in hue slider. Question: what is the best way to create the rectangle? Right now, I'm creating an 200x200 array of pixels, but it takes ~5sec to create and display rectangle with that array. And I need colors in rectangle to change whenever I change the value in hue slider... Rectangle is bitmap, btw. Can I use color matrices on that and how? Any examples? Thanks in advance!

    Read the article

  • UILabel background color not updating in UITableView

    - by Joey
    I'm having a perplexing problem with a simple UILabel I put on a cell in a UITableView. I enter a separate view after tapping on a row, like many UITableViews. In there, I update the cell so that when I return to the rows, it should be updated, with this: MyTableViewCell* cell = (MyTableViewCell*) [mTableView cellForRowAtIndexPath: [NSIndexPath indexPathForRow:mActiveRow inSection:0]]; cell.myLabel.text = @"New Value"; // updated text cell.myLabel.backgroundColor = [UIColor greenColor]; // updated color When I return, though, only the text is updated, not the color. When I scroll the row off the screen and return it refreshes properly via another path of code that has exactly the same code. Could there be some trigger to refresh specifically the background color of the UILabel? I'm not sure why the text will refresh but the color won't.

    Read the article

  • Fixing color in scatter plots in matplotlib

    - by ajhall
    Hi guys, I'm going to have to come back and add some examples if you need them, which you might. But, here's the skinny- I'm plotting scatter plots of lab data for my research. I need to be able to visually compare the scatter plots from one plot to the next, so I want to fix the color range on the scatter plots and add in a colorbar to each plot (which will be the same in each figure). Essentially, I'm fixing all aspects of the axes and colorspace etc. so that the plots are directly comparable by eye. For the life of me, I can't seem to get my scatter() command to properly set the color limits in the colorspace (default)... i.e., I figure out my total data's min and total data's max, then apply them to vmin, vmax, for the subset of data, and the color still does not come out properly in both plots. This must come up here and there, I can't be the only one that wants to compare various subsets of data amongst plots... so, how do you fix the colors so that each data keeps it's color between plots and doesn't get remapped to a different color due to the change in max/min of the subset -v- the whole set? I greatly appreciate all your thoughts!!! A mountain-dew and fiery-hot cheetos to all! -Allen

    Read the article

  • Change color of a table cell using javascript using dropdown menu

    - by Mike Burzycki
    I'd like to use some javascript code to change the background color of a single cell within a table. I have some code below which allows me to change the page background color. This is similar in concept to what I would like to do, but I would really like to be able to change just one cell...not the whole page. I have thought about making the rest of the cell borders and background colors white, leaving the cell I want to manipulate transparent, but I think this probably a brute force method that will cause me trouble down the road. Does anyone have any advice to do this with javascript? The page background color changing code is here: <form name="bgcolorForm">Try it now: <select onChange="if(this.selectedIndex!=0) document.bgColor=this.options[this.selectedIndex].value"> <option value="choose">set background color <option value="FFFFCC">light yellow <option value="CCFFFF">light blue <option value="CCFFCC">light green <option value="CCCCCC">gray <option value="FFFFFF">white </select></form> Thanks for the help, Mike

    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

  • jQuery Color **Swatch** Picker

    - by Alan Storm
    Has anyone coded up a jQuery query color picker that lets you pick colors from a predetermined list of colors? Something like a product color picker on an Ecommerce site. Most of the searching I've done reveals a lot of general purpose, pick-any-color-in-the-rgb-spectrum, but few options for picking specific colors.

    Read the article

  • Get pixel color with Rails or anything else

    - by ulf
    I'd like to build a webapp in Rails in which I'd like to determine every pixel's color of a given image (JPEG). Is there any possibility to do that with Rails or JavaScript? The goal is to write an algorithm which determines the "middle color" of the image and uses it for background color of the site. Any suggestion would be appreciated.

    Read the article

  • Which option controls the color of this text?

    - by Tomas Lycken
    I have applied a color theme called Vibrant Ink (or some modification of it), and since I installed Visual Studio 2010 Pro Power Tools all my statement completion boxes are undreadable. What setting changes the colors of these boxes? Preferrably, I'd like to change the background color to something darker, but if that's not possible at least I want to change the text color.

    Read the article

  • Proper color names from colordialog

    - by Mike
    Whenever I run this, and open the color dialog, there are many colors that do not having a proper name, the listbox will show something like "ffff8000"(Orange-Yellow). Is there another way of pushing the proper name? Is there a proper Color Name library I can reference in code? colorDialog1.ShowDialog(); cl.Add(colorDialog1.Color.Name); listBox1.Items.AddRange(cl.ToArray());

    Read the article

  • Change color of the iPhone screen

    - by Shibin Moideen
    Hi, I need to change the color of the iPhone screen when i touch on it. The only thing i need to do is to change the color of the area where i am touching. if i am placing a star on the screen as touch then only that area color will be changed. Any idea about this? Thanks in advance, SMAK

    Read the article

  • Using Open MQ as an Oracle CEP Event Source

    - by seth.white
    I helped an Oracle CEP customer recently who wanted to use Open MQ has an event source for their Oracle CEP application.  In this case, the Oracle CEP application was being used to provide monitoring for an electronic commerce website, however, the steps for configuring Open MQ are entirely independent of the application logic. I thought I would list the configuration steps in a blog post in case they might help others in the future. Note that although the Oracle CEP documentation states that only WebLogic and Tibco JMS are "officially" supported, any JMS implementation that provides a Java client should work with Oracle CEP. The first step is to add an adapter to the application's EPN. This can be done in the usual way, using the Eclipse IDE. The end result is something like the following bit of configuration in the application's Spring application context. Note that the provider attribute value of 'jms-inbound' specifies that the out-of-the-box JMS adapter is being used. <wlevs:adapter id="helloworldAdapter" provider="jms-inbound"> </wlevs:adapter>   Next, configure the inbound adapter so that it can connect to Open MQ in the Oracle CEP configuration file (config.xml). The snippet below provides an example of what this configuration should look like. The exact values specified for jndi-provider-url, jndi-factory, connection-jndi-name, destination-jndi-name elements will depend on your Open MQ configuration.  For example , if the name of your Open MQ topic destination is 'ElectronicCommerceTopic', then you would specify that as the destination-jndi-name.  The name of your Open MQ connection factory goes in the connection-jndi-name element. In my simple example, I also specify in event-type element so that the out-of-the-box JMS adapter will attempt to automatically convert incoming messages to events of type HelloWorldEvent. In a more complex application, one would configure a custom converter on the JMS adapter to convert from messages to events.  The Oracle CEP 11.1.3 documentation describes how to do this.   <jms-adapter> <name>helloworldAdapter</name> <event-type>HelloWorldEvent</event-type> <jndi-provider-url>file:///C:/Temp</jndi-provider-url> <jndi-factory>com.sun.jndi.fscontext.RefFSContextFactory</jndi-factory> <connection-jndi-name>YourJMSConnectionFactoryName</connection-jndi-name> <destination-jndi-name>YourJMSDestinationName</destination-jndi-name> </jms-adapter>   Finally, one needs to package the client-side Open MQ jars so that the classes that they contain are available to the Oracle CEP runtime. The recommended way for doing this in the Oracle CEP 11.1.3 release is to package the classes as a library module or simply place them in the application bundle.  The advantage of deploying the classes as a library module is that they are available to any application that wants to connect to Open MQ. In my case, I packaged the classes in my application bundle. A best practice when you want to include additional jars in your application bundle is to create a 'lib' directory in your Eclipse project and then copy the required jars into that directory.  Then, use the support that Eclipse provides to add the jars to the bundle classpath (which makes the classes part of your application in the same way that regular application classes are), and export all of the classes from your application bundle so that they are available to the Oracle CEP server runtime.  The screenshot below Illustrates how this is done in Eclipse.  The bundle classpath contains two Open MQ jars and all packages in the jars are exported.     Finally, import the javax.jms and javax.naming packages into the application module as these are needed by the Open MQ classes. The screenshot below shows the complete list of package imports for my sample application.       Once you have completed these steps, you should be able to build and deploy your application and begin receiving inbound messages from Open MQ. Technorati Tags: CEP,JMS,Adapter,Open MQ,Eclipse .csharpcode { background-color: #ffffff; font-family: consolas, "Courier New", courier, monospace; color: black; font-size: small } .csharpcode pre { background-color: #ffffff; font-family: consolas, "Courier New", courier, monospace; color: black; font-size: small } .csharpcode pre { margin: 0em } .csharpcode .rem { color: #008000 } .csharpcode .kwrd { color: #0000ff } .csharpcode .str { color: #006080 } .csharpcode .op { color: #0000c0 } .csharpcode .preproc { color: #cc6633 } .csharpcode .asp { background-color: #ffff00 } .csharpcode .html { color: #800000 } .csharpcode .attr { color: #ff0000 } .csharpcode .alt { background-color: #f4f4f4; margin: 0em; width: 100% } .csharpcode .lnum { color: #606060 } .csharpcode { background-color: #ffffff; font-family: consolas, "Courier New", courier, monospace; color: black; font-size: small } .csharpcode pre { background-color: #ffffff; font-family: consolas, "Courier New", courier, monospace; color: black; font-size: small } .csharpcode pre { margin: 0em } .csharpcode .rem { color: #008000 } .csharpcode .kwrd { color: #0000ff } .csharpcode .str { color: #006080 } .csharpcode .op { color: #0000c0 } .csharpcode .preproc { color: #cc6633 } .csharpcode .asp { background-color: #ffff00 } .csharpcode .html { color: #800000 } .csharpcode .attr { color: #ff0000 } .csharpcode .alt { background-color: #f4f4f4; margin: 0em; width: 100% } .csharpcode .lnum { color: #606060 } .csharpcode { background-color: #ffffff; font-family: consolas, "Courier New", courier, monospace; color: black; font-size: small } .csharpcode pre { background-color: #ffffff; font-family: consolas, "Courier New", courier, monospace; color: black; font-size: small } .csharpcode pre { margin: 0em } .csharpcode .rem { color: #008000 } .csharpcode .kwrd { color: #0000ff } .csharpcode .str { color: #006080 } .csharpcode .op { color: #0000c0 } .csharpcode .preproc { color: #cc6633 } .csharpcode .asp { background-color: #ffff00 } .csharpcode .html { color: #800000 } .csharpcode .attr { color: #ff0000 } .csharpcode .alt { background-color: #f4f4f4; margin: 0em; width: 100% } .csharpcode .lnum { color: #606060 }

    Read the article

  • Calculate the intersection depth between a rectangle and a right triangle

    - by Celarix
    all. I'm working on a 2D platformer built in C#/XNA, and I'm having a lot of problems calculating the intersection depth between a standard rectangle (used for sprites) and a right triangle (used for sloping tiles). Ideally, the rectangle will collide with the solid edges of the triangle, and its bottom-center point will collide with the sloped edge. I've been fighting with this for a couple of days now, and I can't make sense of it. So far, the method detects intersections (somewhat), but it reports wildly wrong depths. How does one properly calculate the depth? Is there something I'm missing? Thanks!

    Read the article

  • Could someone explain why my world reconstructed from depth position is incorrect?

    - by yuumei
    I am attempting to reconstruct the world position in the fragment shader from a depth texture. I pass in the 8 frustum points in world space and interpolate them across fragments and then interpolate from near to far by the depth: highp float depth = (2.0 * CameraPlanes.x) / (CameraPlanes.y + CameraPlanes.x - texture( depthTexture, textureCoord ).x * (CameraPlanes.y - CameraPlanes.x)); // Reconstruct the world position from the linear depth highp vec3 world = mix( nearWorldPos, farWorldPos, depth ); CameraPlanes.x is the near plane CameraPlanes.y is the far. Assuming that my frustum positions are correct, and my depth looks correct, why is my world position wrong? (My depth texture is of format GL_DEPTH_COMPONENT32F if that matters) Thanks! :D Update: Screenshot of world position http://imgur.com/sSlHd So you can see it looks nearly correct. However as the camera moves, the colours (positions) change, which they shouldnt. I can get this to work, if I do the following: Write this into the depth attachment in the previous pass: gl_FragDepth = gl_FragCoord.z / gl_FragCoord.w / CameraPlanes.y; and then read the depth texture like so: depth = texture( depthTexture, textureCoord ).x However this will kill the hardware z buffer optimizations.

    Read the article

  • In 3D camera math, calculate what Z depth is pixel unity for a given FOV

    - by badweasel
    I am working in iOS and OpenGL ES 2.0. Through trial and error I've figured out a frustum to where at a specific z depth pixels drawn are 1 to 1 with my source textures. So 1 pixel in my texture is 1 pixel on the screen. For 2d games this is good. Of course it means that I also factor in things like the size of the quad and the size of the texture. For example if my sprite is a quad 32x32 pixels. The quad size is 3.2 units wide and tall. And the texcoords are 32 / the size of the texture wide and tall. Then the frustum is: matrixFrustum(-(float)backingWidth/frustumScale,(float)backingWidth/frustumScale, -(float)backingHeight/frustumScale, (float)backingHeight/frustumScale, 40, 1000, mProjection); Where frustumScale is 800 for a retina screen. Then at a distance of 800 from camera the sprite is pixel for pixel the same as photoshop. For 3d games sometimes I still want to be able to do this. But depending on the scene I sometimes need the FOV to be different things. I'm looking for a way to figure out what Z depth will achieve this same pixel unity for a given FOV. For this my mProjection is set using: matrixPerspective(cameraFOV, near, far, (float)backingWidth / (float)backingHeight, mProjection); With testing I found that at an FOV of 45.0 a Z of 38.5 is very close to pixel unity. And at an FOV of 30.0 a Z of 59.5 is about right. But how can I calculate a value that is spot on? Here's my matrixPerspecitve code: void matrixPerspective(float angle, float near, float far, float aspect, mat4 m) { //float size = near * tanf(angle / 360.0 * M_PI); float size = near * tanf(degreesToRadians(angle) / 2.0); float left = -size, right = size, bottom = -size / aspect, top = size / aspect; // Unused values in perspective formula. m[1] = m[2] = m[3] = m[4] = 0; m[6] = m[7] = m[12] = m[13] = m[15] = 0; // Perspective formula. m[0] = 2 * near / (right - left); m[5] = 2 * near / (top - bottom); m[8] = (right + left) / (right - left); m[9] = (top + bottom) / (top - bottom); m[10] = -(far + near) / (far - near); m[11] = -1; m[14] = -(2 * far * near) / (far - near); } And my mView is set using: lookAtMatrix(cameraPos, camLookAt, camUpVector, mView); * UPDATE * I'm going to leave this here in case anyone has a different solution, can explain how they do it, or why this works. This is what I figured out. In my system I use a 10th scale unit to pixels on non-retina displays and a 20th scale on retina displays. The iPhone is 640 pixels wide on retina and 320 pixels wide on non-retina (obsolete). So if I want something to be the full screen width I divide by 20 to get the OpenGL unit width. Then divide that by 2 to get the left and right unit position. Something 32 units wide centered on the screen goes from -16 to +16. Believe it or not I have an excel spreadsheet do all this math for me and output all the vertex data for my sprite sheet. It's an arbitrary thing I made up to do .1 units = 1 non-retina pixel or 2 retina pixels. I could have made it .01 units = 2 pixels and someday I might switch to that. But for now it's the other. So the width of the screen in units is 32.0, and that means the left most pixel is at -16.0 and the right most is at 16.0. After messing a bit I figured out that if I take the [0] value of an identity modelViewProjection matrix and multiply it by 16 I get the depth required to get 1:1 pixels. I don't know why. I don't know if the 16 is related to the screen size or just a lucky guess. But I did a test where I placed a sprite at that calculated depth and varied the FOV through all the valid values and the object stays steady on screen with 1:1 pixels. So now I'm just calculating the unityDepth that way. If someone gives me a better answer I'll checkmark it.

    Read the article

  • Setting background color in gvim

    - by petersohn
    I use a terminal with white text on black background (I just like it better), so I wrote the following line in my .vimrc file: set background=dark However, gvim has black on white text. How do I do either of the following: Set the background of gvim to black Check in .vimrc if I'm using gvim I tried this: I started up gvim, and typed echo &term. The answer was "builtin_gui". So I wrote the following into .vimrc: if &term == "builtin_gui" set background=light else set background=dark endif Somehow, it didn't work.

    Read the article

  • Download and Share Visual Studio Color Schemes

    - by ScottGu
    As developers we often spend a large part of our day staring at code within Visual Studio.  If you are like me, after awhile the default VS text color scheme starts to get a little boring. The good news is that Visual Studio allows you to completely customize the editor background and text colors to whatever you want – allowing you to tweak them to create the experience that is “just right” for your eyes and personality.  You can then optionally export/import your color scheme preferences to an XML file via the Tools->Import and Export Settings menu command. [In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu] New website that makes it easy to download and share VS color schemes Luke Sampson launched the http://studiostyles.info/ site a week ago (built using ASP.NET MVC 2, ASP.NET 4 and VS 2010). Studiostyles.info enables you to easily browse and download Visual Studio color schemes that others have already created.  The color schemes work for both VS 2008 and VS 2010 (all versions – including the free VS express editions): Color schemes are sorted by popularity and voting (you can vote on whether you find each “hot or not”).  You can click any of the schemes to see screen-shots of it in use for common coding scenarios.  You can then download the color settings for either VS 2010 or VS 2008: You can also optionally upload color schemes of your own if you have a good one you want to share with others.  If you haven’t visited it yet – check it out: http://studiostyles.info/  And thank you Luke Sampson for building it! Hope this helps, Scott

    Read the article

  • How to stop Cairo Dock minimizing Conky on Show Desktop?

    - by César
    Every time I use Cairo Dock Show Desktop add-on Conky minimizes: I've read about the own_window_type override option on .conkyrc and it seems to work for some people but it doesn't work for me. Conky won't show up if I use this option (it is currently set to own_window_type normal). Any suggestions? .conkyrc # Conky settings # background no update_interval 1 cpu_avg_samples 2 net_avg_samples 2 override_utf8_locale yes double_buffer yes no_buffers yes text_buffer_size 2048 #imlib_cache_size 0 temperature_unit fahrenheit # Window specifications # own_window yes own_window_type normal own_window_transparent yes own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below border_inner_margin 0 border_outer_margin 0 minimum_size 200 250 maximum_width 200 alignment tr gap_x 35 gap_y 55 # Graphics settings # draw_shades no draw_outline no draw_borders no draw_graph_borders no # Text settings # use_xft yes override_utf8_locale yes xftfont Neuropolitical:size=8 xftalpha 0.8 uppercase no temperature_unit celsius default_color FFFFFF # Lua Load # lua_load ~/.lua/scripts/clock_rings.lua lua_draw_hook_pre clock_rings TEXT ${font Neuropolitical:size=42}${time %e} ${goto 100}${font Neuropolitical:size=18}${color FF3300}${voffset -75}${time %b} ${font Neuropolitical:size=10}${color FF3300}${voffset 15}${time %A}${color FF3300}${hr} ${goto 100}${font Neuropolitical:size=15}${color FFFFFF}${voffset -35}${time %Y} ${font Neuropolitical:size=30}${voffset 40}${alignc}${time %H}:${time %M} ${goto 175}${voffset -30}${font Neuropolitical:size=10}${time %S} ${voffset 10}${font Neuropolitical:size=11}${color FF3300}${alignr}HOME${font} ${font Neuropolitical:size=13}${color FFFFFF}${alignr}temp: ${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ LQBK temperature temperature 30} °C${font} ${hr} ${image ~/.conky/logo.png -p 165,10 -s 35x35} ${color FFFFFF}${font Neuropolitical:size=8}Uptime: ${uptime_short} ${color FFFFFF}${font Neuropolitical:size=8}Processes: ${processes} ${color FFFFFF}${font Neuropolitical:size=8}Running: ${running_processes} ${color FF3300}${goto 125}${voffset 27}CPU ${color FFFFFF}${goto 125}${cpu cpu0}% ${color FF3300}${goto 125}${voffset 55}RAM ${color FFFFFF}${goto 125}${memperc}% ${color FF3300}${goto 125}${voffset 56}Swap ${color FFFFFF}${goto 125}${swapperc}% ${color FF3300}${goto 125}${voffset 57}Disk ${color FFFFFF}${goto 125}${fs_used_perc /}% ${color FF3300}${goto 130}${voffset 55}Net ${color FFFFFF}${goto 130}${downspeed eth0} ${color FFFFFF}${goto 130}${upspeed eth0} ${color FF3300}${font Neuropolitical:size=8}${alignr}${nodename} ${color FF3300}${font Neuropolitical:size=8}${alignr}${pre_exec cat /etc/issue.net} $machine ${color FF3300}${font Neuropolitical:size=8}${alignr}Kernel: ${kernel} ${hr}

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >