What is the female equivalent of "warlock"?

Question: What is the female equivalent of a "warlock"? It seems that other male-only words for paranormal practitioners have female equivalents:
Wizard/Witch
Sorcerer/Sorceress
Enchanter/Enchantress
Warlock/???
Comment: Certainly in common use witches and warlocks are considered to be the female and male counterparts of each other.  This has been kind of "common knowledge" for 30-40 years, at least.  But of course there are dozens of different schemes for classifying mystical individuals (many created in the past 10-15 years), and so there are no doubt other categorizations that claim "warlock" as well.
Comment: A wizard is not necessarily male, and a witch is not necessarily female. Even in contexts where these terms are gender-restricted, there is no guarantee that they are considered equivalent: often they are depicted rather differently.
Comment: Related: *[Why are female wizards called "witches"?](http://english.stackexchange.com/questions/182876)* and *[One word for witches and wizards](http://english.stackexchange.com/questions/265406)*
Comment: And in some circles, *warlock* has the connotation of one who operates outside of normal conventions, or with less restraint than most.
Answer: According to the Merriam Dictionary, Warlock is the equivalent to a witch.
Also, the e-Study Guide for Rock and Roll: A Social History by Paul Friedlander traces the word back to an Old English origin where the word meant "oathbreaker" or "deceiver", but Early Modern Scots popularized a new meaning of the word which was the male equivalent of witch.
The book also states that 'Witch' can be used for either male or females but it is more often used for females, but this means that technically you could use Warlock for females.
Comment: There isn't a female equivalent. The word wizard simply means a person who is skilled in magic. Thus, a female could potentially carry the title wizard.
Comment: So what is the female equivalent of "wizard" then?
Comment: Indeed. My upvote.
Answer: Male/Female Gender Specific/Restricted

Warlock/Witch
Sorcerer/Sorceress
Enchanter/Enchantress
Priest/Priestess
Master/Mistress
King/Queen
Lord/Lady
Wizard/Wizardess

Generics/Gender Neutrals

Elder: Old Scandinavian Language roots; Literally "Old One" from Uldor and related later variations.
Philosopher: Greek for Lover of wisdom
Doctor: Latin for Teacher.
Scientist: Coined by William Whewell; Cambridge University, to replace other terms such as Natural Philosopher in 1834.

The female equivalent/counterpart of a Warlock is a Witch. This is demonstrated in such sources as John Dryden, who was an English poet, literary critic, translator, and playwright in the 1600's.

He is the source of the later erroneous claims that Warlock and Witch are Scottish terms alone or come from Scottish dialects. From a quote that comes about in 1673:

Warluck (how John Dryden in the 1600's spelled Warlock) in Scotland is applied to a man whom the vulgar suppose to be conversant with spirits, as a woman who carries on the same commerce is called a witch:
Confirmation can be found in the 1755 C.E. Original Edition "A Dictionary of the English Language" Page 2243. Its also cited in the Scottish Dictionaries.
Older references for both including but not limited to such as how the words come from Old Saxon from the 800's and earlier. Basic Etymology is easy to figure out if you can set aside modern nonsense.
The origin of the masculine word Warlock is a combination of two words old forms of Wâr, also spelled Wer and Vir meaning man; as in a male being, with Lok also spelled luk meaning bind, braid, tie and fasten.
In short, Warlock means a Binding Man and was used to gloss words like Exorcist. from all the old sources it becomes clear a Warlock was specifically male, and associated with both a judge that officiated over binding oaths and considered a "binder of spirits."
The so called "Oath Breaker" claims are distortions based on glossed definitions by association, not meaning; hence such dictionaries as the OED and Merriam Dictionary.
This was a reference to the word Warlog which was pronounced and later spelled Warlow. Again War means Man and Log in this case is the word meaning Law. So it means Law Man. It was used as a reference to the Pharisees in the Heliand (830-840 C.E.). The plural of the word was Warlogan, only later reduced as a plural under the form of Warloga.
(cross reference the word Byrloga meaning Town (Byre) Laws (loga) as the source of our modern word Bylaws).
This is simply a case of taking a native language meaning, and applying it to a foreign title and then defining it by such associations with either the previous or the former.
Witch is from Vetch, also spelled Veche and Wecha from the earlier form of Wicc (pronounced Wech) and Vikka, having ultimately the same sense of binding, braiding, tying and fastening. Others associated it as Slavic Veche meaning council and speak wile some also associate it with the same root of the words Watch and Witness from Wacc (pronounced Watch) and Witna.
As Wicc is used in Old English, it was a singular in Old Saxon, while the plural form was Wiccan only later reduced to Wicca as a plural. Because of its association with meaning a speaker or spokeswoman, it became used as a gloss for an Oracle as it would then have the same sense of speaking.
Wicce/Wicca are still feminine words in Old Saxon. Its a dialectical factors when there is variations and also simple scribal errors of the past.
The source of the claim  that "wicce is feminine and wicca is masculine only came about by speculation of such writers as  by Lewis Spence (1920) and demonstrated ignorance of several word sources in his books, such as 'An Encyclopaedia of Occultism.'
The word Wizard is a late addition to this mix. Wizard as Wise-ard was a reduction of the word Wisan-ard meaning Wise One's Art. It was created as a term for a philosophy/alchemist (Medieval Scientists). It came to be used increasingly as a gloss word for Mage (Sage) as Wizardry was used as a gloss for Magic (religion and arts of the Magi).
It is not till well after the 1700's C.E. we see most of the random misnomers and definitions by associations occurring the most. You have to to always cross reference all references and those references to be certain of the accuracy or errors.
Treating the OED for example as being the final "authority" is not doing proper research. doing a 5 minute search and thinking its good enough is not good enough.
Some reference sources should also include for you research such as:

The Heliand: Usually called an epic poem in Old Saxon, written in the first half of the 9th century (830-840). It is in reality a Catholic Alagory pertaining to the New Testament. It is a derived from Old Saxon helian meaning healing, and thus the spelling in question means healer, not savior. Such simple discrepancies are indicative of not rendering something as it means but as one who did these translations chose to willfully reapply to suit their own preferences.
a.  Its importance is simple. In it we have the word often claimed to be the source or Warlock in the form of Warlogan.
b.  The meaning of Warlogan is a plural of Warlog (War = man, and Log =Law) thus lawmen and law man.
c.  The plural as Waerloga only occurs after the 14th century but the spelling of Warlock as Verlok, Varlok, Werloc, etc. occur in the same period the Heliand and later written works were being composed.
d.  From the Sagas of Iceland to works in Old Danish and Dutch which include authors such as Saxo Grammaticus of the 1100's.
e.  This is reinforced by such as the modern work German Literature Between Faiths, edited by Peter Meister. It is confirmed by this source also that Warlogan is a plural, means Lawmen, and was applied to the members of the Sanhedrin as a gloss for titles such as Pharisees and Sadducees.
Beowulf: Literally Bee Hunter as a term for a Bear. Its value is many concepts are expressed and pronunciation through taking a course in Old Saxon can teach one how such was pronounced properly.
a.   Its importance is because it retains examples of many of the old practices of the times and terms like Wyrda, Wyrd, Log, Logan, etc. Learning the proper meaning of these then allows one to challenge the usual nonsense of obvious bad interpretations meant to mislead later readers.
b.  No one knows for certain the date of its creation, only that it references locations that were known as early as the 500 C.E. and believed to have been written down at least by the 700's though many conclude it was done at a much later date, causing the date to usually be wrote as between 700-1000 C.E.
Domboc by King Alfred: Domboc Means Doom Book. Doom in this sense means Judgment as it is a collection of law codes.
a.  Written in 893, some 50 to 60 years later than the Heliand, it is where we see the first spelling of Witch as Wicc for the singular, Wiccan for the plural, and its references are to Old Latin terms and concepts, since Wicc was taken from Old Latin Vica meaning to speak, and so was applied in the sense of female Oracles.
Homilies of Aelfric: Also written in the 10th century here we see the word for witches as a plural continued as a female title exclusively. It's in a line that has such as:
a.  Ne sceal se cristena befrinan tha fulan wiccan be his gesundfulnysse: translated literally as "no shall the Christian befriend the foul witches by his "sound-fullness." It is usually and falsely translated to become misleading as "A Christian should not consult foul witches concerning his prosperity."
b.  Translators can be extremely lazy at times. Sound fullness is a term meaning what we might say today as clear intention or doing something fully aware of what they are doing as in being of "sound mind."

Added update:
Wicc (pronounced Wech) is often confused with Wic that comes from Wik as in Old Norse Vik and is were we get our word Week. The plural of Wic is Wican for Weeks. This means move/travel. When Wican pronounced Week'an was applied to people it meant movers and travels. it basically was applied to nomadic and semi-nomadic people as well as their once known former camp ground (Wiks) and why this also comes up in various names for towns and villages in Europe.
Wicc has its roots also in Old Latin Vica also being the source Old Slavic Veche (Veech) where it retained the meaning to speak, talk, tell, call and councilor, because Vica in Latin is pronounced as "Vi-cha" which is often used as a term for a representative or mediator (in the feminine originally) demonstrated in the word Vicar, one who speaks on behalf of another.
The Oracle of Delphi being female is also at times glossed as a Witch because oracle and witch both have to do with speaking and mediating.
Compare how linguistically Lucifer in English is applied with the form lucifer with a small L when Catholic Priests during mass refer to the Christ as the bringer of light to the world. Lucifer is pronounced Loo-chee-fer).
With Warlock from Warlog it also has shared roots in Old Latin in Vir-lex (veer-lex) and also means lawman or as Vir-lexi "man of laws."
Comment: What are the references for this answer?
Comment: Couldn't be more correct to me!
Comment: You might want to be careful with some of you 'equivalences', *master* and *mistress* while being technically equal, have completely different connotations and now-a-days people would use master in referring to a woman. Also, the Victorians did occasionally use the word *philosophress*.
Comment: Your only compliant is about "now-a-days" ? I reject your statement on the factor that you .factually have nothing that presents a real issue. Master and Mistress are not "Technically Equal" they are Equal. You are using reference to slang based in sexual relations of a Mistress referring to extra marital female lover of a married man, I would suggest you look into the cause for it being used. Otherwise you have nothing substantial to demonstrate anything I presented s erroneous. Cheers.


FEM solution of Helmholtz equation

Question: I'm trying to solve the Helmholtz equation :
https://en.wikipedia.org/wiki/Helmholtz_equation in a 3d space, in vacuum, using FEM.
I expect the solution to be an function oscillating in the x direction, invariant in y and z, but my Mathematica code provides an unexpected solution.
Needs["NDSolve`FEM`"]
λ = 0.7; k0 = 2 π/λ; c = 3*10^8;
xMax = 5*λ;
Ω =
  ImplicitRegion[True, {{x, 0, xMax}, {y, 0, 1}, {z, 0, 1}}];
mesh = ToElementMesh[Ω, MaxCellMeasure -> 0.0001];
Γ =
  DirichletCondition[{exField[x, y, z] == 0, eyField[x, y, z] == 0,
    ezField[x, y, z] == 1}, x == 0 || x == xMax];
pbc1 = PeriodicBoundaryCondition[ezField[x, y, z], y == 0,
   Function[y, y + {0, 1, 0}]];
pbc2 = PeriodicBoundaryCondition[ezField[x, y, z], z == 0,
   Function[z, z + {0, 0, 1}]];
op = Laplacian[{exField[x, y, z], eyField[x, y, z],
     ezField[x, y, z]}, {x, y, z}] + (k0^2)*{exField[x, y, z],
     eyField[x, y, z], ezField[x, y, z]};
{exFieldS, eyFieldS, ezFieldS} =
 NDSolveValue[{op == {0, 0, 0}, Γ, pbc1,
   pbc2}, {exField, eyField, ezField}, {x, y, z} ∈ mesh,
  Method -> "FiniteElement"]

I launch the wave using Dirichlet condition for the ezField on the left (x=0). I add PeriodicBoundaryCondition from the symmetry of the problem. The two other fields are not useful yet.
I expect to have a constant amplitude for a given x when plotting the z field but
DensityPlot[ezFieldS[3, y, z], {y, 0, 1}, {z, 0, 1}, AspectRatio -> Automatic, PlotLegends ->Automatic, AxesLabel -> {"y", "z"}]]

Returns a non constant plane

My code is similar to Solution of electromagnetic wave in frequency domain seems strange but I use the v12.1 of Mathematica and therefore I don't think the issue is the same.
Why isn't my output a plane wave ?
Edit : changing the boundary conditions of ez to Dirichlet E[I k0 x] on all surfaces gives a better result. I still do not unerstand why the output of the previous code is not correct.
Answer: Not an answer.
Which version are you using?
In version
$Version
(*"13.0.1 for Linux x86 (64-bit) (January 29, 2022)"*)

Copying and pasting your code I get the following plot:

which is different from yours. Could it be a bug?

FEM solution of Helmholtz equation


Using bump maps in with the stencil brush in cycles

Question: I am fairly new to blender. I have just finished UV unwrapping and coloring my model, and I am ready to texture it. When I load a bump map into a texture slot and start painting on the model there are no bumps, just color. What I am trying to do is at around 11 minutes 50 seconds in this video https://www.youtube.com/watch?v=uqokgANRb0M. I would like to do it in cycles.  Is this possible? I have tried many node setups with varying UV images and other things. Is there a certain node setup I need to make? I have a greyscale and normal map of the image, if this would make a difference.
Answer: I use a bump node to plug the image into, and then route it to the Normal of the shaders like the image I have here


Are there or have there been notable philosophers who believe in Nullism?

Question: Monism is the philosophical view that only one thing exists. However, I want to know, if there are or have been notable philosophers who believe in Nullism? I made up that term, to describe the belief that nothing exists. I would like some references for their arguments in favor of nullism.
Comment: It's usually called [existence nihilism](https://plato.stanford.edu/entries/object/#ExisNihi), and the idea is to paraphrase all references to objects away. See about [predicate functor logic](https://en.m.wikipedia.org/wiki/Predicate_functor_logic) for a systematic paraphrase option.
Comment: @user107952 Please state a correct definition of monism, and then argue why "the belief that nothing exists" is an interesting philosophical approach and solves some philosophical problems.
Comment: Instead of saying that nothing exists, you might get some traction with the idea that we think in terms of ideas and concepts, and those are made up by us, therefore don't exist independently. You can think: "that's a *pebble*", but you can't **pebble**, and your thought doesn't make anything happen. "*Who, by thinking, can add one inch to his height?*"
Answer: There is the view that nothing is real, or nothing appears the way it is. Buddhist thought can be understood in this way, with the chain of dependent origination beginning with ignorance, and enlightenment as the ending of grasping for unchanging identities to things, and awaking to the true nature of things seperate to our desires for the world to be different than it is. Oneness is more commonly associated with Buddhism, but the Mahayana tradition emphasises Sunyata/emptiness/contingency more. The meditative state can be understood as the cultivation of potential over actual, that by turning away from grasping for specific actual things we can sustain within our corner of the universe a link to a larger cosmos of possibilities, which keeps a door open to the possibility of reframing future suffering into a pattern that seems worthwhile, however impossible that currently becomes to imagine.
If you claim in an unlimited way everything is an illusion, or nothing is real, you are more redefining those words, than making observations about the world. Coherentism of nested 'illusions', that it's illusions top to bottom like'turtles all the way down', is an approach that can be taken. Hofstadter's Tangled Hierarchies can help take that nested picture the next step to include layers of self-reference and interacting networks, and help us understand an ontological shift from substance to process. It's not that anything simply is as some independent noumena, but that everything is interacting in a mutual process, and material or things are just relatively persistent patterns within that.
Existential Nihilism is a more substantive philosophical view than the proposed 'nullism', though argued by many critics to be self-contradictory. I see it rather than as being an assertive stance, more as holding to a deep scepticism towards any mode of Foundationalism to our knowledge and thought. Which, I think is very much compatible with Mahayana Buddhist ontological thought - the metaphor of Indra's Net points towards a peer-to-peer network picture of reality, and Alayavijnana or Eighth Consciousness can be closely compared to the Noosphere or Memesphere, the domain in which ideas replicate, which can help us understand that abandoning universals doesn't have to mean abandoning trying to make sense of our lives.
There's also a strong strand in Eastern thought of anti-conceptualisation, or anti abstract thought, which can be mistaken for scepticism towards having any ontology. Discussed here: Philosophers or philosophical traditions that reject symbolic reasoning
I would describe the 'nullist' strands of philosophical thought as denying universals or absolutes.
It's interesting to consider the Zoroastrian picture, in which the material world is all made by the Enemy, a deceiver. And the realm of Ahura Mazda is a transcendent and imminent world outside and beyond it. In this picture specifics are the problem, and universals or transcendental thinking is the way out.
Comment: How universals or transcendental thinking can solve problems in the material world as the way out since as you asserted they're in totally different realms, 'a transcendent and imminent world outside and beyond it'?
Comment: @DoubleKnot: That basically just means involvement in creating outcomes you won't see in your own lifetime. The 'realm' of ideas is not seperate to the physical world, it just links together substrate-independent information patterns together; eg a computer file that gets copied is considered 'the same thing', but that means something other than a conventional picture of 'thing'. Mind-uploading faces issues like erosion of identity if multiple copies of you are made. Science Fiction explores this well, eg Bobiverse books, or the Sobornost in Hannu Rajnuemi


Can you obtain detailed date information on publications when using Google Scholar?

Question: My question is related to Google Scholar. I know that I can search articles by specified year or year range, but is it possible to obtain detailed dates of publication/indexing in Google Scholar? If so, how could I do it?
Answer: Sometimes.
There is no way to search by more specific date ranges but an exact date might be available for a particular paper. For example, this paper shows a publication date of 2014/4/26 but this paper only shows the year, 2015, but no month or day.
Otherwise, if Google Scholar doesn't show the date, you can follow the link to the publisher's website which might have it. For example, IEEE lists that second paper as having a conference date of "Sept. 29 2015-Oct. 1 2015."
Comment: Yes, I've found this differentiation and tried also "step by step" digging method but it's very time consuming and works occasionally. But what about indexing date in scholar database?
Comment: @MichalSzulc I'm not quite sure what you mean. My typical workflow is to collect all the bibtex snippets (from the publisher, not Google Scholar, since it is often missing info) for any paper that I might find useful in the future. Then I can use my bibtex manager to search on dates or anything else.
Comment: What do you mean by "from the publisher, not Google Scholar"? Do you always contact publisher by email/phone and ask for a copy?

I'm curious of a date when google scholar indexed searched document in its database. Something like this: http://googlesystem.blogspot.com/2008/02/google-shows-when-it-first-indexed-page.html (however this engine descibes in fact **last** date of indexing/crawling, not the first one )


Transporting radioactive fuels

Question: Imagine a light spaceship capable of traveling at 0.999c is tasked to tow a radioactive cargo containing millions of tons of polonium and radium, however the container holding the radioactive materials made of 100mm thick concrete with 50mm lead layer tethered by a 10000mm long carbon nanotube cable, my concern is the close proximity between my crews and the cargo due to length contraction when going 0.999c? Am I being paranoid or I need to cancel the shipment as I don't want to compromise safety?
Comment: I love the idea of a light speed space ship operating like a barge.  Hopefully it is brought up to speed by grizzled boatmen with long poles.
Comment: It might be worth noting that if you can travel at .999c, there are a lot of things you can do to denature or dispose of radioactive waste that don't involve towing it behind a bunch of meatbags...
Comment: 1 million tons of Po is a cube about 50 meters on a side. And you can only "afford" 10 meters of tether? Um...
Comment: Are these standardized containers? If so, the problem should already be accounted for.
Comment: When you use the length unit "mm" do you mean millimeter? Or meter? Or some other distance?
Comment: @puppetsock: SI unit, budget only allow 10m long carbon nanotube cable!
Answer: Length contraction, like time dilation, is only seen by outside observers.  To the crew, their spaceship & cargo, and their perception of time, will appear unchanged.  It's only the outside universe that will look weird.
So to the crew, the cargo will always appear to be at the end of a tether that's 10,000 mm* long.
*Did you really mean 10,000 millimeters? That's only 10 meters. 10,000 meters would be more reasonable.
Comment: If I hadn't to start my daily commute, this is what I would have written.
Answer: In any reasonable situation, the trip is absolutely pointless in the extreme. Totally counterproductive, even directly harmful.
At 0.999 light speed, the gamma factor is 22.37.
That means, in order to accelerate a mass to 0.999 light speed you must expend an energy 21.37 times the mass-energy equivalent. That is, you would need to expend grotesquely more energy than you could, by any means, get out of the material you are transporting. Where do you get that energy?
In addition, you must deal with the rocket equation. The reaction mass you must expend is many times the mass you must transport. Since you must accelerate at least part of your reaction mass as well, the rocket equation is a real killer here. You wind up needing to expend many thousands of times the total "payload" as reaction mass and as fuel to get the energy.
So, imagine you have a monstrous large supply of fusion fuel. Many thousands of times the mass you are disposing of. (Tens of thousands? I'd have to do some difficult math to be more precise.) And you run a fusion rocket to get power for your spaceship. And you pump out several thousand times the total mass of fusion products as reaction mass. That material winds up as a nasty backwash from your rocket motors.
So, if you are trying to get rid of Radium and Polonium, it seems kind of silly to try to do so by creating thousands of times as much mass as blazing hot (both temperature and radioactivity) rocket exhaust, and shooting that directly back towards the place you are leaving. People might complain.
In addition, Polonium and Radium are pretty easy to store.  They are alpha and beta emitters, so they are not really a problem unless you eat them. You just take it to some unused desert without much ground water flow, and you leave it there. The very fact it is radioactive means it is decreasing the problem nature on its own. The longest half life isotope of Polonium is Po209 with a half life of 125.2 years. So after that long, your problem is half as big. If you really have a phobia about radioactivity, you just park it on some unused part of the moon. No wind, no water, no stray animals. It stays there until you come back for it.
Comment: +1 for Alpha/Beta emitters. That would drastically decrease the shielding required. The current container thickness already stated by OP is probably already overkill.
Answer: James' answer is fundamentally correct.
On top of that, consider that with time contraction you also have time dilation, so for an external observer the time between nuclear decays will be longer, thus the radioactive fuel will be less radioactive, "magically" matching the shorter shielding.
Answer: If you are flexible on the shielding materials, this trip is no problem.
While concrete and lead are effective shielding, so too is water. Within just a few meters, the radiation from spent fuel rods can be rendered effectively harmless.

For the kinds of radiation coming off spent nuclear fuel, every 7
centimeters of water cuts the amount of radiation in half.

At several meters in depth, you could be so bold as to swim in the pool if you felt so inclined. Although water tends to be heavy/lots of mass, since you are hauling millions of tons this doesn't seem like much of a stretch.
A final point is that the concrete may in some circumstances, be more dangerous to your crew than the fuel rods. It will absorb oxygen in the room, which is not so bad on Earth but a potential serious problem on a spaceship. Any repairs to it will also be a problem for the same reason. Another issue is that it can also absorb toxins so it will be radiating those into the environment around it as well.
A similar real life example of this is a crew that entered a ship compartment that was closed for a extended period of time. Steel naturally oxidizes and rusts in the presence of oxygen. This rust built up in the compartment to such a high concentration that in the span of time it took the unfortunate crew member to climb the ladder down into the compartment and then start his climb back up, he was rendered unconscious. This is just one example that poor ventilation in a closed environment like a spaceship can be lethal.
So, my recommendations are to:

Increase the amount of shielding, either metal, water, etc.
OR

Slim down the size and mass of the ship and send it unmanned and collect it at the destination or use some sort of AI autopilot.
Comment: This is being towed *behind* the ship (hence the tether), not carried inside, so absorption by the concrete isn't an issue.  Keeping water liquid might be...
Comment: Supplying power via the tether connection is not an unrealistic possibility. That can be used to regulate the state of the water inside.
Comment: You don't _need_ to be flexible on shielding materials if you just use a really long tether. The inverse square law will help you out here, and you'll save a lot of mass by ditching all that unnecessary shielding.
Comment: OP:  "Budget only allow 10m long carbon nanotube cable!" Basically anything is cheaper than carbon nanotube.

Transporting radioactive fuels


I have a Mariner 5 HP outboard. I need info please?

Question: My Mariner is a 5 HP model 5M,  Code 6E3  S, and Serial # 148968. I'd like to know who made it, what year model it is. Help Please !
Comment: Welcome to the site. We can probably get you the manufacturer and model, but asking for parts sources is off-topic for the site. I'll modify your question accordingly.
Comment: Thanks,  I have determined that the engine is Japanese and manufactured in 1986. I need either a new carb or a carb rebuild kit. The engine is like new but the diaphragm no longer functions probably due to age.
Answer: According to this site, it's a 1986 motor, and it's actually a 5C M.
According to this other site, they were built by Yamaha for Mercury.
Comment: Thanks, Yamaha is good. I have ridden and raced Yamaha Cycles for years.


open source regression suite

Question: I have a program, let's name it a.out, that reads input from a file and writes some output to stdout. For example a file contains the line
2,2
and my program "./a.out file" writes 4 at the screen.
Now in order to be sure that a.out works well after the patch, I am looking for a good regression suite for Linux. I want for every file that contains 2,2 my program to return 4 and I want this to be a test case.
Any ideas on regression packages?
Comment: Up-voted, good question, but its hard to suggest test cases without code. Does the function reading the file return a string / bool / etc?
Answer: Have a look at TAP for unit testing. Its what Perl uses for testing the innards of  Perl (specifically CPAN submissions), CCAN adopted it. I'm assuming C (you did say a.out). Then, simply make your read function fail if 2,2 is read (hinting on 3 bytes) if NDEBUG is not defined.
You could use something else, like -DUNIT_TESTS_RUNNING, just watch out for dependencies.
Then again, if the function you are testing returns a string .. no need to bother the preprocessor, let the test figure that out.
TAP is really, really easy to integrate. You can find my ad-hoc Valgrind aware version here. Note, that is not proper, that repo is a mess, but worth showing how easy it is to make other tools work with TAP.
Incidentally, TAP : (T)est (A)nything (P)rotocol
If this is NOT C, you need to re-tag your question.

open source regression suite


php, mysql, my memory leaking

Question: I didn't expect this script (throw-away) to be leaking and I haven't figured out what the culprit is.  Can you spot anything?  Although this is throw-away code, I'm concerned that I'll repeat this in the future.  I've never had to manage memory in PHP, but with the number of rows in the db, it's blowing up my php instance (already upped the memory to 1Gb).
The california table is especially larger than the others (currently 2.2m rows, less as I delete duplicate rows).  I get a memory error on line 31 ($row = mysql_fetch_assoc($res))

Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried
  to allocat e 24 bytes) in C:\Documents and Settings\R\My Documents\My
  Webpages\cdiac\cdiac_ dup.php on line 31

PHP 5.3.0, mysql 5.1.36.  part of a wamp install.
here's the entire code.  the purpose of this script is to delete duplicate entries (data was acquired into segmented tables, which was far faster at the time, but now I have to merge those tables.)
what's causing it?  something I'm overlooking?  or do I just need to watch the memory size and call garbage collection manually when it gets big?
<?php

define('DBSERVER', 'localhost');
define('DBNAME', '---');
define('DBUSERNAME', '---');
define('DBPASSWORD', '---');

$dblink = mysql_connect(DBSERVER, DBUSERNAME, DBPASSWORD);
mysql_select_db(DBNAME, $dblink);

$state = "AL";
//if (isset($_GET['state'])) $state=mysql_real_escape_string($_GET['state']);
if (isset($argv[1]) ) $state = $argv[1];

echo "Scanning $state\n\n";

// interate through listing of a state to check for duplicate entries (same station_id, year, month, day)
$DBTABLE = "cdiac_data_". $state;
$query = "select * from $DBTABLE ";
$query .= " order by station_id, year, month, day ";

$res = mysql_query($query) or die ("could not run query '$query': " . mysql_errno() . " " . mysql_error());

$last = "";
$prev_row;
$i = 1;
$counter = 0;
echo ".\n";
while ($row = mysql_fetch_assoc($res)) {
  $current = $row["station_id"] . "_" . $row["year"] . "_" . sprintf("%02d",$row["month"]) . "_" . sprintf("%02d",$row["day"]);
  echo str_repeat(chr(8), 80) . "$i  $current ";
  if ($last == $current) {
    //echo implode(', ', $row) . "\n";

    // merge $row and $prev_row
    // data_id  station_id, state_abbrev, year, month,  day,  TMIN, TMIN_flags, TMAX, TMAX_flags, PRCP, PRCP_flags, SNOW, SNOW_flags, SNWD, SNWD_flags

    printf("%-13s %8s %8s\n", "data_id:", $prev_row["data_id"], $row["data_id"]);
    if ($prev_row["data_id"] == $row["data_id"]) echo " + ";

    $set = "";
    if (!$prev_row["TMIN"] && $row["TMIN"])  $set .= "TMIN = " . $row["TMIN"] . ", ";
    if (!$prev_row["TMIN_flags"] && $row["TMIN_flags"])   $set .= "TMIN_flags = '" . $row["TMIN_flags"] . "', ";
    if (!$prev_row["TMAX"] && $row["TMAX"])   $set .= "TMAX = " . $row["TMAX"] . ", ";
    if (!$prev_row["TMAX_flags"] && $row["TMAX_flags"])   $set .= "TMAX_flags = '" . $row["TMAX_flags"] . "', ";
    if (!$prev_row["PRCP"] && $row["PRCP"])   $set .= "PRCP = " . $row["PRCP"] . ", ";
    if (!$prev_row["PRCP_flags"] && $row["PRCP_flags"])   $set .= "PRCP_flags = '" . $row["PRCP_flags"] . "', ";
    if (!$prev_row["SNOW"] && $row["SNOW"])   $set .= "SNOW = " . $row["SNOW"] . ", ";
    if (!$prev_row["SNOW_flags"] && $row["SNOW_flags"])   $set .= "SNOW_flags = '" . $row["SNOW_flags"] . "', ";
    if (!$prev_row["SNWD"] && $row["SNWD"])   $set .= "SNWD = " . $row["SNWD"] . ", ";
    if (!$prev_row["SNWD_flags"] && $row["SNWD_flags"])   $set .= "SNWD_flags = '" . $row["SNWD_flags"] . "', ";

    $delete = "";
    $update = "";
    if ($set = substr_replace( $set, "", -2 )) $update = "UPDATE $DBTABLE SET $set WHERE data_id=".$prev_row["data_id"]." and year=".$row["year"]." and month=".$row["month"]." and day=".$row["day"].";\n";
    if ($row["data_id"] != $prev_row["data_id"]) $delete = "delete from $DBTABLE where data_id=".$row["data_id"]." and year=".$row["year"]." and month=".$row["month"]." and day=".$row["day"].";\n\n";

    if ($update) {
      $r = mysql_query($update) or die ("could not run query '$update' \n".mysql_error());
    }
    if ($delete) {
      $r = mysql_query($delete) or die ("could not run query '$delete' \n".mysql_error());
    }

    //if ($counter++ > 5) exit(0);
  }
  else {
    $last = $current;
    unset($prev_row);
    //copy $row to $prev_row
    foreach ($row as $key => $val) $prev_row[$key] = $val;
  }

  $i++;
}

    echo "\n\nDONE\n";
?>

Comment: @fbas: mysqli is lower level and PDO is higher. mysqli allows more access to MySQL-specific features. PDO has a better interface and supports other DBs. See the question ["mysqli or PDO - what are the pros and cons?"](http://stackoverflow.com/questions/13569/mysqli-or-pdo-what-are-the-pros-and-cons).
Comment: though it gets smaller as I delete things, my California table has 2,200,000+ rows.  I run out of memory (set at 1Gb) around 1.7m rows.
Comment: You should use one of the modern mysql extensions `MySQLi` or `PDO_MYSQL`.
Comment: @kingcruch, I'm sure you're right.  do you have any preference or defining reason for using one over the other?
Answer: I would try two things:
1) Instead of running the UPDATE and DELETE queries inside the loop using mysql_query, save them in a text file, to execute later. For example: file_put_contents('queries.sql', $update, FILE_APPEND );
2) Instead of doing everything inside the while ($row = mysql_fetch_assoc($res)) loop, first grab all SELECT query results, then close database connection freeing all database resources, including the query result. Only after this, perform the loop process.
If you run out of memory while storing the database results in one array, you can try saving the results in a temporary file instead (one record per line / FILE_APPEND), and then use this file in the loop (reading one line per record, using fgets function).
Comment: I agree with J. Bruni, plus the last "else" block really smells.  Why don't you just do `$prev_row = $row` instead of that foreach?  I know this is not the cause of the memory leak anyway.
Comment: @sebastian, I originally used $prev_row = $row, but when I got memory errors, that was the first thing I changed, wondering if that was the reason for the leak - so I was making a copy of the row rather than reference.  It has no effect.
Answer: Work smarter, not harder:
SELECT station_id, year, month FROM table
    GROUP BY station_id, year, month
    HAVING COUNT(*) > 1

That'll get you all the station_id/year/month tuples that appear in the table more than once. Assuming that most of your data is not duplicates, that'll save you a lot of memory, since now you just have to go through these tuples and fix up the rows matching them.
Comment: I tried something similar to that.  Took forever. I cancelled it.
Comment: even with appropriate indexes?
Comment: sorry, didn't realize my answer sounded so dismissive. your solution works. and doesn't gobble up memory because the result set is appropriately small.  I'm still wondering if there's a way to release the memory glommed in the loop, but your query is good.
Comment: If you're using PHP 5.2, try upgrading to 5.3. It's got much better memory management.
Comment: it's 5.3.0, and I figure it's just an issue of having a large result set. it won't release it's memory.  I guess the solution is to make smaller LIMIT queries of the larger set.

this can be an issue if I'm editing rows in such a way that they will be re-ordered in subsequent queries.
Answer: I found this when trying to trace down a memory use problem on a script of mine. Having solved the issue for mine I thought it worth adding a reply here for the next person who comes along with the same issue.
I was using mysqli, but much the same applies for mysql.
The problem I found was the queries not freeing their results. The solution was to use mysqli_free_result() after executing the update and delete queries. But more importantly on the mysqli_query for the loop I used the extra parameter of *MYSQLI_USE_RESULT* . There are side effects of this, so use a separate connection for the update and delete queries.

php, mysql, my memory leaking


Why are mages sometimes played bot instead of traditional ADCs?

Question: In professional League of Legends, why did teams start playing mages bottom lane (not Support) instead of traditional ADCs? What is the reasoning behind this approach, and what balance changes contributed to this?
Answer: ADCs tend to have a very clear path to success: Survive the early game, start getting strong mid-game and be an absolute beast late game.
What happened is that the "stereotype" was made even more evident. ADC's early game items were nerfed while late-game items were buffed. Furthermore Support items were buffed, towers were made weaker and overall games ended faster.
This in turn meant that there was no reason to keep a traditional ADC as chances were, no ADC will get the chance to get enough items to pull its own weight. Next logical best choice for heavy damage from range? Mages with constant high DPS, such as Ziggs.
Comment: Also Ziggs does increased damage to the tower making him able to push more effectively early and get the first tower bonus gold, the TLDR version is that ADC's were taking too long to scale in order to be useful, so players opted to instead use Mages
Comment: It depends on the meta and team comp, i.e. early/late game comp. The current meta favours faster games


Injection moulding

Question: What are some examples of real polymer products that can be be produced by injection moulding ? I thought plastic bottles may be one but I think that is done mainly using injection blow moulding
Comment: Plastic bottles are made by blowing air into a small tube called a "Preform". The Preform is injection moulded.
Answer: cell phone housings and trim, Lego blocks and all other similar types of plastic toys, camera housings, plates, bowls, and dishes of plastic as well as plastic knives, forks and spoons, automobile dashboards, PC and tablet housings, refrigerator drawers, plumbing pipe, fittings, fixtures and sinks, electrical enclosures and conduit fitments, booster seats for children, just to name a few.
Comment: I think you've just done someone's homework.
Comment: It's not a homework question I was just generally interested as my materials module consists of different manufacturing processes so was just curious what could be created by this.

Injection moulding


APK Size V/S Installed APP size

Question: I am new to Flutter and dart language. After developing some example apps seeing from the tutorial I have come to know that the simple Tab-Layout App is taking 7MB for APK after release and after installing the APP the size is 27MB. My question is as follows:

What is the difference between the APK Size and Installed APP Size?
When developing an App whether its Native or Flutter, what should we keep in mind that APK size should not be huge or the size of the APP after installing should not be huge?
Keeping in mind of the all pros and cons of Native and Flutter, what is the best approach to develop an Android APP?
Comment: It is considered bad in stackoverflow to add things such as "Pleas help" or "thanks". https://meta.stackoverflow.com/questions/330562/where-to-say-thank-you-on-stack-overflow
Comment: Oh and your last point can be classified as "primarily opinion based". Which stackoverflow wants to avoid too (as generating more discussion than answer). So we can't really answer that here too
Answer:
Installed App has something like the DOUBLE in space of the standard APK, this is cause by how Android "installs" all Apps. If you open a folder in "/data/app/..." you can see that for each PackageName/App it is stored the standard APK file (the one you release) and there are at least two folders: for libraries and one for optimized code (not accessible/readable from us without Root). These folders contain other extracted and optimized files starting from your APK.
Flutter Apps cannot be smaller than 6-7Mb because it brings all Flutter Core inside them. To "shrink" your App you can follow common rules to shrink any normal Native App.
The best approach? All depends on your skill, how much available time you have to complete the App, how much times the Customer change his minds about the position of some graphic interface, etc... Flutter main website page has written "Flutter is Google's mobile app SDK for crafting high-quality native interfaces" so the main purpose of it is to quickly create Interfaces. This is good when a Customer interrupts our work every 10 minutes because he wants to change something in the graphic aspect and we cannot manually change many XML and then rebuild a version each time, so Flutter could improve this step a lot. Flutter is even good at initial stage when we are not sure where we will set components/widgets at final stage, so we can move all the stuff in few seconds to check the graphical result. Performance of Flutter Apps are quite good, but not good as a Native App obrliviously. Using Flutter could be the good way when you already know that the final APK will be bigger than 25MB, because in this case 25MB or 25+7MB is not that's difference but the speed (in GUI development) provided from Flutter are something not estimable.
Comment: You shouldn't answer the last point; as it falls into the "primarily option based" category. https://stackoverflow.com/help/closed-questions
Comment: "What is the best approach ?" is.  I could say litteraly the opposite by stating that flutter is the best over native. There's no finite answer
Comment: Pro and Cons are not "opinion based" things

APK Size V/S Installed APP size


Using different accounts on Remix JS VM mode

Question: Remix's Javascript VM-mode is great because of its convenience and speed, but there doesn't seem to be a way to interact with your contract using different test accounts. Is there a way to do that?
Answer: Actually, in Remix there's an "Account" dropdown right beneath "Environment" (where you select Javascript VM). It provides five test accounts for you.
Answer: You could create locally a blockchain with 10 test accounts using "testrpc", a fast Ethereum RPC client for testing and development.

Download and install testrpc and then run on terminal "test-rpc". You will then have the 10 accounts and their private keys.
In Remix choose Web3-provider and connect to localhost:8545, where your test-rpc runs.
Comment: That's a good workaround, thank you. I was hoping it would be possible to do with the VM alone (seems like switching account functionality would be pretty doable).
Comment: Turns out it is possible. Just provided the answer.


Ubuntu 14.04 - menu bar , side bar missing

Question: I am running a Ubuntu 14.04 machine. I upgraded VirtualBox to 4.3 by first deleting the old one (as here), then installed 4.3.
While installing the ubuntu software center's progress icon kept spinning even after the progress bar had completed. I tried to start virtualbox by searching its name from the top left menu (I don't what that menu is called). After that the ubuntu software center finished installation for virtualbox 4.3. A weird thing happened at this point; the icon for the ubuntu software center changed to a question mark. At this point it didn't seem like a problem.
I tried a reboot of my system, and now there is no menu bar and no side bar (which appears to the left).
Can anyone help me out ? What did I mess up ?
Edit:
I provided the link I used to solve this problem. At first the desktop came back to normal, but virtualbox was no longer installed. So I tried installing virtualbox-4.3.12 again, this time waiting patiently for it to finish. The problem occured again.
Is VirtualBox-4.3.12 not ready for Ubuntu-14.04 ? The unity package somehow gets uninstalled automatically. I have to reinstall it again and apply the solution in the answer. Also the ubuntu software center gets uninstalled.
Answer: I solved it using this solution. It suggests running compiz and enabling the unity plugin.


Equation of a curved line that passes through 3 points?

Question: I have a screen wherein the upper-leftmost part is at x,y coordinate (0,0). Then I have a curved line that passes through 3 points: (132, 201), (295, 661) and (644, 1085). Now, say I want to find 7 points within that curved line so that the line will be equally divided into 6 segments. How do I go about computing the coordinates of these 7 points?
Comment: there are an infinite number of different curves which all pass through the three points you give.
Comment: do you have the equation of the curve?
Comment: @marcotrevi nope. only the three coordinates yet.
Comment: So, I'm afraid we cannot do much. How do we know what curve is the one you're looking at?
Comment: @marcotrevi I'm thinking the equation of the curved line could be estimated through plotting?
Answer: This is a really fun problem.
You would start by solving a system of equation in three variables to find the quadratic formula that represents your curve. Any quadratic equation is defined by three or more points, so you can find the formula if you have three or more points.
The formula for the generalized quadratic is $y=ax^2+bx+c$. We know x and y, so we will be solving for a, b, and c. However, before we begin, we have to convert to Cartesian points, or everything else will be messed up. Our three points are now (132, -201); (295, -661); and (664, -1085). Now lets set up the system.
$$a(132)^2+b(132)+c=-201$$
$$a(295)^2+b(295)+c=-661$$
$$a(664)^2+b(664)+c=-1085$$
Simplifying, we have
$$17424a+132b+c=-201$$
$$87025a+295b+c=-661$$
$$440896a+664b+c=-1085$$
We now subtract equations 1 and 2, as well as equations 2 and 3, to get rid of the c.
$$-69601a-163b=460$$
$$-353871a-369b=424$$
We can multiply both sides of each equation by -1 to make the left sides positive.
$$69601a+163b=-460$$
$$353871a+369b=-424$$
Before we continue, we must scale the equations so they can be solved with subtraction.
$$25682769a+60147b=-169740$$
$$57680973a+60147b=-69112$$
We can now subtract the two equations, getting rid of the b.
$$−31998204a=−100628$$
$$a = 0.003144802...$$
We can substitute this answer into $$69601a+163b=-460$$ in order to solve for b.
$$69601(0.003144802)+163b=-460$$
$$163b=−678.881364002$$
$$b = −4.164916344$$
We can now solve for c by using $$17424a+132b+c=-201$$
$$17424(0.003144802)+132(−4.164916344)+c=-201$$
$$−494.97392736+c=-201$$
$$c=293.97392736$$
We now know that the a, b, and c terms to our quadratic, which is
$$f(x) = 0.003144802x^2−4.164916344x+293.97392736$$
For convenience, I will round to three decimal places, making the equation
$$f(x) = 0.003x^2-4.165x+293.974$$
Now, if you want six equal rectangles from 132 to 644, you just recognize that the difference between these two points is 512, so the difference you want between each one is 512/6, or 85.3333. Therefore, your seven points are

f(132)
f(132+85.3)
f(132+85.3(2)
f(132+85.3(3)
f(132+85.3(4)
f(132+85.3(5)
f(132+85.3(6).

This would give you seven points where the x was balanced evenly. But what if you wanted the actual length of the curve to be split up evenly? This is also a really cool problem.
The arc length of a function f(x)continuous on [a,b] is given by
$$\int^b_a \sqrt{1+[f'(x)]^2} dx$$
It would probably be easiest to just solve the indefinite integral and use it to determine arc length, as substitutions will be involved.
$$\int \sqrt{1+[0.0056x+1.61]^2} dx$$
We can now make the substitution $u=0.0056x+1.61$.
$$\frac{du}{dx}=0.0056$$
$$0.0056dx=du$$
$$dx=\frac{du}{0.0056}$$
Therefore, our integral becomes
$$\int \frac{\sqrt{u^2+1} du}{0.0056}$$
$$178.57\int \sqrt{u^2+1} du$$
This next part is a bit of a thinker. Imagine a right triangle with sides $u$ and $1$. By the Pythagorean theorem, the hypotenuse would have length $\sqrt{u^2+1}$. Now imagine an angle $\theta$ which was adjacent to the side of length $1$ and opposite the side of length $u$. The hypotenuse divided by the adjacent side would represent our current situation, so we make another substitution. This time, we substitute $\sec \theta$ for $\sqrt{u^2+1}$ because in this scenario, they are equivalent.
Going back to the triangle, the opposite side to $\theta$ would be of length $u$, and the adjacent side length $1$, so $u=\tan \theta$. Furthermore,
$$\frac{du}{d \theta} = \sec ^2 \theta$$
$$du = \sec^2\theta \space d \theta$$
So our integral is now
$$178.57\int  \sec^3\theta \space d \theta$$
This is getting really long, so I'm going to skip a few steps. http://symbolab.com/ is there to help integrate by parts and stuff from here. (the actual steps can be seen here: http://symbolab.com/solver/step_by_step/%5Cint%20sec%5E%7B3%7D%5Ctheta%20d%5Ctheta/?origin=button)
Anywho, you get the idea. It's 2AM, and I really have to get to bed. I would greatly appreciate help completing the integral.
Answer: Hint
Since I do not have more idea, let us admit that the three points are along a parabola $$y=\alpha + \beta x + \gamma x^2$$ Parameters $a,b,c$ are easily be determined from the coordinates of the three data points.
Now, the length of the curve is given by $$L=\int_{132}^{644} \sqrt{1+\Big(\frac{dy}{dx}\Big)^2}dx$$ and you want to divide it in six equal portions. So, the starting point being known ($132$), for the second point, you have to solve for $a$ $$\frac{L}{6}=\int_{132}^{a} \sqrt{1+\Big(\frac{dy}{dx}\Big)^2}dx$$ Solving this equation gives $a$.
For the third point, you do something similar and you have to solve $$\frac{L}{6}=\int_{a}^{b} \sqrt{1+\Big(\frac{dy}{dx}\Big)^2}dx$$ and so on.
I am sure that you can take from here.
Comment: Ok, so they are really Bézier curves.
Comment: that's fine, but why assuming it's a parabola in the first place? It could be a bézier curve, since the OP is talking about a screen.
Comment: @marcotrevi and Claude, the curve I'm talking about is the curve from the paths tool of Gimp (a drawing tool).


What work of scifi broke the mold of zombies being undead voodoo minions and depicted them as mindless maneaters?

Question: In the beginning, IIRC, zombies were undead creatures created and controlled by voodoo priests or priestesses. What work of scifi was the first to break that tradition by depicting zombies as uncontrolled, reanimated dead humans that craved live flesh?
Answer: Night of the living Dead (1968)

Romero revolutionized the horror film genre with Night of the Living
Dead; per Almar Haflidason, of the BBC, the film represented "a new
dawn in horror film-making". The film has also effectively redefined
the use of the term "zombie". While the word "zombie" itself is never
used - the word used in the film is ghoul - Romero's film introduced
the theme of zombies as reanimated, flesh-eating cannibals.  Early
zombie films like Victor Halperin's White Zombie (1932) and Jacques
Tourneur's I Walked with a Zombie (1943) concerned living people
enslaved by a Voodoo witch doctor; many were set in the Caribbean.

As far as I know that's the first real zombie movie, and post-voodoo zombies did not start in print.
Comment: The Last Man on Earth (1964), with Vincent Price, started moving things in the mindless-maneater direction, although it was a more vampiric than zombieish. http://en.wikipedia.org/wiki/The_Last_Man_on_Earth_%281964_film%29
Comment: @WayfaringStranger - Yeah, that's true, there are definitely proto-zombies through-out print and film, but most credit Night of the living Dead for introducing the concept of zombies as we think of them today.
Comment: I was thinking this doesn't really count as the undead are called "ghouls" and not "zombies". I would be interested to know where the Z-word was first associated with the roving, flesh-eating undead.
Comment: Sure, feel free to ask a new question on the site. I think this particular question wasn't specifically about the word itself.
Answer: I provided this as an answer elsewhere but it's also relevant here.  The first "modern" zombie apocalypse was actually in the Epic of Gilgamesh:

I will knock down the Gates of the Netherworld,
  I will smash the door posts, and leave the doors flat down,
  and will let the dead go up to eat the living!
  And the dead will outnumber the living!

The Voodoo concept of a zombie is therefore actually the more recent one.


Galaxy S7 Causing Emails in Desktop Outlook to Appear Read

Question: I added my Outlook 365 business email account to my Galaxy S7 phone when I bought it 2 months ago and I have been plagued by my email being shown as read on my desktop Outlook at work since. I am missing emails because they are marked as read, and they are not. This did not happen before I added the account to my phone. I rarely even open my email on my phone for work, so why is it marking them all as read?
Answer: This is happening because your phone is setup to use POP3 and the POP server is marking emails read after downloading them on your Galaxy S7 Android. You can set up Exchange on your phone to have an exact copy of the mailbox on each device or you need to manually mark the emails as unread which is not a very practical thing to do.


Chrome becomes totally unresponsive - Linux Mint

Question: Iam running Linux Mint on my laptop and i have some (serious) problems with Google Chrome.Randomly Chrome becomes totally unresponsive and iam not able to do anything,except restart the system from the power button.I think it's not an issue with system load and/or RAM,because if i for example open lot of "heavy" programs everything seems to work quite fine.When i only run Chrome with not many tabs at random times it freezes the whole system.The weird thing is that Chrome is not heavily loaded with tabs or extensions.I can't figure out what is causing this problem.Any suggestion?Thank you in advance.
Answer: Finally solved. First, remove Chrome or Chromium and restart your system. Install either Chrome or Chromium and start it but do not try to resize it or move it in any way. Click on the menu at the top right of the window and click on settings. Scroll down to advanced settings near the bottom of the page, turn off "use hardware acceleration".
It will say "restart Chrome". Click where it says' "restart Chrome". This worked for me. My system used to freeze up with Chrome, Chromium and Opera. Now it works great with no issues.
Comment: Hardware acceleration can sometimes be a problem. Uninstalling and reinstalling can fix a lot of problems if they are due to corruption or some other things. You solved your problem with a big hammer and a lot of work. You might have arrived at the same result if you took a more surgical approach.  For example, disable add-ons (although if multiple browsers have a problem, that isn't the likely common denominator). If that doesn't fix it, turn off hardware acceleration. If none of the easy stuff works, then look at reinstalling.  Anyway, glad you solved your problem and thanks for posting.
Answer: Have a look at the Chrome Task Manager to see if it's a particular tab, extension or plugin that is struggling. You could also try terminating them one by one to see if you can find the problematic one.
Have you tried using some different browser for a few days to make sure that this is a Chrome problem?
Answer: I have had this problem, but have found a solution:
Uninstall VLC's plugins for rendering any type of media.
I know VLC is about the best all-around media player, but the plugin is the cause of my iteration of chromium-browser hangs, which it never recovers from.
I hope this helps someone. I have filed this information in a more detailed Google Chrome bug.
Answer: I had chromium start locking up after a security update.  It would lock up for 10 yo 20 seconds.  In my case the cure was to turn hardware acceleration back on.  Maybe they should just leave that out of it.


Is it legal to campaign for county independence in England?

Question: Would campaigning for a county independence in England be considered a crime? Or is it totally legal?
Comment: @BCLC I wasn't aware of the existence of Law site/section. My bad. Next time will remember. Thanks.
Comment: nah i mean it's ok apparently to ask here. i don't really care or anything. i think the answerers here don't really care either. i was just wondering
Comment: why are you asking on politics se instead of law se? i'm not saying it's off-topic. just wondering.
Comment: @Mocas if you would prefer the question to be on law, you can flag for moderator attention and request migration. (I'm not saying you should do this, just that it is an option).
Answer: Yes, it is legal to call for secession. This really a legal question rather than a political one. The definition of high treason in the UK is narrow, restricted to waging war, giving aid to the enemy in war, and a few other more specific acts that aren't relevant to secession. Other nations do have more draconian laws, allowing them to prosecute people peacefully advocating secession, but this is outside the scope of the question.
The other relevant offence in England and Wales was seditious libel which is no longer a specific offence; sedition as an offence was abolished in Scotland in 2011. If you support separatist terrorists in any way, you may fall foul of anti-terrorist law, but in the absence of terrorism, you are free to call for independence of any part of the nation you want - just as there has never been any question that it's now legal to call for Scottish independence.
Finally, it was formerly illegal to advocate for the abolition of the monarchy; even if this was relevant to calling for some part to become independent and a republic, which is uncertain, it is no longer an offence to call peacefully for abolition of the monarchy. The Treason Felony Act 1848 has more recently been interpreted such that peaceful calls are allowed in accordance with the 1998 Human Rights Act in the name of freedom of speech.
Comment: *The definition of high treason in the UK is narrow, restricted to waging war, giving aid to the enemy in war, and a few other more specific acts that aren't relevant to secession.*This sounds similar to US law (although the US's stance against secession certainly solidified a while back). Basically if you aren't selling secrets to North Korea or something crazy, you aren't committing treason in the US. The wording in the Constitution is similar, so I wonder if either country based it off the other. A lot of US law was originally inherited, but this may be an exception that goes the other way.
Answer: Yes, this is completely legal - several political parties campaigning for independence for counties and other regional localities already exist, for example the Essex Independence party, Londependence, and the Northern Independence Party. Mebyon Kernow is another example that advocates not for Cornish independence, but for the county to be put on the same footing as Scotland and Wales in the United Kingdom.
These parties have not had incredible success - the candidate supported by the Northern Independence Party in the 2021 Hartlepool by-election received just 0.8% of the vote, and the Londependence party, although set up in the wake of a petition signed by 180,000 people calling on the Mayor of London to declare independence from the UK after the 2016 Brexit vote, only attained 0.2% of the vote in the May 2021 London Assembly elections. Mebyon Kernow currently holds five of the eighty-seven seats on the Cornwall Council.
Nevertheless, it remains legal to advocate or campaign for a county's independence.


What convention is used for sharps and flats in chromatic scale notation?

Question:
This exercise says to leave the dominant and subdominant notes unaltered (pick up the sharp or flat from the key signature). However, I have also seen convention that says use sharps for ascending chromatic scales and flats for descending. This seems to be contradictory. What is the correct way to write the scales?
Comment: Please add the source of the quoted material. Also, for screen readers, please add the text from the image as a quotation in the post.
Comment: In real life it depends on the harmonic context.  In C, for example, a chromatic descent from G to E should use F sharp if the chords are G D7 G7 C.  In E flat minor, an ascent from F to A flat should use G flat if the chords are B7 Ebm C#dim7 B7.
Comment: @phoog if we are truly in Eb minor, we would probably call that a Cb7 chord, and use Gb, wouldn't we?
Comment: @nuggethead yes, probably so, but I meant to write Bb7 Ebm C#dim7 Bb7. :-)
Answer: Generally one tries to notate chromatic scales so that they as easy as possible to read, which mostly means writing as few accidentals as possible. In C or open key this is most easily achieved by writing sharps on the way up and flats on the way down.
In a flat key you would want to avoid sharps where possible and use naturals instead. The example given in the question is close to best practice (I would have written E-natural instead of F-flat to save an unnecessary accidental on the F). This is also a case where one might make an exception to not mixing sharps and flats: the G-flat could be written as F-sharp.
Comment: In a descending chromatic scale in A minor, though, you would typically use G sharp and F sharp rather than A flat and G flat.
Comment: @phoog I'd be more likely to use flats. A chromatic scale is already outside the tonality.
Comment: @phoog But of course it depends on the context.
Comment: "A chromatic scale is already outside the tonality": There are plenty of tonal pieces that employ chromatic scales without deviating significantly from the tonality.
Answer: Rule 1: don't mix flats and sharps without good reason. (A leading-tone would be a good reason, but is not easily encountered with that function in a chromatic passage.)
Rule 2: If in a section with a key signature, the type from the signature is preferred. If you require the natural note while the key signature modifies it, the natural sign is needed.
Comment: "is not easily encountered with that function in a chromatic passage": the seventh degree of the scale (when raised, if the tonal context is minor) is routinely used as such in chromatic passages.
Answer: What I have seen is slightly different. Notating a chromatic passage within a given key signature calls for leaving all diatonic notes unmarked; notes that proceed downward scalewise get flats or double flats or naturals and notes that proceed upward scalewise get sharps or double sharps or naturals. There is no mixing of sharps or flats in these passages.
I do not recall seeing notation of chromatic passages that skip around; I'm not sure that these are based on a chromatic scale but are just a bunch of chromatic passing or neighbor tones scattered around. I'd probably try to minimize the total number of accidentals.
Comment: This works as long as you consider both the raised and lowered sixth and seventh scale degrees "diatonic" in minor.  The typical common-practice harmonisation of a descending chromatic scale in (e.g.) A minor uses G sharp and F sharp, not A flat and G flat.
Comment: You're right (perhaps the net-ism "your right" could be "your right to be right is my rite").   I forgot to note that one should still have 7 letters (H & B identical in German?) and no letter both sharped and flatted.) I like to think of steps 6 and 7 in a minor as "mutable"; in some sense close to diatonic but with a chromatic tinge. I once counted accidental (non-signature) in a bunch of pieces using the current convention, the Baroque one-less-sharp-or-flat, and a Bartok-like lower sixth step and upper seventh step; all took about the same number of added accidentals. Anecdote, not data.
Comment: "I like to think of steps 6 and 7 in a minor as "mutable"": that is a far more sensible way of approaching it than the knots that people tie themselves into otherwise.
Comment: B seems to have been mutable since pre-history (before 800). It's not a new concept. I have a set of principles somewhere based on reading various suggestions. Mostly pointing out when one uses each. The only real solid recommendation is that one uses the lower 6 for the upper neighbor of 5. Others were: the augmented chord on 3 is rare, and the "3" minor scales are used together in the same passage quite often and in both directions.
Comment: Before 800?  I thought Guido introduced that in the 11th century.  To what are you referring?
Comment: Guido introduced the notation for flat (on B, of course). I was assuming (instead of remembering?) that it wasn't a new practice (as of Guido's time). The point was to allow transposition of modes (like sharps and flats do now).
Answer: This example baffles me.  I was taught that if a chromatic passage or note is ascending, use a natural or sharp to raise the note from within the key; if it is descending, use a natural or flat to lower the a note from within the key.  In the key of C then, going up we would have

C C# D D# E F F# G G# A A# B C

And going down we would have

C B Bb A Ab G Gb F E Eb D Db C

Applying this convention to the key of Ab, ascending would be

Ab A Bb B C Dd D Eb E F F# G Ab

I will look for a source to defend what I was taught!
Comment: This rule works for many situations but not for others.  The second note in a descending tonic-to-tonic chromatic scale is typically the leading tone, so it should be spelled as such, and in tonal contexts generally pitches in the tonic scale should be spelled as such, giving Ab-G-Gb-F-Fb-Eb in both A flat major and A flat minor.
Comment: I see I misread the answer slightly, but my comment still applies in cases of secondary harmony.  For example, in C major or C minor, if the harmony for the half step below G is D major then it should be an F sharp, not G flat.
Answer: Several points.
*If the key has sharps, try to keep any accidentals sharp (or natural).
*If a key has flats, try to keep any accidentals flat (or natural).
*If a letter-name note is followed by another, the same letter, but there's an accidental needed, try to use whatever, so the second note doesn't need another accidental to cancel the previous.
*With a scale, it's commonplace to write accidentals as sharps rising, and flats falling (for the above reason).
*Often not used - reflect the accompanying chord name with appropriate notes! I often see, e.g. C7♯9 with an E♭ instead of the 'proper' D♯.
*I don't believe there's one adhered-to convention - writing by all sorts of folk seems to reflect this!
Comment: But the chromatic line descending from A to E in A minor is typically spelled with G sharp (but would be A flat if the chord were Bb7).  Similarly, it could use G flat or F sharp depending on the harmony.


Should I Add .cvsignore file to CVS?

Question: Every time I ignore something in IntelliJ, it asks if I want to add my .cvsignore file to CVS.  To me, this seems like a bad idea.  What if other team members have their project set up differently and they need to ignore different files?  Is there any good reason to put the .cvsignore files in CVS?
Comment: It's a common practice to share ignore files via VCS. Subversion stores it as properties instead of separate files so its users have no choice. Git users normally share the `.gitignore` file. CVS users (if they still exist) also do this.
Answer: Background for the uninformed: .cvsignore is a file that tells CVS which files or directories to ignore in a CVS version controlled project. If you don't have the .cvsignore file, an IDE may add it to your project files so that your IDE's configuration is not added to source control the next time you check in. This is good because you don't want to push your personal IDE config onto other developers on your project.
Checking in your .cvsignore file is personal preference, but you may want to check with your team first.
Other developers on your project may have different IDEs and different local files that they want to ignore. If all of you add your personal ignore preferences to the .cvsignore file, you could have it already set up for the next developer. This is a good thing, and this is why checking the file in to your repository generally makes the most sense.
You can see how common this practice is by searching open source repositories. GitHub has .gitignore files, for example.
The only thing to be aware of is how your project is deployed - you don't necessarily want this file on a production web server or shipped with your software.

Should I Add .cvsignore file to CVS?


Schematics SN54LV132A NAND Gate

Question: Has anybody used TI's SN54LV132A NAND Gate in their design or have the reference schematic ?
Comment: If Steven's answer isn't what you want, its not clear what you're asking. You attach the inputs to two signals that are generated by something else. You connect the output to something where you want the inverse of the AND of those two signals. It's so simple, there isn't any "reference schematic." You just use it wherever you need a NAND gate.
Answer: 74LV132 datasheet
But the pinout is the same of the 74HC132
EDIT: It's a NAND with Schmitt triggered inputs. Basically does what the normal NAND does, but it has hysteresis in both input pins, so that there are two separate thresholds for raising and falling inputs.
Comment: Thank you guys. But I already have the datasheet. I want to know how the input & output side of the gate is connected (For ex: Figure 1 in datasheet) or any application in which SN54LV132A is used...
Answer: A and B are the inputs, Y is is the gate's output. These are very common designators, and are also illustrated on page 2 of the datasheet. Pin designators on the pinout on the first page starts with the gate number, followed by the input or output designator. So 1A, 1B and 1Y are pins of the same gate.
Comment: If he uses a such fancy gate, he should at least know why, am I wrong?

Schematics SN54LV132A NAND Gate


Can p7zip create smaller zip files than winzip?

Question: 7-Zip for Windows creates smaller zip archives than WinZip, so presumably P7zip can create smaller zip archives than Zip in Linux. So how do I create zip files using P7zip in Linux?
Comment: You're in linux  Historically P7Zip is better used as a GUI in linux than an actual tool.  As such, P7Zip uses the native tool's on linux to create an archive.  I urge you to read the [Tar Man Page](http://linux.die.net/man/1/tar)
Comment: Welcome to Stack Exchange. This is a [questions and answers site](http://unix.stackexchange.com/tour), not a discussion forum. Please ask separate questions separately — since nobody's answered different parts yet (fortunately), I edited out your second question, you're welcome to post it separately.
Comment: @ECarterYoung P7zip doesn't call any external tool. I don't know where you get that it's a GUI: P7zip is a command line tool (there are third-party GUI frontends for it).
Answer: Experimentally, 7z does compress a little better than zip. I don't know how it compares with Winzip.
$ zip -q zip.zip /bin/{bash,cp,ls}
$ zip -q -9 zip9.zip /bin/{bash,cp,ls}
$ 7z a 7z.zip /bin/{bash,cp,ls} >/dev/null
$ 7z -mx=9 a 7z9.zip /bin/{bash,cp,ls} >/dev/null
$ du -ab *.zip | sort -n
550617  7z9.zip
559890  7z.zip
576161  zip9.zip
578382  zip.zip

The numeric option (-9 for zip, -mx=9 for 7z) tells the tool to spend more time to achieve a better compression ratio (it's a scale from 0 to 9).
You'll get better compression by using 7z format instead of zip format. The downside is that you need P7zip for decompression, Winzip can't handle it.
$ 7z -mx=9 a 7z9.7z /bin/{bash,cp,ls} >/dev/null
$ 7z a 7z.7z /bin/{bash,cp,ls} >/dev/null
$ du -ab *.7z | sort -n
471964  7z9.7z
472415  7z.7z

Install P7zip from your distribution's packages; if you have some weirdly incomplete distribution that doesn't include it, get it from upstream. There are three executables (sometimes package separately): 7zr only handles 7z archives, 7z handles many common archive formats (including zip), and 7za supports additional plugins (useful for rar, which requires non-free code that isn't linked into 7z itself). You can use the option -m to select the archive format, but usually this isn't required since the tool selects the format from the file name.


Can someone simplify the 2nd and 3rd point (from top) of the post given in image below?

Question:
I am confused about what the 2 paragraphs (specified in title) actually mean.
So far my brief understanding of:
Paragraph/point "2"→ Authors who refuse to write a story where they dont express their political views means their political views are wrong.
Paragraph/point "3"→ Okay this I don't get at all... " 'Conflating' didactic stories with authours who have any interest...." doesn't conflating means to mix/blend? How do stories mix with authors' responsibility regarding the message they give out in their work disingenuous? I tried searcing meriam webster, oxford and wikipedia's dictionary but 'conflate/conflating' only means 'mixing'
Just trying to get a better grasp on English here, this is NOT a post about political views nor does this post intend to start a discussion regarding how mordern literature( i.e stories in video games) should be etc.
Answer: 2 means the author thinks it's impossible to exclude politics entirely when creating something. (if your work aims for verisimilitude in it, your paradigm will influence it, so there is some merit in the claim)
3 is badly worded but can be restated: "It's disingenuous to link didactic stories to authors having interest in and responsibility for the message of their work."
I think they are trying to counter a theoretical argument that cites the existance of didactic works as proof that authors are responsible for their works' "messaging".
They might be trying to say something more along the lines of "Just because some authors preach doesn't mean every author must."
It's not a shining example of clear writing, though.
Comment: So in "2" he thinks that one's biases will reflect in their writing? (Yes it is impossible to remove  ALL biases from oneself).. but what's with "... that you'd think it'd be poisonous"?  . And  about "3"... for context: the journ here is criticising a game developer for saying he wants to keep politics at minimum in his games, he doesn't want his games to push any agenda be it left or right . If so, doesn't the 3rd point conform rather than discredit the developer's viewpoint?
Comment: "...poisonous to craft" is just a pretentious way to say 'If you don't agree with this claim, you're a stupid head' not some cogent argument. 3's an even worse mess, excepting only brevity.


How do I remove this hub?

Question: I purchased a used set of wheels for an old Schwinn.  I'm looking to replace the hub because when I put the old Schwinn front freewheel system cartridge on it, the spacer rubs quite badly against the inside of the cartridge.  There are no lock nuts, cones or anything else to be seen.  I'd like to remove the hub and replace it.  Thanks!
Answer: You don't.
That's a hub for a freewheel, which threads on and the thread is part of the hub.  All the pawls are inside the freewheel which is not supposed to be serviceable, and is replaced when you buy new cogs.
The modern wheel has a hub, a separate freehub, and a cassette which simply slides onto the freehub.

To change the hub, you'll have to undo all the spokes and assemble the wheel with a different hub, likely different length spokes, and the same rim.
A better solution might be to sell this vintage wheel as-is, and buy a more modern replacement wheel with a cassette.   However you've mentioned a "Front Freewheel System" which is particularly vintage, and I suspect you're trying for a period-correct bike.
 from https://en.wikipedia.org/wiki/Front_freewheel
This setup is unusual - the front chainrings can freewheel when coasting, so the chain keeps moving and you can change gears while coasting.  To keep the chain moving, the rear cluster does NOT have a freewheel or other escapement.  The only reason its threaded onto the hub is to facilitate replacement when the teeth are worn.
I fear you might have problems finding a replacement cluster.

How do I remove this hub?


Is there a word that refers specifically to lizard-skinned winged quadrupeds that breathe fire?

Question: The word 'dragon' is usually used to refer to the sort of animal I wish to describe, but throughout the relevant work I have been creating I have used this word in another sense, namely to refer to serpentine mammavian fish that float in the air. I have already published some stories that use 'dragon' in this sense and I wish to maintain consistency, so I cannot change this. It is not feasible for me to use the same word for both creatures. I would like to know if there is some other word for me to refer to a winged fiery lizard
Comment: Why don't you use dragon in its normal accepted sense and think of a better word for the "serpentine mammavian fish that float in the air" (whatever that is)?
Comment: @KillingTime It seems like he's using "dragon" for Chinese dragons, so this is an accepted term.
Comment: If it was me I would use "wyrm" for the serpentine creature and "dragon" for the flying firebreather.
Comment: @KillingTime Do my edits explain it well?
Comment: The interesting thing is that as dragons do not exist, can any descriptor be valid? Other than that, a classifying name for your new dragon could work, e.g. "It is a Cambrian Dragon."
Answer: In addition to other answers here, Merriam Webster offers the word Firedrake

Merriam Webster
Definition of firedrake:
a fire-breathing dragon especially in Germanic mythology
First Known Use of firedrake
before the 12th century, in the meaning defined above

The word is relevant to Smaug and other dragons in J R R Tolkien's fiction (Silmarillion and The Hobbit).

Urban Dictionary
uruloki:
Dragons, in the language of the elves.
The term appears in Tolkien's Silmarillion
Glaurung was the first of the uruloki, and Ancalagon the greatest
The uruloki included not only the winged dragons but also the wingless fire- and cold-drakes.

There are many accounts online. Here is an example from Screenrant

Screenrant
Dragons are divided into categories based on their ability to fly, and breathe fire. The most infamous is Smaug, along with Glaurung and Ancalogan, who are classified as Fire-Drakes, which are the typical fantasy standard for these creatures. Tolkien used the terms "Dragon" and "Wyrms" almost interchangeably.
Some dragons in the Legendarium could not breathe fire, and are regarded as Cold-drakes. Typically, these creatures did not have legs or wings, while some could breathe either smoke, or mist. Despite lacking the raw power of their Fire siblings, Cold-drakes still possessed sharp claws and armor-like scales.
Answer: Drake
This is what I would use if you specifically want to use an English word. It's a Germanic derived word that simply means 'dragon' (in contrast to 'dragon' itself, which is of Greek origin via first Latin and then Old French), but is sufficiently different that it should avoid confusion. Most native English speakers will either immediately understand the meaning, or at least be able to quickly infer it in context, because it's reasonably common in fantasy usage.
The caveat to this one is that it's also not unusual for it to be used either interchangeably with the term 'dragon', or as a diminutive form of 'dragon', which may cause some confusion when it's first used, but you can head that off by using it in a way that makes the meaning clear (for example, maybe the MC encounters one for the first time and has never heard of them, and someone explains what it is to him/her).

Beyond that, there are two terms from other languages that come to mind as possibly fitting here:
Draig
This one is a Welsh and Irish word that literally just means 'dragon'. It's probably most commonly associated with the red dragon (y Ddraig Goch) that serves as a heraldic symbol of Wales. The draig as depicted on the Welsh flag definitely fits your description, and the word itself is close enough if said out loud to many English terms for dragons that it should still draw the same associations for many people once they have actually seen it used in context.
Zmei/Zmiy/Zmey/Zmij/Zmay
These are Anglicizations of assorted names in Slavic languages (respectively Russian, Ukranian, Bulgarian/Macedonian, Polish, and Serbo-Croatian) for a particular type of dragon. They're generally portrayed very similarly to the traditional 'Western Dragon' that you appear to be describing, albeit while having the same typical association with weather or water that is common for many Eastern Dragons (such as the Chinese long or Japanese ryuu) and often having shapeshifting abilities as well.
This is sufficiently 'different' from your current terminology that it would provide a solid contrast, though you will likely have to help many readers infer from context what it actually means, but you should be doing that anyway no matter what term you choose to use.
Answer: wyvern is another one.

Here there are two legs and two wings (4 altogether, not 6).  But if dragons are mamavian fish, surely wyverns could have 4 legs.
Comment: Wyverns are specifically bipeds not quadruped. That's why there's a separate word for them compared to 'dragon'. Wyrm-0, Wyvern-2, Dragon-4.
Comment: In every case I'm familiar with, wyverns don't breathe fire. They often are venomous, instead.
Answer: It appears that you've used the word dragon for the creatures that look more like Chinese dragons (long) like the common wingless Yellow Dragon. There is Yinglong also, a winged dragon in ancient Chinese legend which was the symbol of imperial power in the past.
I've found the term pen-dragon in OED but it is obsolete, rare. However, it can serve as a contrast to dragon to distinguish winged and wingless dragons.

A winged dragon.
Certaine marishes, guarded and kept with a kind of cruell Bats..and with certain flying Pen-dragons [L. aligerisque serpentibus].
1601      P. Holland tr. Pliny Hist. World I. xii. xix. 372
OED

The etymon of pen is French penne, pene writing tool, long wing-feather of a bird  and Latin penna feather, (plural) flight feathers, pinions, wings.OED
Note: Not to be confused with Welsh (and a loan word) Pendragon which is an ancient title used by British or Welsh rulers. Pen here is a Welsh word meaning head, chief, top.
Comment: I don't think you can use _pen-dragon_ without everyone assuming you're talking about Uther Pendragon, King Arthur's father.
Comment: Context is King.
Answer: Quetzalcoatl

...the Aztec god of the sun and wind, air, and learning, wears around his neck the "wind breastplate" ehēcacōzcatl, "the spirally voluted wind jewel" made of a conch shell.

Dragon lore usually  varies from culture to culture.
Some of the terms may include calques, loan words, etc.
Interestingly, and as part of a of presupposition, I went in search of image links demonstrating the red "fire-breathing" of Monitor and Komodo dragons, and apparently they do not have red  tongues.
Answer: "Wyrm" has already been mentioned; from the Nordic sagas comes the related Lindworm or Lindwyrm. The latter sounds more archaic but appears to be younger. Lyndwyrm (as opposed to -worm) also has a strong connection to Final Fantasy. I cannot imagine that it is copyrighted though, and the Final Fantasy art looks probably very much like what you had in mind, four-legged and fearsome.


Will my app get rejected?

Question: I'm currently writing a workout logging application in for iOS. My application requires a user to create an account to start logging. All that's required is: username, password, gender, bodyweight. Username/password is used for the initial database row entry, and for unique queries from database. And then gender and bodyweight is used to calculate a Wilks Coefficient (takes into account gender and bodyweight to compare strength among individuals). And that's it. I wrote a privacy policy for this. Was about to submit for review and find out. But looking through the App Review guidelines, it was a tad unclear on the requirements.
Answer: As long as it's explicit in the privacy policy, it should be ok. Have you considered adding HealthKit capability?
Comment: Many apps ask for much more than that and they're ok: you're not even asking who they are! There's nothing wrong with it, especially if this information is functional to the scope of your application. If you have a backend, use SSL, store hashes and not passwords, be a good citizen. (note: there's a billion reasons your app could be rejected anyway, certainly not because you're asking gender and weight).

Will my app get rejected?


How to add validation to Drupal commerce checkout submit?

Question: We have a requirement where user can do multiple registration for an event (i.e. for own and for other users). We want to restrict the user to do only N number of registration or less, where number N may vary from user to user specified on user profile. We are using 'Entity Registration' and 'Commerce Registration' module to do registration.
Answer: Drupal Commerce's checkout form uses button level validate and submit handlers as opposed to form level handlers. This means instead of just adding a handler to the $form['#validate'] or $form['submit'] array, you need to add it to the correct checkout button itself.
In your case, you'll add a handler to $form['buttons']['continue']['#validate'] via a form alter hook. Note that even if you prevent the form from advancing to the next page, though, that the checkout form is a special kind of form that validates and submits each fieldset independently of the form itself.
I'm not entirely sure how the registration module you're using interacts with the checkout form. However, it's possible what you may actually want is to alter the validate callback for a particular checkout pane via hook_commerce_checkout_pane_info_alter() to supply an alternate validate handler that checks your additional registration requirements and prevents that pane from submitting (which would also prevent the form from proceeding to the next page.


How to interpret the output when one or two levels are significant in the seemingly insignificant categorical predictor in logistic regression

Question: I am running a multilevel binary logistic in SPSS.
The predictor variable in question is a categorical variable with four levels. In the first fixed effect table, it seems like the predictor variable is insignificant (p=.128). The table has F, df1, df2, and sig. Doesn't it mean there is no overall effect of the predictor?
However, in the coefficient table, it says that two levels are significant  (p=.035 and .045) among the four levels. For example, in the first table with the title "Fixed Effects", the variable "Text" is insignificant. But in the second table with the title "Fixed coeffeicients", the levels of the variable "Text=3"and "Text=4" are significant.
By the way, there was a two-way interaction effect with that variable.
How can I interpret this result? Should I focus on the first table and say the predictor is insignificant? Or, since there is an interaction anyway, should I describe the significant levels of the predictor variable?
Is there any book or thesis that I refer in this case? Thank you in advance.
Answer: I get to answer to my own question with two references. Take a look for those of you who are in the same shoes.
http://www.restore.ac.uk/srme/www/fac/soc/wie/research-new/srme/modules/mod4/13/index.html
Landau & Everitt, 2004, A Handbook of Statistical Analyses using SPSS, CHAPMAN & HALL/CRC


How WordPress core manage the plugin installation

Question: I'm learning about wordpress plugin creation. I've found very useful the documentations found on wordpress codex about this argument, but I've a question: How the wordpress core manage the plugin installation?
Comment: What exactly do you want to know?
Comment: I want to understand how a plugin is installed after the related zip file is selected and then uploaded. I need to figure out what wordpress core function is called to manage this process
Comment: WP unzips the file and places it in `/wp-content/plugins/`. From there, WP is set up to recognize every plugin in that folder, so it then appears in the Plugins screen on the dashboard and you have the option to activate it.
Comment: Specifically, WP looks at the comments in PHP files in subfolders to determine whether a particular PHP file is a plugin or not.
Comment: @WebElaine so the installation process of plugins is just a function that will unzip the plugin file and then place it insite the `wp-content/plugin` folder right? What comment will wordpress recognize for plugins?
Answer: WP unzips the .zip file and places its contents inside of /wp-content/plugins/. From there, WP is set up to recognize plugins inside that folder with a specific comment:
<?php
/*
Plugin Name: Example Plugin
*/

The plugin can either be a single PHP file directly inside /wp-content/plugins/ or be a full subfolder such as /wp-content/plugins/example-plugin/ containing not only the main PHP plugin file but also additional required files.
Activating the plugin is a separate step - if the user has installed the plugin in wp-admin, they will see a success message once the plugin is installed with a link to activate. The plugin will also appear in the list of all plugins in wp-admin with a link to activate it there.


Unable to run test on gitlab pipeline due to DevToolsActivePort file doesn't exist

Question: I created a sample Selenium Webdriver test using java and maven and pushed it out to my gitlab repository. Then I created a  new pipeline to run the automated tests. This is my first time running a test on the pipeline so I followed some instructions online. The issue I'm having is that the test fails because of this error: <code>(unknown error: DevToolsActivePort file doesn't exist)</code>
I saw some few questions regarding this too and tried to add those solutions but still getting that error. Used this link where I added those arguments.
WebDriverException: unknown error: DevToolsActivePort file doesn't exist while trying to initiate Chrome Browser
Not sure what I need to do to fix this error or how to run the test as a non-root user which can maybe be a workaround.
This is my yml file for the pipeline
<code># calling the docker image where chrome, maven, jdk are available to run the tests
image: markhobson/maven-chrome:jdk-11

# building the maven
build:
  stage: build
  script:
    - mvn compile

# running the tests
test:
  stage: test
  script:
    - mvn clean test
</code>
BaseTest class
<code>@BeforeSuite
    public void beforeSuite()  {
        WebDriverManager.chromedriver().setup();
        ChromeOptions options = new ChromeOptions();
        String runTime = null;

        try {
            InputStream input = BaseTest.class.getClassLoader().getResourceAsStream("runSetup.properties");
            Properties properties = new Properties();
            properties.load(input);
            runTime = properties.getProperty("runTimeOnLocal");
        } catch (IOException e) {
            e.printStackTrace();
        }

        // if it's true, that means running locally on my machine and open the webrowser
        // if it's false, that means it's running on gitlab headless
        if(runTime.equalsIgnoreCase("TRUE")) {
            options.addArguments("start-maximized");
            options.addArguments("enable-automation");
            options.addArguments("--no-sandbox");
            options.addArguments("--disable-infobars");
            options.addArguments("--disable-dev-shm-usage");
            options.addArguments("--disable-browser-side-navigation");
            options.addArguments("--disable-gpu");
        }
        else if(runTime.equalsIgnoreCase("FALSE")) {
            options.addArguments("--disable-dev-shm-usage");
            options.addArguments("--no-sandbox");
            options.addArguments("--disable-gpu");
            options.setHeadless(true);
        }

        driver.set(new ChromeDriver(options));
        Log.info("Opening web application");
        driver.get().get("https://demo.opencart.com/");
    }
</code>
I also put the link to my repo as this is a sample for me to review selenium (need to switch to master branch)
SeleniumReview
Answer: DevTool error is often associated with non compatible version of chrome and chromedriver.
make sure your browser , driver and OS are compatible . Download the correct OS for the gtilab OS and browser types and versions


Our time card punch clock is almost exactly 2 minutes behind the actual time of day. Is this bad?

Question: Is there some way that my employer is somehow benefiting from the time card punch clock being 2 minutes behind everybody's desktop and phone clocks?
Comment: Hey kehrk, and welcome to [workplace.se]! Could you clarify your question a little bit please? Why do you think this may be bad? Is your management aware? If you haven't told them, why not? What consequences (if any) does this have on employee pay or time at work? If you explain what the problem is a little better with an [edit], you will get much better answers from our community. Thanks in advance!
Comment: Seems more likely that the clock is simply set wrong.  Have you tried asking them to correct it?
Comment: I think there's a real question there, though. Does the employer benefit, does the employee benefit, or is it neutral? Are there behaviour patterns that the employee can use to gain a benefit?
Comment: @Mσᶎ - Seems like, as described, it would be neutral.  The employer would benefit if the clock were ahead in the morning and then behind in the afternoon.  Or behind by a _larger_ amount in the afternoon.  But if the offset is constant, it makes no difference.
Comment: Is *anything* that you know off being measured in minutes? If not, the question is irrelevant.
Answer: I will assume you use the same clock when you sign in and when you sign out. So whatever you lost when you signed in will be gained when you sign out or vice versa.
The only warning sign would be, if the clock is showing another wrong time when you leave. If it's always late by the same amount, that's ok. After all, it should measure how much time you spent, not the exact minute you got in.
Answer: It is extremely likely that this is just a mistake or oversight by your employer. I can't imagine 2 minutes of your time being worth a terrible amount to either you or your employer, especially since it's only for once a day. You could simply bring it up to your manager, and he or she will likely fix it. Worst case, nothing is changed, and you can feel free to show up to work 2 minutes later than you normally do.
Comment: "you can feel free to show up to work 2 minutes later than you normally do." - but, as nvoigt points out, then also feel free to leave 2 minutes later.
Answer: Probably just an oversight, but it depends on how your worktime is calculated. If its between punch in time to punch out time, then it doesn't matter. However I have worked at a place where you were supposed to start at 06:00 and the official workday started then. Punching in at 05:58 meant you worked two minutes for free.
In this situation, the company could, in theory at least, stand to gain from an incorrect time. 2/60 * avg hour pay * employees at company * workhours a day * workdays per year, this could amount to a significant number.
Answer:
Is there some way that my employer is somehow benefiting from the time card punch clock being 2 minutes behind everybody's desktop and phone clocks?

There are two ways that it could benefit an employer. For the purposes of this post, "reality" is defined as the time that it actually is, if you look on a time-synchronized smartphone or on a computer whose time is synchronized regularly with an outside server.

If the timeclock is not consistently two minutes behind, it is shady on the side of the employer. (for obvious reasons)
If the timeclock matches reality and the computers are two minutes ahead, then the employer could benefit, and it is more likely that this is unbeknownst to the employer. This is because, when you arrive, it will be based on the "reality" timeframe, meaning you'll arrive in the "work computer" timeframe two minutes ahead. If you leave work in the "work computer" timeframe, you'll actually be leaving two minutes early.

If the timeclock is the one that is off, and the work computers reflect "reality" time, then there isn't really anything to worry about. (barring picky managers wondering why you're "leaving early")