What is a "film base"?

Question: I see this term used in many places. It appears to be some side of the film but how would I be able to identify this? One side is sensitive to light and the other one isn't (light can still go through it).
Answer: Photographic film is a light sensitive coat atop a material that is flexible and transparent. The first successful base material was made of cellulose nitrate made from purified cotton treated with nitric acid. This made an ideal base material. Cellulose nitrate was used until just after World War II. It has a major flaw in that it will burst into flames at a temperature of about 300°F. Worse, it will continue to burn vigorously even if drenched with water. Likely a movie house, somewhere in the world burned down every day. Thankfully "Safety Film" was introduced in the early 1950's. It is cellulose acetate which will burn but it will self-extinguish. Today many different plastic film bases are in common use.
Undeveloped photographic is relatively opaque but strong light can travel completely through it. Images of bright object are sometimes spoiled by an unwanted halo that seems to surrounding them. This is called halation. It is light that passed through during the exposure and re-enters the film from the rear. To prevent, a special deposit called an "annihilation coat" is applied to the base film before the light sensitive coat is applied.
Darkroom workers are required to identify the emulsion side (side with light sensitive goodies) and the base side of roll film. When working under a safelight, the emulsion side likely appears dull by reflected light and the base side appears to have a luster. It can be difficult to make this determination especially when working in total darkness. Some tricks of the trade: All roll film tends to curl with an inward twist. The emulsion side is the innermost side.
Sometimes we wet a finger and touch a tiny area at a corner. The emulsion side will feel tacky.  Sheet film is individual pre-cut films that we loaded into film holders. These films all had notches on one edge. The notches we could feel in total darkness, they identified the film type. We orientated the sheet till the notches were felt in the upper right corner. Holding the sheets this way, the emulsion side was facing us.
You can identify the emulsion side of developed film by looking at it via light reelected off its shiny surfaces. The emulsion side is dull compared to the base side. You can also look at the edge printing which will be numbers, letters and film manufacturer. These words and numbers read correctly when you are looking at the base side of the film.
Comment: The orange tint of color negative films comes from un-developed dye in the cyan and magenta emulsions. Together they give the orange tint. The un-developed dye creates two positive image overlayed on the three negative color images. This is an auto-mask system used to bolster the cyan and magenta dye. Both are slightly wrong as  to color because of the complexity of making the three dyes lecuo (Greek for hidden) until they receive a  single missing ingredient from the developer. The yellow is perfect.  We have yet to find three dyes that can be lecuo and blossom correctly when developed.
Comment: Not to be too nitpicky: the opaqueness of undeveloped film is due to emulsion, not base. The same for antihalation layer. Both go away during the development process (mainly fixer). The base itself is clear. It is usually transparent for B&W film and orange tinted for color film. The amber tint makes the paper in positive process blind to a tiny part of the spectrum that can be used as a safelight.
Comment: The opacity of undeveloped film is a combination, the emulsions  are salts of silver naturally off white yellowish. To this mix are added sensitizing dyes that alter the color of the crystals to force them to react to frequencies other than violet and blue. The anti-halation coat is opaque, generally dyed the color the film is less sensitive too. In some films it is carbon black dispersed in an acid plastic. Most 35mm film base is dyed gray to mitigate light piping likely when the film is not rolled adjacent to a black paper backing that is common for the larger sized rolls films.
Answer: Film base is the transparent medium on which the photo sensitive emulsion is applied. It used to be made of nitrate (highly combustible), later acetate and polyester.
The main functions of base are:

provide support for the emulsion. The base is about 0.110 to 0.180 millimeter thick (roll film thinnest, large format thickest and the 35mm in between), making most of the total thickness of the film.
keep the emulsion flat when exposed; otherwise parts of the picture would be out of focus. This is helped by a pressure plate on the back of the camera, but some fancy cameras actually used vacuum.
not interfere with the positive process. Base for transparency films has to be clear (obviously), base for B&W films can be lightly tinted (it helps to counter halation) but not interfering with multigradation (no yellow, green or magenta - blue and gray is OK) and base for color films has amber tint.
provide archival stability. Polyester works the best, nitrate is risky because of the combustion issues.
Answer: I am not writing about film.
Some of the earlier bases to put the sensitive material were metal plates, and glass. Inclusive your own skin is photosensitive, so you have a skin based photosensitive material.
Well, then someone used film, which had obvious advantages over metal and glass, mainly rolling it.
You identify it if

It is film.
It is photographic... (Sorry I could not hold myself)

As it is transparent you could say that does not matter if you expose it on the wrong side, it will be exposed, but yes, all this bases have a jelly of sensitive emulsion, that needs to be exposed on this side, because if not, the light is distorted by the base itself, and you get a blurry image.
The way to diferentiate it is normally the matt side, because the glossy side is due the acetate nature of it.
And normally, as the film comes in rolls, the emulsion is on the inner side, so it protects the emulsion when it is rolled.
Comment: Would using the wrong side not mess your focusing up by the film base's thickness, even if there was no distortion?
Comment: The 35mm and medium format films are packaged in a way that you can not expose them the wrong way. It can happen with large format films, which come in sheets that you have to load yourself in total darkness. The sheets have notches on a side to help you determining the emulsion side + all film manufacturers remind you to practice loading in daylight.
Comment: On a second thought: you actually **can** expose 35mm film with emulsion backwards. It involves a lot of effort - you need to unwind the film and respool it in total darkness. It does not mess up the focus, but it messes up the color rendition. It is used for artistic effect and the technique is called *redscaling* (you can guess why).
Comment: Most feature a robust anti-halation layer to preclude exposure should the film get loaded with the emulsion side away from the lens. Kodachrome and most movie film have an opaque coat on the obverse called rem-jet (removable jet-black). This is lamp black dispersed in a binder that relaxes in the presence of an alkaline solution. It guards against exposure from the rear that can occur if the photographer should remove his eye from the viewfinder.  Nevertheless, amateurs frequently loaded movie film backwards, by mistake. When severely overexposed, weird images resulted.

What is a "film base"?


How do I export a mesh then import it in to another blender file while keeping the original textures?

Question: What sort of exporting format should I be using? Or will I have to re-assign all of the textures again? Thanks.
Comment: Copy the mesh and open new blender and paste in that file
Answer: As atek said, just press A to select all of the objects in your blender scene that you want to be copied over. press Ctrl C to copy and then just simply open up a new blender file and press Ctrl V to paste those objects into your new scene. this will bring all of your textures with it.
Comment: cool didn't know that this works...
Answer: What Sarcha & atek have proposed here will indeed work however, it is not really the best way to go about it as it would be handy to have the particular object(s) available for use over multiple files and projects. The 'proscribed ' way to do this is using file>append. In the scene that you want to move the object from select the object and make sure that you have it named in the outliner. (If you cannot find it in the outliner due to many unlabelled objects select it in the 3d viewport and then hover over the properties window and hit '.' (period key on num pad.))
Save the scene and close it. (If you have multiple objects that you want to move then highlight them all and make them into a group using cntrl+G.) Name the group.
Now open the scene that you want to place the object in to and go file>append> find your blend file > meshes, (find your labeled mesh,) and click on append from library. (In the case where you have a group labeled go to groups instead of meshes.) all attributes including texture will then come into the new scene.


Preventing Altium via stitching on the designators

Question: In Altium, I want to add via stitching on the ground pours. But the vias sometimes are placed on the designators. I don't want to adjust the designators on silk every time after stitching. So, is there any way to tell Altium not to do stitching on my designators, even on any object on my silkscreen?
Comment: From what I know, Altium doesn't do clearance checking between different layers. In any case, why would you let something like silkscreen influence the electrical performance of your design? I'd recommend that you enable via tenting and be done with it.
Comment: Not all my boards are solder by machine, sometimes we need solder them by hands! The via can be tent sure, but it won't make them invisible, there will be a small hole at least, it "destroy" the designator silk, if the designator is small, make them difficult to read. So if Altium can do this cleverly, why not let it do? :)
Comment: @Amandas, Altium doesn't check copper clearance between copper layers, but there is a design rule to catch silkscreen over soldermask openings.
Comment: @diverger, but you shouldn't need to solder to the stitching vias. If you tent holes up to 10 or 12 mils, it really doesn't produce much of a mark on the soldermask layer and shouldn't impact silkscreen much --- although some fabs might not like fully tented vias because entrapped air can (so I'm told) blow out the tenting sometimes when the board is heated.
Answer: This answer is twofold, answering these questions:

Can you do it?
Should you want to do it?

1. Can you do it?
You most probably can. In the Clearance Rules you can use the keyword "IsStitchingVia", or the parameter line "IsStitchingVia and InNet('{yourNetName}')" for a specific net for the first object and for the second object you can use "InLayer('{yourLayerName}')" and all kinds of specific keywords to find component labels.
But I have never tested whether this works with Silkscreen specifically, since: See 2.

2. Should you want to do it?
No. You should want to keep the stitching as perfect as your design allows, because if you have a need for stitching, you have a need for it to be good and as complete as possible.
Want to make sure your designators are still readable over a via in your stitch? You have them filled and tented. Or very tiny and tented will also often fill them with solder mask automatically - whether filled and tented or tiny and tented is cheaper depends on your fab, but it's extremely likely tiny and tented is cheaper these days.

Appendix: How to tent stitched vias
To fully tent your vias, in the "Add Stitching to Net" menu click the check-marks in front of "Force Complete tenting on Top" and "Force Complete tenting on Bottom". In Version 15 that's lower right, I seem to remember the same for 14, for 16 I don't know as I'm in a critical design and can't risk an update right now.
How to get the vias neatly filled is, as far as I know, asking the Fab what parameter to set and how, but to be honest, last design with Altium I had filled vias my colleague did that, making the last time I specifically requested them myself 2007, so I forgot. (It's possible he just phoned them to ask how small a via should be to guarantee it gets filled with solder mask when tented, to be honest)
Comment: You'll get my up vote if you can post the exact queries to use with the clearance rule.
Comment: @Armandas they are there. I don't know what you lot call your layers, so I cannot fill that in for you. Nor do I know what you put on the silkscreen with which properties.
Comment: I dont' think you'd use a clearance rule. You'd use the silkscreen over soldermask opening rule.
Comment: @ThePhoton But then it'll only highlight, right? The OP wanted to have no stiches because else move text. I mean, I've been dragging refdes and print around the majority of my life and happy to do it for proper design, but still... Question, answer.
Comment: @Asmyldof How is an Electrical Clearance rule going to work with a silkscreen object?
Comment: To be honest, I've only used Altium stitching via generation once and I wasn't impressed. I think the real solution is to add stitching vias manually. It's pretty quick to just shelve polygons, turn on all the layers you're worried about not colliding with, and punch down a bunch of vias wherever you want them.


Attaching conduit to fence

Question: Can I attach pvc conduit to an existing chain link I am installing a storage shed and I don't want to dig a ditch
Comment: Schedule 40 or Schedule 80?
Answer: Whether the fence is deemed a permanent structure suitable for support of electrical conduits is likely in a gray area and subject to the determination your local inspector makes.  You could call in advance and ask.
PVC conduit has to be supported with a maximum distance between supports determined by the size and type of conduit.  For example, 2" schedule 80 PVC supports can be no more than 7 feet apart.  Schedule 40 has to be closer, and smaller conduits have to be closer.  PVC tends to sag and look like hell if you don't support it at the code maximum between supports.
So unless your posts are very close or your conduit is very big, you'd have to fasten to the chain link part of the fence, which may or may not be deemed sufficiently rigid for conduit supports, or run something like unistrut from post to post, and attach to that.
But that would be a big pain and at that point, you might be better off with EMT, which can span 10', or RMC, which with threaded couplings can span 12' between supports.  You might still need to put some strut between some of the posts if there are boxes or etc. that need closer support.

Attaching conduit to fence


How strong are elite mortal troops in Vampire: the Masquerade?

Question: In Vampire: the Masquerade (5e), how strong would be a mortal NPC who specializes in combat? Think "spec ops" who are ready to fight vampires but without true faith or other mystical abilities.
How many of them would be needed to present a fair fight against a rather powerful vampire? (ancilla level with combat-oriented abilities)
Comment: What are they armed with? I mean, do they get flamethrowers, breaching charges and phosphor grenades?
Comment: Are the mortals aware of vampires' strengths and weaknesses?
Comment: I feel like those answers miss the point : my question isn't "how many soldier would the Inquisition use", it's "how much would be a fair fight". Like, if a lone vampire had to steal something/assassinate someone guarded by X of those soldier, would they have a chance? How much does X need to be to tip the scale?
Comment: @AnneAunyme And the answer is: The inquisition **doesn't fight fair**. The moment fire is in the game, they win.
Comment: @Trish That misses the point though.  The question isn't about how mortals would hunt vampires that they're trying to track down and kill.  Or about whether overwhelming numerical superiority allows a bunch of mere mortals to bring down a vampire.  It's 1) what's the upper-bound on the strength/abilities of one "mere mortal", and 2) how many of those are a match for a single vampire in a fight. Presumably the scenario is less "vampire is camped/hiding in a known location and being hunted by a mob" and more "vampire is on a mission and walks into a room of armed guards on his own terms".
Comment: A lot of the older edition question https://rpg.stackexchange.com/q/53272/30306 is still true in V5
Comment: @Trish that's not what I am asking. It's like if someone asked "if all the Chinese people climbed on each other's shoulders, how high would that be?" and you answered "the ones on the bottom would be crushed to death so that cannot work". True, but not helpful.
Answer: A top of the line very well trained mortal would have a dice pool of 7-8 for relevant task (before specialities). A world-class one would have a dice pool of 9. The best of the best would have 10.
For soldier/mercenary/spec op types it is probably safe to assume a dice pool of 7-8 plus a relevant speciality (snipers, swords, CQC, etc) and they would be planning to use their advantage, so a total of 8-9. Really elite squads might even have a mortal with 9 in the relevant dice pool and a speciality for a total of 10.
When going against vampires, you would likely pick the best available.
This probably gives a baseline to work with.
However, "fair fight" is not really what they would do. If the mortals are really out to hunt vampires, they would be using overwhelming force and everything they can to their advantage. They would attack by day, or set the vampire's haven on fire. Use stakes fired from a gun, if really necessary to bring the vampire in "alive" (well, not as ash). Otherwise use dragon's breath rounds, incendiary grenades, flamethrowers, mines, etc. Anything that vampires hate. The mortals will also track their target with cameras and any other available surveillance to prevent it from "disappearing" (Obfuscate, or perhaps Dominate).
In 5th edition, the metaplot has it that the Second Inquisition is in progress and has shown that the worst fears of the Kindred are true - a failed Masquerade has indeed led to the vampires be hunted down and eliminated. As page 39 of the core VtM 5e book reads:

Despite unceasing strife between the undead, the worst threat to Kindred might just come from humanity. The Camarilla has long argued that if mortals were to become aware of the existence of vampires, all Kindred would die on a pyre. They believe that the world would see witch-hunts like never before,
and that no amount of immortal power would be able to defend the lords of the night from the teeming billions inhabiting the planet.
The Camarilla is being proven right.

It explains that these are not even exceptionally well-informed mortals but ones that do know just enough about the threat. It continues with

The Second Inquisition has killed Princes in London and Las Vegas, and it has crippled a clan in Vienna. Dozens of incautious Anarchs and arrogant Sabbat have lost their lives, unused to mortals who know how to hunt for vampires.

If it was not clear, the "a clan in Vienna" which was crippled is the Tremere. Their head Chantry was raided and destroyed by the Second Inquisition. One of the scariest clans in the world were dealt one of the hardest blows by mortals, utterly destroying the core of their establishment and the seat of their power. Upturning centuries of rigid hierarchy. The Pyramid is broken.
Apparently, so bad was the blow they were given in Vienna that "Tremere elders have declared the domain out-of-bounds" (page 95).
Because humans would not fight fair.
Comment: Side remark: humans have not too much chance even in unfair fight. Most importantly, it is very unlikely that any of them would ever learn that vampires exist. A little minority learns this ever; humans capable to harm vampires are a little minority even in this little minority. The count of the humans successfully killed a vampire is probably much below the RPG players played such a human. However, the RPG itself is also a game for the vampires, it helps them to experiment with human creativity in a world what no human should ever know.
Comment: Btw, very likely the "old boys" behind SI are such players, they must master human behavior to puppet them so far. I would not be surprised if they would like RPG, or some mentalist analogue of it a lot.
Answer: It heavily depends on the weaponry and circumstances
It highly depends on how skilled and deadly you want them to be - and how much collateral damage they are willing to commit. But really, dedicated vampire hunters don't fight fair. They fight to win.
Kill it with fire
On the somewhat dangerous side, a few of the NPC archetypes with Molotov cocktails and dragon's breath for their shotguns can be very deadly. To reskin the Molotov to phosphorous grenades make it easier to hit with them, as they blast over a bigger area and maybe even make it harder to remove the burning material. And for backup, pack a .50 cal and load it with a mix of RAUFOSS and Incendiary ammo. And snipers that wait to fire the moment the target shows itself.
In either case, they deal aggravated damage from fire, which is the most leveling factor here. Have them try to stay on distance and gang up. Depending on skill level, taking an Inquisitor Investigator or Inquisitor Delta is enough for a baseline NPC - those are normal soldiers and highly trained soldiers respectively. That's 5 to 9 dice on everything relevant, most likely 7 or 8 dice minimum for all the rolls they need in the combat.
There ain't no kill like overkill
The most deadly vampire killer team doesn't need to get personal. They don't even get near a waking vampire if everything goes right. The building is breached in broad daylight, prepared with explosives and napalm, and blown up before noon. Only very few vampires stand after that.
At least one of the following happens, more likely multiple things at once:

The vampire is thrown into Torpor by the massive amount of superficial damage from the combination of a detonation and falling rubble.
The vampire is turned to crisp by half a dozen rounds of fire damage from being engulfed in the burning Napalm for 3+ aggravated damage per turn.
The vampire is crushed to paste by the falling building and dies from effectively a decapitation.
If the vampire isn't already burned, or turned to paste for the building was only small or lightly constructed, they are now exposed to broad daylight with no cover in a crater that is on fire and take the appropriate sunlight and fire damage.

If the vampire survives, then the hunters are dealing with someone of [Ravnos] caliber. The Storyteller just shouldn't roll at all if the hunters pull out all the stops like this. The vampire and everything in its surroundings is toast.


Network programming - asynchronous, single-threaded, nickname-only chat server

Question: I am starting to learn network programming. I have implemented a very simple chat server based upon TCP, where the users only need to provide username.
The assumption is that the server makes use of no additional threads and the sockets are not blocking. The code:

import sys
import time
import socket
import select

class User:
    def __init__(self, name, sock):
        self.name = name
        self.sock = sock

class Server:
    def __init__(self, host, port):
        self.users = []

        self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        self.sock.bind((host, port))

    def accept_usr(self):
        usock, _ = self.sock.accept()
        usock.send(b"Please, choose your username: ")
        uname = usock.recv(1024)
        self.users.append(User(uname, usock))
        _, writes, _ = select.select([], self._usocks(), [])
        for w in writes:
            w.send(bytes(f"{uname} has joined us!", encoding="ascii"))

    def handlerr(self, errs):
        for s in errs:
            s.close()

    def update(self):
        reads, writes, errs = select.select([*self._usocks(), self.sock], self._usocks(), self._usocks())
        for r in reads:
            if r is self.sock:
                self.accept_usr()
            else:
                uname = [u for u in self.users if u.sock is u.sock][0].name
                msg = r.recv(1024)
                for w in writes:
                    w.send(bytes(f"{uname}: {msg}", encoding="ascii"))
        self.handlerr(errs)

    def run(self):
        self.sock.listen(5)
        while 1:
            self.update()
            time.sleep(0.1)

    def _usocks(self):
        return [u.sock for u in self.users]

if __name__ == "__main__":
    s = Server("localhost", int(sys.argv[1]))
    s.run()

I would be grateful for any hints and comments.
EDIT:
An obvious improvement that comes to my mind is to store the mapping of socket->User in a dict so that I'll be able to quickly determine the author of the message being sent.
Answer: Packet fragmentation
Have a read through this: https://stackoverflow.com/a/17668009/313768
usock.recv(1024) is fragile, and under many circumstances simply won't work for a handful of reasons. You'll need to do some reading about the fundamentals of TCP/IP to understand why that is, but basically, you can't assume that you'll get the data you want all in one chunk.
Context manager
You hold onto some sockets, which are resources that should be closed when you're done with them even if something goes wrong. This is a job for a context manager. You can make your class a context manager so that calling code can be sure that your resources are closed off, regardless of what else happens.
Have a read through this: https://docs.python.org/3/library/stdtypes.html#typecontextmanager
Presentation versus logic
    usock.send(b"Please, choose your username: ")

Typically, this is not done, and instead a pre-chosen number is sent over the wire, leaving the client to choose how to ask the user a particular thing. This becomes especially important when graphics get involved, or when you need to do translation/internationalization.
The first thing
[u for u in self.users if u.sock is u.sock][0].name

should be
next(u for u in self.users if u.sock is u.sock).name

That said... what on earth is this doing? When would that condition ever evaluate to False?
Type hints
PEP484 type hints, such as host: str, port: int, will clarify your function arguments.


HTML5 Audio Object - which WAV formats are supported?

Question: I'm using the Audio() object in order to play some sound files in the browser.
var audio = new Audio(file);
audio.play()

The sound files can come from 2 different "places" and appear to have slightly differing formats.
The file plays correctly when the wav file being passed to the Audio object has the following properties (from "Get Info" on Mac)...
Sample rate: 8,000
Bits per sample: 16
Duration: 00:17
Audio Channels: 1
File size: 278KB

However, when a file has the properties below, I hear nothing, I don't see the little speaker icon in the tab and have no console errors, it's just like nothing happens.
Sample rate: 8,000
Duration: 00:29
Audio Channels: 1
File size: 31KB

NOTE: The only difference is that the second example doesn't have a "Bits per sample" value? ALSO, note the file sizes, despite the lengths???
Can anyone shed any light on this?
NB: This is not related to this issue...
SO Link
Comment: 29 seconds in 31 KB, that doesn't right. Are you sure that WAV file is intact, can you play it using other programs?
Comment: @CBroe, yes if I open it in iTunes, it plays fine!
Answer: Bits per sample is one of the most important factors that is needed to play audio.
More bits per sample gets you better precision, which leads to a more accurate representation of the source signal, which leads to better audio.
A higher value of bits per sample will lead to bigger File sizes.
The one with bits per sample would work without any hassle. You don't hear any sound with the one with no 'bits per sample', as you are not specifying what should the audio be like.
Some references which really help-

JSSoundRecorder
Custom Audio Effects in JavaScript with the Web Audio API
Quantization, Sample Rate, and Bits Per Sample
Comment: Yeh thats some good background reading, but doesn't really address my specific question. Thanks though
Comment: The one with bits per sample would work without any hassle. You don't hear any sound with the one with no 'bits per sample', as you are not specifying what should the audio be like.
Comment: So how come it plays in iTunes, VLC, QuickTime etc? :-/
Comment: Not sure about that. Maybe they play it at default 'bits per sample' value.


Populate IDML with XML without InDesign using sdk

Question: In my organization we are taking XML as input and trying populate *.idml file with it using adobe sdk and java. Is it possible to make working for any custom *.idml file? If yes what is the best approach?
Answer: idml files are just zip files that contain a number of XML files. You manipulate those XML files yourself or you can use libraries such as IDMLlib (http://idmllib.com/) to do some of the heavy lifting for you.
Answer: IDML represents a very large number of settings and parameters, and even using a library such as IDMLLib, as SnB suggests, creating default values for all of these can be time consuming.
The best approach is to create a shell template with all the basic settings that you want by exporting a blank document from InDesign, and then inject your custom content into this in the form of spreads or stories or whatever else you need to create. A more advanced version of this technique might use a template for each different part of an IDML file (spreads, stories, textframes, etc) and populate, then assemble these to produce a finished document.


Is genshin impact haram?

Question: There is a game called genshin impact where you play a character(not me). Problem is that character's story contains worshipping(not actually worshipping) statues of archons(their concept of divine creatures), more like upgrading & cleaning statues or touching statues to gain power. And there are no religion in that game. If a character(not my character) do these things as it is their tradition will it be shirk for me? And I will never treat those statues as god instead I will treat them as powerful npc(non playable character) and I can treat them like that as the game allows me.And there are no animation of worship, character just touch the statue in cutscenes(only one cutscene) other they just stand there and do nothing and gain powers. Will it still be shirk? Please someone answer who has played genshin impact or a knowlegdeable muslim.
Comment: i guess game of thrones is haram because of the religion in the show?
Answer: I actually had that discussion with one of my tabletop players. Feel free to disagree with me, but that's my point of view:
Please remember that you and your character are not one and the same.
When we read literature, we don't always agree with that the protagonist is doing. Not all of their actions are right, and we know it. We have our own judgment.
So, what changes if you have some amount of control over that character? Well, you may fix some of that character wrongdoings, but you probably can't fix them all. This is normal, because the protagonist have his/her own journey. You know that is true, but your character may not. Moreover, something may be wrong in our real world, but true in a fictional one. It's imaginary, after all.
So how it is a shirk for you, when you know that is right and don't agree with a fictional character?
Answer: so far I have been playing genshin for a long time yet nothing was suspicious, until finally it turned out that after I thought again there was something suspicious after I interpreted the word in the statute or the statue "The Seven" they usually called it that, back to the statue, there things you can do with the statue, such as the words - "Worship", "blessing" - well if interpreted clearly it becomes an additional and bless / pray. indirectly it is already a shirk because we are required to do this to gain strength or increase our strength or replenish our blood by blessing to the statue and also indirectly this is brainwashing that has not been realized while we are playing. and actually the characters played are actually just silent and don't do anything to the statue, but with the words or text written on the statue, it hurts my faith and makes me worry about the shirk that has been realized to continue playing.
So, if you are a Muslim then you worship other than your God (Allah) then it is a sin of shirk, and this sin of shirk cannot be erased and will remain a problem on the day of retribution or the day of the trial.

_
_
_
_
_ Addition: I have stopped after knowing this. Well, the reason I have mentioned above.
actually I'm quite happy playing the game, even if I want to go back to playing it actually by replacing the word "Blessing" in the Statue with "Magic Heal" and "Worship" to "Power Ups" well, I'm quite happy because there is nothing more distorted.
Answer: Assalamu alaikum, I started playing this game myself and I genuinely liked it. But then I got to the part where the quest was to worship this statue, I deleted the game and I'm not going back to it. You should really avoid games that encourage you to do things like this, this game promotes it and forces you to do it to continue the game. I believe it's haram because it can really manipulate people easily to thinking this is normal, playing this game would spread its popularity and eventually kids will start playing it and thinking committing shirk is permissable. It's a shame they added these things to this game, but you should not prioritise games over deen. So please, stop playing this game for the sake of Allah.
Answer: listen to me brother, i am living in makkah and have been my entire life.
all i can tell you is that as long as it does not change your faith or beleifs then you dont have to question everything. allah is merciful and you dont have to stop playing games just for these things. islam is lenient and u shouldnt worry. dont question everything and may allah be with you
Comment: Living in Makkah does not make you a mufti yazn!

Is genshin impact haram?


Will Split trigger Prodigy for each Magic Missile fired?

Question: On a similar vein as this question about Electrocute, will the three Magic Missiles fired by the Split rune trigger the effects of Prodigy for each of the missiles that hits an enemy, or only once per cast?
Answer: After some testing it does appear that multiple hits by using the 'Split' rune will trigger multiple effects from the 'Prodigy' passive ability. With this in mind in conjunction with the thread you've linked for Electrocute, I believe it safe to state that the 'Prodigy' passive will proc every single time one of the signature abilities hits. This should mean that the 'Spectral Blades' ability is overpowered for Arcane Power regeneration.
After some further testing with Spectral Blades I can confirm this is actually how the 'Prodigy' passive works (one attack with Spectral Blades on a group of 7 enemies resulted in my Arcane Power going from 'nearly empty' to 'nearly full' in one attack).
My methodology for testing:

Act 1 inferno, first quest
Arcane Orb as my secondary attack
Prodigy active as one of my passives
Magic Missiles + Split rune as my primary attack in the first pass
Run out past Rumford at the gate into Old Tristram Road, you'll meet a pack of 6-8 mobs
Empty Arcane Power using Arcane Orb
Attack the group
Observe results

What I found:

Magic Missiles without the Split rune will provide less Arcane Power than with the Split rune
Spectral Blades on a large group will provide Arcane Power back for every enemy that is hit
Electrocute will provide Arcane Power for targets hit by the chained element of the attack

Conclusion:
The 'Prodigy' passive ability does exactly what it says it does. When you deal damage with a Signature ability with the 'Prodigy' passive enabled, you will get 4 Arcane Power per enemy that is damaged during that cast.
This stacks with the equivalent runes on the abilities themselves, so you can use Prodigy + Siphoning Blades, for example.
Comment: After some testing it appears that each missile will trigger the effect of the Prodigy passive if it hits an enemy - regardless of whether it is the same enemy or several.
Comment: Excellent answer! I was going to test this out this week, but you've saved me the trouble.
Comment: Great work! Does this also mean that if I'm facing a single enemy and two of my Split missiles hit it, I'll only gain the AP bonus once?
Comment: I don't know - that would be worth a test, it certainly works in the scenario that they hit different enemies and based on the tooltip I would assume yes but I'll confirm.


sqlite: can I/should I index a dynamically generated subquery?

Question: Working in sqlite v3, I have a query that needs a calendar table, essentially to expand monthly bills into daily bills.  Despite my careful addition of indices (and use of EXPLAIN QUERY PLAN), it's still too slow for my needs.
The query in question is essentially:
    SELECT stuff
      FROM (<subquery>) AS calendar
INNER JOIN ...
INNER JOIN ...
INNER JOIN ...
  GROUP BY calendar.date

where <subquery> is a nifty calendar generation trick I picked up somewhere:
      SELECT DATE('#{start_time.to_s(:db)}', (d4.digit * 10000 + d3.digit * 1000 + d2.digit * 100 + d1.digit * 10 + d0.digit) || ' DAYS') AS date
      FROM digits AS d0
INNER JOIN digits AS d1
INNER JOIN digits AS d2
INNER JOIN digits AS d3
INNER JOIN digits AS d4
     WHERE (d4.digit * 10000 + d3.digit * 1000 + d2.digit * 100 + d1.digit * 10 + d0.digit) < #{ndays}
  ORDER BY date

(Yes, the digits table is pre-loaded with the digits 0...9.  How it really works is left as an exercise to the reader!)
I know that the calendar subquery is fast (< 50 ms).  But upon re-reading the sqlite docs, I understand that GROUP BY calendar.date in the outer query forces the generation of an index on calendar.date.  Since the calendar is dynamically generated, it's not indexed.
So question, always with the questions:

Is the lack of index on calendar.date likely to be a source of performance hit?  (As I mentioned, I was careful in indexing the tables used in the outer query.)
Will I be happier just creating a giant 20-year table and indexing it?  Or is there a better way?
I was pretty good at getting mysql to perform well.  Are there sqlite optimization tricks (or gotchas) that I should know?

TIA...
Answer: You know what's really nifty? Storing important business data in tables.
Create a calendar table, index it, populate it with dates, and try that in your query. your calendar table might need only one column for the date.


Editing texture image not working

Question: The texture image is a .dds file. I put it on the object in the material property. Is there a way I can edit this image in Blender? I go to texture painting and I can paint something on the image but Blender does not save it.
Answer: Since .dds isn't a supported format in Blender, you may find it necessary to convert the dds to tiff and then back again after your texture work is complete.
Comment: can I convert dds to tiff and then import the tiff to material in blender?
Comment: .dds is an image format for DirectX according to what I am reading online, so the material you set up would have to use existing UVs for mapping the image texture and yes, the tiff image could work as your image texture in Blender. Try on a small scale test first so you don't run into issues with your project while testing.

Editing texture image not working


how do devs upgrade bitcoin core without affecting the live active network?

Question: I've always wondered, how do devs developing on Bitcoin upgrade the system without affecting the live network? We typically see a site under maintenance when big companies revamp their site, but how does Bitcoin do it?
Answer: Most network changes are totally backward-compatible. When two Bitcoin nodes first contact each other, they tell each other the latest protocol version they support. They then use the oldest version of the two. In this way, even really old clients can connect to the network because all other nodes will switch to the old protocol version when talking to them.
Occasionally, it's necessary for all miners or (extremely rarely) all Bitcoin users to change some network rule at the same time to prevent the network from splitting in two. This is done by adding the change to the code, but only activating it at some particular time some weeks/months/years after the change is added. After the time has elapsed, most people will have upgraded to the new version of Bitcoin, and doing the change will cause minimal disruption. Instead of updating at a particular time, changes can sometimes also be activated when nodes detect via info inserted into the block chain that most other nodes have upgraded.


Using Discrete Morse Theory to represent hom classes

Question: In "vanilla" Morse theory, you can construct cycles representing integral homology classes of a smooth manifold from a Morse function on the manifold (by looking at the flow into/out of the critical points and gluing/compactifying appropriately). Has something similar been proven for Discrete Morse Theory?
Answer: In section 11 of this paper I show  that a discrete Morse function on a simplicial  complex  leads to a dynamical description of Forman's theory.  More precisely  there is a canonical flow  associated to the function  such that the (open) faces of the barycentric subdivision are invariant sets. The  stationary points of this flow  are the barycenters of the original simplicial complex.
The discrete  Morse function defines  a continuous function on topological space defined by the simplicial complex which is  affine on the faces of the barycentric subdivision and is a Lyapunov function for the above flow, i.e., it decreases along the trajectories of the flow.
The key property  of the flow, as far as its connection with Forman's theory is concerned, is the following:  a barycenter of a face  $F$, that is, a stationary point of the flow,  has nontrivial Conley index if and only if the corresponding face is critical in Forman's sense.   The unstable manifold of this point is the interior of the face $F$ and  the   (homotopic)  Conley index is the homotopy type of the pair $[F,\partial F]$. We see that this is the same as the homotopy  type of a pointed sphere of the same dimension as $F$.
Using  the finite volume flow technology of Harvey-Lawson  one can then obtain a  chain homotopy from the simplicial chain complex  to the Forman complex.
Answer: The answer to your question as stated is no.
What discrete Morse theory gives you, starting from a finite regular CW complex $X$ and a discrete Morse function $f:X \to \mathbb{R}$ (with discrete vector field $V$) is a chain complex generated by the critical cells
$$ \cdots \stackrel{\partial_{k+1}}{\longrightarrow} M_k \stackrel{\partial_k}{\longrightarrow} M_{k-1} \stackrel{\partial_{k-1}}{\longrightarrow} \cdots \stackrel{\partial_1}{\longrightarrow} M_0$$
whose homology is isomorphic to that of $X$ via a chain map $\phi:(X,d) \to (M,\partial)$ which is given by $\phi = (1 + dV + Vd)^N$ for some suitably huge $N$. Now if all the $\partial_*$ are trivial (i.e., if you have a so-called perfect Morse function), then all is well: the homology generators here are just the chains themselves, and in Section 7 of the original paper

R Forman, Morse theory for cell complexes, Adv. Math 90-145, 1998

Forman shows that $M_k$ consists precisely of the $\phi$-invariant $k$-dimensional chains in $X$. There is no direct recipe, as far as I'm aware, of generating equivalence classes of $\phi$-invariant chains which represent the same integral homology class in $X$ when the boundary operators $\partial_*$ end up being nontrivial.
Comment: All this being said, of course you can easily check whether two $\phi$-invariant chains represent the same homology class in $(M,\partial)$ via the obvious linear algebra.


Execute a root command every 24 hours after startup

Question: I want to execute a command as root on an Ubuntu 11.04 machine every 24 hours. This machine is not on all of the time, but when it is, it can be left on for days at a time. How should I correctly configure my crontab to execute this command at the desired interval, and is there anything special about executing a cron job as root that I should know about? I am the only person who uses this machine.
Comment: Note that your title seems to ask how you can execute a command 24 hours _after_ each startup, while your question asks about doing it every 24 hours, with no regards to when the system was started.
Answer: You can simply add your script to be executed to directory /etc/cron.daily - it will be executed once a day by anacron.
Excerpt from man 8 anacron:

Anacron can be used to execute commands periodically, with a frequency specified  in  days.   Unlike  cron(8),  it  does  not assume that the machine is running continuously.  Hence, it can be  used  on  machines that  aren't  running  24  hours  a day, to control daily, weekly, and monthly jobs that are usually controlled by cron.
Comment: Sorry for taking so long to get back to this. It's been working great.
Answer: To edit root's crontab, run:
sudo crontab -e

Fill in a line with e.g.:
0 0 * * * /usr/sbin/ntpdate-debian -s

This will execute the specified command ntpdate with switch -s once every stroke of midnight (see info 'crontab(5)' for a documentation of the format, or probably just the commented first lines of the crontab itself).
Some small pointers:

Note that the commands in crontab normally are executed via /bin/sh, which on Debian based system is not Bash, but Dash. Be careful to not use Bashisms in the commands. In my experience it is not uncommon to see incorrect redirects, and incorrect assumptions concerning which characters that need to be escaped.
It is often a good idea to give complete paths to the binaries since the PATH variable might differ between root and your regular user. I have seen situations where one command has shadowed another due to differing PATH variables, which is an unnecessary complication.
It can also be viewed as somewhat of a security risk to simply execute the program that is first in the path lookup, since sloppy configuration might open this up for someone to replace a binary (if one has that kind of rights on the system, one can probably do it anyway to some extent, but nevertheless).

Cron will execute the command every 24 hours, as long as the machine is running at the time. If you want to make the machine "catch up" if it was turned off at a planned execution, you should look at anacron that has this exact purpose.


Extension of stay in Thailand

Question: What are the requirements for getting a 90-day extension? Or are there no requirements, other than showing up and paying? What is the maximum extension allowed on an education visa?
Comment: what is your nationality?
Answer: My understanding of the ED visa is that you can get an extension of stay for 90 days or for a year, but that you also need relevant documentation from the school that you are attending. This can be done (at a cost of 1,900 THB) from within Thailand - there should be no need to go out of the country to get a new visa.
These visas have suffered from some abuse in the past (people using them to stay in Thailand long term but not then going to the school, for example), and so there are additional requirements such as showing an income coming from outside Thailand, or sufficient funds in a bank account. This is supposed to stop people from working in Thailand but staying on an extension of stay based on education.
There have also been cases where people have stayed in Thailand for long periods of time on 'education' extensions of stay who claimed to be learning the Thai language. When applying for the next extension, these people have been asked questions in basic Thai by the immigration officers, and if they could not hold even a basic conversation they have had their extension refused.
For the latest information about visas and extensions of stay in Thailand, I recommend reading the Thai Visa forum.

Extension of stay in Thailand


Using kurtosis to assess significance of components from independent component analysis

Question: In PCA eigenvalues determine the order of components. In ICA I am using kurtosis to obtain the ordering. What are some accepted methods to assess the number, (given I have the order) of components that are singificant apart from prior knowledge about the signal?
Comment: I actually think that in ICA you can still use the number of 'significant' (ie, 90% of energy) eigen-vectors, as the number of independent components.
Answer: Seeing this question still lacks an answer, I'd like to reiterate, as @Tarantula commented, an accepted method to select assess the number of components retained is through the explained variance. You retain $K$ components given a criterion from the a priori whitening PCA and perform ICA on those components.
I don't know of any accepted method to do this kind of assessment with the kurtosis, this question might be unanswerable in it's fully.


When would you need multiple servers to host one web application?

Question: Is that called "clustering" of servers? When a web request is sent, does it go through the main server, and if the main server can't handle the extra load, then it forwards it to the secondary servers that can handle the load? Also, is one "server" that's up and running the application called an "instance"?
Answer:
[...] Is that called "clustering" of servers?

Clustering is indeed using transparently multiple nodes that are seen as a unique entity: the cluster. Clustering allows you to scale: you can spread your load on all the nodes and, if you need more power, you can add more nodes (short version). Clustering allows you to be fault tolerant: if one node (physical or logical) goes down, other nodes can still process requests and your service remains available (short version).

When a web request is sent, does it go through the main server, and if the main server can't handle the extra load, then it forwards it to the secondary servers that can handle the load?

In general, this is the job of a dedicated component called a "load balancer" (hardware, software) that can use many algorithms to balance the request: round-robin, FIFO, LIFO, load based...
In the case of EC2, you previously had to load balance with round-robin DNS and/or HA Proxy. See Introduction to Software Load Balancing with Amazon EC2. But for some time now, Amazon has launched load balancing and auto-scaling (beta) as part of their EC2 offerings. See Elastic Load Balancing.

Also, is one "server" that's up and running the application called an "instance"?

Actually, an instance can be many things (depending of who's speaking): a machine, a virtual machine, a server (software) up and running, etc.
In the case of EC2, you might want to read Amazon EC2 Instance Types.
Answer: Here is a real example:
This specific configuration is hosted at RackSpace in their Managed Colo group.
Requests pass through a Cisco Firewall.  They are then routed across a Gigabit LAN to a Cisco CSS 11501 Content Services Switch (eg Load Balancer).  The Load Balancer matches the incoming content to a content rule, handles the SSL decryption if necessary, and then forwards the traffic to one of several back-end web servers.
Each 5 seconds, the load balancer requests a URL on each webserver.  If the webserver fails (two times in a row, IIRC) to respond with the correct value, that server is not sent any traffic until the URL starts responding correctly.
Further behind the webservers is a MySQL master / slave configuration.  Connections may be mad to the master (for transactions) or to the slaves for read only requests.
Memcached is installed on each of the webservers, with 1 GB of ram dedicated to caching. Each web application may utilize the cluster of memcache servers to cache all kinds of content.
Deployment is handled using rsync to sync specific directories on a management server out to each webserver.  Apache restarts, etc.. are handled through similar scripting over ssh from the management server.
The amount of traffic that can be handled through this configuration is significant.  The advantages of easy scaling and easy maintenance are great as well.
Answer: For clustering, any web request would be handled by a load balancer, which being updated as to the current loads of the server forming the cluster, sends the request to the least burdened server. As for if it's an instance.....I believe so but I'd wait for confirmation first on that.
You'd' need a very large application to be bothered with thinking about clustering and the "fun" that comes with it software and hardware wise, though. Unless you're looking to start or are already running something big, it wouldn't' be anything to worry about.
Comment: If you think that the application may become big, it is a good idea to start with a framework that you know can scale to clusters even if you don't take advantage of it to begin with
Comment: Thank you! I was trying to learn this stuff as someone not from a technical background, and you guys provided a great explanation. Thank you.
Answer: Yes, it can be required for clustering. Typically as the load goes up you might find yourself with a frontend server that does url rewriting, https if required and caching with squid say. The requests get passed on to multiple backend servers - probably using cookies to associate a session with a particular backend if necessary. You might have the database on a separate server also.
I should add that there are other reasons why you might need multiple servers, for instance there may be a requirement that the database is not on the frontend server for security reasons
Comment: Thank you gnibbler! Really appreciate the concise tutorial on it. Thank you.


Google slides: How to add transparency to a background image?

Question: How to add transparency to a background image in Google slides?
Answer: This video is the only answer I got.

Insert the image as a normal image, not as a background image and make it as big as the entire background
Select the image, then go format and adjust the transparency
Right click on it and send to the back
Answer:
Click slide at the top
Click Edit Master
Put the image in the master slide
Click on the image, and click Format Options to the left of animate at the top
Change the transparency under the Adjustments tab
Right click on the image and, under the Order tab, click Send to Back OR click on the image and press ctrl + shift + down arrow
exit out of editing the master

It should be a transparent background image for all of your slides.


Would I provide client with an initial comp for magazine design?

Question: I am new to freelance design and would love some advice on how to deal with a magazine design project. I will be designing a magazine for a client. Would I provide them with some kind of initial comp to determine the style and get approval? If there are any magazine designers reading this that are willing to share their process of dealing with the client, I would be so grateful! Thank you in advance!
Comment: Are you creating a magazine from scratch or has this magazine been made before?
Comment: I am creating it from scratch.
Comment: Providing an initial comp makes sense, especially if you're also creating the branding for the magazine.
Comment: Thank you for your answer!
Answer: There's A LOT which goes into a "magazine" -- branding, ad space, articles, etc -- I don't think a viable comp can be created until these have been ironed out.
One would certainly comp the cover to show some branding ideas.
However, beyond that spending time on a full magazine comp is pointless until you know the ad space, articles, etc and can work out page counts.
Generally one settles branding and overall style. Then waits for content collection. Once content is ready (ads space determined, articles written, etc), then you layout the initial edition and provide a comp for it. Subsequent editions use the premier issue as a roadmap to know how much content is necessary.

In short.. comp for branding but you can't comp much else until you know what's needed. i.e. you can't bake a cake until you know the ingredients.
(I suppose page count is more irrelevant if it's for digital delivery only).
Comment: Thank you so much for your answer! Very helpful information!


Commerce 2.x attribute translations cause product duplicates in views

Question: If I add a translation for an attribute entity my views display duplicates products. I've tried to find an attributes delta filter, but  there is none. If I add a relationship for the attributes there is still no delta available in filters. Even if there was, I would need to add a relationship and filter for each attribute entity which would result in a rather massive view. I have also tried distinct views query and it does not work. How can I filter my product views on attributes language delta or another way to eliminate the duplicates?
Comment: i should add that this happens when the product variations relationship is enabled.
Answer: I found a way to solve this. You must:
1) ensure you have a variations delta filter set.
2) add the field variations and ensure that the Display all values in the same row is NOT CHECKED under Multiple Field Settings. you can then hide this field if you do not want to display the output.
3) in the view display's Query settings tick the check box Distinct.
This configuration will remove product duplicates when the Product Variation relationship is used. This is the resulting query, i am not sure how efficient this configuration is but at least it works.
SELECT DISTINCT commerce_product__variations.delta AS commerce_product__variations_delta, commerce_product__variations.langcode AS commerce_product__variations_langcode, commerce_product__variations.bundle AS commerce_product__variations_bundle, commerce_product__variations.variations_target_id AS commerce_product__variations_variations_target_id, commerce_product_field_data.product_id AS product_id, commerce_product_variation_field_data_commerce_product__variations.variation_id AS commerce_product_variation_field_data_commerce_product__vari
FROM
{commerce_product_field_data} commerce_product_field_data
LEFT JOIN {commerce_product__variations} commerce_product__variations ON commerce_product_field_data.product_id = commerce_product__variations.entity_id AND (commerce_product__variations.deleted = '0' AND commerce_product__variations.langcode = commerce_product_field_data.langcode)
LEFT JOIN {commerce_product_variation_field_data} commerce_product_variation_field_data_commerce_product__variations ON commerce_product__variations.variations_target_id = commerce_product_variation_field_data_commerce_product__variations.variation_id
WHERE commerce_product__variations.delta = '0'


How to create a child process using multiprocessing in Python2.7.10 without the child sharing resources with parent?

Question: We are trying to move our python 2.7.10 codebase from Windows to Linux. We recently discovered that multiprocessing library in Python 2.7 behaves differently on Windows vs Linux. We have found many articles like this one describing the problem however, we are unable to find a solution online for Python 2.7.  This is a fix for this issue in Python 3.4 however, we are unable to upgrade to Python 3.4. Is there any way to use multiprocessing in Python 2.7 on Linux without the child and parent sharing memory? We can also use guidance on modifying forking.py code in python 2.7 to ensure child and parent process aren't sharing memory and doing Copy-on-Write. Thanks!
Answer: A possible solution is to use loky, a library which provides an implementation of Process with fork-exec in python2.7. The fork-exec start method behaves similarly to spawn, with a fresh interpreter in the newly spawned process. The library is mainly designed to provide a concurrent.futures API but you can use mp = loky.backend.get_context() to get the same API as multiprocessing.
from loky.backend import get_context
import multiprocessing as mp

def child_without_os():
    print("Hello from {}".format(os.getpid()))

def child_with_os():
    import os
    print("Hello from {}".format(os.getpid()))

if __name__ == "__main__":
    import argparse
    parser = argparse.ArgumentParser('Test loky backend')
    parser.add_argument('--use-fork', action="store_true",
                        help="Use start_method='fork' instead of 'loky'")
    parser.add_argument('--with-os', action="store_true",
                        help='Import os module in the child interpreter')
    args = parser.parse_args()

    # Only import os in the main module, this should fail if the interpreter is
    # not shared
    import os
    print("Main is {}".format(os.getpid()))
    if args.use_fork:
        ctx = mp
        print("Using fork context")
    else:
        ctx = get_context('loky_init_main')
        print("Using loky context")

    if args.with_os:
        target = child_with_os
    else:
        target = child_without_os

    p = ctx.Process(target=target)
    p.start()
    p.join()

This gives
# Use the default context, the child process has a copy-on-write interpreter
# state and can use the os module.
$ python2 test.py --use-fork
Main is 14630
Using fork context
Hello from 14633

# Use the loky context, the child process has a fresh interpreter
# state and need to import the os module.
$ python2 test.py
Main is 14661
Using loky context
Process LokyInitMainProcess-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/home/tom/Work/prog/loky/test.py", line 6, in child_without_os
    print("Hello from {}".format(os.getpid()))
NameError: global name 'os' is not defined

# Now using the correct child function which import the os module
$ python2 test.py --with-os
Main is 14700
Using loky context
Hello from 14705

(DISCLAIMER: I am one of the maintainers of loky).
Answer: As you're no doubt aware, the patches in the CPython bug tracker don't apply cleanly to Python 2.7's version of multiprocessing, and the patches include some extra features for semaphore.c so that semaphores are cleaned up properly afterwards.
I think your best bet would be to backport the multiprocessing module from Python 3. Copy the Python code over, rename it to just processing, discover the missing C features and work around them (e.g. clean up your own semaphores or don't use them). Although the library is big it may be straightforward to port only the features that you use. If you are able to publish the backport I'm sure many people would be interested in that project.
Depending on how heavily you rely on multiprocessing, a different option would be to just run more Pythons by running sys.executable with the subprocess module.


Template engine / tool that can template out whole directory trees

Question: What I'm looking for
I'm looking for a text templating engine (think e.g. Jinja2, Mako, or Liquid) or a higher-level library/tool making use of such an engine that supports templating on the level of whole directory trees instead of just on the level of text within a file.
All features available for templating within files (e.g. loops, conditions, etc.) should also be available for this filesystem-level templating. E.g. there should be a way to specify declaratively that you want it to template out multiple recipes according to some recipe template {{ recipe_name }}.md given a list of recipe data.
Of course this isn't that hard to do manually with existing template engines, but I run into this so often that I'd be surprised if there wasn't a ready-made system with a nice declarative syntax for it by now.
Similar existing software
cookiecutter comes close in that it does template out whole directory trees and even lets you put placeholders in filenames, e.g. you can name a file in your template directory {{ module_name }}.py and it will insert a provided module name when rendering it to disk, but AFAIK it doesn't support templating out files from loops over lists. It's also not meant to be general-purpose and has some odd conventions that stem from its intended use as a project templating tool.
Answer: I once again ended up writing my own which supports all the features I asked for in my question and then some:

mondir

After I got done writing it, I found out that there are similar projects already on PyPI:

dirtempl
dirtemplate

I haven't tested them though.


Is there any bank that allows foreigners to open accounts?

Question: Just a bit of background: I am Venezuelan and in my country we have a really complicated, bureaucratic, plain dumb and authoritarian currency trade. It is extremely difficult to convert your money to any foreign currency that made my life a lot difficult because I work mostly online and need a place to save my money (USD).
So I am wondering is there a way or a bank that would allow me to open an account even tho I'm not resident?
I would really appreciate whoever can put an input on this because I'm on my process to move out of the country and every country I want to go ask me to prove my funds and they don't accept PayPal or another kind of e-accounts.
Comment: Note that countries do things like this for the explicit *purpose* of making it hard to moving money out of that country, since it would make the economy even worse.  (Of course, the very poor economy that makes them implement those policies is why you want to take your money out...)
Answer: Stripe Atlas helps with this. They form US companies for foreign solo entrepreneurs and get them US bank accounts.
Another thing to remember with banks though, it doesn't matter what the compliance documents say, money talks. So your troubles will more likely stem from the amount of money you need to put in banks, more so than what the rules are.


Adding Workflow to few Documents in a Library

Question: In SharePoint it is known that a workflow can be added to the document library.  Is there a way to create a SharePoint Designer workflow to apply to one or two documents in the library not the whole library? Is it best to use a SharePoint Designer workflow or out of the box workflow?
Answer: You can trigger the workflow on item creation or modification bur executing the actual workflow logic (action) write an if condition like - if filename equals (or some other criteria) "This file" then perform your rest of the action, this way we can execute workflow action based on the attributes. However, if you have a third party product like Nintex - you can even trigger the workflow conditionally, on the specific item.


Were ninja still active during WW2?

Question: Quick Question, were ninja still active during WW2? If not, when did they stop being utilized?  If so, any accounts worth sharing?
Answer: There is no evidence to support the ninja being active much further than the Edo Period. Fujita Seiko was claimed to have taught ninjutsu at Rikugun Nakano Gakko (Nakano School for Military Intelligence), but there's no evidence to support these claims.
Essentially, the historical record of the shinobi ends with the Shimabara Rebellion (1637-1638). "Men from Kōga" were employed by Tokugawa Iemitsu to steal into and survey Hara Castle.
There are similarities between the ninja and the Oniwabanshu (Garden Keepers – the secret intelligence service of Tokugawa Yoshimune in the early 18th century); however, there is no evidence from contemporary records naming the Oniwabanshu as shinobi.
Edit: A Last Account of Shinobi
Unfortunately, I can't effectively corroborate this story. It was told to me by a friend after he visited the Iga Ninja Museum in Iga-Ueno, while explaining a picture of a document in, if I recall correctly, Portuguese.
Toward the end of the Momoyama Period, Japan began to close itself off. Before the Portuguese were effectively kicked out of Japan following the Shimabara Rebellion, a small cadre of shinobi were sent onto a ship to steal what was believed to be important documents proving espionage. Supposedly, since none of the agents could read Portuguese, what they came back with was a hand written document in Portuguese that amounted to a bawdy poem.
Supposedly, this was considered a complete disgrace, and signaled the beginning of the end for the shinobi as reliable agents.
Answer: I don't think there is a consensus on the definition of shinobi/ninja, and thus their existence at any given time is spurious.

Mystical shadow warriors have never existed.
Historic accounts of any highly-trained civilian special operations forces are kind of sketchy.
If we assume shinobi/ninja are synonymous to spies, then they have almost certainly existed for at least as long as Nihon has a recorded history, but also aren't significantly different than spies the world over.
Star-tossing idiots wearing black pajamas, who flip out and kill people (all the time), have only existed since the 1980's.
Answer: Actually, Yes they were...  Although they played a fractional role, Ninja were active in both World Wars.  There are several 'odd' accounts of US servicemen being attacked and 'taken away' at night on many of the islands where they were stranded and where fighting took place.  I read a particular interesting account (partial account actually) where a US naval serviceman was taken at night and woke several hours later quite a 'long distance' into the jungle (unaware how that could have occurred) from their beach encampment (these were survivors of a ship that struck an underwater mine).  This serviceman was supposedly tortured (mostly by hand) by a single individual for some time (torture would certainly make time pass 'very' slowly..) and then surprisingly, abandoned once this small group (his assumption) found out he was not the person that they had sought out (also his assumption due to specific questions being asked of him).  This serviceman was always 'alone' while being tortured and the face of his attacker WAS shown to him.  The man however was blindfolded whenever anyone other than the sole 'torturer' was present at their own camp.
What I get from this is that the Ninja were not particularly 'worried' about what the individual would say or do while in their custody nor once released as they did not 'kill him'.  I would assume that the 'Ninja' is now no longer used due to the advent of high tech warfare and CCD camera's etc, (difficult to hide from those), but soft targets may be a 'different thing' and I would imagine they could still be useful for abductions and similar things...
Comment: This answer would be good if it were backed by references, as it stands, it's rumours and hear say.

Were ninja still active during WW2?


Outlook 2010 and above

Question: Same e-mail Id configured on two different PCs in outlook2010. The problem is that if one user on a PC reads e-mail then it automatically Read on another PC. But I would like to make sure the user on 2nd PC should read the e-mail. So how to approach this problem to force 2nd user also should read the e-mail.
Comment: What sort of server are you connected to? IMAP? POP, Exchange?
Answer: Generally Outlook will read the status of the message from the server which it is connected to. One thing you can try is to mark the message as unread in Outlook once you are done reading it -- this should mark it as unread in the other client as well.
Edit:
According to the link below you can do the following:
Go to:
View-> Reading Pane-> Options -- then Uncheck the appropriate check boxes.
Here is a link with a solution to your problem (the longer version of what is listed above):
http://www.msoutlook.info/question/250
Comment: This answer is correct. Marking the e-mail as read is a feature of the client, and syncing that change is a feature of IMAP. If you don't want to change the status to "read", make sure the client doesn't change the status, and this answer tells you how.

Outlook 2010 and above


Homosexuality gay feeling

Question: Please suggest any dua which will protect is to stay away from the thoughts of gay feeling , please, I am sure there must be some Quranic verse to keep away of from those shaitanic feeling?
Answer: Homosexuality gay feeling is related to your lust (nafsu). And the best way to control your sexual feeling is through fasting.
Al-Baqarah, Verse 183 :

"O you who have believed, decreed upon you is fasting as it was
  decreed upon those before you that you may become righteous"

Fasting will reward you with Takwa (fear of Allah) which will help you to control your feelings.
In addition, it is best for you to Istighfar (Astaghfirullah) whenever you have a thoughts or feeling of partaking in satanic activities.
Wallahualam.

Homosexuality gay feeling


Script to Add Computer Accounts to AD from list

Question: Ok, I have tried to google this and keep running into things that are close, but not quite there.  I mess with them for a few hours and can't bridge it across to what I need.
Requirements: Read a list of computer names and add them to specific OUs.
The list can be formated however, but right now I have it as a csv.
/////////
Comp1,Computers,cold,Alaska,mydomain,com,
Comp2,servers,New Jersey,test,temp,training,Room3,trainers,mydomain,com,
Comp3,computers,New Jersey,test,temp,training,Room3,students,restricted,mydomain,com
Comp4,computers,New Jersey,test,temp,training,Room3,students,power users,mydomain,com
////////
As you can see, the domains portion is not the same on all the machines.
I tried using a vbscript but all I would get is "unable to connect to LDap" so I was thinking about storing the lines in an array and using dsadd and building the command line from the variables in the array.
I already have the portion written to browse for the file, and dsquery, dsadd, etc are all on the server that this will be run from.
This is probably a lot easier than I am trying to make it, I tend to over complicate things if I don't finish it right away.
Answer: Look at this:
Automating the creation of computer accounts


Need coworker to do some stuff, ask directly or ask manager to assign it

Question: I have this job that I usually do however this month I'm kind of swamped and need someone else to do this.  Should I directly ask coworkers if they can do it or ask manager to see if he can assign it to whoever is available?
Answer:
Need coworker to do some stuff, ask directly or ask manager to assign it

Neither.
Talk to your manager.

Remind them of the tasks that you currently have pending to complete and their deadlines.
Explain to them the reasons for why you will not be able to complete all of them on time.
Ask them to assign priorities (if they have already haven't).

After that, you follow whatever instructions your manager gives you.  If the manager wants to hand off any of your tasks to a coworker, that is their decision to make not yours.
Comment: yes I think asking people to do stuff when Im not the manager is a little weird.
Comment: Important to lay it all out for your manager, they may decide that the thing you would ask someone else to cover is actually the thing they feel most important for you to do yourself.
Comment: There are times when you can ask a friend informally to help you with something. But if you have to ask us, that isn't the relationship you have.
Comment: Sometimes it is entirely reasonable to ask a colleague to do something, often there is a stigma attached to it either of laziness or incompetence.


Why does mercury in mercuric acetate have a lone pair?

Question: The configuration of mercury ends with $6s^{2}$. In mercuric acetate, mercury is in the +2 oxidation state, so does it still have a lone pair?
Comment: Of course it has lone pairs. 1s², 2s², …
Answer: TLDR:
Mercury in its (+2) salts does not have lone pairs readily accessible for covalent bonding. However, its 5d electrons do affect its properties,  resulting in a relatively high polarisability.
The long story:
Mercury is the last 5d element and has electron configuration $[\ce{Xe}] 4f^{14} 5d^{10} 6s^2$. The $6s$ electrons are the outermost electrons and readily available for covalent bonding. $4f$ electrons are virtually inert since they are very deep. $5d$ electrons belong to the previous shell, but are the outermost of them and once mercury looses its $4s$ electrons, $5d$ electrons become the outermost and define its properties. They are still too strongly bound to the nucleus to participate in covalent bonds under ordinary conditions ($\ce{HgF4}$ was only observed spectroscopically in inert gas matrix). , but are far enough to wiggle around and participate in non-covalent interactions, such as van-der-waals interactions. $6p$ orbitals are also available for covalent bonding, though extent of their use is often debatable and/or unobvious.
Answer: These are 5d electrons. They can participate in chemical bonds, e.g. in mercurinium cations.
Comment: You should elaborate.


Should SD card be formatted before putting into new phone?

Question: I got a new phone and want to put the SD card from my old one into it. Should anything be done to it, such as formatting or deleting files? There is a lot of funky stuff on the SD card, from TWRP and Titanium Backup etc. On the other hand I'd rather not delete just for the heck of it as there's a lot of stuff and some I do want to keep.
Answer: There isn't a need to format it. However, depending on how the SD card is formatted (file system), it may at times not readable by the new device, in which case it is best to format it using the device if it has that facility or a laptop. FAT 32 is pretty much recognised across devices but be aware that it can't store files bigger than 4GB. As always, it makes sense to backup your SD card on your laptop, as you say data contained is important
In short, if the new device can read the SD card, don't bother
Additional information on compatibility of SD cards - Source

Should you decide to format and are unsure about the file system, information here should help you ( also consider which laptop OS you would want to work with ) - How many files can I put in a directory?
Comment: Is this true even if the new device has a different version of Android?
Comment: Yes. Version doesn't affect . Format of the sd card and ability of device to read that format is ask that matters.  Being a new device, it should be able to read earlier card ( backward compatible) so you should be good
Comment: I'm thinking about something... Apps do generate data in the `Android` folder of storage, and those created with a newer version usually can't be read by an older one. What if one of those SD cards with new data are plugged into a device with old apps? Just curious.
Comment: @AndyYan: I haven't tried that yet but the fact that the media itself is not compatible would render the app data unreadable, isn't it so? I have no idea if developers address this differently. Interesting
Comment: Yeah, too bad nowadays there are almost no SD-card equipped devices to emulate this on. Might as well try this on an internal storage when I have time.
Comment: @AndyYan: Yep. Do update your findings in a self answered question- it would be educative. Thanks
Comment: Curious. Was your problem resolved?


Ginger bug feeding

Question: When feeding a ginger bug, why do we need to add more ginger? The desired bacteria/yeast is already present and so we only need to keep the sugar coming in so it doesn't "starve". No? What am I missing here.
Comment: @lambshaanxy - it's also called a ginger beer plant (here in the UK), it's a kind of fermentation for making ginger beer.
Comment: What, pray tell, is a "ginger bug"?
Answer: What's missing is that you have adapted your "bug" to grow in the presence of ginger. This is different to growing on sugars alone as the ginger contains a range of chemicals that may inhibit growth1. Admittedly, the concentrations of these chemicals from ginger are likely to be fairly low, but they may be causing a slightly different growth to that on pure sugars alone.
Ginger also contains some complex sugars that are different to simple sucrose alone and metabolism of these will contribute to distinct flavours that you might not get without culturing in the presence of ginger. The yeast and bacteria in your "bug" will adapt (evolution in action...) to the sources of nutrients available to them and hopefully produce some pretty tasty brews over time.
These differing cultures are what makes the distinct flavours that you might expect from beers cultivated on different sources of barley or wheat, and also account for the range of flavours and quality that you might be familiar with if sampling homebrew beers or specialist bakeries that have their own sourdough starter. Yeasts (in the case of beer), cultivated on simple sugar will have a simple flavour profile, while specially cultivated ones will have a more complex profile.
References:

Liu Q, Meng X, Li Y, Zhao CN, Tang GY, Li HB. Antibacterial and Antifungal Activities of Spices. Int J Mol Sci. 2017 Jun 16;18(6):1283. doi: 10.3390/ijms18061283. PMID: 28621716; PMCID: PMC5486105.

Ginger bug feeding


How to become eloquent mathematician?

Question: I have noticed that among mathematicians there is a great diversity in style of expression. Some of these are exceptionally neat and elegant. What I mean by that is that proof, or argument takes few rows of text, is very concise and uses extraordinary well-defined vocabulary. I assume to acquire this those mathematicians have some systematic strategy that they are aware of when they acquire knowledge. What would be that strategy ? Furthermore living mathematicians develop even their own style which is not simply reproduction of the material found in books. These structures are so beautiful. Could somebody explain in what way could this be acquired ?
Comment: Read and write a lot of mathematics. Get someone to comment on what you write. If you want to work on exposition, pick your favorite result and write a clear proof.
Comment: Teaching, realizing typical obstacles people have in absorbing material.  Adapting, developing a framework to work-around those obstacles, giving people things to "hold on to" when they're learning confusing new devices.  That's perhaps the best device I can think of.
Answer: This is an expansion of my comment above.
The first step to literacy is reading. There are stylistic conventions for written mathematics, and they are not covered in any course, though there are some prescriptive books around. As you mention, there is more than one style, though in any given branch of mathematics, most of the papers probably form a homogeneous group.
The second step is writing. Writing by itself is immensely helpful, but it's even better if a "dialect expert" comments and corrects your output. This is especially important for non-native speakers of the target language (usually English). As for the comments, don't take them too seriously. There's a difference between conventions and style, and even regarding the former, sometimes it's good to be innovative.
Finally, one way to find enough material to write about (unless you're a phenomenal researcher even at this early stage) is to write expositions of proofs (or subjects) you like. There is often more than one way to explain a proof, and you can practice both your understanding of the material, your explanatory skills, and your literacy. You can complement it with lecturing on the material.
Comment: @rivocantus: have a look at D. Goss's *[Some Hints on Mathematical Style](http://www.math.ohio-state.edu/~goss/hint.pdf)* (based on Hints by Serre); they also contains a longer list of references. There's a classic by Steenrod, Halmos, Schiffer, Dieudonné, *How to write mathematics*, worth looking at. Finally, Milne's *[Tips for Authors](http://www.jmilne.org/math/tips.html)* have some good points that seem obvious afterwards. As always with such things: Take away what you like, ignore what you don't like. But it's usually better to ignore something deliberately than not knowing about it :)
Comment: Another point might be: writing with a particular audience in mind; trying it out on that audience; then adapting your writing based on the feedback.
Comment: > Thanks. Could you name some of those prescriptive books that you were thinking of ? I am also interested to understand more sharply difference between proposition, lemma, corollary and theorem. I have heard some who disagree if something is theorem or not. How formally to be sure ? If there is no absolute answer, then at least I would like to know how to challenge that something should be called a theorem.

How to become eloquent mathematician?


CentOS Yum Not Finding Packages

Question: Just installed CentOS and am trying to install exfat-utils and fuse-exfat but yum says "No package .. Available" for both when I try "sudo yum install exfat-utils." Maybe I am missing some repositories or something?
Answer: On CentOS, install those with the command:
sudo yum install exfat-utils fuse-exfat
You can see that those packages are hosted on nux-dextop repo:
`exfat-utils-1.0.1-1.el7.nux.x86_64 : Utilities for exFAT file system
Repo        : nux-dextop
fuse-exfat-1.0.1-1.el7.nux.x86_64 : Free exFAT file system implementation
Repo        : nux-dextop`

If you don't have this repo yet, just add it first. Look in http://li.nux.ro/repos.html for the current version. And note that it also depends on epel-release.
yum -y install epel-release http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

Comment: If you get an error while trying to install the repo saying "... does not update installed package. Nothing to do", it may because you already have it but it is "disabled". Check with `yum repolist all` and if needed, enable it with `yum --enablerepo=nux-dextop`.
Answer: Install packages using
sudo yum install -y exfatprogs

Then you can make the partition with exfat file system
sudo mkfs.exfat /dev/sdb1

CentOS Yum Not Finding Packages


The efficient use of space

Question: I'm looking for a word that means the study or practice of the efficient use of space, something ending -omics. I used to know it but I've got ergonomics stuck in my brain and that's not quite right.
Comment: [Agronomics](http://www.collinsdictionary.com/dictionary/english/agronomics)? The branch of economics dealing with the distribution, management, and productivity of land. The word _economy_ itself could well be coaxed to fit within the boundaries of your requirements.
Answer: Although not pertaining solely to  efficient use of space, the word logistics is relevant (emphasis added; commas as found):

(operations) The process of planning, implementing, and controlling the efficient, effective flow and storage of goods, services and related information from their point of origin to point of consumption for the purpose of satisfying customer requirements.
Answer: From Wikipedia:

The English words "economy" and "economics" can be traced back to the Greek words οἰκονόμος (i.e. "one who manages a household", a composite word derived from οἴκος ("house") and νέμω ("manage; distribute")) and οἰκονομία ("household management").
  Leoni Schmidt
  Playing With the image:
  in conversation with margaret Roberts

Since

eco-nomics = management/planning of eco,

You would be looking for a technical jargon for spatial management/planning.
If you are allowed the liberty of coining a new term, it could be

spationomics

Otherwise, you might have to rely on some existing mouthful terms

spatio-economic efficiency
spatio-efficiency
spatiologic-efficiency
spatiological planning

Henri Lefebvre coined the term "spatiology" to involve both physical space and social space. As a Marxist, Lefebvre was interested in the production of spatiology within a modern, urbanising capitalism. He attempted to trace generative moments in its production and for him "space becomes redescribed not as a dead, inert thing or object, but as organic and fluid and alive; it has a pulse, it palpates, it flows and collides with other spaces." -
  Leoni Schmidt -
  Playing With the image:
  in conversation with margaret Roberts
Answer: The Greek for place or space is χώρος, which suggests choronomics.
However, this has specific uses in biology/zoology which may render it inapplicable in other situations. I had to resort to a Russian source; it's not listed in OED.

Choronomic
adj. [Gr. choros, place; nomos, place or condition for living]
      The external influences effecting [sic] animals, such as geographical or regional environment.
Answer: Here's an example of tessellation - the careful juxtaposition of shapes in a pattern.

My understanding is that tessellation is of great interest not just to artists such as M. C. Escher (who produced that one), but also to physicists and mathematicians such as Roger Penrose. And doubtless biologists, since DNA is very much concerned with protein-folding and shape-fitting.
So if OP wants a word relevant to an active area of scientific enquiry, tessellation is probably the one to go for. I don't think architects and [real-]estate agents have a technical word for how they manage to create/describe "spacious" living accommodation in tiny houses.
For a more "informal/quirky" term, most people would probably understand Tardisification (by which means Doctor Who's Tardis is made much larger on the inside than the outside). But as of now I doubt you'd find that one in any dictionaries.
Comment: Also, I can't resist [tetristerone](http://www.urbandictionary.com/define.php?term=tetris%20packed) - the (usually female) hormone *which governs the ability to efficiently pack multiple objects of differing shapes, sizes, and colors (as they can be confusing) into a box or other container leaving minimal empty space.* It's the non-scientific version of Tardisification, that allows some women to have more in their handbag than the average man can fit in the boot of his car.
Answer: Ergonomics is defined as human engineering, and often related to the efficient use of space. A pull-out bed or a folding desk could be described as economical designs.
Answer: Perhaps agoranomics? Agoraphobia is the fear of wide open spaces and according to etymologyonline it comes from the Greek agora "open space".
Comment: What? Did I get downvoted just because I made up a word? A completely sensible word. Man, I bet the same crap happened to the Bard too :(
Comment: Would the items in my suitcase get traumatised by agoraphobia when I practice "agornomics" on them to pack as much stuffs as possible in as small a luggage bag that the airline would then permit me to store in overhead bins rather than having me check the bag in as baggage? LOL - didn't vote you down but your answer is hilarious.
Comment: @Blessed Geek: No, that would be claustrophobia; the fear of cramped spaces.
Comment: You are right - got a little mixed up.

The efficient use of space


org.apache.http packages removed in API level 23. What is the alternative?

Question: After adding following changes in by build.gradle right after updating to latest android API level 23 (Marshmallow) all org.apache.http classes is not working.
android {
    compileSdkVersion 23
    buildToolsVersion "23.0.0"

    defaultConfig {
        applicationId "com.myapp.package"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 2
        versionName "1.1"
    }
}

I checked "Android API Differences Report" here. Its says all Classes of org.apache.http has been removed. Can someone suggest what is the alternative ?
Here is my code :
try {

            DefaultHttpClient httpClient = new DefaultHttpClient();
            HttpPost httpPost = new HttpPost(address);

            httpPost.setEntity(new StringEntity("{\"longUrl\":\""+longUrl+"\"}"));
            httpPost.setHeader("Content-Type", "application/json");
            HttpResponse httpResponse = httpClient.execute(httpPost);

            HttpEntity httpEntity = httpResponse.getEntity();
            is = httpEntity.getContent();

        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        } catch (ClientProtocolException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

Comment: HttpClient was already deprecated in Android L, so i recommend using HttpURLConnection
Answer: See the Behavior Changes at Android Developers where it says that:

Android 6.0 release removes support for the Apache HTTP client. If your app
  is using this client and targets Android 2.3 (API level 9) or higher,
  use the HttpURLConnection class instead. This API is more efficient
  because it reduces network use through transparent compression and
  response caching, and minimizes power consumption. To continue using
  the Apache HTTP APIs, you must first declare the following
  compile-time dependency in your build.gradle file:
android {
    useLibrary 'org.apache.http.legacy'
}

Comment: @techierishi: Make sure that you are on version 1.3.0 of the Gradle for Android plugin.
Comment: Gradle does not seem to recognize 'useLibrary'. Error below :
Gradle DSL method not found: 'useLibrary()'
Comment: I've added useLibrary but I'm still getting in this "Unable to find optional library: org.apache.http.legacy" error in my build?
Answer: Please refer this. Alternative class is mentioned in Android Developer site.

The org.apache.http classes and the android.net.http.AndroidHttpClient class have been deprecated in Android 5.1. These classes are no longer being maintained and you should migrate any app code using these APIs to the URLConnection classes as soon as possible.
Answer: You can manually add an up-to-date version of the Apache HttpClient:
implementation 'org.apache.httpcomponents:httpclient:4.5.5'
Likewise, you can use another HTTP library altogether like OkHttp. You can also use a library which is more higher level, like Retrofit.


Can Mac OS applications run natively?

Question: This may be a silly question, but since the newer Mac systems are built on unix, is it possible to run a Mac app natively on Ubuntu? I'm specifically interested in the Coda development environment.
Comment: possible duplicate of [Can I run OSX applications?](http://askubuntu.com/questions/6229/can-i-run-osx-applications)
Comment: Possible duplicate of [Can I run OSX applications?](https://askubuntu.com/questions/6229/can-i-run-osx-applications)
Comment: You can run things like `htop` that are universe, in a terminal.
Comment: @GeorgeUdosen: That question is highly related but has a slightly different scope as you can tell from the answers. I'm voting against a duplicate link between the two.
Answer: They're both POSIX systems but no. Most OSX applications rely on various libraries (eg: Cocoa -- like GTK but not GTK) that aren't open source and therefore can't be ported.
I think there has been some interest in writing a layer like Wine to replace things like Cocoa but as far as I know, nothing has ever come of it.
Comment: there is a project underway to port cocoa to windows (and possibly linux, (forgot the name =P)), and there is also GNU Step, which... well, tries, to be compatible at the source level. That's probably the closest you will get to running apps on both (Without using something like GTK+ or QT as a basis).
Comment: it's called cocotron (need to dig the link up)
Comment: http://www.cocotron.org/
Comment: http://askubuntu.com/a/227010/25036 draws attention to the **Darling** project.
Comment: I was afraid that was the case... oh, well. Thanks.
Comment: So if Apple one day saw the light (not gonna happen anytime soon I know), then they could port Cocoa to Linux. Interesting thought.
Answer: Correct, both are POSIX compliant. But Unix BSD originates from the Unix source code, that belonged to AT&T. The University at Berkeley and San Diego shared the rights to this code with AT&T, the original C code. The operating system interface layer to Unix System V was published in the "Unix SVID" documents" - three large volumes of how to use Unix System V - and interface to it: Interface Definition.
This book was compared to a number of standardisation documents at the time: X/Open and OSF had very similar definitions, and then the IEEE approved of the POSIX definition with the US DoD throwing in their "Steelman" requirements for a robust operating system. Xenix is like Linux an implementation from scratch of POSIX: Linus Torvald started with the skeleton and took on the task of working through the volumes, pulled through and submitted it to the IEEE for compliance verification and Linux passed.
The others, like SCO Unix, were approved as "Unix" by AT&T, and POSIX was made to be compliant to them - not that they should comply to POSIX. Mac only runs on the Intel iApX/x86 instruction set, while Linux is available on many more chips-set and "architectures".
The main difference between Mac and say Linux Mint is the file hierarchy. macOS has /Applications, /Library and /User folders - in Linux Mint/Ubuntu these are in the "Unix" like file hierarchy /usr/share/bin usr/share/lib and /home - big deal. Besides that, the two are the same.
Over the years, the libraries have been named differently and placed differently. Otherwise the difference in the file systems could have been bridged with environment variables. But Apple have designed things their way, and they the systems have gone different ways.
On Mint - outside Ubuntu, work is done on "Windows" as a diversion of KDE, where a standard way of setting up the libraries are defined, and this allows development for both - see "Homebrew".
Both use the X11r4 window manager and Apple based macOS on the Xfgc from DEC, we are free to choose. But the window manager is important, since this is the way the user interface to the systems. Both Mac and Ubuntu/Mint share the icons, widgets and styles. Apple has taken a lot of the management tools for macOS, just compiled them for their hardware and used them as "proprietary" - compare "Disk Utilities" on a Mac to "Disks".

Can Mac OS applications run natively?