How to achieve a custom post type permalink like this!

How to achieve a custom post type permalink like this!

download

download

Thanks

c – Knuth MMIXware bug: Is this a good way to achieve atomicity?

I noticed that Knuth’s pipelined implementation of MMIX
contains a serious bug in the implementation of CSWAP.
The issue is that while the implementation ensures that CSWAP is uninterruptible,
it fails to ensure atomicity.
This is because it does not hold the memory lock at all times between load and store.

I have attempted to solve this issue, and I would like to know if I have made any errors.

The following changes would have to be made to MMIX-PIPE (note that is used to denote omitted code, the extent of which should be obvious, and additions are delimited by /*B*/ and /*E*/; a copy of MMIXware is required to follow along):

§117 (special cases of instruction dispatch):

case cswap: cool->ren_a = true;  
  spec_install(cool->xx >= cool_G? &g(cool->xx) :
                                   &l((cool_O.l + cool->xx) & lring_mask),  
               &cool->a);
  /* cool->i = pst; */
  // Deleted because we're doing more special-casing than before.
⋮
case pst: cool->mem_x = true, spec_install(&mem, &cool->x)/*B*/,
  cool->hist = 0/*E*/; break;
// for stores, hist records whether z contains the physical address or not.
⋮

§144 (finish execution of operation):

fin_ex: if(data->ren_x) data->x.known = true;
  else if(data->mem_x /*B*/ || data->i == cswap /*E*/) { // Needed due to changes
    data->x.known = true;
    if(!(data->x.addr.h & 0xffff0000)) data->x.addr.l &= -8;
  }
⋮
  if(data->interrupt & 0xffff) { /* insert §307 interrupt at end of exec */ }
  /*B*/
  if(data->i == cswap) {
    if(data->mem_x) {
      startup(&mem_locker, mem_write_time);
      // we have already locked the bus and written the address,
      // so only lock for memory write time.
      if(data->x.addr.h & 0xffff0000) spec_write(data->x.addr, data->x.o, 3);
      else mem_write(data->x.addr, data->x.o);
      data->mem_x = false;
    } else release_lock(&mem_locker, mem_lock);
    // we don't have to write this time
    mem_slots++;
    spec_rem(&data->x);
    // we don't want to write this again, this bypassed the cache
  }
  /*E*/
⋮

§265 (cases to compute virtual address of memory operation):

⋮
case ld: case ldunc: case ldvts: case st:
case pst: case syncd: case syncid: /*B*/ case cswap: /*E*/
// Because of change to 117, this is needed.
⋮

§267 (look up address in DT-cache, also D-cache if possible):

p = cache_search(DTcache, trans_key(data->y.o));
if(!Dcache || Dcache->lock || (j = get_reader(Dcache)) < 0 ||
   (data->i > st && data->i <= syncid) /*B*/ || data->i == cswap /*E*/) {
  // insert §270 do load/store stage 1 without D-cache lookup
}
⋮

§269 (check protection bits and get physical address):

⋮
data->z.o = phys_addr(data->y.o, data->z.o);
data->hist = 1;

§270 (do load/store stage 1 without D-cache lookup):

⋮
if(data->i >= st && data->i <= syncid) data->state = st_ready;
/*B*/ else if(data->i == cswap) data->state = 36; /*E*/
// wait for stores to same or similar memory address
else {
  m = write_search(data, data->z.o);
  if(m && m != DUNNO) data->x.o = m, data->state = ld_ready;
  else data->state = dt_hit;
}
⋮

§271 (load/store stage 1 with known physical address):

⋮
data->hist = 1;
if(data->i == cswap) goto await_stores;
if(data->z.o.h & 0xffff0000) {
  switch(data->i) {
⋮
  case pst:
    /* if((data->op ^ CSWAP) <= 1) {
      data->x.o = spec_read(data->z.o, 3);
      goto make_ld_ready;
    } */
    data->x.o = zero_octa;
⋮

§272 (special cases for later stages: data translation cache):

⋮
if(data->i >= st && data->i <= syncid) goto finish_store;
if(data->i == cswap) goto await_stores;

§280 (special cases for later stages: finish store):

⋮
case st: case pst: /*B*/ case cswap: /*E*/ // insert §281 finish store command
⋮

§283 (finish a CSWAP):

if(data != old_hot) wait(1);
if(data->x.o.h == g(rP).o.h && data->x.o.l == g(rP).o.l) {
  data->a.o.l = 1;
  data->x.o = data->b.o;
} else {
  g(rP).o = data->x.o;
  if(verbose & issue_bit)
    printf(" setting rP="), print_octa(g(rP).o), putchar('n');
  /*B*/ data->mem_x = false; /*E*/
}
/* data->i = cswap; */
// deleted because unnecessary
goto fin_ex;

§357 (wait while unfinished load ahead):

⋮
if(cc->owner && (cc->i == ld || cc->i == ldunc || cc->i == pst /*B*/ || cc->i == cswap /*E*/)) wait(1);
⋮

§364 (special cases for states in later stages: syncd and syncid):

⋮
if(/*B*/ data->i != cswap && /*E*/ ((data->b.o - 1) & ~data->y.o) < data->xx)
  interim = true;
// cswap is never interim
⋮
if(data->interim) { /* insert §369 continue on next cache block */ }
/*B*/ if(data->i == cswap) goto avoid_deadlock;

§368 (use cleanup on the cache blocks for data->z.o, if any):

⋮
clean_ctl.x.o.h = data->i == cswap? sign_bit : data->loc.h & sign_bit;
// For cswap, let's always invalidate that cache.
⋮

§389 (NEW) (special cases for states in later stages: await stores)

/* §272 += */
await_stores: data->state = 36;
case 36: {
  tetra mask = -(data->z.o.h & 0xffff0000? 8 :
                 Scache? Scache->bb : Dcache? Dcache->bb : 8);
  // Anything in the same cache line. 
  // If it's more than 48 bits, it's uncached, so just the octa.
  coroutine *cc = data;
  while(cc != hot) {
  if(cc == reorder_top) cc = reorder_bot;
  else cc++;
  if(cc->owner && (cc->i == st || cc->i == pst || cc->i == cswap) &&
     (!cc->hist || (cc->z.o.h == data->z.o.h &&
       !((cc->z.o.l ^ data->z.o.l) & mask))))
    wait(1);
  // If it's a store and we don't know the physical address,
  // we don't know the cache line.
  // Hence, we assume it might be ours.
  }
  goto do_syncd;
}

§390 (NEW) (special cases for later stages: avoid deadlocking in CSWAP):

/* §272 += */
avoid_deadlock: data->state = 37;
case 37: {
  control *cc = data;
  while(cc != hot) {
    if(cc == reorder_top) cc = reorder_bot;
    else cc++;
    if(cc->owner && (cc->i == ld || cc->i == ldunc ||
                     cc->i == pst || cc->i = cswap) && !cc->x.known)
      wait(1);
    // If cc is a load or partial store, then we must not load before them;
    // otherwise they would wait for us to finish with the memory
    // at the same time as we waited for them to be committed.
  }
  data->state = 38;
  // we split this up to be slightly more efficient;
  // once we no longer have to fear deadlock,
  // there's no point checking for it again.
}
case 38: if(mem_lock) wait(1);
  data->x.o = data->z.o.h & 0xffff0000? spec_read(data->z.o, 3) :
                                        mem_read(data->z.o);
  set_lock(&mem_locker, mem_lock);
  data->state = st_ready;
  // we don't need to pass through ld_ready, we aren't locking anything
  wait(mem_addr_time + mem_read_time);

I’m really sorry the question is so long; I promise it’s the shortest I could get it.

Is this a good way to achieve atomicity?

I noticed that Knuth’s pipelined implementation of MMIX
contains a serious bug in the implementation of CSWAP.
The issue is that while the implementation ensures that CSWAP is uninterruptible,
it fails to ensure atomicity.
This is because it does not hold the memory lock at all times between load and store.

I have attempted to solve this issue, and I would like to know if I have made any errors.

The following changes would have to be made to MMIX-PIPE (note that is used to denote omitted code, the extent of which should be obvious, and additions are delimited by /*B*/ and /*E*/; a copy of MMIXware is required to follow along):

§117 (special cases of instruction dispatch):

case cswap: cool->ren_a = true;  
  spec_install(cool->xx >= cool_G? &g(cool->xx) : &l((cool_O.l + cool->xx) & lring_mask),  
               &cool->a);  
  /* cool->i = pst; */
  // Deleted because we're doing more special-casing than before.
⋮
case pst: cool->mem_x = true, spec_install(&mem, &cool->x), cool->hist = 0; break;
// for stores, hist records whether z contains the physical address or not.
⋮

§144 (finish execution of operation):

fin_ex: if(data->ren_x) data->x.known = true;
  else if(data->mem_x /*B*/ || data->i == cswap /*E*/) { // Due to changes, this is necessary.
    data->x.known = true;
    if(!(data->x.addr.h & 0xffff0000)) data->x.addr.l &= -8;
  }
⋮
  if(data->interrupt & 0xffff) { /* insert §307 handle interrupt at end of execution */ }
  /*B*/
  if(data->i == cswap) {
    if(data->mem_x) {
      startup(&mem_locker, mem_write_time);
      // we have already locked the bus and written the address,
      // so only lock for memory write time.
      if(data->x.addr.h & 0xffff0000) spec_write(data->x.addr, data->x.o, 3);
      else mem_write(data->x.addr, data->x.o);
      data->mem_x = false;
    } else release_lock(&mem_locker, mem_lock);
    // we don't have to write this time
    mem_slots++;
    spec_rem(&data->x);
    // we don't want to write this again, this bypassed the cache
  }
  /*E*/
⋮

§265 (cases to compute virtual address of memory operation):

⋮
case ld: case ldunc: case ldvts: case st:
case pst: case syncd: case syncid: /*B*/ case cswap: /*E*/
// Because of change to 117, this is needed.
⋮

§267 (look up address in DT-cache, also D-cache if possible):

p = cache_search(DTcache, trans_key(data->y.o));
if(!Dcache || Dcache->lock || (j = get_reader(Dcache)) < 0 ||
   (data->i > st && data->i <= syncid) /*B*/ || data->i == cswap /*E*/) {
  // insert §270 do load/store stage 1 without D-cache lookup
}
⋮

§269 (check protection bits and get physical address):

⋮
data->z.o = phys_addr(data->y.o, data->z.o);
data->hist = 1;

§270 (do load/store stage 1 without D-cache lookup):

⋮
if(data->i >= st && data->i <= syncid) data->state = st_ready;
/*B*/ else if(data->i == cswap) data->state = 36; /*E*/
// wait for stores to same or similar memory address
else {
  m = write_search(data, data->z.o);
  if(m && m != DUNNO) data->x.o = m, data->state = ld_ready;
  else data->state = dt_hit;
}
⋮

§271 (load/store stage 1 with known physical address):

⋮
data->hist = 1;
if(data->i == cswap) goto await_stores;
if(data->z.o.h & 0xffff0000) {
  switch(data->i) {
⋮
  case pst:
    /* if((data->op ^ CSWAP) <= 1) {
      data->x.o = spec_read(data->z.o, 3);
      goto make_ld_ready;
    } */
    data->x.o = zero_octa;
⋮

§272 (special cases for later stages: data translation cache):

⋮
if(data->i >= st && data->i <= syncid) goto finish_store;
if(data->i == cswap) goto await_stores;

§280 (special cases for later stages: finish store):

⋮
case st: case pst: /*B*/ case cswap: /*E*/ // insert §281 finish store command
⋮

§283 (finish a CSWAP):

if(data != old_hot) wait(1);
if(data->x.o.h == g(rP).o.h && data->x.o.l == g(rP).o.l) {
  data->a.o.l = 1;
  data->x.o = data->b.o;
} else {
  g(rP).o = data->x.o;
  if(verbose & issue_bit) printf(" setting rP="), print_octa(g(rP).o), putchar('n');
  /*B*/ data->mem_x = false; /*E*/
}
/* data->i = cswap; */
// deleted because unnecessary
goto fin_ex;

§357 (wait while unfinished load ahead):

⋮
if(cc->owner && (cc->i == ld || cc->i == ldunc || cc->i == pst /*B*/ || cc->i == cswap /*E*/)) wait(1);
⋮

§364 (special cases for states in later stages: syncd and syncid):

⋮
if(/*B*/ data->i != cswap && /*E*/ ((data->b.o - 1) & ~data->y.o) < data->xx) interim = true;
// cswap is never interim
⋮
if(data->interim) { /* insert §369 continue on next cache block */ }
/*B*/ if(data->i == cswap) goto avoid_deadlock;

§368 (use cleanup on the cache blocks for data->z.o, if any):

⋮
clean_ctl.x.o.h = data->i == cswap? sign_bit : data->loc.h & sign_bit;
// For cswap, let's always invalidate that cache.
⋮

§389 (NEW) (special cases for states in later stages: await stores)

/* §272 += */
await_stores: data->state = 36;
case 36: {
  tetra mask = -(data->z.o.h & 0xffff0000? 8 : Scache? Scache->bb : Dcache? Dcache->bb : 8);
  // Anything in the same cache line. 
  // If it's more than 48 bits, it's uncached, so just the octa.
  coroutine *cc = data;
  while(cc != hot) {
  if(cc == reorder_top) cc = reorder_bot;
  else cc++;
  if(cc->owner && (cc->i == st || cc->i == pst || cc->i == cswap) &&
     (!cc->hist || (cc->z.o.h == data->z.o.h && !((cc->z.o.l ^ data->z.o.l) & mask))))
    wait(1);
  // If it's a store and we don't know the physical address, we don't know the cache line.
  // Hence, we assume it might be ours.
  }
  goto do_syncd;
}

§390 (NEW) (special cases for later stages: avoid deadlocking in CSWAP):

/* §272 += */
avoid_deadlock: data->state = 37;
case 37: {
  control *cc = data;
  while(cc != hot) {
    if(cc == reorder_top) cc = reorder_bot;
    else cc++;
    if(cc->owner && (cc->i == ld || cc->i == ldunc || cc->i == pst || cc->i = cswap) && !cc->x.known)
      wait(1);
    // If cc is a load or partial store, then we must not load before them;
    // otherwise they would wait for us to finish with the memory at the same time as we
    // waited for them to be committed.
  }
  data->state = 38;
  // we split this up to be slightly more efficient;
  // once we no longer have to fear deadlock, there's no point checking for it again.
}
case 38: if(mem_lock) wait(1);
  data->x.o = data->z.o.h & 0xffff0000? spec_read(data->z.o, 3) : mem_read(data->z.o);
  set_lock(&mem_locker, mem_lock);
  data->state = st_ready; // we don't need to pass through ld_ready, we aren't locking anything
  wait(mem_addr_time + mem_read_time);

I’m really sorry the question is so long; I promise it’s the shortest I could get it.

How do i achieve the rings beauty and color :

How do i achieve the rings beauty and color of diamonds and not overwhitened without lowering the camera’s light and having the hand look better ( hand becomes too dark) Wanted ring's effect but hands are too dark..

network – You are in charge of the security of a very small company. What steps would you follow to achieve a good security level?

first of all, I would like to admit that I belong to the offensive side of security (Penetration Testing) and this is not my common area of expertise.

Last week I was thinking about how the market usually provides services focused on medium/big companies. On one hand, it makes sense, bigger company = more money but, on the other, it annoys me how unfair is that the smallest and modest companies are not an area of interest for the main business.

So, if you had to create a budget model for every small company, what would be the least principles to follow if we take into account the following premises:

  • Company with UP to 10 people, this means that in total there will be 10 workstations
  • This company did not buy yet any hardware as FW or SW
  • This is a simple company that
  • There is no plan on scalability/ company growing, therefore thinking of a centralised solution as an AD would probably be meaningless
  • A wifi AP would be nice, but not mandatory
  • There will be at most 1 or 2 servers exposing DB services (or something similar)
  • The people in the company should be able to access somehow the DB service when they work at home (OpenVPN)

My penetration testing mindset came with these recommendations:

  • Create an inventory of every element that has connection capabilities and which is intended to be used
  • Assess the password security policy and adapt it accordingly
  • Create a golden image or similar that will be installed on every WS computer, this image should bring effective hardening adapted to the business.
  • Assess the security of the servers installed, this includes the services exposed, avoid cleartext protocols,outdated/deprecated versions…
  • Create a VPN server that implements MFA
  • Ensure that the HDDs are encrypted
  • Educate the users

I know that is not perfect and these are the topics where I might find some confusion:

  • A security policy/ threat model has to be created. But I have no clue about how to do that. What is a good starting point?
  • Does the use of a SOC makes any sense in this context?
  • Would it be needed to hire a part-time sysadmin?
  • In terms of network topology, my idea was something like this:
    enter image description here

I know that it might be bad but honestly, I did not find any “golden” rule about how to create effective network diagrams. I simply adapted what I saw on the internet + experience

Finally, I would like to add that even though this looks like an enormous and wide question, it is actually not that wide. Lots of small companies have to deal with this problem which is not easy to solve. From my perspective (that has nothing to do with seceng) I have seen a lot of obscurity on this topic particularly for people with 0 security knowledge as if the industry was specifically interested in not providing clear answers.

Thanks to everyone.

astrophotography – How can I achieve more clarity in my photos of the moon?

Some possible reasons, arranged in the likely order of influence, for the lack of clarity in the example photo:

1) The optical limits of your lens. The EF 100-300mm f/4.5-5.6 was released as a budget telephoto zoom lens in 1990 at the dawn of the EOS era. Compared to the current EF-S 55-250mm f/4-5.6 STM, at the longest focal lengths and widest apertures there’s a significant difference in sharpness.

35mm film is much less demanding of a lens in terms of resolution than modern digital sensors such as the one in your 20MP 70D. From an answer to a question about the difference between “digital lenses” and “film lenses”¹:

Although not universally the case, most lenses designed and introduced during the digital age are better than their older film era counterparts, especially in the consumer and mid grade sectors. Manufacturers of the top tier lenses have also been forced to introduce newer versions of old classics. The new consumer lenses may not be as good as the old “L” glass (but sometimes they get close), but they are much better than yesterdays consumer lenses. Especially zoom lenses which have benefited tremendously from computer aided design and modeling. What used to take weeks or even months to test by making a physical prototype can now be accomplished in a few hours using supercomputer simulation.

Users of digital cameras tend to expect more out of their lenses due to primarily two factors:

  • Digital sensors are perfectly flat. Film isn’t. Some of the most expensive film cameras actually had mechanisms that created a vacuum behind the film to aid it in laying as flat as possible while being exposed. Even then, with color film the emulsion layer for each color was at a slightly different depth. So if focus was perfect for one color, it would be slightly off for the other two!
  • Pixel peeping has raised expectations to a ridiculous level. Take a 20MP image and display it at 100% (1 pixel per screen pixel) on an ≈23 inch HD (1920×1080) monitor and the magnification is equivalent to printing at 56×37 inches! No one expected a 35mm consumer grade lens to be perfect at 56×37! But a lot of folks now seem to.

2) Shooting a very dim object that is moving across the frame. One second is far too long to expose the moon using a 300mm focal length without a tracking mount if one is going to critically look at the image at 100% magnification. At 100%, it is easy to see the trails of the two bright stars in your example photo. The moon is also blurred by approximately the same amount of movement.² The moon is not normally a dim object, so we usually do not need to worry about our shutter times being too slow. Even though we usually shoot it at night, the moon’s surface is being directly illuminated by the sun. At ISO 100 and f/8, we would normally expose the moon for about 1/125-1/250 second. But during a total eclipse, when the earth blocks the sun’s direct light from illuminating the moon, the moon’s surface gets a LOT darker.³ The earth still rotates at the same rate underneath the sky. The reduced brightness pushes us into a very tight corner regarding how to collect enough light for a usable image without the apparent motion of the moon making it blurry. The most obvious solution is to use a wider aperture – if one is available. But even moving from, say, f/8 to f/2.8 only gains us three of the thirteen-plus stop difference between a full moon and totality. Going from 1/250 second to 1/15 second only gains another four stops and at 300mm we are already going to start seeing motion blur when pixel peeping. At that point we’re still about 3-6 stops dimmer than when the moon is full. Going from ISO 100 to ISO 1600 gets us back in the ballpark, but we have given up a lot in terms of clarity due to:

  • The much slower shutter time allows some motion blur
  • The wider aperture (most lenses are sharper stopped down than when used wide open)
  • The higher noise associated with using higher amplification (ISO) to make up for less light entering the camera, and the resulting noise reduction we use.

3) Atmospheric interference. If you were shooting from the location indicated in your user profile, the moon was fairly low on the horizon at the time. Just as the sun is much more distorted by the earth’s atmosphere at sunrise and sunset than when it is high in the sky, so is the moon. Not only is the light having to travel further at an angle through the ocean of air surrounding our planet, but the temperature differentials near the terminator (the line between daylight and dark) tend to increase atmospheric turbulence in the times around dawn and dusk.

4) Letting the camera make all of the decisions about how to process the raw data from the sensor. This is particularly the case with a dim object, such as the moon during totality, that is moving across the frame. This limits our exposure time. Most great moon photos (when it is not in the earth’s shadow) you see are saved in a raw file format and post-processed to fine tune the contrast between darker and lighter areas on the surface of the moon. Color temperature and white balance adjustments, sharpening, and in some cases even digitally applied color filters, can bring out the contrast between different areas of the moon. This is even more critical when the photo in question is taken during a total eclipse.

5) The noise reduction applied to using ISO 1000 with a Canon EOS camera. I’m a Canon shooter because, overall, Canon works for what I do. Every system, though, has advantages and disadvantages. One of the things where Canon falls a little short is in the way their cameras handle the “partial” stop ISO settings. For a comprehensive look at how Canon cameras handle the “partial stop” ISO settings and why using the “+1/3 stop” ISO settings (such as ISO , 250, 500, 1000, 2000, etc.) can make your photos noisier than other ISO settings that are even higher, please see Is it really better to shoot at full-stop ISOs?. The amount of NR the camera applies to ISO 1000 by default will reduce the detail in the image.

¹ Back near the beginning of the consumer digital SLR era, APS-C only lenses were often marketed as “digital” lenses.

² The moon moves roughly 1/2° less per hour than the stars as viewed from the earth’s surface. That also happens to be approximately the moon’s angular size in the sky. So for a one second exposure, the moon would move across the frame 1/3600 of its own diameter less than the nearby stars would during the same exposure.

³ This article from Space.com says anywhere from 10,000 to 100,000 times dimmer, depending on the earth’s atmospheric conditions. That’s between 13 and 17 stops darker than a full moon!

How do i SEO my website to achieve this kind of google search result [duplicate]

enter image description here

I want to achieve this kind of google search result for my website. And it’s custom path. Right now i am using SPA framework. Is there any way i can achieve this using server side coding.

But my main question is, what do i look for to start learning about this. I know SPA is the worst option for google SEO. but i starting making website via WordPress how to i achieve this kind of search result for all my main internal pages of my website.

applications – How to achieve Dynamic code Loading in Android?

Objective:

I have an android application (main) from which I want to download (jar, apk, or any sort of package) and load the package dynamically and start the main activity of my loaded package from my main application.

The solutions I have tried:

I have followed this blog post and try to load the app using DexClassLoader
https://medium.com/@kalpeshchandora12/dynamic-code-loading-in-android-dea83ba3bc85#:~:text=DCL(Dynamic%20code%20loading)%20allows,location%20and%20executed%20at%20runtime.
I am able to follow all the step and able to load the class from the downloaded apk, now I don’t
know how to call the main activity of the loaded apk.

I have followed this plugin(https://github.com/DroidPluginTeam/DroidPlugin), which is telling me that I can dynamically load the apk from the server, and then I can install it in the background and then can run it by any communication method (broadcasting, AIDL, etc.) but while following the plugin, I have encountered an error (sort of I/O error while opening APK), it’s not able to open my apk for installation.

I don’t know if whatever I tried is correct or not and I am not an android guy, instead, I am a unity guy and trying to run my games (I have almost 50) within android applications. There is no choice of loading the game statically in the android project because it severely increases the size.

Please recommend me an approach to achieve this task or if anyone can guide me on how to solve the problems that I am facing.

astrophotography – How can I achieve more clarity in my photos of the moon?

Some possible reasons, arranged in the likely order of influence, for the lack of clarity in the example photo:

1) The optical limits of your lens. The EF 100-300mm f/4.5-5.6 was released as a budget telephoto zoom lens in 1990 at the dawn of the EOS era. Compared to the current EF-S 55-250mm f/4-5.6 STM, at the longest focal lengths and widest apertures there’s a significant difference in sharpness.

35mm film is much less demanding of a lens in terms of resolution than modern digital sensors such as the one in your 20MP 70D. From an answer to a question about the difference between “digital lenses” and “film lenses”¹:

Although not universally the case, most lenses designed and introduced during the digital age are better than their older film era counterparts, especially in the consumer and mid grade sectors. Manufacturers of the top tier lenses have also been forced to introduce newer versions of old classics. The new consumer lenses may not be as good as the old “L” glass (but sometimes they get close), but they are much better than yesterdays consumer lenses. Especially zoom lenses which have benefited tremendously from computer aided design and modeling. What used to take weeks or even months to test by making a physical prototype can now be accomplished in a few hours using supercomputer simulation.

Users of digital cameras tend to expect more out of their lenses due to primarily two factors:

  • Digital sensors are perfectly flat. Film isn’t. Some of the most expensive film cameras actually had mechanisms that created a vacuum behind the film to aid it in laying as flat as possible while being exposed. Even then, with color film the emulsion layer for each color was at a slightly different depth. So if focus was perfect for one color, it would be slightly off for the other two!
  • Pixel peeping has raised expectations to a ridiculous level. Take a 20MP image and display it at 100% (1 pixel per screen pixel) on an ≈23 inch HD (1920×1080) monitor and the magnification is equivalent to printing at 56×37 inches! No one expected a 35mm consumer grade lens to be perfect at 56×37! But a lot of folks now seem to.

2) Shooting a very dim object that is moving across the frame. One second is far too long to expose the moon using a 300mm focal length without a tracking mount if one is going to critically look at the image at 100% magnification. At 100%, it is easy to see the trails of the two bright stars in your example photo. The moon is also blurred by approximately the same amount of movement.² The moon is not normally a dim object, so we usually do not need to worry about our shutter times being too slow. Even though we usually shoot it at night, the moon’s surface is being directly illuminated by the sun. At ISO 100 and f/8, we would normally expose the moon for about 1/125-1/250 second. But during a total eclipse, when the earth blocks the sun’s direct light from illuminating the moon, the moon’s surface gets a LOT darker.³ The earth still rotates at the same rate underneath the sky. The reduced brightness pushes us into a very tight corner regarding how to collect enough light for a usable image without the apparent motion of the moon making it blurry. The most obvious solution is to use a wider aperture – if one is available. But even moving from, say, f/8 to f/2.8 only gains us three of the thirteen-plus stop difference between a full moon and totality. Going from 1/250 second to 1/15 second only gains another four stops and at 300mm we are already going to start seeing motion blur when pixel peeping. At that point we’re still about 3-6 stops dimmer than when the moon is full. Going from ISO 100 to ISO 1600 gets us back in the ballpark, but we have given up a lot in terms of clarity due to:

  • The much slower shutter time allows some motion blur
  • The wider aperture (most lenses are sharper stopped down than when used wide open)
  • The higher noise associated with using higher amplification (ISO) to make up for less light entering the camera, and the resulting noise reduction we use.

3) Atmospheric interference. If you were shooting from the location indicated in your user profile, the moon was fairly low on the horizon at the time. Just as the sun is much more distorted by the earth’s atmosphere at sunrise and sunset than when it is high in the sky, so is the moon. Not only is the light having to travel further at an angle through the ocean of air surrounding our planet, but the temperature differentials near the terminator (the line between daylight and dark) tend to increase atmospheric turbulence in the times around dawn and dusk.

4) Letting the camera make all of the decisions about how to process the raw data from the sensor. This is particularly the case with a dim object, such as the moon during totality, that is moving across the frame. This limits our exposure time. Most great moon photos (when it is not in the earth’s shadow) you see are saved in a raw file format and post-processed to fine tune the contrast between darker and lighter areas on the surface of the moon. Color temperature and white balance adjustments, sharpening, and in some cases even digitally applied color filters, can bring out the contrast between different areas of the moon. This is even more critical when the photo in question is taken during a total eclipse.

5) The noise reduction applied to using ISO 1000 with a Canon EOS camera. I’m a Canon shooter because, overall, Canon works for what I do. Every system, though, has advantages and disadvantages. One of the things where Canon falls a little short is in the way their cameras handle the “partial” stop ISO settings. For a comprehensive look at how Canon cameras handle the “partial stop” ISO settings and why using the “+1/3 stop” ISO settings (such as ISO , 250, 500, 1000, 2000, etc.) can make your photos noisier than other ISO settings that are even higher, please see Is it really better to shoot at full-stop ISOs?. The amount of NR the camera applies to ISO 1000 by default will reduce the detail in the image.

¹ Back near the beginning of the consumer digital SLR era, APS-C only lenses were often marketed as “digital” lenses.

² The moon moves roughly 1/2° less per hour than the stars as viewed from the earth’s surface. That also happens to be approximately the moon’s angular size in the sky. So for a one second exposure, the moon would move across the frame 1/3600 of its own diameter less than the nearby stars would during the same exposure.

³ This article from Space.com says anywhere from 10,000 to 100,000 times dimmer, depending on the earth’s atmospheric conditions. That’s between 13 and 17 stops darker than a full moon!

adb – How to achieve factory-reset or bootloader mode for Flywheel (Glorystar Nebula rf3288) tablet without buttons?

I’ve gotten stuck trying to upgrade a Glorystar Nebula 15 kiosk Android tablet (as customized for the orphaned Flywheel spin-bikes) to a vendor-provided single-file Android 7.1 firmware image (7.20191202.115231.img, 715MB).

A special challenge here: this tablet has no physical buttons whatsever: no power, no volume controls, no home. (It simply turns on whenever power is supplied; there’s a click power toggle inline on the DC power cord plugging into the back. It’s got no battery for unplugged use.)

Following the vendor’s instructions (using a Windows AndroidTool program 2.35), it was able to ‘Switch’ to detecting a LOADER device, and appeared to write firmware – but after a lack of progress ending on a log line mentioning ‘Success’, I disconnected & power-cycled in an attempt to view my hopefully-fresh-new-stock-Android7.1 tablet – and instead found it in a state where it never proceeds past a ‘GS’ logo boot screen.

Currently, from this GS screen:

  • the tablet only ever appears as “Found One ADB Device” in the Windows AndroidTool, whereas previously it could ‘Switch’ to “LOADER”
  • it can be detected via adb from MacOS – but oddly, not via adb inside the same Windows10 VM for which AndroidTool was sorta-working
  • adb can reboot it into recovery mode – but without physical buttons, no navigation/selection from the recovery menu is yet possible, and it does not appear to adb or AndroidTool in this mode
  • adb can seemingly also reboot it into bootloader or fastboot mode; in this mode it no longer appears to MacOS adb, but does appear in MacOS fastboot devices list. However, attempting to connect the tablet while in this mode to Windows AndroidTool still only ever shows “Found One ADB Device” (or nothing)

I’m looking for any path out of this dead-end state that allows a re-attempt of the flashing the original vendor single-file firmware IMG, or other potential Android 7.1 firmwares. For example:

  • I’ve found a header on the motherboard with pins GND / PWR / HOME / ESC / V+ / V- / MENU / K2 / K1. However, hand-shorting PWR or V+ to GND with a small wire (alone or together, at the ‘recovery’ menu that’s supposedly looking for vol-nav inputs or other times), has had no visible effect since the tablet’s been in this state.

  • Can the vendor’s single IMG be broken into the smaller more-specific parts that fastboot seems limited to flashing? Can applying those, or some other, smaller steps restore a true “Found One LOADER Device” mode, such that the AndroidTool might be able to make another attempt?

Etc – open to whatever gets Android 7.1 on this device, including, at this point, all-or-nothing gambits to resuscitate or brick it.

Any ideas?