Can a filter change the frequency of the input signal?

Question: I am given a square wave with Vmin = 0V and Vmax=5V , T(period)=8ms and duty cycle 25%. I am asked to find the properties(low cutoff , high cutoff , bandwidth) of a band pass filter that will make the signal a sine with T=4ms. My answer would be that the Δf = 1/Δt where Δt=4ms . So the Δf=250Hz and therefore the actual value of lowcutoff and highcutoff doesn't matter as long as their difference is 250Hz. It was pointed to me that this is wrong , I don't understand why. What would be the right answer to this problem?
Comment: Are you familiar with Fourier transforms?
Comment: @vofa yes quite a bit
Comment: Bandpass filters ring near their center frequency, which is not the difference of Fhigh and Flow. Thus bandpass with Flow of 1875Hz and Fupper of 2125 (difference of 250 Hz) will ring near 2,000Hz.
Answer: You can express the pulse train as a sum of sine waves. The second harmonic is at 250Hz. Your bandpass filter needs to be centered at 250Hz with a bandwidth sufficiently narrow to block the higher harmonics and the fundamental.
Here's a crude LTSpice simulation.
Answer:
Can a filter change the frequency of the input signal?

Well, sort of, in a manner of speaking. You have described the input signal as a pulse train with frequency of 125 Hz and a duty cycle of 25%. Since you claim to be quite familiar with Fourier transforms, you must have recognized that the spectrum of the signal will contain components of 125 Hz and its harmonics (250, 375, 500, 625, etc). Then you can filter out any of these, producing an output at a frequency different from the fundamental (125 Hz) of the input. Furthermore, the output amplitude of the filter will be proportional to the amplitude of the input, so you can speak of "changing" the input frequency. Whether you want to call this changing, or selecting a part of the input is up to you.

the actual value of lowcutoff and highcutoff doesn't matter as long as
  their difference is 250Hz. It was pointed to me that this is wrong , I
  don't understand why.

Come, let us reason together. Let's assume a perfect, brickwall filter, with a lowpass cutoff of 100 Hz and a high-pass of 350. This will let both the 125 Hz and 250 Hz components of the original pass. I've not done a detailed analysis, but the 125 Hz component will be larger than the 250 Hz, and depending on the exact relative amplitudes the output will be either 125 or 250 Hz. And the situation will become even more complex if you use low-order filters with gradual rolloff. Then NO component will be completely suppressed.
Even worse, let's say the lowpass frequency is 950 Hz and the high-pass is 1200. The difference is 250 Hz, right? Then the frequencies passed to the output will be 1000 Hz and 1125 Hz (again, for brickwall filters). Do you really think that this will produce a 250 Hz signal?
Answer: You have highly non-symmetric 125Hz rectangular pulse train. It really happens to have also 250Hz component when expressed as a sum of pure sinusoidal voltages. Symmetric square wave  (the durations of both halves =equally long) wouldn't have anything at 250Hz.
Generally filters do not change the frequencies of the spectral components of the input signal, only attenuate or amplify some of them. Your case: You want to pass 250Hz component through and remove others (=0Hz, N*125Hz where N= 3,4,5,...)
Your easiest filter to extract the 250Hz component is a high Q (=narrow bandwidth) 2nd order bandpass filter with 250Hz center frequency. You should have a spec, how much content at other frequencies is allowed. Without that spec you cannot decide the exact needed Q.
Of course you could say "attenuate fully off everything else, but leave the 250Hz component as is. Unfortunately such practical filters do not exist, all designs are based on how much the wanted frequency components are allowed to get attenuated and how much attenuation is the minimum for unwanted components.
Answer:
Can a filter change the frequency of the input signal?

I wouldn't call it "changing frequency", but that is... indirectly what you are doing if you remove all other harmonics except for one specific frequency.
In your case you have many harmonics, the 250 Hz being one of them. So all you need to do is to make a sharp band pass filter centered around 250 Hz.
However, you can't change a 100 Hz sine wave into a 133 Hz (or any other than 100 Hz) sine wave with only passive components.
I'd go with the following settings, assuming a very high filter order:

low cutoff: 249 Hz
high cutoff: 251 Hz
bandwidth: 2 Hz

It's like asking this question:

Can a person turn a car into a steering wheel?

Sure, remove the entire car except for the steering wheel and there you go. You've changed the car into a steering wheel.
But you can't change the car into a rock, because there's no rock inside of a car.
Answer: You are trying to select the second harmonic from a signal which contains many harmonics of 125 Hz. Therefore the BW must be substantially less than 125 Hz to avoid selecting more than one harmonic.
The lower frequency cutoff needs to be somewhere between 125 Hz and 250 Hz. The upper frequency cutoff needs to be somewhere between 250 and 375 Hz. I would suggest putting the lower cutoff at sqrt(125*250) and the upper cutoff at sqrt(250*375). I believe this will give you the best balance between maintaining high gain in the pass-band, and maximizing attenuation in the reject band.
Answer: Linear passive analog circuits implement the Convolution (akin to correlation) of the input time waveform with the circuit's impulse response.
What we have been taught to be "harmonics" are simply the combined forced and natural responses of the circuit. Bluntly, harmonics do not exist, instead are an artifact (a useful artifact, for thinking about power) of the math.
That said, here is Signal Wave Explorer with 125 Hz input, 25% duty cycle, 2.5% sample spacing (so the high time and the low time have exact integer # samples), with zero-time rise and fall.
The "system" is L+C filter with Q of 10: 1uF, 405milliHenry, Rloss of 66 ohms.
Note from plot #4 (counting from the top) there is still some 2nd harmonic. And the output time waveform shows amplitude variation.


How to display a bar chart for users' test scores if you have more than 50 users

Question: For an admin panel I have to present visually the employees' test scores and after lots of searching to decide which data visualization is the best I decided to choose the vertical bar chart but as the number of employees can increase up to more than 50 I can not use the vertical bar chart so I change it to horizontal one but the problem is it gets too long and the admin has to scroll down to see all the employees' score and can't make a good comparison of all the scores.
So can anyone help me with how can I show all scores in one visual element without too much scrolling?
Comment: In his answer Mike suggests "Think about what the real task of the admin is here". Once you can define the tasks admins need to accomplish you'll be able to design the data controls needed. I question the assertion admins need to "make a good comparison of all the scores.". ...too broad, general, and vague to qualify as a design requirement.
Comment: Consider a histogram for large-scale comparison.
Answer: Think about what the real task of the admin is here

the admin has to scroll down to see all the employees' score and can't make a good comparison of all the scores.

Space will almost always be an issue in most UI (what happens when it's 100 employees?). What you could do, is use a kind of search and filter, where you could pull up a number of employees at once.
It seems like the core task is comparison and finding employees to see where they sit on the chart.
If I have 50 employees, I can't compare all 50 at once (especially if I'm looking around for several at a time, and I have to keep scanning up and down the list), but I might have several I wish to compare (or a team), but each sits at different positions in the ranking order.
Here's a rough sketch of an idea:

A lot of data visualization and dashboards uses a pattern of getting the big picture first (the larger graph), then drilling into details (filtering).
Comment: Thanks. Your solution sounds great.
Comment: @bloodyKnuckles
 Yes, you are right thanks. What I have found from the user research was that admins need to compare employees' performance based on age and gender. I think I should consider the gender and age filter.
Comment: @Luke Sawczak Thanks alot
I didn't have experience designing a histogram before, but I will try to see how it works here in my project.


Temperature Control Problems in Bedroom

Question: One of the bedrooms in my house has a problem heat in the summer and cold in the winter. It being summer here, it's immediately warmer in the room as soon as you step in from the hallway. The problems has gotten worse with time over the last several years. We've sent people up to check out the AC unit and make sure we're not just venting cold air into the attic, but every one we've sent up has said it's not related to the AC. We then had more insulation blown into the attic, with extra being placed in the back where the bedroom is. Our next step is opening the walls and replacing the insulation there, as the bedroom has three exterior walls. Does anyone have an idea if it could be anything else?
Comment: it might be your AC duct is not distributing the airflow properly, there is a distribution box attached to the air handler - more or less air will be diverted to any particular area by that distribution box. For me I had one room facing the morning sun [Central Florida]  the duct for that room was too small - I enlarged the duct size to fix that. Your problem sounds similar not enough airflow. Getting worse over the years I suspect you also have a fan that is wearing out (going slower) moving less air.
Comment: We have a ac unit we use during the summers in the bedroom, and once we cool down the room we've noticed it doesn't take very long for the temperature to rise again, which is why we've been led to believe it is an issue with insufficient insulation rather than the unit. I will definitely have someone check that out though!
Comment: I understand - you should get a different AC person to look and explain the situation to them - installing a window AC to try and get it to cool down on top of using Central AC should never happen. That is a tell tale sign the air flow into that room is too little - insulating the walls will certainly help but that is a more expensive route..
Comment: One thing to check; since most people have commented on having reduced air flow by some means, I would have to ask if you regularly change the air filter in your air-handler and is it a good quality filter. If the answer is "no" to both then I would buy a better filter and have an HVAC guy check for a dirty coil in the air-handler. Dirty coils reduce the amount of air flow. Also see if you can get more air into the room (another duct , larger duct, adjust dampers, etc.) One last item, more insulation can become a heat sink that dumps heat long after the sun goes down.
Answer: I would check / change the distribution box next to the Air Handler and the duct size to that particular room.
Engineering wise it was probably sized for the room not for the fact that it has 3 walls to the outside!
Why over time has it become worse ?
Good question now to the second issue you have.
Your Fan in the Air handler is not running as fast as it used to, bad bearings, bad capacitor or some other failure. Your system could have a blockage of sorts as well.

I would change the duct size and also adjust the distribution box to move more air to that room.
Check the Fan, the Fan bearings / check or replace the Fan capacitor.
Comment: I had a similar problem where 1 of 2 upstairs bedrooms was hot in summer cold in winter same size duct as the other bedroom but this one was on the south side of the home. Increasing the duct size and the register took care of the problem. Flex ducting is cheap the register to match the others was a bit expensive and this is not hard to do if you don't mind crawling in the attic.
Answer: If this is the only room with 3 walls then that is probably the reason for the difference temperatures in that room compared to the rest of the house. For example; a room with 1 wall has a heat loss or heat gain from 2 surfaces, the (ceiling and that 1 wall) a room with 2 walls has a heat loss or heat gain from 3 surfaces, (the ceiling and those 2 walls) and so forth. Solutions to this problem are few. In my house just north of Pittsburgh, Pa. I have a bedroom with 1 extra wall and it is the room that is hard to heat and hard to cool. To help this room I run the furnace fan 24 hours a day on a low speed for continuous air circulation. This helps to even out the temperature but there is still a difference from the rest of the house. Nothing I have done in the 18 years we have lived here has corrected the problem. Adding an extra supply duct did the most to correct this problem. When you have a room with extra walls the best solution would be to have a separate heat/cool unit for that room but that is not cost effective. Hope this Information helps. Lastly  what type air ducting system do you have and do you have a central return or a return in each room, do the doors stay open in this room. More info will help people make better suggestions.

Temperature Control Problems in Bedroom


How do I backup and external hard drive (iPhoto Library) to another external hard drive?

Question: My iPhoto Library is on an external hard drive.  I want to copy it to another hard drive as a back up.  It looks like Time Machine only backups the internal hard drive and selected externals.  I don't want to back up my internal.  I only want to backup my external.  What do i do?  What programs will do this?  If Time Machine does do this, please explain how.  I don't see that option.
Comment: I already have a seperate external for the internal hard drive. Perhaps should I backup the internal and the iPhoto on one external?  My iPhoto external is a 2 terrabyte. The time machine backup for the internal is a 1 terrabyte . I have one more external which I was originally planning on using for the backup of the iPhoto, also a 2 terabyte.  We have so many photos I thought it needed it's iwn large external drive.
Comment: Is 2 terrabyte enough space for the internal backup and an external iPhoto?  Or should I keep them seperate?  Thank you so much.
Answer: Well first I would ask you: why in the world would you not want to back up your internal drive?
Second, you could easily set up Time Machine, but simply add the internal drive to the exclusions.
Comment: Really?  It's that simple?!!!  Just drag and drop or copy/paste?!  Crazy. I will try that. Thank you.
Answer: Copying files/folders/bundles etc. from one location to another is basic Finder 101.  Have a look at Mac Basics: The Finder organizes all of your files to gain a more complete understanding of the Finder app.  While the KB doesn't explicitly mention "Copy" nonetheless you'll see it on the picture of the Toolbar Action menu.
Drag and Drop works too as well as standard Keyboard shortcuts like ⌘C for Copy and ⌘V for Paste, which are on the Edit menu.
So in Finder, select your target files/folders/bundles etc. and preform the requisite actions in one form or combination thereof.
Using the iPhoto Library bundle as an example, you'd select it in Finder and then press ⌘C and then navigate to the location you want the copy and then press ⌘V.  This action will then copy the iPhoto Library bundle from its source location to is destination location.
If you do not what to do this manually all the time you could script it in many different ways or simple use Time Machine to keep it backed up.
Since you do not want the internal drive (Macintosh HD) backed up, go to System Preferences > Time Machine > Options and add the Macintosh HD to the Exclude these items from backup list while making sure the source external drive containing the iPhoto Library bundle is not in the list.  Note that the drive must be mounted to see it in the list.
Save the changes and now back at the main Time Machine panel click the Select Disk... button and select the other external drive you want to use for the Time Machine backups.  Note that both the source and destinations disks must be formatted with the native OS X filesystem for this to work.
Then if the Time Machine OFF/ON switch is the to OFF set it to ON.


How can I identify in advance if the air is going to be clear or not?

Question: When shooting a panorama it is very important that the air is as clear as possible, so that the entire scene is lit evenly. But how can I predict in advance if the air is going to be particularly clear? Is that information available somewhere in weather reports?
Comment: Related: [Is there a way to predict haze for a given region/day?](//photo.stackexchange.com/q/95298)
Answer: You might want to look at weather forecasts for astronomy - some of these sites go into more details than generic weather forecasts, and have predictions for things of interest to astronomers, including seeing (how steady/turbulent the atmosphere is) and transparency (how clear the atmosphere is).
A web search for "astronomical weather forecasts" will find lots of sites
(They do forecasts for the whole day, not just nighttime).
For example, this site https://in-the-sky.org/weather.php graphs predicted cloud cover, transparency, seeing, humidity and temperature.
Usual disclaimers apply - as that site says: "Use them with caution and at your own risk. They are always subject to a high degree of uncertainty and weather conditions may change at short notice."
But they can be useful - and there are a number of smartphone apps available that can access the same data, as well as the web sites.
Comment: This astronomical weather site is also good: http://www.cleardarksky.com/
Answer: I have no idea if this holds true, but in growing up in Phoenix, AZ...the city is massive and sits within a valley, so it usually has a constant smog bubble. That bubble usually gets pushed out during thunderstorms, when wind and rain can get rid of it.
From that, I can only pose that, the best and clearest skies will be available the day after a good storm.
Answer: Visibility is very important as well for sailing/boating and flying. This is a forecast of weather models among other better known such as cloud coverage, rain, winds, ... So when I want to check whether conditions for a panorama shooting or for any outdoor shooting, I am using websites/apps which display the results of global weather models like for instance https://www.windy.com and I select "visibility" (right panel for windy on desktop). I would also check "winds", and "clouds" (and rain of course) as they are also important for outdoor shooting but it is easier to find them, fair enough. There are many different whether models and you should use the weather model which is a good match for your location and/or cross checks different models (you will find more details at: https://www.meteoblue.com/en/weather/forecast/multimodel/). I would go for a fine grain model and short term model as transparency/visibility can depend from local effects.


How can I get out of social situations with my boss

Question: I started working at a thrift store and my first week the owner of the store asked me out. everyone seemed to hang out there so I said it would be okay if he met me and my sister out for drinks but I realized right away that I didn't want to go out with him in a social setting like that although I enjoyed talking to him at work. over time he grew very fond of me and kept asking me out I agreed to go out on to dinner with him but after that I ended up blowing him off which caused a lot of resentment in the workplace. I even had to find a new job the treantment was too unfair but then i was promoted to manager and he is asking to hang out again. I only have one day off a week and I really don't want to spend it with him, so I don't know how to go about keeping the working friendship without having to make an excuse for why I can't hang out every weekend... is my job secure if I am honest and say no thank you I'm busy
Comment: You had to quit, but now you're manager at the same place? ... Other than that, we can't possibly know if your job is secure.
Comment: Please don't make more work for other people by vandalizing your posts. By posting on the Stack Exchange (SE) network, you've granted a non-revocable right, under the [CC BY-SA 3.0 license](https://creativecommons.org/licenses/by-sa/3.0) for SE to distribute that content. By SE policy, any vandalism will be reverted. If you want to know more about deleting a post, please take a look at: [How does deleting work?](https://meta.stackexchange.com/q/5221)
Comment: That wall of text is a bit difficult to read. Some punctuation & formatting would go a long way.
Comment: I think it's important that you make your point known. The owner may have kept you on purely in an attempt to go out with you. It's impossible to prove but overall what is clear is that it may worsen as the owner might feel that you are obligated to go out with him after several advancements. It's better to make it clear now that you're just not interested and hope that your position isn't compromised. Prepare yourself if such a thing happen.
Comment: Possible duplicate of [How can I politely decline my boss's invitations to social events after-hours or on the weekend](http://workplace.stackexchange.com/questions/55122/how-can-i-politely-decline-my-bosss-invitations-to-social-events-after-hours-or)
Answer: If I understand correctly, you were unhappy and found a new job but received an offer of a promotion and decided to stay.  The store owner is behaving unprofessionally and by leading you to believe that dating him is in any way related to how you are treated as an employee is likely sexual harassment.  Unfortunately the consequences of sexual harassment vary a lot by country so without know where you are from it's difficult to go into any more depth regarding that.  Stick to your guns and be honest "I'm not really interested in hanging outside of work."
Comment: I don't think what the OP said qualifies as sexual harassment. Just a persisting advancement that hasn't yet been fully answered with a firm yes or no. The OP needs to firmly say NO, I am NOT interested in going out with you now or ever. From there, the OP may lose her job as the owner may have kept her on just in the hopes of going out with her.
Comment: *which caused a lot of resentment in the workplace* I believe this statement strongly hints at  sexual harassment as her choosing not to accept his advances led to unfavorable treatment within the workplace.  Exact definition of sexual harassment will vary country to country but the Ontario human rights commission states "Section 7(3)(a) of the Code sets out a person's right to be free from unwelcome sexual advances or solicitation from a person who is in a position to grant or deny a benefit".


How did they manage the return home?

Question: After blowing up the airlock to slow down sufficiently to rescue Mark at the end of The Martian, how did the crew make it back to Earth with the change in velocity having exhausted all their fuel?
Comment: I suspect potatoes were involved, somehow.
Comment: Mission control they had calculated that the maneuver would work and get them back to Earth with plenty of food, water, air, and fuel. So they hadn't expended all their fuel. I would submit this as an answer, but at the moment I can't remember why they blew the airlock door, instead of just burning some fuel.
Comment: @BrettFromLA They had to use fuel to get closer to Mark's MAV, but they wouldn't have enough fuel or time to slow down (they were flying by MAV with speed of 40 m/s - too fast to catch Mark). So they blew an airlock and used air within ship to lower their speed over MAV quickly.
Answer: The Hermes is on a slingshot around Mars, it doesn't enter an orbit.  They are arranging for the MAV to launch to meet its speed as it makes its one fast pass around the planet.
After they maneuver to intercept Mark the velocity (between the Hermes and Mark) before they blow the airlock was around 40 m/s (130 ft/s).
Beck says that he can catch and hold Mark at any speed up to 10 m/s (33 ft/s) obviously the slower the better.
The difference between 10 and 40 meters per second is huge if you are having to catch someone with your arms, it is absolutely minuscule when it comes to the velocity they are actually moving at around Mars and the velocity that they reach when traveling between Mars and Earth.
The fuel reserves that Martinez talks about is the fuel for the maneuvering jets, not the main 'engine' of the Hermes - which is some sort of ion engine that has a very low thrust but can run continuously for months or years.
So Martinez has used up a lot of the reserve for the maneuvering jets getting their path around Mars such that they intercept Mark, but they still have plenty of fuel to get home.
They blew the airlock because they needed a significant change in intercept velocity in the few minutes they had available.  The main drive of the ship is too low a thrust to achieve that in the same timescale.  They are still travelling at a huge speed around Mars on a slingshot back to Earth.

How did they manage the return home?


How to handle this copy-paste question?

Question: Here I found a copy-paste question. How should we handle this case? (also read the comments)
Answer: Since you don't have the ability to vote to close and if you really think it should be looked at, you can flag the question as missing context. Click flag post and you will see

Choose off topic and then you will see

Click the radio button and submit.
As a note, the question in the background was the first question I came across so I used it as an example. I am not passing any judgment on the merits of that question just providing an example.

How to handle this copy-paste question?


Blower motor turns on before furnace heats up all the way

Question: I have a Honeywell furnace and when it starts the exhaust fan kicks on then the flame starts (it's a propane furnace) it warms up between 30 seconds to a minute then the main blower kicks on but it blows out cold air for about 3 to 4 minutes before it starts to blow out warm air and about 6 minutes before it gets hot.  I'm wondering if there is a regulatory or resister that is bad it has been wasting a lot of propane running like this.
Comment: This is normal there is no way to heat all the air in the ductwork, the only way I know how to eliminate this is mini splits or baseboard heaters in each room.
Comment: What's the model of the furnace? Some units have adjustable blower controls, that allow you to change the delay.
Comment: Where does your ductwork run?  Attic? Unheated crawlspace?  It might be that insulation needs to be added.  I've seen heat duct blow artic air as they start because the ducts are uninsulated and running thru attic space.   If you don't understand forced air furnaces it might be helpful to pay a well known and respected heating and cooling company to come and help you evaluate how to improve the system.
Comment: There's really no "heating up" involved with a modern furnace. The reason there's a delay is so that the various component systems can come on in the appropriate order and be tested for safety. Almost as soon as the burners are running fully the fan should come on.
Comment: You could leave the fan running continuously as many people do.   It keeps the temperatures in the house more even and the air cleaner as it is always being filtered.
Answer: No, that sounds like it's running correctly. If you want to adjust the timing, you can install an On Delay Timer on your circulation fan. You can use the ICM251 Fan Blower Control - Dual On/Off Delay Timer. It has an Adjustable Time Delay, and a 20 amp 120 volt relay built in. The On delay lets air reach proper level prior to energizing fan, and the off delay purges ducts of residual air to increase efficiency.
Comment: Depending on the furnace, it may already have an adjustable blower control.
Comment: There will always be some cold air coming from the ductwork (or hot in the summer) no matter how long the heat/cooling system is running , some systems run at a low speed for several minutes so the cool/ hot air flow is not as noticeable but it takes time with a forced air system, no way around this.
Answer: Check the thermostat to make sure it is not setup for electric heat.  There is a menu item to change the setting from gas to electric in the electronic thermostats. Mine was set to electric and my blower motor came on as soon as it called for heat.  It went off after about 10 seconds and came back on when the furnace heated up enough to start to blow warm air into the ductwork.


What is the gbas.so file on my home directory?

Question: I delete the gbas.so file from my home directory but it keeps coming back. Where does it come from?
Comment: From the terminal run: strings gbas.so , it will dump text strings from the file, it might provide a clue about the source.
Comment: No Ubuntu package would write a library file on the user's home directory. So, chances are, this is being written by some other binary. But we need more data to find out.

(BTW, I ran 'apt-file /gbas.so', and got no hits for Oneiric -- which pretty much means this is not from an Ubuntu Oneiric package.)

(1) we need to know what type of file this is. Please run, as neelar asked above, 'file gbas.so' (when you see the file present). Post the result.

(2) tell us what version of Ubuntu you are running (you can run 'lsb_release -a' on a terminal).

Then, perhaps, we can find more.
Comment: do you have any programs that use gambas on your system? I recall some program once creating something like this on my system all the time that was written in gambas.
Comment: can you past out of the following command 'file gbas.so' where gbas.so is the file. .so are usually c binary file like windows dll's.
Answer: As mentioned by nelaar, ".so" files are usually shared binary libraries. Try doing "readelf -a gbas.so", it might give you some information about what the file contains (if it really is a library file).
Answer: It is related to the safety solution of Banco do Brasil. The java applet downloads these files everytime you access your homebanking.
Source: http://forum.hangarnet.com.br/index.php?s=3a31531547e19169ccd875e5da79ffec&showtopic=111569&view=findpost&p=2446818
Answer: Open up Synaptic package manager and search for this file to see which package does this belongs to.
Comment: The file is being created in the user's home directory, and it is being created dynamically, which means that is not one of the files in a package manifest, which means it will not show up in this kind of search. (Actually, I also know it won't because I've searched for it...but even if it did, there would be no reason to think that the search results would be related to the current situation.)


How to post to SharePoint NewsFeed using Remote Event Receiver?

Question: I tried to post to SharePoint NewsFeed via Remote Event Receiver.
public void ProcessOneWayEvent(SPRemoteEventProperties properties)
        {
            ClientContext context = TokenHelper.CreateRemoteEventReceiverClientContext(properties);
            PeopleManager peopleManager = new PeopleManager(context);
}

But it seems I cant construct a people manager object inside the event receiver code. The log messages I put after the construction of PeopleManager doesn't execute.
Answer: I think, it is not possible because access token is not related to any user.
Alternative way it create own client context, using login and password any real user.


Salesforce Storage requirements

Question: I have 500,000 Order records and each record size is 100 bytes. could you please tell us how much storage space required in SALESFORCE to store these records. If we try to load these records in ORACLE database typically it takes 52Mb space, how much it will occupy in SALESFORCE?
Answer: Each record for a custom object takes up 2kb.
500,000 records will take up 1,000,000kb

here is the full list of record sizes for various objects. Note that for the purpose of calculating your data storage it doesn't matter how much data is in a record, the size is always constant.

Leads -- 2KB
Contacts -- 2KB
Accounts -- 2KB
Person Accounts - 4KB
Opportunities -- 2KB
Forecasts -- 2KB
Events -- 2KB
Tasks -- 2KB
Cases -- 2KB
Case Team Member – 2KB
Solutions -- 2KB
Notes -- 2KB
Custom Reports -- 2KB
Campaigns - 8KB
Campaign Members – 1KB
Contracts – 2KB
Google Docs – 2KB
Quotes – 2KB
Tags: unique tags – 2KB
Custom Objects – 2KB
Quote Template Rich Text Data - 2KB
Articles - 4KB
Email Message - This is dependent upon the content of the messages, a 100kb email message takes 100kb of data storage space. Text only emails will take less than HTML due to only being the body text and not the html code and text version as well.

NOTE ABOUT PERSON ACCOUNTS
Person Accounts consume a record in both the Account and Contact objects. Each record allocates 2KB, so each Person Account record will require 4KB of storage space.
What are the various record sizes?
Comment: Just adding to this, record are not stored by actual size, each object has a set size that is computed agains your total. the size is set regardless of how much or how little data is actually on the record

Salesforce Storage requirements


Bond income calculation question

Question: I thought I got my Bond income right, but my brokerage company's calculator got me totally confused. So here is the problem:
I bought a note (US treasury) yesterday: cusip: 912828TN0 (secondary market)
Coupon rate: 1%
Maturity date: 8/31/19;
Settlement date - 5/1/19;
YTM at a purchase point: 2.409%;
I paid accrued interest: $1.68;
my principle: $995.20;
Can you tell me, please, how much money should I get back on 8/31/19? :)
Thank you so much in advance!
Comment: These are sold with a $1000 face value per note. Doesn't the statement tell you the value at maturity?
Comment: I know the value at maturity. That's not what I am asking about. I'd like to know how much money, in total, I am supposed to get back, including the interest
Answer: Assuming you bought one $1,000 note, you will get $1,005 at maturity. The $1,000 principal plus the 0.5% (semi-annual 1%) coupon.
You paid for roughly 2 months of accrued interest ($5 * 2/6 = 1.67) when you bought the note, and get the full 6 months when it settles, so your net interest will be $3.32.
Your net yield is therefore (1005/996.88 ^ 12/4) - 1 = 2.46% The difference between that and your quote is probably due to a more accurate daycount than just the number of months to maturity.

I bought a note with the Yield to Maturity of 2.409%. Shouldn't I be getting 6 month of this annual rate? and NOT the coupon rate?

No - yield to maturity is your return relative to what you paid for the note, and annualized (in your case, the return is 0.8% or about $8 over 4 months). The interest paid is fixed at 1% of the note amount (or 0.5% twice a year).
Comment: You had me doubting myself for a minute :)
Comment: I killed my answer. T-bills are semi-annual as you wrote. I'm guessing that's what OP has.
Comment: Thank you so much for your answer. Here what I am confused about: I bought a note with the Yield to Maturity of 2.409%. Shouldn't I be getting 6 month of this annual rate? and NOT the coupon rate?
Comment: @GemStone See my edit.
Comment: Yes, that makes sense.  0.8% is my return for 4 months - it is 2.4% annually! :) At the end it aligns.

Bond income calculation question


What is the recommended/supported version of Webform CiviCRM module for Drupal 7?

Question: What are the differences between Webform CiviCRM versions 7.x-4.x and 7.x-5.x?
Answer: The recommended/supported version is 7.x-5.x
If you're on 7.x-4.x (or below...) you are strongly encouraged to upgrade. The newer 7.x-5.x branch includes many bug fixes along with improvements in the code base, e.g. many direct database queries have been replaced by API calls.
Next week we will be going through the drupal.org webform-civicrm issue queue and we will be closing issues as outdated if they are against 7.x-4.x or below.
Comment: oh! exciting news. I had missed the release of the 7.x-5.x branch. very cool.


Possible problem with country and language tags

Question: I'm not sure about this, so I'm posting it here. We have some tags that also have language tags. e.g: germany and german we also have a french tag. Should this kind of tagging be allowed? I do believe that a tag like latin and rome are ok, because latin is a way broader subject.
Answer: IMHO it should be Germany and German-Language, France and french-language, Rome and Latin-languange (this is the odd one, but it's best to keep the same pattern).  You then have Spain and Spanish-language, etc.
Comment: I kinda prefer this route, too. It makes it clear what it means, and if you just type the name of the language (which, so far, has been conveniently equivalent to the adjective for that country), you'll get the language tag as a suggestion.
Comment: Sounds good! :D


Why the writer is not using "a few" in place of "few" in the following sentence?

Question: She is unfortunate enough to lose few friends she made during her stay in Chennai.
Comment: A sentence very similar to this shows up in a number of 'flashcard' tests on the internet, in which the reader is asked to find the error--which is, as you say, the absence of a determiner on *few friends*. I'd expect *the* rather than *a*, but both would be acceptable in different contexts.
Comment: What's the source of the sentence?
Answer: The writer is not using a few because the sentence is intended to test the knowledge of the reader.
As you seem to be aware, the use of the article a before few gives a completely different sense to the context.

She made few friends during her first year at university

implies that she did not succeed in making as many friends as might be hoped or expected. It suggests something about the circumstances of her stay or possibly her character.

She made a few friends during her first year at university

is a neutral statement of fact without any implication.


Is all Guild Wars 2 voiced

Question: I've seen videos on YouTube and Guild wars 2 was voice but when I played it, it was not do you guys know why? Is it that the whole game is not voiced, I'm in a beginner area, or I have to buy an extension/membership?
Comment: The game is probably too big (in content) to be fully voiced. There is no gated content for NPC voices.
Answer: No, parts of the personal story are covered, living world is mostly voiced again, and some of the introduction areas. Most NPCs have a little dialogue when events are happening, or callout to you, but most "quests" you have to read.
Answer: If you are hearing no voice at all, this could be due to your sound or language settings or simply the game has not downloaded the sound files at that point - it is playable way before the download is completely finished.
Not everything in the game has a voice over, but most npc idle dialogs, cutscenes in personal story and player character reactions are.
But it is not necessary to have bought an expansion, to play with voice over - this is already a feature in the core game.

Is all Guild Wars 2 voiced


How can I invert the mouse Y axis in Minecraft Pi

Question: I am trying to invert the mouse Y axis in Minecraft Pi but can't find a solution to this as there are no options available in Minecraft Pi. Would/can I write a python script that runs in the background to do this?
Answer: Unfortunately Minecraft Pi Edition's Python API is rather limited. Per the documentation there are only three fields to set via world.setting() or player.setting(), and you can confirm this by running strings minecraft-pi and inspecting the output.
You may have considered using xinput list and xinput set-prop. Whether this works could depend on your particular mouse hardware, but from what I can tell changing the coordinate transform matrix would only affect the 2D cursor position, not mouse look (controlled instead by delta movements).
Update: There's Phirel's patch to enable Survival Mode. It also happens to enable basic options in the GUI, including "Invert X-axis" (confusing terminology: invert Y direction ~= flip about X axis)
You can read below for my other approach using SDL.

One way to effectively mod this closed-source executable is to intercept SDL function calls with your own modified SDL.
sudo apt install libx11-dev libxext-dev
curl -O https://www.libsdl.org/release/SDL-1.2.15.tar.gz
tar xvf SDL-1.2.15.tar.gz
cd SDL-1.2.15
./configure

To invert the mouse Y, find the part of the library where it normally sends the deltaY value and invert it!
--- a/src/events/SDL_mouse.c
+++ b/src/events/SDL_mouse.c
@@ -185,7 +185,7 @@ printf("Mouse event didn't change state - dropped!\n");
                event.motion.x = X;
                event.motion.y = Y;
                event.motion.xrel = Xrel;
-               event.motion.yrel = Yrel;
+               event.motion.yrel = -Yrel;
                if ( (SDL_EventOK == NULL) || (*SDL_EventOK)(&event) ) {
                        posted = 1;
                        SDL_PushEvent(&event);

then build and inject your modified library to test:
make
LD_PRELOAD=$(pwd)/build/.libs/libSDL-1.2.so.0 minecraft-pi

Or if you have enabled full OpenGL with KMS, you may have to avoid the script at /usr/bin/minecraft-pi overriding with its own LD_PRELOAD setting. More complicated, but you can inject the Mesa wrapper alongside like so:
(cd /opt/minecraft-pi && \
 LD_PRELOAD="$(cd -)/build/.libs/libSDL-1.2.so.0 libbcm_host.so.1.0" \
 LD_LIBRARY_PATH=lib/mesa \
 ./minecraft-pi)

One cool perk of this approach is that because mouse look uses relative movements while you're leaving the absolute Y position untouched, cursor movement still functions as before.
If you wish to make further modifications or need to debug your changes, add printf() statements, rebuild, and rerun.
Thanks for reading. If you reached this point, you either missed the key text above recommending a simpler approach of using the Survival Mode patch, or you're using this as a tutorial for a further input modding. If the latter, you may find some useful troubleshooting steps in the followup question.


How to clean/dispose of oily/greasy shop rags?

Question: I have some rags (as I'm sure we all do) that are covered in oil and other various fluids.  Is it alright to wash these in a standard washing machine and then air dry them?  Is there a specific detergent I should use if I wash them at home?
Answer: What I do is to first hand wash/rinse them in a 5 gallon buckets with a strong mix of laundry detergent. This removes most of the heavy oil along with the smell and the grit. Then they go in the washer on hot wash cycle. I then just hang them to dry on a rope in the shed. Using the dryer seems to release some of the waxes and residual oil onto the dryer drum. If the rags seemed really messy I'll run the washer through a cycle empty just to rinse out any leftover dirt.
Comment: Good answer, but please add spaces after periods for it is hard to read. Those grammar rules are there for a reason.


Using reflection to create instances of a protected class

Question: Can someone please explain to me how the Activator.CreateInstance method is able to create instances of a protected class?
public abstract class File
{
    public string Name {get; set;}
}

public class ExcelFile : File
{
    protected ExcelFile()
    {
    }
}

It's not possible to create a new instance of the object by calling ExcelFile file = new ExcelFile();

'ExcelFile' is inaccessible due to its
  protection level

Yet it's possible to create it using:
Type type = Type.GetType("ConsoleApplication.ExcelFile");
object o = Activator.CreateInstance(type, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.CreateInstance, null, new object[0], CultureInfo.InvariantCulture);

The above code was lifted from the BCL WebRequest.Create() method and would like to what parameters in Activator.CreateInstance is allowing reflection to create an instance of a protected class?
Note: I plan to use the Activator.CreateInstance in a factory class to return new objects so would like to have a better understanding how it works.
Comment: The parameter that enables it is `BindingFlags.NonPublic`.
Answer: Reflection doesn't care about access modifiers


What is the potential of rock candi sugar?

Question: I have acquired "white belgian candi sugar" from BrewFerm, and it is in rock form. AFAIK, this is just solid invert sugar, and should have potential 46 PPG, but BrewSmith and Brewer's Friend both list them with 38 PPG. Is this correct?
Answer: There is no reason it should be different from any other sugar.  I use 45 ppg and get the gravities I expect, so I would have to say that 46 is closer than 38.  I suppose it could vary by brand if one brand somehow cut the sugar with something else, but I'm not aware of that actually happening.  BTW, candi sugar rocks are a waste of money.  Belgian brewers don't use it.  They use either candi syrup or plain beet or cane sugar (like table sugar).
Comment: Thanks! About what Belgian brewers use, yes, that's what I hear. There seems to be confusion in the literature about this. For example, Palmer and Zainasheff both write candi sugar in recipes, claiming that it is more healthy for the yeast. Also, the chemical composition of table sugar varies, AFAIK, from pure sucrose to almost inverted sugar.
Comment: I can't think of any reason why candi sugar would be healthier for the yeast.  It's simply regular sugar that has been crystallized.  And I'm not aware of any variability on the composition of table sugar.  How could it be "almost" inverted?  Could you provide some examples?  For the best info about using sugar in Belgian beers, refer to "Brew Like a Mink" by Stan Hieronymous.
Comment: I just consulted Jamil's "Brewing Classic Styles".  All the Belgian recipes that use sugar specify cane sugar and/or candi syrup.  None that I read use rock candi.
Comment: You are right, and thanks for the reference! I am actually brewing "Lefty Blonde", and puched in the recipe a while ago. About invert sugar etc: I am sure I have "read somewhere" that inverted sugar is more healthy for the yeast than sucrose, the reasone related to the yeast avoiding invertase production in the former.

AFAIK inverted sugar = sucrose split into glucose and fructose by hydrolyzation (i.e., using invertase from yeast). I have, again, "read somewhere" that table sugar can contain a mixture of sucrose, fructose and glucose. Hence the range of inversion...I may be wrong of course.
Comment: There is a persistent idea that inverted sugar is easier for the yeast to break down.  While that may hold true from a chemistry perspective, the reality is that yeast has no problem breaking down non inverted sugar.  At any rate, the sugar will become inverted in the kettle due to the heat and acids present.


Student filing taxes for internship plus other income (am I underpaying during the year?)

Question: I had a summer internship that continued part-time into the fall, and will continue on that basis until January. As of this week I have earned approximately $14,500 and paid $1,234 in federal income tax (not including social security, etc). I have also earned income from selling online; this will be about $5,000 in profit. I also have about $1,000 in interest from bank accounts. I have not yet paid any taxes on this money. What I am worried about is that I will have to pay a penalty for underpayment during the year, but I am not really sure what my tax liability will be or how much it could be underpaid.
Comment: Will anyone (such as a parent) be claiming you as a dependent on his or her tax return?
Comment: Yes @BenMiller I will be claimed as a dependent
Answer: The only way you will incur underpayment penalties is if you withhold less than 90% of the current year's tax liability or 100% of last years tax liability (whichever is smaller).  So as long as your total tax liability last year (not what you paid at filing, but what you paid for the whole year) was more than $1,234, you should not have any penalty.
What you pay (or get back) when you file will be your total tax liability less what was withheld. For example, you had $1,234 withheld from your pay for taxes.  If after deduction and other factors, your tax liability is $1,345, you will owe $111 when you file.  On the other hand, if your tax liability is only $1,000, you'll get a refund of $234 when you file, since you've had more withheld that what you owe.
Since your income was only for part of the year, and tax tables assume that you make that much for the whole year, I would suspect that you over-withheld during your internship, which would offset the lack of withholding on the other $6,000 in income.
Answer: Your tax return will be due on April 18th of 2017 for the amounts made in 2016. Based on the figures that you have provided, assuming you are 18, and assuming you are a single taxpayer your total tax will be around $2600.00 ($2611.25 to be exact, without additional credits or deductions to AGI accounted for). The $1,234 in fed. inc. tax that you have already paid is considered to be a prepaid by the government. If at year-end you have provided more than you have made the government will refund you the excess (federal tax return).


Ubuntu: RAID 10 degrades to RAID 0 after reboot?

Question: I'm running Ubuntu 16.04, and I'm having a problem with a new RAID 10 array. The array consists of four 5 TB drives, all the same exact model. Two of the drives were used by me previously, and two are new. I made sure that they synced cleanly and wiped out old data and partitions. The array forms properly afterwards, with a capacity of 9.1 TB. However, after I reboot, the array degrades to a RAID 0 with a capacity of 13 TB. I've verified that I've got the correct UUID in /etc/mdadm/mdadm.conf, but the array always boots up one disk short. It's always the same device as well: /dev/sdd1
I'm able to force the array to start with this command: sudo mdadm --create /dev/md0 -v --assume-clean --level=raid10 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 The array acts normally and can be mounted after I make a filesystem with fdisk. It just degrades to RAID 0 again after I reboot. What am I doing wrong here? It seems like one disk is failing to be found at boot, and thus is missing from the array. Do the disks require something which I'm missing for this one disk? Should each disk in the array be specified in my fstab file, or should they be excluded from it? Any insight would be greatly appreciated.
Answer: Sounds like one of the drives is slow to start up and be ready.
That may either be because it's simply slow to spin up, or because something is wrong with it.
Check the drive's SMART log (gnome-disk-tool can access that for you), and if the drive is healthy, increase the grub boot timer a bit to give the drive time to spin up before the OS boots.
Comment: Ok, I thought that it could be something like that. Do you know if there's a way to specifiy that GRUB has to wait until all disks are ready, or do I just make it wait like 60 seconds?
Comment: You just set an arbitrary `GRUB_TIMEOUT=` that's long enough. 30 seconds should be plenty. 60 would be a bit overkill.


Are infections necessary for human colonisation?

Question: If a human colony is set up on another planet or moon, or in an orbiting habitat, most of the infectious diseases from Earth would not be present in the small initial population. Careful screening could further reduce the number of infectious diseases introduced. Would the human immune system suffer problems if infection is reduced too much? Would we need to take some token infections (such as the cold) with us?
Answer: This is difficult to answer definitively.  Certainly, humans require certain microorganisms in order to be healthy, and the effect of carrying around such microorganisms is that with their shorter generations, the probability of a mutation making the organism pathogenic is small but significant.
However, it is difficult to say if a lack of pathogenic organisms is deleterious.  As an undergraduate student of human physiology, I have developed the hypothesis - as yet without any proof either supporting or disproving it - that the human/mammalian immune system has evolved to expect a certain level of exposure to pathogens which would require an immune response, and if such a level of exposure is not achieved, the likelihood of autoimmune diseases is elevated.
Hence, our habit of sterilizing everything our kids come into contact with could well have the effect of setting them up for an autoimmune disease later in life.  To not have any pathogens at all?  That could be disastrous, or not.
Comment: The auto-immune response theory is well established with a lot of credibility, I've heard it from a number of different sources. I'm not sure what (if any) attempts have been made to prove/disprove the theory though.
Comment: Also, over-use of antibiotics doesn't prevent exposure of the immune system to pathogens, or even to bacterial pathogens. You don't even know you're sick and start taking the antibiotics until there's already an immune response. Overuse of antibiotics might test *something*, but since it hasn't eliminated pathogens the thing it's testing isn't "no exposure to pathogens". I'm not certain it even results in *reduced* exposure to pathogens, except some chronic infections that used to be ubiquitous but now get cleared up. e.g. maybe TB is now less prevalent than 100 years ago?
Comment: Our overuse of antibiotics in the mid/late-20th century will in retrospect turn out to have been a test of this hypothesis (though it has the disadvantage that it also wrecks the non-pathological gut microbiome).
Comment: @octern no it won't. There's no control group and too many confounding factors, for instance, the obvious one, of more resilient bacteria.


Where to download python add-ins?

Question: I'm new in Python programming
If there are websites where developers can share their add-ins and scripts that will be great.
do you know any?
unfortunately, arcgis.com only provide very few
Comment: Presumably you're after something that can't be done with GDAL and Numpy (with which you can achieve most GIS tasks).  Is there anything specific you are looking for?
Answer: ArcGIS Code Sharing seems to be the site that you are looking for.
It claims to enable you to:

Search, browse, and use code, scripts, models, add-ins, widgets, and more.

There were 48 results when I searched there for Python AddIns just now.

Where to download python add-ins?


Meditation for Work Anxiety

Question: I started a new job, and when I get anxious my cognition turns to pure incoherence. I second-guess everything, doubt, double-check unnecessarily, make more errors, etc.
What is the best type of meditation to deal with such anxiety-related problems?
Answer: If the anxiety is light yet bothersome, gentle restrain anxiety by relinquishing attachment to outcome:

This is not mine, I am not this, this is not my self. MN62

If the anxiety is heavier and a bit overwhelming, a firm restraint can be achieved by slowing the breath--rapid breathing promotes anxiety. Regular practice of mindfulness of breathing helps.

When mindfulness of breathing is developed and cultivated it's very fruitful and beneficial. MN62

Generally, the more you practice the Noble Eight-Fold Path, the more equanimity emerges with the fading away of attachments to identity view. However, that practice and its fruition are gradual. For the longer term, precepts can be enormously helpful.

A mendicant might wish: 'May I prevail over fear and dread, and may fear and dread not prevail over me. May I live having mastered fear and dread whenever they arise.' So let them fulfill their precepts … AN10.71

Also consult with your doctor for additional recommendations. Some anxiety disorders can be quite crippling and medical assistance can be of great benefit.
Answer: There are 2 main types of meditation:

Samatha
Vipassanā

Samantha increases concentration. If you have concentration problems which lead to mistakes then this will help.
Vipassana meditation can help with stress and anxiety at work.
Answer: I guess the way I try to deal with it is

Ethics e.g. being careful about what I say, not promising what I cannot deliver
Having an altruistic attitude (metta), trying to cooperate and to provide what other people want

Also I kind of know that every job is temporary. The longest I worked anywhere was 12 years, and I have had contracts to do just a few weeks' work.
So I think you have to do a bit of what Oyamist said, i.e. "relinquishing attachment to outcome" -- sometimes there's work for me somwhere, and sometimes there isn't -- and whether and when that's so (i.e. whether people have a job for me) is somewhat outside my control.
So instead of concentrating on outcome ("what will happen?"), you concentrate on process ("how am I doing, am I communicating well?") -- then perhaps you develop a reputation, and so be able to find more work even after this job ends for whatever reason (but of course concentrate on one job at a time).
On the subject of meditation (which you asked about) I find walking ("walking meditation?") helpful. If "cognition turns to pure incoherence" then maybe walk around the block and breathe a bit. I do that, stand up, breathe, swing my arms a bit, use both feet, see a streetscape -- and without thinking about it too hard, and idea might come up like, "maybe I'll trying doing X next" -- and that seems like an idea that might work so I go back and try it.

Meditation for Work Anxiety


Windows 7 parallel computing?

Question: Would it be possible, in windows 7 to parellel-ify the system, (run on many nodes at the same time for hugely increased performance) and would it be easy?
Comment: Added some links for you to my answer.
Answer: No. Windows 7 is designed to run better in multi-core system comparing to its predecessor (i.e. Windows Vista).
If you want some multi-node OS, you should try some special linux distribution specially built for this kind of usage.
Comment: How about Rocks Cluster? It is, quote "open-source Linux cluster distribution that enables end users to easily build computational clusters" http://www.rocksclusters.org/wordpress/?page_id=57
Comment: Any reccomendations?
Answer:
Would it be possible, in windows 7 to parrellel-ify the system, (run on many nodes at the same time for hugely increased performance) and would it be easy?

No.
The OS has its own methods for parallelizing O.S. operations, but not individual application performance. It is up to the individual applications to do any further multi-threading optimization (parallelizing). Modern OS's handle a lot of parallelizing currently as multiple core processors are now found in most modern computers, which require parallelization to be fully utilized/optimized.
As for making many nodes work together (Cluster), that is not a Windows 7 feature found on the consumer versions of Windows.  Windows server machines have this capability for distributing network managment traffic, but not for individual client applications.
EDIT: Some links and parallel project:
http://www.lam-mpi.org/ LAM/MPI Parallel Computing - This is the LAM version of the MPI interface. I have used this before and it works well. Should install under most linux installations.  I used this one with Ubuntu server 7.10. http://www.ubuntu.com/products/whatIsubuntu/serveredition
If you don't know what MPI is: http://www.mcs.anl.gov/research/projects/mpi/
Note: For this to work properly, the application needs to be adapted to the MPI interface or be built specificly for this environment.

Windows 7 parallel computing?


Resolving FLAGS bits with IDA

Question: While disassembling a binary, IDA decompiler decompiles the call as mmap(0x80000000, 4096, 7, 50, -1, 0); While there is nothing wrong with the decompilation itself, it could be more useful to decode the flags value as an OR-ed expression of known mnemonics, e.g. MAP_SHARED|MAP_PRIVATE (as in man page of mmap). can there anything can be done to help IDA display that (apart from writing a plugin myself, of course)?
Answer: In IDA, you can define enums through the Enums view (shift+F10). Enums have the "bitfield" bit set (a checkbox by the same name can be found in the Enum edit and create dialogs). This bit cannot be set for enums with overlapping member bits.
Once an enum is a bitfield enum, setting any operand in the disassembly view to that enum will display all enum members of bit values set in the immediate operand.
If a function prototype uses an enum name for a variable type, IDA will try setting operands using it to the same enum automatically, although that does not always happen.
IIRC the MAP enum is already mapped in IDA's known enums, so adding it should be easy and without the need to manually define it.
Comment: Those flags are define in preprocessor `#define`. So a header file has to be created with enums.
Comment: I'll edit that in, IIRC that enum specifically is defined in IDA's type libraries.

Resolving FLAGS bits with IDA


Wheel Build Questions for Those who have done it

Question: To the experienced builders. What are the absolutely neccessary tools to build a reliable trued wheel? The wheel will be a 700c wheel for a standard road bike.
Comment: Definitely you need a book (or maybe printout of a web page somewhere).  After you've built maybe 20 wheel you might get the patterns memorized, but not the first few times.
Answer: There are definitely more sophisticated tools for this but in my mind the essential kit includes (1) the right-sized spoke wrench, (2) a flathead screwdriver, (3) grease for spoke threads, (4) the front dropouts on an upside-down bicycle with brake pads for truing, and (5) lots of patience if you haven't done it before.
All of this assumes you have a rim and hub with the same hole count, along with correctly-sized spokes and enough spoke nipples.
Comment: I've done it with exactely the same kit and strategy, but without the grease. I haven't had problems, but I think a light lubrication on the threads is a good thing. And I recommend very very much the method of bending the spokes one against another, like shown in this image: http://sheldonbrown.com/images/stress_crank.gif . And, of course, the rear wheels should be trued while attached to the REAR of the upside-down-bike ;oP
Comment: @fideli Bending that way assures that the spokes will run straight between nipple and crossing, and between crossing and elbow. The "tension-only" approach always yelds a slightly curved, "bowed" spoke, that will flex a bit under load, being more like a spring than like a solid element, in a way.
Comment: @heltonbiker Good call on the rear wheel strategy. As for the bending, I've read that but didn't do it on my last wheel; just depended on tension to create the bends. What's the main benefit of bending the spokes that way?
Comment: I can see that bending like that would "encourage" the "settling" of the spokes, so that the wheel could be trued with fewer passes.  Without doing that you really need to build the wheel, ride it for a hundred miles or so, and then re-true.
Comment: I would probably argue that a skilled builder could manage a decent wheel with a kit like this, if that is what he had available. But for a first wheel build, using tools and stands that are jury-rigged will only make it harder to learn, and harder to get a good end product.
Answer: To properly true and tension a wheel:

Spoke wrench
Nipple driver
Truing stand
Tensiometer
Spoke prep or Linseed oil
The Bicycle Wheel by Jobst Brandt

You can, of course, jury rig a Truing stand as others have mentioned, and you can build without a way to measure the tension on the spokes.  Without a lot of practice and skill, though, your wheels will be less than perfectly strong and straight.
You should use a thread locker on the spoke nipples. Ideally, Spoke Prep from DT Swiss, or Linseed Oil, which acts as a lubricant until it dries, but acts as a thread lock once it's dry.
The book at the end of the list will teach you the theory behind how a wheel is built and why, and the lacing patterns, and what works best, and why.


what is the physical meaning of area moment of inertia?

Question: In our applied mechanics class, we studied about area moment of inertia. Our teacher only explained the mathematical relation of this term that is product of area and square of the perpendicular distance from the axis. But I cannot understand the physical meaning. Help me out.
Answer: The notion arises fairly naturally when one is thinking about how a constant cross section beam reacts to forces and bending moments.
You imagine a beam to be made up of elastic fibers. When it is bent in a plane, nearest the center of curvature, the fibers must "squash", so they are in compressive strain. On the side outermost from the curvature center, they are in tensile strain. Somewhere in between there is a neutral axis in the cross section that is the intersection between the cross section and the fibers that are neither in compressive nor tensile strain
Indeed, if you sketch the geometry, the amount of strain in the fibers at a normal distance $x$ from the neutral axis is
$$\epsilon(x) = \frac{x}{R} \tag{1}$$
and so the stress normal to the plane is:
$$\sigma(x) = E\,\frac{x}{R} \tag{2}$$
where $R$ is the bending curvature at that cross section and $E$ the Young's modulus. This is because the length of a fiber a normal distance $x$ subtending an angle $\delta\theta$ at the center of curvature is $(R+x)\,\delta \theta$. The same angle is subtended by a length  $R\,\delta \theta$ at the neutral axis. Since all the fibers in the arc are the same length when the beam is relaxed, this means that the proportional change in length is $(R+x)/R$, whence (1) (see my sketch below for intuition; the bending is in the plane of the page):

What this means is that if you imagine the beam to be "cut in two" by any cross sectional plane and draw a free body diagram of the two halves, each side exerts an equal and opposite torque on the other.
So, in the light of (2), the contribution to the torque from a fiber with cross-sectional area $\mathrm{d} A$ at distance $x$ from the neutral axis is:
$$\mathrm{d}\tau = \text{lever arm} \times \text{normal force} = x\times E\,\frac{x}{R}\,\mathrm{d} A = \frac{E}{R}\,x^2\,\mathrm{d}A\tag{3}$$
whence one sums up all the contributions to get the total torque of one beam section on the other:
$$\tau = \frac{E\,I}{R}\tag{4}$$
The Punchline

So here is a evocative meaning from (3) and (4): the torque exerted across the cross section by a fiber is proportional to the second moment of the fiber's cross sectional area: there's one $x$ for the lever arm, multiplied by another $x$ because, through the strain geometry, the strain is proportional to the fiber's normal distance from the neutral axis.

See Euler-Bernoulli or Timoshenko Beam Theory for more information.
Answer: One of the most common uses for the area moment of inertia is to analyze the bending of beams.  A beam which has a large area moment of inertia is harder to bend by applying a given load than a beam with a small area moment of inertia.
You can see this by taking a long strip of wood or other material, like a ruler, where the cross section has a small thickness but is relatively wide.  When the wide surface is flat, it is relatively easy to bend the ends of the strip upwards or downwards.  On the other hand, if you rotate the strip so that the wide dimension is now vertical, it becomes much more difficult to bend the ends of the strip.  This is because the second moment of area is much greater with the width of the strip oriented vertically than when it is oriented horizontally.


Questions on the relationship between option price and maturity

Question: From the plot of volatility surface, as maturity goes up, the implied volatility will decrease. Dose it mean that options with the same strike have higher value when maturity is larger. If so why price of large maturity option is often higher, which can contribute to calendar spread?
Answer: I'll try to make a guess. Maybe it's due to the properties of the underlying, since we know that GBM will go to almost every point with a sufficient amount of time. The higher the time, the higher the probability of hitting a given price, the higher the value of an option.
Answer: An option is hedged by holding some stocks and risk-free bonds.
<code>Option Price = a * stock + (1-a) * risk-free-bonds
</code>
where a is the position of the stock needed for hedging in the self-finance portfolio. Therefore, the option price depends on price of the zero coupon bond.
Now, if we have two options, everything the same but time-to-maturity, let's say T1, T2, T2 > T1. The T2 option needs to be hedged with a T2 zero-coupon-bond. However, the T2 bond costs less than the T1 bond because everyone prefers a bond that pays back the money earlier.
Therefore, the price of the option must go up for the T2 option. The relationship can be explained by how Black-Scholes is derived in the first-place (delta continuous hedging).
Answer: First of all, IV does not always decrease with maturity. Even with focus on the ATM IV volatility, the term structure can be very different in different circumstances: it can go up, down or be rather bumpy. Nevertheless, in the BS formula the option price is a function of $\sigma(\tau)\sqrt \tau$, so even if $\sigma(\tau)\downarrow$ it may still happen that $\sigma(\tau)\sqrt \tau \uparrow $, otherwise clearly you'll get a negative calendar spread which would be quickly arbitraged by other market participants.


Time Machine External Drive

Question: What factors are important when selecting an external hard drive for time machine backups?
Answer: Make sure the drive is from a reputable supplier.  I've used Western Digital external drives without a problem.
When you get the drive it will most likely be formatted in NTFS format (for Windows), so when you plug it in, you will need to open Disk Utility and repartition it as HFS+
A Firewire 800 drive is fastest, although since the backups are incremental and happen in the background (with only the changed bits/files going across), I believe the cost/benefit factor is weighted towards getting a cheaper but higher capacity USB 2.0 drive.  That's just my opinion.
Comment: Also check to see that the drive partition formation is GUID, not MBR.
Comment: Time Machine will prompt you to let it format/partition the drive as needed so having it pre-formatted may save some time but isn't a deal breaker if you find an otherwise suitable drive.
Comment: yes, good point.  So partition as GUID (hit Option button at bottom of Disk Utility window) and then format as HFS+ (select from drop down on right of Disk Utility window).
Comment: Agree, and would add one point: disk space. Probably the most important factor. Id say it should at least cover the space your computer has, AS A MINIMUM. But if you really want something to never worry about loosing old files, Id say at least duplicate your space.
Answer: The most important factor is get a drive as soon as you can and make sure it's always connected. Even the cheapest slow USB drive is so much better than none.
Get something that is built strong enough for your environment (for most it's sitting on a desk but is more a factor if you travel with the drive) and looks appropriate sitting by your mac.
Spend a little more money to buy a lot more space but don't break the bank on the biggest drive unless you really need it. I've been served well getting the lower end drives sold in the Apple stores (they tend to stock the best quality at decent prices) even if I don't actually buy it there. I usually get the middle sized drive and upgrade the size until the jump in price is $65+ for the next larger size.
I'll disagree on the necessity to get a certain speed interface or FireWire.
The only times you really notice a faster drive for backups is the first time you backup all your data and if you ever have to restore the drive.
TimeMachine runs in the background with low priority (incremental backups over the network get done promptly which is way slower than USB speeds). Your use of the mac isn't disturbed while the backup progresses, so only spend the extra $$ on a faster interface or fancy disk if you really need that speed in the event of a restore.
With my backups, I've been happy buying less expensive drives more often than I could if I bought the best. When the drive fills or 18 to 24 months pass, I "retire" that drive, putting it on the shelf for permanent storage. This keeps my backup drive fairly new and I have longer history if I need to go back to older files. If you intend to run the drive for 3+ years into the ground, then it's nice to spend another $25 to $150 or so on the best quality drives with a longer warranty.
Lastly, I would avoid any drives that are not a single unit. Raid increases the parts and size which is statistically less reliable. I prefer less chance of failure on my backup drive rather than a bigger bucket of backups.
Answer:
STORAGE SPACE
Firewire is preferable
Good brand so you know it won't fail shortly after purchasing it.

Time Machine External Drive


What is the karma according to buddhism?

Question: The simple definition of karma that is given is: If you do good then you will get good in return and vice-versa. I'm not able to understand where would the effect come back from? Some says other people but who would be those other people? Is there a simple understandable logical explanation to this? I feel totally confused with understanding this which may sound simple.
Answer:
The simple definition of karma that is given is: If you do good then you will get good in return and vice-versa.

That is not a Buddhist definition of karma.  The Buddhist definition, put into similar terms, would be: you will reap the results of your actions, in this life or your next rebirth.
To give a detailed explanation would require pulling in a lot of other Buddhist concepts and terminology; if you are actually interested in Buddhism, I would strongly recommend you check out a good introductory textbooks, like Rupert Gethin's Foundations of Buddhism or Peter Harvey's An Introduction To Buddhism, both of which are available in paperback and ebook form.
If you are not interested in Buddhism, and want a superficial answer, I suppose the easiest way to understand karma is to view it as an extension of cause and effect.  Buddhism has a particular notion of cause and effect known as "dependent origination" or "dependent co-arising"; karma is the dependent co-arising of doer and deed.
Comment: I think that Gethin and Harvey explain things in a much more condensed and pedagogic manner than the sutras, yes.
Comment: @MichaelDorfman, you're quite right. I mistyped. And I agree with you top to bottom given the nature of the context, which is this Stack Exchange site.
Comment: @RParadox: You'd be right if this were TheSangha.stackexchange.com. But it's not. It's philosophy.stackexchange.com. Two-truths, my friend.
Comment: I'm with RParadox here. Many a Buddhist has been known to get all excited reading about the Four Noble Truths and the Noble Eightfold Path, only to have the crap confused out of them when they read the Heart Sutra. For someone seeking a purely academic understanding, millennia-old texts from long-past cultures are often less than clarifying.
Comment: @wmjbyatt: I think that means you are with me, and against RParadox here.
Comment: Why not refer to the original words instead? Do you think Gethin and Harvey explain things better than Buddha himself?
Comment: An academic understanding, yes. Which means no understanding. Just words, no content. Incidentally the diamond sutra, has foreseen this problem of transmission. Words are spoken by people, and they get distorted. So this is a nice definition of Karma, but have not all much to do with the words of Buddha. He didn't want to create a religion. The people who follow cults (Buddhism is a cult), are not interested in truth.
Comment: @RParadox: I am afraid I disagree with that reading of the texts.  I believe that the early Buddhist texts are quite clear about the Buddha's intentions, and about the proper understanding of karma.  Since the OP asked what the proper definition of karma is according to Buddhism, your disparaging Buddhism as a cult uninterested in truth is not really relevant or helpful, especially since this is a Question and Answer site dedicated to academic questions and answers.
Answer:
The simple definition of karma that is given is: If you do good then
  you will get good in return and vice-versa. I'm not able to understand
  where would the effect come back from? Some says other people but who
  would be those other people? Is there a simple understandable logical
  explanation to this? I feel totally confused with understanding this
  which may sound simple.

First, I want to point out that there are very sectarian views on Karma. There are Buddhists who are of the opinion that "karma" is a mystical merit-system that accrues as one acts, and when one dies, their karma determines the circumstances of their rebirth.
On the other hand, some Buddhists have very little tolerance for any notion of reincarnation in the traditional sense.
In the most general sense, Michael Dorfman presented an excellent summary above. The word "karma" literally means "causality" or "the law of cause-and-effect." It is simply the recognition that our actions have consequences, and it is deeply related to the law of dependent origination.
To give a particular view that I know to be common among Zen Buddhists and others, "karma" can be thought of as a symbol which captures a particular fact of psychology: that we often experience the world as a reflection of the way in which we treat the world (and vice-versa). It is a common (nearly to the point of vulgarity) truism that happy and kind people both experience the world as a happier and kinder place (for they are more likely to see happiness and kindness around them) and genuinely receive more happiness and kindness because others are infected by their goodness--and the reverse holds for anger and meanness. Many of us would label this phenomenon, in all its generality, "karma."
EDIT: To specifically state where the effects would come from: the mind of the person who acts is the "source" of "karmic retribution/reward" in the particular view I've given.
Answer: In Buddhism Karma is the result of Intention (Chethana). Every thought we think intentionally - and every action as well, since intentional actions are necessarily preceded by thoughts - will lead to good or bad results in the future (unless the person is an Enlightened being (Arhat)). Every thought has forms like Lobha (greed), Dosa (hate), Moha (delution), Alobha (non-greed), Adosa (non-hate), Amoha (non-delusion), or a mixture of them. The first three forms will give us bad results (Akusala Vipaka) and the latter three will give us good results (Kusala Vipaka).
As I see it, this is a form of energy in the mind. Good thoughts will generate positive energy which will lead to good results in the future, and bad thoughts will generate negative energy. Result wills be varied according to the strength of the thought and the mixture of forms in it. (Maybe it will not give any result in some cases, you may need to read further to understand the different types of karma and their Vipakas.)
As we are not Enlightened, we can get only very rough idea about karma. We can not explain how it really works. As suggested in some other answers you can read the original Buddhist scripture to get a better understanding.
Answer:
"Intention, I tell you, is kamma. Intending, one does kamma by way of body, speech, & intellect."
-- (AN6.63.5, translated from the pali by Thanissaro Bikkhu)

The verb root of (pali: kamma, skt: karma) is kr: do, make. As a noun: act, deed. Kamma is not the result, but kamma is an action that causes a result. In the suttas, the Buddha uses the term specifically to refer to actions that return results (fruit) to the doer. In the Buddhist context then, only by intending a result does one identify with and own kamma.
This is a major distinction between Buddhist understanding of kamma versus Jainist in particular and most other religions (such as theistic speculations including soul and judgement). A Jain who steps on an ant, even if unintentionally, will expect negative karmic result, a burden upon his soul.
The Buddha on the other hand denies the existence of a permanent continuous self/soul. A continuous self is an illusion created by ourselves by way of identifying with (sankhara, own-making) and linking various input (senses) and output (kamma). Only the intending creator receives the result of his intentional creation.
Events occur without any need for a self to unify or identify with them. However, when we intend to unify and identify events (reinforcing a sense of self) the self image receives the result of the creation. If we step on an ant without intending harm, no harm will result. If we throw a ball of fire we burn our hand. If we become angry we are angry.
Comment: From your quote it seems that root of kamma is actually *intention*, and then action follows.
Comment: I mean to refer to the linguistic root of the word not its causal predecessor. I'll clear that up. Thanks. The quote is accurate (Cetanaaha.m bhikkhave kamma.m vadaami||cetayitvaa kamma.m karoti kaayena vaacaaya manasaa).
Answer: In Buddhism it's simply when you sway from the four noble truths. This will lead to suffering. Karma is not do good -- get good and vice versa as people here have suggested. The Pali Canon also never suggest that it's something you bring with you after death. All of these things are superstitions from the west in attempts to explain it.
E.g., if you are anxious you will suffer because being anxious is breaking one of the noble truths, i.e., accumulating karma.
Now this is maybe more the teachings of the Buddha (Siddhartha Gautama) then what modern Buddhism is about.
Answer:
"If you do good then you will get good in return and vice-versa"

Important note is that not just any (subjective) good, but actions that Buddha teach as good actions. These proper (or skillful) actions will give pleasant fruit. (Such as wholesome birth.)

I'm not able to understand where would the effect come back from?

Easy. More good actions you do, more good you are (for everybody who know you) and more good is around you. (1) Such that it's narutally more probably that you receive more positive feedback. (2) Good actions develop your mind qualities and skills, more developed your mind, better you at avoiding bad consequences. For example, wise you would not gamble, so no being upset from unfair losses. No dealing with criminals or bad "friends" - no woes from betrayal, etc. Not performing crime - no fears, no punishment. (3) More generally - good qualities is compatible with other good qualities and non-compatible with bad qualities (including bad karma results). (4) Good actions lead you into appropriate enviroment which "remembers" (in a sense) quality of your action. (5) It is also said that body with its sense organs is 'old karma'. And we know that mind is formative for body. So bad actions will modify mind in a way that it will modify the body. And wrong body (as sense-organs, and mind skills) is definitely suffering or will lead to it. (For exampel fool is almost certainly will create suffering for herself than wise.)
Answer: I do not know How Karma is perceived in Buddhism. But In Hinduism, the karma literally means action that one perfoms in all levels of mind,body and energy. To simply put it, it is like a software we write for ourselves. A wise man named sadhguru clearly says like this

The word Karma literally means action. There are a variety of actions – physical actions, mental actions, emotional actions and energy actions. You may not have experienced energy actions, but you will know physical, mental and emotional actions. The residue or the impression of every action that you have performed, from the moment of birth to now, is within you. It is from these impressions that you have made yourself the kind of person you are now.

These impressions are there at the level of your memory, your physiology, your chemistry and on the level of your energy. These are all the backup systems to make sure that you don't lose your karma. Even if you lose your mind, you will not lose it. If you lose your body, you will not lose it because its impressed on your very life energies. You will see that the very way in which energy functions differs from person to person. The very way everybody thinks and feels Is different. This is because the kind of impressions they have decides this. Or, in other words, karma means the unconscious software that you wrote for yourself. How you are or what you are is based on the software you wrote for yourself.
Your karmic substance controls the very way you think, feel, understand and perceive life. This doesn't mean you are stuck. If you functions consciously in this moment, you can change the next moment's karma for yourself. What you did in the previous moment is this moment's karma. What you did yesterday you cannot change but what you do now you can always change. What you do this moment is in your hands. This moment's karma is the most important thing. People are always talking about the previous karma. But you must understand that the kind of action – physical, mental and emotional – you perform this moment will decide the quality of your life.
Comment: Nice, but not an answer to the question... This should be a comment (with a link to the text).
Comment: Still, too many downvotes ("[anonymous cowards](http://c2.com/cgi/wiki?AnonymousCoward)" :) for a first answer IMHO ...


How much does the fuselage of an airplane contribute to yaw stabilization?

Question: Obviously considering that (almost) every plane has a vertical stabilizer, probably not, but for a relatively long aircraft does the fuselage measurably contribute to the yaw stabilization relative to the vertical stabilizer?
Comment: Sometimes it's hard to tell where the fuselage stops and the fin begins-- https://en.m.wikipedia.org/wiki/File:Couzinet_Arc-en-Ciel.jpg
Answer: This is not a dumb question at all, and the short answer is not at all.
Since the fuselage must be balanced around the center of gravity (cg), part of it will be forward of the cg. This part contributes a destabilizing effect and since the fuselage is a slender object, most of its lift will be produced near the nose. This means that the whole fuselage, even if it is very long, is still destabilizing as a whole.
The center of pressure of a symmetric airfoil in subsonic speed is at its quarter point. This is classical two-dimensional aerodynamics. Once this airfoil is turned into a wing, its aspect ratio (ratio between span and chord) will influence the location of the center of pressure such that it moves forward (towards the leading edge) the smaller the aspect ratio becomes. In the extreme case of very long chord and almost no span, the center of pressure moves into the leading edge. For a fuselage this means that its neutral point is way ahead of its center of gravity.
The vertical stabilizer is closer to a wing and also more effective. The aspect ratio also influences the amount of lift that can be achieved with a given angle of attack (lift curve slope) and for slender bodies the lift curve slope per radian is as low as π/2 times the aspect ratio while for a wing of infinite aspect ratio it is 2π. This is all valid for attached flow, so with larger amounts of sideslip and flow separation on the leeward side things will change and the exposed area will become more important.
The heavy engines and very lightweight structures of early airplanes would allow a very short forward fuselage while the rear fuselage would have a large side area. Still, even those needed a small vertical tail, mostly for control, but also for stabilization. Note that all airships were laterally unstable and required constant attention by the person at the rudder controls to stay on course.

The Nieuport 11 (picture source) should illustrate the point about early airplanes nicely. If you take away the rudder, the fuselage will start to yaw off course until flow separation starts and limits the amount of yaw. However, at this point drag will already be punishingly high, so the rudder helps to keep the fuselage on course.
Comment: A chum from years ago used to fly a Fokker DR-1 that was owned by a little museum. It was a full size replica, powered with a Lycoming O-320 disguised under the round cowling, so without the gyro effects of a rotary, but in any case he said it was pretty much neutral to slightly negative in yaw and would sit wherever you pointed it, and could perform incredible high rate wings-level skidding turns that felt like you were in a centrifuge.  He said it was exhausting to fly, but it was easy to see why Von Richtofen liked it, with its seeming ability to point and shoot in almost any direction.
Comment: @JohnK This flat turning was a trick introduced by Oswald Boelcke in the Fokker E.III. The initial instability together with the fully deflected rudder built up the yaw rate so the plane would continue to spin around even when flying sideways. It was not very effective, though, because the high yaw rate in combination with the low rate of fire of their guns would only be good for scaring their pursuers.
Comment: I sometimes feel I need to make a fake account just so that I can give these kind of answers more upvotes.
Comment: @KennSebesta Please spare the effort. I have enough reputation already.
Answer: Yes, the fuselage contributes to yaw stability, as do the wings and in some cases the engine(s). However, the fuselage contributes in a negative way, it is unstabilising.
What percentage the fuselage contributes, depends of course on the shape of the aeroplane. The figure below is from my university book (paper version only) on flight dynamics, by prof. Gerlach, which shows the dimensionless yaw coefficient $C_n$ as a function of side slip angle $\beta$, for a wind tunnel model of the Fokker F27:

The four graphs indicate, from left top to bottom, the $C_n/\beta$ of:

The wing/fuselage combination.
The fuselage only.
The wing only.
The complete aeroplane model, the only graph showing the desired positive $C_n/\beta derivative$

Notice that the wing/fuselage combination is not a simple addition of wing and fuselage contribution, due to the wing/fuselage interference. The wing only contribution is ever so slightly positive.
For the two graphs with the fuselage, $C_n$ is negative for positive $\beta$, indicating a de-stabilising yaw coefficient as a function of slip angle. For the F27 the contribution of the fuselage/wing is about -30%, the vertical tail is an absolute necessity!
We can see that the straight wings of the F27 contribute very little to slip stability. Contribution to slip stability of the wings depends on the wing dihedral and the wing sweep angles. How the wing sweep angle contributes is intuitively clear from the figure below:
Comment: Ahem - isn't c$_y$ the side force coefficient? For yaw stability the coefficient to use is c$_{n\beta}$. And I'm quite sure that the F-27 fuselage is destabilizing in yaw, even in Prof. Gerlach's book.


Wire at the end of the circuit activates my tester at about 12-14 inches away

Question:
Have a new circuit in the basement that includes a dimmer switch and 4 recessed lights, in addition to 6 outlets.
The switch and the lights are at the end of the run. The order is:: panel > AFCI outlet > 5 outlets > switch > 4 recessed lights
When a contactless tester (Kline Tools) is brought very near (about an inch) or touched any wire of the circuit, except the part between two last lights,  it beeps/blinks red, which is correct.
Checked the wiring (after turning off breaker) and all seem to be ok.
All are new products from Home Depot. Tester is also ok and all outlets functioned ok, including AFCI outlet (trips and resets).
When the tester is at about 12-14 inches from the wire between the two lights at the end of the run, it starts to beep and blink.

Why is this happening?

I'm planning on rechecking the wiring/connections etc., but any tips would be greatly helpful.
Comment: You should mark the fixtures or bulbs that wire goes to first, take out the light bulbs (or disconnect the fixtures but splice the wires through temporarily), then power up the circuit to check if it still happens when there is no load.  Then add the loads back on to the circuit one by one, checking the wire in and the wire out as you add each load.  Let us know the result.
Comment: I take it the dimmer is turned on at this point?  Is the dimmer a variac type (about 20 pounds) or a rheostat type (makes so much heat it needs a chimney)? If it's not either of those, it is doing something electronic and *not outputting a sine wave*, which means it's making Harmonic frequencies at 180 Hz, 300 Hz, 420 Hz, and other odd multiples of 60 Hz.
Comment: Thanks and Leviton dimmer that comes as a 3-pack is what I'm using. Used other two in my main house to replace older dimmers and no issues at all.
Comment: @Harper-ReinstateMonica I wrote an answer with the assumption it's related to a dimmer, but then I deleted it because I noticed it's not happening on all of the loads attached to the dimmer which means there's a good chance it's something else.  The harmonics should be present on all wires downstream of the dimmer.
Answer: Those testers detect electromagnetic fields.
It's downstream of a dimmer
There are three dimmer technologies.  Variacs are a variable transformer which steps down voltage, giving a sine wave, but they are huge and heavy.  Rheostats are a variable resistor that adds impedance, giving a sine wave, but they make stupefying amounts of heat.  Both of these, being sine waves (as in (a) below), produce a 60 Hz electro-magnetic field. (50 Hz in the rest of the world).  Which is what that tester is designed to detect.
However both those dimming methods are totally impractical for the home.

So a third method is used: semiconductor dimming, which uses electronic switching to alter the sine wave (as in (b) and (c) above).  However, nature likes sine waves, and nature will treat a mutilated sine wave as if it were a conglomerate of various sine waves summing up. The science of this is called "Fourier analysis".
Which sine waves sum up to (c)?  Many of them, at odd multiples (3x, 5x, 7x, 9x etc.) of the base frequency.  So 180 Hz, 300 Hz, 420 Hz, 540 Hz, 660 Hz. and so on. Janky shaped waves can create lots of these and they can be strong. Depending on the setting of the dimmer, these other frequencies will have different strengths, and depending on the room, will propagate certain ways.
The tester's sensitivity to these harmonics will depend on its own design.
I bet all these factors are lining up in a way favorable to detection.
Answer: There may be phantom voltages coupled-in, and especially apparent when the circuit is off.
Testers can be quite sensitive, and your phantom voltage can be as high as half the line voltage, so 60V.
These are not necessarily an electrical problem, but could trip your tester.
To check for this, temporarily add a low-impedance passive load at the end of your run. An old fashioned 10W (or more) incandescent bulb is enough. The point is that it should draw a current even if the supplied voltage is coupled. Many modern devices, like LED drivers, draw next to nothing if the voltage under-load is below a threshold, thus keeping coupled charges on the line. If you don't have such a bulb handy, you can experiment with other loads. Whether they'll accomplish the trick depends on their electronic internals. Usually old fashioned appliances would work: incandescent bulb, fan, hair dryer, toaster, mixer, maybe radio, CFL bulb...
Safely wire up an outlet at the end of your run and plug in a load.
Phantom voltages that trigger a tester can arise from capacitive, magnetic, or electromagnetic coupling. The voltage or current is coupled from other wires or electrostatic charges in drywall/insulation when the circuit is off, since the charge has nowhere to go.
Answer: In that kind of distance strong electromagnetic field may caused if the feed and neutral do not run close together. Bad practice of wiring from not enough qualified electricians. Feed and neutral to load may be in different conduits.
Comment: @Nick the writer is talking about cases where the current returns on a different route. Current flows in loops, and to avoid spurious  EMF emissions, all current coming out a hot must return on its partner neutral.  If you put a clamp ammeter around a cable it should read zero, because the currents are equal and cancel each other out.
Comment: Thanks. The lights are recessed LED, with plastic casing, that does not need a ground. I'm using 14-2 and all wiring are close together. Not sure how they can be further apart. I'll check the wiring.
Comment: For example the phase come to load in on conduit or cable but neutral connected from another cable. Yes, the wires are together but different cables.
Comment: Thanks; I'll check all the wiring and connections and trouble shoot soon, and will post the results.
Answer: There are different classifications of testers with different sensitivity.
An example of this is a tester used for hvac circuits that will detect 18vac.
The 18v tester will detect 120v from almost a foot away so I think that may be what you have.
My standard non contact tester is 90-1000v  but if I have it turned on when I open my transformer vault 34500v it goes off. Similar but different ranges based on the sensitivity of the tool.
Comment: Thanks and made sure tester only detects 40V and above (green light). If less than 40V it used blue light.
Comment: Nick the detector only detects a "field" if non contact it can not tell how far away the conductor is so your detector may show a light red or blue and the source could be 277 yes. I have had many non contact testers even volt meters that use the electricians body as the ground reference. They can all be off and not only from real voltage but induced or phantom voltages. Get a real volt meter if you are concerned but there is nothing wrong with the detector. It could be wave shaping from dimmer controls we don't know but without a real meter it could be many different reasons