linux – Files on encrypted LUKS take up more space

I have 2 drives (both the same size). One of them just has a simple ext4 partition on it. The other drive is encrypted with LUKS, opened and also formatted with ext4.

However, when I copy files from the unencrypted drive to the encrypted drive, they just take up more space.

For example, a folder on the unencrypted drive is 274G, while the same folder is 342G after I rsynced it to the encrypted drive. That’s a 25% increase in size.

What’s the cause of this steep increase in size? Is there anyway to alleviate that?

lebesgue integral – Condition for $f in L_p$ in a finite measure space

Let $X$ be a finite measure space, and $f$ a measurable function. Define $E_n = { x in X: (n-1) leq |f(x)| < n }$. In question 6.J from Bartle’s “Elements of Integration”, it is asked to show that $f in L_p mbox{iff} sum_{n=1}^infty n^p mu(E_n) < infty$. The first part of the question requires this proof for the particular case $p=1$. I couldn’t solve for the general case. Can anyone give any hints?

mesh – MeshRegion automatically merges vertices that are nearby in space

I sometimes work with surface meshes that have self-intersections (immersions rather than embeddings). MeshRegion usually doesn’t have any problems dealing with these kinds of surfaces, unless there are distinct vertices that have the same position in space. During the construction of a MeshRegion these vertices are automatically merged together (the problem remains if I import such a mesh), and this obviously messes with the combinatorics of the surface. Is there a way to disable this undesired “feature”?

Here is an example illustrating this problem:

n = 31;
uvs = Flatten(Table({i, j}/(n - 1), {i, 0, n - 1}, {j, 0, n - 1}), 1);

immersion({u_, v_}) := {Cos(2 (Pi) u), Sin(2 (Pi) u), v/4};
cylinderpts = immersion /@ uvs;

foldoverimmersion({u_, v_}) := {Cos(1/4 (Pi) (1 + 6 u))/(
   1 + Sin(1/4 (Pi) (1 + 6 u))^2), (
   Cos(1/4 (Pi) (1 + 6 u)) Sin(1/4 (Pi) (1 + 6 u)))/(
   1 + Sin(1/4 (Pi) (1 + 6 u))^2), v/4};
foldoverpts = foldoverimmersion /@ uvs;

idx({i_, j_}) := n (i - 1) + j;
faces = Map(idx, 
   Flatten(Table({{{i, j}, {i + 1, j}, {i, j + 1}}, {{i + 1, 
        j}, {i + 1, j + 1}, {i, j + 1}}}, {i, 1, n - 1}, {j, 1, 
      n - 1}), 2), {2});
meshfaces = Polygon /@ faces;

parameterM = MeshRegion(uvs, meshfaces)
cylinderM = MeshRegion(cylinderpts, meshfaces)
foldoverM = MeshRegion(foldoverpts, meshfaces)

MeshRegion automatically merges nearby vertices

The meshes parameterM, cylinderM, and foldoverM are constructed using the same list of faces, but running MeshCellCount yields

{961, 2760, 1800}
{930, 2730, 1800}
{930, 2730, 1800}

It might seem reasonable that the nearby vertices should be merged for the cylinder. On the other hand, the example where I extruded part of a lemniscate (foldoverM) the vertices are only merged if the grid width is divisible by 6 (since the parameterization I use has self intersections at u=1/6 and u=5/6).

hard drive – Macbook on OSX Catalina 10.15.7 not returning disk space after deletion

this started first of all when I was trying to get rid of purgeable space by creating lots of files using the dd if=blah blah of=/users/user/bigfiles/bigfile1 etc etc. When I deleted these files I didn’t get my disk space back. Even now deleting large video files has no effect.
I have tried all the usual tricks “First Aid” (in recovery mode) and all the disk checks I know how to do, booted into single user mode etc, and run utilities like ONYX, but even though it didn’t fix my disk it seemed to find something wrong. Can anyone please shed some light of the results?

Also some people have suggested this is a local Time machine backup issue so I deleted all my local backups and verified there are none there.

As you can see I have some errors when I scan disk Macintosh HD – Data, I get a bunch of

warning: xf: INO_EXT_TYPE_DSTREAM: found unexpected stream associated with non-regular file
and then
Too many warnings crap; suppressing subsequent ones

then a load of

warning; FOUND ORPHAN DSTREAM IDOBJECT (id 384942334 (or whatever) refcnt 1)
Too many warnings crap; suppressing subsequent ones

The volume /dev/rdisk2s1 appears to be ok

As you can then see from the next screen shot 478GB used and 600MB free

Rebooting into multi user mode I looked at the local snapshots.

I had already deleted all my local snapshots and can show there are none left with:

….and get nothing listed…

Next I run Daisydisk and you can see 0.5GB free so I scan the disk and see that:
498GB total used but if you add the items shown you only get approx 260GB so apparently 240GB has been eaten by the system and hidden somewhere.

Any ideas?

P.S. so I couldn’t work out how to insert multiple files (screen shots and a PDF) so here is a link to a Onedrive directory with them in it.

forms – Can a 2-column grid of info be acceptable if it mitigates an awkwardly large amount of white space?

enter image description here

I’m in the middle of a psuedo-overhaul of my company’s platform, with an emphasis on “object-level” pages (ie the page for an individual task, or individual appointment).

A problem I’m running into is that the info for many of these pages is laid out in a two-column format (see pic), which I know any competent ux designer will tell you is bad for scanning. But while combining both columns into one single left-aligned column might improve scannability, it would also leave just a gaping void of whitespace on the right portion of the page. I can’t really articulate any ux code this violates beyond just looking ridiculous and stark, but it still seems like an issue worth surfacing.

Any thoughts on this? I want to follow best practices but I also would like to preserve a sense of visual balance and appeal.


untagged – Does my hidden files (in android phone) get deleted if there is no enough space to restore them?

Stack Exchange Network

Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

python – Python3 – merge sort, O(n) space efficiency

Any critique of my implementation of Merge sort would be much appreciated! I tested it using a driver function (shown below), and everything works. However, it still feels unwieldy, I am a beginner so I really want to hear any criticisms, constructive or not 🙂

def inplace_merge_sort( lst, start = 0 , end = None ):
  def inplace_merge( lst1_start, lst1_end , lst2_start, lst2_end ): #needs to take in two sets of unsorted indices 
    start, end = lst1_start, lst2_end
    for _ in range( (end - start) ):
      if(lst(lst1_start) < lst(lst2_start)):
        lst1_start += 1

        lst.insert(lst1_start , lst(lst2_start))
        del lst(lst2_start + 1)
        lst1_start += 1
        lst2_start += 1

      if( lst1_start == lst2_start or lst2_start == lst2_end):

    return start, end #returns indices of sorted newly sublist

  if( len(lst) == 1 or len(lst) == 0): #catches edge cases
    return lst

  if end is None: end = len(lst) #so I don't have to input parameters on first call 

  length_sublist = end - start 

  if( length_sublist > 1):
    start1, end1 = inplace_merge_sort( lst, start, (end + start) // 2  )
    start2, end2 = inplace_merge_sort( lst, (end + start) // 2 , end  )
    return inplace_merge(start1, end1, start2, end2)

    return start, end

Here is the test function

def inplace_driver_helper(f_n):
  def modified_list_returner( lst ):
    return lst
  return modified_list_returner

def driver(f_n):
  # NICK I added these two test cases to catch some popular edge cases.
    assert f_n(()) == ()
    assert f_n((4)) == (4)

    assert f_n((1,2,3)) == (1,2,3)

    assert f_n((3,2,1)) == (1,2,3)

    assert f_n((1,2,3,1,2,3)) == (1,1,2,2,3,3)

    assert f_n((1,2,3,1,1,2,3)) == (1,1,1,2,2,3,3)

    assert f_n((-1,0,46,2,3,1,2,3)) == (-1,0,1,2,2,3,3,46)

and when we run this,

if __name__ == '__main__':


The output is ‘done’! Thank you.

Insufficient storage space & Insert SD card

I’m using a Meizu M6, and a newly bought Sandisk Ultra micro SD XC 64gb.
Internal storage is about 1.67 gb free out of 16gb.

For the record, I have already checked the wiki tags and similar topics, as well as format, remount, cache clear, and/or reboot, but none of them worked.

So my phone and desktop can detect my SD, but:

  1. everytime I tried to create an empty, new folder on my SD, it gave me the “insufficient storage space” message… despite being empty as a clean slate.

  2. everytime I tried to use the camera, it gave me the “insert SD card” message… despite being able to detect it earlier.

Yet I can create new folders and move items to my SD if I connect it to my PC with some card reader.

What might caused this? Any pointers?

How to prove that a set of numbers is a real vector space?

Given the following term:
2x+3y = 4 with addition and multiplication possible
How can I prove that this is a real vector space? I know that there are the 8 axioms I have to prove, but I dont understand how to do this with x and y in my term?

hard drive – Free space shown on Windows 10 (BOOTCAMP partition) does not correspond to the free space shown on Disk Utility

I’m not quite sure how this works, but yesterday I used Boot Camp Assistant to get Windows on my Mac. Somehow the space available on the C drive is 10 GB whilst in the Disk Utility it shows 18 GB of free space on it.

I checked with the space analyser in the wizard tool partition to see where all the space went to (I have partitioned 30 GB for the BOOTCAMP partition and haven’t done anything on Windows, yet I only have 10 GB left already), it does show that there is only 10 GB of free space, but I’m confused as to why Disk Utility is showing different data.

I’m a little anxious about this because my Mac has low storage space to begin with so I’m worried that I installed Windows and can’t use it.

Also, if anyone knows about methods to free up some space would be great help.