Search Results

Search found 891 results on 36 pages for 'scaling'.

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

  • Scaling up an image

    - by codefail
    How do I fulfill the condition "returns the entire scaled up image" If I am coding this correctly, scaleColor handles individual colors, getRed handles the red, etc. I am multiplying this by the input, numTimes, which will create a new image that is scaled up it. This scaled up (increase size) is to be returned. This is what I have. Image Image::scaleUp(int numTimes) const { for (int x = 0; x < width; x++) { for (int y = 0; y < height; y++) { pixelData[x][y].scaleColor(pixelData[x][y].scaleRed(pixelData[x][y].getRed()*numTimes)); pixelData[x][y].scaleColor(pixelData[x][y].scaleGreen(pixelData[x][y].getGreen()*numTimes)); pixelData[x][y].scaleColor(pixelData[x][y].scaleBlue(pixelData[x][y].getBlue()*numTimes)); } } //return Image(); }

    Read the article

  • Scaling mouse coordinates for GlScale?

    - by user146780
    Right now I have a GL context that is set up with a top left coordinate system. I made my mouse so that its 0,0 is the top left of the Open GL frame. If I apply GlScalef(2,2,2) for example to my scene, how would I have to change my mouse so that drawing stil maps out correctly. Thanks

    Read the article

  • Maximizing TCP connections on HAProxy load balancer

    - by imaginative
    I am currently using HAProxy in order to load balance tcp connections from clients to my Erlang app server. The connection is persistent, which means I'm limited to roughly 64K clients on an optimized server (I'm currently running HAProxy on an m1.large EC2 instance). My app server is designed to horizontally scale based on the number of TCP connections. What's worrying me though is I'll need an equal number of HAProxy servers as app servers since it's a 1:1 connection. Is there currently a way to "proxy" the tcp connection to the app server so that once HAProxy sends the client off to my Erlang server, it can free up the connection, ready to serve another client? Are there any papers, existing solutions out there I can read so that I only have to worry about the 64K limit on my app servers, and not on the load balancing servers themselves?

    Read the article

  • Changing scaling of MATLAB Figure

    - by Phil
    I have a figure that displays 20,000 points on the x-axis. So it labels the x-axis from 0 ... 20,000. However, now I would like to scale it from 0 to 50. But when I try to do this in the plot window it just shows me the first 50 points, instead of changing the scale. Is there any straightforward way to do that in MATLAB?

    Read the article

  • Animating translation and scaling of view in Android

    - by hgpc
    I have to animate a view from state A to B with changes to its scale, position and scrolling. I know everything about state A (widthA, heightA, topA, leftA, scrollXA, scrollYA) and state B (widthB, heightB, topB, leftB, scrollXB, scrollYB). So far I wrote the following code: AnimationSet animation = new AnimationSet(true); int toXDelta; // What goes here? int toYDelta; // What goes here? TranslateAnimation translateAnimation = new TranslateAnimation(1, toXDelta, 1, toYDelta); translateAnimation.setDuration(duration); animation.addAnimation(translateAnimation); float scale = (float) widthB / (float) widthA; ScaleAnimation scaleAnimation = new ScaleAnimation(1, scale, 1, scale); scaleAnimation.setDuration(duration); animation.addAnimation(scaleAnimation); animation.setAnimationListener(new AnimationListener() { @Override public void onAnimationEnd(Animation arg0) { view.clearAnimation(); // Change view to state B } @Override public void onAnimationRepeat(Animation arg0) {} @Override public void onAnimationStart(Animation arg0) {} }); view.startAnimation(animation); Is this the right way to do this? If so, how should I calculate the values of toXDelta and toYDelta? I'm having trouble finding the exact formula. Thanks!

    Read the article

  • Not able to login to new AMI on EC2 - moveing from micro to small instance

    - by zengr
    I had a t1.micro instance (old_server) on Linux on EC2 and now I need to upgrade my server to m1.small Linux (new_server). So, here is what I did: Shutdown old_server and create an AMI. Launch the new AMI with m1.small configuration. (I kept the key and security group same as old_server) I tried to login by: ssh -i my_key.pem [email protected] But, it gives a connection timeout error. My login to old_server works fine. So, my question is: What is the correct way to scale up (vertically) an EC2 instance? Where am I going wrong in the above mentioned step? When I create an AMI in step 1, is the EBS (data) also copied.

    Read the article

  • Database scaling question

    - by Anthony
    My app has outgrown just the one vps server (using Mediatemple DV). I want to put the database on another server. Does it have to be another Mediatemple server? Is it possible to use another hosting company and will the connections across the internet cause a slowdown if I choose to use say Rackspace or Linode for the DB server? btw, using mysql

    Read the article

  • Android: scaling a button with a background image.

    - by jkhouw1
    I'm probably just being daft but my Google searches are not working out well. I have a bunch of buttons i add in code that all have dynamic text. I've set a background image for each of these buttons since the default greybutton doesn't work well for my application. This works perfectly and when the text size (or content) changes, the button automatically grows to accommodate the expanded text. What doesn't work is that I'd like the button to scale proportionally - i.e. if the background image is round, i'd like it to stay round rather than oval as the button gets bigger. With an imagebutton, there is a property "Adjust view bounds" that does exactly this but I cant put text on an imagebutton. Is there something equivalent for a regular button? or am I going about this wrong? i also tried setting the width of the button in code, but I can't seem to determine the new height (button.getHeight() returns 0)

    Read the article

  • Scaling Java applications - existing cluster-aware IoC frameworks?

    - by Zoltan
    Most people use some kind of an IoC framework - Guice, Spring, you name it. Many of us need to scale their applications too, so they complicate their lifes with Terracotta, Glassfish/JBoss/insertyourfavouritehere clusters. But is it really the way to go? Are you using any of the above? Here's some ideas we currently have implemented in a yet-to-be-opensourced framework, and I'd like to see what you think of it, or maybe "it's a complete ripoff of XY!". cluster-wide object replication - give it a name, and whenever you do something (in any node) on such an object, it will get replicated - with different guarantees do transparent soft-loadbalancing - simplest scenario: restful webservice method call proxied to an other node view-only node injection: inject a proxy to a "named" object, and get your calls automatically proxied to a node Would you use something like that? Is there a current, stable, enterprise-ready implementation out there?

    Read the article

  • How to make a vm scale when demand for resource increases

    - by Cray XT3
    i am having a server with 16 virtual core and 24G RAM,using Xen virtualization and ubuntu as dom0 Created 4 VMs (in para mode),each with different applications. CPU Load vary on each vm,somtimes first vm reaches nearly 100% CPU and others under 25% or even less. So is there a way in which vm can get cpu from other vms when they are not actually using it or utilization is under 25%.Same in the case of RAM also. I am not sure whether i am mentioning Cloud here. Initially i would like to give every vm a single VCPU,but can scale up to 8 or more by taking cpu from other vms if they are not using it. Is there any kind of tool that makes vm to scale its resources when demand increases. Is cloudstack and openstack designed for these kind of purpose or is that just a GUI to manage VMs.

    Read the article

  • Localized database for customers

    - by Jim
    The company I work for, has just moved to AWS - and currently they have one very large central database with the instance currently located in America. However, one of their clients has requested that all of their data is held in the EU. So creating an AWS instance in Ireland isn't a problem, the problem is the database and how to manage it. We were considering having another database that runs in the EU for European customers, and use a different primary key step, so that the primary keys will never conflict in case the two locations need to be merged in the future. The problem is, if we have a customer that uses our system in both America, and the EU we would have to create 2 accounts for that user, and reporting across both regions would not be possible as the connection time would be too high. Is there an alternative to set this up?

    Read the article

  • Color scaling function

    - by Tomas Pajonk
    I am trying to visualize some values on a form. They range from 0 to 200 and I would like the ones around 0 be green and turn bright red as they go to 200. Basically the function should return color based on the value inputted. Any ideas ?

    Read the article

  • How to disable scaling in JFreeChart?

    - by Alex Arnon
    Hi All, We're using JFreeChart to build an engine to display graphs. This is a web service that runs on Tomcat + Java 1.5.0, and renders charts to PNGs and JPEGs (using ChartUtilities.writeChartAs{PNG,JPEG}() ). We've run into a problem where JFreeChart seems to scale everything inside the Plot area, but only by a few pixels. The result is that the graph looks inconsistent, e.g.: Minor ticks are sometimes stretched horizontally, so that they seem to be two pixels wide instead of one. We use a small image in the top-right of the plot area as a watermark. This is stretched by one pixel horizontally and vertically somewhere near (but not exactly) its middle. Background grid lines seem to appear on sub-pixel boundaries. I have not found a way to create an accurately dotted grid line. We have tried both 1.0.9 and 1.0.13, with exactly the same results (except for the minor ticks, which were not available in the older version). Also, rendering the image to a Frame instead of JPEG/PNG produced an identical result. Help is greatly appreciated, in advance :)

    Read the article

  • AWS: Multi-region setup using single RDS instance

    - by Ion
    I'm trying to scale our web application (PHP, MySQL, memcache) in a multi-region scheme. Currently we are using a setup with two EC2 instances behind an ELB and an RDS instance, all of them in US-EAST (Virginia) region. We would like to have a presence in the EU (Ireland) region as well. This means at least a new EC2 instance there (identical to the others, serving the same application). I have copied the desired AMI, setup the new instance, setup a same ELB configuration (required for SSL termination) and configured latency-based routing in Route53. And it works as suggested. But, clients from EU have speed problems. This is due to the fact that the EU EC2 instances connect to the US-based RDS instance. As far as I know Amazon has not yet enabled RDS multi-region replication. Do you have any suggestions on how to properly speed up the whole setup while using the single RDS instance? Also, any ideas in general on how to scale things up? Ideally we would like to continue using the RDS technology for various reasons. Nevertheless, I am open to suggestions (I guess the next idea would be to host our own MySQL servers).

    Read the article

  • Changeing scaling of Matlab Figure

    - by Phil
    Hi, I have a figure that displays 20.000 points on the x-axis. So it labels the x-axis from 0 .. 20.000. However, now I would like to scale it form 0 to 50. But when I try to do this in the plot window it just shows me the first 50 points, instead of changeing the scale. Is there any straightforward way to do that in Matlab? Many thanks for your help!

    Read the article

  • Static footer, with attached and scaling overlap

    - by DavidYell
    I have been asked by a client to create a site where the content area overlaps the footer. However they also want the footer to be attached to the bottom of the viewport, which I've done, but it seems that I can't find a good way to vertically stretch the content to maintain the overlap should the browser be resized. I've created a diagram to help explain, http://www.squaresphere.co.uk/images/footer-diagram.png So ideally I need a way of calculating the height of the content and stretching the content div if content_length viewport.height, but keep a min-height if content_length < viewport.height A solution using html+css would be fantastic, but I'm starting to think that I'm going to have to do some funky jQuery onviewportresize or something Any suggestions would be awesome, thanks!

    Read the article

  • openmp program elapsed time not scaling with increased threads

    - by Griff
    I've got this openmp fortran program doing an embarrassingly parallel problem - do loop over 512^3 elements. See output below. Why would there be such strange behavior in the elapsed time as a function of threads? I thought it would peak at a sweet spot then slowly degrade. This clearly isn't happening. Perhaps I misunderstand something about openmp. Threads, omp_get_wtime 1, 103.76298500015400 2, 65.346454000100493 4, 45.923643999965861 7, 38.074195000110194 8, 36.968765000114217 9, 39.45981499995105 10,40.753379000118002 12,39.577559999888763 14,37.909950000001118

    Read the article

  • Android : Stop image scaling down

    - by John Smith
    Hi, I'm trying to draw an image in a view but having problems trying to maintain the scale of the original image. Basically, I have a small view and I would like to show part of the image in the view. The intention then is to perform a translation on the image so that a different part appears in the view. No matter what I try, either the image is down-scaled automatically to fit the view or the whole image is viewable. I've tried playing about with the settings on BitmapDrawable, ImageView and Layout to no avail. Anyone know a good way to achieve this?

    Read the article

  • SVG Scaling Text to fit container

    - by Tom
    This is likely a very simple question, but how do I get text in SVG to stretch to fit its container? I don't care if it looks ugly from being stretched too long or high, but it needs to fits its container and be as big as possible. Thanks

    Read the article

  • MySQL : table organisation for very large sets with high update frequency

    - by Remiz
    I'm facing a dilemma in the choice of my MySQL schema application. So before I start here is a picture extremely simplified of my database : Schema here : http://i43.tinypic.com/2wp5lxz.png In one sentence : for each customer, the application harvest text data and attached tags to each data collected. As approximation of the usage of each table, here is what I expect : customer : ~5000, shouldn't grow fast data : 5 millions per customer, could double or triple for big customers. tag : ~1000, quite fixed size data_tag : hundred of millions per customer easily. Each data can be tagged a lot. The harvesting process is permanent, that means that around every 15 minutes new data come and are tagged, that require a very constant index refreshing. A lot of my queries are a SELECT COUNT of DATA between specific DATES and tagged with a specific TAG on a specific CUSTOMER (very rarely it will involve several customers). Here is the situation, you can imagine with this kind of volume of data I'm facing a challenge in term of data organization and indexing. Again, it's a very minimalistic and simplified version of my structure. My question is, is it better: to stick with this model and to manage crazy index optimization ? (which involves potentially having billions of rows in the data_tag table) change the schema and use one data table and one data_tag table per customer ? (which involves having 5000 tables on my database) I'm running all of this on a MySQL 5.0 dedicated server (quad-core, 8Go of ram) replicated. I only use InnoDB, I also have another server that run Sphinx. So knowing all of this, I can't wait to hear your opinion about this. Thanks.

    Read the article

  • Tips for maximizing Nginx requests/sec?

    - by linkedlinked
    I'm building an analytics package, and project requirements state that I need to support 1 billion hits per day. Yep, "billion". In other words, no less than 12,000 hits per second sustained, and preferably some room to burst. I know I'll need multiple servers for this, but I'm trying to get maximum performance out of each node before "throwing more hardware at it". Right now, I have the hits-tracking portion completed, and well optimized. I pretty much just save the requests straight into Redis (for later processing with Hadoop). The application is Python/Django with a gunicorn for the gateway. My 2GB Ubuntu 10.04 Rackspace server (not a production machine) can serve about 1200 static files per second (benchmarked using Apache AB against a single static asset). To compare, if I swap out the static file link with my tracking link, I still get about 600 requests per second -- I think this means my tracker is well optimized, because it's only a factor of 2 slower than serving static assets. However, when I benchmark with millions of hits, I notice a few things -- No disk usage -- this is expected, because I've turned off all Nginx logs, and my custom code doesn't do anything but save the request details into Redis. Non-constant memory usage -- Presumably due to Redis' memory managing, my memory usage will gradually climb up and then drop back down, but it's never once been my bottleneck. System load hovers around 2-4, the system is still responsive during even my heaviest benchmarks, and I can still manually view http://mysite.com/tracking/pixel with little visible delay while my (other) server performs 600 requests per second. If I run a short test, say 50,000 hits (takes about 2m), I get a steady, reliable 600 requests per second. If I run a longer test (tried up to 3.5m so far), my r/s degrades to about 250. My questions -- a. Does it look like I'm maxing out this server yet? Is 1,200/s static files nginx performance comparable to what others have experienced? b. Are there common nginx tunings for such high-volume applications? I have worker threads set to 64, and gunicorn worker threads set to 8, but tweaking these values doesn't seem to help or harm me much. c. Are there any linux-level settings that could be limiting my incoming connections? d. What could cause my performance to degrade to 250r/s on long-running tests? Again, the memory is not maxing out during these tests, and HDD use is nil. Thanks in advance, all :)

    Read the article

  • PHP, MySQL, Memcache / Ajax Scaling Problem

    - by Jeff Andersen
    I'm building a ajax tic tac toe game in PHP/MySQL. The premise of the game is to be able to share a url like mygame.com/123 with your friends and you play multiple simultaneous games. The way I have it set up is that a file (reload.php) is being called every 3 seconds while the user is viewing their game board space. This reload.php builds their game boards and the output (html) replaces their current game board (thus showing games in which it is their turn) Initially I built it entirely with PHP/MySQL and had zero caching. A friend gave me a suggestion to try doing all of the temporary/quick read information through memcache (storing moves, and ID matchups) and then building the game boards from this information. My issue is that, both solutions encounter a wall when there is roughly 30-40 active users with roughly 40-50 games running. It is running on a VPS from VPS.net with 2 nodes. (Dedicated CPU: 1.2GHz, RAM: 752MB) Each call to reload.php peforms 3 selects and 2 insert queries. The size of the data being pulled is negligible. The same actions happen on index.php to build the boards for the initial visit. Now that the backstory is done, my question is: Would there be a bottleneck in that each user is polling the same file every 3 seconds to rebuild their gameboards, and that all users are sitting on index.php from which the AJAX calls are made within the HTML. If so, is it possible to spread the users' calls out over a set of files designated to building the game boards (eg. reload1.php 2, 3 etc) and direct users to the appropriate file. Would this relieve the pressure? A long winded explanation; however, I didn't have anywhere else to ask. Thanks very much for any insight.

    Read the article

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