cf scale myApp –i 5 is for horizontal scaling,
cf scale myApp -k 512M is for vertical scaling.
What happens when we use the above horizontal and vertical scaling commands? Do they increase the number of instances by adding 5 and Disk Size by adding 512M, or will the overall application instances be 5 and overall disk size be 512M?
-i, -k, and -m all take the new absolute values not an increment.
https://docs.cloudfoundry.org/devguide/deploy-apps/cf-scale.html
Use cf scale APP -i INSTANCES to horizontally scale your application.
Cloud Foundry will increase or decrease the number of instances of
your application to match INSTANCES.
Related
I am using windows cli version libvips. I want to generate map tiles for leaflet from image 8000px x 6000px. This image is old map of my town, and I want to display it on my website, but I am stuck on generating tiles.
How to tell libvips to generate tiles from zoom level 10 to 15. With command
dzsave input.jpg outputdir --layout google
I receive tiles from zoom level 0 to 5.
And second question.
How to set bounds of my map? Generated tiles from above command cover the whole world.
The libvips CLI lets you run any save operation (like jpegsave, tiffsave or dzsave) as part of the write step of a command. You select the saver with the filename suffix and you can pass any parameters in square brackets at the end of the filename (be careful not to use any spaces).
So these two commands do the same thing:
vips jpegsave x.jpg y.jpg --Q 90
vips copy x.jpg x.jpg[Q=90]
The copy command will run jpegsave for you (it sees the .jpg suffix) and set Q to 90.
You can select dzsave with the .dz suffix. If your image is 50,000 x 50,000 pixels, you can save just the centre 50% with:
vips crop my-huge-map.jpg x.dz[layout=google] 12500 12500 25000 25000
I'm not sure what you mean by "layers 10 to 15". Do you only want the low-res layers? Just do a shrink by eg. 16 before running dzsave.
The default yocto image is about 1GB after bitbake core-image-minimal.
The free space is couple hundred MB.
How to assign or increase it?
Let's say you want to add 8G extra then you can set following in local.conf
IMAGE_ROOTFS_EXTRA_SPACE_append = " + 8000000"
Another way to do is to set IMAGE_OVERHEAD_FACTOR which will increase the size of image proportionally to the size of the content of image e.g.
IMAGE_OVERHEAD_FACTOR = "1.5"
will multiply the original size with 1.5 to create the final image.
also read through documentation for details.
Is it possible to give an edge a fixed length? Even if I set the length of individual edges, physic engine changes it.
I am trying to visualize 3 clusters, each with couple hundred of nodes. There is an option to aggregate the cluster into couple of nodes. I want to connect these aggregated nodes with really short edges and give these nodes high mass so they will repulse other clusters like they were doing when they had hundreds of nodes.
It seems like the answer to this question these days is YES! The network/edges visjs.org docs describe a "length" option:
"The physics simulation gives edges a spring length. This value can
override the length of the spring in rest."
So when you're setting up your edges you might do something like this to make an extra long edge:
myEdges.push({from:'nodeid1', to:'nodeid2', length:300});
The length by default is about 95 I think, so a length of 300 would be about three times the normal.
If you want to change the default edge length (not including any which you've set explicitly on edges) then this is the 'springLength' of the network, so pass an option while making the network:
var network = new vis.Network(container, data,
{"physics": {"barnesHut": {"springLength":100, "springConstant": 0.04}}}
);
The physics engine might constrain things and sort of hide the changes you're trying to see, so you may also need to tweak things like 'springConstant'.
It's not possible to set a fixed length. You can play around though with the default springLength and springConstant though, checkout the docs on physics:
http://visjs.org/docs/network/physics.html
While trying to create a repeated tile overlay, I've found many questions (like this one)
mentioning that repeated images in Cocos2d must have height and width dimensions that are powers of two.
This raises two questions. First, why is this a limitation? Second, and more importantly, how can I create a repeating, scrolling image that has dimensions that are not a power of two? What if I have a really wide background (say 4000 pixels) and I want it to repeat across the X axis. What should I do in that context? I can't believe the "correct" answer is to add an additional 96 pixels to the width, and increase the height of the image to 4096, as well. That's wasted bytes!
This answer has excellent info on why the need for power of 2 textures.
Why do images for textures on the iPhone need to have power-of-two dimensions?
As for your second question, the texture does not have to be square, just both the width and height have to be a power of 2. So you could have an image that is 4096x128 repeating as your background. Keep in mind also that textures, no matter what the size, are always stored in memory in an uncompressed power of two size. So an image with width of 4000 and and an image with width of 4096 are actually using the same amount of memory.
Is there any way to get the screen size in pixels for a secondary monitor using Matlab? get(0,'ScreenSize') seems to only recognize the screen on the main monitor.
Try using get(0,'MonitorPositions') instead. It returns the width and height of primary and secondary monitors, in pixels.