scale

How do you rewrite/recode a website to be scalable?

How do you rewrite a website to be scalable?(traffic) I work with mainly PHP and some Ruby on rails and i know its a generic question. I'm just looking to increase my knowledge so any advice would be useful. Thank you in advance ;-) ...

How to add a condition to the geom_point size?

I am trying to add a condition to geom_point size and I've pasted my example below. I would like geom_point size to be 2 when n_in_stat is 4 or more, and size = 5 when n_in_stat is less than 4. I tried putting an ifelse statement inside the geom_point, but this failed. Perhaps I can't include logical operators here and I have to crea...

How do I interpret precision and scale of a number in a database?

I have the following column specified in a database: decimal(5,2) How does one interpret this? According to the properties on the column as viewed in SQL Server Management studio I can see that it means: decimal(Numeric precision, Numeric scale). What do precision and scale mean in real terms? It would be easy to interpret this as a ...

Division in c# not going the way I expect

Im trying to write something to get my images to show correctly. I have 2 numbers "breedtePlaatje" and "hoogtePlaatje". When i load those 2 vars with the values i get back "800" and "500" i expect "verH" to be (500 / 800) = 0,625. Tho the value of verH = 0.. This is the code: int breedtePlaatje = Convert.ToInt32(imagefield.Width); int...

Background in tab widget ignore scaling

Hey, I tried to use a background (480x320) for my tab content. Using a xml as drawable, I should be able to scale the image. This works fine outside the tabhost/tabactivity. If I try to use it inside the tabcontent, the scaleType doesn't work. He ignores every scaleType I tried. tabcontent: <?xml version="1.0" encoding="utf-8"?> <Rela...

Equal scale for both of X and Y in Zedgraph chart

Based on my experience with Zedgraph I could not set both of X and Y axes scale same to have a correct scatter graph! Assume we have a square grid of 10x10m cells in which each cell is a square shape 1x1m. when we try to draw points of such data, the output is not acceptable because each axis scaled to different scale. It is worse when w...

How to scale GdkPixmap or XPixmap via X server?

I'm interested in offloading X client from heavy computations. As far as I understand I can do it using XRender in some way. But I do no found how. ...

Scale 2D coordinates and keep their relative euclidean distances intact?

I have a set of points like: pointA(3302.34,9392.32), pointB(34322.32,11102.03), etc. I need to scale these so each x- and y-coordinate is in the range (0.0 - 1.0). I tried doing this by first finding the largest x value in the data set (maximum_x_value), and the largest y value in the set (minimum_y_value). I then did the following: p...

Rails: Cannot add :precision or :scale options with change_column in a migration?

This seems to have been asked before: http://stackoverflow.com/questions/1402547/rails-decimal-precision-and-scale But when running a change_column migration for :precision or :scale they don't actually affect the schema or database, but db:migrate runs without errors. My migration file looks like this: class ChangePrecisionAndScaleO...

Plane projection and scale causing bluring in silverlight

Ok, So I've tried to make an application which relies on images being scaled by an individual factor. These images are then able to be turned over, but the use of an animation working on the ProjectionPlane rotation. The problem comes around when an image is both scaled and rotated. For some reason it starts bluring, where a non scaled...

How can an Oracle NUMBER have a Scale larger than the Precision?

The documentation states: "Precision can range from 1 to 38. Scale can range from -84 to 127". How can the scale be larger than the precision? Shouldn't the Scale range from -38 to 38? ...

QGraphicsView scrolling and image scaling/cropping

I would like to have a background image in my QGraphicsView that is always scaled (and cropped if necessary) to the size of the viewport, without scrollbars and without scrolling with the keyboard and mouse. The example below is what I am doing to scale and crop an image in the viewport, but I am using random values for the cropping that...

What is the best practical way to add a major feature/service to an existing medium-sized Ruby on Rails project?

Hi there, I have an existing project written in Ruby on Rails. It is sort of backend solution for the upcoming major addition to the project. What I mean is it currently serves for the admins and it already has loads of features and actual Rails files in there. Now I am planning to add the new "Public" facing part of the App in Rails a...

Delphi: Autoscale TEdit based on text length does not work when removing chars

Hello. I have an input edit field where the user can enter data. I want the box width to be at least 191px (min) and maximum 450px (max). procedure THauptform.edtEingabeChange(Sender: TObject); begin // Scale if Length(edtEingabe.Text) > 8 then begin if Hauptform.Width <= 450 then begin verschie...

Load image in device independent and screen independent fashion into a layout view using 1.6 SDK

I'm having trouble getting an asset image to scale up when I load it. The new call to BitmapDrawable(Resources, BitmapDrawable) is not available on 1.6 SDK. Is there a workaround to load the BitmapDrawable the old way and then somehow manipulate it? I have tried calling setTargetDensity() to no avail. My code (which doesn't scale proper...

Scaling an image using the mouse in a WinForms application?

I'm trying to use the position of the mouse to calculate the scaling factor for scaling an image. Basically, the further you get away from the center of the image, the bigger it gets; and the closer to the center you get, the smaller it gets. I have some code so far but it's acting really strange and I have absolutely no more ideas. Firs...

scale animation for wpf popup

I have a nice little popup, when it shows, I d'like it to growth from 0 to 1x scaley, but I don't get it right, when I click multiple times, it looks like i "catch" the animation at various states during the "growth". <Window.Triggers> <EventTrigger RoutedEvent="FrameworkElement.MouseRightButtonDown" > <E...

ActionScript applying rotation of sprite to startDrag()'s rectangle bounds

from my main class i call to create a sprite and add it to the stage private function addSwatch(evt:MouseEvent):void { if (stage.getObjectsUnderPoint(mousePoint()).length == 0) { var swatchSide:Number = 100; var newSwatch:Sprite = new Swatch(0 - swatchSide/2, 0 - swatchSide/2, swatchSide, swatchSide); newSwatch.x = mouseX; n...

How come this image won't resize to fit the sprite?

I have this snippet of ActionScript code that is supposed to resize an image to fit the sprite: (as in rescale the image not just clip it) package { import flash.display.Sprite; import flash.display.Bitmap; import flash.events.Event; public class Main extends Sprite { [Embed(source = 'img.png')] pr...

how to 'scale' these three tables?

I have the following Tables: Players id playerName Weapons id type otherData Weapons2Player id playersID_reference weaponsID_reference That was nice and simple. Now I need to SELECT items from the Weapons table, according to some of their characteristics that i previously just p...