Search Results

Search found 3163 results on 127 pages for 'fit pc2'.

Page 10/127 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Would ViewModels fit in the Model View Presenter pattern?

    - by Jonn
    Having used ViewModels in MVC, I was wondering if applying the same to the MVP pattern is practical. I only have a few considerations, one being that MVP is already fairly hard to implement (with all the additional coding, not much on the seeming complexity) or that ViewModels already have a slightly similar way of modeling data or entities. Would adding another layer in the form of ViewModels be redundant or is it a logical abstraction that I, as one implementing the MVP pattern, should adhere to?

    Read the article

  • For Qt 4.6.x, how to auto-size text to fit in a specified width?

    - by darenchow
    Inside of my QGraphicsRectItem::paint(), I am trying to draw the name of the item within its rect(). However, for each of the different items, they can be of variable width and similarly names can be of variable length. Currently I am starting with a maximum font size, checking if it fits and decrementing it until I find a font size that fits. So far, I haven't been able to find a quick and easy way to do this. Is there a better, or more efficient way to do this? Thanks! void checkFontSize(QPainter *painter, const QString& name) { // check the font size - need a better algorithm... this could take awhile while (painter->fontMetrics().width(name) > rect().width()) { int newsize = painter->font().pointSize() - 1; painter->setFont(QFont(painter->font().family(), newsize)); } }

    Read the article

  • Given this demo, How do I make HTML content area fit to viewport height?

    - by viatropos
    I just made this demo extracting out what I'm trying to accomplish: Autosize Main Content Area I want the pink/yellow area to act according to these rules: Minimum height is the size of its content (which is variable) IF content size is smaller than viewport size Otherwise minimum height is such that it adjusts to fill the window. Checking out the source to that demo, what am I missing? I feel like this is a pretty easy case that shouldn't require javascript. Any ideas?

    Read the article

  • How to stop IE8 from expanding a nested div's width to fit parent div?

    - by Tony_Henrich
    I have a page with several levels of divs. In one of the inner divs, there are two divs (1 & 2) which have float; left so that they are on the same horizontal level. It looks good in FireFox, but in the IE8, div 2 is below div 1. I turned the borders on and noticed div2 (violet border) is filling the width of the parent box. In FF, the width is the width of all the content only. If I use a hard coded width (not a good idea), IE8 displays it fine. How can I make IE8 not expand the width of div2 to the right edge of its parent div? IE8 (not good: div2 width is expanded) Firefox (good: width of div2 is not expanded)

    Read the article

  • Where does "new" fit in the flex creation cycle?

    - by deux11
    In the following code, the call to myChild.bar() results in an exception because myChild is null. myParent is a valid object. What I don't understand is why myChild has not been created yet. I have read the following document related to object creation sequence, but I am unsure how "new" is related: http://livedocs.adobe.com/flex/3/html/help.html?content=layoutperformance_03.html Any help is appreciated! // Main.mxml <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="created()"> <mx:Script> <![CDATA[ public var myParent:Parent = new Parent(); public function created():void { myParent.foo(); } ]]> </mx:Script> </mx:Application> // Parent.mxml <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"> <mx:Script> <![CDATA[ public function foo():void { myChild.bar(); } ]]> </mx:Script> <Child id="myChild"/> </mx:Canvas> // Child.mxml <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ public function bar():void { trace("Hello World"); } ]]> </mx:Script> </mx:Canvas>

    Read the article

  • Absolute positioned child div expands to fit the parent?

    - by Amon
    Is there anyway for an absolute positioned child to expand to fill its relative positioned parent? (The height of parent is not fixed) Here is what i did and it is working fine with Firefox and IE7 but not IE6. :( <div id="parent"> <div id="child1"></div> </div> #parent { position: relative; width: 200px; height:100%; background:red } #child1 { position: absolute; top: 0; left: 200px; height: 100%; background:blue }

    Read the article

  • What Windows Form control would be a good fit for this use case?

    - by Sergio Tapia
    I'm going create an open source Help desk solution free of charge for small to medium businesses to use. I'm currently working on the client application. I want to have a list of tickets that have been opened by the user. So it would be like a table TicketsByUser: Ticket Number | Type | Description | Date | Handled? 123456 | Hardware | My mouse broke | 10/20/2010 | No 123456 | Hardware | My mouse broke | 10/20/2010 | Yes I was thinking of using ListView because of it's name, but I have zero experience with it, so maybe it's not what I'm looking for. I'm going to be pulling the data from a WCF service which in turn pulls it from a MS SQL database.

    Read the article

  • Optimizing a Parking Lot Problem. What algorithims should I use to fit the most amount of cars in th

    - by Adam Gent
    What algorithms (brute force or not) would I use to put in as many cars (assume all cars are the same size) in a parking lot so that there is at least one exit (from the container) and a car cannot be blocked. Or can someone show me an example of this problem solved programmatically. The parking lot varies in shape would be nice but if you want to assume its some invariant shape that is fine. Another Edit: Assume that driving distance in the parking lot is not a factor (although it would be totally awesome if it was weighted factor to number of cars in lot). Another Edit: Assume 2 Dimensional (no cranes or driving over cars). Another Edit: You cannot move cars around once they are parked (its not a valet parking lot). I hope the question is specific enough now.

    Read the article

  • how does a research topic fit into a program?

    - by Asj
    My project is supposed to be about creating a program to help put a math test online. The program should generate questions that vary on each run of the test, and it should grade the test after someone takes it. (I found out recently that there's a system that can do some of the tasks already, but I don't think many people know how to use it) What type of research could be involved? I need to find a research article that relates to my project, and I'm having a lot of trouble figuring out what type of subject to look for.

    Read the article

  • How to access a subset of XML data in Java when the XML data is too large to fit in memory?

    - by Michael Jones
    What I would really like is a streaming API that works sort of like StAX, and sort of like DOM/JDom. It would be streaming in the sense that it would be very lazy and not read things in until needed. It would also be streaming in the sense that it would read everything forwards (but not backwards). Here's what code that used such an API would look like. URL url = ... XMLStream xml = XXXFactory(url.inputStream()) ; // process each <book> element in this document. // the <book> element may have subnodes. // You get a DOM/JDOM like tree rooted at the next <book>. while (xml.hasContent()) { XMLElement book = xml.getNextElement("book"); processBook(book); } Does anything like this exist?

    Read the article

  • seeking help with Chrome & Safari not rendering my table stretched to fit its contents...help?

    - by oompa_l
    I have an element on this web page I'm developing where I need my text to conform to the width of an image above it - whose width will always be different - think of captions. I have found numerous references to using a 1px table to force this width sizing behaviour. I am having problems, though with Safari and Chrome "seeing" this instruction - the text ends up as a marginally sized text box sitting behind the image. The problem, as I see it, has to do with the text and images sitting in div's nested within the table. I need the images to sit in a div because of some jquery script I'm using called cycle, which turns a group of images into a slideshow. The problem may have something to do with the script as well. In any case, I have tried a seeming infinite number of combination of floating left and clearing left on all all the divs, changing their positions and widths...nothing works. Anyone have any clues about how to broach this one? EDIT 1: ok, should I be editing my post or responding with answers? here's the url to see the problem I am having - http://friedmanstudios.ca/webdev/test8.html and the code: <div id="content" class="boxes"> <table> <tr> <td > <div id="imageFrame"> <a href="#" class="img" title="_MG_9786_fmt.jpeg"> <img src="images/_MG_9786_fmt.jpeg"/> </a> <a href="#" class="img" title="IMG_5169_fmt.jpeg"> <img src="indesign export/GFA-TEARSHEETS-100526-01-web-images/IMG_5169_fmt.jpeg"/> </a> <a href="#" class="img" title="IMG_5175_fmt.jpeg"> <img src="indesign export/GFA-TEARSHEETS-100526-01-web-images/IMG_5175_fmt.jpeg"/> </a> <a href="#" class="img" title="aerial_fmt.jpeg" width=""> <img src="indesign export/GFA-TEARSHEETS-100526-01-web-images/aerial_fmt.jpeg"/> </a> </div> <div id="cycleCtrl"> <div id="prev" class="pager"><a href="#">< Prev</a> </div> <div id="next" class="pager"><a href="#">Next ></a></div> <div id="pagerNav" class="pager"></div> </div> <div id="descController"> <img src="images/arrow.gif" name="arrow" width="5" height="10" id="arrow" /> <span id="projectName">Toronto Centre for the Arts </span> <br /> <div id="desc"> In the past eight years... </div> </div></td> <td width="90%"><!--push col 1 back--></td> </tr> </table> and the styles: #content { position: absolute; top: 250px; left: 275px; float: left; clear: both; } content table { float: left; width: 1px; } imageFrame { position: relative; float: left; clear: left; width: inherit; } desc { position: relative; clear: left; float: left; } descController { position:relative; padding-top:5px; padding-bottom:10px; clear: left; float: left; } descController div { height:0; overflow:hidden; -webkit-transition:all .5s ease; -moz-transition:all .5s ease; -o-transition:all .5s ease; transition:all .5s ease; padding-top:10px; margin-top: 10px; word-spacing: 0em; line-height: 16px; font-size: 12px; position: relative; float: left; clear: left; }

    Read the article

  • jQuery accordion: is there a way to make the scrollbar fit the displayed panel?

    - by Cheeso
    I have a jQuery accordion (jQuery 1.3.2, jQuery UI 1.7.2), with between 3-12 content panels. Some of the content panels are large, and have lots of content. some are small, and have only a little. When I expand any of them, the scrollbar on the div containing the accordion (it's got css overflow: auto;) is set as if the largest of the panels is expanded. Let's say I have 3 panels. One has 3 lines of content, one has 20 lines, and one has 1000 lines. If I expand either of the first two, the scrollbar indicator gets very very tiny, and moves all the way to the top, even though there is nothing worth scrolling. Is there a way to fix this? It seems like autoHeight:false ought to do it, but that doesn't work for me.

    Read the article

  • (C) which heap policies are most often used?

    - by hatorade
    I have heard that 'better-fit' is pretty commonly used, but I don't seem to read much about it online. What are the most commonly used / thought to be the most efficient policies used by heap allocators. (I admit my vocabulary may be flawed; when I say 'policy' i mean things such as 'best fit,' 'first fit,' 'next fit,' etc)

    Read the article

  • How to make an Android UI with images from a designer delivered as layers

    - by Not Me
    I hired a designer to help me redesign the UI for my Android app. For each Activity he gave me an image for the background, which includes any static content like fancy frames for text content; plus images for the buttons, which must fit in to the background image in exact places, to fit into the frames in the background image. However, since Android devices have different screen sizes and aspect ratios, it's easy to fit the background image by itself with android:scaleType="centerInside", but how can I get all the other images to fit in with background exactly, to the pixel? If they didn't have to fit in with the background, I would just set the exact width and height for each ImageButton, but depending on how the background scales (based on the screen size and ratio) they might end up not aligned correctly. Thank you very much in advance.

    Read the article

  • Polynomial fitting with log log plot

    - by viral parekh
    I have a simple problem to fit a straight line on log-log scale. My code is, data=loadtxt(filename) xdata=data[:,0] ydata=data[:,1] polycoeffs = scipy.polyfit(xdata, ydata, 1) yfit = scipy.polyval(polycoeffs, xdata) pylab.plot(xdata, ydata, 'k.') pylab.plot(xdata, yfit, 'r-') Now I need to plot fit line on log scale so I just change x and y axis, ax.set_yscale('log') ax.set_xscale('log') then its not plotting correct fit line. So how can I change fit function (in log scale) so that it can plot fit line on log-log scale? Thanks -Viral

    Read the article

  • multiple puppet masters set up using inventory

    - by Oli
    I have managed to set up multiple puppet masters with one puppet master acting as a CA and clients are able to get a certificate from this CA server but use their designated puppet master to get their manifests. See this question for more info.. multiple puppet masters. However, there are a couple of things I have had to do to get this working correctly and have an error which I'll get to. First of all, to get inventory working for a puppet-client (PC) connecting to its designated puppet-master (PM), I had to copy the CA certs on PM1 to the PM2 ca directory. I ran this command: scp [email protected]:/var/lib/puppet/ssl/ca/* [email protected]:/var/lib/puppet/ssl/ca/. Once i have done that, I was able to uncomment the SSLCertificateChainFile, SSLCACertificateFile & SSLCARevocationFile section of my rack.conf VH file on the PM2. Once I had done this, inventory started to work. Does this sound an acceptable way to do things? Secondly, in the puppet.conf file, I am setting the designated PM server for that client. Unless there is a better way, this is how it'll work in my production setup. So PC1 will talk to PM1 and PC2 will talk to PM2. This is where I have an error. When PC2 first requests a cert from the CA on PM1, the cert appears and then I sign the cert on the CA on PM1. When I then do a puppet agent --test on PC2 (which has server = PM2 in puppet.conf), I get this error: Warning: Unable to fetch my node definition, but the agent run will continue: Warning: Error 403 on SERVER: Forbidden request: puppet-master2.test.net(10.1.1.161) access to /certificate_revocation_list/ca [find] at :112 However, if I change the PC2 puppet.conf file and specify server = PM1 and the rerun puppet agent --test, i do not get any errors. I can then revert the change in the puppet.conf file back to server = PM2 and everything seems to run normally. Do I have to set up some kind of ProxyPassMatch on PM2 for requests made from clients to /certificate_revocation_list/* and redirect them to PM1? Or how can I fix this error? Cheers, Oli

    Read the article

  • System beeps continuously if both RAM sticks inserted

    - by JGB146
    I have two sticks of OCZ 2GB PC2 9600 RAM. When I attempt to boot with both sticks inserted, I am met with a continuous string of system beeps (and no bootup). The system boots fine when only one stick is inserted, but obviously that leaves me with less RAM than I'd like to have. What could the problem be? System specs are: Gigabyte GA-EP45-UD3L Intel Core 2 Quad Q9400 Sticks of OCZ 2GB PC2 9600 RAM Zotac GeForce GTS 250 1GB 2x Seagate 500GB SATA HDs

    Read the article

  • Function within function in R

    - by frespider
    Can you please explain to me why th code complain saying that Samdat is not found? I am trying to switch between the models as you can see, so i declared a functions that contains these specific models and I just need to call these function as one of the argument in the get.f function where the resampling will change the structure for each design matrix in the model. the code complain the Samdat is not found when it is found. Also, is there a way I can make the condition statement as if(Model == M1()) instead I have to create another argument M to set if(M==1) Can you explain please? dat <- cbind(Y=rnorm(20),rnorm(20),runif(20),rexp(20),rnorm(20),runif(20), rexp(20),rnorm(20),runif(20),rexp(20)) nam <- paste("v",1:9,sep="") colnames(dat) <- c("Y",nam) M1 <- function(){ a1 = cbind(Samdat[,c(2:5,7,9)]) b1 = cbind(Samdat[,c(2:4,6,8,7)]) c1 = b1+a1 list(a1=a1,b1=b1,c1=c1)} M2 <- function(){ a1= cbind(Samdat[,c(2:5,7,9)])+2 b1= cbind(Samdat[,c(2:4,6,8,7)])+2 c1 = a1+b1 list(a1=a1,b1=b1,c1=c1)} M3 <- function(){ a1= cbind(Samdat[,c(2:5,7,9)])+8 b1= cbind(Samdat[,c(2:4,6,8,7)])+8 c1 = a1+b1 list(a1=a1,b1=b1,c1=c1)} ################################################################# get.f <- function(asim,Model,M){ sse <-c() for(i in 1:asim){ set.seed(i) Samdat <- dat[sample(1:nrow(dat),nrow(dat),replace=T),] Y <- Samdat[,1] if(M==1){ a2 <- Model$a1 b2 <- Model$b1 c2 <- Model$c1 s<- a2+b2+c2 fit <- lm(Y~s) cof <- sum(summary(fit)$coef[,1]) coff <-Model$cof sse <-c(sse,coff) } else if(M==2){ a2 <- Model$a1 b2 <- Model$b1 c2 <- Model$c1 s<- c2+12 fit <- lm(Y~s) cof <- sum(summary(fit)$coef[,1]) coff <-Model$cof sse <-c(sse,coff) } else { a2 <- Model$a1 b2 <- Model$b1 c2 <- Model$c1 s<- c2+a2 fit <- lm(Y~s) cof <- sum(summary(fit)$coef[,1]) coff <- Model$cof sse <-c(sse,coff) } } return(sse) } get.f(10,Model=M1(),M=1) get.f(10,Model=M2(),M=2) get.f(10,Model=M3(),M=3)

    Read the article

  • Stats on Screen Size for Flash Games

    - by ashes999
    I'm working on a Flash game after many, many years. I'm trying to figure out size to make my application run (eg. 600x800). Because it's a tall (not wide) game, I'm confused. I know about (and love) the Steam hardware stats. However, for Flash gaming, I have two nit-picks with their survey sample: 1) Caters to more hardcore gamers with better hardware (overall) 2) Captures only a subset of Flash gamers. Doesn't capture people who play at school, work, etc. or not netbooks and lighter machines. Are there any sort of statistics I can use to determine which size to use? Ideally, I would like to know something like: 800x600 will fit 94% of users screens 1024x768 will fit 74% of users screens 1200x960 will fit 53% of users screens etc.

    Read the article

  • Who could ask for more with LESS CSS? (Part 3 of 3&ndash;Clrizr)

    - by ToString(theory);
    Welcome back!  In the first two posts in this series, I covered some of the awesome features in CSS precompilers such as SASS and LESS, as well as how to get an initial project setup up and running in ASP.Net MVC 4. In this post, I will cover an actual advanced example of using LESS in a project, and show some of the great productivity features we gain from its usage. Introduction In the first post, I mentioned two subjects that I will be using in this example – constants, and color functions.  I’ve always enjoyed using online color scheme utilities such as Adobe Kuler or Color Scheme Designer to come up with a scheme based off of one primary color.  Using these tools, and requesting a complementary scheme you can get a couple of shades of your primary color, and a couple of shades of a complementary/accent color to display. Because there is no way in regular css to do color operations or store variables, there was no way to accomplish something like defining a primary color, and have a site theme cascade off of that.  However with tools such as LESS, that impossibility becomes a reality!  So, if you haven’t guessed it by now, this post is on the creation of a plugin/module/less file to drop into your project, plugin one color, and have your primary theme cascade from it.  I only went through the trouble of creating a module for getting Complementary colors.  However, it wouldn’t be too much trouble to go through other options such as Triad or Monochromatic to get a module that you could use off of that. Step 1 – Analysis I decided to mimic Adobe Kuler’s Complementary theme algorithm as I liked its simplicity and aesthetics.  Color Scheme Designer is great, but I do believe it can give you too many color options, which can lead to chaos and overload.  The first thing I had to check was if the complementary values for the color schemes were actually hues rotated by 180 degrees at all times – they aren’t.  Apparently Adobe applies some variance to the complementary colors to get colors that are actually more aesthetically appealing to users.  So, I opened up Excel and began to plot complementary hues based on rotation in increments of 10: Long story short, I completed the same calculations for Hue, Saturation, and Lightness.  For Hue, I only had to record the Complementary hue values, however for saturation and lightness, I had to record the values for ALL of the shades.  Since the functions were too complicated to put into LESS since they aren’t constant/linear, but rather interval functions, I instead opted to extrapolate the HSL values using the trendline function for each major interval, onto intervals of spacing 1. For example, using the hue extraction, I got the following values: Interval Function 0-60 60-140 140-270 270-360 Saturation and Lightness were much worse, but in the end, I finally had functions for all of the intervals, and then went the route of just grabbing each shades value in intervals of 1.  Step 2 – Mapping I declared variable names for each of these sections as something that shouldn’t ever conflict with a variable someone would define in their own file.  After I had each of the values, I extracted the values and put them into files of their own for hue variables, saturation variables, and lightness variables…  Example: /*HUE CONVERSIONS*/@clrizr-hue-source-0deg: 133.43;@clrizr-hue-source-1deg: 135.601;@clrizr-hue-source-2deg: 137.772;@clrizr-hue-source-3deg: 139.943;@clrizr-hue-source-4deg: 142.114;.../*SATURATION CONVERSIONS*/@clrizr-saturation-s2SV0px: 0;@clrizr-saturation-s2SV1px: 0;@clrizr-saturation-s2SV2px: 0;@clrizr-saturation-s2SV3px: 0;@clrizr-saturation-s2SV4px: 0;.../*LIGHTNESS CONVERSIONS*/@clrizr-lightness-s2LV0px: 30;@clrizr-lightness-s2LV1px: 31;@clrizr-lightness-s2LV2px: 32;@clrizr-lightness-s2LV3px: 33;@clrizr-lightness-s2LV4px: 34;...   In the end, I have 973 lines of mapping/conversion from source HSL to shade HSL for two extra primary shades, and two complementary shades. The last bit of the work was the file to compose each of the shades from these mappings. Step 3 – Clrizr Mapper The final step was the hardest to overcome as I was still trying to understand LESS to its fullest extent.  Imports As mentioned previously, I had separated the HSL mappings into different files, so the first necessary step is to import those for use into the Clrizr plugin: @import url("hue.less");@import url("saturation.less");@import url("lightness.less"); Extract Component Values For Each Shade Next, I extracted the necessary information for each shade HSL before shade composition: @clrizr-input-saturation: 1px+floor(saturation(@clrizr-input))-1;@clrizr-input-lightness: 1px+floor(lightness(@clrizr-input))-1; @clrizr-complementary-hue: formatstring("clrizr-hue-source-{0}", ceil(hue(@clrizr-input))); @clrizr-primary-2-saturation: formatstring("clrizr-saturation-s2SV{0}",@clrizr-input-saturation);@clrizr-primary-1-saturation: formatstring("clrizr-saturation-s1SV{0}",@clrizr-input-saturation);@clrizr-complementary-1-saturation: formatstring("clrizr-saturation-c1SV{0}",@clrizr-input-saturation); @clrizr-primary-2-lightness: formatstring("clrizr-lightness-s2LV{0}",@clrizr-input-lightness);@clrizr-primary-1-lightness: formatstring("clrizr-lightness-s1LV{0}",@clrizr-input-lightness);@clrizr-complementary-1-lightness: formatstring("clrizr-lightness-c1LV{0}",@clrizr-input-lightness); Here, you can see a couple of odd things…  On the first line, I am using operations to add units to the saturation and lightness.  This is due to some limitations in the operations that would give me saturation or lightness in %, which can’t be in a variable name.  So, I use first add 1px to it, which casts the result of the following functions as px instead of %, and then at the end, I remove that pixel.  You can also see here the formatstring method which is exactly what it sounds like – something like String.Format(string str, params object[] obj). Get Primary & Complementary Shades Now that I have components for each of the different shades, I can now compose them into each of their pieces.  For this, I use the @@ operator which will look for a variable with the name specified in a string, and then call that variable: @clrizr-primary-2: hsl(hue(@clrizr-input), @@clrizr-primary-2-saturation, @@clrizr-primary-2-lightness);@clrizr-primary-1: hsl(hue(@clrizr-input), @@clrizr-primary-1-saturation, @@clrizr-primary-1-lightness);@clrizr-primary: @clrizr-input;@clrizr-complementary-1: hsl(@@clrizr-complementary-hue, @@clrizr-complementary-1-saturation, @@clrizr-complementary-1-lightness);@clrizr-complementary-2: hsl(@@clrizr-complementary-hue, saturation(@clrizr-input), lightness(@clrizr-input)); That’s is it, for the most part.  These variables now hold the theme for the one input color – @clrizr-input.  However, I have one last addition… Perceptive Luminance Well, after I got the colors, I decided I wanted to also get the best font color that would go on top of it.  Black or white depending on light or dark color.  Now I couldn’t just go with checking the lightness, as that is half the story.  You see, the human eye doesn’t see ALL colors equally well but rather has more cells for interpreting green light compared to blue or red.  So, using the ratio, we can calculate the perceptive luminance of each of the shades, and get the font color that best matches it! @clrizr-perceptive-luminance-ps2: round(1 - ( (0.299 * red(@clrizr-primary-2) ) + ( 0.587 * green(@clrizr-primary-2) ) + (0.114 * blue(@clrizr-primary-2)))/255)*255;@clrizr-perceptive-luminance-ps1: round(1 - ( (0.299 * red(@clrizr-primary-1) ) + ( 0.587 * green(@clrizr-primary-1) ) + (0.114 * blue(@clrizr-primary-1)))/255)*255;@clrizr-perceptive-luminance-ps: round(1 - ( (0.299 * red(@clrizr-primary) ) + ( 0.587 * green(@clrizr-primary) ) + (0.114 * blue(@clrizr-primary)))/255)*255;@clrizr-perceptive-luminance-pc1: round(1 - ( (0.299 * red(@clrizr-complementary-1)) + ( 0.587 * green(@clrizr-complementary-1)) + (0.114 * blue(@clrizr-complementary-1)))/255)*255;@clrizr-perceptive-luminance-pc2: round(1 - ( (0.299 * red(@clrizr-complementary-2)) + ( 0.587 * green(@clrizr-complementary-2)) + (0.114 * blue(@clrizr-complementary-2)))/255)*255; @clrizr-col-font-on-primary-2: rgb(@clrizr-perceptive-luminance-ps2, @clrizr-perceptive-luminance-ps2, @clrizr-perceptive-luminance-ps2);@clrizr-col-font-on-primary-1: rgb(@clrizr-perceptive-luminance-ps1, @clrizr-perceptive-luminance-ps1, @clrizr-perceptive-luminance-ps1);@clrizr-col-font-on-primary: rgb(@clrizr-perceptive-luminance-ps, @clrizr-perceptive-luminance-ps, @clrizr-perceptive-luminance-ps);@clrizr-col-font-on-complementary-1: rgb(@clrizr-perceptive-luminance-pc1, @clrizr-perceptive-luminance-pc1, @clrizr-perceptive-luminance-pc1);@clrizr-col-font-on-complementary-2: rgb(@clrizr-perceptive-luminance-pc2, @clrizr-perceptive-luminance-pc2, @clrizr-perceptive-luminance-pc2); Conclusion That’s it!  I have posted a project on clrizr.codePlex.com for this, and included a testing page for you to test out how it works.  Feel free to use it in your own project, and if you have any questions, comments or suggestions, please feel free to leave them here as a comment, or on the contact page!

    Read the article

  • VBA: How go I get the total width from all controls in an Access form?

    - by Stefan Åstrand
    Hi, This is probably very basic stuff, but please bear in mind I am completely new to these things. I am working on a procedure for my Access datasheet forms that will: Adjust the width of each column to fit content Sum the total width of all columns and subtract it from the size of the window's width Adjust the width of one of the columns to fit the remaining space This is the code that adjusts the width of each column to fit content (which works fine): Dim Ctrl As Control Dim Path As String Dim ClmWidth As Integer 'Adjust column width to fit content For Each Ctrl In Me.Controls If TypeOf Ctrl Is TextBox Then Path = Ctrl.Name Me(Path).ColumnWidth = -2 End If Next Ctrl How should I write the code so I get the total width of all columns? Thanks a lot! Stefan

    Read the article

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