How do you determine a good set of breakpoints for srcset image sizes

My website right now is marginal for page loading speed on mobile. Originally written for desktop, I use a lot of images that are relatively high resolution, and only lightly compressed.

I’d like provide srcset images at various resolutions, but before I start, what are the optimum sizes, and how are they determined?

First approximation that occurs to me is (image as % of screen) * (viewport in pixels) and then calculate this for typical (and what is that, this week?) screen resolutions of desktop, tablet and phone.

On reflection, this approximation is naive.

  • Reducing the resolution of an image that’s too big will give better results than increasing one that is too small.

  • There aren’t really three situations to consider, but five, as both mobile and tablet can be use in either orientation. I don’t want the mobile user to have to slurp up new images when they rotate their phone. This isn’t as big a concern for tablets most of the time, as the bulk of tablet usage is on wifi.

  • Desktop usage has another factor: While screens have gotten wider, many users will have a browser up at less than full width. This one may not matter that much, as desktops have both the bandwidth and the processing speed to resize images.

  • Phones now come in a bewildering range of sizes and resolutions.

At present I’m looking at producing images at widths of 1300, 800, 500, 300 and setting cutoffs at 900 600 and 350, but this is little more than a WAG.

Duplicating ACKs and Window Sizes

After reading an answer at this link:

I am confused. Do ACK values repeat when a packet is lost or when an out of sequence packet is received? For example in the diagram, the ACK values are same at the 12th and 13th segment. However, there’s a drastic change in the window size. What exactly is the link? enter image description here

Duplicate ACKs and Window Sizes

After reading the answer here,

I am a bit confused. Do ACK values repeat if a packet is lost or when an out of sequence packet is received? For example in the diagram, the ACK values are same at the 12th and 13th segment. However, there’s a drastic change in the window size. What exactly is the link?

enter image description here

Is there a way to make the default image sizes refer to the full-sized file?

I’m offloading all media files to S3 and serving them through Imgix, who perform all compression/resizing on the fly. To prevent WP from producing extra files, I’ve removed the default image sizes completely using filters:

// Prevent any image sizes from being created at the time of upload/regeneration. add_filter( 'intermediate_image_sizes', '__return_empty_array', PHP_INT_MAX ); add_filter( 'intermediate_image_sizes_advanced', '__return_empty_array', PHP_INT_MAX ); 

However, what I’d really like is for the sizes to exist but remain pointed to the full-sized file, with a query string that tells Imgix to resize it, eg for an 800px image, preferably taking the value from what’s been entered on the Media settings screen.

Is this possible?

Why do memory dump sizes on some machines not correlate with the amount of RAM?

I’m using winpmem to do some memory dumps. I did a test run on my workstation and the files was about 32GB, exactly what I expected since I have 32 gigs of RAM. However, on other machines the output file (aaf4 format) is much larger. It does not seem to correlate to RAM + Pagefile either. What determines this file size? Some of these are VMs, if it matters.

Are there limits to object Sizes when a character uses Metamorphosis?

I intend to use an NPC to make him attack a vessel. The NPC is capable of using Metamorphosis as a multiclass Ardent 7, manifester level 11. My idea was to make her metamorph into a flying creature, fly directly above the vessel and then turn into a huge rock, crushing the deck and part the hull.

The vessel in question is a Dromond, I use “Stormwrack”, for sinking the vessel 15 hull sections (each a 10 feet cubes) would have to be crushed, each with hardness 5 and 80 hp. The Dromond has a 20 feet by 100 feet space. The whole ship has AC -3, attacking a hull section is AC 2.

My problem is to assess the power of my imagined kind of attack. Metamorphosis says:

You can also use this power to assume the form of an inanimate object. You gain the object’s hardness and retain your own hit points. You can take the shape of almost any simple object you can think of, such as a chair, a sword, or a rug. (…) You cannot use this power to assume the form of a psionic item or a magic item, or any object with a hardness of 15 or higher. (…)As an inanimate object, you lose all mobility. You retain your normal senses and your abi lity to speak. You can manifest a power if you make a Concentration check (DC 20 + power level); however, doing so ends the duration of this power. If you take damage while in the form of an object,your actual body also takes damage (but the object’s hardness, if any, protects you). Expanded Psionics Handbook, p. 117

Stone does have hardness 8, so turning into a rock is possible. The NPC would take falling damage minus 8 points of hardness. But how much damage would the ship take? The NPC could turn into a 11 HD creature – but there seems to be no limit regarding objects.

An inch of stone in a 5×5 feet square has 15 hp. (PHB, p.166) The character has 117 hp. The manifester retains her hp. So maybe you could say she could turn into a stone slab of 5 feet by 5 feet 7 inches thick. This slab would have 105 hp. You could transform it into a stone ball of roughly 3 feet diameter. This is a massive boulder – but just how massive in terms of damage?

A granite ball of 3 feet diameter would weigh roughly 1,16 tons. This is more than 11 times 200 lb, so the DMG section for falling objects applies: This boulder causes 11d6 points of damage on a 10 foot fall, for a 100 feet fall 20 d6 damage would be applied to the ship and 9d6 of damage to the NPC (minus 8 pts of hardness).

While this seems reasonable, I am still wondering: Are any or these specific limits inherent to the power or could you just use Metamorphosis to say “I turn into a mountain” and bury the ship?

Assign n people to m rooms of different sizes, such that noone is alone and people are in largest rooms possible

I’m looking for an efficient way to assign n people to m rooms in a very specific way.


The program receives two sets of people (set of males and set of females), as well as a set of available rooms (rooms can have different sizes, ranging from 2 to 6).


The algorithm must assign people to the rooms in a way, that:

  • Males can be in a room with only males (same for females)
  • Noone can be alone
  • The algorithm must maximize groups (one room of 4 is preferred over 2 rooms of 2, etc)


The algorithm must return the assignment

I’ve tried to do it, but all of the sollutions I come up with are at least O(n^3). Does anyone know an efficient way to do this?

Why isn’t my code working for WordPress adding different image sizes?

// Theme Setup

function custom_theme_setup() {

// Navigation Menus register_nav_menus(array( ‘primary’ => __(‘Primary Menu’), ‘footer’ => __(‘Footer Menu’), ));

// Add featured image support add_theme_support(‘post-thumbnails’); add_image_size(‘small-thumbnail’, 180, 120, true); add_image_size(‘banner-image’, 920, 210, true); }

add_action(‘after_setup_theme’, ‘custom_theme_setup’);