paint-brush
Everything You Need To Know About Managing Go _EMAIL_
Everything You Need To Know About Managing Go Processes
by May 1st, 2024
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow
Too Long; Didn't Read
Discover effective strategies for managing blocking processes in Go applications, including signal handling, process group management, and platform-specific considerations. Learn how to optimize process control and ensure smooth shutdowns for efficient resource management in Linux environments.
featured image - Everything You Need To Know About Managing Go Processes
undefined HackerNoon profile picture
Introduction: The Challenge of Managing Blocking Processes
While working on an application that required executing a command to run a blocking program, such as a TCP/HTTP server, I encountered an interesting challenge. I needed a way to stop the application and its child processes when a signal was sent to the main program, such as SIGINT (Ctrl+C) or SIGTERM. This blog post shares my journey and the solutions I found to manage processes effectively in a Go application, focusing on Linux environments.
Executing Commands with the "os/exec" package
In my experience with the os/exec package in Go, I used exec.Command to run an external command, similar to how others use this package to execute external commands. However, when I tried to stop the command using cmd.Process.Kill(), I faced an issue. For eg: when running a command like watch date > date.txt, I noticed that the process continued to run in the background even after calling cmd.Process.Kill(). You can verify this by checking the active processes using cmd ps -j.
To address this issue, I realized, it was necessary to terminate the entire process group associated with the command to ensure a complete shutdown.
package main
import (
 "fmt"
 "os"
 "os/exec"
 "time"
)
func runCmd(userCmd string) error {
 cmd := exec.Command("sh", "-c", userCmd)
 // Set the output of the command
 cmd.Stdout = os.Stdout
 cmd.Stderr = os.Stderr
 fmt.Println("executing cli: ", cmd.String())
 err := cmd.Start()
 if err != nil {
 return fmt.Errorf("failed to start the app: %w", err)
 }
 time.AfterFunc(5*time.Second, func() {
 cmd.Process.Kill()
 })
 err = cmd.Wait()
 if err != nil {
 return fmt.Errorf("unexpected error while waiting for the app to exit: %w", err)
 }
 return nil
}
func main() {
 runCmd("watch date > date.txt")
}
In the code snippet above, the use of cmd.Process.Kill() attempts to terminate the command after 5 seconds, but as we've seen, it doesn't completely stop the background process.
Here is the output:
➜ cmd-graceful-exit-demo git:(main) ✗ go run process.go
executing cli: /usr/bin/sh -c watch date > date.txt
 %
➜ cmd-graceful-exit-demo git:(main) ✗ ps -j
 PID PGID SID TTY TIME CMD
211477 211477 211477 pts/33 00:00:01 zsh
274396 274328 211477 pts/33 00:00:00 watch
274709 274644 211477 pts/33 00:00:00 watch
274825 274825 211477 pts/33 00:00:00 ps
Note on Usingsh -c:
Using sh -c in exec.Command("sh", "-c", userCmd) is important for some reasons:
Pros:
 1. Shell Features: Allows the use of shell features like redirection, pipes, and expansions.
 2. Command Grouping: Treats the entire command as a single unit, simplifying process management.
Cons:
 1. Dynamic Dependency: Introduces a dependency on the shell, which could affect portability and consistency.
 2. Overhead: Adds some overhead due to the additional shell process, which might impact performance in resource-constrained environments.
Using sh -c provides flexibility and control, but it's important to be aware of the potential drawbacks.
You might wonder why we send a signal to the process group instead of individually signaling each child's PID.
Sending signals to individual child processes may not be the most efficient approach for several reasons:
 1. Reduced Overhead: Sending a signal to a process group requires fewer system calls compared to sending signals to each child process individually. This reduces the overhead and improves the efficiency of the signal-sending operation.
 2. Handling Dynamic Process Creation: A child process might spawn new processes between the time you enumerate the PIDs and the time you send the signals. This could result in newly created processes that don't receive the intended signal. By signaling the entire process group, you ensure that all current and future processes in the group are affected, providing a more reliable way to manage process termination.
 3. Probability of Short-lived Processes: While there is a low probability of short-lived process groups being created, individual child processes can be spawned and terminated quickly. Signaling the process group ensures that even these short-lived processes are accounted for, reducing the chances of leaving orphaned processes.
Now, let's understand the process groups concept.
Understanding Process Groups
In Unix-like operating systems, a process group is a collection of one or more processes that can be treated as a single unit for signaling. Each process in a system belongs to a process group, and each process group has a unique process group ID (PGID). When a signal is sent to a PGID, it is delivered to all processes in the process group.
After understanding the concept of process groups, we can now ensure that terminating our process doesn't leave any leftovers running in the background. By setting the Setpgid attribute to true in SysProcAttr, we create a new process group for our command. This allows us to use the negative PID (-cmd.Process.Pid) with syscall.Kill to send the signal to the entire process group, ensuring a complete termination of the process and any of its child processes. See ref [2] and [3] to know why we have used the -ve sign.
Here's the updated code snippet that demonstrates this approach:
func run(logger *zap.Logger, userCmd string) error {
 cmd := exec.Command("sh", "-c", userCmd)
 cmd.SysProcAttr = &syscall.SysProcAttr{
 Setpgid: true,
 }
 // Set the output of the command
 cmd.Stdout = os.Stdout
 cmd.Stderr = os.Stderr
 logger.Debug("", zap.Any("executing cli", cmd.String()))
 err := cmd.Start()
 if err != nil {
 return fmt.Errorf("failed to start the app: %w", err)
 }
 time.AfterFunc(5*time.Second, func() {
 syscall.Kill(-cmd.Process.Pid, syscall.SIGKILL)
 })
 err = cmd.Wait()
 if err != nil {
 return fmt.Errorf("unexpected error while waiting for the app to exit: %w", err)
 }
 return nil
}
Now, You could be questioning as to why we used Setpgid: true in the code:
cmd.SysProcAttr = &syscall.SysProcAttr{
 Setpgid: true,
}
The reason is simple: to avoid "suicide". Without Setpgid: true, the parent and child processes share the same process group. If we kill this group, it's like hitting a self-destruct button, The parent process goes down too. So, we set Setpgid: true to give the child its own process group. This way, when we send a kill signal to the child's group, the parent stays safe and running.
Setpgid sets the process group ID of the child to Pgid, or, if Pgid == 0, to the new child's process ID.
Inside the forkAndExecInChild1, after forking a child process, the process group ID (PGID) is set using the following code snippet:
 // Set process group
 if sys.Setpgid || sys.Foreground {
 // Place child in process group.
 _, _, err1 = RawSyscall(SYS_SETPGID, 0, uintptr(sys.Pgid), 0)
 if err1 != 0 {
 goto childerror
 }
 }
This code checks if the sys.Setpgid flag is true or if the process should run in the foreground (sys.Foreground is true). If either condition is met, the child process


Return Number in Words Using JavaScript
One of the answers I've submitted on CodeWars that gets a lot of comments is in response to this prompt:
When provided with a number between 0-9, return it in words.
Input :: 1
Output :: "One".
If your language supports it, try using a switch statement.
The solution I've posted (which is very similar to the solution others have posted) is as follows:
switchItUp=n=>["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"][n]
Since Arrays are indexed starting at zero and we can access any item in the array by its index, the way this works is by putting the equivalent word at each index, i.e.:
0 => Zero
1 => One
2 => Two
3 => Three
4 => Four
5 => Five
And the beauty of JavaScript is that we can pass a number to the switchItUp arrow function via the n parameter and it will pull out the equivalent item from the array at index n!
To break this out further, we can put this into a regular function:
function switchItUp (n) {
 const numbersAsWords = ['Zero', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten'];
 return numbersAsWords[n];
}
So if we pass in 5, for example, we look up index 5 in the array, which happens to correspond to 'Five' and so the function returns the string.
Of course, the variable is useless since it's only used one time, so we can remove it:
function switchItUp (n) {
 return ['Zero', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine', 'Ten'][n];
}
And this, besides not being an arrow function for the sake of brevity, is exactly the function above.
If I were going to bring something like this into everyday use, I'd add a Number.isInteger(n) check and I'd probably make sure the array contains the index being passed so there's no question that we'll get the number we want.
Leave a Comment


Techniques, Basically, How-To, Bon_Appetit
Techniques, Basically
Steam, Boil, Fry: The Many Ways to Cook a Dumpling, Explained
Pick your mood—chewy, crispy, soupy, fancy—then pick your method.
4/12/2021 7:50:00 PM
."Of all the cooking methods, boiling applies the most pressure to the dumpling, which can cause them to burst and disintegrate in the water. I have personally experienced much dumpling loss. Most store-bought dumpling wrappersshouldhold up to boiling but they are delicate, so tread carefully. The key is to expel as much air as possible—after spooning the filling onto the wrapper and folding it over to seal, press out any extra air around the filling.
Gaza militants, Israel trade new rocket fire and airstrikes Jeff Bezos' superyacht is so big it needs its own yacht Chef transplants are bringing new flavor to suburbs and smaller cities and towns
Reducing the cooking temperature slightly can help too—the dumplings should be gently boiled rather than tossed around aggressively.If you are making homemade wrappers for boiled dumplings, use cold water (water straight from the tap is fine) as this will give you a thicker skin that's more suitable for the pressures of boiling.
Frozen dumplings can usually be boiled, but check packet instructions to make sure they are robust enough for this cooking method.Steam-frying (potsticker method)Steam-frying, or the potsticker method, is employed for dumplings like gyoza and gow gee (also known as jiaozi or guo tie). The dumplings are seared on their base to create a golden, crispy bottom, and then water is added, and they are covered to steam through. When the water evaporates, lift the lid and let them cook a moment longer. This method of double-frying is what gives potstickers their signature crispy crust.
Most recipeswill ask you to use a nonstick pan for steam-frying, as the dumplings have a tendency to stick. When you are starting out, this is definitely a good idea, but I most often use my well-seasoned cast-iron pan or my stainless steel skillet. The key is to heat your pan, especially if it's stainless steel or cast iron, until it's smoking (like, you can literally see the smoke coming off it) before adding the oil.
To steam-fry, heat a large frying pan over medium-high and, when hot, drizzle with vegetable oil. Working in batches, add the dumplings, flat-side down, and cook until the bottoms of the dumplings are lightly browned—this should take 1–2 minutes (if there is too much heat, reduce to medium). Take care with this next step, as the water will bubble and splutter vigorously. It's best to have your lid ready: Immediately add about 3 tablespoons of water to the pan, just enough to cover the base of the dumplings, then cover and cook for 3–4 minutes, or until the water has evaporated. Lift the lid and allow the dumpling to cook for another 30 seconds, to allow the bottoms to get extra crispy.
Frozen dumplings are perfect for potstickers.Feeling fancy? Add a lacy skirtTo add a touch of fancy to your dumplings, add a crispy, lacy skirt. This is a simple process where the water that is normally added to steam potstickers is replaced by a cornstarch slurry. A nonstick pan is best for this cooking method.
The most stylish skirt of the season!Photo and Food Styling by Sohla El-WayllyThis slurry recipe makes enough for one skillet of dumplings, usually 10–12. In a measuring jug (a liquid measurer will provide you with the most control when pouring the slurry into the pan), add the ¼ cup water, 1 tsp. cornstarch, 1 tsp. flour, ¼ tsp. white or apple cider vinegar, a small pinch of salt, and whisk to combine.
Kevin McCarthy Ripped For Absolutely Orwellian Line In His Liz Cheney Letter Israel's onslaught on Gaza kills at least 24 as West Bank violence simmers The Broker, The Astronaut and The Vampire: Enter the mysterious world of Soviet watch collectors
Heat a 10–12 inch nonstick skillet on medium-high. Get a lid ready. When hot, add 2 Tbsp. neutral oil and place your dumplings into the skillet, lining them up in a circular pattern around the pan, making sure they are not touching one another. Whisk the batter again and pour straight into the skillet, making sure to distribute the slurry evenly to fill all the gaps between the dumplings. Cover with a lid, reduce heat to medium, and cook 4–5 minutes to allow slurry to evaporate. Remove lid—there will likely be parts of the slurry that haven't cooked yet and still look pale so move the pan around over the heat to cook until the entire base is golden. Turn off heat. Carefully place a plate over the frypan and flip the dumplings onto the plate. Lift the pan and the dumplings should release easily.
Read more: Bon Appétit »
Top Stars Talk Funny Business in 'Lifetime Presents Variety's Power of Women: The Comedians'
Top female stars reflect on the "secret weapon" of being funny, their path to fame and their heroes in "Lifetime Presents Variety's Power of Women: The Comedians," whi…


text:
The 2nd and 3rd grade class at Clallam Bay Elementary have a tradition of balancing eggs on the first day of spring. Because the eggs are raw it takes determination to get them to balance. Most of the students were able to balance their egg.
This story is inappropriate and should be flagged for moderation. Please choose from one of the following options:

source: openbmb/Ultra-FineWeb


IRQ is an abreviated computer term short for Interupt Request.
CPU does its computing cycles until a device like a printer or sound card or network adapter interupt the CPU so that the CPU gives its attention and cycles to what the device is asking for.
There are 16 IRQ Channels in every motherboard. Below is the standard layout of each IRQ channel:
IRQ 0 System Timer
IRQ 1 Keyboard
IRQ 2 Cascade to IRQ 9
IRQ 3 Com 2&4 (mouse)
IRQ 4 Com 1&3 (modem)
IRQ 5 LPT 2 (but usually Sound Card )
IRQ 6 Floppy drive
IRQ 7 LPT Port 1 (Printer)
IRQ 8 Real time clock
IRQ 9 VGA, NIC (redirect to IRQ 2)
IRQ 10 CD ROM Drive
IRQ 11 Open
IRQ 12 Open (Bus mouse port)
IRQ 13 Math co-processor
IRQ 14 IDE Controller (hard disk drive)
IRQ 15 PCI/ISA Bridge (motherboard)
see also ports & DMA.
Log in or registerto write something here or to contact authors.


text:
International Journal of Physics. 2013, 1(5), 115-120DOI:
Abstract: Basic for the definition of "time" are clocks operating under stationary conditions. In this manuscript synchronized clocks and time on a disc rotating with constant angular velocity are investigated independent of relativity theory. The periods of two clocks can be compared with each other via two return experiments. The central clock mediates between the rotating and the inertial frame. Dimensional arguments and a detailed deduction show that the period of a rotating clock, measured externally in the inertial system, is the same as the internally defined one. There is a common synchron-time, especially "absolute" simultaneity and invariance of flight times hold. This allows a new discussion of the twin problem. The invariance of a rotating circle allows the transference of the inertial polar coordinates to the rotating plane. The flight time of a light pulse obeys a generalized Fermat's principle. If rays are well defined, this time of flight determines the phase shift of the wave and the result of interference experiments. All general considerations and proofs are independent of the relativity theory, especially of the concept of local inertial systems and differential-geometrical techniques.


text:
A Critical evaluation of methods for computing small failure probabilities for ductile piping components
This paper focuses on the application of the failure assessment diagram (FAD) approach to accomplish robust and reliable calculations of small failure probabilities, as required for safety relevant nuclear components. Specifically, the firstand second-order reliability methods (FORM, SORM) as well as different sampling algorithms are investigated as to their performance and numerical stability. In particular, computational problems are noticed in the assessment range corresponding to the transition from ductile fracture to plastic collapse which is a typical operating regime for ferritic piping. Numerical errors are found to result due to the occurrence of multiple design points in the FORM procedure, thus leading to an underestimation of failure probabilities. Subsequent benchmark calculations reveal a high efficiency of the improved numerical algorithms within a very broad range of failure probabilities. Another aspect considered in the paper is the application of FOR M/SORM to the assessment of crack instability taking into account the scatter in crack resistance curves. Finally, the methods and computer tools developed within the framework of this research are applied for evaluating some pipe burst tests described in the literature.

source: m-a-p/FineFineWeb


text:
Evaluation of glyphosate and AMPA in honey by water extraction followed by ion chromatography mass spectrometry. A pilot monitoring study
Two straightforward methods for glyphosate and AMPA analysis in honey through ion chromatography coupled to Q-Orbitrap accurate high-resolution mass spectrometry as well as their application to real samples are presented. The sample preparation step is accomplished through dilution with methanol–water or water. No pH adjustment is necessary. Recoveries were in the range 80 to 110% with RSDs < 20%. The LOQ of glyphosate was 0.005 mg kg−1, far below the allowed EU-MRL (0.05 mg kg−1) in honey, showing a linear range of 0.005–0.5 mg kg−1 and medium matrix effect. LOQ of AMPA was 0.02 mg kg−1. Glyphosate quantitation was performed with internal or external calibration yielding identical results, thus broadening the applicability of the method as isotopically labelled standards are no longer mandatory. The method was applied to 32 honey samples from different origins. Glyphosate was found in 81% of the samples and 41% were above the EU-MRL showing its applicability in routine work. AMPA was not detected in any of the samples.
- This article is part of the themed collection: Analytical Methods Recent HOT articles


Or that Alaska Air already uses it on all its planes..
 - Using it, does not mean you rely on it...
 Relying on it means: if it is broken you are completely lost and don't know what to do and where to go.
 This is simply not the case.
 - Planes and Ships don't rely on GPS.
 They don't HAVE to use it but in actual practice they most certainly do rely heavily on GPS. It's the best system available so of course they rely on it.
 Just because people are trained to do without GPS in case of problems doesn't mean they don't rely on it in actual daily practice.
 - The word rely implies: "you can not without".
 However they can. That was my point, so the TFA is either wrong or the summary is wrong.
 E.g. my body functions rely on a working pancreas for insuline (or on insulin injections). I can not live without insulin. Hence I rely on it.
 As a navigator on a ship you are required to crosscheck your positions with non GPS means.
 That is either si
 - by dj245 (732906)
 Having gone to a maritime school, a lot of my friends are on the bridge of large ships. A lot.
 They can go without it, but GPS is so easy, convenient, and reliable that they basically rely on it. Shooting the stars with a sextant is relegated to trainees and practicing for the various exams which are required to be promoted to second mate, first mate, and finally master.
 - So they don't use landmarks, no signals like lighthouses no depthsfinders etc?
 How exactly should it work to drive by GPS?
 You don't plot your course on a map? Or if you do and your GPS tells you you are left, you steer more right?
 That means you don't use a compass to define your heading? You don't know what the "missdirection" of your compass is in your sailing area? You don't know the influence of your ship/boat on your compass?
 Sorry, to pilot a boat with GPS only is simply retarded. Regardless how convenie
 - by PvtVoid (_PHONE_) on Sunday December 09, 2012 _USER_:08PM (#42238417)
 What the fuck is with the science press in Britain / Australia about the word "boffins"? Why does every single science article, without fail, have to have some supposedly clever pun or alliteration around the word? (Extra points for using the word astro-boffins [theregister.co.uk].)
 I've gotten to the point that if I see the word "boffins" in a science article, I immediately click away. Please make it stop!
 - I don't know, I can't imagine el Reg without the gratuitous use of the word. It fits the tone of the tech rag quite nicely, I think.
 - Why is that any different to researcher or expert or scientist? They are just as useless or even less useful terms
 It is an Australian article using "Australian English" or "British English"... the term is well understood to define an academic/researcher with a very strong but narrow focus in a typical theoretical area.
 It is no more problematic than terms like futurist (who has a broader focus) or your typical engineer/scientist labels (for those who are more problem solving focused).
 - by grcumb (781340)
 Because if it didn't exist, the tech pundits wouldn't know how to tell the gurus from the wonks.
 Vocabulary: Get used to it.
 - by Inda (580031)
 Fuck yeah bro!
 We should'll use words like, you know, axed, irregardless, regift, and toileting.
 Those limies and convicts should speak like they know the good words like, you know, compartmentalize, operationalize, overexaggerate, professionalization, rationalize, utilize
 Make them special people talk good, ya'll.
 - by holophrastic (221104) on Sunday December 09, 2012 _USER_:09PM (#42238423)
 heh, "unnamed" drones.
 - by PPH (736903) on Sunday December 09, 2012 _USER_:17PM (#42238469)
 Also known as a HARM [wikipedia.org] target.
 - by viperidaenz (_PHONE_) on Sunday December 09, 2012 _USER_:21PM (#42238491)
 Some poor bugger drives to the wrong destination.
 GPS isn't trusted. It's already known to be hackable.
 It would be news if they hacked the anti-spoofing [wikipedia.org] system the military has been using for the last 6 years
 - Novel attack... demoed at TEDxAustin back in February and posted online for everyone to see ;-) _URL_ [ted.com]
 - by tylerni7 (944579)
 The TEDxAustin talk you mentioned is focused on GPS spoofing to make a receiver think that it is somewhere else. Spoofing in that sense has been around for a long time, and while it is very cool and everything, it isn't what is novel about this paper/attack.
 This paper goes from just making a GPS receiver think it is located somewhere else to actually exploiting software vulnerabilities in GPS receivers to cause them to crash and things like that. The attacks are related, but the position based spoofing i
 - send in 007
 - Isn't this exactly why the P-Code is encrypted in the military signal? Spoofing the C/A data has been a known vulnerability in the system since day 1. The rest of the problems are simply bad programmers. That's not a limitation or vulnerability in the GPS system - it's a problem with the receiver manufacturers and the BS test & validation done by the civilian side of the government when they put those receivers in the CORS stations. I saw the code in some of the old reference receivers (in the 90s) - it
 - For me "middle of the earth" attack was a new and interesting idea... otherwise this paper would have read a heck of a lot better had the hyperbole been left at home.
 The contorted attempt to say changing time is not "spoofing" or including offtopic segways such as hacking web servers and perl CGI scripts was a little too much to stomach.
 No mention at all of RAIM and similiar technologies.
 - Geez, these guys were unable to find $50 GPS jammers on Alibaba?
 - is what the Navy and the rest of the Military/Covert Ops use they are sorely misled. In fact, general researchers would be required to have top secret classified clearance and most certainly would not be publishing their findings. NASA has several levels of GPS solutions. We lowly consumers use very old tech for GPS/GIS.
 - Are receivers for other global positioning systems like Galileo and GLONASS also vulnerable to these attacks? If so, is it too late (or even possible in theory) to fix the problem in those systems, given that they aren't fully online or in widespread use yet?
 - by ceoyoyo (59147)
 You can fix the problem in your GPS receiver by plugging it into your computer and flashing the firmware. Or buying another one, if the company ever stops being lazy and fixes their software bug.
 GPS receiver software has bugs just like any other computer system. Who woulda thought?
 - I can't fucking believe it. Do you mean to tell me that if you have a receiver tuned to a certain frequency, and you have a transmitter on that same frequency, then you can transmit information from the transmitter to the receiver?
 Top it off though! If you have not one but two - TWO transmitters, and one is vastly more powerful than the other, then you can get the receiver to receive the stronger one over the weaker one?
 Completely fucking amazing, if you ask me. I had no idea you could do something like tha
 - Bump keys [wikipedia.org] can be used to unlock just about any door, and yet crime statistics remain in line and have even been dropping in many parts of the world since the Internet has raised their profile in recent years.
 This would be more interesting if someone were droning my neighborhood, but some of the hacks took days, not minutes to perform (and as others pointed out, affects individual receivers, not the entire system). Hardly a James Bond villain level of manipulation.
 - Almost. The manipulation is irrelevant.
 Proper summary should be, "In other news, shitty software is shitty." THAT aspect is interesting, largely because few people realize how shitty most of it is, nor where that shittiness is found, vs. where we expect that shittiness should not be. That you can brick a receiver with a divide by zero in a cached almanac... the genius pool at $GPSCO being of THAT quality may be news to most.
 - And now we can say it wasn't our fault...


Wannier U matrices, ''spex.kolap'' - Overlap matrices for Wannier construction) or read from the files if they exist. With ''RESTART SIG'', Spex reads the self-energy from the files ''spex.sigx'' and ''spex.sigc'', which are always written in ''GW/HF FULL'' calculations. (Default false)
''STOREIBZ'': Wave functions are only stored in the IBZ rather than in the full BZ. This decreases the memory demand considerably but slows down the calculation somewhat because wave functions must be regenerated when needed. (Default false)
''WRITE q1 q2...'': Tells Spex to write the head element of the specified quantities ''q1/2='' ''SUSCEP'', ''DIELEC'' or ''SCREEN'' to a file. Optionally a job number can be specified in brackets, as in ''WRITE SUSCEP(2)''. If one of these quantities are explicitly defined in the job definition, they are automatically written to files. With ''q1=INFO'', Spex writes preliminary results to several output files. Consult the :ref:'tutorials' for details. (Default none)
''WRTKPT'': Tells Spex to write out the k-point set and exit. (Default false)
Section ''MBASIS''
''ADDBAS'': Augments mixed basis by the radial {u} functions (according to first part of SELECT entry). This improves the basis convergence for COHSEX calculations. (Default false)
''CHKPROD'': Checks the accuracy of the MT product basis. (Default false)
''GCUT G'': G cutoff for the IPWs of the mixed basis.
''LCUT l'': l cutoffs (one for each atom type) for the mixed basis.
''NOAPW'': Switches off construction of "product APWs", which are continuous at the MT sphere boundary. (Default false)
''OPTIMIZE'': Optimize mixed basis for correlation self-energy. Consult the :ref:'tutorials' for details. (Default none)
''SELECT l1,l3,lo1;l2,l4,lo2'': Selection of the MT radial functions from which the mixed basis is constructed. Consult the :ref:'tutorials' for details.
''TOL t'': Tolerance value for the removal of linear dependencies from the MT part of the mixed basis. (Default 0.0001)
(''WFADJUST''): Removes wavefunction coefficients belonging to radial functions that are not used to construct the MT product basis. (Currently the coefficients are actually not removed from the memory.) (Default false)
Section ''COULOMB''
''CHKCOUL'': Performs checks on the Coulomb matrix: (1) Project on plane waves and see whether we get :math:'{v_{\mathbf{GG'}}=4\pi \delta_{\mathbf{GG'}}/ |\mathbf{k+G}|^2 }', (2) compare largest eigenvalue of Coulomb matrix to :math:'{4\pi / k^2}'. (Default false)
(''CUTZERO''): Removes linear dependencies in the overlap matrix of the mixed basis. Otherwise, in the case of a large ''GCUT'' the diagonalization of the Coulomb matrix might fail due to numerical rounding errors in LAPACK. (Default false)
''LEXP'': l cutoff for the expansion of plane waves inside MT spheres. (Default 14)
''NOSTORE'': The default is to precalculate and keep the Coulomb matrices for all k points in memory. With this keyword the matrices are calculated whenever they are needed. This reduces the memory demand but somewhat slows down the calculation. Unless ''APPROXPW'' is chosen, this also applies to the overlap-correction matrix. (Only affects HF and QP calculations.) (Default false)
(''STEPRAD K''): Uses the Fourier transform of the step function as an alternative to the Rayleigh expansion for representing the IPWs and prints the resulting difference. The parameter ''K'' is the corresponding reciprocal cutoff radius. Only for testing. (Default none)
(''TSTCOUL''): Similar to ''CHKCOUL'' but regenerates MT part of the mixed basis from spherical Bessel functions and stops after the test. (Default false)
Section ''WFPROD''
(''APPROXPW''): Since version 02.03 the plane-wave part of the wave-function products are calculated exactly leading to much better convergence with respect to ''GCUT''. However, the exact evaluation takes considerably more time. If ''APPROXPW'' is set, the old and approximate calculation of the products is used instead. (Default false)
''LCUT l'':Optional l cutoffs (one for each atom type) for the wave functions in the calculation of the products. (Default none)
''MTTHR d'': Threshold value below which wave-function coefficients are neglected. (1E-10 is a safe choice.) (Default 0)
(''MINCPW n''): Modifies the IPW wave-function coefficients such that their absolute values become as small as possible. This reduces the error in the evaluation of the wave-function products arising from the finite G cutoff and leads to better convergence with respect to ''GCUT'' and smoother band structures, when ''APPROXPW'' is used. The coefficients can be modified, because the set of IPWs is overcomplete. If set, the eigenvectors of the overlap matrix with the ''n'' smallest eigenvalues are used for this modification. Note that it only makes sense to use this together with ''APPROXPW''. (Default 0)
''FFT gcut'': Employs Fast Fourier transformation for the calculation of the plane-wave part of the wave-function products. Scales much better with system size than the direct (default) evaluation. Requires a reciprocal cutoff ''gcut''. The exact limit is :math:'gcut=GCUT{+2k_{\mathrm{max}}}', where :math:'{k_{\mathrm{max}}}' is the PW cutoff of the DFT calculation, but much lower cutoffs are enough; try with ''gcut=8'' for example. If no ''gcut'' is given, Spex uses the exact limit. (Default none)
Section ''SUSCEP''
''DISORDER'' :math:'{\tau}': Replaces the infinitesimal :math:'{i\eta}' by the finite frequency :math:'{i/2\tau}' in the response function. (Default none)
(''FSPEC N x''): Deprecated keyword. Use ''HILBERT'' instead. (Default none)
''HILBERT d x'': Defines the exponential frequency mesh for the Hilbert transformation in one of two ways: (1) ''d'' is the difference between the first (set at the band gap value or zero) mesh point :math:'{\omega_1}' and the second mesh point :math:'{\omega_2}', and :math:'x' is the factor :math:'{x=(\omega_{i+1}-\omega_i)/(\omega_i-\omega_{i-1})}'; (2) if ''d'' is an integer, it is interpreted as the number of mesh points in the range :math:'{{\omega_1}..5 htr}', and ''x'' is interpreted as the stretching factor "acquired at 5 htr", i.e., :math:'{x^{1/N}}' is the corresponding factor defined in (1). (Default 0.01 1)
:comment Alternatively, the first argument ''N'' can be a real number in which case it is interpreted as the first nonzero mesh point. Latest version: A negative second argument means the stretching factor that is reached after {N} points, i.e., :math:'{x^N}'. (Default 30 1.05):)
''HUBBARD file'': Calculates Hubbard parameters. If the optional filename ''file'' is given, the Hubbard parameters are read from (written to) ''file'' if it exists (does not exist). (Default false)
''MULTDIFF ON'' or ''OFF'': If set "ON" (and ''MB/PW='' is used), the BZ integrand in the calculation of the head and wing elements of the polarization function (not for the magnetic susceptibility) is multiplied by KS energy differences. (The integration weights are correspondingly adjusted.) For a small (or zero) '''k''' vector this leads to better numerics (because the integrand is exactly inversely proportional to the KS energy differences in the case '''k=0'''). (Default ''ON '' for '''k=0''', ''OFF'' else)
''PLASMA p'': Sets the plasma frequency at ''p''. ''p=METAL'': use metallic screening. (Default none)
(''TETRAF''): If set, tetrahedron weights are only calculated in the (extended) irreducible part of the BZ. This accelerates the calculation of the weights considerably but introduces slight deviations due to symmetry breaking. (Default false)
''WGHTTHR w'': Sets a threshold value for the (tetrahedron) weights. All transition with weights below ''w'' are neglected. (Default :math:'{10^{-10}}')
Section ''SENERGY''
(''ALIGNVXC''): Aligns chemical potential to quasiparticle state of highest occupied state. (Default false)
''CONTINUE (n)'': If the optional (and


text:
Posted on Friday, 5th March 2010 by All Philippines
New Bilibid Prison
The New Bilibid Prison (NBP) (also known as the National Bilibid Prison), located in Muntinlupa City, Philippines, is one of the seven and most famous main insular correctional facilities for convicted male prisoners in the Philippines. The institution is operated and maintained by various Philippine government agencies, particularly, the Department of Justice (DOJ), the Bureau of Corrections, the Bureau of Jail Management and Penology (BJMP), and the Department of the Interior and Local Government (DILG).
Often called the "Bilibid", the New Bilibid Prison in Muntinlupa City was not the original prison facility that carries the Bilibid moniker. The old Bilibid prison located in the Mayhalique Estate in Oroquieta Street Sta. Cruz, Manila was built by the Spanish authorities in 1847 to incarcerate prisoners during the Spanish colonial period in the Philippines. The prison was established in accordance to a decree issued by the office of the Governor General or Section 1708 of the Revised Administrative Code. It was then formally opened by a royal decree in 1865. The penitentiary was divided into two main buildings. One is known as the 'Carcel' which can accommodate 600 prisoners. Prisoners incarcerated in the Carcel were divided according to class, sex, and the degree of the crimes they had committed. The other main building in the prison compound was called the 'Presidio'. This building was designed to accommodate 527 prisoners. All in all, before it was referred to as the Bilibid prison, this main Spanish-era prison facility was called the 'Carcel y Presidio Correcional'.
At the start of the 20th century, during the early American colonial rule, a modern 200 bed capacity hospital was added to the old Bilibid prison compound. A carpentry workshop was also built for the prisoners to hone their skills in woodworking and later to sell their crafts.
During the Commonwealth era under the presidency of Manuel Quezon, a growing number of prisoners admitted in the old Bilibid prison (this is due to an increased population and rapid urbanization of Manila) paved way for the creation and implementation of Commonwealth Act No. 67 ordering the construction of a new national prison facility in Muntinlupa City to replace the old Bilibid prison. The construction of the new prison compound started in 1935 with a budget of 1,000,000 Philippine pesos.
All prisoners incarcerated in the old Bilibid compound were transferred to the new prison facility in Muntinlupa city on November 15, 1940. At that time, the new penitentiary can accommodate up to 3,000 prisoners. On January 22, 1941, in a small ceremony attended by government officials and other luminaries, the new prison compound became officially known as the New Bilibid Prison.
Old Bilibid Prison 1899
Old Bilibid Prison 1902
Old Bilibid Prison 1910
Tags: American colonial rule Philippines, Bilibid prisoners convicts felons, Bureau of Corrections Philippines, Bureau of Jail Management and Penology BJMP Philippines, Carcel prison Philippines, Carcel y Presidio Correcional Manila Philippines, Commonwealth Act No. 67, correccional Philippines, correctional facilities in the Philippines, Department of Justice DOJ Philippines, Department of the Interior and Local Government DILG Philippines, Mayhalique Estate Oroquieta Street Sta. Cruz Manila, Muntinlupa City sights sounds landmarks, National Bilibid Prison Philippines, New Bilibid Prison, New Bilibid Prison Muntinlupa City, New Bilibid Prison NBP, New Bilibid Prison pictures, old Bilibid prison Manila Philippines, President Manuel Luis Quezon Commonwealth Government Philippines, Presidio prison Philippines, prisons of the Philippines, Section 1708 of the Revised Administrative Code Spanish colonial rule Philippines, Spanish Governor General Philippines, Spanish laws decrees in the Philippines, Spanish prison system Philippines, SPanish royal decree Philippines
Posted in Philippine Facts | Comments (6)

source: HuggingFaceFW/fineweb-edu


text:
Get Set to Learn! is a Sesame Street CD-ROM game for home computers. The game was developed by Creative Wonders and Children's Television Workshop in 1996.
This game promotes the thinking and problem solving skills necessary for learning.
- "What Size is Your Prize?": Choose the right size object to win Zoe's game.
- "Count it Up! Up! Up!": Count to the right number and watch as the wheel spins.
- "Match the Moons": Match The Count's moons, spiders, lightning bolts, gold coins, and numbers.
- "Kooky Cookie Game": Complete Cookie Monster's frosted cookie pattern.
- "Dunk or Dare": Fill the barrel with trash and dunk Telly.
- "Fabulous Prizes": All the prizes won in the games are collected in the chest.
- A trunk seen backstage in the opening features a sticker advertising Let's Make a Word!


Take the 2-minute tour ×
I'm comparing hourly data measurements recorded for 5 years (2007-2011) where the number of measurements in each year is as follows:
2007 = 8760 measurements;
2008 = 8784 measurements; <-- leap year
2009 = 8760 measurements;
2010 = 8760 measurements;
2011 = 8760 measurements;
What is the best method for comparing each time series? Is it better to add an additional 24 measurements (of nans) for february 29th for the non leap years? or, is it more efficient to interpolate the data onto the same time frame (where time is given in decimal day of year)?
share|improve this question
What comparison are you trying to make? The data sets don't correspond, so you probably aren't going to be comparing like with like. – walkytalky Mar 30 '12 at 9:55
1 Answer 1
up vote 2 down vote accepted
That depends entirely on the kind of data you are measuring. If it's natural-world stuff like weather data, you probably care more about matching solstice to solstice and equinox to equinox. If it's financial market data, you may want to line up calendars and possibly exclude the leap day entirely.
It's difficult to give more specific advice without more background.
share|improve this answer
The data is for water temperature. So, Im looking at how the temperature varies from one year to the other and maybe finding the correlation, which the data needs to be the same size for this. – Emma Mar 30 '12 at 10:14
If you match up seasonal markers such as solstices and equinoxes, the data will match up. The match-up simply won't correspond exactly to calendar years. – Marcelo Cantos Mar 30 '12 at 10:16
Your Answer


Determine and monitor the docking state and type
Android devices can be docked into several different kinds of docks. These include car or home docks and digital versus analog docks. The dock-state is typically closely linked to the charging state as many docks provide power to docked devices.
How the dock-state of the phone affects your update rate depends on your app. You may choose to increase the update frequency of a sports center app when it's in the desktop dock, or disable your updates completely if the device is car docked. Conversely, you may choose to maximize your updates while car docked if your background service is updating traffic conditions.
The dock state is also broadcast as a sticky Intent, allowing you to query if the device is docked or not, and if so, in which kind of dock.
Determine the current docking state
The dock-state details are included as an extra in a sticky broadcast of the ACTION_DOCK_EVENT action. Because it's sticky, you can simply call registerReceiver(), passing in null as the broadcast receiver. The following snippet shows how to complete this process:
val dockStatus: Intent? = IntentFilter(Intent.ACTION_DOCK_EVENT).let { ifilter ->
 context.registerReceiver(null, ifilter)
IntentFilter ifilter = new IntentFilter(Intent.ACTION_DOCK_EVENT);
Intent dockStatus = context.registerReceiver(null, ifilter);
You can extract the current docking status from the EXTRA_DOCK_STATE extra:
val dockState: Int = dockStatus?.getIntExtra(EXTRA_DOCK_STATE, -1)?: -1
val isDocked: Boolean = dockState!= Intent.EXTRA_DOCK_STATE_UNDOCKED
int dockState = dockStatus.getIntExtra(EXTRA_DOCK_STATE, -1);
boolean isDocked = dockState!= Intent.EXTRA_DOCK_STATE_UNDOCKED;
Determine the current dock type
If a device is docked, it can be docked in any one of four different type of dock:
 - Car
 - Desk
 - Low-End (Analog) Desk
 - High-End (Digital) Desk
Note that the latter two options were only introduced to Android in API level 11, so it's good practice to check for all three where you are only interested in the type of dock rather than it being digital or analog specifically:
val isCar: Boolean = dockState == EXTRA_DOCK_STATE_CAR
val isDesk: Boolean = dockState == EXTRA_DOCK_STATE_DESK
 || dockState == EXTRA_DOCK_STATE_LE_DESK
 || dockState == EXTRA_DOCK_STATE_HE_DESK
boolean isCar = dockState == EXTRA_DOCK_STATE_CAR;
boolean isDesk = dockState == EXTRA_DOCK_STATE_DESK ||
 dockState == EXTRA_DOCK_STATE_LE_DESK ||
 dockState == EXTRA_DOCK_STATE_HE_DESK;


text: The Sunrise Chromospheric Infrared spectroPolarimeter (SCIP) is a near-IR spectro-polarimeter instrument newly designed for Sunrise III, a balloon-borne solar observatory with a 1-m diameter telescope. In order to achieve the strict requirements the SCIP wavefront error, it is necessary to quantify the errors due to environmen- tal effects such as gravity and temperature variation under the observation conditions. We therefore conducted an integrated opto-mechanical analysis incorporating mechanical and thermal disturbances into a finite element model of the entire SCIP structure to acquire the nodal displacements of each optical element, then fed them back to the optical analysis software in the form of rigid body motion and surface deformation fitted by polynomials. This method allowed us to determine the error factors having a significant influence on optical performance. For example, no significant wavefront degradation was associated with the structural mountings because the optical element mounts were well designed based on quasi-kinematic constraints. In contrast, we found that the main factor affecting wavefront degradation was the rigid body motions of the optical elements, which must be mini- mized within the allowable level. Based on these results, we constructed the optical bench using a sandwich panel as the optical bench consisting of an aluminum-honeycomb core and carbon fiber reinforced plastic skins with a high stiffness and low coefficient of thermal expansion. We then confirmed that the new opto-mechanical model achieved the wavefront error requirement. In this paper, we report the details of this integrated opto-mechanical analysis, including the wavefront error budgeting and the design of the opto-mechanics.


text:
Drilling square holes
I'll start by clarifying that I don't actually have a need to make square holes at the moment but I am facinated by these techniques.
The maker of the above video Jacques Maurel also wrote an article for Model Engineer a couple of years back. The article outlines a home made square drill using a tool shaped as a Reuleaux rotor.
Jacques article includes how to machine the rotor, jigs for making the parts, grinding the tool and how to make the floating chuck. The floating chuck is based on an oldham coupling and can also be used for reamers and tapping. As seen the first video the solution works well and can produce blind square holes.
Model Engineer magazine issue N°4285 oct /nov 2006
Also see article by Mr Parkes in Model Engineer N°112
Applications of shapes of constant width by John Bryant and Chris Sangwin
Floating chuck and square drills
An alternative solution to producing a square hole is to use a broach which are good for though holes, keyways and even internal gears.
Michael Cox has written an interesting article for Model Engineer #185 (Jan 2012) where he has a free running rotary broach that works by being just a couple of degrees off of perpendicular to the lathe axis. It uses a single ball bearing as a thrust bearing based on Edgar Westbury's rotating centre design.
Just spotted that Hemingway Kits now do a floating reamer holder which would make one of the more complex parts of Jacques project a little easier.
The skeptics over at hobby-machnist have suggested that this is a rotary broaching operation rather than a drilling operation. Here's a site with closes up of the end of the square drill that shows you that it's cutting process not broaching. However they are correct in thinking that the corners of the holes will be slightly rounded.
Another alternative would be to use a completely different machine for this. The Shaper is spot on for this and would make the job look easy. Dave Gingery's book The Metal Shaper shows you how to make them.
Have you also considered looking into Rotary Broaching? See the tools and videos at: _URL_
Thanks for the link, I wonder if it would be possible to make a rotary broach from an old hammer drill?
Make Magazine have also put together a selection of videos on drilling square holes.


text:
Make a Maze with Drinking Straws!
On those lazy summer afternoons, there's nothing like a fun puzzle or maze to keep your third grader fascinated. You can find books of mazes in toy shops, but with a piece of corrugated cardboard, a marble, and some bendable drinking straws, you and your child can make a three dimensional toy that you can enjoy again and again. And while you're busy crafting, remember this: for third and fourth graders, mazes are an excellent math tool. Teachers encourage kids to explore them as a way to strengthen logical reasoning and spatial thinking, both of which are crucial to success in geometry. Kids will benefit from this activity if you make the maze, but the learning will be even deeper if your child designs it herself. With these simple materials, that should be a snap!
What You Need:
- Flat piece of corrugated cardboard, 12"x18" or so
- Box of bendable drinking straws
- Exacto knife
- Plastic mesh bag, such as for onions or oranges
- Hot glue gun
- Ruler and pen
- Bright colored marker


text:
assert() will check the given assertion and take appropriate action if its result is FALSE.
If the assertion is given as a string it will be evaluated as PHP code by assert(). The advantages of a string assertion are less overhead when assertion checking is off and messages containing the assertion expression when an assertion fails. This means that if you pass a boolean condition as assertion this condition will not show up as parameter to the assertion function which you may have defined with the assert_options() function, the condition is converted to a string before calling that handler function, and the boolean FALSE is converted as the empty string.
Assertions should be used as a debugging feature only. You may use them for sanity-checks that test for conditions that should always be TRUE and that indicate some programming errors if not or to check for the presence of certain features like extension functions or certain system limits and features.
Assertions should not be used for normal runtime operations like input parameter checks. As a rule of thumb your code should always be able to work correctly if assertion checking is not activated.
The behavior of assert() may be configured by assert_options() or by.ini-settings described in that functions manual page.
The assert_options() function and/or ASSERT_CALLBACK configuration directive allow a callback function to be set to handle failed assertions.
assert() callbacks are particularly useful for building automated test suites because they allow you to easily capture the code passed to the assertion, along with information on where the assertion was made. While this information can be captured via other methods, using assertions makes it much faster and easier!
The callback function should accept three arguments. The first argument will contain the file the assertion failed in. The second argument will contain the line the assertion failed on and the third argument will contain the expression that failed (if any - literal values such as 1 or "two" will not be passed via this argument)
Example 1. Handle a failed assertion with a custom handler


text:
One interpretation often given is that if a plane surface contains two points, then it contains the line connecting the two points. If that were the meaning, then it would be just as well to make that the explicit definition or to make it a postulate. But that does not seem to be Euclid's intent. His proposition XI.7 has a detailed proof that the line joining two points on two parallel lines lies in the plane of the two parallel lines. No proof at all would be necessary if that line were by definition or by postulate contained in a plane that contained its ends.
Note that a plane surface may be infinite, but needn't be infinite. It can be a square, a circle, or any other plane figure (Def.I.19).
There are no postulates in the Elements for the existance of plane surfaces, either finite or infinite. Post.3 says circles can be drawn, but a ambient plane is implicitly required there. Rectilinear figures are assumed to exist once the bounding lines have been constructed, but again, a plane is presumed to exist first. Throughout Books I through IV and Book VI, the books on plane geometry, there is the implicit assumption of one plane in which all the points, lines, and circles lie. In the books on solid geometry, Books XI through XIII, there is sometimes mentioned a "plane of reference," and proposition XI.2 claims that two intersecting lines determine a plane as does any triangle (but its proof fails completely).
Next definition: I.Def.8


JavaScript: Sparse Array
By Xah Lee. Date: . Last updated: .
What is a sparse array?
When a array's numerical property key does not exist for index in the range from 0 to n (where n+1 is the value of the property length. [see Array.prototype.length] )
What is the value of missing index in a sparse array?
It doesn't exist, therefore has no value.
Note, it is different from having values of undefined .
If you access non-existent index, JavaScript return undefined .
🛑 WARNING: Array.prototype.map and others skip missing indexes.
How to Check Missing Keys?
// use Object.keys to see existing indexes
const xx = [3, 4, 5];
delete xx[1];
console.log(Object.keys(xx)); // [ "0", "2" ]
// use hasOwnProperty to check if a index exist
const xx = [3, 4, 5];
delete xx[1];
console.log(xx.hasOwnProperty("1") === false);
How to create a sparse array?
// using delete operator results a sparse array
const xx = ["a", "b"];
delete xx[0];
console.log(xx.length === 2);
console.log(xx.hasOwnProperty("0") === false);
// Example of a sparse array, by adding a item with index greater than length
const xx = ["a", "b"];
console.log(xx.length === 2);
xx[9] = "xyz";
// now xx is sparse array
console.log(xx.length === 10);
console.log(xx.hasOwnProperty("3") === false);
What is the use of sparse array?
Generally, there is no use. Whenever you think spare array is useful, just use a object, or use Map Object or Set Object .
JavaScript Array
BUY
ΣJS
JavaScript in Depth


Freeman Dyson: Yes, "Garbage Bag World" Origins
Freeman Dyson: Yes, "Garbage Bag World" Origins
By Suzan Mazur
June 27, 2012
Freeman Dyson
"Then after that came us -- stage six. That's the end of the Darwinian era, when cultural evolution replaces biological evolution as the main driving force. "Cultural" means that the big changes in living conditions are driven by humans spreading their technology and their ways of making a living, by learning from one another rather than breeding." -- Freeman Dyson, Eastover Farm
Several weeks ago the Lonsdale prize went to researchers who think first life was RNA, a replicating creature. So I rang up Freeman Dyson, emeritus professor at the Institute for Advanced Study, Princeton, to see if he still embraces the idea that original life was a "garbage bag world," a membranous creature with dirty water trapped inside that reproduced for a billion years or more with high rates of error before replicating.
Dyson does the math on this in his book, Origins of Life (2nd. ed.), based on Alexander Oparin's cell-first theory of metabolism. Dyson calls it his "toy boat model," calculated with pencil and paper, where thousands of molecular units make the leap from disorder to order with "reasonable probability."
During our phone conversation, Dyson told me that he does indeed still hold to his hypothesis and also still thinks RNA was a byproduct of that first creature's own metabolism, emerging as a parasite and eventual symbiotic partner. He says it doesn't make sense that original life copied itself without getting its act together first.
In his Origins book, Dyson also refers to Doron Lancet's work on defining metabolism, also based on Oparin's model, by computer simulations of origin of life, saying:
"He was my first inspiration. A chapter in his book, Infinite in All Directions, made me realize in the early 1990s that DNA/RNA was not necessarily the holy grail, and that there was an alternative in the form of molecular assemblies composed of mutually interacting simple molecules. The "Lipid World" model as a viable alternative to the "RNA World" would not have come to be without him."
Dyson envisions seven stages of life: (1) garbage bag stage -- metabolism without replication; (2) parasite emerges from garbage bag creature, parasite can replicate but not metabolize -- "zooms around" cells as viruses in packages; (3) collaboration of metabolic and parasitic creatures, RNA invention of "most mysterious" ribosome; (4) coupling of metabolic and RNA worlds (modern cell), two billion years of speciation and sex, beginning of Darwinian era; (5) multicellular organisms; (6) "us" and end of Darwinian era with cultural evolution replacing biological evolution; (7) whatever happens next.
Dyson's ability to find music in problems may reflect on his father having been a composer. As the story goes, as a teenager he, young Freeman, dealt with the challenge of reading Vinogradov's An introduction to the theory of numbers by learning Russian and then translated Vinogradov's text into English.
Dyson's books include: Disturbing the Universe, Weapons and Hope, Origins of LIfe, Infinite in all Directions, From Eros to Gaia, Imagined Worlds; The Sun, the Genome and the Internet, A Many Colored Glass: Reflections of Life in the Universe.
Aside from his affiliation with the Institute for Advanced Study, he serves on the board of trustees and is a past president of the Space Studies Institute, founded by the late Gerard O'Neill.Dyson is also a member of Jason, a defense advisory group of scientists.
My interview with Freeman Dyson follows.
Freeman Dyson: Yes, I would still say that. We've learned a certain amount since then but the basic mystery remains. We don't have a clearly defined chemical path from a mixture of garbage to an organized cell. That's what we somehow have to discover. The main difference between my thinking about things then and now is that now we firmly understand that there was an RNA world. The evidence for the preponderance of RNA at some stage has become stronger. And, of course, we know about various kinds of RNA operating in living cells today.
Suzan Mazur: Is your hypothesis still that the original living creatures were cells with a metabolic apparatus but without a genetic apparatus -- this was not an RNA world -- and that cells reproduced with high rates of error for perhaps at least a billion or more years before they began replicating? And that the replicator was a parasite. You say in your book that by metabolism you mean "what the Germans mean by Stoffwechsel with no restriction to genetically directed processes."
Suzan Mazur: In your book you have a section on Oparin's theory of cells first, enzymes second and genes third. And of Doron Lancet's work, a proponent of Oparin's theory. Do you continue to be keen on Lancet's "Lipid World" regarding origin of life? And if so, why?
Freeman Dyson: Yes, although I don't know what Doron's been doing recently.
Suzan Mazur: You describe Lancet's idea in your book by saying, "Life began with little bags, the precursors of cells, enclosing small volumes of dirty water containing miscellaneous garbage." Can you say more?
Freeman Dyson: Yes, that certainly I would agree with Certainly lipids are the most likely candidates. It would be the first stage of developing life. These little bags which gradually become cells. I would say that still looks very plausible. But I don't know what further research Doron has done in the last 10 years.
[Note: Doron Lancet has emailed me saying: "Freeman Dyson's mention of my work relates to our basic idea that life began with much smaller and simpler molecules than RNA…Dyson was attracted to this idea (which he jokingly, but lovingly called the garbage bag model) because it constituted a quantitative, physicochemically rigorous model for self-replicating entities that could jump-start life without resorting to long templating biopolymers such as RNA…
What is so nice about such spontaneously accreting building blocks is that (1) they can be simpler than nucleotides, the building blocks of RNA, e.g., fatty acids (simple lipids) found in meteorites as per Dave Deamer's papers and (2) they come in thousands of different kinds, allowing the assembly to be "interesting" compositionally and chemically, hence jump-start more complex subsequent chemistries, including the formation of simple polymer chains, as claimed by both Dyson and Deamer [Deamer was on sabbatical in Lancet's lab 10 years ago.]..."
In short, we claim (as Dyson and Deamer do) that RNA is a result, a consequence of simpler chemistry, not a necessary early "moving force". What is good about our model is that it is not hand-waving. We simulate in the computer accurate chemical progressions that mimic the process described for the appearance of RNA-like templating molecules."]
Suzan Mazur: What do you think of the Lonsdale origin of life prize going to RNA World proponents John Sutherland and Matthew Powner? The search was for a proposal that identified life as "a self-sustaining chemical system capable of undergoing Darwinian evolution."
Freeman Dyson: I think I would not make any comment about that. I don't know anything about the details.
[Note: Doron Lancet says further: "RNA World and Lipid World are considered by many as competing models for life's origin. John Sutherland partially alleviated some of the most bitter criticisms against the RNA World by showing that the small molecular building blocks of the RNA chain may be formed prebiotically. This is still far from saying it wins as a full-fledged model for the origin of life.... There are many open questions that continue to be debated in the field regarding formation of chains, the capacity of such chains to replicate and more."]
Freeman Dyson: I haven't really been following all the discussions.
Freeman Dyson: I would strongly disagree. It's essentially a problem of chemistry.
Suzan Mazur: Who else's origin of life work on this subject do you like?
Freeman Dyson: I haven't really been following it, so it's hard to answer. But it obviously is a problem of chemistry, and the chemists have not made much progress as far as I know.
Suzan Mazur: What kind of experiments should they be doing?
Suzan Mazur: You draw an analogy in your book between origin of life and the origin of body plans half a billion years ago, a "sudden efflorescence of elaborate body plans," during the Cambrian explosion Have you had further thoughts about this in light of the "evo-devo revolution"? Did form come first or did form arise from genetic programs?
Freeman Dyson: I haven't thought about that recently. Clearly we are understanding much more about embryonic development. The thing I'm most excited about is HAR1 and HAR2 discoveries of David Haussler, but of course, that's much later in history.
Suzan Mazur: Do you think form came first?
Freeman Dyson: By the time of the Cambrian explosion is very late in the history of life and genetics had become very powerful. But, of course, we have no idea


alexic
(redirected from alexicly)
Also found in: Dictionary, Thesaurus.
a·lex·ic
(ă-lek'sik),
Pertaining to alexia.
a·lex·ic
(ă-lek'sik)
Pertaining to alexia.
alexia
(a-lek'se-a) [ ¹an- + Gr. lexis, word + -ia]
A loss of the ability to understand written or printed words. alexic (a-lek'sik), adjective. Synonym: visual aphasia; word blindness
motor alexia
Inability to read aloud while remaining able to understand what is written or printed.
musical alexia
Inability to read music. It may be sensory, optic, or visual, but not motor.
optic alexia
Inability to understand what is written or printed.
Mentioned in ?


You are currently viewing: Articles
Sep-2009
FCCU particulate emissions control with a Shell third stage separator: a case study
Third Stage Separators (TSS) have been utilised for many years to protect turbo expanders installed on FCCU regenerator flue gas systems.
Edwin H Weaver
Belco Technologies Corporation (Now BELCO Clean Air Technologies)
Viewed : 3363
Article Summary
In more recent years, tremendous improvements have been made in the separation performance of the TSS. Although these were originally targeted at improving the reliability and run time of the turbo expanders, these improvements have allowed the Shell-TSS to reach emission levels that constantly meet the mandated stack particulate emission requirements such as new source performance standards (NSPS) and refinery MACT II. With the increased emphasis on lower particulate emissions from the FCCU, this is very important as in many cases the TSS now provides a viable alternative to an electrostatic precipitator.
The case studies examined follow the typical upgrade of an old Shell-TSS with modern internals for optimum emissions performance. First, the design of an old TSS is examined, along with pertinent implication to the system performance. Next, the modifications to the TSS are described along with the performance and reliability implications of each of the improvements. Other important components, such as the fourth stage separator (FSS) are also examined and the performance implications are discussed. Finally, the actual performance of the upgraded TSS system is examined and compared to mandated emission requirements. It will become clear that the upgraded system meets not only Mact II but has contributed to solve expander-fouling issues.
Background
For many years, the TSS has been used as an effective device to remove catalyst fines from the FCCU regenerator flue gas in order to provide protection for a turbo expander. In this service, it was critical that the TSS removes a sufficient quantity of the catalyst fines so that the remaining catalyst fines in the flue gas would not damage the turbo expander. A typical arrangement of the TSS in this service is shown in Figure 1.
In this arrangement, flue gas from the FCCU regenerator passes through the TSS, where the larger catalyst fines are removed. The TSS underflow, may be routed to a fourth stage separator, but in many cases the underflow is simply returned to the main flue gas, where it is either cleaned by an electrostatic precipitator, a wet EDV scrubber or vented directly to atmosphere. When emissions to the atmosphere are the primary consideration, a FSS is critical to the overall performance of the system. Not only must the TSS operate efficiently, the underflow from the TSS must be efficiently cleaned of catalyst fines in a FSS before the underflow is returned to the flue gas. A typical arrangement of a TSS, designed for minimizing particulate emissions to the atmosphere, is provided in Figure 2. As can be seen in the Figure, the underflow from the TSS is passed through a FSS. The clean overflow from the FSS is returned to the main flue gas. The catalyst fines from the FSS must be collected for disposal. In many cases this is accomplished by collecting the catalyst fines in a hopper for disposal or blending with withdrawn spent catalyst in the spent catalyst hopper.
TSS design considerations
Although several factors are involved in the design of an efficient TSS, the most critical component, in terms of performance is the swirl tube design. Both the TSS and the swirl tube are illustrated in Figure 3. Inside the TSS, the flue gas is divided over multiple swirl tubes. The number of swirl tubes utilised is primarily dependent on the flue gas volume being processed. The original swirl tube design that was utilised in older TSS units was a swirl tube that incorporated a slotted plate at the bottom of the swirl tube. At times the slots in this bottom plate would plug, affecting both reliability and performance. Therefore, much of the development efforts were focused on a swirl tube design that uses an open end1. Of the modifications made to the swirl tube design, prominent are changes to the inlet vane configuration and on optimizing the swirl tube barrel length to diameter ratio. This is a critical part of the design as the catalyst fines must separate from the flue gas and fall down the swirl tube while the flue gas exits out the top of the swirl tube. The effect of barrel length and diameter is illustrated in Figure 4.
The collection efficiency of a commercial TSS installation as a function of particle size can be used to illustrate the effectiveness of the improved TSS design. The collection efficiency is determined by analyzing the particle size distributions and concentration at the TSS inlet and at the outlet. At the TSS inlet, the cumulative particle size distribution shows approximately 50% less than 10 microns and 35% less than 2 microns.
Therefore, there is a significant percentage of coarse particles (greater than 10 microns) and also fine particulate (less than 2 microns). Figure 5 shows the data from this installation. The graph shows the fractional (bi-modal) distribution and the cumulative distribution.
Downstream the TSS, essentially all of the particulates above 5 microns have been removed and even at 2 microns, much of the particles have been removed, as approximately 90% of the remaining particulate is less than 2 microns. Excellent performance has been achieved, leaving only the very small and fine particulate to escape from the TSS. See Figure 6 where the coarse 'peak' has disappeared.
This can be made clearer by analysing the grade efficiency, which is calculated from the particle size distributions and mass flows at the TSS inlet and outlet. This is illustrated in Figure 7, where for comparison also data from an older, poor performing unit are shown.
A characteristic of a grade efficiency curve is the 50 % separation point, or cutpoint. For a good operating TSS this is around 2 µm, whereas for the poor operating unit this is as much as 10 µm.
Treatment of the TSS Underflow
In order to be able to effectively and continuously achieve acceptable air emissions standards it is necessary to effectively treat the underflow from the TSS. This is achieved with a fourth stage separator (FSS). The type of design that is used for the FSS can dramatically affect the overall emissions performance. Even though the amount of flue gas flow from the FSS is very low, typically 3% of the total flue gas flow, due to the fact that it is laden with all of the particulate from the TSS, effective treatment of this stream must be achieved. Figure 8 illustrates the dramatic difference that can be seen in overall emissions by varying the FSS design. If we use 50 mg/Nm3 total stack emissions as a benchmark to indicate that the stack emissions are comfortably below the required emission levels, several interesting things can be learned from this figure. First, if the inlet dust loading to the TSS is low (less than 200 mg/Nm3), we can see that it is possible to achieve the desired outlet emission rate with a 4th stage single cyclone, (designed by Shell). However, at higher dust loads, the only way to ensure reaching the desired emission levels is with the use of a hot gas filter.
Current Rating : 4
Add your rating:
Your rate: 1 2 3 4 5


text:
The GLI Program
The challenges that our students will confront at graduation are increasingly global concerns, such as economic viability, population and environmental changes, effects of technological advances, ethical dilemmas, and the generation of wealth and resources. Our global society needs leaders and entrepreneurs to shape progress toward innovation, new technologies, and civic and cultural engagement. The University of Montana has developed a privately funded program to instill in its graduates more comprehensive understanding and broader perspectives to address such issues, as well as the leadership skills needed for the global century.
Each year, a broadly representative group of first-year students is invited to participate as Fellows in UM's Global Leadership Initiative (GLI). The program enriches an already strong university experience composed of major and general education coursework. By providing students with interdisciplinary coursework, out-of-classroom experiences, advising, and support, the GLI fosters skills that enable students to critically examine global challenges and achieve genuine confidence in their knowledge and abilities.


text:
May 20, 2009
The Cook Islands are closely associated to New Zealand. Air New Zealand is the only air carrier that flies directly from the U.S. to the Cook Islands. As you will see below, the Cook Islands use the NZD as their currency.
Despite some 90,000 visitors a year to the capital island, Rarotonga, the Cook Islands are largely unspoiled by tourism. There are no high-rise hotels, only four beach buggies and very little hype. The Cook Islands offer a rare opportunity for an authentic island holiday.
There are a total of 15 islands in the heart of the South Pacific spread over 850,000 square miles with a population of approximately 15,000. The Islands most visited are Rarotonga and Aitutaki which are only 140 miles apart.
Cook Island History
Ru, from Tupua'i in French Polynesia, is believed to have landed on Aitutaki, and Tangiia, also from French Polynesia, is believed to have arrived on Rarotonga around 800 AD. Similarly, the northern islands were probably settled by expeditions from Samoa and Tonga.
Cook Island Climate
Cooled by the gentle breezes of the Pacific, the climate of these islands is sunny and pleasant. Roughly speaking, there are two seasons: from November through May the climate is hot and humid, and from June through October the climate is warm and dry. Most of the rain falls during the hot season, but there are also many lovely sunny days during these months, with refreshing trade-winds.
Cook Island Geography
The Cook Islands consists of two main groups, one in the north and one in the south. The southern group is nine "high" islands mainly of volcanic origin although some are virtually atolls. The majority of the population lives in the southern group. The northern group comprises six true atolls.
Cook Island Southern Group
Aitutaki, Atiu, Mangaia, Manuae, Mauke, Mitiaro, Palmerston, Rarotonga (the capital island), Takutea.
Cook Island Northern Group
Manihiki, Nassau, Tongareva (Penrhyn) also known as Mangarongaro, Pukapuka, Rakahanga, Suwarrow
Cook Island Time Zones
Rarotonga and Aitutaki are in the same time zone.
Cook Island Currency
New Zealand dollar.
Cook Island Language
English and Cook Island Maori.
Call the "Island Travel Gal" at _PHONE_ or email _EMAIL_
to secure your seats to the idyllic Cook Islands
If you enjoyed this post, make sure you subscribe to my RSS feed!


text:
In a recent Edweek blog post, Dr. Peter Dewitt, the author of several books on school leadership, asked if instructional coaching has become a dumping ground for miscellaneous duties. Duties that take coaches away from working directly with teachers, he says, should not be in coaches' job descriptions and can be destructive to relationships between coaches and teachers. In particular, duties that are administrative in nature can create a negative perception because coaches are not administrators.
BetterLesson's coaches have supported school-based coaches who wear additional hats like testing coordinator, behavior monitor, front office staff, and interventionist. And it's as true for education as in any other field: the more hats you wear on the job, the less effective you can be at any one thing.
Coaches should have responsibilities that maximize their skills as facilitators of adult learning. They should be empowered to build systems that allow them to be efficient and consistently grow their impact, not just by spending more time with teachers, but by building teacher capacity to become more self-sufficient risk takers who reflect and plan next steps independently over time.
Below are examples of responsibilities that have the potential to limit coach effectiveness, followed by responsibilities that help coaches effectively impact teacher and student growth.
Responsibilities that Limit Coach Effectiveness
- Supporting students when teachers are not present. This might include substitute teaching, handling behavior issues, or administering assessments. In the cases where student intervention is built into a coach's role, it is important to consider how much of the coach's time this takes and the degree to which coaches are able to share with teachers the practices they are employing.
- Becoming the pacing enforcer. Dr. Dewitt warned of the negative consequences of coaches becoming compliance officers who monitor curriculum pacing. Teachers will have more trouble developing trusting relationships with their coaches if they feel the biggest thing the coach is holding them accountable for is covering the "right" material at the "right" time. Similarly, coaches should not assess the fidelity of curriculum implementation. This task should fall under the purview of administrators.
- Performing administrative duties. There will always be mundane, operational tasks to be completed as part of the daily functions of a school. Supervising students in unstructured environments, running inventory checks, and miscellaneous paperwork can be part of everyone's job, teachers included. Distributing these responsibilities equitably is an essential starting point, and periodically monitoring the amount of time coaches are unable to spend with teachers due to other responsibilities will help ensure that administrative duties don't get gradually heaped onto a coach's workload.
Responsibilities that Maximize Coach Effectiveness
- Meeting with Teachers One-on-One. This is the bread and butter of coaching, and it's where the most impact can occur. Individual meetings are places for discussing concrete, attainable goals for student learning and drilling into the qualitative and quantitative evidence related to those goals. These meetings are opportunities for teachers to reflect in a non-evaluative space and, together with their coach, plan for implementation of new or modified instructional strategies.
- Curating and disseminating resources for teachers. Coaches often support more teachers than they can meet with in a single week, so spending some of their time gathering or creating resources can expand teacher access to their expertise. Some coaches create flipped systems in which they record videos or share articles with teachers, then address teacher questions over email or during efficient 1:1 coaching sessions.
- Observing teachers and providing relevant, actionable feedback. Ideally, a coach should visit a teacher's classrooms when the teacher is implementing a strategy or system that is connected to the goal the coach is supporting the teacher to achieve. This means that coach schedules should be flexible enough to allow them to visit different classrooms at different times. Feedback should always connect to goals, and therefore should focus on one or two targeted recommendations rather than an exhaustive list of what was observed and what could have been done differently. Observations are critical to the coaching relationship, but must be supported by ongoing one-on-one meetings in order for the coaching process to result in practice change and student growth.
Administrators should keep the lines of communication open and friendly with coaches so that coaches can speak up if their responsibilities are ever unclear or detracting from their time supporting teachers. As a general rule, coaches will have the greatest impact on teacher growth and student outcomes when they spend the majority of their time supporting teachers to reflect on and improve their teaching.
Learn more about building a strong coaching culture in BetterLesson's Guide to Implementing Instructional Coaching.


text:
Spring in the Mountains 2008 / Spring in the Mountains trek pix-13
May 2–4, 2008
The Smokies are home to many species of land snails. Identification is possible (with practice) by examining features such as the shell spiral, overall size, and whether the opening is toothed or not. Snails are important part of the leaf litter and some species are an important source of calcium for many other animals.


text:
Information about software packages installed on the ICHEC systems.
NCO: Network Climate Operators
The netCDF Operators (NCO) are a suite of standalone, command-line programs like, e.g., ls or mkdir. Each operator takes netCDF files as input, then operates (e.g., derives new data, averages, hyperslabs, manipulates metadata) and produces a netCDF output file. NCO primarily aids manipulation and analysis of gridded scientific data. The single-command style of NCO allows users to manipulate and analyze files interactively, or with simple scripts that avoid some overhead (and power) of higher level programming environments. The NCO User's Guide illustrates their use with examples from the field of climate modeling and analysis. Note that the "averagers" are misnamed because they perform many non-linear operations as well, e.g., total, minimum, maximum, RMS.
NCO is available under the GNU General Public License, v3.
To use NCO on Fionn, load the relevant environment module:
Further information can be obtained at _URL_


text:
As coronavirus cases continue to surge across the world, including ours, there are some activities which are supremely risky-including touching our face.NASA, joining the league of innovative inventions has now come up with a unique body accessory which will "beep" when it senses a person trying to touch their face.
How does the model work?
1. NASA's new innovation has been named, 'PULSE'. The app works by alerting the wearer of the gadget to stop exposure to the risky activity. When a person, wearing the gadget gets their hand too close to the face (knowingly or unknowingly), PULSE triggers a beeping noise and alerts the wearer of the same.
2. PULSE, which is a 3D printed device has a tiny vibration motor in place, "The haptic feedback from a vibration motor simulates a nudge, reminding the wearer to avoid touching these entryways in order to reduce potential infection", reads a statement released by the makers.
3. The gadget, which has been shaped like a pendant is to be worn around the neck and works the best when placed 6 inches below the chin.
4. Experts also added while the pendant is a one-of-kind invention which could cut down exposure to infectious habits, wearing a mask and washing hands is still important.Some months back, a startup, 'Slightly Robot' developed a wristband that served a similar purpose-the accelerometer in the band senses your hand movement 10 times per second.


text:
Plan for Success: Simulation Program Development and Sustainability (1090-004054)
Start time: Monday, March 1, 2021, 4:00 PM End time: Monday, March 1, 2021, 5:30 PM CE Hours: 1.50 Session Type: Prerecorded Educational Courses
Learning Objective 1:
Describe why a business plan is important and at least three elements commonly included in a business plan
Learning Objective 2:
Outline a framework for simulation program sustainability
Learning Objective 3:
List the challenges encountered in designing a simulation facility
Content Category: Educator
This course is a general overview of the topic.
Think-Plan-Buy. This intensive, interactive course focuses on the core concepts of simulation program development. Participants will be expected to develop and present their collective work from exercises related to business planning, sustainability, value-based simulation and purposeful facility design. Faculty will share their experiences and knowledge of best known practices in simulation program development.


-the-case-explorer" style="color:#132c56">About the Case Explorer</a> > Use the Case Explorer
Use the Case Explorer to visualize and select TCGA GRCh38 cases. 1. Select a disease type from the drop down menu labelled **Select Disease**. 2. Enter a gene name manually or select a gene from the **Top Mutated Genes** table. 3. Filter your search results based on the presence of mutation, mutation type, or gender from filters below the scatter plot. 4. Select relevant cases on the scatter plot to display their Case ID in a table format. Export the selected cases as a CSV file. Or, click on **Continue to Data Browser** take the cases to the [Data Browser](doc:about-the-data-browser), an interactive query interface, to filter cases and related TCGA entities by their metadata before accessing the resulting data for further analysis. ##Case Explorer Video [block:embed] { "html": false, "url": "_URL_ "title": "Case explorer_new.mp4", "favicon": "_URL_ "image": "_URL_ "iframe": true, "width": "100%", "height": "420px" } [/block]


text:
Smallholder farmers are being advised to embark on diversifying crops in their farmlands to lower risks of total crop failure and sustain income.
In Nakuru County farmers have benefited from agricultural biodiversity training by Buildings Eastern Africa Community Network is which targets to improve crop production and attain food security
Food insecurity is still a crisis in some parts of Kenya and to help curb this, farmers are being taught the importance to practicing agricultural biodiversity.
Buildings Eastern Africa Community Network (Beacon) has launched a two year program to promote sustainable food systems and nutrition by enlightening farmers and locals on biodiversity.
Simon Ngige a farmer from Taka-mema farmers association says they have created a policy as an association to enable them diversify their farming by cultivating several crops within their farms.
He says that for a long time, farmers in the area have been cultivating only one crop but after receiving training from BEACON, farmers now have a chance to exploit biodiversity with the same resources they had before to attain better results.
Agricultural extension officers have also been challenged to make more visits to the small scale farmers in order to equip them with modern farming skills for maximum yields in their farms.


How to convert HEIC to JPG or PNG on your Mac
If you are using iOS 11 or a later version you must have noticed the new HEIC file format of the photos taken with your iPhone camera. It takes time to adapt to new features, so it will take a while for HEIC to go mainstream. The new file format has compatibility issues with some apps or devices, thus forcing people to opt from HEIC to JPG. Here is a guide on how to convert it.
What is a HEIC file?
HEIC originates from Apple's initial HEIF (High-Efficiency Image File Format). Moving Picture Experts Group (MPEG) developed HEIC as an upgrade to the popular JPG file format.
Let's look at the improvements the newer file format intends to add to your pictures. A HEIC file is smaller in terms of storage data but still retains its high quality. According to MPEG, HEIC images take up about half of the storage space required by JPG images with similar quality. If you multiply the space saved by thousands of images taken the outcome is outstanding. Don't you love saving some space to store other files on your device?
While the HEIC file format offers you great benefits, you have to adapt to the fact that popular software and operating systems have not adapted it yet. Furthermore, the format is quite problematic on some apps, devices, or websites. Your only solution is to convert it.
How to convert HEIC to JPG on your Mac
With predominant software and operating systems not adopting HEIC, such images have compatibility issues on certain apps or devices. Most people are having a difficult time trying to adopt the newer HEIC file type.
Are you having trouble adopting the HEIC file format? There is a solution if you want to convert HEIC to JPG using a Mac. Apple's Photos app does more than just managing your pictures in place. You can also convert the HEIC file to JPG. Here is a guide on how you can convert the HEIC file type using the Photos app on your Mac:
 - The first step is to import the HEIC image into your Mac's Photos app. The other option is dragging the image into the Photos app.
 - The next step is selecting the image you intend to convert. Click and drag the image into any Finder window. The conversion to JPG is automatic.
Convert HEIC to JPG with Preview
How often do you need to convert HEIC images to JPG? Are you just looking for an image to upload online as an avatar? Preview is an excellent alternative for occasional conversion of HEIC to JPG for those who do not use Apple's Photos app – Preview is Mac's default app for viewing images. There is a lot more you can do with Preview. It does not only display documents and photos but also edit, mark, sign or watermark them. Here is a step-by-step guide on how to convert HEIC to JPG using Preview:
 - Open the image in Preview
 - Click File then Export in the menu bar
 - In the Format drop-down – select JPG and adjust settings as required
 - Click Save
How to copy text from HEIC image on Mac
Some people struggle to copy text from an image. You can easily copy text from HEIC images on your Mac using the TextSniper app. Navigating TextSniper is simple, and the text recognition on this app is so fast. Wondering how you can copy text from HEIC images using TextSniper? Here is a step-by-step guide:
 - To start, press CMD+Shift+2 or click "Capture Text" from the menu bar
 - The app will quickly recognize the text inside the selected image area and copy it to the clipboard
 - Press CMD+V to paste the text to the editor, messenger, notes, or any other software
Click the link above to give TextSniper a try. It has a 7-day money-back guarantee in case you are not satisfied with the app!
How to change HEIC to JPG on Mac
There are plenty of third-party apps that can convert an image from HEIC to JPG. One such app is the iMazing HEIC Converter. This HEIC to JPG converter is efficient and simple to use. It also protects your privacy when you convert images on your computer. Uploads to iMazing HEIC Converter do not take long since there is no unknown cloud service. Here is a guide on how to convert HEIC to JPG using the iMazing HEIC Converter:
 - The first step is installing the iMazing HEIC Converter on your Mac computer. The app is free.
 - Drag and drop the folder or file containing the HEIC image(s) on the iMazing HEIC Converter's window.
 - Click "Convert" and choose a location folder to save the converted images
How to convert HEIC to PNG on your Mac using Photos
Everyone has their preferred file format. If you are having trouble adopting the newer HEIC and JPG does not appeal to you, PNG is also an option. There are several ways to convert HEIC images to PNG. One of the easiest ways to convert HEIC to PNG on your Mac is using the Photos app. The HEIC to PNG process is quite straightforward. The process might be simple, but it is very efficient. Here are the steps to follow during the conversion:
 - Open the Photos app and look for the image you want to convert
 - Select the image
 - Click File > Export > Export Photo
 - Choose PNG on the drop-down menu
 - Click Export
 - Choose location to save the converted image and click Export
 - And just like that, you have your PNG image.
With this guide converting images from one format to another should not be a problem anymore. If you ever need to convert your images, the procedures demonstrated will allow you to do so comfortably. You can either use Apple's Photos app, Preview, or any third-party converter of your choice.


Blocks storage sharding
In Cortex, when using the experimental blocks storage, each querier internally runs the Thanos BucketStore. This means that each querier has a full view over all blocks in the long-term storage and all blocks index headers are loaded in each querier memory. The querier memory usage linearly increase with number and size of all blocks in the storage, imposing a scalability limit to the blocks storage.
In this proposal we want to solve this. In particular, we want to:
 1. Shard blocks (index headers) across a pool of nodes
 2. Do not compromise HA on the read path (if a node fails, queries should continue to work)
 3. Do not compromise correctness (either the query result is correct or it fails)
Proposed solution
The idea is to introduce a new Cortex service - store-gateway - internally running the Thanos BucketStore. At query time, a querier will run a query fetching the matching series both from ingesters and the subset of gateways holding the related blocks (based on the query time range). Blocks are replicated across the gateways in order to guarantee query results consistency and HA even in the case of a gateway instance failure.
Ring-based sharding and replication
In order to build blocks sharding and replication, the store-gateway instances form a ring. Each gateway instance uses a custom MetaFetcherFilter to filter blocks loaded on the instance itself, keeping only blocks whose hash(block-id) is within the tokens range assigned to the gateway instance within the ring.
Within a gateway, the blocks synchronization is triggered in two cases:
 1. Periodically
 to discover new blocks uploaded by ingesters or compactor, and delete old blocks removed due to retention or by the compactor
 2. On-demand
 when the ring topology changes (the tokens ranges assigned to the gateway instance have changed)
It's important to outline that the sync takes time (typically will have to re-scan the bucket and download new blocks index headers) and Cortex needs to guarantee query results consistency at any given time (see below).
Query execution
When a querier executes a query, it will need to fetch series both from ingesters and the store-gateway instances.
For a given query, the number of blocks to query is expected to be low, especially if the Cortex cluster is running the query-frontend with a 24h query split interval. In this scenario, whatever is the client's query time range, the query-frontend will split the client's query into partitioned queries each with up to 24h time range and the querier will likely hit not more than 1 block per partitioned query (except for the last 24h for which blocks may have not been compacted yet).
Given this assumption, we want to avoid sending every query to every store-gateway instance. The querier should be able to take an informed decision about the minimum subset of store-gateway instances which needs to query given a time range.
The idea is to run the MetaFetcher also within the querier, but without any sharding filter (contrary to the store-gateway). At any given point in time, the querier knows the entire list of blocks in the storage. When the querier executes the Select() (or SelectSorted()) it does:
 1. Compute the list of blocks by the query time range
 2. Compute the minimum list of store-gateway instances containing the required blocks (using the information from the ring)
 3. Fetch series from ingesters and the matching store-gateway instances
 4. Merge and deduplicate received series
 - Optimization: can be skipped if the querier hits only 1 store-gateway
Query results consistency
When a querier executes a query, it should guarantee that either all blocks matching the time range are queried or the query fails.
However, due to the (intentional) lack of a strong coordination between queriers and store-gateways, and the ring topology which can change any time, there's no guarantee that the blocks assigned to a store-gateway shard are effectively loaded on the store-gateway itself at any given point in time.
The idea is introduce a consistency check in the querier. When a store-gateway receives a request from the querier, the store-gateway includes in the response the list of block IDs currently loaded on the store-gateway itself. The querier can then merge the list of block IDs received from all store-gateway hit, and match it against the list of block IDs computed at the beginning of the query execution.
There are three possible scenarios:
 1. The list match: all good
 2. All the blocks known by the querier are within the list of blocks returned by store-gateway, but the store-gateway also included blocks unknown to the querier: all good (it means the store-gateways have discovered and loaded new blocks before the querier discovered them)
 3. Some blocks known by the querier are not within the list of blocks returned by store-gateway: potential consistency issue
We want to protect from a partial results response which may occur in the case #3. However, there are some legit cases which, if not handled, would lead to frequent false positives. Given the querier and store-gateway instances independently scan the bucket at a regular interval (to find new blocks or deleted blocks), we may be in one of the following cases:
a. The querier has discovered new blocks before the store-gateway successfully discovered and loaded them b. The store-gateway has offloaded blocks "marked for deletion" before the querier
To protect from case (a), we can exclude the blocks which have been uploaded in the last X time from the consistency check (same technique already used in other Thanos components). This X delay time is used to give the store-gateway enough time to discover and load new blocks, before the querier consider them for the consistency check. This value X should be greater than the -experimental.blocks-storage.bucket-store.consistency-delay, because we do expect the querier to consider a block for consistency check once it's reasonably safe to assume that its store-gateway already loaded it.
To protect from case (b) we need to understand how blocks are offloaded. The BucketStore (running within the store-gateway) offloads a block as soon as it's not returned by the MetaFetcher. This means we can configure the MetaFetcher with a IgnoreDeletionMarkFilter with a delay of X (could be the same value used for case (a)) and in the querier exclude the blocks which have been marked for deletion more than X time ago from the consistency check.
The proposed solution comes with the following trade-offs:
 - A querier is not ready until it has completed an initial full scan of the bucket, downloading the meta.json file of every block
 - A store-gateway is not ready until it has completed an initial full scan of the bucket, downloading the meta.json and index header of each block matching its shard
 - If a querier hits 2+ store-gateways it may receive duplicated series if the 2+ store-gateways share some blocks due to the replication factor