How to stop shrinking mobile web and start scaling instead?

I have standard PC web + mobile web. Using:

<meta name=viewport content="width=device-width, initial-scale=1">
@media (min-width: 1023px) { }
@media (max-width: 1022px) { }

But this website contains object that is 480px wide. So once the shrinking mobile web reaches 480px and under I would like to lock shrinking. And start scaling the screen instead. So the 480px website is 100% of the screen without overflowing even…

How to stop shrinking mobile web and start scaling instead?

Is it okay to add a shrinking ability to a pixie PC?

I am currently working out a Pixie PC character with one of my players, but we’ve run into a problem. Pixies being tiny creatures can’t carry much of anything (especially with 2(-4) Strength). This makes the use of almost any items near impossible, they couldn’t drink a health potion or even lift it at all.

The player suggested that the character gains a natural ability as part of being a pixie that everything they touch shrinks down to an appropriate size at will. Would this be fair? Is this over or under compensating? If it is, can anyone thing of an alternative solution to the “everything is giant and I cant use it” problem?

The PC has the exact same stats as a regular pixie such as ability scores and AC, as well as their magic resistance, superior invisibility and innate spellcasting.

Ubuntu partition showing “unallocated space” after shrinking windows 10 partition with AOMEI partition assistant

Yikes, it’s been a long day. I had a dual boot of Windows 10 and Ubuntu and everything was good but I was running out of space in Ubuntu. I attempted to shrink my windows 10 partition but because of “unmovable” files I was not able to shrink it. Searched forums and I found the utility “AOMEI Partition assistant”… it shrank my windows 10 partition no problem, but now when I boot I just get a grub> prmompt. If I had esc during boot I can choose to boot into windows 10 which seems to work fine. I opened up the partition manager in windows 10 and to my horror my Ubuntu partition is simply gone and it’s space and the space I freed from Windows 10 just says “Unallocated space”. Is there any chance my data is still lurking in there somewhere? Any hope for repair? I’m looking at losing 100+ hours of work. I’m going to lie on the floor and cry for a while.

Shrinking Item 0-1 Knapsack problem

I have encountered a variant of the knapsack problem with shrinking items.

Effectively, it is a 0-1 knapsack problem where the initial weight of each item is W(n)+V(n) and their value is V(N), but immediately after being put into the container the item shrinks by W(n). This means that for every item IN the knapsack, weight and value are the same. (It is therefore also possible to look at this as a value-irrelevant “best fill only” 0-1 knapsack.)

So, in this case, one also needs to determine the proper order of items to insert and whether a specific item is legal in the combination before being put in the container.

I have already determined that order of insertion, given a valid collection, should be based on W(n)+V(n) descending — but thus far I am failing to create a set of valid collections in anything under O(2^n).

Dynamic programming solutions are failing me both because of the apparent interdependence of elements which makes memoization seemingly impossible.

I realize I have not given much here, but I could really use some help. How does one go about approaching this variant?

If curious, the actual application is that we have a large number of different electrical appliances that all cause a known power surge when turned on and afterwards draw a set amount of power. We never want to trip a breaker, so the surge needs to be taken into account when figuring out how many at most we can turn on.

Shrinking a preallocated VMDK

I’m trying to shrink an 80GB preallocated CentOS VMDK that I’ve been given from a previous VMware environment, that I’ve been asked to get running on another host. The billing arrangement for this new running environment allows for the imported dick image to be no more than 50GB in size. Currently, only about 18GB has been used by the guest OS, leaving 62GB of “available disk space” on the VMDK.

Is there a procedure for shrinking a preallocated VMDK? I have of course considered creating a new VM from scratch at the correct size, but there is too much going on on the VM for the option to be feasible.

Any suggestions on shrinking the VMDK or cloning contents from one VMDK to a smaller VMDK would be much appreciated.


zoom in causes shrinking TPanel (FMX, Win32)

I’m using a TPanel to draw on (placing rectangles on it). It is set to Align to Client (fills up the form). I want to be able to zoom in on my drawing so I tried the following code:

PanelDrawingArea->Scale->X =  PanelDrawingArea->Scale->X / 1.1; PanelDrawingArea->Scale->Y =  PanelDrawingArea->Scale->Y / 1.1;   

This is no good for 2 reasons. 1) The TPanel (PanelDrawingArea) does not stay aligned to it’s Form client as you can see from the picture below. 2) The relationship between pixel distance on the Form and the scaled TPanel is no longer 1:1 so when i drag my little rectangles around the mouse “pulls away” from them instead of staying right with them.

enter image description here

I’m open to better direction if TPanel is not a good place to build a drawing.