Does anyone know these non-LEGO bricks? dimples in studs, no connectors on the bottom

Question: We found this box of old (definitely) non-LEGO  bricks in Czech Republic. Probably from the seventies or eighties?
Does anyone know the manufacturer - brand or set (s) from which they can be?
We thought it was Wundersteine (Wonderbricks), but their bricks are different.
Here are some photos, no visible logos.
Many thanks for any suggestions.
Answer: This is one of Eastern Germany's (DDR) two brick systems (created by typical VEBs and I'd be suprised if you find those letters anywhere printed on the bricks):

most likely Formo because of the simplicity of the backside and how basic all the bricks are - you should not be able to combine it with Lego bricks and these bricks are rather difficult to impossible to assemble. Or
less likely PEBE because I've never encountered so large bricks for that, and in your pictures I see not one specialized brick although those weren't uncommon, while sets with only basic bricks were not typical - you should be able to combine it with Lego bricks and these bricks can be put together without further problems.

PEBE's bricks looked different thru the years - what you show might be from 1980s, because later the studs consisted of cylinders only (yet still compatible with Lego). For i.e. 2x4 flat bricks without studs it was very typical to have not even one cylinder or stud on the backside.
Formo's highlight was a set of the Palast der Republik, intended to be bought as souvenir.


Targeting arteries / tendons in knife fights?

Question: Is it practical to target arteries or tendons in a knife fight? For instance the brachial artery, the carotid artery and the femoral artery are all listed as targets in the MCMAP Manual (MCRP 3-02B). And some sources mention that you can slit the tendons in the wrist to render the hand ineffective. Will this work in a real fight? What should the main targets be if you are in a knife fight facing an unarmed opponent?
Comment: It's not practical given wildly flailing moves or coming in close and stabbing you 6 times before you know they have a knife. Your time would be 10,000 times better spent practicing avoidance, non-confrontational speaking, de-escalation, and immediate friendly compliance with rude requests to begone. Being a leet knife-fighter is a fantasy, and training to win but survive a knife fight and avoiding going to jail and having PTSD is 98% fantasy. If you're in the US and you insist on being in knifey situations, get a gun instead, although you'll also be stabbed before you can draw it.
Comment: In a knife fight facing an unarmed opponent? Well, what? This is illegal in most countries in most cases in the first place.
Comment: Well, as illegal as any fight in that, if you are the aggressor with the weapon, you're almost certainly in the wrong, and even if you defend yourself too vigorously after having the upper hand, you're probably in hot water, but there will sometimes be situations where it's legal to defend yourself with a weapon against someone without, such as when there's a major size or numbers disparity.
Comment: @PhilipKlöcking Depends on local laws.  I have included the way this works int he UK in my answer.  Can't speak for other countries of course.
Comment: "Weird and worrying questions from the SE Inbox" ...
Comment: Any cut with a typical army knife will cause lots of pain and probably leave the defender unable to fight. Attack body part that is closest to you in a straight line. If you have time to actually choose your aim, you could choose any body part that is not covered by clothing, especially if the other one is wearing protective clothing (gloves, leather jacket etc. can all reduce the effectiveness of the knife).
As with any weapons used at short distance, the most important thing is to practice your legs and movement.
Comment: @AmorphousBlob | I am asking this for a very special and extreme situation here. What's at stake may be more than one's life.
Answer: Just to add to the discussion, I trained in escrima back in college from a student of Danny Inosanto's and someone who went to Dog Brothers gatherings. We did a very simple exercise to show how knife fights would turn out. You get two people together. Give them each two magic markers, one for each hand. These represent knives. Then have them attack and defend for a total of 15 to 30 seconds. After the bout, stop the fight, and have them both look at each other.
What we saw was that each person came out of this with dozens of slash marks across their hands, wrists, arms, torso, face, neck, etc. When we compared the location of the slash marks with major arteries, almost invariably each person had slashes to about 3 or more arteries.
We concluded from this that even the best trained kali / escrima fighter would likely end up dead from loss of blood without quick medical intervention if they ever fought against another kali / escrima fighter who was armed with knives.
The thing about our escrima training, and perhaps all escrima training, is that it has built-into it slashes that directly target these major arteries. You don't even have to think about it or focus on those locations. Just keep slashing. Your knife will find them all on its own.
We had many sparring sessions, each with a different strategy. No strategy seemed to be completely successful at eliminating the risk of a slash to a major artery. You would think that by grabbing a hold of the attacker's arms, that might prevent the slashes, but that usually results in getting your arms and body knifed even more as you go in.
As they said in that old classic movie, "War Games", the only winning move is not to play.
Hope that helps.
Comment: @MacacoBranco Yes, that's a good point about clothing. But even if you do have clothing getting in the way, you'll still get one or two arteries cut, in all likelihood. Those would be on the wrist and neck. There's also knife stabs instead of slashes, which become available in close range. And chances are that a good knife or machete can slash right through clothes with some reliability. So I'll agree there's something to the idea that clothing makes the damage less, but you're probably still going to bleed to death without immediate medical attention. Either way, don't test that idea. Haha.
Comment: As a side note to this, while I agree that the marker method does show a clear indication of how often you're going to get tagged in a knife fight, even light clothing does a surprising amount to reduce the damage from a knife slash, at the least turning deep slashes into superficial cuts.
Answer: If you are in a 'knife fight' the first thing to realise is that this is an extremely high stakes fight.  One or both of you are probably going to die.
Unlike unarmed combat it doesn't really matter to a large degree what you hit. Almost anywhere is a target and potentially lethal.  When training with plastic practice knifes I tend to go for the veins on the inside of the wrist for example.
As for fighting an unarmed opponent... even if you don't know what you are doing, even if they are trained even if the knife is small you have an enormous advantage.  Just stab and stab and chances are you will probably win.
A note on Legality
As others have brought this up:  I can't speak for other countries but I did take a course from a practising lawyer on the legalities of self defence including the use of weapons in the UK.
It is illegal to carry a weapon here (that is anything made to be a weapon, anything adapted to be a weapon or anything carried with the intention of use as a weapon).  Without a lawful reason (and self defence is not a lawful reason).
However it is not illegal to use a weapon or any other object for self defence purposes in the UK.  Your response still has to be 'reasonable given the circumstances as you believed them to be'.
This is quite a complicated notion but basically

if you walk around with a knife for self defence you are breaking the law.
if you have a knife with you because you (for example) also have a picnic and are going to eat you are not breaking the law.

In either case 1 or 2 you can use the knife if you are attacked and still make a 'self defence' defence against anyone prosecuting for assault.  But in case 1 you may face separate charges for having an 'offensive weapon'.
Comment: Great to see the legal side of it.
Answer: With the caveat that I never did any substantial knife training, and most of it in traditional martial arts like Escrima, you are unlikely to have the opportunity to really target anything because it goes fast. The exception might be during grappling (which some would argue that you're already failed at keeping your opponent at knifepoint in the fight) where one of the ways to counter people trying to grab hands and wrists is to turn the knife enough to cut at the arms and wrists. Additionally, the light weight of a knife means that most slashes are not very effective against even a lightly clothed area. You'll open some small cuts, and you might get lucky, but it's much less likely that you're going to cut into a tendon or artery.
Against an unarmed opponent (as I noted above, this might be defensible if you're using a weapon due to a large size or numbers disparity), again you're not going to really have the opportunity to really target anything, but the principle remains about the same. Don't keep your knife extended in front of you, use the other arm to judge distance, to distract your opponent, and to fend them off. Slash at anything that comes into range. Most cuts are likely to be superficial, and it's not uncommon for it too take a long time for people to fall to slash or stab wounds, but time will be on your side due to gradual blood loss. Most importantly, if you get a chance to run, take it. Because you're carrying a weapon, the onus is on you to not continue the fight once you have the upper hand. Frankly, if it comes down to a life or death situation, a trial may be better than a funeral, but juries don't tend to look well on "self defense" involving stabbing someone when they're bleeding to heavily to pursue you.
Answer: My... quick notes for some off-the-point points raised:

The videos you see of a knife-wielder overcoming a man with a gun ALL presuppose one thing:  the knife-wielder acts before the man with a gun does. Not unreasonable if within 21 feet of him the first really famous point-maker used to give. IF and ONLY IF... there's the rub... you have the skill to achieve your goal (not necessarily a high bar, depending upon that goal) and if you are not frozen or buying into gun situation always wins over knife situation... then you have the pre-reqs to succeed, but the actual key to doing so is you act RIGHT NOW, the moment you realize the situation. Let the man with a gun chill and settle the situation and you're dead, or otherwise the loser.
The point is you take advantage of his not knowing you are about to burst into a direct attack upon him and the moments that gives you to close the distance and damage him to the point of losing before he realizes he just has to shoot you. On your side:  1) He, like most, thinks he has an overwhelming edge and that you likely won't even try anything because you know it too, 2) He doesn't realize the ground one can cover during his reaction time, 3) He is so sure of his supremacy that he is not bothered by the knife (same fellow mentioned above also made a good point, that most people seem more terrified by a knife than by a gun, strange as that seems), 4) Since he thinks he has you well in hand, and that you do too, he will be slightly slower yet in reacting as it is almost completely unexpected that you will, 5) He might expect some reaction, but not an aggressive, launch-into-him, reaction so that might slow him as he gets a grip on it and reacts back.
The essence being that you know what you are doing and it is a shock to him that you are doing anything at all.
And that he might just shoot you dead before you move three feet anyway.

Arteries? Organs? Paper trail showing you researched and planned about such things? The jury, and there WILL BE a jury (if you live) may not consider those things the actions of a man who bought into the Boy Scout motto, but rather the actions of a man who maybe went looking for a chance to kill or maim someone stupid. Like putting out signs saying "Trespassers will be shot" on your property.

Do you have the training to know where interesting arteries and organs are? How something a half-inch wide at best can be not where you expect in a given body? Is the aorta on the left side of the fellow's face or is that the jugular? One's not an artery. How much does thinking about these things slow you down since you are not a skilled knife-fighter? Usually in a fight of any kind, "thinking" is "overthinking." Most thinking is best done before the fight, and then you follow your plan to happiness for one of you.

What size knife do each of you have? One edge or two? Cross-bar? I'll link a couple videos soon, that you'll hopefully watch. If you do, the first uses pig-stickers, rather long knives. Bayonet long. Because it's Army and antagonists aren't so likely to have short knives. You'll notice a lot of blocking the blade... one thing with two long blades, another altogether if one or both of you have short blades. Like 3-4 inch street-legal (maybe) blades. Little things matter. Differences matter. Like in boxing, some styles/situations will beat some others kinda no matter what.
In the video here the Marine Corp. is teaching the general marine drawn from the general population basics for using a knife to deal with an opponent with a knife. Their direction is clearly "keep it simple" for the new men who have no experience with any nasty business. They mostly figure "block his blade with yours, try to immediately damage his hand while you're so close to it, move immediately into at least one, better though two body attacks, disengage before he gets a grip on things and attacks again." At no point do they bother about arteries or organs, or even details like avoid the chest (the entire rib cage). Nor even trying to get the marines to drive frontal penetrations up into it behind the ribs. No niceties like that at all. Just "stop him from sticking you." "Try to hurt the thing that's right there, and incidentally, holds the thing that can kill you." "Take advantage of his knife being out of place to stop a body attack to get one or two strikes he cannot block except with body parts." "Repeat."
In other words, "Stop him. Quick try to make him lose the knife. Aggressiveness:  stick him NOW while you're past his knife. Nothing lasts forever, so break off if not immediately successful."
You'll see, in particular, that they show several things bearing right on your interest:

One attack would result in the enemy being knifed in the back, around the kidney. They don't mention the kidney as a TARGET at all, or actually ever mention anything except the straightforward idea of driving the knife into his back.
Later, a position shown shows the instructor sticking his knife into the front of the enemy, into soft tissue (liver area here), and he has it angled up so it would drive up into a lung. Not a word is mentioned about anything at all past sticking him in the body.
They mention the neck as a target several times and demonstrate. Never once do they mention arteries, veins, or spinal chords. Just "neck." And even though the video covers club fighting as well in which driving the end of the club into the enemy's throat is shown, they never really give that as a target for a knife. One rather thinks they figure it risky, maybe just because of the effort and time to aim, and not necessary to risk when you have a knife, but important to have in your arsenal if "all you have" is a club.

In short, as a question of interest to someone with no experience with the jitters and terror of a fight, and overcoming such, as well as someone with no particular skill at locating such targets, no, do not aim for such things. Simply stick the other guy as much as you can. At most, give cutting into his hand so he loses his weapon a try, but not aiming at things like tendons. Just aim at slicing flesh and getting lucky with anything sliced under it. Be aggressive, after getting past his knife, so as to succeed in sticking him and to generate jitters and terrors in him.
Folks mentioning things like tendons in the wrist are almost surely doing so in the vein of "if you cut him on the underside of the wrist, you might cut a tendon or two that makes the hand useless." Not as a goal, but rather to convince you that striking at such a target is worthwhile because it isn't like nipping a bit of ear off him while he then guts you.
And hopefully they mean after you get past his knife, not that you should somehow dance your blade around his swiftly moving blade to nip inside and cut his wrist tendons.
Lastly, stabbing would seem to be the moneymaker. The next link shows a competition (of some kind, I didn't look into it in particular, but you might find the whole series interesting) featuring professionals. Stabs get two points, slashes one point. Professionals. 'Nuff said.
Think of sticking the knife in, not slashing. But please don't think of things like mugging for the camera while it watches you wiggle the blade around after stabbing... and then take six stabs into your lower back and kidneys from the not-actually-subdued enemy. If you DO have the time to do something extra, make it continued movement to throw off his possibility of such a surprise and include a second stabbing now on his backside, then break off so a wild swing won't take you. Let nature then drop him without re-engaging.
You know, or dial 911 on speakerphone so he can hear the operator sending the police.
Then get ready to spend all your savings, mortgage or second-mortgage (or both) your house, and maybe be convicted by a jury, then lose your job 'cause CoVid or not, they don't allow remote working from prison.
A loser (his nickname was actually "Waste") in my hometown got angry at a hotel and started a fire in a linen closet. 12 people died. His parents triple-mortgaged their home and all their retirement savings and he still went to prison for life. Your case might be less slamdunk than his was, but... prison. Anal rape. Bad food. Never work outside the homeless man pushing a cart selling socks when he can industry. So I hope this is all theoretical for you, or that you're an author doing research.
Comment: This is a lot. I'm sure there are probably some good points, but it's getting lost among all of the fluff.
Comment: As Maraco said, there's a lot of roundabout informatio in your answer. Try a more direct approach, people tend to get lost in this type of chaotic reading.
Answer: Targets for an unarmed target.... I would say the tendons behind the knees, but it depends on the length of your blade. The only time I've been stabbed I didn't feel it and it wasn't until after the fight that I found out and started going through shock. That said, you might want to think about how you can trigger a flight response and shock in your enemy as soon as possible while creating distance (slash at their wrist so they see the blood).


Where should I ask for recommendations based on a given artist or song?

Question: I don't know if a stack exchange website even exists for this, but I'm looking for a recommendation based on an artist, album, or song. Is it appropriate to ask for something like this on music.stackexchange? Unfortunately, I can't think of a place to ask this kind of question on the internet, and I just can't seem to find an answer to my question by simply googling around.
Answer: There's an Area 51 proposal that looks to cover recommendations.  You'll note that they're explicitly mentioned as off-topic in our FAQ, and though it could change I really don't see it happening.  The ones we've gotten (and closed) have all been terrible.
Comment: Committed! When I want to ask a question, I want to StackExchange it :)
Answer: In addition to @Raskolnikov's list of sites which provide recommendations, last.fm, iTunes and others provide this as a service.
It is an area very well served currently, but that has almost no applicability to the Stack Exchange model. All recommendations on music are subjective, by their very nature. Stack Exchange aims to be entirely objective, providing the correct answer to the question.
I don't think there is any way to build this into the SE model.
Answer: I think there are a lot of discussion boards where you can ask this kind of questions. A quick Google search gives this:
http://www.music-discussion.com/forum/forum.php
http://musicboards.com/
http://www.muzicforums.com/
Seriously, if you say you didn't find an answer by Googling around, you didn't Google around well.
Nevertheless, I am a proponent of opening the scope of this stackexchange and allow this type of questions, provided they are community type questions. I think this would also increase activity on the site.


Want to know after death

Question: Can the soul meet the souls of his beloved ones? Can I after my death meet my parents' souls? Will they have feeling when they were alive and shall I have feeling as I have now? If yes, how the conversation takes place?
Comment: You can refer the following question for some guidance https://hinduism.stackexchange.com/questions/28096/do-our-parents-in-this-birth-will-be-our-parents-in-every-birth-does-this-cycle
Answer: Hinduism generally teaches that after death, unless the person has attained enlightenment and become part of Brahman, their life force is reincarnated and they live another life on Earth. There is no such thing as a "soul" per se, as everything is part of the one Universal substance called Brahman, and thus your parents will either have returned to Brahman or been reincarnated.
There are in some circumstances heavens that are temporary locations between Earthly lives in which it is said one can meet their ancestors, this such heaven is called Pitriloka. The "soul" if you will is said to go to Pitriloka between lives if they have given gifts and made sacrifices during life, but this is not a permanent state and the person's life force will reincarnate after some time in Pitriloka.
If your parents were good religious people then it can be assumed that they are in Pitriloka for the time being, but they will not be the same. The "soul" does not experiences sensations and memories in the same way after death, and you will not "have a conversation", as you will not have a body!
It is likely that it will be like a dream state that you are all sharing.

Want to know after death


Solve the differential equation $xy''+4y'+axy=0$

Question: This is a Second order linear homogeneous ordinary differential equation. I tried to find the asymptotic solution as $x$ goes to infinity: $y''+ay=0$ whose solution is $y=c \sin(wx)+d \cos(wx)$ where $c$ and $d$ are constants and $w^2=a$. Then I tried the solution $y= (c \sin(wx)+d \cos(wx))f(x)$.Then plugging it into the original equation I found the differential equation satisfied by $f(x)$. This equation is of the same type as the original one; only more complicated. Then I tried a solution of the type $y=x^{-p}(c \sin(wx)+ d \cos(wx))\exp(-qx)$ where $p$ and $q$ are constants. But it did not work.
Comment: I got $$y=\sqrt{\frac{2}{\pi  w^3}}\frac{ (\sin (w x) (c-d w x)-\cos (w x) (c w x+d))}{x^3}$$ Hope this can inspire you
Answer: Multiply by $x$ and you get the Bowman's representation of the Bessel's equation http://mathworld.wolfram.com/BesselDifferentialEquation.html. The solution is $$y(x)=x^{-3/2}(c_{1}J_{3/2}(\sqrt{a}x)+c_{2}Y_{3/2}(\sqrt{a}x))$$
This can be further simplified to yield the solutions in terms of the ordinary functions. We use the Fact that
$$J_{n+1/2}(x)=\sqrt{\frac{2x}{\pi}}j_{n}(x)$$
$$Y_{n+1/2}(x)=\sqrt{\frac{2x}{\pi}}y_{n}(x)$$
Where $j, y$ are the spherical Bessel functions, thus
$$J_{3/2}(\sqrt{a}x)=\sqrt{\frac{2\sqrt{a}x}{\pi}}j_{1}(\sqrt{a}x)=\sqrt{\frac{2}{\pi{x}}}\frac{\sin{\sqrt{a}x}-\sqrt{a}x\cos{\sqrt{a}x}}{a^{3/4}x}$$
$$Y_{3/2}(\sqrt{a}x)=\sqrt{\frac{2\sqrt{a}x}{\pi}}y_{1}(\sqrt{a}x)=-\sqrt{\frac{2}{\pi{x}}}\frac{\cos{\sqrt{a}x}+\sqrt{a}x\sin{\sqrt{a}x}}{a^{3/4}x}$$


How to delete an old iCloud account from an iPhone if the Apple ID has been deleted

Question: I deleted my old Apple ID but forgot to log out from iCloud. I now can't reset my phone without turning off Find my iPhone because you need to sign in to iCloud to turn it off. I asked Apple Support to restore the account, but they say they can't.
Answer: This article looks like it may be your answer.
It details how to deactivate your old AppleID in particular.
You could also, if I understand your problem, put your AppleID back on the iPhone, turn off Find my phone, then again delete the appleID.
Or check this link for ways to do it without having your iPhone set up again.
https://www.macrumors.com/how-to/how-to-delete-or-deactivate-your-apple-id-account/
Comment: Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it's there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline.


Can I use the output of one pin as VCC?

Question: For a project I have to use a voltage level shifter. On both sides of this shifter I have to specify the target voltage. Thus my idea was to simply set one pin on high (3.3 V) and use that as VCC on one side. My question now is if that is sufficient, or if the Pi does not produce enough power for powering the shifter. Could I damage the Pi with that configuration?
Answer: I assume you are using a MOSFET Level Converter. You won't damage the Pi as the reference draws little current, but it won't work properly as the high level will be <3.3V. Why not use the 3.3V?
Comment: I need the reference for converting 5V input to 3.3 V input. What do you mean with "Why not use the 3.3V"?
Comment: I assume you are using a level converter to connect to Pi GPIO. The normal procedure is to use the Pi 3.3V supply (pin 1) as reference. This, after all, is the point of a level converter - to match the voltage levels on each side.
Comment: But it won't drain too much power? That was my original problem.
Comment: Any current you dray from the GPIO comes from the 3.3V supply, whether direct or via a GPIO pin.
Comment: Ok, that was something I did not consider (and it solves my problem). Thanks!
Answer: It depends on the amount of current that draws what you connect the pin to. I would not go far beyond 30mA

Can I use the output of one pin as VCC?


Rust repair and coverage on High temperature fixture

Question: I'm looking for recommendations for going about making my bathroom electric baseboard heater more presentable (and, of course, maintaining its safety). I'm including pictures of the fixture, showing the rust spots. As you know the bathroom location leaves it susceptible to a lot of moisture. In fact, I installed the current heater years ago as a replacement of the former baseboard heater which had also rusted. I want to pretty this one up and need instructions for dealing with the rust first and then the right kind of paint to use in this high temperature location that will also better protect the surfaces from further rusting.
Answer: First, that looks like a common Cadet heater that costs about $50, so don't sink $200 worth of labor-of-love treating it.
Second, it's high-temp, but not that high-temp - it's designed to have a relatively huge heating element with low heat per inch, so you won't burn yourself on it if you touch it. These things are in homes with children after all.
So ordinary rattle-can spray paint should work fine, you don't need to use grill or stove or brake caliper paint.  (in case you want a bright red heater lol).  An alternate option if you have a Maker Space available to you with a big powdercoat curing oven is, powder coat.  That is how it was painted from the factory.  Since part of powdercoating is curing it in a 475F oven, obviously the coating doesn't have a problem with heat.
If you really, really want to brush and roller it, you can't use a "latex" paint because the heat will damage it.  You need to use an alkyd paint.  The messy ones involving thinner and NOT being able to clean brushes in the sink. (This is exactly what is in "rattle can" spray paint, but obviously that doesn't bother you there because you don't thin it or use brushes).  They now make waterborne alkyds which are supposedly best of both worlds, but I doubt their durability.  We shall see.
Comment: Ok, great info! Good to know about the temp factor. What about treating the existing rust? Do you think it is possible to fix it so it never rusts again?
Comment: @Nicknamednick Not for less than the cost of a Cadet heater.  You'd be really talking about media blast and then coating with industrial paints. Bare minimum a makerspace membership and a bunch of paint kit.  You could buy the heater 4-5 times over for that lol.


Resampling necessary?

Question: I have a file that is composed of n data records with a sample rate s. Each of these records has a duration d. Now due to postprocessing I have to change the duration to d=d/3, thus afterwards I'll have 3*n data records stored in the file.
I'm now wondering if there is some signal processing rule that says that I also have to change the sampling rate as well (e.g. if the duration changes by 1/3 then the new sampling rate is s=s/3?). I don't want to up/down sample the signal, just change the duration of each record.
Answer: Resampling won't change the signal duration. It will change the sample rate and the number of samples. And, if you're lowering the sample rate, it will change the frequency components of the signal (if done right, with a proper filter, it will reduce the maximum possible frequency to half the new sample rate).
In order to make your signal "faster" or "slower" you need to use a different technique, time compression/expansion or simply time stretching. The basic idea there is to split the signal into blocks, estimate the frequency components in every block and then replace each block with a block of shorter or longer duration containing synthesized sinewaves of the same frequencies and phase shifts. It appears that currently there's no high quality method for time stretching signals by more than 30%. All cheap methods distort audio signals noticeably to the ear.
What is the problem that you are trying to solve? What's the nature of the sampled signal? Can you expand your question?
Comment: Actually it was just a file format problem but your hint with the sample rate solved it. I was misled.
Answer: there is a misconception in your question: sampling consists in taking a snapshot of a signal at regular interval in time. each sample represents an instant in time, thus it has no concept of duration.
so if you have a signal sampled at a given rate s, if after processing you have generated n*3 samples, then you effectively resampled the signal at rate s*3.
EDIT: (reading the comment, i do better understand the problem)
the sample rate is defined by the number of samples per amount of time. so the duration and the number of samples are linked: if you decrease the duration by a factor x and decrease the number of sample by the same factor, the sample rate is the same.
so, in your specific case, the sample rate does not change if and only if you have m/3 samples in each data record of duration d/3.
Comment: Sorry, I think I mixed something up! I have a signal sampled with a rate *r*, stored in *n* data records with a duration *d* and an amount of *m* signals per data record (EDF file format).
Comment: that's quite different. you should edit the question to explain this. anyway, i edited my answer according to your comment.

Resampling necessary?


Is there a word for receiving a gift?

Question: If I receive a thing, I can either steal it, trade for it, or receive it as a gift. Is there a word for "receive as a gift"? As in, "I stole four potatoes, bought six potatoes, and XXX'd three potatoes?"
Comment: In some contexts you might be able to use ***received*** or ***accepted***, but for almost all contexts I think you'll have to go for the two-word ***was given*** (to emphasize the fact of having received the three potatoes as a *gift*, you might also consider ***was gifted***).
Comment: @FumbleFingers The OP also needs to beware of the fact that the verb *receive* or *receiving* has various meanings depending on context. In Britain (and I assume in other English-speaking jurisdictions) there is an offence of *receiving*. It refers to stolen property, where the *receiver* knows it to have been stolen. At the other end of the scale a *Receiver* is someone appointed by a court to take charge of, and manage assets held by a bankrupt.
Answer: "I was gifted three potatoes". Gift works as both a verb and a noun.
A more common use is "I was given three potatoes" but this doesn't specifically imply a gift.

Is there a word for receiving a gift?


What means sym prefix before functions name in radare2

Question: What means sym prefix in disassembly? For examle, sym.main?
Comment: RTFM ! wx 90 @@ sym.*  Writes a nop on every symbol (https://github.com/pwntester/cheatsheets/blob/master/radare2.md)
Comment: Ok, wx 90 @@ sym.* writes a nop on every symbol. But what means sym? Acronym or what?
Comment: Sym ==> symbol ! RTFM again.
Comment: `What means sym prefix` It means you need to understand file formats before you try to disassemble them.
Answer: As pointed out by users in comments sym stands for symbol.
From Wikipedia:

A debug symbol is information that expresses which
  programming-language constructs generated a specific piece of machine
  code in a given executable module. Sometimes the symbolic information
  is compiled together with the module's binary file, or distributed in
  a separate file, or simply discarded during the compilation and/or
  linking. This information enables a person using a symbolic debugger
  to gain additional information about the binary, such as the names of
  variables and routines from the original source code. This information
  can be extremely helpful while trying to investigate and fix a
  crashing application or any other fault.

As previously stated, a symbol may be used to referer to a specific address in the binary (i.e. sym.main => main function).
Answer: Here are symbol prefixes with examples, as output by the Radare2 command "axj" from C:\Windows\system32\gdi32.dll:

sym.imp.* : "sym.imp.KERNEL32.dll_UnhandledExceptionFilter"
sub.* : "sub.KERNEL32.dll_RtlCaptureContext_614+410" or "sym.imp.ole32.dll_ReleaseStgMedium+56" (Note the library name in upper- or lowercase)
fcn.* : "fcn.18000587c+41"
str.* : "str.._AUIDropTarget+584" or "str.PyShellExt::GetArguments___failed_to_lock_CF_HDROP_hGlobal+124" or "str.memset" (One or two dots)
section.* : "section..data+16"
switch.* : "switch.0x180004860"
case.* : "case.default.0x180004820"
resource.* : "resource.1"

The only explanation I could find is:
"Flags generally have a prefix in their name, such as str., sym., sub., fcn."
Those names are called 'flags'. Flags can be grouped into 'flag spaces'.
As suggested, "fs" command displays:
[0x180005218]> fs
0  247 * strings
1    5 * symbols
2    8 * sections
3    0 * segments
4   79 * relocs
5   79 * imports
6    2 * resources
7  104 * functions

More information about flags and flagspaces here:
Radare2, basic commands, flags


Biometric Residence permit

Question: I am married with EEA husband and I have been issued a residence card by the Greek authorities.  My husband is residing in the UK more than 3 months as a worker.  I want to travel to the UK with my husband.  Do I need an entry visa or can I travel just with my residence card?
Answer: You can travel without a visa if all of the following are true:

Your residence card states that it is a residence card of the family member of an EEA national.
You can show evidence at the border of your relationship to your husband.
You can show evidence at the border that your husband is in the UK.

The last item can also be satisfied by traveling with your husband.
In addition, it's possible that the immigration officer might ask for

Evidence that your husband is working in the UK (because he has been there for longer than three months), or
Evidence that your husband is in fact an EEA national.

If you are joining your husband, that is, if you are not traveling together, it would be best for your husband to be at the airport when you arrive, with a fully charged mobile phone.
Further reading:
Do I need a visa to visit the UK with my EU partner?

Biometric Residence permit


How to calculate camera settings for a family group portrait with a film camera and flash?

Question: I'm shooting film 200 ASA.,, Three rows of family members in front of a large white lit xmas tree, with flash. Distance from first row approx.15ft.
Where should the focus on the group be?
What would the suggested aperture and shutter speed settings be?
Comment: Is there any ambient light? And what's your flash sync speed?
Comment: What film format are you shooting, 35mm? What equipment are you using? (camera, lens, flash etc.)
Answer: Focus on an eye.
Exposure:  all of them!  This is a staged event and a must-have shot.  Figure out the general idea using a digital camera where you can see the result right away.  Then start with those settings on the good camera.
Shoot bursts of 3 on each shot, so you have 3 identical pictures with tiny differences in people's faces, to choose from.
Your exposure speed will probably be 60 or 125 to sync with the flash.  Longer exposure is better if people are holding still, since you'll need less added light.
The light from the flash will then be changed via the aperture setting and by moving the flash forward and back.  This is not easy to get right or to have the flash not horrible stark headlights look.  You really ought to use a digital camera unless you already know what you're doing.  I shot roll after roll of practice and I knew the theory about multiple flash arrangements and exposures.
I assumed you're using film because with digital you can just keep trying and immediately see the result, and the pre-defined ISO.  You don't need to know the exposure ahead of time, but will figure it out with stand-ins before the people pose for you, and can immediately see brighter/dimmer.
What you need, even for digital, is how to get the lights to work at all.  One flash with a group will need bounces, diffusion, or something.
So I suggest using a DSLR.  Rent or borrow one that's good enough so you don't have to think about film being an option <g>.
Answer:
Where should the focus on the group be?

A good rule of thumb is that you get 2/3s of your depth of field behind the focal point, and 1/3 in front of it - so pick the extreme points you want in focus (probably the middle of the front row of people and the ends of the back row of people, unless you want the Christmas tree in focus) and focus 1/3 of the way back.

What would the suggested aperture and shutter speed settings be?

You've worked out above how much depth of field you need - you can now use any of the online DoF calculators to work out what aperture you want (here's one). This isn't something we can tell you the answer to without knowing the focal length of the lens you're using (and the format size, but it's a good guess it's 36x24mm).
Shutter speed will then depend entirely on how you're trying to balance ambient light with your flash - faster shutter speed means less ambient light and the flash acting as the main light, slower shutter speed means more ambient light and the flash acting as a fill light.
Comment: Remember when DOF didn't need a calculator, as it was marked on the lens?  Then electronic cameras (first EOS did anyway; you also needed autofocus) had an automatic DOF mode where you focus on two points and it sets the final focus and the aperture.


How do I move apps to my SD card?

Question: Recently brought a new phone and put an SD card in it to store some of my apps but I can't move my apps from internal storage to SD? I've installed 2 apps since I got this phone so far and phone is already saying "internal storage running low"... I have already cleared data/caches from preintsalled apps...
Answer: Some apps can't be moved to the SD card, because they wouldn't work properly anymore (widgets would suddenly dissapear, services would randomly stop).
The normal way to move apps to the sdcard is to go to settings > apps > * app you want to move* and click "Move to sdcard". If the app prevents that, the button is grayed out.
If you're running Android 6 or higher, you can format the sdcard as internal storage, then apps would be moved to the sdcard automatically. To do that, go to settings > storage > sdcard, then click on menu and select "Format as internal storage".
If you have a lower version of Android, the only solution would be rooting, which I wouldn't recommend if you don't know what you're doing. It would also allow you to move apps to the sdcard, but you can also destroy your phone completely when you're rooted and you don't know what you're doing.

How do I move apps to my SD card?


2005 Chevy trailblazer 4dr 6cyl 4.2vortex

Question: Headlights went out on the way to work. I realized it is only low beam. High beam works fine, I can't find the fuse to replace it? Also replaced spark plugs because of car missing. I've replaced a coil pack last year for the same symptoms but it also stated coil pack in diagnosis test. After replacement of plugs the diagnostic tests reads misfire. My buddy said it will straighten it's self out but vehicle running worse now than before. Any suggestions? Gas consumption is extreme to say the least and don't put a lot of miles on the trailblazer daily and these same issues happened with the coil pack, including loss of power. Also various electrical problems seems to happen. Could this be a larger fuse that I'm not aware of that connects the different lights? When I run the AC the miss is worse because of the compressor but the issue still remains. Vehicle struggles sometimes to gain speed and gas petal will be to the floor, other times its as it should be. Plug change didn't seem to help except gas smell is gone. I'm not a mechanic but I can handle a few issues so please word things I'll understand, thanks in advance. Just want my vehicle back and running correctly.
Comment: It looks like there's a lot of different questions in here. Can you perhaps split this up into separate, clearer posts?
Comment: Also, reading your title I realise your question is `2005 Chevy trailblazer 4dr 6cyl 4.2vortex`... Not the most descriptive.
Answer: Here is a diagram of the headlight circuits, you should be able to find the cause using this. Headlamp Fuses are in the engine compartment fuse block. I suspect Fuse 53, since this will stop both low beams from working, or a bad HDM relay or Headlamp switch., worst case it is an issue with the Body Control Module.
Click images to enlarge.

Here is the headlight switch diagram if you should need it.
Comment: Thanks for the diagram, I'm sure this will fix most of the electrical issues. The other symptoms you asked to be separated are a miss, same you would experience with a bad plug, loss of power at times idles hard when stopped. Changed plugs and boots yesterday but issues remain. Diagnostic didn't read coil pack as it did last year with these symptoms, it only states misfire.
Comment: Bad coil packs don't always trip a code.


Why doesn't find . -delete delete current directory?

Question: I would expect
find . -delete

to delete the current directory, but it doesn't. Why not?
Comment: Most likely because removing the current working directory would not be a good idea.
Comment: Agreed--I like the default behavior, but it is not consistent with, e.g., `find . -print`.
Comment: @AlexejMagura although I sympathize, I do not see why removing the current directory should be any different than removing an open file. The object will stay alive until a reference to it exists, and then garbage collected afterward. You can do `cd ..; rm -r dir` with another shell with quite clear semantics...
Comment: @Rmano this is true: it's just something I wouldn't do on principle: just go up a directory and then delete the current directory.  I'm not entirely sure why it's such a big deal--though I have had some misfortunes with the current directory no longer existing, such as relative paths no longer working, but you can always get out by using an absolute path--but some part of me just says that it isn't a good idea in general.
Answer: The members of findutils aware of it, it's for compatible with *BSD:

One of the reasons that we skip deletion of "." is for compatibility
  with *BSD, where this action originated.

The NEWS in findutils source code shows that they decided to keep the behavior:

#20802: If -delete fails, find's exit status will now be non-zero. However, find still skips trying to delete ".".

[UPDATE]
Since this question become one of the hot topic, so i dive into FreeBSD source code and come out a more convincing reason.
Let's see the find utility source code of FreeBSD:
int
f_delete(PLAN *plan __unused, FTSENT *entry)
{
    /* ignore these from fts */
    if (strcmp(entry->fts_accpath, ".") == 0 ||
        strcmp(entry->fts_accpath, "..") == 0)
        return 1;
...
    /* rmdir directories, unlink everything else */
    if (S_ISDIR(entry->fts_statp->st_mode)) {
        if (rmdir(entry->fts_accpath) < 0 && errno != ENOTEMPTY)
            warn("-delete: rmdir(%s)", entry->fts_path);
    } else {
        if (unlink(entry->fts_accpath) < 0)
            warn("-delete: unlink(%s)", entry->fts_path);
    }
...

As you can see, if it doesn't filter out dot and dot-dot, then it will reach rmdir() C function defined by POSIX's unistd.h.
Do a simple test, rmdir with dot/dot-dot argument will return -1:
printf("%d\n", rmdir(".."));

Let's take a look how POSIX describe rmdir:

If the path argument refers to a path whose final component is either
  dot or dot-dot, rmdir() shall fail.

No reason was given why shall fail.
I found rename explain some reason:

Renaming dot or dot-dot is prohibited in order to prevent cyclical
  file system paths.

Cyclical file system paths ?
I look over The C Programming Language (2nd Edition) and search for directory topic, surprisingly i found the code is similar:
if(strcmp(dp->name,".") == 0 || strcmp(dp->name,"..") == 0)
    continue;

And the comment !

Each directory always contains entries for itself, called ".", and its
  parent, ".."; these must be skipped, or the program will loop forever.

"loop forever", this is same like how rename describe it as "cyclical file system paths" above.
I slightly modify the code and to make it run in Kali Linux based on this answer:
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
#include <unistd.h>

void fsize(char *);
void dirwalk(char *, void (*fcn)(char *));

int
main(int argc, char **argv) {
    if (argc == 1)
        fsize(".");
    else
        while (--argc > 0) {
            printf("start\n");
            fsize(*++argv);
        }
    return 0;
}

void fsize(char *name) {
    struct stat stbuf;
    if (stat(name, &stbuf) == -1 )  {
        fprintf(stderr, "fsize: can't access %s\n", name);
        return;
    }
    if ((stbuf.st_mode & S_IFMT) == S_IFDIR)
        dirwalk(name, fsize);
    printf("%81d %s\n", stbuf.st_size, name);
}

#define MAX_PATH 1024
void dirwalk(char *dir, void (*fcn)(char *))
{
    char name[MAX_PATH];
    struct dirent *dp;

    DIR *dfd;

    if ((dfd = opendir(dir)) == NULL) {
            fprintf(stderr, "dirwalk: can't open %s\n", dir);
            return;
    }

    while ((dp = readdir(dfd)) != NULL) {
            sleep(1);
            printf("d_name: S%sG\n", dp->d_name);
            if (strcmp(dp->d_name, ".") == 0
                            || strcmp(dp->d_name, "..") == 0) {
                    printf("hole dot\n");
                    continue;
                    }
            if (strlen(dir)+strlen(dp->d_name)+2 > sizeof(name)) {
                    printf("mocha\n");
                    fprintf(stderr, "dirwalk: name %s/%s too long\n",
                                    dir, dp->d_name);
                    }
            else {
                    printf("ice\n");
                    (*fcn)(dp->d_name);
            }
    }
    closedir(dfd);
}

Let's see:
xb@dnxb:/test/dot$ ls -la
total 8
drwxr-xr-x 2 xiaobai xiaobai 4096 Nov 20 04:14 .
drwxr-xr-x 3 xiaobai xiaobai 4096 Nov 20 04:14 ..
xb@dnxb:/test/dot$
xb@dnxb:/test/dot$ cc /tmp/kr/fsize.c -o /tmp/kr/a.out
xb@dnxb:/test/dot$ /tmp/kr/a.out .
start
d_name: S..G
hole dot
d_name: S.G
hole dot
                                                                             4096 .
xb@dnxb:/test/dot$

It work correctly, now what if I comment out the continue instruction:
xb@dnxb:/test/dot$ cc /tmp/kr/fsize.c -o /tmp/kr/a.out
xb@dnxb:/test/dot$ /tmp/kr/a.out .
start
d_name: S..G
hole dot
ice
d_name: S..G
hole dot
ice
d_name: S..G
hole dot
ice
^C
xb@dnxb:/test/dot$

As you can see, I have to use Ctrl+C to kill this infinitely loop program.
The '..' directory read its first entry  '..' and loop forever.
Conclusion:

GNU findutils try to compatible with find utility in *BSD.
find utility in *BSD internally use rmdir POSIX-compliant C function which dot/dot-dot is not allow.
The reason of rmdir do not allow dot/dot-dot is prevent cyclical file system paths.
The C Programming Language written by K&R shows the example of how dot/dot-dot will lead to forever loop program.
Answer: Because your find command returns . as result. From the info page of rm:

Any attempt to remove a file whose last file name component is '.' or
  '..' is rejected without any prompting, as mandated by POSIX.

So, it looks like find just sticks to POSIX rules in this case.
Comment: As it should: POSIX is king, plus removing the current directory could cause some very big problems depending on the parent application and what not.  Like what if the current directory were `/var/log` and you ran that as root, thinking that it'd remove all the subdirs and it removed the current directory as well?
Comment: That's a good theory, but the `man` page for `find` says: "If the removal failed, an error message is issued." Why is no error printed?
Comment: @AlexejMagura Removing the current directory works fine in general: `mkdir foo && cd foo && rmdir $(pwd)`.  It's removing `.` (or `..`) that doesn't work.
Answer: The rmdir system call fails with EINVAL if the last component of its argument path is ".". It's documented at http://pubs.opengroup.org/onlinepubs/009695399/functions/rmdir.html
and the rationale for the behavior is:

The meaning of deleting pathname /dot is unclear, because the name of
  the file (directory) in the parent directory to be removed is not
  clear, particularly in the presence of multiple links to a directory.
Answer: Calling rmdir(".") as a system call didn't work when I tried it, so no higher level tool can succeed.
You must delete the directory through its real name not its . alias.
Answer: While 林果皞 and Thomas already gave good answers on this, I feel that their answers forgot to explain why this behaviour was implemented in the first place.
In your find . -delete example deleting the current directory sounds pretty logical and sane. But consider:
$ find . -name marti\*
./martin
./martin.jpg
[..]

Does deleting . still sound logical and sane to you?
Deleting a non-empty directory is an error – so you're unlikely to lose data with this with find (although you could with rm -r) – but your shell will have its current working directory set to a directory that no longer exist, leading to some confusing and surprising behaviour:
$ pwd
/home/martin/test
$ rm -r ../test
$ touch foo
touch: cannot touch 'foo': No such file or directory

Not deleting the current directory is simply good interface design and complies with the principle of least surprise.


I'm trying to setup my 401k with 5% match from my employer

Question: I am newbie and I need help setting up my 401k. Basically, I just want to avail my employer's maximum match, and 5% is the minimum needed to reach it. But I'm not sure if I am doing it right. Here's the screenshot of my current setting:
Comment: Does your employer employ an HR professional whose job is to explain benefits and systems to staff?  If there is any concern they are in a better position to confirm your status in the plan than a stranger on the Internet.
Comment: This is a UI question, not a financial question.
Comment: It would appear that you are indeed setting up your account to contribute 5% of your salary. You are setting it up for a traditional 401(k), right? (as opposed to a Roth)
Comment: Are you simply concerned about getting the entire match, or do you have a question about the pre-tax/post-tax slider?
Answer: Based on the numbers on the screen, it looks like your income is in the range of $9,325 to $37,950 per year. This puts you in the 15% tax bracket. I personally would recommend you move the slider all the way to the right and put your entire contribution into the 401K Roth (so you'll have 0% pre tax and 100% post tax.) The reasoning here is that you'll pay the 15% tax now which is on the low side, but you'll never pay tax on the money's growth for the rest of your life, including when you take it out at retirement. If you do this your take home will be approximately $9 less per paycheck (or a little higher depending on your state income tax).
Note that the company match will go into a traditional 401K so you'll likely see two separate accounts on your 401K statements.
The choice to go with traditional vs roth 401k is complicated and there are many variables. As a rule of thumb, the lower your current tax rate, the more likely you should be to lean towards the roth. Some exceptions might be if you are close to retirement age and you don't have much saved for retirement, or if you live in a state with a high income tax rate and you don't think you'll still live there when you retire, or if you are living paycheck to paycheck and the slight difference in take home pay would make a difference to you.
Comment: Should also mention some of the other ROTH benefits. To me, important ones are no RMDs when you retire, and the ability to withdraw your contributions without tax penalty if they've been in the account for at least 5 years.
Comment: @davmp - good points!
Answer: I've never used your employer's website before, but it looks right to me. You have chosen to contribute 5% of your salary to your 401(k), which should give you the full employer match.
If you are still unsure, you can ask your HR department.
If there is anything else that you are confused about, feel free to ask another question.
Answer: Just be careful about the wording of the company matching. Many places will have matching along the lines up "We'll match 50% of your contributions, up to 10% of your salary." So in order to get 5% from your employer you need to put in 10% of your salary.
If they just say something like "We match up to 5% of your salary" It could mean you put in 5%, they give you 5%. Or it could mean what I have above.
EDIT: fixed wording
Answer: Supposedly your employer will match 5% of your salary. That's 5% from January or your start date.  If that was some time ago, you want to max as much as you can to catch up and capture all that you're entitled to.  Once you've caught up, throttle it back to 5%.  Don't average it out to the end of the year, you might change jobs!
They are also letting you blend between a standard and Roth 401K.  Research this yourself, but I think for your age and tax bracket, there will be one very correct answer (probably Roth).  Go all-in with that. That blending feature is silly, you don't want two 401K accounts if it's not necessary.  Not least, two maintenance fees.
I did not listen to this advice either lol, but if you are young, put every dollar you possibly can into a 401k, especially if it is Roth.  If I had it to do again, I would eat ramen and live in my car if I had to.  Every dollar you deposit at age 25 could turn into $30 or more by age 75.  Your salary will go up in those years, but not by 30x.  Money a young person puts into a Roth is the highest salary he will ever make in his life, by far.
And never take money out of a 401k no matter how dire your straits.  A 401k is a trust fund, and nobody can touch it.  Even if you are sued, even if you are forced into bankruptcy, the 401K glides above all, untouchable and secure.  Creditors know this and will often bully you into voluntarily cashing out your 401K.  This is a con job, they have no right to the money.


Can a running kernel be protected by underlying rings, BIOS etc?

Question: I mostly found examples the other way around: compromising the OS e.g. through a compromised BIOS or Intel ME.
But are there known examples where stuff runs underneath the kernel and can be used to protect it or the OS in general?
Regarding ring -1/ hypervisor mode I found some examples but could not really find anything else.
I'm not thinking about SecureBoot et al but more about exploit protection of a running kernel.
Answer: Yes, with varying degrees of success. Of these, only the first two are commonly used in production:

RKP (Real-time Kernel Protection) from Samsung Knox, which blocks unauthorized access or modification to kernel code by userspace, and monitors sensitive credentials in the kernel.
KDP, a Microsoft technology using a set of hypervisor-based features called VBS.
Various experimental hypervisors based on BitVisor, such as SecVisor, with varying goals.
Cappsule by Quarkslab, which runs a CoW copy of the kernel for each spawned process.
McAfee DeepSAFE, a hypervisor that provides a tamper-resistant view of system events.
Co-processor-based integrity protection such as the experimental Copilot.
VBH, an experimental and out-of-tree Linux hardening patch similar to Microsoft's KDP.

I believe there was also some short-lived custom Intel ME module ("ring -3") which was designed for similar purposes, but I forget the name. SMM ("ring -2") could also theoretically be used for integrity, depending on what events can trigger a SMI (System Management Interrupt). Note that these are not "true" protection rings, as I explained in greater detail in another answer.
Comment: Sony and geohot would disagree...
Comment: @ThoriumBR Most of these are not particularly effective (hence "with varying degrees of success"). I'm just listing some of the attempts, regardless of how easily they can be bypassed.
Answer: You're very vague. Narrow it down: which OS? Which processor protections?
ATTACKER'S PERSPECTIVE
If you're speaking Linux, you can use the kernel to subvert the kernel (insmod a kernel module).
Windows is a little less straightforward depending on platform (x64 requires signed drivers, etc.).
Depending on the hardware, Rowhammer, etc. could be used.
DEFENDER'S PERSPECTIVE
Windows: from low level up, most AVs drop drivers to perform I/O Request Packet (IRP) hooking, rewrite/install or hook their own System Service Dispatch Table (SSDT), manipulate the Intterupt Descriptor Table (IDT), or even manipulate all processes' Import Address Tables (IATs), etc.:
https://www.amazon.com/Rootkits-Subverting-Windows-Greg-Hoglund/dp/0321294319
You can even view this with the gmer AV tool:
http://www.gmer.net/
Linux: I'm not too familiar with RE on Linux, only OSX. However, there may be some merit in a formally verified kernel, e.g. SeL4:
https://wiki.sel4.systems/FrequentlyAskedQuestions
Answer: I don't think it's possible to protect any layer from the layer bellow it, no matter how much you spend protecting it.
Take the Playstation 3 platform, for example. There were several layers of protection, from the boot ROM inside the chip to the code signing, everything was meant to resist attacks from hardware AND software. It took a while, but hackers started to break the security of the PS3  by using a memory corruption glitch.
The kernel can have routines to detect unauthorized changed memory, but an attacker can patch the routines to always return false. Functions can be signed, but the signature can be forged. Digital signatures depending on public key signatures can only protect themselves until the signatures are changed.
Comment: I looked into this a little and I can't see anything that suggests that the PlayStation 3 used a hypervisor or similar hardware abstractions for security. Do you have any references which suggest that their kernel is actively monitored by some lower-level software?
Comment: What about https://www.psdevwiki.com/ps3/Hypervisor_Reverse_Engineering or https://rdist.root.org/2010/01/27/how-the-ps3-hypervisor-was-hacked/ ?
Comment: I thought the PS3 hypervisor was only used for things like Linux guest OSes and that's why guest OSes weren't able to access the GPU. Did the hypervisor also run the main PS3 software as well?


YouTube - don't display context menu on right click

Question: The idea: seek YouTube video by dragging and dropping on the video player with right button (e.g. 1 second for every 2% of screen width). So on a 1920x1080 screen, if I press the right mouse button, drag it some 384px (20%) to the left and then release it, the video should rewind by 10 seconds.
I have a GreaseMonkey script which does pretty much what I want, but the context menu still pops up when I release the button. This is not the default context menu, but YouTube's custom context menu, which is presumably somewhere somehow bound to the mouseup event. I want to get rid of this menu, and I also want to prevent the default context menu from opening.
Is there a way I can change default actions on mouse events? I want to keep all other actions (left click, keyboard actions, etc.). I have not found a way to remove event handlers on an element for a specific event.
<code>if (window.top === window.self) {
  // YT video cannot be manipulated from the scope in which GM is running
  // so we add a <script> element in the document to make it work
  addJsNode(installListeners)
}

function installListeners() {

  const FACTOR = screen.width / 70

  const mp = document.getElementById('movie_player')

  let startpos

  mp.onmousedown = (e) => {
    // only using FF so cross-browser compatibility is not required
    if (e.button == 2) { startpos = e.clientX }
  }

  mp.onmouseup = (e) => {
    if (e.button == 2) {
        //===> somehow prevent YT from displaying context menu
        const diff = e.clientX - startpos
        mp.seekBy(diff / FACTOR)
    }
  }

}

function addJsNode(func) {
  var scriptNode = document.createElement('script')
  scriptNode.type = 'text/javascript'
    scriptNode.textContent = '('+func.toString()+')()'

  var target = document.getElementsByTagName ('head')[0] ||
                        document.body || document.documentElement

  target.appendChild(scriptNode)
}
</code>
Answer: you could remove the element with remove() method. you would need class name for the element which you can find with help of inspect facility or view page source


Launch iTunes and iPhoto when external USB drive is connected

Question: Is there a code that I can just copy an paste into Terminal or Automator? If not what is the best Application to download?
Answer: You can do that very easily using ControlPlane, a free (open-source) application:

ControlPlane, a fork of MarcoPolo, brings context and location sensitive awareness to OS X. With ControlPlane you can intelligently reconfigure your Mac or perform any number of actions based on input from a wide variety of evidence sources [...]

from: https://github.com/dustinrue/ControlPlane
It's very easy to set-up. You define a "context", select a rule (or multiple rules):

And link an action to it:


If the iphone gets stolen, if i wipe all the information from the iphone from my icloud account it can be usable?

Question: Lets assume that my iphone 5c gets stolen. If the person who has the icloud account wipe all the data (they dont block the phone just wiped) will it be able to get the factory definitons like its a new phone? so if the thief activated the phone we will not get asked by the icloud account password and id?
Answer: If your iPhone is stolen and has FindMyiPhone turned on the thief would need your iCloud password in order to disable it. The thief could wipe the phone by putting it into DFU mode, but upon trying to access the phone they would run into the problem of still having to input the iCloud password into the phone so that they are able to access it as it is still registered in Apple's data base as being connected to your account.
So yes the phone can be made to go back to its original state by recovery, but no it will not be able to be activated as long as they do not have your iCloud password.


Use Google Maps maps in Maverick

Question: How can I save Google Maps tiles so I can use them in Maverick offline?
I tried Mobile Atlas Creator, but it seems it does not have Google Map as a map source.
Comment: @AlEverett Probably this one: http://codesector.com/maverick
Comment: What's "Maverick"?
Answer: Install MapsOn by coderminus.
Go to Menu > More > Preferences > Configure Maps and set /sdcard/maverick/tiles/Google/ or /storage/sdcard0/maverick/tiles/Google/ as the path for the tiles of Google Maps. Now you can use the "Cache area" feature of MapsOn to download the tiles of selected areas.
Since they are stored in the Maverick folder, they are used by Maverick if you select "Google" as the map source. This also works for other map sources if you adapt the corresponding paths in MapsOn.
Comment: @Naranyanan: MapsOn allows to download multiple zoom levels (that's exactly what "Cache area" is for). It has (in my opinion) the huge advantage that you do *not* need a PC, from which the tiles still have to be transferred to the phone. Rather the tiles are readily available and one can also download missing tiles on the go. Finally, download is usually surprisingly fast and reliable, even for large areas. I, at least, had many more problems with MOBAC, which I also found inconvenient to handle - partially because of the transfer to the phone. Therefore I stopped using it.
Answer: MOBile Atlas Creator (MOBAC) has support for Google Maps till 1.9Beta (the last stable version is 1.8).
It can be downloaded from here.
Using MOBAC instead of MapsOn has the following significant advantages.

Since the download happens in the computer rather in phone, large area downloads are quite possible.
Multiple zoom levels can be downloaded and even multiple maps (like Google Terrain in one and regular Google Maps in other) can be stored in layers. See this answer for more info.

Use Google Maps maps in Maverick


Game Engine lags when activating sound with keyboard

Question: I have a basic character set up in an FPS style game I am building. When the player presses W to move forward, I want the game engine to play a walking sound. However, when I link the W keyboard sensor to the sound actuator, anytime I press W in game there is a spike for Logic on the profiler and the game lags a couple milliseconds. My audio file is an mp3, but it does this with WAVs as well. Thoughts?
Answer: From what it seems to me, you have a Keyboard Sensor stringed to a And Controller stringed to a Sound Actuator.  When in this setup the game will always lag for this reason: when a keyboard key is held, it sends many pulses per second to the computer to act as input.  If you have something like a Motion Actuator, then this isn't a problem, as it just makes it move forward continuously.  However, with your Sound Actuator, what it's trying to do instead is to start playing the sound file every time it receives a pulse (which by default is 60 times per second).  So in effect every frame the key is held it tries to play the sound, which is more than the game engine can handle, and as such it slows down.
Now, a setup that doesn't have the sound playing 60 times at once is as follows
[WARNING: TECHNICAL JARGON AHEAD!]:
First delete the malfunctioning sound actuator part you set up.
Use a different Keyboard Sensor than the one controlling the movement of your character,  but assign it the same key (W).  Click the <code>'''</code> icon on the sensor to darken it, then in the frequency box, enter in a number other than zero (the basis of this number is how many frames is in between pulses, for example if you put in 29, then there will be 29 pulse-lengths between every pulse sent to the computer, making the sensor do 2 per second at 60 frames per second.  The larger the number the more time in between pulses.)  See this page on Sensor Common Options for a little more of an in-depth look on this function.
Then add your And Controller and a Sound Actuator set to use your sound.  If everything goes correctly, you should have some evenly-spaced footstep sounds with no lag.
If this was good, consider upvoting! :)
Comment: Personally, I don't see the word "buffering" mentioned at all in your post.


How to make Ysolda ride horse (Horses for followers mod)?

Question: I use Horses for followers mod, it works great, tried with Lydia.
Now I made Ysolda my follower (she's a non-follower NPC in Whiterun) and she doesn't want to ride her horse.
What can be the difference between Ysolda and Lydia? Anybody can tell me what to change?
Comment: If the mod is only for followers, and Ysolda isn't a follower, perhaps that's the problem?
Answer: AFAIK, Horses for followers mod works only for vanilla followers, meaning if you make any NPC that isn't a follower become your follower or adding additional follower into the game, this mod will not work.
Source: Experience. Installed mod and Dawnguard DLC. Serena won't ride horse with me :(
Comment: I think you should try it again with Serana, use the "Bill of sale" to change the ownership to follower, maybe that helps. And try mounting on your horse, than moving around her horse a little bit.
Answer: Turns out this actually works with Ysolda =)
It just took time for her to get on the horse for the first time, but now it works great with my v1.8.x.x copy of Skyrim.
Answer: I had this problem as well. What you usually need to do is go to a stablemaster and choose the "I want to buy a horse for my companion" option. Then, get on your horse and move a little bit aways, and the npc should get up on the horse as long as he/she is a follower. Sometimes the npc takes its' time thinking if it wants to mount, but should after a little bit.


How to port Maemo 5 to custom embedded device?

Question: I want to port Maemo 5 to custom embedded device ( ARM9 450 Mhz running Embedded Linux), Is it possible? Where can I find source code?
Answer: The source code is here:
http://maemo.org/development/sources/
As for porting it to a new platform, you should download the code and see if you can compile it. It targets ARM systems so at least you have a chance.
Answer: if your platform doesn't have enough hardware features, it might "be possible but not practical" - N900 has TI OMAP3 chip inside; which in turn has graphical accelerator from Imagination Technologies; which in turn makes a lot of mundane graphical things; so if yours ARM9 450 Mhz doesn't have enough capabilities in hardware, it might spent almost whole CPU power into emulating low-level things. So you can start porting but it might turn impractical after a lot of effort is done.


Software for video subscription service

Question: I'd like to sell instructional videos over the web.  Primarily, I'd like uses to subscribe to the site and be allowed access to videos over the internet.  Secondarily, I might sell DVDs for those who have poor internet connections or would like a physical copy, or possibly I'd sell eBooks and the like in the future.
Regarding the subscriptions:

I'd like a system that automatically sends out e-mails when it is time to renew
I'd like to be able to offer free trials
Users without a free trial or subscription should not be able to access the content

Incidentally, I plan to host videos on my current web host and move them to a CDN when volume (and capital) make this a good idea.  While I have no intention to go crazy with the DRM, it seems expedient not to directly link to the files -- how can I link to them indirectly?

It would be nice to support multiple payment processors -- specifically, I'd like to avoid a PayPal only approach.

Are there any web applications (or plugins) you'd recommend for something like this?  While I've set up and administered several web technologies, I've never done anything with e-commerce.  I see there are possibilities like osCommerce, one friend recommends using WordPress with plugins, and it really appears that for any given CMS, you can graft on components like this, although I imagine that not all are created equal.
As I'm not tied to a particular web application (and, while open source software that can run on a LAMP [p=perl, python, php] stack is preferable), I'd like to make a good choice at the beginning.
Comment: Did the plugin work for you?
Comment: @Christopher - I'm afraid that project has been put on hold and I've been too busy to try it.  It sure sounds promising.
Answer: If you can run wordpress, I would recommend you get wp eStore plugin. It does pretty much all the things you want. Check out the demo tutorials.

Software for video subscription service


How to convert string to int in processing

Question: I am trying to make a hands free mouse using Arduino IDE and Processing IDE. I don't have a problem with serializing the code and converting to string, but when I try and convert the serial string into int the int goes to 0. I have tried to trim it and used integer.parseInt but it still gives me the error:
NumberFormatException : For input String:"".

Here is my code:
import processing.serial.*;
import java.awt.event.KeyListener;
import java.awt.Robot;

Serial myPort;  // Create object from Serial class
Robot robot;
String val;     // Data received from the serial port
boolean valtrue;
int xy = 0;
int x=0;

void setup()
{
    String portName = Serial.list()[3];
    myPort = new Serial(this, portName, 9600);
    myPort.bufferUntil('.');
    try {
        robot = new Robot();
    }
    catch (Exception e) {
        e.printStackTrace();
    }
}
void draw() {
    //reading serial port until \n
    String sensorValue = myPort.readStringUntil('\n');
    if (sensorValue != null) {
        int value = Integer.parseInt(sensorValue.trim());
        println(value);
    }
}

If anyone is able to help, please answer.
Answer: Processing has an int() function that you can use instead of Integer.parseInt(). Behind the scenes the int() function is calling the Integer.parseInt() function, but it's shorter. Up to you.
But your error says it all: you're passing an empty String value "" into the parseInt() function. An empty String value can't be turned into a number, so you get the exception.
You're going to have to track down why your String value is empty, but that's what's causing this particular error. I will point out that the draw() function is called 60 times per second, and you're trying to read from your port every single time, so maybe you're reading faster than you're writing?


Can you take Gorrilla Glue in Hold Luggage on a plane?

Question: Is glue something that is usually excluded from hold luggage on flights? Its a handy thing to have and I'm considering taking a 60ml tube of Gorilla glue with me.
Comment: From where to where? Which airline?
Answer: Generally, IF they are banned in your country, it's because they're flammable.
For example, the summary on the TSA page lists all sorts of items not allowed in carry-on OR checked luggage, but doesn't specifically mention glue, but not everything is regulated by the TSA as mentioned on the same page:
"There are other hazardous materials that are regulated by the FAA".
So we go to the FAA site on travelling with hazardous materials which mentions that for 'some super glues' under 'adhesives, flammable' are not allowed in either carry-on or checked luggage.  'Some'? We click the 'More details' link and get:

Most model glues, rubber cements, and industrial-strength adhesives
  are flammable and not allowed in carry-on or checked baggage.
Some super glues and other household glues are not flammable and would
  be allowed in baggage. To see if they are flammable, check the product
  label or the manufacturer's material safety data sheet (MSDS). When
  checking the MSDS, a "flash point" at or below 140 F (60° C) indicates
  it is a flammable liquid and may not be carried in airline baggage.

There's your problem, Gorilla Glue is Flammable.
Their SDS (Safety Data Sheet)
specifically lists it as '2 - moderate flammability'.
So unfortunately, since most airlines don't like you taking flammable substances onboard, they're unlikely to let you take that one - and you also have to declare it in most flights ('are you carrying any flammable items?') .
Comment: I like it when an answer not only gives the solution, but also tells me how I could have figured it out.
Comment: @MarkMayo I think you've misread the MSDS (or they've updated it since you posted this), the flammability is rated as "1", slight: `NFPA: Health – 2, Flammability – 1, Reactivity – 1` with a flash point well over the 60C threshold: `Flash point .. . >250°C`
Comment: @Johnny, yeah looks like an update :/
Answer: The TSA tool to search for prohibited items yields the following result when searching for glue:

Search Results For: glue
Special Instructions
You may carry liquids, gels and aerosols in your carry-on bags only if they adhere to the 3-1-1 rule: containers must be 3.4 ounces or less; stored in a 1 quart/liter zip-top bag; 1 zip-top bag per person, placed in the screening bin. Larger amounts of non-medicinal liquids, gels, and aerosols must be placed in checked baggage.
Medically required liquids, such as baby formula and food, breast milk and medications are allowed in excess of 3.4 ounces in reasonable quantities for the flight. It is not necessary to place medically required liquids in a zip-top bag. However, you must tell the Transportation Security Officer that you have medically necessary liquids at the beginning of the screening checkpoint process. Medically required liquids will be subjected to additional screening that could include being asked to open the container. We recommend, but do not require, that medication be labeled to facilitate the security process. Many airports have designated lanes for families and individuals with items requiring additional assistance with screening.
You may purchase beverages after the security checkpoint and take them on the plane, as they have been previously screened. You may also take empty drink containers through the checkpoint and fill them afterward.
If the liquid is considered a hazardous material that is permitted onboard an aircraft, it is still subject to the 3-1-1 limitations. Many questions arise on whether an item is hazardous material and what requirements must be met to take it on an aircraft. The Pipeline Hazardous Material Safety Administration (PHMSA) at 1-800-467-4922 or the aircraft operator on which you are flying can assist you with your questions concerning hazardous material.
Even if an item is generally permitted, it may be subject to additional screening or not allowed through the checkpoint if it triggers an alarm during the screening process, appears to have been tampered with, or poses other security concerns. The final decision rests with TSA on whether to allow any items on the plane.

This is the standard answer for items subject to the 3-1-1 rule. It would therefore seem that glue should be allowed, provided the container size respects this rule. However if you want to make sure that glue is not considered dangerous material, you can try contacting The Pipeline Hazardous Material Safety Administration (PHMSA) at 1-800-467-4922 or the aircraft operator on which you are flying as TSA suggests.
Comment: Also note that flammable glues aren't covered under TSA, but by FAA regulations.  They're not the only source :/


Audio drift issue

Question: Some friends and I have started a weekly podcast, and have decided to add video to it, currently we are using Audacity to record audio and an SX30IS powershot to record video. When I place both of the files in my editing program and sync the audio track to the video, the audio and video are sync perfectly at the beginning but are off by ~4secs at the end of the 20 min video, any idea what is causing this and how to fix it?
Answer: Yes. I can tell you exactly what is wrong.
Your synch is off because the frame rate you 'think' you are recording, isn't the frame rate you are editing at. Consequently when you lay in the audio, it loses synch.
Specs of this camera say that it will record at '30fps' but it is highly likely you are actually shooting at a non-integer frame rate of 29.97fps, consequently you need to adjust the frame rate in the timeline to suit. This will more than likely be the case if you have the video mode set to 'NTSC' anywhere in the camera.
It might also be worth confirming the real frame rate using Quicktime player and checking in the movie inspector.
Pull-up/pull-down issues are almost always caused by a frame-rate imbalance.
If you are unable to adjust the frame-rate to correct this, you can use a pull-up/pull-down timeshift to fix the issue. If the issue is simply an integer to non-integer frame rate issue, a timeshift of 0.1% should do it.
Comment: That does indeed appear to be the problem. However, I can't seem to find a program that would do such a shift. Are there any free tools to achieve the desired shift?
Comment: What video editor are you using?
Comment: My first port of call would be to alter the project timeline frame rate in the vision editor prior to conforming the production audio into the timeline. Keep the audio at the same rate, but conform the vision to the correct frame rate.
Comment: Lightworks, although i am open to using another one if it allows this type of transformation.
Comment: I was able to resolve the issue, Thanks for the help!

Audio drift issue


How can I smooth out my textured bathtub?

Question: We have a textured bath-tub, we want to remove the texture (because it's fading and it's easy to slip on, but because of the texture bath mats don't stay on). We're considering re-glazing it, and are wondering if that will work, or if there are any others ways to remove the texture.
Comment: This question can be answered with either "yes" or "no". As a longtime member of this community, I'd suggest changing it to something like, "How can I smooth out my textured bathtub?" You can say in the body of the question that you are consider re-glazing it, but community members might offer you some simpler solutions and ideas you hadn't thought of!
Comment: You could try sanding it.
Answer: Well, I can think of 3 solutions, none of them is really perfect.

Buy new bathtub without texture. No comments, everything should be clear.
Re-glaze it (as you already mentioned). Results are better if operation is done by an experienced person.
Un-texture it. Actually, this is polishing it to an acceptable level.

For number 3, it may or it may not work. First condition: how thick is the current texture. Does it allow for some polishing (to the level desired)? If no, then that's it, option 3 is out of question.
If yes, the same polishing procedure as used for cars can be used. I cannot think of a reason why a car-polish procedure would not work for the bathtub. Again, someone with experience may produce a better result.


Lambda Calculus Evaluation

Question: I know this is a simple question but can someone show me how
$(\lambda y. \lambda x. \lambda y.y) (\lambda x. \lambda y. y)$ reduces to $\lambda x. \lambda y. y$.
Comment: Are you sure you parenthesized this correctly? Because the way it's written, I don't see how it can be simplified at all. If it was `(λy.λx.λy.y) (λx.λy.y)`, it'd reduce to `λx.λy.y`.
Comment: Yes thanks I updated my question. Could you explain how you got λx.λy.y
Answer: The reason that $(\lambda y. \lambda x. \lambda y.y) (\lambda x. \lambda y. y)$ reduces to $\lambda x. \lambda y. y$ and not to $\lambda x. \lambda y.\lambda x.\lambda y.y$ is that the $y$ in the body of $\lambda y.\lambda x.\lambda y.y$ refers to the argument of the third lambda, not the first.
If you rename the arguments to have distinct names, $\lambda y.\lambda x.\lambda y.y$ would be written as $\lambda y_1.\lambda x.\lambda y_2.y_2$. So if you apply that function to the argument, that means that every occurrence of $y_1$ in $\lambda x.\lambda y_2.y_2$ should be replaced with the argument. However $y_1$ does not appear at all in that expression, so the argument is simply ignored and the result is just $\lambda x.\lambda y_2.y_2$.
Comment: @prerm2686 A variable is always bound by the closest encompassing $\lambda$. The subterm $\lambda y.y$ is the identity function, no matter where you use it, even if you use it in a context that also uses the variable name $y$.
Comment: Oh ok so the y2 is not bound to y1. Thank you very much.
Comment: [Reduction on wikipedia](http://en.wikipedia.org/wiki/Lambda_calculus#Reduction) gives a more formal treatment of α-conversion and β-reduction. A reference I like is [Chris Hankin's book](http://www.amazon.co.uk/Introduction-Lambda-Calculi-Computer-Scientists/dp/0954300653)

Lambda Calculus Evaluation


Exporting Blender bones

Question: I wrote an exporter for blender models that works great for meshes. I'm attempting to extend that to bones defined in blender. However I haven't found good information for exporting bone data. How can I access bone data? I'd like access all the vertices that the bone affects, the weight of each vertex and the matrix. Do I need to export anything else for skeletal animation and dynamic dismemberment?
Comment: I'd reply but my suggestions suck (not happy with them, and not at all transferrable), and I was hoping you'd get a good answer. I currently do the rigging in my game, and just export with a .obj, all my animation is procedural. I started off trying to read from a Collada export but it's a horrible, horrible format.  Let me know if you have luck with writing the python exporter.
Answer: @Michael directed me to an excellent resource for exporting bones from Blender. It provides all the information I needed. It's actually already built into Blender, it's the DirectX Model Format.
Go to user preferences, addon section, "Import-Export" category and install "DirectX Model Format (.x)". Then use File->Export to select the newly added format.
This format exports not only the mesh information (vertices, triangles, quads, textures, etc), but also exports armature information, including the armature structure (parent/child relationships), transform matrices, which vertices are included in each bone and even the bone weights for each vertex. Animation sequences are exported too.
All in a human readable ASCII format, so it's easy to write an importer. Beautiful.
Comment: thanks a lot, but are bounding boxes also exported by that exporter
Comment: @MartinErhardt You'll have to clarify what "that exporter" is. The .x format does not export bounding boxes.
Answer: My suggestion is honestly just to find a format that Blender will export its bones as well, and then look through the script of that format exporter. I was doing something similar and realized how much of a pain it was to find a good resource on exporting bones.
But here's this specification that helped me a lot, on armature modules
Comment: Looks like I may be on to something. Since Blender uses vertex groups to define the groups for bones, I can just find the vertex group with the same name as the bone, and I've found all the vertices that belong to that bone.
Comment: Neat, that looks like it has some of what I need. However, it doesn't have a list of the vertices the bone encompasses or the weight of those vertices. I see that it has a bool to show that a bone uses vertexgroups, but I don't see how to access that information. It seems that Blender must be able to export that data. Anyone know how to get to it?
Answer: The IQM (Inter-Quake Model) format has a set of Blender exporters that will export skinned meshes with blend weights and the armature. Look to http://lee.fov120.com/iqm/ for documentation and code. You could also look at the Doom 3 format MD5 exporters.
Comment: Thanks @ccxvii, the link you provided was really useful.

Exporting Blender bones


Error on cabal build - Encounterd missing dependesies

Question: I followed the instructions on lecture one - part 3 and I was trying to start week 1 project.
When I run cabal build got the following error:
[nix-shell:~/plutus-pioneer-program/code/week01]$ sudo cabal build
<code>Warning: The build command is a part of the legacy v1 style of cabal usage.

Please switch to using either the new project style and the new-build command
or the legacy v1-build alias as new-style projects will become the default in
the next version of cabal-install. Please file a bug if you cannot replicate a
working v1- use case with the new-style commands.

For more information, see: https://wiki.haskell.org/Cabal/NewBuild

Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
[__0] trying: plutus-pioneer-program-week01-0.1.0.0 (user goal)
[__1] next goal: base (dependency of plutus-pioneer-program-week01)
[__1] rejecting: base-188.8.131.52/installed-4.1... (conflict:
plutus-pioneer-program-week01 => base^>=184.108.40.206)
[__1] fail (backjumping, conflict set: base, plutus-pioneer-program-week01)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: plutus-pioneer-program-week01, base
Trying configure anyway.
Configuring plutus-pioneer-program-week01-0.1.0.0...
cabal: Encountered missing dependencies:
aeson -any,
base >=220.127.116.11 && <4.15,
data-default -any,
playground-common -any,
plutus-contract -any,
plutus-ledger -any,
plutus-ledger-constraints -any,
plutus-tx -any,
plutus-tx-plugin -any
</code>
Could not resolve dependencies and cabal: Encountered missing dependencies is the errors here as far I can understand. I tried again by running cabal update and then cabal build but again I get the same error(s) that I described above. Any ideas? What am I doing wrong?
Answer: try "cabal update" before "cabal build".
Comment: I tried it and it still does not work. Thanks anyway.
Answer: Why are you using sudo? Try without.
And update of course.
Comment: If I don't I get an access denied error. I tried with update and it does not work.
Answer: Check and make sure that your version of the repo has the correct commit-id.


Why divide by ask rate to get the spread?

Question: I want to know why when we calculate the spread equation, that is the difference between ask rate and bid rate divided by ask rate, why can't we divide by bid rate?
Answer: Mathematically it's arbitrary - you could just as easily use the bid or the midpoint as the denominator, so long as you're consistent when comparing securities.  So there's not a fundamental reason to use the ask.
The best argument I can come up with is that most analysis is done from the buy side, so looking at liquidity costs (meaning how much does the value drop instantaneously purely because of the bid-ask spread) when you buy a security would be more relevant by using the ask (purchase price) as the basis.
Meaning, if a stock has a bid-ask range of $95-$100, if you buy the stock at $100 (the ask), you immediately "lose" 5% (5/100) of its value since you can only sell it for $95.
Comment: Your last paragraph is spot on. My wife does arbitrage (with antiques) and we often here people say something like "well, everything has a price!!" What they fail to realize is everything has *two* prices - one you buy at, and one you sell at, and if you haven't thought about what both of them are going to be, you're in for a world of hurt.


Does the amortizing payment on a loan depend on whether interest is calculated daily or monthly?

Question: Assume two banks offer a $100,000 mortgage at 6% annual interest for 30 years with payments due monthly.  One bank assumes each month has 30 days.  The other bank uses the actual number of days in each month.  Is the amortizing payment different for the two loans?  If so, what is the difference in how the payment is calculated?
Answer: I'm not aware of any loan product that has interest calculated on actual days in a month. If they did that you would have 4 different interest amounts, one for each month that has 31,30,29, and 28 days. Of course as soon as I say that someone will point out a case where it happens.
If it did exist yes the interest amount and likely payments would be different for each. Though even if the interest were different each month the payment could still be evened out to be the same every month.
Comment: They're called daily simple interest mortgages https://www.investopedia.com/terms/s/simple_interest_mortgage.asp
Comment: @user348514 just because something exists, doesn't mean it's what you will actually ever be offered one.  Do simple interest car loans exist, sure; can you get one from Mercedes? no.
Comment: That's exactly how my loans from the Commonwealth Bank and National Australia Bank work (those are two of the "big four" banks in Australia).  My monthly interest transaction on the loan was less at the end of a shorter month, and more at the end of a longer month.  And if I made a repayment of principal during the month, interest was calculated on the lower loan amount from that date, reducing the interest bill compared to the previous month.


Are body parts like thighs, hips etc. considered private parts too?

Question: When we use the phrase 'private parts' do we refer to 'thighs' also or this phrase only refers to parts like urinary organ, hips, etc?
Answer: Private parts is an euphemism for genitals.

(plural noun) euphemistic:
  A person's genitals.

Which are:

the sexual organs; the testicles and penis of a male or the labia, clitoris, and vagina of a female.

Private parts may also include the anus, perineum, pubic-area, nipples and possibly breasts - depending on the person speaking.

The phrase is also sometimes shortened to just privates.

This means that the thighs and hips are not commonly included in the meaning of the phrase.
If referring to wanting to keep these other areas covered, a general phrase in common use is:

Not wanting to show too much skin

Which implies wearing clothing that covers areas such as the hips, thighs, legs, shoulders and chest (depending on which areas the person considered private to them).
Comment: I think you could make your statement in italics stronger; other than extra-aureolar breasts and male nipples, everything you mention is almost certainly going to be included in "private parts" throughout most of the English-speaking world.
Comment: Essentially everything covered by swimwear is private. Nothing more, and probably nothing less.
Comment: I would disagree--I've never seen male swimwear that didn't cover considerably more than just the private areas.  Even a Speedo does--men have no equivalent of the string bikini.
Comment: @LorenPechtel - Male thong. It can be (and sometimes is) sold and used as swimwear. Google at your own risk. Also the so-called "mankini."
Comment: @Obie2.0 I never realized the mankini was a real product as opposed to a custom-made spoof.
Answer: In the English-language children's book "Your Body Belongs To You", the term "private parts" is described as being "all those parts covered by your bathing suit".
This is a simple, broad definition to which we all can relate. It also respects the culture in which someone lives. Which I think matters, particularly for women. Compare for example bathing in Cleopatra's Bath in Egypt, vs the sunny shores of Perth, Australia.
So, to your question,

does it include thighs and hips

I'd say: it depends. Gender, culture, and personal preference define what's private and what's not, and you need to consider the nuances when using this term.
Comment: And period specific... *Aww c'mon, show me some ankle!*
Comment: This is actually the *only* correct answer here. All other answers are Western culture specific, and particularly US specific.
Comment: "*I'd say: it depends.*"  And context.  Thighs aren't "private", but it doesn't mean you can just start feeling someone else's thighs.
Comment: I'm not sure we can all relate to it. It would be totally incomprehensible to a 5-year old who is used to running around naked, as many 5-year olds do in many countries of the world when the weather is warm enough.
Answer: The expression private parts only refers to a person's genitalia. That would typically be the penis in the case of a male and the vulva in the case of a female. This means that other body parts such as thighs, hips etc. are not considered private parts. They are body parts, but not private. Private parts are supposed to be completely private. That is, no one should see them when you're in public. For example, when you're at the beach, are the people there generally able to see your thighs and hips? I would think so. But they're not able to see your private parts because they're hidden under the swimming trunks that you're wearing.
Comment: @MaskedMan: In the locker room, *maybe*.  In the gym itself, not a chance.
Comment: I have never seen a gym where people walk around completely naked. I don't think there are places like that in the U.S. or anywhere else in the world for that matter.
Comment: Isn't it pretty common for people to walk around naked in gyms in the US? Given that a gym is more or less a public place, doesn't that mean there are no private parts?
Comment: I'm sorry, but I don't understand your question.
Comment: You said private parts are those parts that no one should see in public. Since being completely naked is acceptable in at least one public place, does that mean there are no private parts, at least in the US?
Comment: Well, I don't really know about it first hand, but one of my American friends (from Texas, if that matters) told me it is pretty usual for people to walk around naked in the gym there. No, it doesn't mean people just open the door and start stripping. At the end of the workout, when they get ready for a bath, they usually don't care about being naked while waiting for their turn or for their body to "cool down" or whatever.