database – Magento 2 Migration Error – Memory size allocated for the temporary table is more than 20% of innodb_buffer_pool_size

main.WARNING: Memory size allocated for the temporary table is more than 20% of innodb_buffer_pool_size. Please update innodb_buffer_pool_size or decrease batch size value (which decreases memory usages for the temporary table). Current batch size: 556; Allocated memory size: 28022400 bytes; InnoDB buffer pool size: 134217728 bytes. () ()

Reindex issue, No such entity error.

How to get navigation bar size in android using adb

In pixel, I want to know what is the size of my navigation bar using adb.

Is there any way to get.

jmonkeyengine – How to specify font size in nifty GUI when using ttf fonts

I’m trying to use a font with a larger size in a ttf file using nifty GUI. All questions and answers I’ve seen are concerned with making fonts in fnt fonts in a different size, but the size I want to use is actually included in the ttf file. I tried setting fontSize and size attributes with no effect (no errors but the font size does not change either)

Below is the xml excerpt where I’m trying to use the ttf font with a large size:

<control id="score"
font="Interface/Fonts/Kenney Future.ttf"/>

combinatorics – Is the number of sub-boolean algebras of a set with size of n equal to Bell(n)?

In boolean algebra (P(S),+,.,’) we must have S as 1 and {} as 0 in every possible sub-boolean algebra to hold id elements.
We must have S-x for every subset x⊆S to hold complements.
It seems like counting every possible partitions in S which is Bell(|S|) if i was not wrong.
For example the number of possible sub-boolean algebra of ⟨p({a,b,c,d}),∪,∩⟩ is Bell(4)=15 , is it right ?
If it is how we can define a bijection between every n class partitions to boolean algebra with size n ?

plotting – How can I make the size of the Ticks consistent with the size of the figure?

I wrote this code to help me manipulate the size of the figure along x and y (controlled byXZ,YZ) with possessing consistent Ticks but I left with one step which is to get rid of the green numbers without using White color. How can I do that?

TX(XZ_, YZ_) := Piecewise({{XZ/YZ, XZ >= YZ}, {1, XZ < YZ}})
s(j_, tl_) := Table({j i, j i, {0, -tl}, Black}, {i, -10^2, 10^2}); 
p(j_, ts_, ns_) := 
 Table({(j (i))/ns, "", {0, -ts}, Black}, {i, -10^2, 10^2});(*ns>1*)
ticks(j_, tl_, ts_, ns_) := ArrayFlatten({{s(j, tl)}, {p(j, ts, ns)}});
Tx(MSx_, Msz_, Ssz_, nSS_, XZ_, YZ_) := 
  ticks(MSx, Msz TX(XZ, YZ) , Ssz TX(XZ, YZ) , nSS);
System`PlotThemeDump`resolvePlotTheme({"mysty", x_Real, y_Real, YZ_, 
   XZ_}, _) :=
  {AspectRatio -> 1, 
  LabelStyle -> {FontSize -> 18, Black, 
    FontFamily -> "Times New Roman"},
    FrameStyle -> Directive({Black, Thickness(TX(YZ, XZ) x)}), 
    Frame -> True, 
    FrameTicksStyle -> {{Directive(Black, Thickness(TX(YZ, XZ) y)),  
       {Directive(Black, Thickness(TX(YZ, XZ) y)), Green}}}

With({XZ = 400, YZ = 200, sx = 3, sy = 1}, 
 Plot(Sin(z), {z, -2 Pi, 2 Pi}, FrameLabel -> {"X", "Y"}, 
  Axes -> False, PlotStyle -> Directive(Red), 
  ImageSize -> Automatic -> {XZ, YZ}, 
  FrameTicks -> {Tx(sx, 0.03, 0.015, 2 sx, XZ, YZ), 
    Tx(sy, 0.03, 0.015, 5 sy, YZ, XZ)}, 
  PlotTheme -> {"mysty", 0.003 , 0.003, YZ, XZ}, ImagePadding -> 80))    

enter image description here

computer vision – Size object image segmentation

I have 2 different datasets with similar objects, one where each object is 50 pixels wide and the other where they are 150 pixels. Each photo is 512×512 for both datasets. These two datasets have the same number of photos. Taken with the same camera, so same focal length, resolution etc…

So far, we agree that only the size of the objects differs.

I segment with U-net, for each dataset. It’s all right, I have good predictions.

For fun, I train with 150 pixels dataset and test on 50 pixels dataset, and vice versa.

Again, everything is fine, the results are bad so we deduce that the results are better when the size of the objects is similar. Logical.

  • Now I train my network on a dataset composed of both 50 and 150 pixels objects (half 50 and half 150), and in total the same number of images as before.

  • When I test my network on a set of images composed exclusively of 50 pixels objects (respectively 150), I get better results than when I trained my network using only 50 pixels object (resp 150)

Is this due to scale-(in)variant features issues? Is there a similar case you dealt with ?

Thanks a lot

web applications – Vector graphics are smaller in file size and more scalable than raster, why vector graphics are not used more often in web and mobile app development?

As in the topic. If yes – why, if no – why? I never seen it recommended in any android/web development tutorials to use vector graphics instead of your usual PNGs and JPGs and I find it odd.

I checked just now and eBay UK (as an example of a very popular and professionally made website) doesn’t accept SVG images as item images. Is it because technically it’s difficult to implement, or am I missing something here?

My other thought is that maybe if vector graphics were more popular, that could lead to people using their SMART TVs more often as a computer screen?

c – How to always allocate static array with size multiple of 32

Is there easy way to allocate such array to be always size of multiple of 32, without modifying actual define? The reasoning is that if my_data size is increased i want the buffers to be always multiple of 32 but enough to hold my_data but without manual recalculation of size. Ie. if “my data” is 52 i want buffer to be 64 and so on.

typedef struct 
    char one(5);
    uint16_t two(2);
    uint32_t three(1);

#define SIZE_OF_DATA sizeof(my_data_t)
uint8_t array(SIZE_OF_DATA);

Javascript split array into n subarrays, size of chunks don’t matter

NOTE: This post was moved from stackoverflow as codereview.stackexchange is a better place to discuss the performance of this code problem/solution.

I want to split an array into n subarrays.
I don’t care how many elements end up in each array but the elements must be spread through all the available sub arrays.

e.g: Solutions A & B are two ways of doing it but I’m looking for Solution A:

a = (1,2,3,4,5,6,7,8,9)

into_subarrays(a, 2);

  • Solution A => ((1,3,5,7,9),(2,4,6,8))
  • Solution B => ((1,2,3,4,5),(6,7,8,9))

into_subarrays(a, 4);

  • Solution A => ((1,5,9),(2,6),(3,7),(4,8))
  • Solution B => ((1,2,3),(4,5),(6,7),(8,9))

into_subarrays(a, 6);

  • Solution A => ((1,7),(2,8),(3,9),(4),(5),(6))
  • Solution B => ((1,2),(3,4),(5,6),(7),(8),(9))

into_subarrays(a, 12);

  • Solution A => ((1),(2),(3),(4),(5),(6),(7),(8),(9),(),(),())
  • Solution B => ((1),(2),(3),(4),(5),(6),(7),(8),(9),(),(),())

I have this solution, I just want to make sure it’s as efficient as possible:

into_subarrays(myArray, chunks=2){
  var a = myArray.slice(); //Copy array so that the original is not modified
  var i = 0;
  var result = ();
   //Create array if needed
   if (typeof result(i) == 'undefined'){
     result(i) = ();

   i = (i == chunks) ? 0 : i; //Wrap around chunk selector

  return result;


finder – How to reduce file size of multiple pictures in Photos app?

I have some pictures in Photos that I simply don’t need in the maximum quality my phone camera took them in. They’re usually about 2-4MB when ~200KB would suffice. I am looking for the best way to reduce the file size of these pictures when they are already in the Photos app.

I tried using the “Edit with Preview” options in Photos and then use “Reduce Size” in Preview, but apparently that is saved as a separate file and has no effect on the original image. And I haven’t found a way to ‘apply’ the edits to replace the original file.

Technically I could find the image in the Photos library in the Finder, but that is very time-consuming (and then I have to close Photos to edit the file). I’m not even aware of a way to quickly get from an image in the Photos overview to the file in the finder.

Any ideas?