Could extremophiles evolve intelligence?

Question: This new idea/story includes an ancient subterranean race, but they need to survive harsh conditions.  Developing a nervous system/brain is important.  Are certain proteins necessary to form a complex brain or can they thrive on volcanic conditions to become sentient?  (i.e. carbs/protein vs chemicals, in line with deep underwater life found near volcanic vents)
Part of story below, as humans accidentally discover technology from another race indigenous to Earth, a secretive and well hidden species, hence an unknown subterranean world.  Hope this question makes sense, as I need scientific explanations for the existence of this 50-million year old race with superior intelligence/technology.
https://artidan007.wordpress.com/2016/11/26/black-knight-antarctic-dawn/
Comment: And they never used their superior intelligence/technology to venture onto land? I'd be more interested in the natural selection forces promoting intelligence in such a niche environment.
Comment: The problem with subterranean extremophiles is that they really can't grow very large, since they exist in cracks in rocks.
Answer:  It's more likely that animals eating the extremophiles will evolve intelligence.
The problem with extremophiles themselves evolving intelligence is that they tend to function best in very specific conditions. Bacteria that live around hot springs, for instance, don't tend to live outside of a narrow environmental band that they've adapted to. Acidophiles, similarly, won't be found outside of highly acidic environments.
However, there are animals that eat extremophiles that are found outside these areas. Some marine worms, for example, eat bacteria that thrive in extremely high temperature environments in and around undersea vents. These worms generally keep the respiration and important bodily functions end of their body in relatively cool water, with only the mouth end in the high temperature environment, allowing them to thermoregulate their bodies to some extent and not die.
These worms are still considered extremophiles, but the animals that eat these worms may not be. In an environment with a sufficiently rich food source based on extremophiles living in a chemically rich environment, it's possible that an ecosystem containing life forms significantly more complicated than worms may arise with extremophiles as the bottom of the food chain, but not the entirety of the food chain. The predator animals, probably predators towards the top of the food chain, would have reason to develop intellect and tool use as a means of attaining food supplies that fight back more than things like sulfur or bacterial mats.
If there were a potent, consistent source of energy deep beneath the Earth supporting an extremophilic population, it's possible that your intelligent creatures could have evolved as part of an ecosystem completely disconnected from the surface. For example, they could live on a uranium deposit which bacteria like desulforudis audaxviator have evolved to utilize as a food source. If these bacteria exist in sufficient numbers, they could serve as a food source for shipworm-like creatures that burrow into the uranium mass, while keeping their reproductive systems out of harms way. Everything else in the ecosystem could ultimately feed on these creatures, with your sentient race somewhere near the top of the food chain.
Without any connection to the surface, and without a need to move away from their food sources into the radiation-free rock above, it's possible that an intelligent race could evolve without any knowledge of the surface. However, it's unlikely that they would develop technology on the level that we possess and remain strictly underground. Intelligent creatures would likely develop technology and scientific theory that would lead them to learn that they live underground on a spherical planet. Such creatures would have no reason no to want to at least explore the surface of the Earth, even if they have no reason to believe that life could live there, away from the uranium beds. By the time they reached our technological level, they'd certainly have drilled up to the surface so see what's up.
Comment: If they don't need the surface how many millions of years are they expected to care about it?
Comment: Exactly @ckersch, what I thought could transpire...with weird energy?  Over time, these creatures conquered their small protected ecosystem to become the dominant predators. Perhaps eating other bacteria could expand their chemical/bio mix...by  adopting traits/cells from nearby species could  evolve new and useful abilities/appendages...a push to acquire new resources.   Surface stuff drips, so they might resent our waste.
Comment: @notstoreboughtdirt We don't need Mars or the Moon, but that certainly doesn't stop us from sending rockets, probes, and explorers there. I'd imagine our hypothetical troglodytes would want to explore the surface out of a similar sense of curiosity.
Comment: @Artidan22 Horizontal gene transfer doesn't tend to occur between complex creatures, nor does trait transfer. Structures like appendages are too complex and integrated with the rest of the circulatory/nervous/lymphatic system to swap between creatures. Intelligent creatures would probably evolve to be good generalists with a reliance on tools to manipulate their environment. These particular creatures would probably also be fairly slow and weak, compared to humans, since they live in a fairly anaerobic environment.
Comment: The anaerobic thing is going to be the big problem (well, beyond finding enough space for large complex creatures underground). Large brains are really high energy. You'd need some other high-energy chemical process to substitute for oxygenic respiration.
Answer: Evolution by its nature changes the design life around issues in environment. Considering that life manages to thrive in almost all environments, I'd say the biggest difficulty with extremophile intelligence is less dependent on chemical requirements and more on actual competition in such a harsh environment.
Modern theories regarding the evolution of human intelligence point at harsh conditions and prey status as strong catalysts for advancement. The points of major relevance can be distilled to three reactions to predators by humans that drove them to higher intelligence:

Better situational assessment -
   Early Homininae reacted to increasing exposure to predators by leaning towards bipedalism which allowed them to see more of the environments due to increased height
Handedness -
   Those same Homininae soon took to handedness as a means of wielding the environment against their predators
Brain Size increase -
   As the Homo genus began to emerge, brain size developed with them. This allowed the hands to utilize fine motor control for the construction of tools used to best the physical more capable predators in nearly every condition. Also, the brain allowed development of communication between individuals that allowed very precise coordinated efforts when tools alone would not suffice.

Assuming your environment creates and maintains a predator of sorts that requires the intelligent species to evolve to be more intelligent to handle it, you have a fine method of reasoning. To following up on Samuel's comment, another issue is explaining the secretive existence of the species. Perhaps a system of religion or even an instinct that evolution created to drive the species to where they are and keep there would suffice.
Comment: I see them developing a loving/caring collective, their intelligence turned inward to explore unknown areas of the mind/soul/spirit...something humans ignore, plus our war-like ways would scare anything away.


Benefits of man makers workout

Question: What are the benefits of the Man Makers workout? Which muscles will it develop? How many sets and reps everyday do I need to do for muscle growth?
Comment: Currently this is unclear, what is a "man maker" workout?
Comment: it seems like you need to read at the source. Have you googled this exercise?
Comment: Welcome to PhysicalFitness.SE! Your question as it stands is too vague and needs to be revised in order to get a detailed response. Is this a particular exercise, or is this a full workout that contains multiple exercises, can you explain in detail on either case?
Comment: Man Maker  workout is particular exercise! More details on this site: [bodybuilding.com/exercises/man-maker](https://www.bodybuilding.com/exercises/man-maker)
Comment: I want know which part of muscles in body will grow doing man maker? I thought one of the muscles which grow via man maker workout is lower back ! Maybe another muscles grow via man maker workout?
Answer:
What is the benefits of man makers workout?

You have all the benefits. Improving your health, performance and increase your self esteem, etc. when you start seeing the results you will not want to stop and this will motivated you in your workouts.

Which part of my muscle will grow?

It depends on your purpose. For beginners, I recommend the compound exercises (bench press, deadlift & squat). These exercises work the body completely and help you to gain a
good structure.

How many sets and reps everyday do I need to do for muscle growing?

The most important is to "shock" the muscle. For each exercise, start with 3-4 sets with 10-15 reps then you will adjust as soon as you gain experience and know your body. You can divide your workout into:

push day:
chest, front and side delts, triceps
pull day:
back, back delts, biceps
leg day:
quads, hamstrings, calfs

For some inspiration and motivation see this: How To Train For Mass | Arnold Schwarzenegger's Blueprint Training Program

Benefits of man makers workout


Can an Asynchronous Trigger run parallelly with Batch Apex/Future/Queueable or it's added in queue

Question: I am planning to write an Asynchronous Trigger but I am not any documentation, if Async Trigger can run parallelly with other async process or it's added in queue based on availaible resources.
Thank you
Answer: I think the only real indicator we have is this statement:

Unlike triggers on standard or custom objects, triggers on platform events don't execute in the same Apex transaction as the one that published the event. The trigger runs asynchronously in its own process. As a result, there can be a delay between when an event is published and when the trigger processes the event.

But this doesn't tell us if these triggers share the same queue as Scheduleable/Queueable/future/Batchable calls, or if they're a separate queue. I'm pretty sure that asynchronous code would have a lower priority than these events, however, given that these events are still under synchronous limits.

Synchronous Governor Limits

When governor limits are different for synchronous and asynchronous Apex, the synchronous limits apply to platform event triggers. Asynchronous limits are for long-lived processes, such as Batch Apex and future methods. Synchronous limits are for short-lived processes that execute quickly. Although platform event triggers run asynchronously, they're short-lived processes that execute in batches rather quickly.

This restriction on execution time means that they're expecting a lot of these events, and that they must be processed quickly. This would suggest a higher priority than the background tasks that have a lower urgency.
So, it's probably safe to say that, under heavy load, these triggers are likely to execute sooner than non-priority jobs from Batchable, Queuable, and future.


max possible number of dice throw

Question: Scott repeatedly rolls a pair of standard six-sided dice and keeps track of the
sum of the two numbers rolled each time. So far he has not rolled any sum
twice. What is the maximum possible number of times he has thrown the dice?
Answer: So there are

 11 different outcomes for 6-sided pairs of dice, from 2 to 12. He could therefore have rolled the dice a maximum of 11 different times to get each of the different outcomes exactly once.

max possible number of dice throw


Best lens for landscapes/general zoom with Nikon D7200?

Question: I have been using D7200 for almost 4 years now, got the 18-140mm kit lens along, which i have stopped using since an year now, the image quality was pathetic, lacked sharpness throughout the photo, I am looking for a replacement, I mostly shoot Landscapes, couple shoots or portfolios, events. So i need something which covers wide to telephoto range. Maybe a 24-120mm? Is it a good lens? Never got a chance to test it!
Comment: All of them. Buy all of the lenses. Every.Single.One.
Comment: See https://photo.stackexchange.com/questions/tagged/landscape
Answer:
So i need something which covers wide to telephoto range.

If you care about getting top-notch image quality from your equipment, trying to do it all with one lens isn't the solution. Get a selection of lenses, and change as appropriate - it's an interchangable lens camera for a reason.
As for which lenses to get, that's where you have to decide which compromises work best for you. The "holy trinity" (at least on full-frame) is the combination of the 14-24, 24-70 and 70-200 f/2.8 lenses, but I'm guessing you probably don't want to spend $6k or more on lenses. If you don't want that, decide whether you're prepared to compromise on:

Zoom range
Image quality
Aperture
etc...
Comment: Thanks for your answer! All i meant to ask in my question was, if there is anything which covers a range like 18-140mm. No worries, you have answered my question there. :) Cheers.
Answer: The entire point of an interchangeable lens system camera is to allow you to use different lenses that are better or even great at one thing but unsuitable for other things. Fixed lens cameras force you to use a single lens that is mediocre or worse at a lot of things but better at nothing. Insisting on using only a single lens with an interchangeable lens camera is not materially different than using a camera with a permanently attached zoom lens.
The best lenses are all prime lenses. That means a single focal length. No.Zoom.At.All. They're really good when they provide the field of view and other characteristics you need. This is because they can be optimized to do one thing at one focal length. A good flat field 100mm macro lens is different from a good 85mm, 105mm, or 135mm portrait lens. But such specialized lenses are not always very flexible, so you need a lot of them for various different things. Some are pretty good for not much money (e.g. EF 50mm f/1.8 STM @ $120). Others are incredibly good for a boatload of cash (e.g. EF 400mm f/2.8 L IS II @ $10K). Most fall somewhere in between.
Short ratio zoom lenses, that is zoom lenses with a less than 3X difference between their longest and shortest focal length, can also be very good. But the best ones cost a lot. A lens like the Canon EF 24-70mm f/2.8 L II runs around $2K and can match the image quality, if not the maximum aperture, of a $120 EF 50mm f/1.8 STM. It's also built a bit better and can shoot at 24mm (with near the same IQ as a mid-priced 24mm prime) and 70mm and anywhere in between.
When you move outside of the 3x limit is when image quality really starts to noticeably go down. Some 4-5X zoom lenses that fall entirely in the telephoto range can be pretty good. But when you start trying to design a lens that goes from wide angle to telephoto and covers a 5X-10X or more zoom range, that is when it really starts getting difficult to keep it affordable and manageable with regard to size and weight and still provide excellent image quality. You'll usually get better image quality and spend less buying something like an 18-55mm and a 55-250mm pair of zoom lenses than you would get with an 18-200mm 'all-in-one'.
Will you get better image quality with the AF-S 24-120mm f/4G ED VR than with the AF-S DX 18-140mm f/3.5-5.6G ED VR? You probably will. It probably won't be as big of a difference as you seem to expect or want, though. The difference will not be near as much as you'd see using different lenses specifically designed for specific photographic tasks.
Comment: Thanks for your answer! Its been helpful. Cheers. :)


vsftpd log file location?

Question: Can someone tell me where is located the log file for vsftpd? I'm trying to learn how to install and configure a ftp server and I can't seem to find the log file. Can anybody tell me how to configure the service to make a log file or where is located?
Answer: The log file for Ubuntu by default is /var/log/vsftpd.log.  The setting is in /etc/vsftpd.conf
The default could be modified by specifying a different pathname (/etc/vsftp.conf entry):
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log

Comment: If you'd like to view a live, realtime log of all events happening on the FTP server, do `tail -f vsftpd.log`. Tail is a program that displays the 'tail' of a file, `-f` tells it to follow any data appended to the file, in this case, any new log entries in the ftp log `vsftpd.log`.
Answer: The logging of vsftpd is a bit more complex than other responses show. There are three logging mechanism, here is an example config of /etc/vsftpd.conf where I have added some comments for self-explanation:
# Below verbose log is for transfer/upload, formatted for common tools stats.
# Use command: tail -f /var/log/xferlog
xferlog_enable=YES
xferlog_file=/var/log/xferlog
xferlog_std_format=YES

# Below verbose log is for FTP commands and responses.
# By default, logs were written to syslog instead of file.
# Use command: tail -f /var/log/vsftpd.log
# Use command: logread -f
log_ftp_protocol=YES
vsftpd_log_file=/var/log/vsftpd.log
syslog_enable=NO

# Allow log 1 and 2 to be written simultaneously.
dual_log_enable=YES

Once modified at your discretion, you must do a: service vsftpd restart
Due to the amount of logging generated, you might want to disable it as soon as you are finished debugging. More specifically, reverting to syslog_enable=YES will move back to logging into RAM ringbuffer in OpenWrt and avoid wear out flash.
Answer: Sometimes it happens that the log is not filling any data, because the file doesn't exist.
Create a log file:
touch /var/log/vsftpd.log

Then
service vsftpd restart

Comment: The touch /var/log/vsftpd.log shouldn't be necessary.  If it is needed, it should be a sign that there is a problem with the vsftpd installation or configuration.  The log file should automatically be created if it doesn't exist.  I tested it to make sure this would indeed be the case, by renaming the /var/log/vsftpd.log.  It was automatically recreated to log the vsftpd activity.  The recreating is the same thing that happens when the log file is rotated... moved to /var/log/vsftpd.log.1.

vsftpd log file location?


Automatically generate an address for a token in the ERC20 and TRC20 network

Question: How to create USDT TRC20 and ERC20 addresses for my wallet automatically via an api.
I need to create USDT TRC20 and ERC20 addresses for a small exchange so that users can deposit their tokens, an address must be unique for each deposit transaction. However I can't find a documentation on a wallet that allows to do this.
Do you have a solution for me?
I use TRUST wallet. If Trust wallet is not suitable for this kind of transaction. What do you suggest?
Comment: I have not yet mastered the language of solidity and the writing of intelligent contracts. I'm looking for methods based on pre-existing tools and if possible opensource that I can use
Answer: Use Metamask or truffle-hd-wallet-provider for creating address.You can create 'n' no of address
Comment: can I generate addresses by api with metamask?My goal is to automatically generate a different address for a wallet to track user deposits
Comment: you can use of `truffle-hd-wallet-provider` which will generate different address .NPM package @truffle/hdwallet-provider is available
Comment: Thank you, I am currently reading the documentation of this library.
Do you know if a similar tool exists for the tron network with TRC20 tokens?
Comment: you can check `tron-wallet-hd` npm package for creating address in tron network
//accept ans if satisfied


What is meant by the statement of Our Lady to St. Dominic according to the Catholic Church

Question: Some people say that Mary promised St. Dominic, "Whatever you ask in the Rosary will be granted."  According to the Church, is this statement an authentic quote, and if so, what is the teaching behind it?
Comment: Some people say, do you have a recorded reference? Here https://en.wikipedia.org/wiki/Fifteen_rosary_promises, point 11
Comment: Devotion to Mary is a [sign of predestination](https://christianity.stackexchange.com/a/54066/1787).
Answer: Why would the Catholic Church make an explication on such a statement when such a tradition is in serious doubt?
The Catholic Encyclopedia has a more reserved approach to its' origin as a whole and tends to see the rosary as a natural development of piety of which St. Dominic does not have any particular role at all:

We have positive evidence that both the invention of the beads as a counting apparatus and also the practice of repeating a hundred and fifty Aves cannot be due to St. Dominic, because they are both notably older than his time. Further, we are assured that the meditating upon the mysteries was not introduced until two hundred years after his death. What then, we are compelled to ask, is there left of which St. Dominic may be called the author?
These positive reasons for distrusting the current tradition might in a measure be ignored as archaeological refinements, if there were any satisfactory evidence to show that St. Dominic had identified himself with the pre-existing Rosary and become its apostle. But here we are met with absolute silence. Of the eight or nine early Lives of the saint, not one makes the faintest allusion to the Rosary. The witnesses who gave evidence in the cause of his canonization are equally reticent. In the great collection of documents accumulated by Fathers Balme and Lelaidier, O.P., in their "Cartulaire de St. Dominique" the question is studiously ignored. The early constitutions of the different provinces of the order have been examined, and many of them printed, but no one has found any reference to this devotion.

Wikipedia goes on to say:

Alanus de Rupe (Alain de la Roche) was a 15th-century Dominican preacher, best known for his efforts to promote the Rosary. Alanus claimed to have experienced a vision by which it was revealed to him that the Blessed Virgin Mary had appeared to St. Dominic and gave him the Rosary as a means to combat the Albigensian movement. Alanus de Rupe's revelation concerning St. Dominic and the Rosary was generally accepted until the 17th century when the Bollandists concluded that the account of Dominic's supposed apparition of Our Lady of the Rosary is not mentioned in any documents of the Church or Dominican Order prior to the accounts of Alanus over two hundred years later.
Comment: I don't think the OP is asking if St. Dominic got the Rosary from Our Lady. The OP is asking what it means to obtain everything asked through recitation. Also from tradition we know St. Dominic had visions of Mary and it is possible they might have discussed the promises.
Comment: "Blessed Virgin Mary had appeared to St. Dominic and gave him the Rosary as a means to combat the Albigensian movement." It doesn't necessarily mean he started the rosary. The rosary might have already existed. Mary just pointed it or recommended it to him.
Comment: @Grasper Of the eight or nine early Lives of the saint, not one makes the faintest allusion to the Rosary.
Comment: because it was a private devotion. I also started my own prayers and none of the current saints talked about them yet. :-)


As a non-security professional how should I respond when told my site is insecure?

Question: We have a website, and somebody wrote us an email claiming we are insecure!
What should I do
Answer: Stay calm, and be nice to the person reporting this. If they are contacting you, they only want to help, so do not threaten them.
Also don't ignore them, make sure they understand that you are interested in fixing this. Explain to them that you need time to do this; ideally you can give them a time frame in which you think that you can have this fixed (right now, it does not seem that you can estimate this, but keep this in mind for future incidents).
If you do not fully understand what they are telling you, you can ask for clarification and a proof of concept (although make sure to formulate it in a way that does not sound demanding. Depending on the country they are in, this might cause them legal trouble).
If you do not have developers who can fix this, either hire someone external or have your developers read up on common security issues and how to fix them (especially SQL injection) for the language (and/or platform, software, libraries, etc) that you use.
Answer: First thing is to follow Tim's advice with regard to responding to your contact. If it isn't clear what the nature of the problem is it would be worth asking them for more information as they appear to be interested in helping.
I suspect since you are asking here you don't have access to developers with experience of secure development or an IT department to fall back on? This leaves you the options of getting in external expertise,  or if that isn't an option, your developer (you?) trying to get up to speed.
If you know the nature of the issue follow the link to the OWASP top 10 below and brush up. If it's not on the list it's probably worth posting another question. Otherwise start at the top of the list and work through them I  turn determining if they could be the cause.
Suggest you start reading on OWASP for general information: https://www.owasp.org/
The most common issues in my experience are: XSS, Sql injections, lack of encryption, poor hanlding of authentication, sessions and authorisation.
You can find the OWASP top 10 here: https://www.owasp.org/index.php/Top_10_2013-Release_Notes
Answer: I think just an URL is not good enough to prove that your site is insecure(in most cases).
I assume that you might know neither the security architecture nor the functionality of your site, i suggest you to take things(reported URL) to your IT department. It would be great if they are able to identify the problem.
If not ask that critic for more information(defending your security at the same time getting the info they have got as a base) and pass it on to your team. If they identify that it is a security problem, then ask them to start working on the fix. Update the critic that you are fixing it. And don't forget to thank him for letting you know!


How come it was so easy for Francis Underwood to kill Peter Russo?

Question: In S01E11, Francis kills Peter which was then later assumed to be a suicide. How come Francis got away with this? Why was there only a handful of people asking questions? Why did no one really question the fact that Peter has been found in the passenger seat? This all just doesn't add up. Francis wasn't even a big deal back then. He was neither protected nor powerful. And he was very close to Peter - yet he hasn't been questioned about the death.
Answer: Because there is no reason to suspect murder. Yes, Russo had some more contact with Francis Underwood 'recently', but in the political circuit it's not abnormal for politicians to extend their network. It's certainly not abnormal for more 'senior' politicians to guide/foster more 'junior' politicians, so nothing suspicious there. Underwood's low or high position has nothing to do with that, though I wouldn't call the leading majority whip a low position (but I'm not an American so might be mistaken there).
Aside from that a major scandal about alcoholism just surrounded Russo, after which he has continued drinking and shown to be erratic. Even more, it was not new but a relapse. There is enough to suggest he was in a very bad situation, which is sadly not uncommon for people to commit suicide.
Your only point might be the passenger seat, but even that is not that weird. In essence there are two steps to this: starting the car and closing the garage door. It's not far-fetched to assume he came in driving, never stopped the car, got out to close the garage door, and got in on the passenger seat again. Yes, it may be a bit weird, but no, it's not that huge a deal to jump  to murder given all the above, certainly given that he was intoxicated (a simple test can confirm that).
Yes, this seems like a 'perfect' murder, does that make it realistic? No, because in real life finding a perfect target like Russo that is gullible, has few close relatives, has major personal issues but still has extreme professional success, while reacting extremely desperate to an 'assault'/scandal is extremely unlikely.
Comment: Everyone giving up on Peter so fast was what made me question the story. But maybe this is what life with an addict is like, I don't know that. I though at least Christina would put up a fight but probably she isn't much of a fighter.
Comment: @KillianDS "I wouldn't call the leading majority whip a low position". Also remember that Frank was supposed to be nominated for secretary of state in the first episode. This is one of the highest functions, so I would say he should be at least considered to be in the Top10 of the party


how to make the backgound transparent if image is half opaque?

Question:
hi this is the image in question. some parts of it are fading off soft of. and im really new to photoshop. i have no idea how i can effectively remove the background of this logo. please help. thanks!
Answer: Ideally for such simple shapes one would recreate this artwork in a vector application, such as Adobe Illustrator. It's not that complex. However if you must use Photoshop and must not redraw anything.....

Open the Channels Panel if it isn't already open (Window > Channels)
Drag the Blue channel to the New Channel icon at the bottom of the panel to copy it

Highlight the Blue Channel Copy and choose Image > Adjustments > Levels
Move the left and right triangles inward to the edge of the histogram and click OK

This will darken the channel and increase it's overall contrast. So the solid areas become black

Hold down the Command/Ctrl key and click the thumbnail for the Blue Channel Copy.
This will create a selection (marching ants) based on the channel.
Move the Layers Panel (with the selection active)
Hold down the Option/Alt key and click the Add Mask icon at the bottom of the Layers Panel

This will add a layer mask to the layer and make the white transparent

If you need to further refine things, you can use Levels or Curves on the mask you just created.
Answer: Just in this case the actual shape is totally mixed partially to the white background. I guess this tries to be "an impossible geometry B" so it is a solid piece, it only has too bright highlight.
I tried to guess the intended shape and drew the missing piece of the edge. It's made with the pen and it has got a stroke:

After inserting the missing edge the shape (not the black edge) is selected with the quick selection tool and copied to a new layer:

After some practicing one can draw with the pen the whole clipping path, convert it to a selection and get substantially more accurate background removal result than with color and contrast based methods.


How to handle songs whose scales are neither major or minor in harmonic mixing?

Question: Harmonic mixing typically relies on the circle of fifths, often renamed as the "Camelot wheel" in the context of harmonic mixing. However, that circle/wheel only contains two scales: major and minor. How should one handle songs whose scales are neither major or minor in harmonic mixing (Dorian, Phrygian, Lydian, etc.)?
Comment: Every scale is either major or minor - due to the ^3. In reference to root, major scales have M3, minors, m3. So mixing, or sequencing, that should make things easiy on the ears. After all, the 3 minor scales (harmonic, melodic, natural) all get used in many pieces, and have been for centuries.
Comment: @Tim Every *diatonic* scale (and a lot of others) are either major or minor, but there are some scales that are neither (by virtue of lacking a third). Two common examples that come to mind are the [suspended](https://ianring.com/musictheory/scales/1189) and [Scottish](https://ianring.com/musictheory/scales/677) pentatonics.
Comment: @piiperiReinstateMonica I played a music instrument for many years but I didn't receive the proper education in music theory. Hopefully intelligent computer stuff can one day better help students when human-spread education is lacking. But definitely without limiting human creativity.
Comment: @FranckDernoncourt I see, my wrong. Maybe you just didn't encounter  situations where you would have needed to relate "in E minor" with the wide variety of notes and chords that can happen along the way while still staying inside the category of "in E minor". But you can start the journey today, start playing songs by ear to get a practical hands-on feel for how things work. :)
Comment: @Theodore - which are both so rare, I've never encountered them in all my years of playing...
Comment: @Tim Maybe you've heard the suspended pentatonic called "neutral pentatonic"?  That seems to be a common alternate name, especially in jazz and rock improvisation.  Google gives "About 1,440,000 results (0.34 seconds)" for "neutral pentatonic scale".
Comment: @Theodore - that's just a mode of the pentatonic scale, nothing more. Had me going for a bit.
Comment: Handle what? If music is in a mode rather than key, or it changes mode, there isn't a problem to "handle." Just play the music.
Comment: @MichaelCurtis thanks, sounds like an answer
Answer: The Camelot Wheel groups major and minor scales together by giving them the letters B and A respectively, and relative scales together with the same number term (1–12).
For example, the scales that have a key signatures without any sharps or flats: C major (Ionian) is 8B, and A minor (Aeolian) 8A.
By this logic, D Dorian (also without any sharps or flats) should be some kind of 8, say 8D.  But this would be an extension to the Camelot system — if you're trying to use some DJ software it's probably not going to understand 8D.
Another way to think about it, would be that D Dorian is really just a special type of D minor (with a major 6th), so it should be grouped as 7A along with D Aeolian (natural minor), D Phrygian, and D Locrian.  Whereas the three types of D major scale: D Mixolydian, D Ionian, and D Lydian, should all be grouped as 10B.
This would also make it trivial to group the more exotic scales (that would otherwise be un-groupable because they aren't really relative to any major scale), such as Hungarian minor (with a minor 3rd and 6th, major 7th, and augmented 4th), etc.

The thing about scales/modes is that they can be used in a variety of different ways.  It could be just the melody that is using the scale, it could be just the harmony, it could be both, or perhaps something more complicated than that.  How your piece is using the scale will be relevant to how you should group it.  If you're using the Camelot Wheel to group together pieces with a similar harmony then you should probably stick to the major vs minor grouping.
Comment: That's weird - I actually treat music with a minor 2nd and major 3rd above the tonic as being in a *minor* key - probably because this combination of scale tones is most commonly found in Phrygian Dominant-like scales (i.e. resembling a mode of the harmonic minor scale).
Comment: @Dekkadeci That's supposed to be a reply to [Tim's comment](https://music.stackexchange.com/questions/133313/how-to-handle-songs-whose-scales-are-neither-major-or-minor-in-harmonic-mixing#comment250576_133313), right?
Comment: No, this is meant to be a reply to your statement that "This would also make it trivial to group the more exotic scales (that would otherwise be un-groupable because they aren't really relative to any major scale), such as Hungarian minor (with a minor 3rd and 6th, major 7th, and augmented 4th), etc.", which implies that D Phrygian Dominant and D Double Harmonic Major would be classified as 10B. With that system, I actually think of them as classified as **6A** due to them sounding like they are derived from G harmonic minor.
Comment: @Dekkadeci Regardless of the major 3rd, if D Phrygian Dominant and D Double Harmonic Major sound like they are *minor* scales (and they do) then I'd group them with the other D minors in **7A**.
Answer: What is harmonic mixing
There seem to be two kinds of practices that can be called harmonic mixing:

(1) common tonic mixing: keep the same key i.e. tonic and probably also the third (major/minor), or
(2) common pitch set mixing: mix things that are restricted to the same set of pitches, regardless of their tonics, as explained in this Franck Dernoncourt's answer.

Let's see what "harmonic mixing" is according to Wikipedia https://en.wikipedia.org/wiki/Harmonic_mixing

The primary goal of harmonic mixing is to create a smooth transition between songs. Songs in the same key do not generate a dissonant tone when mixed. This technique enables DJs to create a harmonious and consonant mashup with any music genre.

So this is clearly about mixing in the first meaning. But what does it say about keys again?

Songs in the same key do not generate a dissonant tone when mixed?

This approximation helps DJs get their work done, but if you go into musician land and actually find out how things work (as you have now done), you'll have to decide that the claim is not really true. Key is about tonic, not pitch sets.
To falsify the statement "Songs in the same key do not generate a dissonant tone when mixed", we can take any song that has chromatic alterations such as secondary dominants, tritone substitutions, dominants in a minor key, or just colorful chords, and we'll see that such a song isn't even mix-compatible with itself. There WILL BE dissonant tones when mixed.
For example the chorus of "Everybody Dance" by Chic, which goes like this:
<code>Cm    Ab       Bb
Everybody dance, do-do-do
          Ab      F/A       Ab/Bb
Clap your hands, clap your hands
</code>
The F/A chord will create a clash when mixed over any part of the same song that uses an Ab note, such as part of the previous line. And the song does not modulate, a chromatic alteration is not a key change.
Another example: the original non-remixed version "Sexbomb" by Tom Jones. It's in G# minor (before a modulation to C minor in the end-part), and it has C# or C#7 dominant chords, and those chords will generate a dissonant clash when mixed over many other sections of the song. Maybe that's the reason why there are various other versions of the tune where the chromatic alterations have been removed, and C# chords replaced with C#m chords?
What the Wikipedia page really tries to say is: mixing songs with a common key will be much less likely to create dissonant pitch clashes than mixing songs with different keys.
Common tonic mixing and modes
In-key (common-tonic) mixing would treat snippets of music in, say, G Dorian and G Aeolian modes as mixable in some way. Or if you like, even G Ionian. And of course traditional in-key music with chromatic alterations of scale degrees like secondary dominants, diminished sevenths, tritone substitutions etc. Mixing audio from modes with the same root/tonic but different scales or the same key center but with chromatic alterations, so that they play at the same time can clearly create pitch clashes (despite what Wikipedia says), so it's better to do the mixing more like switching between the samples or songs. If you do a cross-fade, the longer it takes, the bigger the risk of something clashing, even if the tunes are in a common key. If you do it quickly, or if you're just lucky, you will get a certain feeling of modal change or mixture, but without chaos. If the key center stays the same, there will be a feeling of continuity. As long as clashing pitches aren't played completely simultaneously, chaotic feelings are avoided as well. (There are some exceptions to this, for example you can play C minor pentatonic lines over C major, and the clashes can actually sound really good)
In addition to plain old DJ'ing where you play track after track, a relevant use-case for in-key mixing could be techno/house/dance where you want to keep your kick drum and maybe bass rumble tuned to the tonic. For example, G, for 909 kicks. If your kick is hammering on G, it's a musical choice to use a track in G something, for your French house mix.
Common pitch sets
Then the common-pitch-sets mixing. (I deliberately and specifically do not say "common scales" because conceptually, a scale has a root note, and if the root is different, it's not the same scale. If you want to, you can forget this distinction and just talk about scales, but it may cause confusion if it's not clear when you mean that the roots are the same too, and when you don't mean that.) Here the idea is to find things that can be played really simultaneously, without creating pitch clashes. If you have a backing chords loop which uses, say, Em7 and Am7 chords, it is pitch-set-mixable with the C major scale and all its modes, and the G major scale and all its modes. To find a melody loop that does not clash with the backing chord loop, you could take anything that only uses the pitches in any of those scales. Depending on what the root or center of the melody happens to be, you'll get different harmonic feels as a result.
For example, if your backing chords are Am7 and Em7, you could use a melody line that's in D Mixolydian. Maybe an interesting combination?
To sum this up, I'd say that common tonic (in-key) mixing might be more useful in DJ'ing where you switch from song to song. And common-pitch-set mixing would be more useful for producing beats, mash-ups and other things where you handle musical elements on a lower level than entire songs.
Answer: As a complement to Elements In Space's answer, I found two webpages advising to look which notes the scales contain when using harmonic mixing:
https://hiphopdatabase.fandom.com/wiki/Harmonic_mixing:

Which notes are in the scale is much more important than which is the tonic. [...]. For example F lydian and B locrian contain the same notes as A minor, so these should be compatible, and slightly less with D minor and E minor.

which is echoed by
https://www.dogsonacid.com/threads/harmonic-mixing-with-modes.823401/page-2:

E phrygian has the same notes as C major but uses E for root.
So Eb phrygian should have the same notes as B major but using Eb for root.
Therefore I would say using the traditional harmonic mixing rules for matching B major should sound good with Eb phygian.


Intrinsic parity

Question: When we apply parity on a field two times, we demand that we should get back the same field. This gives us,  $P^{2} =1$, which implies, $ P \psi = e^{i \theta} \psi$ . This extra phase factor is called intrinsic parity. Now, this is not just a phase factor. It is important because it's value decided whether a spin 0 field is a scalar or Pseudo-scalar. But what exactly is intrinsic parity ? On what properties of field it depends?
Comment: I would like to add a question to this. If I consider an interaction , say $l_{int}=\bar\psi \psi \phi$, it can be shown that it is invariant under parity operation, given that scalar is intrinsic scalar. Now, does it mean that a pseudo scalar can not interact through this lagrangian term. OR it can interact but will not be preserved under parity?
Comment: More on [intrinsic parity](http://physics.stackexchange.com/search?q=is%3Aq+%22intrinsic+parity%22).
Comment: "does it mean that a pseudo scalar can not interact through this lagrangian term": pseudo scalar Yukawa-type interaction is perfectly legit, see here: https://physics.stackexchange.com/questions/459043/why-is-the-higgs-cp-even/459246#459246
Answer: You are viewing this the wrong way. If you apply parity operation to a scalar field (both real and complex field), you have:
$$
P\phi (x) P^{-1} = n_P\phi (\tilde{x}) \tag{1}
$$
where, $n_P$ is the intrinsic parity,
and the parity operator effects the coordinate transformation from $x$ to $\tilde{x} = (t, -\boldsymbol{x})$.
Now, if you apply the parity operation again,
$$
P^2\phi (x) P^{-2} = n_P P\phi (\tilde{x}) P^{-1} = n_P^2 \phi (x)
$$
We should obtain the original field back. Thus, we see that $n_P^2 = 1$, which can only imply that $n_P = \pm 1$.
We cannot determine intrinsic parity with free Lagrangian; for that, we need interactions. Suppose you have an interaction Lagrangian of the form,
$$
L_{int} = - \mu \phi^3 - \lambda \phi^4
$$
Applying the parity transformation on the interaction Lagrangian, and subsequently using Eqn. (1) for each $\phi$, we see that parity invariance would require that for the first term, $n_P^3 = 1$, and for the second term $n_P^4 = 1$. Both of these equations are satisfied simultaneously only if $n_P = 1$. Hence, for this case, $\phi$ is a scalar field.

Intrinsic parity


Why are color difference signals transmitted rather than R,G,B signals?

Question: In color television systems back in the early days, people used to transmit color difference signals (Y-R) and (Y-B) along with Y, which is the luminance signal. My question is why are color difference signals transmitted rather than just two of the three R,G,B signals along with Y? What is the need for color difference signals rather than pure RG, GB, or RB?
Comment: [Compatible Color: The Ultimate Three-For-One Special](https://www.youtube.com/watch?v=InrDRGTPqnE) by Technology Connections is highly recommended. He has a series of videos on TV technology.
Comment: Due to compression technology in the era between analog and digital. Read up on YCbCr.
Comment: @MoonzarinEsha Actually, you're right. You did mention that at the beginning. I saw RGB and missed the part about using only two pure colour signals along with Y. I will add some small edits to make less easy to skip over.
Comment: Modern digital uses luma+chroma as well for (most of) the same reasons. YUV420p means a full-resolution Y plane plus quarter-resolution (halved vertically and horizontally) U and V planes, which trades a small quality loss for a big reduction in bandwidth requirement.
Comment: One addition to the answers given: In the 1980s they planned some satellite TV system in France. Because it was clear that B&W TV sets would not be able to receive the satellite signal anyway, the system (which was not implemented later on) would have transmitted an R-G-B signal and not an Y-U-V signal.
Answer: Since color transformations are a linear 3x3 matrix, so is converting RGB to YUV and back. Y is needed anyway for compatibility with B/W TVs, and Y signal consists mostly of G component, then mostly of R component, and least with B component, in certain proportions.
As RGB signals have full bandwidth from the camera, so does calculated Y. As human eyes are most sensitive to luminance than color, it makes no sense to waste bandwidth for direct transmission of R or G or B signals. The color signal must also be hidden inside B/W transmission.
Since the RGB to YUV is a linear matrix, you get 3 componets out if you put 3 components in. As the coefficents for calculating Y from RGB are known, the other two components are the ones that describe the other two components U and V.
The U and V components need to contain the rest of the info to calculate RGB, and since Y already contains most of G component, the U and V should contain mostly the R and B components, except the RGB parts that were already sent with Y. That's why the G component is not used. As the Y calculation was done with resistor dividers and analog amplifiers from RGB, you needed to minimize the circuitry, and inside a RGB to Y converter there already exist the RGB components and the weighted sum Y, so easiest thing to do was to also calculate R-Y and B-Y as they would result in larger signals than G-Y. So now the R-Y and B-Y are the signals that contain least luminance info and most color info. And since Y needs higher bandwidth and color info doesn't, the bandwidth of color difference signals R-Y and B-Y can be reduced even more, so that's why none of the R or G or B signals are directly sent.
Comment: Nice answer. Interesting to note the reduced bandwidth results in some [interesting effects](https://en.wikipedia.org/wiki/Composite_artifact_colors) and NTSC as "Never Twice Same Color"
Answer: I'll address a couple of points briefly here. A full discussion of the analog color TV signal and the decisions that went into its design would fill a book.
When color TV was introduced, the broadcast format was already well established, with 6 MHz channels, using AM VSB for the video (Y) signal and an FM subcarrier at 4.5 MHz for the sound. They needed to find a way to add color information to this signal without using any additional bandwidth and without creating any incompatibility with BW receivers.
In order to accomplish this, they made two key choices:

Use the HSB (hue, saturation, brightness) model to represent color images
Encode the color information as a phase- and amplitude-modulated subcarrier

Since the existing Y signal is exactly equivalent to brightness in the HSB model, that means that only H and S need to be encoded on the subcarrier. They chose to encode hue as the phase angle of the subcarrier, and saturation as the amplitude of the subcarrier. The 0° phase reference is given by a "color burst" signal that was inserted into the horizontal blanking interval.
By carefully picking the frequencies used,1 and by suppressing the actual color carrier itself and sending only its sidebands, the new color information was effectively "interleaved" into the same spectrum used by the existing Y signal without creating visual artifacts for BW receivers.
Finally, getting back to your actual question, the B-Y and R-Y signals are just one way (the most common way) of expressing the phase and amplitude of the color subcarrier — you can think of them as the "rectangular" coordinates of what is really a "polar" signal. They are named that way because "blue" hue is defined to be close to 0° phase (maximum positive B-Y signal), and "red" hue is defined to be close to 90° phase (maximum positive R-Y signal). The "green" hue is close to 225° phase, which corresponds to the maximum negative values of both B-Y and R-Y.

1 In case you're curious, here are the details for NTSC. The original BW signal used frequencies of 15750 Hz and 60 Hz for horizontal and vertical scanning. In order to minimize the visual effects of any leakage of the audio subcarrier into the video signal, scan frequencies were reduced by a factor of 1.001 (to 15734.3 Hz and 59.94 Hz, respectively). This made the audio subcarrier exactly 286× the horizontal scan rate, which made any artifacts stand more or less still on the screen. This also puts the audio subcarrier in one of the "nulls" of the color subcarrier comb filter. In order to achieve the frequency-domain interleaving that I spoke of, the color subcarrier frequency needed to be an odd multiple of half the horizontal scan rate. They chose 455/2, which makes the color subcarrier frequency 15750/1.001*455/2 = 3.579545 MHz.
Comment: ....if you could point me to some tutorials or materials about this ->   the B-Y and R-Y signals are just one way (the most common way) of expressing the phase and amplitude of the color subcarrier — you can think of them as the "rectangular" coordinates of what is really a "polar" signal. They are named that way because "blue" hue is defined to be close to 0° phase (maximum positive B-Y signal), and "red" hue is defined to be close to 90° phase (maximum positive R-Y signal)
Comment: I don't have a specific reference for you, but if you plug the phrase "NTSC color phase angles" into your favorite search engine, you'll get all kinds of additional information.
Comment: [This video - Why is TV 29.97 frames per second](https://www.youtube.com/watch?v=3GJUM6pCpew) covers much of the same information, for learners who prefer video to print.
Comment: I'm skeptical of your use of the term "HSB" and whether there's any historical context/basis for it. Generally HSB means a completely different kind of colorspace than YUV, where "brightness" does not match luminance (Y) or anything perceptual but is just a sum/mean of the RGB color channels, and it's usually associated with backwards image editing software from the 90s.
Answer: You need Y (R+G+B) aka Luminance, to represent the monochrome signal, both for compatibility with B+W television, and because it is the most important part of the colour TV signal, requiring the highest bandwidth.
You need two other signals to convey three colour channels ... but why U and V rather than R and B? (not G, because Y is mostly G anyway)
Because, except for the most brightly hued colours in the image, there is less information in U and V than there would be in R and B : indeed for a grayscale there is no information at all in the colour difference signals, and for pastel colours, very little. Then R and B signals would be mainly duplicates of the G (or Y) signal, while U and V are low amplitude (and do relatively little damage to the monochrome Y signal they are layered on top of)
Reducing the auxiliary information to be transmitted, allows transmission with less signal space.
Experiments showed the bandwidth of the colour difference signals can be reduced to about 0.5 MHz (vs 5.5 MHz for the luminance channel in a 625 line system) without doing too much damage to the image quality.
Comment: ....I would appreciate if you could point me to some tutorials or materials about your answer.
Comment: Color difference bandwidth would need to be much higher than 0.5Mhz.  On a 40-column display, each character is about 1 microsecond wide, so a bandwidth of 0.5Mhz would allow one cycle every two characters.
Comment: @supercat That's why subtitles weren't full colour on broadcast television. Ceefax/Prestel etc could generate captions locally avoiding the bandwidth limits.
Comment: @BrianDrummond: Computers for NTSC and PAL could produce composite video output which allowed 40 characters per line to be independently colored relatively cleanly.  That wouldn't be possible if chroma bandwidth were as bad as what you say.
Comment: @supercat the modulators they used did have higher chroma bandwidth : not all systems did.
Answer: As others have explained in detail, YCbCr is basically a compatibility hack for black-and-white TV combined with a way to send chroma information at a lower resolution than luma information to make efficient use of available bandwidth.
What others haven't mentioned, which I think you'd benefit from, is Xiph.org's A Digital Media Primer for Geeks, which starts into video at 16:00 (though the first mention of what you specifically care about begins around 17:23 if I remember correctly).
It covers things like interlacing, gamma, YCbCr, subsampling, and various other things you want to know in order to be effective in doing self-directed study.
Comment: Not quite accurate, YCbCr has nothing to do with lower chroma resolution. You are confusing YCbCr which is a color space with chroma subsampling methods like 4:4:4, 4:2:2, and 4:2:0, which means how the of chroma is sampled compared to luma. YCbCr is a digital component version of YPbPr analog component video that is traditionally sent over 3 RCA jacks. It does have its roots in YUV analog signal, but UV cmponents have different scale than PbPr. And PAL does transmit in YUV, but NTSC transmits a 33 degrees rotated version of YUV called YIQ.
Comment: Good point. Would clarifying it to "the use of the YCbCr family of color spaces *enables* both a compatibility hack for black-and-white TV and encoding the chroma information at a lower resolution than the luma to make more efficient use of available bandwidth" be sufficient? (I used "YCbCr" because I was told that it's commonly used to refer to both analogue and digital applications and Wikipedia agreed.)


Plotting Scientific data in .net

Question: Does anyone have any recommendations for plotting scientific data in .net (c# winforms). Some of my requirements are: real time plotting, 3D (waterfall), multiple axis, ability to accept BindingList as a data source and recognize any changes to the data. I also need a high level of user interactivity such as the ability to graphically select 1 or more series, draw regions. highlight part of a series, etc.
So far I've looked at Nevron, Synchfusion, Infragistics, TeeChart and a few others.
Answer: Don't the Microsoft Chart Controls do what you want?
Answer: Have you considered using Xceed library?
Answer: You can use cross-platform GPL plotting library MathGL to produce a bitmap. Its plotting is fast and have many graphics types (including waterfall, many-axis and so on). But I'm not sure if you can use something except C-interface for .net programs.

Plotting Scientific data in .net


Taking the ball after scoring penalty

Question: Why do players intend to take the ball with them after they have scored a goal? In addition to this, the opponent players(especially goalkeepers) don't intend to give away the ball. What could be the reason behind that? Answer from both scorer's and goalkeepers point of view would be great.
Answer: If the scoring team is still behind (say, the score was 2-0 but after the goal it's 2-1), the scoring team wants to continue the game as soon as possible, in order to score another goal. On the other hand, the goalkeeper's team will benefit from a delay, so they tend to keep the ball as well.
Other than that, I've seen some instances where the ball becomes part of the small celebration the scoring team holds (especially late in the game when the goal is likely to be decisive). Whether this happens varies from team to team and is just one of the traditional habits of any sport, without a special meaning.

Taking the ball after scoring penalty


Donkey as Democratic Party symbolic animal

Question: How come the US Democratic Party is OK with being associated with a donkey? Couldn't they push for a more flattering animal? An elephant has stronger positive connotations. Couldn't they try to be associated with another one? There's plenty to choose: American bison, bald eagle, grey wolf, grizzly bear, American lion. No one wants to be a donkey, right?
Comment: "No one wants to be a donkey, right?" That might be the underlying issue here. Even the donkey in Winnie Pooh is very depressed.
Answer: Per How did the Republican and Democratic parties get their animal symbols?:

The origins of the Democratic donkey can be traced to the 1828 presidential campaign of Andrew Jackson. During that race, opponents of Jackson called him a jackass. However, rather than rejecting the label, Jackson, a hero of the War of 1812 who later served in the U.S. House of Representatives and U.S. Senate, was amused by it and included an image of the animal in his campaign posters. Jackson went on to defeat incumbent John Quincy Adams and serve as America's first Democratic president. In the 1870s, influential political cartoonist Thomas Nast helped popularize the donkey as a symbol for the entire Democratic Party.

Longer version of the story: The Historic Elephant and Donkey; It Was Thomas Nast "Father of the American Cartoon," Who Brought Them Into Politics

Thomas Nast's cartoon "Third Term Panic" {Inspired by the tale of a The Ass in the Lion's Skin} and a rumor of President Grant seeking a third term, the Democratic donkey aka "Caesarism" panics the other political animals-including a Republican Party elephant at the left (via Thomas Nast's wiki page)

For context, recollect that at the time, the Democratic party was the party of pro-slavery southerners, and that the Republican party was the part of anti-slavery northerners.
Comment: I came across this reference. That surely explains how it started, but not why it went on. Is the rest just inertia?
Comment: @PierreB: See the link I just edited in. It went on because of Thomas Nast in the 1870s.
Comment: Sorry, but it's not quite a democratic donkey in *"Third Term Panic"*.  Everything was labeled.  The Ass is the *N.Y. Herald*, panicking the other papers, meanwhile the actual *Democratic Party*  is the little Fox gone to cover with his paws on the *REFORM* plank.
Answer: Opponents of Andrew Jackson would call him a "jackass" as an insult during the 1828 presidential campaign. He, however, used the symbol on posters when he was running. In 1837, the donkey was first used in a political cartoon as a symbol for the party:

In 1870, Thomas Nast started using the donkey for the party in cartoons. He likely didn't know that the symbol was already associated with Democrats; he'd immigrated in 1840 as a child. This is the first cartoon by him using the symbol:

He also popularized (while not inventing) the symbol of an elephant for Republicans, in this 1874 cartoon:

Note that the Democratic Party's official logo is actual this blue capital "D":

Source
Second source


Why are beacon lights used in conjunction with strobe and navigation lights in flight?

Question: Strobe lights are much brighter and easier to see than beacon lights while in flight—it's their function. Beacon lights are useful on the ground to indicate engines are running, but what is their use in the air? Strobe and navigation lights do a better job at establishing visibility and orientating other aircraft, while beacon lights are harder to see.
Comment: Welcome to Av.SE!
Answer: Beacons pre-date both LED and xenon strobes.  A number of modern aircraft have been certified without beacons because their strobe systems meet the angle-of-view requirements both vertically and horizontally without needing a beacon.  Cirrus aircraft, for instance, do not have beacons.
But the FAA position for anti-collision lighting has been "whatever anti-collision lighting the airplane was certified with, has to work and has to be on at night" unless there's a reason (such as precipitation blinding) that it shouldn't be.  So technically a plane cannot be flown if the beacon is inop even if the strobes meet the certification requirement, or even if you aircraft was certificated prior to the lighting rule changes.  A Legal Interpretation Letter from the FAA formalizes that even if your aircraft doesn't require them, if you do have them, they do have to work.  AOPA Legal did a write up on this a few years ago as a result of the letter.  AOPA Article
If your aircraft came with a factory beacon, it is very likely because either:

strobes were either added after-market, or;
the factory strobes did not meet the angle of visibility requirements at the time of certification.
Comment: @tedder42 Correct.  The wingtip lights units protrude from the wingtip enough that they meet the angular visibility requirements for certification.
Comment: Do Cirruses only have wingtip lights, no tail light? I know smaller planes that do, didn't know if that was true for Cirri.


Vacation date check in Infopath

Question: I have an infopath form, which includes two date time field to capture research date. But now I have another list which contains the vacation dates. My requirement is that if the user selecting a vacation date, I would like to block the user to save the form with these dates by giving a friendly notification. Can anybody help to achieve this goal? Thanks in advance.
Answer: In your scenario, I assume the user enters a start date and an end date. I also assume that you want to check if any date in the time frame between start and end date clashes with a vacation date -- and you store vacation dates in a separate SharePoint list.
In this case, you're out of luck. InfoPath does not have any good or even usable tools/syntax/method/rules for date wrangling.
Handling dates in InfoPath is painful and in most cases will require the use of third party paid solutions.
Don't shoot the messenger. This is probably the only correct answer to your question, even if you don't like what it says.
Comment: Thanks for the reply. Your assumptions are correct. Can you please give me the third party solutions details if you are aware of. Thanks

Vacation date check in Infopath


All stills added to iMovie are blurry during playback

Question: I am desperately trying to finish this iMovie video for someone and I am having difficulty with the playback of my still images.  They look great/normal when scrolling through the storyboard, but as soon as I press play the images blur.  I am using iMovie 10.0.5 on a MacBook Pro from 2009.  Any help would be beyond greatly appreciated! Thank you!
Comment: The original resolution or size of the picture should be as good or better than that of the video. If you have the picture in Finder command+I to see info regarding size and dpi.
Comment: If you can afford it my advice is to get FCP X for $20 off Ebay.  iMovie has been glitchy for me.
Answer: Have you tried exporting your video? Sometimes iMovie downscales things while playing it back in the application.
If that doesn't work try copy and pasting your project timeline into a new project and re-insert the images you have.


Using an list in a query in entity framework

Question: I am trying to find a way to pass in an optional string list to a query. What I am trying to do is filter a list of tags by the relationship between them. For example if c# was selected my program would suggest only tags that appear in documents with a c# tag and then on the selection of the next, say SQL, the tags that are linked to docs for those two tags together would be shown, whittling it down so that the user can get closer and closer to his goal.
At the moment all I have is:
List<Tag> _tags =  (from t in Tags
                   where t.allocateTagDoc.Count > 0
                   select t).ToList();

This is in a method that would be called repeatedly with the optional args as tags were selected.

I think I have been coming at it arse-backwards. If I make two(or more) queries one for each supplied tag, find the docs where they all appear together and then bring out all the tags that go with them... Or would that be too many hits on the db? Can I do it entirely through an entity context variable and just query the model?
Thanks again for any help!
Answer: You can try this.
First collect tag to search in a list of strings .
List<string> tagStrings = new List<string>{"c#", "sql"};

pass this list in your query, check whether it is empty or not, if empty, it will return all the tags, else tags which matches the tagStrings.
var _tags = (from t in Tags
             where t.allocateTagDoc.Count > 0
             && (tagStrings.Count ==0  || tagStrings.Contains(t.tagName))
             select t).ToList();

Comment: Would it be easier if, instead of strings, I were to pass in the ID's from tags?
Comment: Yes, you can pass ids there, Ids will preform well in db query.
Answer: You can also try this, Dictionary represents ID of a document with it's tags:
        Dictionary<int, string[]> documents =
            new Dictionary<int, string[]>();

        documents.Add(1, new string[] { "C#", "SQL", "EF" });
        documents.Add(2, new string[] { "C#", "Interop" });
        documents.Add(3, new string[] { "Javascript", "ASP.NET" });
        documents.Add(4, new string[] { });

        // returns tags belonging to documents with IDs 1, 2
        string[] filterTags = new string[] { "C#" };
        var relatedTags = GetRelatedTags(documents, filterTags);
        Debug.WriteLine(string.Join(",", relatedTags));

        // returns tags belonging to document with ID 1
        filterTags = new string[] { "C#", "SQL" };
        relatedTags = GetRelatedTags(documents, filterTags);
        Debug.WriteLine(string.Join(",", relatedTags));

        // returns tags belonging to all documents
        // since no filtering tags are specified
        filterTags = new string[] { };
        relatedTags = GetRelatedTags(documents, filterTags);
        Debug.WriteLine(string.Join(",", relatedTags));

    public static string[] GetRelatedTags(
        Dictionary<int, string[]> documents,
        string[] filterTags)
    {
        var documentsWithFilterTags = documents.Where(o =>
            filterTags
                .Intersect(o.Value).Count() == filterTags.Length);

        string[] relatedTags = new string[0];

        foreach (string[] tags in documentsWithFilterTags.Select(o => o.Value))
            relatedTags = relatedTags
                .Concat(tags)
                .Distinct()
                .ToArray();

        return relatedTags;
    }

Comment: The thing is I am going through an existing db where the tags are already assigned (or will be assigned by the users). Although the dictionary is definitely a good idea. Thanks!
Answer: Thought I would pop back and share my solution which was completely different to what I first had in mind.
First I altered the database a little getting rid of a useless field in the allocateDocumentTag table which enabled me to use the entity framework model much more efficiently by allowing me to leave that table out and access it purely through the relationship between Tag and Document.
When I fill my form the first time I just display all the tags that have a relationship with a  document. Using my search filter after that, when a Tag is selected in a checkedListBox the Document id's that are associated with that Tag(s) are returned and are then fed back to fill the used tag listbox.
public static List<Tag> fillUsed(List<int> docIds = null)
        {
            List<Tag> used = new List<Tag>();

            if (docIds == null || docIds.Count() < 1)
            {
                used = (from t in frmFocus._context.Tags
                        where t.Documents.Count >= 1
                        select t).ToList();
            }
            else
            {
                used = (from t in frmFocus._context.Tags
                        where t.Documents.Any(d => docIds.Contains(d.id))
                        select t).ToList();
            }
            return used;
        }

From there the tags feed into the doc search and vice versa. Hope this can help someone else, if the answer is unclear or you need more code then just leave a comment and I'll try and sort it.


What would currently make the strongest https connection?

Question: when you look at the encryption websites use you will see that there is alot of diversity, some use 256 bit keys some do not, some use DHE-RSA some ECDHE some use sha 256 some sha1, but my question is, what would currently make the strongest https connection in terms of asymmetric  symmetric and hashing algorithms used.(I do understand that there might not really be an overall "strongest" one and that some schemes a better in different situations)
Comment: It depends on the the TLS version.
Comment: Say tls 1.2, since that is the most secure one for what i know.
Comment: Are you asking about theoretically achievable security? How do you want potential side-channel attacks to be weighted in? What is the set from which cipher suites can be selected (all standardized?)? (As of now, an appropriate P-384 with `TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA284` is the "best" somewhat widely supported but will lock out FF users)
Comment: I indeed focus on theoretical achieveable security, all standardized ciphers may be used, and as far as side channel  attacks go, i would like the one which would overall be most resiliant against them(if  something like that exists ofcourse)
Comment: This might sound stupid, but wouldn't  sha512 be safer? (Please correct me if im wrong)
Answer: The cipher suite with the best theoretical security for TLS (v1.2) right now is clearly:
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 with P-521
as the associated curve for the certificate and the key-exchange.
The arguments are simple:

ECDHE and ECDSA with P-521 both provide 256-bit security against forgery / key recovery attacks
AES-256 is the strongest possible AES instance you can get
CBC is the most resilient mode to IV-reuse (you only learn whether two messages share a common prefix)
SHA-384 implies use of HMAC-SHA-384 as the MAC which has a much higher "bit-length-protection" against forgeries than, say GCM

The arguments against it are clear as well:

The support situation is probably horrible, because P-521 isn't exactly the most wide-spread supported curve as is probably the ECDSA-CBC-SHA2 combination
This suite is prone to many (side-channel / padding oracle) attacks on CBC and authenticate-then-encrypt from the past

Note well: Because of these attacks I strongly recommend against using any CBC based cipher suite.
The cipher suite with the best practical security (and somewhat decent support) for TLS (v1.2) right now is clearly:
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 with P-384
Downgrade to TLS_ECDHE_WITH_AES_128_GCM_SHA256 with P-256 / P-384 for more supported systems (such as Firefox)

ECDHE and ECDSA with P-384 both provide 192-bit security against forgery / key recovery attacks, which is on the edge of "physically infeasible" and will likely remain unbroken until the rise of quantum computers, the support is really good here, because P-384 is part of NSA's Suite B and many people implemented it because of that
AES-256 is the strongest possible AES instance you can get
GCM is the mode which has seen the least amount of attacks, as predicable IVs are a non-issue and padding doesn't need to take place and authentication is built-in
GCM "only" provides 128-bit forgery security, but this is (a worthy / the) trade-off for a much better side-channel resistance
Comment: @SEJPM I don't agree with you AT ALL regarding choosing CBC-and-SHA over GCM. You are correct about IV reuse, but due to TLS's insistence on MAC-then-encrypt there are far more problems with CBC-and-SHA than with GCM.
Comment: If you wonder where SHA-512 is: There's no standardized TLS cipher suite using SHA-512 as far as I am aware of
Comment: So in theory it should be more secure, but ins't used because there is no support for it yet?
Comment: @blacklight I believe the argument for SHA-384 is that 128-bits of the state are missing. It gives an extra buffer of security against potential attacks which require the entire hash digest.
Comment: @blacklight There likely will never be much support for this suite, because the combination is just stupid. After all it assumes you have SHA-2 but don't bother with GCM which is a very unlikely scenario and CBC is dangerous anyways (because of padding oracles and side-channels)
Comment: @YehudaLindell, I agree with you there, which is why I made the distinction between theory and practice. However on a theoretical level (w/o side channels and padding oracles) CBC with HMAC in AtE is as secure as EtA. But I'll edit a stronger stance against actually using the CBC suite into the answer.
Comment: What about X25519 key exchange? What about chacha20 poly1305?
Comment: @Z.T. both aren't (yet) standardized in a RFC and ruled out by this.
Comment: @SEJPM IANA defined the ids, Google deployed them, so I consider them safe to deploy.
Comment: @Z.T., I don't doubt that they are _safe_ to deploy. It's just that there's no formal and official standard yet, so they can't be considered _standardized_ and the OP said: *"all standardized ciphers may be used"*


Why does blender mix colors when exporting FBX?

Question: Quick question, I have a .blend file with a high poly mesh that has multiple materials on it. When I export as FBX some textures get mixed up, example picture shows original .blend file on the left, middle is FBX export number one, and after adding one plane to the roof, it's a completely new mixup of textures on the right. All textures are simple Principled BSDF colors.
Comment: Bugs should be reported at https://developer.blender.org. You will have to provide them a minimal example file.
Answer: I found the reason for this, as I copy and pasted items each one of them had all of the other material information. So then I ended up (and I don't know how this is posible) with multiple materials under the SAME NAME.
So the solution was to go and manually go to edit mode, select each color to see if its information is on the mesh and then reassign it or remove it, I had over 40 materials on this mesh and was left with 9, problem solved but I wish I found some elegant solution to this.


Symfony Action Security - How to forward after successful authentication?

Question: With Symfony's Action Security if a user has not been identified he will be forwarded to the default login action as defined in the applications settings.yml file. How would I forward the user to the originally requested action after the user is successfully authenticated?
Answer: On first hit to your login action, store referer to the user session:
if(!$this->getUser()->hasParameter('referer'))
{
  $this->getUser()->setParameter('referer',$this->getRequest()->getReferer());
}

and then when login succeeds, redirect user to stored referer with:
$this->redirect($this->getUser()->getParameter('referer'));

You have complete example in sfGuardPlugin:
http://www.symfony-project.org/plugins/sfGuardPlugin
Answer: More simply...
$this->getUser()->setReferer($this->getRequest()->getReferer());

like
setReferer($referer)
{
  if (!$this->hasAttribute('referer'))
    $this->setAttribute('referer', $referer);
}

Comment: I had problems using the attribute with name 'referer'. Using a different name solved the problem.
Answer: A related problem, but instead trying to perform the forward from a different action:
If you have an action protected by sfGuard which is attempting to redirect to the referrer, you will get a redirect loop after signing in. This is because the sign-in page of sfGuard wil become the referrer. A parameter or attribute can be saved over multiple requests if stored in the sign-in action as above, meaning the action might be redirecting to an incorrect page if already signed in. The solution is to use a flash which will be forgotten. This can be accomplished with the following code in the executeSignin method of sfGuardAuthActions:
if ($this->getUser()->hasFlash('referer'))
{
  $this->getUser()->setFlash('referer', $this->getUser()->getFlash('referer'));
}
else
{
  $this->getUser()->setFlash('referer', $this->getRequest()->getReferer());
}

By resetting the flash in the first block, it won't be forgotten between login attempts, and by using a flash, signing in from other pages can't interfere with your action.


Lag in keyboard response in 16.04

Question: I recently went to a full install of Ubuntu 16.04 LTS. (I was dual booting for a while) and now there are no other operating systems on my laptop. So I have it on my hp -2000 laptop that is a few years old but still has a 400g hard drive and 12g of ram.  I do notice though if I have had the laptop on for a while (say from 8am till about 12pm) It starts to act sluggish. Keystrokes are delayed is really the biggest issue. If I power cycle it comes back good as new and there is no issue. Is this a problem other folks have had? Is it just my bad laptop?
Answer: In a case like this, I'd plug in an external USB-based keyboard and see if the sluggishness is on that one, too.  If the problem follows that external keyboard then it could be that your computer is sluggish because it's busy.
I'd then try to figure out what it is that's making my computer busy.
How do you find out which program is using too much memory?  So maybe you could consider running something like gnome-system-monitor, for example, which might give you some insight into what's running.  If this is related to a processor-hog stealing all its time then this could help.
If it's a bad driver then I'm not sure I'm the right guy to help.

Lag in keyboard response in 16.04


How do I encrypt Amazon SES emails?

Question: From what I can tell, encrypting Amazon SES emails has to be done from code. That's fine, but I'm obviously going to need a certificate of some kind. I know plenty about SSL, but it appears that SES only works with TLS? Can somebody point me in the right direction? Is it possible to use SSL with SES instead of TLS? Do I use a standard SSL certificate with the latest TLS software? How do I go about setting up a TLS certificate? Where do i purchase one? Is it basically the same as setting up an SSL certificate, except it's somehow routed through TLS instead of openSSL?
 Any guidance in this area would be greatly appreciated.
Answer: I think you're confused. Are you wondering about end-to-end encryption of email contents or encrypting the transport of your emails to SES?
If the former, you'll need to look into something like PGP or S/MIME. Either of those require cooperation from both the sender and the recipient to facilitate key exchange and subsequent encryption/decryption of the messages. SES doesn't care about this at all - you can send encrypted payloads through SES or you can choose not to. Your choice.
If the latter, all you need to do is ensure that your SMTP client or library is configured correctly to use STARTTLS. There is no need for you to purchase or otherwise manage certificates in this case, as you are a client of Amazon's service - they manage the certificates. Keep in mind that this option only encrypts a single SMTP hop - Amazon still has access to the cleartext version of the email, as to any other mail servers it may pass through. Additionally, one or more hops along the email's path from source to destination may not support STARTTLS, in which case the email is transiting the public internet unencrypted. If this is of concern to you, you'll need to implement either PGP or S/MIME.
Comment: Well, I'm not sure what regulatory jurisdiction you're under but speaking of US HIPAA regulations (which I'm quite familiar with), emailing any kind of PHI is strictly forbidden. If you want to get PHI-laden data into a patient's hands, you need to email them a notification email with a link that they can click, and then sign in with username/password to retrieve the data.
Comment: You're welcome. With all due respect, you really ought to hire someone who is well-versed in the nuances of HIPAA regs. You *really* don't want to get hit with a HIPAA breach fine, nor do you want to be responsible for your customer getting one either.
Comment: To put a sharper point on it - if you email PHI to a patient, regardless of whether or not it's encrypted in transit, you are blatantly violating HIPAA privacy and security rules.
Comment: there has been question as to whether or not the emails need to be encrypted because the emails are receipts that might contain private health information. think hospitals. so the emails are ultimately going to an end user that made a payment. probably cant guarantee it arrives there encrypted. so ill at least want to encrypt it to SES. its just a legal protection more than anything.
Comment: thank you for the information, i appreciate it greatly. hopefully my last comment can provide more information that might give you a better idea of what i'm looking for
Comment: i'm in the US, so yes, HIPAA is what i'm dealing with. very good. thank you so much for the information. it's been very useful
Comment: well I'm just the tech guy for a bigger company. they have a lawyer that works out all the details and he asked if i could find a way around it. since you've made it pretty clear that there really isnt a way around it, i've already told my boss he's going to have to set up a link to a password and everything
Comment: @EEAA haha totally saved their butt :)

How do I encrypt Amazon SES emails?


How are the persons of the Trinity distinctively active in a Christian's prayer?

Question: Another way of asking this question is by saying, "When God interacts with praying Christians, how do the persons of the Trinity interact in ways that neither of the other two persons do?" I'm asking from a biblical, Protestant perspective.
Answer: My understanding from growing up in an Anglican church:
We pray to God the Father. He is the one that answers our prayers. Not a perfect verse for this, but the only one I could think of:

"Again, truly I [Jesus] tell you that if two of you on earth agree
  about anything they ask for, it will be done for them by my Father in
  heaven" (Matthew 18:19 NIV)

We pray through Jesus. He is our Great High Priest.

Therefore, since we have a great high priest who has ascended into
  heaven, Jesus the Son of God (Heb 4:14 NIV).

Think back to the old testament, the High Priest was the one who could go into the holy of holies in the temple and gave access for the people to talk to God.
The Holy Spirit prompts us to pray, and directs us to pray for certain things - e.g.

We do not know what we ought to pray for, but the Spirit himself
  intercedes for us through wordless groans. (Romans 8:26 NIV)
Comment: You know, I've heard this in Protestant sermons as well. I'd forgotten it until you put it here so clearly,simply, and concisely. +1
Answer: In the Anglican Communion the most common idea is that what one personality knows the other knows (you should rather use personality than the word person when talking of the Trinity in Unity.) If you pray to The Father, the Son and The Holy Spirit hear you also. We address our prayer to The Father because Jesus taught His disciples to pray to The Father. We open with "Our Father," rather than just "Father." LDS Priests usually address the prayer to "Heavenly Father." Anglican Priests often address their prayer to "Father Almighty," and often to "Almighty Father." which is a different way of thinking of God.
In RC doctrine, prayers are often addressed to Mary (theotokos) asking her to intervene with the Son, on a persons behalf (this was recognized from the experience at the Wedding in Cana.)
There are so many millions of people who have been helped by prayers to Jesus, to Saints, to Mary, to Joseph, to Yahweh, to Mohammet, that it is evident God hears every prayer that the Spirit recognizes has God as its ultimate destination.
Comment: [Nobody including Muslims pray to Muhammad , he was even prophesized to lead a monothiestic faith](http://www.islamreligion.com/articles/200/) , Infact orthodx Muslims dont even seek his intercession, Muslims only pray to One God alone very strictly.


Is there a simple way to do true isometric projection with an HTML5 canvas?

Question: Is there a simple way to get a true isometric projection with the HTML5 canvas element?
Comment: Are you looking for libraries or how-to render using the Html5 Canvas?
Comment: Here is an amazing tutorial for future readers: https://www.youtube.com/watch?v=go1qrWFw_bs It explains the math behind isometric projection and touches on both 2D and 3D.
Answer: One of the properties of an isometric projection (and all axonometric projections) is that objects in the distance do not grow smaller.
Therefore, trivially, HTML5 supports isometric projections because you can just draw all your art assets that way, and overlay them to create the depth.
Answer: Edit: Revised the answer so it is more clear.
Here is a quick note on how to modify something simple like a square so that it is isometric. What I do here is run 3 draw routines. First, I draw a normal square who's center origin is the middle of the canvas (but your origin could be anywhere). Then, I make some basic calculations to turn it into an isometric polygon. This isn;t the "right" way to do this, but it should help you understand what the math in the next draw routine is doing. I then re-draw the polygon using a isometric transform, which is a short cut of sorts for doing what we did manually in the previous example.
<code>   <!DOCTYPE html>
<html lang="en">
<head>
    <title></title>

    <script type="text/javascript" src="..\tccore\jquery.min.js"></script>

 <script type="text/javascript">

    var cellWidth = 30;
    var cellHeight = 30;
    var context;
    function getCellBoundaries(theCellX, theCellY) {

        //right
        var aOffset = { "offsetX": (cellWidth * -1) / 2, "offsetY": (cellHeight * -1) / 2 };
        var aCell = { "x": theCellX, "y": theCellY };
        var p1 = getScreenCoords(aCell, aOffset);

        //bottom
        aOffset = { "offsetX": (cellWidth) / 2, "offsetY": (cellHeight * -1) / 2 };
        var p2 = getScreenCoords(aCell, aOffset);

        //left
        aOffset = { "offsetX": (cellWidth) / 2, "offsetY": (cellHeight) / 2 };
        var p3 = getScreenCoords(aCell, aOffset);

        //top
        aOffset = { "offsetX": (cellWidth * -1) / 2, "offsetY": (cellHeight) / 2 };
        var p4 = getScreenCoords(aCell, aOffset);

        return { "point1": p1, "point2": p2, "point3": p3, "point4": p4 };
    }
    function getScreenCoords(Cell, offset) {

        var posX = Cell.x * cellWidth + offset.offsetX;
        var posZ = Cell.y * cellHeight - offset.offsetY;

        var xCart = (posX - posZ)
        var yCart = (posX + posZ) / 2;

        var rX = -xCart + 400;
        var rY = +yCart + 300;

        return { "x": Math.floor(rX), "y": Math.floor(rY) };

    }

    function drawIsoCellBorders (cellX, cellY) {

        var cellPoints = getCellBoundaries(cellX, cellY);
        context.beginPath();
        context.strokeStyle = "red";
        context.moveTo(cellPoints.point1.x, cellPoints.point1.y);
        context.lineTo(cellPoints.point2.x, cellPoints.point2.y);
        context.lineTo(cellPoints.point3.x, cellPoints.point3.y);
        context.lineTo(cellPoints.point4.x, cellPoints.point4.y);
        context.lineTo(cellPoints.point1.x, cellPoints.point1.y);

        console.log("Translated:");
        console.log("Bottom: " + cellPoints.point2.x+","+ cellPoints.point2.y);
        console.log("Right:" + cellPoints.point1.x +","+ cellPoints.point1.y);
        console.log("Top:" + cellPoints.point4.x+","+ cellPoints.point4.y);
        console.log("Left: " + cellPoints.point3.x+","+ cellPoints.point3.y);

        context.stroke();
        context.closePath();

    }

    $(document).ready(function () {

        context = $("#gamescreen")[0].getContext('2d');

        /*let's saw we want to draw an isometric square in the center of the page.
        Before we do that though, let;s draw a normal square in the center of the page
        so you know where some of these wild assumptions come from. To do that, we need to know
        where the square should go. We know our canvas is 800 wide and our cells are 30 wide so
        we can assume that our canvas can fit around 800/30 cells.*/
        var cells_wide = 800/cellWidth;
        var cells_high = 600/cellHeight;
        //half are our centers positions for 2d
        var xCenter = cells_wide/2 * cellWidth;
        var yCenter = cells_high/2 * cellWidth;

        var centerCellNumberX = cells_wide/2;
        var centerCellNumberY = cells_high/2;

        //to draw a square in the center of the canvas, we just draw the points.
        context.beginPath();
        context.strokeStyle = "blue";
        context.moveTo(xCenter-cellWidth/2,yCenter-cellHeight/2); //move to top left corner
        context.lineTo(xCenter+cellWidth/2, yCenter-cellHeight/2); //move to top right corner
        context.lineTo(xCenter+cellWidth/2, yCenter+cellHeight/2); //move to bottom right corner
        context.lineTo(xCenter-cellWidth/2, yCenter+cellHeight/2); //move to bottom left corner
        context.lineTo(xCenter-cellWidth/2,yCenter-cellHeight/2); //move back to top left corner
        context.stroke(); //draw and yay - we've got a little gray square in the center of our canvas
        context.closePath();

        //now, give this an isometric perspective is pretty easy, we essentially tilt the square.
        //a sort of simplified way to do this is as follows -
        //It means that we essentially draw a diamond instead of a square, and then halve the height
        //and double the width.
        //the first point, (the top of the diamond) is 1/2 the width of the square from where the top left
        //corner of a normal square would be, to the right
        //to Draw: first clear our other rect
        //context.clearRect(0, 0, 800, 600);
        context.beginPath();
        context.strokeStyle = "gray";
        console.log("Hacked:");
        context.moveTo(xCenter, yCenter+cellHeight/2); //bottom of diamond
        console.log("Bottom: " + xCenter + "," + (yCenter+cellHeight/2)); //bottom of diamond

        context.lineTo(xCenter+cellWidth, yCenter); //right of diamond
        console.log("Right:" + (xCenter+cellWidth) + "," + yCenter); //right of diamond

        context.lineTo(xCenter,yCenter-cellHeight/2); //top of diamond
        console.log("Top:" + xCenter + "," + (yCenter-cellHeight/2)); //top of diamond

        context.lineTo(xCenter-cellWidth, yCenter); //left of diamond
        console.log("Left: " + (xCenter-cellWidth) + "," +yCenter); //left of diamond

        context.lineTo(xCenter, yCenter+cellHeight/2); //back to bottom of diamond
        context.stroke(); //boom, we have an isotile and isopositioning based on some 2s cell-grid coord
        context.closePath();

        //now let's draw the same exact iso polygon but use our transform
        drawIsoCellBorders(0,0);

    });
</script>
</head>
<body>
    <canvas id="gamescreen" width="800" height="600" style="border-style: dotted; float: left;">

    </canvas>
</body>
</html>
</code>
An explanation of how this code works can be found here (I just found this today): http://www.kirupa.com/developer/actionscript/isometric_transforms.htm. This explains a bit about a coordinate system similar to what we used. Unfortunately, it doesn't really explain the math, which I will do shortly (need to run).
In addition as mentioned in the previous post, some of this code is taken from http://github.com/j03m/trafficcone which is an isometric game engine for html5 that I wrote. To see how this code is used to create a full world, see Engine.js and GameWorldModelIso.js. Engine.js shows how a full grid can be drawn (drawMock3dGrid) and GameWorldModelIso.js shows how to build on the basic forumla used above to help you navigate the gameworld, place things in cells etc without having to think about the angles and such.
Comment: It would be better if you pointed out specific examples (files/functions/etc) instead of linking to your whole project.
Comment: understood, revised.


Catalyze dehydration of formic acid

Question: I know that formic acid will dehydrate upon heating to 100°C (under normal pressure) or adding sulfuric acid. What other catalysts can be used to induce this reaction?
Answer:
Activated alumina, silica, thoriated silica gel, phosphorus pentoxide-silica gel, aluminum phosphate, titanium dioxide
Catalytic Dehydration of Formic Acid, E. G. Graeber and D. S. Cryder
Industrial & Engineering Chemistry 1935 27 (7), 828-831, DOI: 10.1021/ie50307a019
Mechanism of dehydration decomposition of formic acid over alumina and silica. Adsorption measurements during the catalytic reaction, Kenzo Fukuda, Yuko Noto, Takaharu Onishi and  Kenzi Tamaru, Trans. Faraday Soc., 1967,63, 3072-3080, DOI: 10.1039/TF9676303072

Mixed titanium-vanadium oxide
Sadovskaya, Ekaterina & Chesalov, Yuriy & Goncharov, V. & Sobolev, Vladimir & Andrushkevich, Tamara. (2017). Formic acid decomposition over V-Ti oxide catalyst: Mechanism and kinetics. Molecular Catalysis. 430. 52-64. 10.1016/j.molcata.2016.12.010

Various homogenous transition metal catalysts
Homogeneous Catalytic Dehydrogenation of Formic Acid: Progress Towards a Hydrogen-Based Economy, Gábor Laurenczy, Paul J. Dyson, J. Braz. Chem. Soc. vol.25 no.12 São Paulo Dec. 2014, DOI: 10.5935/0103-5053.20140235

Monoclinic bismuth chromate hydroxide proto-catalyst, $\ce{m-Bi(OH)CrO4}$
Two-step catalytic dehydrogenation of formic acid to CO2 via formaldehyde, Viasus et. al., International Journal of Hydrogen Energy, Volume 44, Issue 3, January 2019, Pages 1534-1543, DOI: 10.1016/j.ijhydene.2018.11.178

Catalyze dehydration of formic acid


Is there any standard format for the title page of a manuscript?

Question: I'm finally ready to send my manuscript to the publisher. I'm wondering if there is any standard way to format the title page of the document. I'm including such details as my name, the working title, date of the draft, all of my contact information. Is there a standard accepted practice for arranging this information?
Answer: Did you know about the William Shunn Manuscript Format site? Here is the link:
https://www.shunn.net/format/novel/
There are pages for novel and short story formatting. As you probably guessed, the link in this answer takes you to the novel page. I don't bother with the "he/him" identification. That's only a personal preference, not any kind of statement or judgment.
As someone told me many years ago, "manuscript format is like wearing your best business attire to a job interview."
Comment: The most important rule is that if you're asked to provide certain information on a cover page, be sure to provide it. Likewise, if you're specifically asked to provide a cover page but your writing book says "you don't need a cover page for XXX", provide a cover page. Likewise for page headings, footers, and other elements. Some publication have submission guidelines which go into what seems absurd detail about what they like, but a general website like Shunn's is useful if there is no specific guidance. How To Write books always claim "follow my rule or be rejected" but often that's nonsense