Are gyroscopes the only way to maintain the orientation?

Question: Gyroscope is quite popular, one can even find it in iphone etc. But, is such
Gyroscope the only way? are there any other ways to build machine that to measure or maintain the orientation?
Comment: The iPhone has accelerometers, not a gyroscope, despite what Apple may call it.
Comment: Gravitometer?  It depends a bit on what your desired reference orientation frame is.
Comment: But there is something else in phones, possibly strain meters, which are used by apps to display a "level" bubble, e.g.
Comment: @garyp At least according to [wiki](http://en.wikipedia.org/wiki/IPhone_4#Gyroscope_and_accelerometer) an iphone has both an accelerometer *and* a gyroscope, specifically a [MEMS gyroscope](http://en.wikipedia.org/wiki/Vibrating_structure_gyroscope#MEMS_gyroscopes).
Comment: @athos - The title and body of this question are in disagreement. The problem is the word "maintain". I suspect this should instead be "determine", but I'm leery of editing the question in case you (athos) truly did mean "maintain". "Maintaining" orientation means correcting any errors between desired and actual orientation. "Determining" orientation means assessing the way in which some object is oriented.
Answer: No, they are not.
An example is the Solar and Heliospheric Observatory (SOHO) spacecraft:

Only one gyro remained operational after this recovery, and on December 21 that gyro failed. Attitude control was accomplished with manual thruster firings that consumed 7 kg of fuel weekly, while ESA developed a new gyroless operations mode that was successfully implemented on February 1, 1999.

Some time ago I asked this question on Space Exploration.SE on precisely this issue; the answer by Mark Adler gives a good explanation; essentially, in space it is possible to determine orientation using only star trackers.
Comment: Until you skip to an unknown destination and your onboard database can't match the local galactic clusters :-)
Comment: @Carl That can be fixed by having a regular orientation check every ten thousand years or so.
Comment: Guess I should have highlighted "skip," that being the term in (Scalzi) the Old Man's War universe for quantum/ultradimensional intantaneous travel. Sorry.
Answer: This answer assumes the question is about determining rather than maintaining orientation.
Gyroscopes (at least the kind used in cell phones and inertial measurement systems) don't indicate where something is pointing. They instead indicate how fast something is rotating with respect to an inertial frame of reference. If an initial estimate of orientation exists, the angular rate information output from a gyroscope can integrated to yield an estimate of the orientation at some later point in time.
This integration has two key problems: The gyroscope output has both systemic and random errors. The systemic errors (bias) can be addressed to some extent by estimation techniques. The random errors: You're out of luck. Those random errors are close to white noise, and integrating white noise produces a random walk. Eventually, the orientation produced by integrating gyroscope output will be complete garbage. This is the dead reckoning problem. To make matters worse, the gyroscope bias itself changes, both systematically (e.g., temperature variations) and randomly. The gyro bias drift adds to the dead reckoning error.
The only way to combat dead reckoning errors is to obtain measurements of the integrated quantity, in this case, orientation. Smart phones and tablets oftentimes use a combination of magnetometers, accelerometers, and GPS to provide some kind of measurement of orientation.
Magnetometers aren't very precise, can be easily fooled by the nearby presence of magnetic substances or electric fields, and measure orientation with respect to the local magnetic field rather than true north. The final problem is easily fixed: The Earth's magnetic field changes slowly with time. The deviation between true north and magnetic force can be determined quite accurately from location (hence the need for GPS). This requires a mapping from position to magnetic field orientation, but that's not a problem since modern smart phones and tablets have lots of memory.
If the object is stationary with respect to the rotating earth, accelerometers can give a clue with regard to which way is down. That directional clue can be rather suspect if the object is accelerating. Sophisticated signal processing can help deduce which way is truly down. The equipment needs a mapping from position to the geoid to make sense of this determination of which way is down.
The above pertains to objects moving along the surface of the Earth. What about objects flying through the air or orbiting the Earth? Airplanes oftentimes rely on the Earth's horizon to provide additional measures of absolute orientation. This provides information on the pitch and roll angles, but not yaw. Something else (e.g., a compass bearing or magnetometer reading) is needed to help resolve roll.
Using an accelerometer to determine which way is down is absolutely useless for an orbiting spacecraft. Spacecraft have more or less unobstructed view of the stars. Modern spacecraft are typically equipped with star sensors to determine orientation. In addition to star sensors, spacecraft orbiting the Earth also use horizon sensors, sun sensors, and magnetometers to augment or replace those star sensors.
Answer: A number of gyroscopes can determine arbitrary rotations.
Cell phones instead use accelerometers to determine the direction of "down" (by assuming they are nearly at rest on earth), and they use magnetic sensors to determine what direction is pointing north.  Together you get an orientation solution with no gyrosocpes.
Also, while gyroscopes can give you information about your turn rate with high precision, they are subject to precession errors over time.  If you want them to tell you which way you are pointing, you have to correct their errors periodically.  A combined accelerometer/magnetometer may not be as accurate, but it will be long-term stable after calibration.
http://www.geomag.bgs.ac.uk/education/smartphones.html
Comment: I sure hope the vast unwashed masses don't depend on this magnetometer to find true North! (right now, in New England, it's off by over 16 degrees)
Comment: Depends on what other info is available.  With either GPS or wifi data, you can get approximate position and do a declination lookup to correct.


How do I unlock Recon armor in Halo 3?

Question: How do I gain access to the "Recon" armor variant in Halo 3 multiplayer?
Answer: It used to be that in Halo 3, the recon armor was not attainable except by working at Bungie or having a Bungie employee give it to you (source). Reasons for being gifted the armour included making an exceptionally interesting or funny level in Forge.
However, it is now possible to unlock the armour through normal means. You must have both Halo 3 and Halo:ODST, both of which much be associated with your bungie.net account. Then, you must complete all of the Vidmaster challenges, three of which are in Halo: ODST. (Source/Tutorial)
Comment: Having completed these with the help of several other people, I will say that it is conceivably impossible to get the Recon armor without a dedicated group of 4 people (not necessarily the same 4 for each challenge).  Some challenges ostensibly require that you have 4 players, and since each challenge is fairly/extremely difficult, dragging around unmanned "guest" players with an extra controller is fairly infeasible (we tried it).  All that said - do it.  It is one of my most epic video game accomplishments ever.
Answer: I believe you have to be bestowed the Recon armor by Bungie themselves. I don't think there's a way to unlock it. Usually they reward players with the Recon armor for good/useful/beneficial deeds in the community.
Comment: This used to be the case but is no longer the only way to get the armor.
Comment: Indeed it was.  The added 'unlockablility' of Recon armour was undoubtedly a good move on Bungie's part.  No one likes favouritism.

How do I unlock Recon armor in Halo 3?


Settings in my computer

Question: I have a Trek Silque, 2017. What centimeter size should I be using in my computer for figuring correct distance?
Answer: Very roughly, you take the ISO size (on the side of the tire, in a form like "38-584"), add the two times the first number to the second number (eg, 76 + 584), and that gives you the wheel diameter in mm.
(There is the problem that the tire width value is far from exact, but it's about the best you can go on.)
If the application you're dealing with wants the circumference then you multiply the above result by pi (3.14).
From a web search I see that the original tires on the bike were likely 700x25c.  The "700" rim has an ISO diameter of 622.  The 25 width is probably close enough to the ISO value.  So 622 + 50 =  672 mm diameter, or 2110 mm circumference.  (Of course, divide the numbers by 10 for cm values.)
Or, of course, you can simply walk the bike along the floor for 5 or 10 complete wheel revolutions, measure the distance traveled, and calculate from that.
Comment: Yes, setting the wheel circumference to 2100 and 2120, the margin of error is about 1%. The margin of error for a car odometer is around 5% per legal requirements. Meaning that the correct setting is somewhere between 2080mm and 2120mm with still only a 2% error. Not mentioning wheel slippage on braking or diameter change when leaning in turns. No reason to become paranoid about 'correct' setting. 2100mm is a good approximation for 700c wheel with a 23-28mm tyre.
Comment: There's a dynamic change in circumference when the wheel is loaded with the rider's weight caused by tyre compression. The circumference also depends on tyre pressure.
Comment: @Carel - But these changes are within the margin of error.

Settings in my computer


How do you join three or more records from the same table?

Question: I have table with a lot of data in it, and we would like a way to essentially flag certain documents to indicate that they are related to (x) other documents:
TABLE A
-----------
id
name
created_at
modified_at

Records:   id        name              created_at              modified_at
            1       arlo g    2020-04-29 12:30:00      2020-04-29 12:30:00
            2     kenny ws    2020-04-29 12:32:00      2020-04-29 12:32:00
            3      roger w    2020-04-29 12:36:00      2020-04-29 12:36:00
            4     frank lw    2020-04-29 12:41:00      2020-04-29 12:41:00
            5    depeche m    2020-04-29 12:43:00      2020-04-29 12:43:00
            6       manson    2020-04-29 12:46:00      2020-04-29 12:46:00

Now - assume a user is viewing document id 1. They want to tie it to documents 3 and 4.
If a user then opens document 1, the system can easily pull documents 3 and 4.

On the same note - if a user opens document 3, they can easily pull documents 1 and 4.

Is this possible? I am not sure how to structure a query clause to pull the document ids for a given document, such that the list is the same each time no matter which one of those documents is queried on.
Comment: What version of MySQL?
Comment: Read about "self join".
Answer:
If a user then opens document 1, the system can easily pull documents 3 and 4.
On the same note - if a user opens document 3, they can easily pull documents 1 and 4.

This looks like the relation have NO parent-child type. So the solution may be
CREATE TABLE r ( group_id INT UNSIGNED,
                 table_a_id INT UNSIGNED,
                 PRIMARY KEY (table_a_id)
              /* PRIMARY KEY (group_id, table_a_id) */
               );

So if you need in "if a user opens document 3, they can easily pull documents 1 and 4", then all 3 table_a values (1,3,4) must belong the same group.
The primary key selection is dependent by the fact does a definite document may belong to one group only or to more than one group.
When you need to obtain the whole group members by one member of a group you will use
SELECT t2.*
FROM table_a t1
JOIN r       r1   ON t1.id = r1.table_a_id
JOIN r       r2   ON r1.group_id = r2.group_id
JOIN table_a t2   ON r2.table_a_id = t2.id
WHERE t1.name = 'initial document name'

Comment: how do we assign the group ID?
Comment: @BarryChapman Freely. Incremently (autoincremently for MyISAM), randomly, etc... it doesn't matter. Group ID means nothing - it is intermediate identifier which allows to define what doc to what another doc is joined, and may be hidden as any another join-only attribute.
Answer: As this is a many-to-many relationship.
CREATE TABLE r (from INT UNSIGNED, to INT UNSIGNED, PRIMARY KEY(from,to));

Relations are fetch by aliasing the source tbl multiple times like
   SELECT t1.id, t1.name, t2.id, t2.created_at, t2.name
   FROM tbl t1
   LEFT JOIN r ON t1.id = r.from
   JOIN tbl t2 ON t2.id = r.to
   WHERE ...

So t1 and t2, are table aliases of tbl with the same fields, however their rows (not documents) are based on the join criteria.
Comment: is `r` the closure of related documents? I.e. say that 1 relates to 3 that relates to 4. How many rows would `r` contain?
Comment: yes, `r` is the relation table that maps unidirectional the rows between ids of the `tbl`. It can have as many unique rows as the relations that exist.
Comment: would that be 2 or 3 rows for the example?
Answer: This idea is to store related documents as a chain of links:
create table link
( x int not null primary key
, y int not null unique
);

insert into link (x,y) values (1,3),(3,4);

If we were to add a link we attach it either first or last. I.e
insert into chain (x,y) values (5,1);

or:
insert into link (x,y) values (4,5);

If we remove one document (say 3), we delete one link and update the other.
The transitive closure of link is how all documents are related to each other:
with recursive backward as (
  select 1 as x, 0 as iter
  union all
  select l.x, iter + 1 from link l join backward b on l.y = b.x
),   forward as (
  select 1 as x, 0 as iter
  union all
  select l.y, iter + 1 from link l join forward b on l.x = b.x
)
select x from forward where iter > 0
union
select x from backward where iter > 0

The document in question is used as a seed for the two recursive CTE:s:
select 1 as x, 0 as iter

If the closure of a document is supposed to be reflexive, i.e. contain itself, just remove the predicate where iter > 0
Fiddle
If you are on a version less than 8, or if you have large chains where recursive queries are to slow, you may consider some kind of Incremental Evaluation System (IES). The idea is quite simple, we create a table for the transitive closure of link:
create table tc
( x int not null
, y int not null
, primary key (x,y)
);

Now, whenever a chain is modified, the TC must change accordingly. A trigger that detects insert of links may be implemented as:
delimiter //
create trigger ira_link
after insert on link
for each row
begin
    insert into tc (x,y)
    select NEW.x, NEW.y
    union all
    select tc.x, NEW.y from tc where NEW.x = tc.y
    union all
    select NEW.x, tc.y from tc where NEW.y = tc.x
;
end //
delimiter ;

insert into link (x,y) values (1,3);
insert into link (x,y) values (3,4);
insert into link (x,y) values (0,1);
insert into link (x,y) values (4,5);
insert into link (x,y) values (6,7);

We may ask for what documents that is related to 3 with:
select x from tc where y = 3
union
select y from tc where x = 3;

0
1
4
5

or with the slightly shorter:
select case when x = 3 then y else x end
from tc where 3 in (x,y);

It is a pity that functions that return tables are not implemented, something like:
select * from get_tc(3)

would be a nice abstraction
I'll leave the triggers for DELETE, UPDATE as an exercise for the reader. I could not use the previous link due to restrictions for triggers, but you can use https://www.db-fiddle.com/


Snapchat on computer or alternative

Question: there is a good alternative to Snapchat for pc? I searched on the Google and I found bluestacks emulator for android applications. I think this emulator wants good requirements for run properly on the computer. I have dell inspiron 3537 with 8GB ram and i7 processor and I think it works. Can I talk with my friends with this snapchat through bluestacks? I found this tutorial. Have you encountered this problem? Thanks!
Comment: (1) Which operating system are you using? (2) Is it required that the alternative works with the existing Snapchat network? (3) If it's not required (i.e., you would be happy with a separate network), which features do you need exactly? (not everyone knows Snapchat)
Comment: (1) Windows 8.1 (3) Something like  Whatsapp with emoticons and photo sharing
Comment: Welcome to  Software Recommendations! We will need much more information to give good recommendations here – asking for "a tool like X" is never giving enough details, even if linked. You should always list your requirements explicitly. Please see [How to ask for an alternative to some software](http://meta.softwarerecs.stackexchange.com/q/48/185) and the questions linked to it for details.
Answer: I can recommend SnapMeNow,which is a webapp it does not require any installations on a PC & it uses your computer's camera to take a picture that you can send to up to 100 recipients via a hyperlink. That image self-destructs Snapchat-style after an interval of up to 10 seconds.
Related source :source

Snapchat on computer or alternative


Why do you feel air moving past you when you walk?

Question: I know that when you walk through the air you form a wake vortex and turbulent air behind and the vortex grows the faster you walk. When I walk past people I almost feel wind that's behind them. So why do I feel wind behind a person when they walk by? Is it the turbulence causing the wind?
Comment: Which question are you asking: "why do we feel moving air" or "how does a walking person cause air to move, which I consequently feel"?
Answer: In practice, yes, but you wouldn't even need that: the simple fact that an obstacle pass through the air makes it push apart in front then sucked together on the rear, causing motion on the sides. But such viscous flow displacement would exist only close to the object, while wakes can be very long (see for instance behind cars, when there is some smoke or fog around).
Answer: but aren't you answering the question on your own? when a person moves forward the air behind them rushes in to fill the gap. simple high -> low pressure situation. the air moving in causes you to feel the "wind"


Meditation Experiences as a beginner

Question: So I notice that I have what I consider to be intense meditation experiences as a beginner. I still consider myself as a beginner because I am not following any guidelines or books or yoga practices. Plus I get scared and stop meditating for long periods of times because of Fear of the unknown.
 But in my meditations it's just me and music or me and crystals (mostly Amethyst).
Today I was listening to a Theta Vibration YouTube video and began to notice I was going to deeper into meditation I started to have Rapid Eye Movement.  I told myself that I should not fear this and as I did I got passed the eye movement. I then started to feel my hands in a specific position and my index fingers being bent upwards toward the ceiling (not uncomfortable) I then became more blissful and serene. But my main question is,
"IS it normal to feel your hands and arms raise mere inches off the bed? (I lay down during my meditations, I notice laying down works best for me.) What is my body healing in order to be feeling what I experience as this type of levitation in my arms? I have felt this in my legs too another time. What is my body doing in this process?
Thanks in advance for any answer. I'm not sure who to talk to about my experiences.
Thanks,
Alicia
Answer: Likely there is a subtle energy blockage around your elbows & shoulders so the lifting of the arms is to allow the energy to flow out of your arms and through your shoulders.
In Buddhism, we practise meditation on the natural ordinary breathing. This also leads to purification or healing of the body; where certain energies must flow so they can be released. Limbs can move to accommodate this.
Answer: I am going to give you a neuroscientist answer, not a traditional Buddhist one.
Our mind relies on models of the world, and that includes our body, we basically live in a delusion or mirage. Normally this delusion coincides with reality, so we are not the wiser. Our brain constantly incorporates information from reality to keep our "delusion" (I.e., mental model) consistent. When it comes to our body most of this information comes from proprioception and skin nerve endings, but also vision.
This mechanism is made evident in phantom limb syndrome, alien hand syndrome, and in extreme cases body dysphoria. It can be easily explored with some basic experiments in normal individuals like the rubber hand illusion.
When we meditate we can directly interfere with these mechanisms, and our mental model of parts of the body can get disconnected from the information that those body parts are providing. To the extreme that our mental model can feel completely detached from the body.

Meditation Experiences as a beginner


200K 10-Year Investment Safest 5% Annual Return?

Question: I have $200k and want to set aside for 10 years. I know to be really safe I have to go for 10 year CD. I can get close to 3% CD from my brokerage account.
I am a little greedy and would like to get 5%. What would be the safest investment? Junk bond funds now have a return of 6%. So in 10 years I get extra 10% on the money and I can afford to lose 10% on the principle. The problem is that the funds could lose much more than 10% in value in 10 years.
Any other investments do you know of?
Comment: Additional return comes with additional risk.  There is nothing as safe as a CD that will get significantly more return.
Comment: What's the worst outcome that you'd be content with after 10 years?
Comment: The trick here is going to be splitting up the money.  Put most of the money in a CD or some other very protective investment, put some of the money somewhere else.  I'd say, "Junk bonds" are probably not in the "safe investment" group.
Comment: My expectation is that I will have at least 85% principle left at the end of year 10. That will be 170K.
Answer: I don't think there exists a guaranteed 5% investment vehicle. You have to decide how much risk you're willing to take. Splitting your $200k between CD's and stocks (or whatever higher yield investment vehicle you've found) is a way to get a higher rate without risking it all.
For example if you've got a CD at 3%, and let's say best case is 10% average annual return on stocks, after 10 years here are potential results using various splits from 100% CD to 100% stock:

The best case based on 10% average stock return and 3% CD return is the Total line for each split, the worst-case would be the CD amount only. Reality could be almost anywhere, but not below the CD amount.
Comment: Good chart! My worry is that stock could have a negative return in the next 10 year. Like SP500 from 2000 to 2010. Because I only need 5%, I hope I can avoid stock.
Comment: Yeah that's always the concern, it's easy to point at the historic 10-year averages and think you've only got a 5% chance of losing money over 10-years, but that's not a valid risk assessment. With 130k in a 3% CD, you could put 70k in the stock market and have at least $175k in 10 years, and if the stocks hit 10% average then ~$365k.
Comment: Great Chart. Request if you could supplement this with probable loss scenario, i.e. stocks yield is -25%. Or as OP has explicitly said he doesn't want to loose more than 10%, ideal investment in CD [or guaranteed product] should be 87.5% with a 3% yield would return 90% of original corpus. The balance 12.5% one can invest in riskier investments and a chart can show how much gain or loss on will have depending on various scenarios.
Answer: Invest in a high quality dividend paying group of stocks.  Look up "stock  aristocrats" to find longterm quality stocks that have regularly increased their dividends for over 20'years.
10'years is a safe period of time to invest in stocks.  If you had bought stocks at their hight in 2007 and kept them through the 40% decline thru 2008 and 2009 and held on to them for 10 years until 2017, you would have earned a 40 % increase from when you purchased them.  That is pretty much a worst case scenerio.  If you had invested in dividend paying stocks and had earned an additional 2.5% per year, you would have exceeded your 5% goal.
The lifetime yearly return of the stock market is 10%.  Time is the only downside, but with ten years, you are almost certainly immune.


Problem with dynamic controls and their viewstates on removal from updatepanel after parent postback

Question: Some background-
I am developing a web application for employess to submit requests for time off work. The request page uses a user control that they enter the date/reason for the day off into. The user can dynamically add a new one to the page for each day off want, these are all added to an updatepanel.
Edit figured out whats going on, just not sure how to fix it.
Ok so the problem I am having is when a user goes back in to edit their request and deletes on of the sub requests
==========                               ==========
Request 1                                      Request 1
==========                               ==========
Request 2                      ==>          Request 3
==========                               ==========
Request 3
==========
The request 2 control is removed fine from the updatepanel via async request with no problem and shows up correctly, the problem i have is when the parent page is submitted and the controls are recreated.
==========
Request 1
==========
Old stale data instead of request 3
==========
instead of showing request 1 & 3 i am getting request 1 along with stale data from request 2 that i no longer need.
if i force the page to draw an extra control on the parent submit i see
==========
Request 1
==========
Old stale data
==========
Request 3
==========
So the data is still there just not in the place i want it to be, how do I get get rid of the stale record and get just the active requests to show up?
Any ideas would be appreciated.
Thx,
Justin
Answer: Resolved issue by using ViewStateModeById


rear derailleur stuck on first gear after changing rear tire

Question: I am a cycling newbie. My bike has 18 speeds with two chainrings in front and nine in back. I just did my first rear tire replacement. Most of that went well, however when I took it out for a short test ride and went through all the gears to make sure they were working correctly, I discovered that they weren't. The front derailleur is working fine, but the rear is stuck in first gear. I've watched the park tool video about adjusting the derailleurs, but I'd still like to know what might have caused this situation so I can avoid it happening again. I should also mention that during the process of changing the rear tire, I opened the rear brake because one crappy video on YouTube advised to "make sure" to do so. But my bike has hydraulic brakes and then they were stuck shut. I gently pried them open with a clean 2-in metal putty knife, and the brakes worked beautifully in my test ride. Could that have had any effect on the gear shifting? Any advice you can give would be greatly appreciated.
Comment: When you say "first gear" you mean the easiest one with the most teeth, or the hardest gear with the fewest teeth?  Gear naming is all sorts of messy.
Comment: Some clear and well-lit photos of your bike would be helpful - one showing the rear derailleur area up close, one showing the whole bike from the right-hand side. You can add them with [edit] then hit the (insert image) button.
Comment: An assessment of the cable would be good thing to start after sorting out "first gear" terminology. I think it is more likely that the cable wasn't pristine and and just snapped or slid through the bolt during servicing and the RD dropped in its "relaxed" position which unfortunately is the hardest gear. Does the cable give any sign of movement when operating the lever, is there any kind of resistance when you press on it with your finger or does it just collapse/move easily?
Answer: The brakes are probably not related to your problem - if the rotor was getting hung up then the wheel wouldn't be able to bolt in.
So what may have happened is that either your chain is somehow out of position as it passes through the derailleur, or you've undone a pinch bolt that holds the gear wire in place.  Both could push the chain onto the highest/hardest gear cog with the fewest teeth.
If your chain is stuck on the easiest gear, then something has pulled a whole lot of cable from the rear derailleur.  It may be your right-hand shifter is somehow damaged and not unspooling cable, or the cable is pinched in the tight position somehow.
Answer: Thank you Criggie and DoNuT for your rapid responses. I have taken my bike into a shop to get it back in riding order. I'll get more info from the shop technician about what was going on and why the gears got so wonky. I'm also maintaining a file of all of your great responses to assist in case of problems when I do future rear tire changes.
Watching YouTube videos has also been helpful (and at times unhelpful) but what I really want is an IN PERSON bike maintenance class. It seem so  incredibly basic; I mean, a metropolitan area of 1.4 million people should have some bike maintenance classes available, don't you think? But NOOOO! I've searched and searched online, and nothing. Before Covid, there were a couple of classes available, but not anymore. Even the local Bicycle Society had no suggestions but calling each bike shop directly and inquiring if they offer classes! I guess I'll be spending some time on the phone the next few days.
Again, thank you so much for your help. - Stevie
Comment: You appear to have multiple accounts. Same name as the questioner, but different reputation here as the answerer (which should be a comment, not an answer in this case).
Comment: Good to hear! In case of doubt, let LBS fix and learn from it. BTW: Answers are mainly meant for constructive answers, the above is more suitable as a comment under the original question. If you get feedback from your shop about the actual problem, you can still edit it and add this as a self-answer. Somebody might still be helped by understanding what the problem was, a "stuck" RD is a common enough symptom. Cheers!
Comment: @Stevie, at that size of city, see if you can find bike co-ops, they are similar to typical bike shops, but they mainly deal with used bikes and parts. The ones I'm aware of accept donations of used bikes for free only (so as to not contribute to bike theft). Typically in these, you can come in and work on your bike yourself, and the staff (and/or volunteers) will walk you through what you need to do, rather than doing the work for you. They have work stands, tools etc.
Comment: Maintenance courses can be hard to find out about even when they do exist.  I hear about some on a facebook group for cyclists ion my city, others by word of mouth, and still others from the local authority, in a news feed I'm subscribed to.  Local advocacy groups are good places to ask about training


Nosql autoscaling of compute

Question: Most of the nosql autoscaling faces issue due to the fact the data have to be migrated during peak load. What if data is stored in a shared storage like CLVM which has less overhead(compared to NFS or shared file system). Now if each bucket/shard is a separate LVM and a compute can mount one or more LVMs based on the amount of shards its responsible for. On high load, the compute will give up few shards(umount LVM) and new compute which has come up will mount the shards. This decouples the storage and compute problems of DB and can make compute horizontally scalable. I know serverfault doesn't accept open ended discussions. Suggesting a forum to post this will also help me. If anybody could help me understand pitfalls on this idea are also welcome
Answer:
What if data is stored in a shared storage like CLVM which has less overhead ... This decouples the storage and compute problems of DB and can make compute horizontally scalable. ... Suggesting a forum to post this will also help me. If anybody could help me understand pitfalls on this idea are also welcome.

If only compute is scaled up essentially everything is scaled down in comparison, except latency. You might end up trading compute scale-up for disk I/O scale-down (bottleneck), but you may be OK with the tradeoff and can add additional faster disks to avoid that; the additional chassis provides plenty of space.
Refer to: "DB-Engine's Website", "DataStax's - Data Replication in NoSQL Databases Explained", "Linux Journal - High-Availability Storage with HA-LVM" and "Wikipedia's Horizontal/Vertical / Database Scaling" webpages for additional information.
There are solutions such as MemCached(DB) which are easier to add than switching from NoSQL to other software, but software that promises better scaling is the better solution.
In this comparison of Casandra vs. MongoDB the verdict is: "If write scalability and 100% availability is your thing, Cassandra is a better fit for you.". There's always going to be some tradeoffs, you need a complete cost/benefit analysis that considers money and time - the worst situation is to go one way and wind-up dead-ended, forced to reapproach the problem when the same or a different wall is hit.
It's up to you to decide if the solution you want must be inexpensive in the short term or the long term, and what feature set (complexity) suits your needs and is worth your time. The first site linked above provides a means to compare different features sets and costs, along with providing links to many sites.
Let me suggest another way to go, distributed shared memory or reflective memory.

"A distributed-memory system, often called a multicomputer, consists of multiple independent processing nodes with local memory modules which is connected by a general interconnection network. Software DSM systems can be implemented in an operating system, or as a programming library and can be thought of as extensions of the underlying virtual memory architecture. When implemented in the operating system, such systems are transparent to the developer; which means that the underlying distributed memory is completely hidden from the users. In contrast, software DSM systems implemented at the library or language level are not transparent and developers usually have to program them differently. However, these systems offer a more portable approach to DSM system implementations. A distributed shared memory system implements the shared-memory model on a physically distributed memory system".

Along with a software solution for shared memory there's also a hardware solution. Here are a few vendors for distributed computing interface boards:

Dolphin - PXH812 Host / Target Adapter - Connects the PCIe bus of one computer to another at 64 Gb/s with 138 nanoseconds latency over copper at up to 5 meters (200 with Fiber). This is the transparent version (no software required, any OS and can mix CPU Arches), there's also the PXH810 NTB Host Adapter (non-transferable bridging) with a Shared-Memory Cluster Interconnect (SISCI) API but the OS is limited to: Windows, Linux, VxWorks or RTX. See their "PCI Express Reflective Memory" webpage.
Curtiss-Wright - SCRAMNet GT200 - dual-port memory appears on the host bus as additional host memory. The host reads and writes data through one port while the network writes data to memory through a second port. Data written to memory by the host is automatically transmitted by the hardware to all nodes on the network.
Abaco - PCIE-5565RC Interface Card - Shares 128 or 256 MB SDRAM on Linux, VxWorks, or Windows. Interface cards are available for PCI Express, PMC, PCI and VME.

Along with board to board you can add a hub to most of the above products and add between several and 256 nodes. It might be worth waiting until next year, and PCIe 4.0.
Answer: MongoDB, for instance, has the concept of the replica set for this situation. In this case multiple MongoDB instances serve the same data. If one fails, the others will continue serving the data. Shared storage is not necessary or desirable for a replica set; each MongoDB instance keeps a separate copy of the data.
This is entirely orthogonal to sharding, in which data is split among different MongoDB instances or replica sets.
Comment: That helps in read scaling. But write scaling is not possible without resharding and rebalancing the cluster. So scaling compute also needs disk to be rebalanced.

Nosql autoscaling of compute


Chronologically relevant

Question: I am looking for the word that expresses the relevancy of an event as it follows the next in a series. But the relevancy is NOT from one event to another (especially no causality); the events follow each other in a manner that is chronologically relevant to another situation. All the "synchro"  words denote simultaneity (e.g. "synchronicity"). I want to denote sequence.
Comment: I don't understand the question. Are you saying the *events* have no inherent chronological relationship to one another, and that they only have relevance to "another situation" ***if*** they occur in some specific sequence? Or that *whichever* sequence they occur in, it's actually ***the sequence itself*** that's relevant to something?
Comment: Please specify whether you want a noun or something else. Also, you didn't give any context.
Comment: The events are only related by the fact that they follow one another in time. They have no causal link. But their sequence is relevant to another situation. I came up with "timely" but suspect there might be a more specific word.
Comment: Developments N, O, P ... reflect the sequentiality of events A, B, C....
Answer: Subsequent - following in time, order, or place
Successive - following each other without interruption
Answer: Consider temporally.
Definition:

In a certain order, with regards to time. The term describes how things are related to each other in terms of time.
Examples:

I thought the two events that I wanted to attend were at the same
time, but I later found out they were temporally arranged, which
meant that I could attend one and then the other without missing
anything.
The organization of the processes was temporally planned
and executed which reaped dividends for the departmental production
this new year.
Answer: Maybe not the exact answers, however based on the question, I think such events can be described as time-ordered, time-related or order-related events.
Answer: The correct word I was looking for is "synchronicity" but in the meaning intended by Carl Jung rather than the Webster definition... The meanings are quite different: Jung's meaning applies to events that appear to be related but without any temporal, nor any cause and effect relationships; Webster's definition focuses on the temporal (i.e. simultaneity).
Oh well, the wonders of language. What a great site. Now I have something to go to when baffled. Thank you for the input!

Chronologically relevant


Applying attribute constraints in QGIS

Question: Is there, with QGIS 3, any way to restrict the data added to a specific field of a GeoPackage layer?
I want to restrict the data in a field of an attribute table with something like that:
2letters(a-z)-3letters(a-z)-2numbers(0-9)

Answer: Go to Layer Properties -> Attributes Form and then select your field; under Constraints use the relevant expression and check 'Enforce expression constraint'. This will restrict data input to the format you've described.
However, it's only applicable to the data in that project with those attribute form settings (which can be copied and pasted as part of the style) - it's not tied to the data; you'd need a constraint in your database for that.

Constraint checking in the form (wrong input triggers highlight, and doesn't allow saving due to the 'Enforce expression constraint' option selected earlier)

As for expressions, your best bet is using regexp_match().
Assuming your format is:

two lowercase letters, dash, three lowercase letters, dash, two
numbers

Try the following expression (replace "test" with your field name)
regexp_match("test", '^[a-z]{2}-[a-z]{3}-[0-9]{2}$')

Answer: I didn't try but if you go in the Attributes Form panel of the layer properties you can set edit widget for your field, when you choose the text edit widget there is the option to set constraints by expression. I guess that using some expression in here will let you set the constraint you want.

References:

QGIS Training Manual | 5.3. Lesson: Forms

Applying attribute constraints in QGIS


Is it normal for the voltage tester to beep when touching the refrigerator frames?

Question: I've bought a Klein Tools NCVT-3 non-contact voltage tester and while I was playing with it I've found the tester beeps whenever it touches the frame of the refrigerator. This won't happen with any of our other appliances like the microwave oven or the dishwasher. Is this an expected behavior or does it indicate something is wrong with my refrigerator?
Comment: Does it happen anywhere on the frame?  Or just some areas?  A sensitive enough tester would certainly "see" the wiring behind the case.
Comment: My non-contact will occasionally false. Try and lay hands on a real multimeter. Test the between the frame and a known ground. If you see voltage, something's wrong and needs more exploration. (Could be the fridge; could be the house wiring...)
Comment: Does the fridge have automatic defrost?  Where specifically on the fridge did you put the meter? Was the fridge running, or does this happen all the time?
Comment: @Grant: It only happens when it touches the parts of the frame close to the water dispenser. It seems it won't beep on the other side of the frame.
Comment: As an extra precaution get a multimeter and test the refrigerator housing to a good ground to make sure there is indeed no voltage potential lurking around.
Answer: Since it's only detecting it near the water dispenser, everything is most likely working properly.
The water dispenser will likely have some electrical wiring near it to run motors or valves or what have you, and that is what it is picking up.  They are probably run quite close to the surface of the frame.  Your meter is designed to detect up to about 2 inches away from the wires.  That distance might be different through metal.
Other appliances you tested probably have their wiring further inside the unit, or shielded better.  If you tried hard enough, you'd probably see similar behaviour with other appliances near where their motors are.


Capture video from cam + custom view into single video file

Question: I wonder if it's possible in iOS 4 or 5 to save into a single video file not just a stream from camera, but a stream from camera WITH custom view(s) overlaid. Custom view will contain few labels with transparent background. Those labels will show additional info: current time and GPS coordinates. And every video player must be able to playback that additional info.
Answer: I think you can use AVCaptureVideoDataOutput to process each frame and use AVAssetWriter to record the processed frame.You can refer to this answer
https://stackoverflow.com/a/4944594/379941 .
And you can process CVImageBufferRef then    use AVAssetWriterPixelBufferAdaptor's appendPixelBuffer:withPresentationTime: method to export.
And I  strongly suggest using OpenCV to process frame. this is a nice tutorial http://aptogo.co.uk/2011/09/opencv-framework-for-ios/. OpenCV library is very great.
Comment: @stuser974349 it depend what process to do with frame.If tracking Face, it has 4 fps.But if tracking specific color, it has about 20fps.


How to check open processes in C++?

Question: In Windows I would like the C++ command or reference that would get the "tasklist" in C++ and output it to a buffer?
Answer: Use EnumProcesses() to get the process identifiers, use OpenProcess() to get their handles and get the information you need via the usual process functions.
Answer: You might find the EnumProcesses function useful.
Answer: There are two basic routes: PSAPI, and ToolHelp32. If you want to badly enough, you can also use the Native API. The Sysinernals Web site used to provide full source code to a process explorer utility that used the Native API to do its tricks. Then Microsoft bought out SysInternals, and shortly after that, the source code disappeared and is no longer available.
If you look hard, you might be able to find some old articles and such telling how to use it, but it's probably not going to be as easy as it should be...

How to check open processes in C++?


Can my degree be revoked if my relationship with my advisor sours post-defense?

Question: I defended my thesis last year and was granted MS degree. After that my advisor pressurized me to work more with him and write papers. I refused after some time and my relationship with him became sour. Can this cause any problem in the future such as thesis being taken away. Note that there is no dishonesty in my thesis at all, but there are some weak areas.
Comment: *"but there are some weak areas"* - there are two kinds of thesis. A perfect thesis, and a finished thesis.
Comment: What possibly needs to be asked here is: *How have you come to be afraid of your degree being revoked?* If your adviser has threatened you with revocation of your degree if you don't work with him, there is a word for that: blackmail.
Comment: If the thesis has been officially examined, signed by the committee and the paperwork submitted to the administration on the university, it cannot be taken away, nor your supervisor would try something that vindictive.
Comment: @Moriarty:  That's for sure!  I set out to prove something was true for values of *n*  > 1 and settled for proving it to be true for *n*  =2.
Comment: @Compass Good point. And there's an appropriate action for that: a formal complaint to the head of department, or perhaps the chancellor's office.
Answer: Once a degree has been conferred, it is exceedingly difficult to retract at without clear evidence of misconduct. Having a souring of relations with your advisor definitely does not rise to the level where you should have to worry about your degree being revoked. It is definitely worth mending your relationship with your former advisor just on professional grounds, but the "safety" of your degree shouldn't be one of them.
Comment: If the OP has moved on to another research group or an industry job, it seems a bit out of line for his former advisor to *pressure* him to continue work (and hold a grudge when the OP won't). If the advisor is being clearly unreasonable, and if a polite discussion doesn't solve the issue, then mending that relationship might be more effort that it's worth.
Comment: I agree with both points here. Academia is small and people talk (see other comment) -- one (but certainly not the main) reason why integrity is so important. So it depends on what the OP wants to do in the future *and* the kind of person the adviser is. Personally, I would ignore the "sourness" and just focus on the (non-interpersonal) reasons why the collaboration did not work out (e.g., time, other interests). Stating that it's not the person might be a way to avoid a continued grudge.
Answer: As Aeismail already said, you would have to have commited some serious misconduct for your degree to be revoked (at least in any reasonable academic and legal system). And even then, the proceedings for doing so will cost your supervisor quite some time and effort.
Most importantly, however, it's almost impossible for your supervisor to revoke your thesis without shooting himself in the foot:

If there is any lack of quality in your thesis, the reviewers should have noticed. And the main reviewer usually is your supervisor.
Misconducts that are not directly obvious from the finished thesis such as plagiarism, rigged data or employing a ghostwriter are much more difficult to perform under proper supervision. Thus making a corresponding accusation against you will almost certainly lead to allegations of improper supervision against your supervisor.
Revoking your thesis causes some noise that also reaches potential future students of your supervisor, moreover if you stir that noise up and have good arguments against the revocation. These students will think twice about choosing your supervisor as a supervisor, which will almost certainly not make up for the damage of a few papers not written by you. It may very well destroy his workgroup.

Finally, these points would also apply to a second reviewer to some extent, which gives that person good reasons to work against allegations against your thesis.
Comment: Some advisers might be willing to go this far (not only accepting a shot in the foot, but taking off the whole leg). But that would take much more than just a "sour" relationship. It requires the kind of conflict where a person does not care anymore about own losses or future well-being (way past mediation). Can happen but is highly unlikely. If the adviser *really* holds a grudge he might try to damage your future career in other ways. Academic disciplines are usually small and people talk. If you ever continue to work with the topic a good *professional* relationship can be helpful.


On chain homotopy equivalence

Question: I just learnt the notion of chain map and have the following question. Let $C=(C_n,\partial_n^C)$ and $D=(D_n,\partial_n^D)$ be chain complexes of abelian groups with boundary maps $\partial_n^C$ and $\partial_n^D$. Then I guess it should be true that $\phi:C\to D$ is a chain homotopy equivalence precisely when $\phi_n:C_n\to D_n$ is an isomorphism for all $n$.
$$\begin{array}
$C_{n+1} & \stackrel{\phi_{n+1}}{\longrightarrow} & D_{n+1} \\
\downarrow{\partial_{n+1}^C} & & \downarrow{\partial_{n+1}^D}  \\
C_{n} & \stackrel{\phi_{n}}{\longrightarrow} & D_{n}
\end{array}
$$
One direction seems easy: if $\phi=(\phi_n)$ is a chain homotopy equivalence, then there is a homotopy inverse $\psi=(\psi_n)$, so $\psi_n$ is an inverse of $\phi_n$ in the category of abelian groups. But I don't know how to show the converse, i.e., how to show $(\phi_n^{-1})$ is the homotopy inverse of $(\phi_n)$?
Answer: No, that's not true. A chain homotopy equivalence is not chain map with an inverse; it is something weaker (namely it is a chain map with an "inverse up to chain homotopy," exactly the way it sounds). In particular you're confused about which direction is easy: the easy direction is that if a chain map has an inverse then it is a chain homotopy equivalence. The other direction is false.
Comment: But what I'm really asking is the relation between chain homotopy equivalence in the category of chain complexes and the corresponding isomorphisms in the category of abelian groups. Is this relation also false?
Comment: @user42383: yes, that's also false. If a chain map has an inverse levelwise then the levelwise inverses are necessarily also a chain map giving an inverse in the strict sense; those conditions are equivalent and are not equivalent to being a chain homotopy equivalence. Have you looked at any examples?
Comment: Maybe I ask what the definition of an inverse of a chain map?
Comment: @user42383: in any category, an inverse of a morphism $f$ is a morphism $g$ such that $f \circ g$ and $g \circ f$ are both identity morphisms. A chain map is a morphism in the category of chain complexes.

On chain homotopy equivalence


Average of Dependent Variables

Question: Suppose $X_1, \ldots, X_n$ are dependent varibles with identical marginal distribution.
Denote the common population mean as $\mu_0$. In this case, is $\frac{1}{n} \sum X_i$ a reasonably good estimator of $\mu_0$? I guess assymptotically it is still consistent. Is there any other suggestion?
Comment: By "dependent variables" do you mean *random variables that are not independent*?  If so, considering the case $X_1=X_2=\cdots=X_n=\cdots$ may clarify the situation for you.
Answer: If we have a collection of identically but not independently distributed random variables, then the sample mean is still an unbiased estimator of $\mu_0$. Its variance must now take into consideration the covariances between the random variables, so we cannot say something general about its finite sample efficiency.
As for consistency, the Weak Law of Large Numbers will hold if (but not "only if") correlation (and not necessarily dependence) vanishes asymptotically, in the sense of the sufficient condition associated with Markov's WLLN
$$\text{Var}(\bar X_n) \rightarrow 0 \Rightarrow  \frac 1{n^2} \left (\sum_{i=1}^n\text{Var}(X_i)  + {\sum \sum}_{i\neq j}\text{Cov}(X_i,X_j) \right)\rightarrow 0$$
$$\Rightarrow  \frac 1{n} \text{Var}(X) + \frac 1{n^2}{\sum \sum}_{i\neq j}\text{Cov}(X_i,X_j) \rightarrow 0$$
The above requires that the individual variance is finite which makes also the first term go to zero. Then it it is the second term, the sum of covariances,  that must go to zero.
Note that this condition does not imply some ordering along a natural index of the variables, like the time index: Although Markov's condition can be satisfied if the more intuitive notion "as variables are further apart in time, then they stop being correlated", this last condition is Bernstein's condition for his own version of WLLN. Markov's condition is more general, in that the scaled sum of covariances can go to zero in any kind of way.
Now, Markov's condition is designed for heterogeneous random variables. In our case the variables are identically distributed, so
$$\text{Cov}(X_i,X_j) = \rho_{ij}\text{Var}(X)$$
where $\rho_{ij}$ is the pairwise correlation coefficient, so the Markov's condition becomes here
$$\text{Var}(X)\frac 1{n^2}{\sum \sum}_{i\neq j}\rho_{ij} \rightarrow 0$$
Assume that the variables are pair-wise equicorrelated, $\rho_{ij}=\rho$ (by the way, equicorrelation is only possible if $\rho > -1/(n-1)$, otherwise the variance of the sample mean will be negative). Then we get
$$\text{Var}(X)\frac 1{n^2}{\sum \sum}_{i\neq j}\rho_{ij}= \text{Var}(X)\frac 1{n^2}(n^2-n)\rho $$
$$= \text{Var}(X)(1-1/n)\rho \rightarrow \text{Var}(X)\rho \neq 0 $$
(which on the side means that to consider asymptotics of equicorrelated variables, we must have $\rho>0$).
So in such a case the Markov condition is not satisfied. Does this mean that the WLLN does not hold? Not necessarily, because the condition is only sufficient, not necessary. See this post (and links therein) for the case of consistent estimators that nevertheless have non-zero variance asymptotically (however demanding this may be to comprehend fully).
But of course there are cases when failure of the Markov condition signals inconsistency. Consider the case where the $X$'s are jointly normal, equicorrelated with $\rho>0$ , with marginal variance $\sigma^2<\infty$. Then we know, using also the previous results, that
$$\bar X_n \sim N\left(\mu_0, v_n\right),\;\; v_n = \sigma^2\big[\frac 1n + (1-1/n)\rho\big] $$
For consistency we examine ($\Phi$ is the standard normal CDF, $\epsilon >0$)
$$\lim_{n\rightarrow \infty}P\left(|\bar X_n-\mu_0|< \epsilon\right) = \lim_{n\rightarrow \infty}P\left(\frac{-\epsilon}{\sqrt v_n}<\frac{\bar X_n-\mu_0}{{\sqrt v_n}}< \frac{\epsilon}{\sqrt v_n}\right)$$
$$=\lim_{n\rightarrow \infty}\left (\Phi\left(\frac{\epsilon}{\sqrt v_n}\right)-\Phi\left(\frac{-\epsilon}{\sqrt v_n}\right)\right) = \lim_{n\rightarrow \infty}\left (2\Phi\left(\frac{\epsilon}{\sqrt v_n}\right)-1\right)$$
$$=2\Phi\left(\frac{\epsilon}{\sigma\sqrt \rho}\right)-1 $$
and this last expression won't be equal to unity for all $\epsilon >0$ -and worse: the probability tends to zero as $\epsilon\rightarrow 0$, meaning that it is virtually unprobable for the distance between sample mean and true value to be close to zero. So in this case the sample mean is not a consistent estimator of $\mu_0$, although it is asymptotically unbiased, since
$$ \bar X_n \xrightarrow{d} N\left(\mu_0, \sigma^2\rho\right) $$
But asymptotic unbiasedness is not the same as consistency.
Comment: (+1) Is there a better phrasing than "virtually unprobable"?
Comment: @Silverfish Any guesses? No problem in changing it, but my (non-native) English won't help me here.

Average of Dependent Variables


Is a spotting scope or binoculars a better choice for astronomy?

Question: I'm interested in observing the moon and planets, and maybe some nebulae and star clusters.
I have a pair of binoculars:

Nikon OceanPro 7x50 binoculars (around \$300)
Celestron 20x80 binoculars (around $100)

I'm looking at a step up, to 100mm. Specifically, I'm trying to choose between  25x100 binoculars (either a Celestron or an Orion) and a 100mm spotting scope.
The only reason I'm considering a spotting scope is that it has a magnification of 22-66x, compared to the binoculars' 25x. But I want to check if such high magnifications really work for astronomy.
Let's say I'm observing the full moon. What's the highest usable magnification, without resulting in too dim an image?
An Amazon review says that:

I have found that while the readability improves from 22x to about 38x
  the resolution actually decreases after that and I never use it from
  40-66x, there is no point. Maybe it would have been better to have
  optimised it for 22-40x.

If the scope is limited to 40x in daytime use, I expect it to be worse at night, even observing the full moon.
I'm considering buying the scope only for the increased magnification over the binoculars, but if I end up using the scope only at 22x, it defeats the point of buying the scope in the first place. Should I stick with the binoculars?
Comment: I certainly don´t want to push you towards a telescope, but your requirements certainly don´t exclude telescopes. For example the Sky-Watcher Heritage-130P FlexTube Dobsonian is  a scope which has received great reviews, weights 6 kg, has an aperture of 130mm, and it size is (h,l,w) 45 x 29 x 29 mm. You can see objects up to magnutude 13.3 and magnify about 250x (or anything else, because you can swich eyepieces). Price for a new one should be around $ 250,-. For the record: I have no affiliation to Sky-Watcher or any other optics selling brand.
Comment: Why restrict yourself to a binocular/spotting scope? Did you consider buying your first telescope? S&T has two great articles to get you started on choosing your first scope, [one about types of scopes](http://www.skyandtelescope.com/astronomy-equipment/types-of-telescopes/) and [one about scopes with an exceptional price/performance](http://www.skyandtelescope.com/equipment/home/69745547.html). I think you'll find those articles usefull and maybe, this is the beginning of a great hobby! At least it will provide some answers to implicit questions in your original question...
Comment: I am excluding telescopes because they don't meet my requirements, as stated in http://astronomy.stackexchange.com/questions/1646/whats-a-good-step-up-from-7x50-binoculars -- they are either too heavy, or too long, or too expensive. And if they meet all these criteria, they have a smaller than 100mm aperture, in which case I might as well buy binoculars or a spotting scope with 100mm aperture. Is my reasoning wrong? And, thanks, I'm going through those articles.
Comment: Thanks, @agtoever . I'm perfectly fine with telescopes if they meet my requirements. BTW, neither this telescope nor other 130mm telescopes are available on Amazon.com (US). The one additional constraint is that it needs to be available in Bangalore. With binoculars, I can buy them the next time I visit the US, and bring them back with me. The one you pointed me to, for example, weighs 22 kg (shipping weight). And it's not available on Amazon.com (US), anyway. What are some other telescopes available on Amazon.com and which can be carried in a suitcase?
Comment: That is [off topic](http://astronomy.stackexchange.com/help/on-topic) as *"these are very time and opinion specific and are likely to incite debate"*.
Answer: The main point is that it all depends on the optics quality. Nikon is a good brand, but $300  for a 50mm binocular is way too much. Remember the golden rule while buying any kind of telescope or binocular: Aperture matters, not the Magnification. In a binocular, say "7x50" models, you get 7x magnification with 50mm aperture, which restricts how far you can see. But the Celestron 80mm scope with a 20x magnification is perfectly fine. It would be advisable if you can get hold of a good tripod, get it. The beauty of the heavens is unimaginable; they shall unfurl as you explore. A 80mm scope will let you see even Dark Sky Objects like Nebulas and Distant Galaxies.
In a nutshell, it would be best for you at this stage to grab the Celestron 20x80 scope, which is both better and less costly.
Comment: Thanks. I already have a 20x80 binoculars, as I said, and a tripod. Regarding price, I find the $300 7x50 far clearer than the $100 20x80. I'm looking to move up to 100mm, as my question said. Would you recommend the scope or the binoculars mentioned in the question? Unfortunately, I may not have a chance to test them out, and will have to order blindly online. Which would you recommend?
Comment: I said: Regarding price, I find the 300 dollar 7x50 far clearer than the 100 dollar 20x80.


Creating a polar chart / polar grid

Question: Is there a way to create a polar grid / polar chart in Blender 2.93.1?  I know I can create a circle and do several insets then draw the lines. I was wondering if there was a better way that can make it adjustable, maybe with geometry nodes.
Example:
Comment: Hello :). Which parameters do you need adjustable? Line width/spacing/sth else?
Comment: @JachymMichal  The line width and the spacing.
Answer: I've had to come up with a solution for that some time ago and it turns out the algorithm is not that trivial. I based it on the Ruby implementation from the excellent Mazes For Programmers book by Jamis Buck.
I'm sure there are simpler ways to do this but I understand add-ons suggestions are allowed here. Full disclaimer, I wrote that add-on. (It's free to download, use and modify).
Download the Maze Generator add-on from https://github.com/Gorgious56/MazeGenerator/releases/tag/0.4.0
Install it like any other add-on. Tested on version 2.93.1. Open the "N" panel with N and look for a panel named "MG".
In the panel Parameters, set the cell type to "Polar". A polar maze should be generated.

We don't want the walls so you can go ahead and hide them. Click on the eye icon in the walls sub-panel and go into wireframe mode to see your polar grid.

Add a Weld modifier and a Wireframe modifier with "Replace Original" unchecked and "Material Offset" to 1 to get this :

You'll have to set the display type to "Uniform" and the color to pure white to get this effect.

You can then control the "Branching" amount

You can also extend the grid size :

Creating a polar chart / polar grid


Can I purchase the Windows 8 upgrade and install it on another PC?

Question: I want to upgrade to Windows 8. My one friend bought a new PC some days ago. He is not interested in windows 8 upgrade. Can I use his system details to upgrade to Windows 8 in 14.99$ on my PC which was bought two years ago.
Comment: Are you talking about the windows upgrade offer?
Comment: yea i m asking about windows upgrade offer
Answer: Yes you can! (Providing you have Windows 7, excluding Windows 7 Starter Edition).

According to the faq for the Windows Upgrade Offer:

Do I have to install the Windows 8 upgrade on the eligible PC, or can
  I install it on another PC?
  The upgrade offer is tied to a Windows 7
  PC purchased between 2 June 2012 and 31 January 2013, but you can
  choose to redeem the offer and install the upgrade on any compatible
  Windows-based PC with a qualifying base operating system.

Are all PCs purchased with Windows 7 between 2 June 2012 and 31 January 2013 eligible for the Upgrade Offer?
  Eligible PCs are new PCs purchased during the promotion period with a valid Windows 7 OEM Certificate of Authenticity, product key for and preinstalled with:
Windows 7 Home Basic;
  Windows 7 Home Premium;
  Windows 7 Professional; or
  Windows 7 Ultimate
Note: Windows 7 Starter Edition is not eligible for this offer.
Comment: Personally I wasn't expecting this to be the answer (but am happy it is!)
Answer: While you can use the upgrade on another PC, also see What happens to the Windows 7 key when upgrading to Windows 8?.
After you upgrade, the license for Windows 7 is no longer valid, and you no longer have a license to use Windows 7 on the original PC.
Does your friend have a Windows 7 license he can use instead? (Perhaps from a PC which will use the upgrade, if it is not OEM).


How to store a document with details in a document library?

Question: I have a document library in SharePoint and I want to store the document with metadata to SharePoint  document library. Is this possible?
Comment: What type of details you want to store? Do you have separate columns in Document Library for those details?
Comment: What do you think SharePoint is for? Certainly you can store documents and metadata about the documents!
Comment: That edit did not really help calrifying the question. What are you trying to accomplish?
Answer: You can Create your own Custom Column as per your Requirements.Then,When you Upload Documents that Column also appear to fill data.You can fill data & that will be the Detail of that particular Uploaded Documents.
Comment: +1, nice answer
Answer: You can create columns in a library. All the column value will also be stored in the document properties too. The properties can even be seen if downloaded to a local drive and checked.
Answer: You can use following link for uploading documents with details using code behind. You should initially create necessary columns in document library.
https://stackoverflow.com/questions/12514557/upload-documents-to-sharepoint-with-metadata-c-sharp-asp-net
Comment: you will add documents from code behind or through page?
Comment: Then you can update the document library columns from code behind know. If you need those columns to be automatically populated, you need to have content controls in that word document and map those content controls with your document library columns using Document Information Panel(DIP).


Unmet dependencies while trying to install Git from

Question: I know this kind of questions is often-asked, and I read many of threads (particulary this one) around that kind of problems without finding a "simple" solution (I mean without editing the DEBIAN/control file of the package).
Here's the problem :
Lila ~ # apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1757 not upgraded.

Lila ~ # cat /etc/apt/sources.list | grep -v '#'
deb [arch=amd64,i386]  http://ftp.fr.debian.org/debian/ stretch main non-free contrib
deb http://security.debian.org/debian-security stretch/updates main
deb http://ftp.debian.org/debian stretch-backports main
deb ftp://ftp.deb-multimedia.org stretch main non-free

Lila ~ # apt-cache policy git
git:
Installed: 1:2.11.0-3+deb9u1
Candidate: 1:2.11.0-3+deb9u1
Version table:
    1:2.14.1-3~bpo9+1 100
        100 http://ftp.debian.org/debian stretch-backports/main amd64 Packages
*** 1:2.11.0-3+deb9u1 500
        500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
        100 /var/lib/dpkg/status
    1:2.11.0-3 500
        500 http://ftp.fr.debian.org/debian stretch/main amd64 Packages

Lila ~ # apt-get install git=1:2.14.1-3~bpo9+1
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
git : Depends: git-man (> 1:2.14.1) but 1:2.11.0-3+deb9u1 is to be installed
E: Unable to correct problems, you have held broken packages.

In human-readable format: I have to install git >= 2.13 for work. I'm currently on Debian stable (I've the feeling that this is going to change); and I'm trying to install testing version from backports.
Answer: Auto answer:
I finally found I had to tell apt-get to install this version from stretch-backports:
apt-get install -t stretch-backports git

=> Worked


What does 本 in 本科教育 or 本科学历 mean?

Question: The equivalent in English for 本科教育 is undergraduate education, but in China this phrase may imply it is a university course that lasts four years, different from 专科教育, which is the type of college education spanning over two or three years. The word 本 means origin or the true self or nature of something or somebody, but when put in this context, makes the phrase 本科 a little confusing.
Answer: I think you have actually answered the question when you say -- "The word 本 means origin...."
Because "origin" is defined as -- "The place where something begins", "An event that is a beginning; a first part or stage of subsequent events"
So, the 本 in 本科教育 means the "beginning", the "start", the "first stage" of one's tertiary education as an undergraduate. Therefore 本科教育 means undergraduate education.
Wonder what the word "under" is doing in "undergraduate"?
That is why Japan is called 日本, because it is the "start", the "beginning" or if you like the "origin" of a new Earth day as the sun "日" "starts", "begins" shining on that country "first"
So too you have 基本, meaning "basic".
Further Answers from Comments:-
As you know the word 本 has multifarious meanings. I confined my answer only to the question concentrating on the meaning of "origin".
本职工作:-
The 本, however, in 本职工作 means "self", as you've said "...true self or nature of something or somebody" So you have, 本人, (myself), and 本性, (own / self personality)
Thus 本职工作 means, "self-employed", (本 = self; 职 = occupation / job)
专职工作:-
The word 专 too has many meanings, like all words in any language.
But in 专职工作, the 专职, (expert / specialized occupation / job), has the meaning of some sort of "technical specialization", like an engineer, etc.
Related terms are, 专门, a person who does something or work which he has special skills in. Same as 专家, an expert.
本科教育 vs 专科教育?
By now you should have no problem with these terms, and or their comparative meanings :)
In many areas of human endeavor, there is nothing better or more satisfying than self-education.
Comment: What about 本职工作 and 专职工作?as in the case of 本科教育 vs 专科教育?
Comment: OK, got it, very instructive. Thanks.

What does 本 in 本科教育 or 本科学历 mean?


Finding Apps that do not appear in Macbook dock

Question: I recently got a macbook pro. Shouldn't programs like iMovie and GarageBand appear in the dock? When I search for them, I cannot find them. When I go to the App Store to download them, it tell me that they are already downloaded. Where can I open these applications?
Answer: Another option is to click the magnifying glass in the upper right corner (Spotlight), and type the name of the application you're looking for.  Once the application is running, you can add it to the dock permanently by pressing control and clicking the trackpad over the application's icon, then selecting the Options and finally, the Keep in Dock option.
Answer: Apps reside in /Applications, available from the Finder sidebar. The Dock only shows applications which are default apps, installed by an installer that places the shortcut there (e.g. iWork '09) or that you place there yourself.
Answer: You can also find your Applications in Launchpad. The default gesture to get to Launchpad is to draw all 5 fingers from splayed to together on the trackpad.
Answer: Applications are not added to the dock as standard. If you want to find your apps, loca the launchpad icon in the dock.

And this will display your apps in an iPad style layout which you can page back and forth within.

You can drag the app from here to the dock if it as an app you use a lot.
You can always search via spotlight. Click the magnifying glass in the main menu at the top of your desktop and type the name of the app you are looking for.


I am wondering if this sentence is grammatically correct? Can I use this line in a letter?

Question: This letter is to inform you that the gender information of Rebecca and Thomas is already updated as female and male in our records.
Answer: A potential problem with this sentence (and one that I see very frequently working with people from certain countries) is the use of the word already. I assume someone issued a request here to update the gender records, and you completed the request? If that is right, you should not say is already updated, but instead, has been updated.
Is already updated means that it was updated before they even made the request. For example, if there were duplicate requests.
Using already can be taken as very slightly offensive because it can imply "you need not have made this request, we were already handling this issue before you said anything."
Comment: Here the customer is asking to update the gender information. But the gender information is already correct in our records. The information was correctly updated in our records when the policy was issued. Now, the customer is making request to update the same information. Hope I am clear.
Comment: Then it didn't need to be updated (corrected), so you could say that the information is _correctly stated in our records_.
Comment: @ShivnathKashyap - Looks like I shouldn't have assumed! Yes, *already* is fine in that case, and my answer is wrong. As Kate said, *updated* could be improved. Perhaps *is already correct* or even *is already up to date*. These are all pretty minor issues though -- your original is perfectly grammatical.


USB Drive doesn't mount

Question: I've got a USB flash drive which doesn't mount. It was so far only used on Windows Computer and there the user gets the message that you have to format it in order to use it correctly.
I plugged the drive in my computer and it doesn't mount. Using sudo fdisk -l gives me the output:
Disk /dev/sdc: 7839 MB, 7839154176 bytes
242 heads, 62 sectors/track, 1020 cylinders, total 15310848 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/sdc doesn't contain a valid partition table
I tried to mount it with mount, but that doesn't work as well.
I know there are some files on the drive, therefore is it possible to recover them or do I just have to format the whole drive in order to use it again?
Answer: This:

Disk /dev/sdc doesn't contain a valid partition table

... tells that there isn't likely to be any software that can "mount" the flash drive.
If you are sure there should be data on it; the disk recovery software is the only option.
Names to look for testdisk and photorec - there are a lot more to try out, google for it.

USB Drive doesn't mount


servers unusable after boot...piix4_smbus SMBus Host Controller has stopped loading during boot, Debian Testing, various kernels

Question: We have multiple old (14+ years) Tyan S3950 mobo servers running debian Unstable with various recent kernels like 6.1.0-3-amd64.
Despite being on the bleeding edge with the unstable distro, this has been a very reliable setup.  However, after a recent update, we had to reboot a couple of servers and both booted with NO network or console keyboard. ie, completely unusable.
I have been able to mount the failed server HDs on another server and compared dmesg logs from the failed and last successful boots. The failed boots were not detecting the floppy (I told you they were old) and not loading the kernel piix4_smbus driver. This is what a good boot dmesg log contains:
...
<code>Floppy drive(s): fd0 is 1.44M
piix4_smbus 0000:00:02.0: SMBus Host Controller at 0x580, revision 0
</code>
...
A failed boot did not have the above lines and subsequently failed to detect and enable the network interfaces and keyboard or any other usb devices.
FWIW, the 3ware RAID drivers are still loading fine in the bad boots. So some drivers are still loading.
This problem might stem from the ongoing Debian move to a merged-/usr system, but I have been unable to figure out how to determine that. The only hint I have is the last dbus package update, which we applied just before these failures, contained a warning about assuming that a system is fully merged-/usr system "In the case of dbus, the symptom when this assumption is broken is particularly bad (various key system services will not start". But, since this warning was in reference to a package dependency change and not to any specific code changes, I haven't reported this as a dbus bug yet.
At this point, I am not even sure what to ask. I expect the process that loads drivers during boot is not looking in the right place. But I don't know where to look for the drivers and even if I find them, what do I change to tell the system to look in the right place to find them?
If you can't tell, I am kinda lost right now. ;-)
Answer: After several days more research and testing I found that the problem has nothing to do with the debian switch to a merged-/usr system.
A few months ago we switched from initramfs-tools to tiny-initramfs because of a package conflict. However, we never actually tested tiny-imitramfs AND it was creating initfamfs.img files that lacked the missing drivers which could very well be a config problem on our part.
Anyway, we finally managed to fix this by booting the dead servers with a live flash drive, mounting the dead server raid into a chroot environment, switching the dead server back to initramfs-tools (the package conflict is gone now) and then rebuilding the initramfs.img files. A good description of the process is in the debian wiki at https://wiki.debian.org/RescueLive


Calling iframe function

Question: Is there a way to call a JavaScript function that is inside an IFrame from the parent?
Comment: Can you add more details of the page requirements? There might be alternatives to what you want to to.
Answer: That depends on the contents of the IFrame. If the content is from another domain then you're out of luck, as most modern browsers have closed that loophole for cross-site attacks.
However, if the content is from the SAME domain then you can use it as it were simply another method on the IFrame window object. If I recall correctly you can use something like window.frames["_your_IFrame_ID_"].window.functionOrMethodName().
Answer: Where are you wanting the function to be called against? Moreover, what are you wanting it to do?
When you call it are you wanting it to
1) Operate on items in the container page?
2) Operate on items in the IFrame itself
3) Be a generic function accessible by both container and frame.
As far as I am aware
1) Isn't possible
2) Might be possible, given Paulo Santos' answer.
3) Should put function in a common file.
Answer: As far as I know is this rather complicated. You can set up a Cross Domain Communication Channel. For Facebook applications this kind of thing is quite common.
This, of course, only works if both sites play along.

Calling iframe function


Mongodb php extension not loading. Linux centos 6 Plesk onyx php 5.6.31

Question: I have installed the lastest mongodb php driver on linux centos 6 with plesk onyx using the following commands.
<code>yum install plesk-php56-devel make gcc openssl-devel

/opt/plesk/php/5.6/bin/pecl install mongodb

echo "mongodb.so" > /opt/plesk/php/5.6/etc/php.d/mongodb.ini

plesk bin php_handler --reread
</code>
I have also added extension=mongodb.so to the php.ini file.
I also changed the cli version from php 5.3 to 5.6 before running the install as php needed to be at least 5.4 for the install to continue.
The mongodb section in now in my phpinfo() page. However the extension is not loaded when I test it in a php page.
When I try to reinstall I get this message:

PHP Warning:  PHP Startup: Unable to load dynamic library
  '/opt/plesk/php/5.6/lib64/php/modules/mongo.so' -
  /opt/plesk/php/5.6/lib64/php/modules/mongo.so: cannot open shared
  object file: No such file or directory in Unknown on line 0
  pecl/mongodb is already installed and is the same as the released
  version 1.2.9 install failed

Also, the line that says /opt/plesk/php/5.6/lib64/php/modules/mongo.so
refers to mongo.so when in actual fact the file present in the modules folder is mongodb.so
Does anyone have any suggestions or experience with this please?
Answer: For those facing the same issue. This was fixed by changing the extension name in the following file /opt/plesk/php/5.6/etc/php.d/mongodb.ini  from mongo.so to mongodb.so
And then remember to use the new mongo driver class ie MongoDB\Driver\


How to view balance sheet including trade profits/losses

Question: In Anno 1404, one of the primary means of earning income is through trade,  however I can't seem to find a way to view details like the profits earned by each particular trade route in a consolidated manner. Without such a view, it is difficult to ascertain whether the shortfall of income through taxation could be offset by income from trade to maintain a positive cash flow. Is there such a view?
Answer: It looks like you're out of luck. The Rock, Paper, Shotgun review thinks it would be handy:
Additionally, a detailed balance sheet showing where things are going would have been very useful – there is sadly only a small "income in/out" detail on your main wallet.
but it doesn't actually exist.
The rest of the review is here
Gameyum has a bit about budgeting taxes, building upkeep cost etc.
Balancing the budget requires constant attention to how much you're making. Dawn of Discovery thankfully makes this easy by including a small balance sheet which expands when you click on the part of the interface which shows how much money you have. The expanded balance sheet shows you how much you're making from taxes, how much you're spending on building upkeep, how much you're spending on ship upkeep, and how much you're losing to beggars (if any live in your city).
You can read their economy guide here
Dawn of Discovery is the American (and possibly other places) name for Anno 1404


Clear mappings in current buffer

Question: How can I disable all user mappings only for current buffer in vim? I've tried :mapclear but it removed mappings for all buffers.
Comment: if there is a global mapping `xxx`, do you also need to have `xxx` disabled for the current buffer?
Comment: @LiuSha Yep, all mappings if possible.
Answer: You might be looking for <buffer> argument.
This argument ensures that the command or the mapping will be effective only in the local buffer rather than the global buffer.
To clear all the user-mapping in the local buffer, :mapclear <buffer> should be used.
For more information, look at :h :map-<buffer>
Comment: You might misunderstand my question. The `` argument is for removing local buffer mappings, but what I want to do is remove all mappings temporarily for the current buffer.
Comment: @theJian.. I'm looking up for this as well and ended up here. have you solved this?
Comment: @JohnFredFadrigalan Unfortunately no, this snippet is the temporary solution I've used.
https://gist.github.com/theJian/beb8519127b9209f644197a09620d939
Answer: Here is the temporary solution I've found so far.
let lowercase = 'abcdefghijklmnopqrstuvwxyz'
let uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
let numbers = '0123456789'
let punctuation = "<>`@#~!\"$%^&/()=+*-_.,;:?\\\'{}[] " " and space
for str in [lowercase, uppercase, numbers, punctuation]
    for key in split(str, '\zs')
        execute printf("noremap <silent> <buffer> <nowait> %s :call DO_SOMETHING_OR_NOTHING<cr>", key)
    endfor
endfor

Basically this snippet will remap all the normal mappings for local buffer.
Comment: how about the `-` mappings
Answer: The problem can be easily solved now if your vim version is >= 9.0, since you can get all the mappings through the maplist() function and set new mappings by calling the mapset() function. You just need to do some buffer-local mappings by remapping each previously mapped key sequence to itself.
for mapitem in maplist()
    call mapset(mapitem->extend(#{expr: 0, noremap: 1, rhs: mapitem.lhs, buffer: 1, silent: 1}))
endfor

The following script can also preserve the previously defined buffer-local mappings and will not overwrite them. If you are confused about the code, see :h maplist(), :h mapset(), :h filter(), :h map(), :h lambda, etc.
let bufmapsave = maplist()->filter('v:val.buffer == 1')
for mapitem in map(
    \ maplist()->filter('v:val.buffer == 0'),
    \ {_, val -> val->extend(#{expr: 0, noremap: 1, rhs: val.lhs, buffer: 1, silent: 1})})
    call mapset(mapitem)
endfor
for mapitem in bufmapsave
    call mapset(mapitem)
endfor

I've also worked out a solution for lower vim versions. We can use the execute() function (or the :redir command), which stringifies the output of a command. The mappings whose attr starts with @, *@ or &@ are buffer-local mappings (see :h map-listing). See :h execute(), :h :redir, :h split(), :h :let-unpack, :h expr-=~, :h add(), :h index(), etc. for more help.
let bufmapsave = []
let mapitems = []
for mapitem in split(execute('map | map!'), '\n\+')
    let [mapmode, lhs, attr; _] = split(mapitem, '\s\+', 1)
    if attr =~ '^[*&]\?@'
        call add(bufmapsave, lhs)
    else
        call add(mapitems, [mapmode, lhs])
    endif
endfor
for mapitem in mapitems
    let [mapmode, lhs] = mapitem
    if index(bufmapsave, lhs) == -1
        let mapcmd = mapmode == '!' ? 'noremap!' : (mapmode . 'noremap')
        silent exec mapcmd . ' <buffer> <silent> ' . lhs . ' ' . lhs
    endif
endfor

Clear mappings in current buffer


Are universal apps any less efficient than platform-specific apps?

Question: I have once seen a universal download for an app. It was said to work on Windows, MacOS, and Linux. If the exact same app is designed to work on three different without changing any code. For example, Java can be made to run cross platform. Are there performance benefits to creating platform specific apps rather than creating a universal app, where the download is designed to run on all platforms?
Answer: There are no apps that natively run on Windows, Linux and MacOS as a single binary. There are a couple approaches to multiplatform applications:

Use a runtime that runs on multiple platforms, for example Java. If you target Java instead of an operating system, it will run as long as the user has Java installed. However, Java needs to be installed on Windows or Linux (and presumably MacOS) before anything would run.

Use a framework or library that lets you target different environments at compile time

I think the main disadvantage is not performance, it's that the resulting app will mismatch the target OS in how it looks and which features it can take advantage of. Multiplatform apps often don't follow the conventions for the target OS and that raises the bar of entry for the user. For example, Visual Studio code looks nothing like a Windows application on Windows (although to their credit it tries very hard). Good luck printing anything.
But then again a lot of apps don't need a lot of OS integration (who prints out their code?) and the benefit of not spending resources on managing operating systems outweighs the disadvantages
Comment: Your main disadvantage depends on the "universal' framework you build upon.  If you target Xamarin for example, its possible to share a great deal of code AND have a native look and feel.


Moving $HOME to /local/name123 on RHEL 7.6 (Maipo)

Question: I don't have root rights on this machine. But I have two directories in which I can do basically everything, the original home (/home/name123) has only 1 GB space and the /local/name123 has 1 TB of space. I would like to move my $HOME variable permanently to the partition with 1 TB. Is it enough to just copy all config files to the new location and set $HOME to it or do I have to expect certain problems?
Answer: You could copy all directory content with:
cp -p -r /home/name123/* /local/name123/

-p to preserver permissions and -r to copy folders and everything inside them (recursevely)
You need root permissions to set the new home directory for name123 user:
usermod -d /local/name123 name123


How to add secure FTP capabilities to a .NET application

Question: I'm rewriting an in-house client-server application as a .NET MVC application. It needs to send and receive files via secure FTP. The original application was client-server and used MOVEit Freely to do SFTP. Is there a library or product I can use to do it from within .NET?
Comment: You might want to edit the subject to say SFTP vs FTP, two very different animals.
Answer: http://www.enterprisedt.com/products/edtftpnet/overview.html
Answer: Just use the built-in FtpWebRequest and FtpWebResponse classes.
Comment: Watch out for the folks who are selling something apparently.  They'll mod you to hell.  +1 to get you out of the negative.
Comment: There are a lot of comments above stating that they don't offer SFTP support - those comments would be true!
Answer: Have a look at SharpSSH, I know they have support for sftp, don't know how hard it will be to write the server side.
Answer: Our Rebex File Transfer Pack supports both variants of Secure FTP - the SFTP and FTPS (FTP/SSL).
Answer: If you don't want to pay anything, you can easily use the built-in FtpWebRequest for vanilla FTP and FTPES (explicit FTP with SSL).  For FTPS (implicit FTP+SSL), I recommend Alex FTPS Client.  And finally, for SFTP (FTP over SSH), you can use SharpSSH.  This method isn't for everyone - it's really just for the cheap skate.  But, I've been using this combo for all my data transfer needs in a production environment and it works great.  The products are stale, but the protocols are stable, so who cares.
Answer: Take a look at edtFTPnet/PRO, which offers full support for SFTP in .NET.
You might also want to take a look at CompleteFTP, which is a fast, compact SFTP server for Windows platforms (it also supports FTP and FTPS).
I might add that using the term "Secure FTP" can be rather confusing. It can mean SFTP, which is a secure file transfer protocol that runs over SSH. Or it can mean FTPS, which is basically standard FTP commands running over an SSL connection.
Answer: This is native in .NET. The classes you want resides in the System.Net namespace. Take a look at FtpWebRequest and FtpWebResponse classes. Happy coding :)
Comment: No, they don't have Secure FTP support.
Comment: I don't think there's SFTP support is there?
Comment: There's support for FTPES (explicit ftp + ssl).  The security mechanism wasn't specified by the author, and this is plenty secure after the initial connection negotiation.
Answer: I was involved in creating MOVEit Freely.  It never had support for SFTP over SSH - it only had support for FTP/S.  Its original role was to be a "drop-in" command-for-command replacement of Microsoft's FTP.exe client - with extra support for SSL/TLS.
MOVEit Freely was originally built on top of a Dundas FTP/S stack, but we heavily modifed the original source code as FTP/S evolved.  (We got in a bit early.)   These days Dundas is focused on Dashboard components and the license agreement we signed with Dundas said that we'd never publish a standalone FTP/S component based on their code.  (That's standard for that kind of OEM license.)  In other words, I'd check out one of the Windows-based recommendations above.  (I recommend components from \n software, and also like the Rebex offering on Windows.)


What is the best place to grind experience?

Question: What locations are the best to farm for experience? I'm looking for those only after starting the World of Ruin and before end-game boss fights.
Answer: I like to fight the dinosaurs in the "dinosaur shaped forest" in the World of Ruin when I'm trying to level my characters.  This forest is located on an island in the northeastern part of the map, just west of Triangle Island.  I believe Brachiosaurs and Tyrannosaurs spawn here.
If you know Vanish and X-Zone, and have the Gem Box (aka Soul of Thamasa), you can double-cast these two spells on them to kill them instantly.  The GBA version closes this loophole, but I don't know which version you're playing.  Brachiosaurs frequently drop Economizers (aka Celestriads), and you can sometimes steal Ribbons from them, which is an extra boon.
If you're trying to level your whole party, you can leave one high-level magic user in while you gain levels on the others, so that you can power level the rest of the active team.  The Brachiosaur casts very high level magic very quickly, so having appropriate speed enhancing relics is also a plus.
If you're not high enough level for this forest yet, you might try the Veldt, which has the advantage of teaching Gau new abilities if you have him in your party and Leap when you encounter something new.
Comment: I forgot about the X-Zone trick. That still grants experience if you kill them that way?
Comment: Yep, it counts as a kill if you kill them this way.  I think the guardian at the top of the tower where you get the Gem Box will cast Vanish on himself, which makes that fight a one-hit kill :)
Comment: Heh, okay :)  Enjoy!  Don't forget to save between fights, in case something goes pear-shaped...
Answer: Along with XP grinding, there is the question of MP grinding. The answer to that is the desert area just south of Maranda. Hoovers are high on HP, but I've found using Offering + a weapon with a instant kill chance CAN end the fight quickly, before he starts using "Crush" to instant kill your toons. 5MP per hoover isn't bad and the XP is pretty good as well.
Also located there are the Cactuars, worth 10MP / kill, but no XP. For an easy time with them, equip the Atma Weapon and give them Sniper Sight relic. The 100% hit rate ensures the hit, and the Atma Weapon does damage based on your character's HP, ignoring all defenses, just like Edgar and his drill, IF he actually hits with the drill. Since Sniper Sight only applies to "fight" command, this combo of weapon and relic guarantees a one shot kill on the little buggers, putting 10 Magic Points in your pocket, along with 10k gold no matter who you put them on. So if you need to learn spells quickly from espers, this method will do the trick. After ten cactuar kills, just avoid the center tile on the lover left portion of the desert, so you don't run into the Gigantuar...unless you're ready for him!
Answer: I leveled my characters at the desert just below Jidoor. There are cactuars and Slagworms. Cactuars gives 10 magic AP and 10,000 Gil per round. But you will encounter Slagworms most of the time. These slagworms are very hard to kill if you dont have a good damager and defense. I used Sabin, Locke, and Cyan as my damage taker. So the experience you get is ridiculously high. After you have enough level, make sure that to power up locke and give him the following:
Relics: Genji Glove and Master's Scroll
Weapon: Ultima Weapon x2 or Light Bringer x2
Armor: (Any armor that have Anti-Magic)
Well it only takes 1 attack command to kill.
Make sure ur HP is 9999
Answer: Right next to DOMA in the WoR you fight solo, with invisible status... The enemies can't touch you.  If you are using 2x experience egg then you will be gaining almost 20k experience or something like that PER battle.  You can easily get to level 99 this way within 1-2 hours... In this game one character in the high 90's is pretty much undefeatable.  The first time I beat this game I did this with 3 characters and ran Kefka's tower with 3 parties of 1 level 99 character lol.
Answer: I've always filled up in the desert south of Miranda for the obvious 5MP (Hoover) or 10MP (Cactuar).
As others have mentioned, the Cactuar gives no XP, but the Hoover gives nearly 2,000 per battle.
What the other answers have missed, however, is how painlessly this desert can be grinded.
I've played this game several times as a kid and am going through it again, and, let me tell you, this trick is as easy as pie as ever.
Firstly, make sure everyone has vanish (summoning phantom makes this part a sinch) before going to the desert. You will only need to do this once.
Then, just make sure you have a person who can use tools (Edgar or Gogo, even better to go half and half with them to split up the experience).
If you encounter Cactuar, pass the turn to the tool user and use the "Drill" for an instant kill.  I've never had him 10,000 needles me before he dies, as long as I was paying attention.
If you encounter Hoover, again, go straight to your tool user and hit him with an "Air Anchor."  He WILL NOT counter with Sandstorm. Then just wait for him to attack or use Crush (which will miss because you're invisible) and he instantly dies, every time.
You can effectively grind this desert as fast as possible without taking so much as a single HP of damage.
I've only ever played this game on the SNES or Playstation platforms, so I can't speak for the other versions, but on these, this method is flawless.