House Wrap on Cantilevered Overhang

Question: I have a cantilevered overhang on my second floor which I recently re-insulated.  In order to remove the old insulation, I had to remove the wood soffit and house wrap where the soffit was (the house has vinyl siding). Currently, I put up primed soffit with screws and caulk so that it was closed in, understanding that it could be a temporary solution. I'm assuming I need to replace the house wrap, if so, what is the best way to piece it together (I just cut it at the 90 degree angles)?
Comment: Of the 2 cantilever structures I have built did not have wrap on the bottom. I thought it would be a good idea but the engineer that put his stamp on both said it could and would cause more moisture problems. That was back in the 90's . So ideas may have changed. Both were 24" or less don't know if this matters.
Comment: Thanks Ed, this cantilever is only 16", and was built in 1982.  I'm not certain whether it is still needed/required, but I assume that if it wasn't required back then, the builder would have skipped it to cut corners.
Answer: House wrap is important to stop moisture that might make it through the siding, driving rain, wind, siding sometimes cracks, the wrap will protect the plywood and help with wind pushing into the walls, when you put it back staple it on the tape the joints with the proper tape.eg; if it's typar then get typar tape.
Comment: Yes, I do see it's benefit for siding, and I didn't remove any there.  I just removed enough under the overhang to get in the new insulation.  It probably won't hurt to replace the 16" of it on the underside of the overhang, I just wasn't sure if it was needed.

House Wrap on Cantilevered Overhang


Document Size - Illustrator

Question: I am working in Illustrator from a document created by another designer. I'd like to use the info in this document but need to know what the size of the document is. How do you determine the document size in Illustrator? Can anyone answer?
Answer: You can see the file size in an explorer window.
If you have dimensions turned on you can see the pixel dimensions in explorer as well.
You can see the art board dimensions when you select the art board tool in illustrator.
You can see the resolution and dimensions under Window > Document Info.

Document Size - Illustrator


WPF: access controls from usercontrol

Question: I have a usercontrol whit a RichTextBox control and a TreeView, and I want to bind a commands like Copy, Cut, Paste etc which are in Window not in usercontrol but I dont know how to access  Elements from usercontrol? Any ideas?
Answer: You have to add a namespace to your XAML file and add your usercontrol with the given namespace prefix
as such:
xlmns:myuserctrl = "assemblyreference here"

Make sure you give your usercontrol a name which you can access in your code-behind.
You should then be able to access your controls from that variable inside your code-behind. If not, create some properties in the usercontrol class referencing the controls inside the user control.
Answer: There's no straightforward way of accessing child elements of user controls in XAML. However you can get creative and implement a custom type descriptor that exposes control fields as properties, which you can then bind to from the elements outside of the user control.

WPF: access controls from usercontrol


VW Passat Variant 2016 Diesel engine gets much louder when I turn left/right

Question: My car is running well the only issue I have is that the noise the engine makes gets a lot noisier (but its still the same noise) each time I turn the wheels to left or right. The more I turn them the more noisier it becomes. I asked the technicians already but they cant find out why that is.
Comment: Check your exhaust system.  Possibly the centrifugal force of the turn is causing an exhaust leak making your engine sound louder.  I would start with the exhaust flex pipe.
Comment: Check your power steering pump and its drive mechanism.
Answer: In a modern car it is somewhat normal.
This is because the idle is precisely controlled to use minimum fuel while maintaining acceptable comfort and reliability.
When you turn the wheel, the idling engine has to double or even triple its output power in order to help you turn the wheels left and right. In a diesel engine, this amounts to doubling or tripling the cycle fuel amount.
Gasoline engines are different in this regard (they are a lot quieter as well).


How do I prevent my sugar coating from melting on my gummy bears

Question: I am making homemade gummy bears and I cannot prevent the sugar coating from melting way into a puddle of watered sugar? I tried drying the gummy bears for a day but it still melts away.
Comment: Are you coating with caster sugar, granulated, or confectioner's?
Comment: Under what conditions are you drying them for a day? An answer under https://cooking.stackexchange.com/questions/11131/problem-with-gummy-bears-being-too-much-like-jelly?rq=1 mentions a "drying room" in a commercial setup, where they also stay for a day, but I suspect they will have controlled humidity levels there.
Comment: I've recently bought commercial jellies whose sugar coating started melting together on a hot day. Could be storage related as well / instead of prep
Answer: I usually dry mine for approximately 48 hours. I've used cornstarch, regular sugar etc and found I like regular sugar with a bit of citric acid I pulse to powder in my blender. Once you've got the taste you want put the powdered sugar/citric acid in a large baggie and dump in your gummies (you will most likely have to repeat a few times dependent on the # of gummies made. I let them sit for an hour or so to set the outside. I keep 10 with me in a dispensary bottle and refill as needed.
Plain cornstarch can work as well.
FYI I used 3ounces of jello, 1/2 cup of water, 1 and 1/2 packets of Knox gelatin. Once gelatin blooms it's very granular

cooking on low heat (Stir frequently so gelatin doesn't clump but stir with a slow hand getting base off the sides and along the bottom.., if it starts to boil remove from heat. Once gelatin and Jello start getting touchpad remove from heat add your concentrate and an emulsifier (I like glycerin the best for the finished texture but soy or sunflower letchicin is also a good emulsifier.
Stir until you see no separation of oils. Watch out for foam and bubbles. Scrape what you can off but honestly I didn't do anything the first time it happened and the gummies were less clear..
Happy Candy Making
Answer: It is probably worth providing a recipe for what you're doing, but what about rolling them in a mix if iceing sugar and cornflour
Answer: you just have to decrease the moisture content in your gummy bears recipe. the gummy bears must not be much sticky when they come out of the mould.
Thanks.
Answer: You may need more gelatin in your recipe (or less water). You can also try a hair dryer to dry them completely.
Answer:
You may need higher brix.  Deposit >74 (absolute minimum) brix
Not curing long enough before coating- give them time to breathe then sand for better results.  If you wait longer than 24H you may need a little mist of water to coat
Not enough sanding- more of it needed because various reasons


How to get iPhone to forget old Mac?

Question: My 17″ Macbook Pro died last November. I have a new Macbook running 10.9.3 but my iPhone 4 won't sync wirelessly because it's still looking for the old Mac. I cant find a place to make it forget the old one and sync via wifi with my new one?
Answer: You need to sync your iPhone with your new Mac using USB. After you've done so, there is a check box to sync using WiFi in the iPhone's tab in iTunes.
Be careful though, if you sync with your new Mac, and you haven't transferred your media to your new Mac from your old Mac, you will lose the media on your iPhone.

How to get iPhone to forget old Mac?


Reading XBee data with Python not possible

Question: I have chosen the following setup to read sensor data by Arduino and an XBee-connection:

List itemA TMP36-sensor is connected to an Arduino Uno
List itemA Sparkfun XBee-shield with an XBee S2C is mounted on the Arduino (Router, API-mode). The Arduino is connected to COM3.
List itemCOM4 is connected with a Sparkfun XBee-Explorer (USB-connection). Another XBee S2C is connected on the explorer. This XBee is the coordinator (API-mode).

I have written the code for reading data from Xbee-Explorer at COM4:
<code>#! /usr/bin/python
# Import and init an XBee device
from xbee import XBee, ZigBee
import serial
ser = serial.Serial('COM4', 9600)
xbee = XBee(ser)
while True:
try:
enter response =  xbee.wait_read_frame()
    print response
except KeyboardInterrupt:
    break
ser.close()
</code>
At the moment it is not possible to get any data received by the Xbee with the Python code, although it is possible to read the data by XCTU.
In Detail:
If I send sensor data (sensor reading and sending to Xbee is done by Arduino Software) from the router to the coordinator, I'm able to read the data frames by XCTU and the results make sense. If I use the Python-code above, I did not get any data frames, although the RSSI-diodes of router and coordinator are blinking independently from the software (XCTU or Python) I use.
For me it is not clear what is going wrong and I would be happy to get some help to solve the problem.
Thank you very much for your support.
Regards Daniel
Answer: I had the same problem, changing from API=2 to API=1 solved my problem


how to delete duplicated brushes in sculpting mode

Question:
if i save the object as blender file it will contain the brushes i added by mistake so how to remove it from the list , btw how to keep one duplicated brushes to default-reload (close blender and reopen a new project),and are there anyway to load different brushes download from web as default? much more thx!!!!
Answer: Click on the Brush you wish to delete. In the tool panel and Shift click the X to delete. You will see a zero appears before the brush name in the pop-out tool-shelf. If you save and re-open or Revert - the brush will be gone...

You can find a link to an Add-on with more brushes on Blendernation
Brushes are essentially just textures that use the alpha cancel. You can use textures from other programs like these at Pixologic or just create your own in your favorite drawing program...
Ben Simmonds has also got a few .Blend files with brushes that are worth exploring - like this one on Blendswap. And to answer your last question I can quote him " ...you can append these brushes into your default blendfile to have them permanently avaliable. Just load the default blend file, then hit File>Append, select the brush blend file, select brushes, and shift-select the two Trim brushes inside. Click Link/Append from Library, and the brushes will now be avaliable. Then just save your startup file (Ctrl-U) to update the default .blend file."
Comment: why there's .blender111 shows up what is this file?
Comment: Related http://blender.stackexchange.com/q/65341/12
Comment: Is there a particular reason this is so convoluted? Why can't I just delete a brush I don't want without quiting/reloading? Why is it called "fake user"?


How make glow in Compositing if emission is behind glass?

Question: Why I can't make glow in Compositing in Cycles if emission is behind glass?
If use Glare, everything in picture will be glow, but I don't need it. I need only certain parts to glow, for example, like here - bulbs in headlights.
Comment: @Chris, Eevee was not in 2.7, at least it was not installed by default
Comment: why do you want to do this in compositing? isn't it easier to create an emission for the bulb lights and turn "bloom" on?
Comment: @Chris, Bloom is for Eevee, not Cycles, it looks like he's working with 2.79
Comment: thanks, but yes i know, and how should i know he uses Cycles?
Comment: Yes, I want to know how to do this exactly in Cycles.
Comment: thanks, did not know that ;)
Comment: Related: https://blender.stackexchange.com/questions/68410/light-rays-through-glass
Answer: As an alternative to blur, use a glare node. It will give you finer control since the effect is based on a threshold, to effect the picture based on the brightness of the pixels.

Read:
Any way to control light halos in the compositor based on emission level?
Also, the default glass shader will not work correctly for a light that is behind glass.
Try something like this:

Read: How to illuminate the darkness inside glass objects in Cycles?

If you must use glow, you can use a pass index to determine what gets blurred.

For complete instructions on how to set this up read:
One part of the render layer glowing?
Comment: Thanks for detailed explanation of how Glare node works. But ID mask for Glare also doesn't work if Emission is behind Glass. I need to use ID mask to set strength, shape & glow for each light bulb separately. Simply using Glare won't give the desired result.
Answer: You need to use a trick because alpha is not use for glass transparency so you can't isolate the glass object.
You can fix it in the Compositor with this trick:
Here Jordan Sautron explains how to give an effect to an Emission object behind a glass. It's in french so I try to summarize.

Give a Pass Index to your emission material (Properties > Material > Viewport Display > Settings), for example give 1.
In Properties > View Layers > Passes > Data, activate Indexes > Material Indexes.
In the Compositor, create a Render Layer with the glass, a second one without.
Create a Converter > ID Mask node in front of the second Render Layer node, type the material index of the emitter material (1).
Create a Color > Mix node (Multiply mode). Plug the first Render Layer node in the first socket, plug the ID Mask in the second socket.
Plug the Mix into a Filter > Glare node, put its Mix value at 1.
Plug the Glare into the second socket of a Color > Mix node / Add mode. Plug the first Render Layer in its first socket, put its factor at 1 or more.

Another solution is to fake the glow effect with the Layer Weight node: Create a sphere around your light object and give it a mix of Emission and Transparent nodes, with a Layer Weight as factor:

Of course you can make it a bit more complicated with some noise etc:

You can even give it a Displacement node. In that case don't forget to go into the Properties panel > Material > Settings > Displacement > Displacement Only:
Comment: This is useful tutorial. And thanks for translation from french. Only using different layers is not very convenient. Rendering almost the same picture 2 times is long, especially for animations. But I suppose that can transfer objects with Emission to another layer & render it instead of the whole picture without glass. It will be much faster this way & I think result will be the same.
Comment: if you don't care about too much realism you have tricks to create this kind of effects like for example create a sphere with transparency and emission mixed into a mix shader with a layer weight as factor, please tell me if you want me to show you
Comment: Yes please, show me what you mean if possible.
Comment: ok I've edited, I'll show what it gives with a bit of noise...
Comment: It looks impressive. I think I'll find application for this. Thanks for all.
Comment: This (first) solution will not take into account deformation of light created by the glass right? For instance if you are trying to make this picture glow, you would glow along the original picture right?
Comment: hello, it's a long time ago, I guess you're right
Answer: If your emission has a very specific color which is not found elsewhere in the picture, you can also easily solve it by just chroma-keying/color-keying it to get your original mask:

(Here I use several "glare" masks to have a stronger effect, but I guess you could use a Gaussian or any other kind of glare)


Julia codes for unitary gate decomposition

Question: I am looking for a way to decompose any given operator U into ZYZ rotations.  And then plug the values back into ei∗α∗Rz(θ0)∗Ry(θ1)∗Rz(θ2), to 'recompose' the gate and check if the gate decomposed correctly. Can anyone help me with the Julia codes for this? If not, then Python codes are also welcome
Comment: You can use the code from this question https://quantumcomputing.stackexchange.com/questions/27535/decomposition-of-unitary-operator-into-rotations-around-bloch-sphere
But you need to patch it using the answer.
Comment: Alright Danylo, thank you very much.
Comment: please have a look at https://quantumcomputing.meta.stackexchange.com/questions/49/tutorial-how-to-use-tex-mathjax-to-render-math-notation and https://quantumcomputing.stackexchange.com/help/how-to-ask
Answer: welcome to QCSE.
I have understood your question, but next time make sure that you use MathJax notation for math equations, it is much cleaner and understoodable.
I don't know about Julia, but I have wrote the following code in Python-Qiskit and I think that's what you are looking for:
import numpy as np
import math

from qiskit import QuantumCircuit, quantum_info
from qiskit.visualization import array_to_latex

#U = np.array([[1/math.sqrt(2),1/math.sqrt(2)],[1/math.sqrt(2),-1/math.sqrt(2)]])
U = np.array([[0,1],[1,0]])
display(array_to_latex(U, prefix = "U = "))

decomposer = quantum_info.OneQubitEulerDecomposer(basis = "ZYZ")
data = decomposer.angles_and_phase(U)
theta = data[0]
phi = data[1]
lamda = data[2]
phase = data[3]

print("\033[1m ZYZ decomposition of U: \033[0m")
print(" theta = {0}, phi = {1}, lambda = {2}, phase = {3}".format(theta,phi,lamda,phase))

qc = QuantumCircuit(1)
qc.rz(lamda, 0)
qc.ry(theta, 0)
qc.rz(phi, 0)
display(qc.draw())

phase_exp = math.e ** (1j * phase)
U_recomposed = np.array(phase_exp * quantum_info.Operator(qc))
display(array_to_latex(U_recomposed, prefix = "U recomposed = "))

And the output is:

I have used built-in class of qiskit quantum_info.OneQubitEulerDecomposer and its methods in order to easily compute the angles and phase of the ZYZ decomposition.
Take a look at the documentation of the OneQubitEulerDecomposer class and its method angles_and_phase()
Note that I gave identical names to the angles just as in the documentation, to avoid confusions.
Finally, I have used the qunatum_info.Operator class to obtain the unitary matrix for the circuit created, and after multiplying the result by the complex exponent of the phase we have got the original U operator.
Comment: Alright, thanks so much for this


How can I use an external hard drive as an internal one virtually?

Question: You might be thinking that I want to connect my external hard drive using SATA cables as an internal one....But no, that's what I don't want to do. Is there any way that I can connect an external hard drive using an USB connection and configure it using some software perhaps, which will enable me to use it as an internal one, so that I can move my operating system (Windows 10) and Applications to my external hard drive and use the internal one for files such as documents- storage? Any idea how to do that!?
Comment: The solution to this is probably entirely a software matter, with no special hardware involved.
Comment: Even if you do find the software to do this, I would highly recommend against doing this. The safeguards exist in the first place for a reason. It would suck if your entire operating system got corrupted because a usb hard drive got kicked loose.
Answer: I am using the same thing on Linux, but it should not matter. I just install whole system on USB flash and setup in BIOS to boot from USB  first.
Now it finds the USB on start, boots from it, sets the whole system, connects to net and does the usuall daily tasks. I can connect remotly, setup encription and connect internal hard drives encrypted, if I need so.
Those internal HDDs contains just5 encrypted data, nothing else, the USB flash contains the full system and can be used to rescue any USB bootable computer (nearly any nowadays).
As flash is not good for too many writes, I load as much as possible of the system to memory at start and I set the logs to RAM disc entirly, so th USB can be read-only. Takes more time to boot (USB is always slower than native connection), but I do not care. I can get the system anywhere else leave the computer with encrypted data discs only, not being able to boot. I can use the flash on any other computer to get my system working.
In Windows case it would mean to install the windows on the USB only (or start with some rescue flash and expand its content, then maybe copy it to USB disc. The disc probably needs to be market "bootable" and you need to set the computer BIOS to boot first from remote media - either as default option, or as backup option and do not make internal disc bootable, or just press propper key on boot to select boot media from list of aviable devices.
As I do not use Windows for many years (from when XP was hot new), I cannot provide step to step instruction, but maybe Windows are not so bad, that they would not enable "rescue system" to lay on USB media and to be customized ...
Comment: Yep. I got it pretty much. I'm using WinToUSB for this. I configured UEFI in BIOS and formatted by exHDD using MBR. Works great


What forces the maximum speed of a cyclist on a steep climb?

Question: I know that on a flat road drag is the main force, I have to provide as much force as the drag (and the friction in the drive train) produces. I can also see that the faster I ride, the harder it gets and at speeds over 35 km/h that if I bend down to the handlebars, I can ride faster. But what about steep climbs? On a 15% climb I can barely ride at 5-6 km/h and the drag doesn't seem to be noticeable (I don't seem to go any faster when there's a moderate tailwind). I need to produce more force to combat gravity, but that does not depend on my speed - why can't I ride on the same climb at e.g. 9 km/h speed?
Answer: On a steep climb we can ignore drag and friction. If you wish to sustain higher velocity, you need to invest the same amount of energy in a shorter time, i.e. you need more power. This energy goes into your gravitational potential energy, given by $E_p = mgh,$ where $m$ is your mass (together with your bicycle), $g$ is gravitational acceleration and $h$ is height.
If your velocity is $v$ and angle of inclination you climb is $\alpha$, then your vertical component of velocity is $$v_z=\frac{d h}{d t}=v \sin\alpha.$$ In order to sustain this, the required power is $$P = \frac{d E_p}{d t} = mgv_z = mgv\sin\alpha.$$
You can see that the required power is linearly proportional to velocity. If the maximum power you can sustain is $P$, the top speed you can sustain is given by: $$v_{max}=\frac P{mg\sin\alpha}$$
Comment: So it's the power (and not the force) that my body can produce is the limiting factor.
Comment: You need too exert a certain amount of force within a certain time.  No use using a really low gear and pushing really hard if it barely moves.


Sampled Rap Songs

Question: It's entirely standard for rap songs to use samples, but what about the other way around --rap music sampled for use in non-rap songs?  I can think of two examples:  Macy Gray's Do Something which samples OutKast's 1994 song Git Up, Git Out, and Mary J. Blige's Reminisce which sampled Pete Rock & C.L. Smooth's They Reminisce Over You (T.R.O.Y.).  Are there other songs which have used this technique?
Comment: Isn't this a "Chicken or Egg" question?  If Rap so heavily samples Rock, why would Rock turn around and use a re-sampled beat?
Comment: Here's a list: http://www.vh1.com/music/tuner/2013-09-18/singers-who-sampled-rap-songs/ google will show you many more. Not sure this is a good SE question as there is no one right answer to this.
Answer: Depending on your definition of "non-rap", I know for a fact that artists such as Girl Talk (along with others on the Illegal Art label) sampled plenty of rap for songs that weren't necessarily rap. Venturing into left field, there was a project called Kids & Explosions which put out an album of entirely sample-based stuff that I really couldn't pin down a genre on (edits were way too crazy/abrasive for it to be called a "mashup").

Sampled Rap Songs


What chords are used often in "Funk" - Why?

Question: "Pass The Peas";"Le Freak"; "Get up and Jump";"Shake your Pants""The Crunge"....They all use very similar chords in a Funk setting - what are some Standard Funk Chords and why (from a Music Theory Perspective) have these chords evolved into being embraced as such?
Comment: The mother of all funk chords: http://www.youtube.com/watch?v=tprMEs-zfQA
Comment: I have to point this out: Funk is a style of delivery in rhythm rather than a chord system. While some chords might be popular, any song can be played ina funk style meaning the chords involved aren't really part of it, this I'd question the notion of "standard funk chords".
Comment: Many just bar the whole neck, which is a minor (11) chord.  It's also in Miles Davis So What.
Answer: Some of the most popular chords in funk include E9, E7, and E7+9 (also widely known as the so-called "Hendrix Chord", since Jimi used it in "Purple Haze" and other songs), transposed as necessary.  Here are their canonical voicings:
E9 and E13 (Often, players will play these without the bass note):
$A.7.$D.6.$G.7.$B.7.$e.7 | $A.7.$D.6.$G.7.$B.7.$e.9

Example song: "Sex Machine" by James Brown (played in Eb rather than E).
E7:
$D.6.$G.7.$B.5.$e.7

Example song: "Who's Gonna Take The Weight" by Kool & the Gang
E7+9:
$A.7.$D.6.$G.7.$B.8

Example song: "Flashlight" by Parliament
Update: A little love to the Am7 and Am9 chords as used in funk:
$D.5.$G.5.$B.5.$e.5 | $D.5.$G.5.$B.5.$e.7

And the Em11:
$A.7.$D.7.$G.7.$B.8

As to why these chords became popular funk chords, the most simplistic answer is "Because the R&B musicians who went on to develop funk (James Brown, George Clinton, etc.) used these chords a lot, and for whatever reason, their songs sold lots of records, so the chords became identified with the 'funk' sound and other funk musicians copied them."
A less simplistic but more speculative answer would point out that these are all dominant chords, and that funk, like the blues, doesn't really adhere to the harmonic principles of Western diatonic music.  From the diatonic perspective, dominant chords---the E7+9 chord, especially---don't make any sense when used as I and IV chords, as funk does all the time ("Flashlight", for example, is built entirely around a I-IV progression, with seventh chords used for both).  The E7+9 is particularly out of place (again, from Western music theory's perspective) due to it's having both a major and a minor third in it.
But again, funk and blues aren't really based on Western music theory principles but instead on African rhythms and harmonies, filtered through Western instruments.  In the purest 12-bar blues form from which funk evolved, all the chords are dominant 7th chords, and the scales are based around pentatonic plus blues notes---decidedly not the traditional Western major scale.  So it's a bit of a mistake to try to analyze these genres of music from the perspective of Western music theory, since they don't really fit in that context.
Answer: http://guitar.about.com/od/funkguitar/ss/funk-guitar-lesson_2.htm
http://guitar.about.com/od/funkguitar/ss/funk-guitar-lesson_4.htm
http://www.gianlucaverrengia.com/funkchords.htm
http://www.ultimate-guitar.com/lessons/music_styles/funk_music.html
etc... etc.. etc.. (google is your friend)
A basic funk chord is Em9 played on the top 4 strings. It is very easy to play(just barre across those strings), is movable, and sounds nice, easy to get the funky sound because you can mute the strings easy(just lift up your finger).
Funk is more about style then specific chords. It is syncopated with lots of ghost notes and "rakes". Some chords make it easier to do so and sound more hip than others but ultimately an chords could be used.
Comment: Google it isn't a very good answer. There are lots of questions that are googleable, but the point of the stack exchange sites is to provide definitive answers to questions, regardless of whether the question is easy to answer.
Comment: Also, it's a good idea to summarize the information in your links rather than just linking to them. This helps for two reasons, 1 the info is now actually in the answer, requiring less steps for someone to understand your answer but more importantly 2) it helps avoid link rot. If the link stops working, your answer is still useful.
Comment: No, Em11 is what you play when you strum the strings of a guitar without fretting any notes if it is in standard tuning. E A D G B E. Take out the A and you have E A D G B E. The top 4 strings is Em7. Add the F# and you get Em9. I Mentioned it wrong but both of those chord forms are used a lot in funk and are very similar. You can call it D G B F# = Bmadd6 instead of Em9.
Comment: The Dom9 (E9....) is one of the most oft used "Funk Chords" pick 5  James Brown songs and 3 will have a Dom9 chord vamp.  A-Em7 is the minor cousin and so forth..Then you have all of the 11th and then chords w/o Thirds....
Comment: Em11 is correct. "The top 4 strings" was referring to the E string, A string, D string, and G string, which make an Em11.
Answer: I use the major seventh a lot
e.g Bmaj7 - XX9876
another 7+9 shape without the bass
B7+9 - X X 7 8 10 10
and a jazz funk ii-V
e.g interpreting Am7b5 E7
X X 7 8 8 10(p)8     X X 10 11 11 13(p)11
Answer: As others have pointed out, a lot of what makes chords sound "funk" is using extended chords over basic triads/7th chords (Am11, E7+9, G13, etc), and the history of funk is well documented (but can be crudely summed up by "some artists played guitar in a similar way and got very popular, so subsequent artists emulated their styles and a genre emerged"). Something that I don't think is emphasised enough though is voicings and play style.
You can quite easily play a 13 chord on the guitar over all six strings (albeit with a few notes missing due to string number limitations) - however, the role of the guitar in funk music is rarely to play big chords which create a wall of sound. A lot of the time funk guitarists don't stray above playing three notes at a time (usually strings 1-3 or 2-4) as the bass guitar (or keyboard or whatever) will fill out the rest of the harmonic space. While the guitar is often pronounced and loud in funk music, it is not the primary instrument and nor is it the main instrument which outlines what chords are implied. You will often see situations where the guitar is seemingly playing a completely different chord to the one implied by the bass guitar, but this is because they are playing the extensions of the chord rather than the full chord itself (eg a guitarist may be playing F-B-E over a G major chord as it is playing the extensions of a G13 chord... if that makes sense). Playing chords where the root note is not at the bottom of the chord, or even played at all, is tricky to get your head around and takes a lot of practice to get good at.
In terms of play style, a funk guitarist will probably play more dead notes than actual chords in any given song; the guitar in funk music is primarily a rhythm instrument. If you listen to By The Way by RHCP, you will hear in the break/verse parts that the guitar is mostly just playing dead, strummed notes with the occasional Dm - rather than just playing DM or staying silent. I know that RHCP isn't a classic 80's funk group, but the influence there is obvious... the guitar should almost compliment the drum groove over playing its own distinct part. You will also hear a lot of very precise single-note lines, but these are also complimentary as rhythmic riffs and often are not intended to be the "hook" of the song.
Other answers cover the actual theory and history of funk guitar better, but I thought that an emphasis on how these chords are played was missing and in order to sound like a funk guitarist, this kind of stuff is extremely important to keep in mind.


What is Event Horizon of a Black Hole?

Question: The boundary of a black hole is said to be surrounded by event horizon - the point of no return! What is its significance in terms of general relativity?
Comment: The question "What is its significance in terms of general relativity?" is both too broad and out of scope for this site (belongs on Physics.SE). Could you clarify exactly what information you are looking for?
Comment: What I mean to say is, how are the characteristics of event horizon related to **Space-Time?**
Answer: It is exactly the point of no return for light. In other words, it is the point (actually more like a sphere) in which the escape velocity from the Black Hole gravity reaches $c$.
Answer:
What I mean to say is, how are the characteristics of event horizon related to Space-Time?

Formally, an event horizon is the boundary of a region of spacetime that's not in the causal past of future null infinity. In other words, the boundary of a region from which even idealized light rays cannot escape to infinity. Whenever the event horizon is smooth, it is also null hypersurface--i.e., the direction perpendicular to it is a light ray.
Because the event horizon is defined in terms of the infinite future, the definition is very non-local, and one would need to know the entire future history to be sure where the event horizon is. As such, it is only one of a half-dozen different types of horizons used to study black holes.
Though the event-horizon itself is a three-dimensional hypersurface in spacetime, it can also be viewed as an evolving two-dimensional membrane made of a viscuous electrically conducting fluid with finite temperature and entropy but zero thermal conductivity.

What is Event Horizon of a Black Hole?


how a client switches from provider to consmure openldap centos 7

Question: I have setup a basic provider/consumer and client openldap on centos 7. Data does get replicated to the consumer when I add something to the provider and it is all synced up. The client can read info from the master(provider). Now I like to turn off the provider and see if the client will read from the consumer. I can use authconfig --ldapserver="ldap://consumer..." --update but that will not be practical if we have many clients and needs to be instantaneous. Could anyone please tell me how to switch a client from reading from the provider to reading from the consumer automatically. Thans
Answer: This would include both servers on the client to look at if one is not available:
authconfig --ldapserver=simple-provicder.example.com,simple-replicator.example.com --update
I had the full ldap://simple-relicator.example.com which was the mistake, now I can switch off the master and it sees the replicator.


simple to use ruby gem with date & time event calendar with month view

Question: Any recommendations for a simple to use ruby gem with date & time event calendar with month view? The gem will ideally enable app users to select a date and time for their upcoming event and be saved to database (postgresql) via active record.
Answer: You should be able to do this easily with the jQuery Date picker. https://github.com/jquery-ui-rails/jquery-ui-rails provides an example in the readme file of how to use it.


fallback and receive function on WETH

Question: Does a contract that works with Wrapped Ether(WETH) require a fallback or receive functions? Let say I send WETH to a smart contract with/without fallback functions, what will happen?
Answer: No, there is no need, because Wrapped Ether is actually an ERC20 token and there is no need for fallback or receipt functions to receive tokens, these functions are only used to receive native coins in the smart contract.
Answer: No it doesn't need a fallback, and receive has no notion of erc20 transfer.
In general you should have a deposit function or a function that moves the tokens on behalf of a user and updates a balance.
While you  can for example send weth to a uniswap pool in one block and then call swap on the contract in another,  in practice, on a mainnet the token will likely be skimmed by a bot before you are able to take an action that allows the contract to know its balance of the token has changed and so can fulfill your swap.
A token is not like a native coin, there isn't a way for the contract to know its balance has updated without some function being called, there's no way to auto reject it through not having payable functions or fallback.
Weths entire use case is as an erc20 conforming representation of eth, it exists to be treated as any other erc20, so there are no special opcodes or considerations by the evm.
Answer: When you "send" an ERC20 to an address, it actually only updates the balances of the accounts.
It doesn't notify the receiving address in any way.
The only proof of this transfer is the transaction itself and the Transfer event.
But smart contracts are not able to listen for transactions or events.
This is actually one of the main shortcomings of ERC20 and the reason why ERC777 or ERC1363 were created.
ERC721 (the NFT standard) introduced the idea of callback:

the safeTransferFrom() will verify that the address is a contract
if it is, that the contract implements the IERC721Receiver interface,
and if it does it will finally call the function onERC721Received on the called contract, enabling the called contract to be notified of the transfer and to add logic to react.

ERC777 and ERC1363 were built on this logic.
It works a bit like a receive() or fallback() function to enable handling specific cases on being called. The "receive" function will be notified and called when ether is transferred while the "fallback" will be called when the contract is called with any calldata that isn't recognized.
To wrap up:
Does a contract that works with Wrapped Ether(WETH) require a fallback or receive functions?
YES. But not because of the WETH itself but because those two functions are generally required to handle cases of wrong calls or direct ether transfers !

fallback and receive function on WETH


3DS file loader for opengl

Question: this is my 1st question in the site.
I need a 3DS model loader for opengl applications. Loader should also be able to load .jpg textures. I tried to use OpenSceneGraph for this purpose but this time I have to also use the whole OpenSceneGraph data structure to render the scene. Is it possible to use OpenSceneGraph only for model loading and do the rest with standart opengl code, especially glTranslate, glRotate, etc.
Answer: Googling turned up this: lib3ds
Not sure if it can read JPEGs but that should be easy enough with libjpeg or equivalent.
Comment: If you happend to use libSDL than libSDL_image might be your friend.
Answer: OpenSceneGraph uses "plugins" to load file formats - both models and textures. There are working plugins for 3ds and for jpeg, though at least the jpeg one (I believe) isn't built in the default configuration - when creating the OpenSceneGraph makefiles (or projects on Windows), you need to specify the location of the libjpeg files in order for it to be built (as the plugin is based on that library). Once you have these two plugins, you'll have no problem reading 3ds files and jpeg textures. Another option is to use some other convertor which supports both osg (or ive) - OpenSceneGraph's native format- and 3ds. Blender comes to mind, and it's free...
As for mixing openGL calls with OpenSceneGraph - that can be tricky, but possible. One option is to derive your own class from Drawable, then override its draw implementation method, and place it anywhere you want in the graph, though manually drawing the 3ds files defeats the whole purpose of using a scene-graph...

3DS file loader for opengl


List all files in directory using API

Question: I've been tasked with connecting with a Sharepoint document library from our website which is built with Django. I need to list all the documents in the library on a page and then allow them to be downloaded. I've looked around at the API docs and I'm very overwhelmed. I'm not sure where to start. We're running Sharepoint 2010. Anyone know where the best place to start on this would be? Any tutorials out there on doing something like this?
Comment: You tagged [tag:rest-api] in your response.  Are you calling the SharePoint object model from a client solution or from a server solution? Sorry, I missed a few words.  You want to call SharePoint from the JavaScript client object model since you already have a website built with Django.
Answer: Start here.  The JavaScript function retrieveListItems() is what's important.  Let me copy it here for posterity:
function retrieveListItems() {

    var clientContext = new SP.ClientContext(siteUrl);
    var oList = clientContext.get_web().get_lists().getByTitle('Announcements');

    var camlQuery = new SP.CamlQuery();
    camlQuery.set_viewXml('<View><Query><Where><Geq><FieldRef Name=\'ID\'/>' +
    '<Value Type=\'Number\'>1</Value></Geq></Where></Query><RowLimit>10</RowLimit></View>');
    this.collListItem = oList.getItems(camlQuery);

    clientContext.load(collListItem);

    clientContext.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
}

In that code, replace Announcements with the title of your list.
The CAML query is there to basically filter the number of items in your list (which could be in the millions!), so let me break it down for you:
<View>
    <Query>
        <Where>
            <Geq>
                <FieldRef Name='ID'/>
                <Value Type=\'Number\'>1</Value>
            </Geq>
        </Where>
    </Query>
    <RowLimit>10</RowLimit>
</View>

This CAML query returns the first 10 items whose List Item ID (relative to the list) is greater than 1.  More about CAML is a little out of scope for this box, but here's some links to help you get started:

CAML Query Schemas
CAML Query Tools
Non-Microsoft CAML Query Tutorial

List all files in directory using API


What is the area in which the two goats can eat grass, if they choose not to eat in the common approachable area?

Question: Two goats are tied with a rope of length 40m outside of a rectangular shed of dimensions 50m X 30m. The goats are tied to different corners which lie on the opposite ends of a diagonal of the shed. What is the area in which the two goats can eat grass, if they choose not to eat in the common approachable area?
Comment: Can the rope pass through the wall/fence? If not, I think that there is no common area.
Comment: @ajotatxe  **no**
Answer: The area at reach looks like this:

Just sum all the quadrants.
Answer: Looks like it should be just more than $1225\pi$ as the circle centered at C should intersect the circle centered at A. The point at which the circle intersect  (say Q) upto that point the goat can eat the grass. Hence the goat in the right side will eat the grass of GHQE. Similarly we will do it for the goat on the left hand side.
Answer: Consider one of the circle say $C_1$ to be centered at the origin $(0, 0)$ (end point of diagonal) & another say $C_2$ be centered at $(50\ m, 30\ m)$ (opposite end-point of diagonal) each having a radius of $40\ m$ Hence the equations of the circles can be given as $$C_1:\ x^2+y^2=40^2 \implies x=\pm \sqrt{1600-y^2}$$
$$C_2:\ (x-50)^2+(y-30)^2=40^2 \implies x=50\pm \sqrt{1600-(y-30)^2}$$ Now, using integration the common area $A_{c}$ between the two circles in the first quadrant can be calculated (by considering a horizontal rectangular slab) as follows $$A_c=\int(x_2-x_1)dy$$ $$\implies A_c=\int_{0}^{30}\left(\sqrt{1600-y^2}-(50-\sqrt{1600-(y-30)^2}\right)dy$$
 $$\implies A_c=\int_{0}^{30}\left(\sqrt{40^2-y^2}+\sqrt{40^2-(y-30)^2}-50\right)dy$$ $$=\frac{1}{2}\left[y\sqrt{1600-y^2}+1600\sin^{-1}\left(\frac{y}{40}\right)\right]_{0}^{30}+\frac{1}{2}\left[(y-30)\sqrt{1600-(y-30)^2}+1600\sin^{-1}\left(\frac{y-30}{40}\right)\right]_{0}^{30}-[50y]_{0}^{30}$$ $$=\frac{1}{2}\left[30\sqrt{700}+1600\sin^{-1}\left(\frac{30}{40}\right)\right]+\frac{1}{2}\left[30\sqrt{700}+1600\sin^{-1}\left(\frac{30}{40}\right)\right]-[50\times 30]$$ $$\implies \color{blue}{A_c=1600\sin^{-1}\left(\frac{3}{4}\right)+300\sqrt{7}-1500}$$
Hence, the area of rectangular shed to be grazed by the goats $$=\text{total area of rectangular shed}-\text{area of common region within the rectangular shed}$$ $$=50\times 30-A_c$$ $$=1500-\left(1600\sin^{-1}\left(\frac{3}{4}\right)+300\sqrt{7}-1500\right)$$ $$=3000-300\sqrt{7}-1600\sin^{-1}\left(\frac{3}{4}\right)$$ $$\color{blue}{\approx 849.3752804\ m^2} $$
Note: above area is of rectangular shed only, the area outside the rectangular shed is not included here.


Shared Internet apply /etc/hosts

Question: How do I make those who connect to me via a shared internet connection use my /etc/hosts file? I was thinking something along the lines of creating a DNS server, but I was hoping maybe there is a simpler solution?
Comment: Why dio you want to do this - a bit more info will help us to think what the solution is
Answer: You will need to install a DNS server. If you need a DNS server that automatically synthesizes answers from the contents of <code>/etc/hosts</code>, use dnsmasq.
Answer: There's also Gas Mask that let you share some hosts through some file on the network, your users would have to install it and configure it to the right file.

Shared Internet apply /etc/hosts


record encode play and save a wav file

Question: Can someone give an example of how to record, play, save and also encode a .wav file in a pcm file (u-law encode for ex). I would like to create a rtp stream. THX
Answer: NAudio can be used to record audio, convert it to u-law and save it to a WAV file. The included NAudioDemo application demonstrates how to perform all three tasks.
For creating an RTP stream, you could try RTP.NET

record encode play and save a wav file


how to convert a beta distribution into a uniform one?

Question: i want to convert a beta distribution with shape parameters a=b=0.5 into a uniform one. is this possible and if it is, how can i do it?
Comment: Good question but should be on Stats Stackexchange.
Answer: First, let me check if I understand what you want to do. This is the way I'm reading it: you have data (e.g. from a random number generator) that has a beta distribution. You want to apply a function to each data point, so the output data values have a uniform distribution. Is that right?
If so, the cumulative distribution function (the integral of the probability density function) should actually be the mapping you need.
Answer: Since the uniform distribution has a density of 1 everywhere (over the interval (0, 1)) you will "just" have to invert the density formula for the beta distribution.
But it contains gammas and after a quick googling it seems as if those guys are non-trivial to inverse.
If you know your math you can give it a shot, otherwise you can still try maple. I for sure don't know without putting some hours of effort into it. Maybe somebody else does...


Can some one explain how PCA is relevant in extracting parameters of Gaussian Mixture Models

Question: I am having some difficulty in seeing connection between PCA on second order moment matrix in estimating parameters of Gaussian Mixture Models. Can anyone connect the above??
Comment: Please provide more context here. Consider providing an example or the task that you are interested in. Why is it that you think there is a connection in the first place? May be cite a source?
Comment: The task is to find clusters (non parametric) for given set of data points. So I am interested to find mean components in the case of GMM. The claim is these mean components lie in the span of eigen vectors of second order moment matrix . Can you give me some intuition behind this claim.
Answer: I believe the claim that you are referring to is that the maximum-likelihood estimate of the component means in a GMM must lie in the span of the eigenvectors of the second moment matrix.  This follows from two steps:

Each component mean in the maximum-likelihood estimate is a linear combination of the data points.  (You can show this by setting the gradient of the log-likelihood function to zero.)
Any linear combination of the data points must lie in the span of the eigenvectors of the second moment matrix.  (You can show this by first showing that any individual data point must lie in the span, and therefore any linear combination must also be in the span.)


How can I tell where is Log4j picking its configuration from

Question: Is there a way to figure out where is Log4J picking the configuration file from?
I tried to change my log4j.xml and the changes were not reflected in Log4j behaviour. I deleted log4j.xml and funnily enough, Log4J is still working with the old behaviour. So it must be picking some configuration file which is available in my namespace. But the question is how can I figure out which one. Is there a way to do that? there are so many different dependencies on jars etc, so one of them must contains a log4j.xml or log4j.properties that is overriding my changes.
Any ideas?
Answer: When running your application you can set the system property -Dlog4j.debug. log4j will produce debug output in this case and tells you about how it resolves the path to the log4j.xml, e.g.:
log4j: Trying to find [log4j.xml] using context classloader sun.misc.Launcher$AppClassLoader@11b86e7.
log4j: Using URL [file:/C:/develop/workspace/foobar/target/classes/log4j.xml] for automatic log4j configuration.
log4j: Preferred configurator class: org.apache.log4j.xml.DOMConfigurator

To set a path explicit use the system property -Dlog4j.configuration=file:c:/pathToFile as described here.
Answer: Activating -Dlog4j.debug like suggested by FrVaBe in his answer is a good solution. However, I wanted to print or log the location on startup without activating log4j's debug mode. I created a little util method, that is mostly a copy of log4j's default init routine, which returns the URL of the configuration file.
Maybe it's useful for someone else:
/**
 * Get the URL of the log4j config file. This is mostly copied from org.apache.log4j.LogManager's default init routine.
 *
 * @return log4j config url
 */
public static URL getLog4JConfigurationUrl(){

    /** Search for the properties file log4j.properties in the CLASSPATH.  */
    String override = OptionConverter.getSystemProperty(LogManager.DEFAULT_INIT_OVERRIDE_KEY, null);

    // if there is no default init override, then get the resource
    // specified by the user or the default config file.
    if (override == null || "false".equalsIgnoreCase(override)){

      String configurationOptionStr = OptionConverter.getSystemProperty(LogManager.DEFAULT_CONFIGURATION_KEY, null);

      URL url;

      // if the user has not specified the log4j.configuration
      // property, we search first for the file "log4j.xml" and then
      // "log4j.properties"
      if (configurationOptionStr == null){
        url = Loader.getResource("log4j.xml");
        if (url == null){
          url = Loader.getResource(LogManager.DEFAULT_CONFIGURATION_FILE);
        }
      } else {
        try {
          url = new URL(configurationOptionStr);
        } catch (MalformedURLException ex) {
          // so, resource is not a URL:
          // attempt to get the resource from the class path
          url = Loader.getResource(configurationOptionStr);
        }
      }

      if (url == null)
        throw new RuntimeException("log4j configuration could not be found!");

      return url;
    }

    throw new RuntimeException("default init is overridden, log4j configuration could not be found!");
  }

PS: if you know a way to ask log4j for it's currently used configuration file, let me know.


Saving Dharma and Saving Lives

Question: Between Saving Dharma and Saving Lives, as per Vedic wisdom which comes first?
Comment: Your question is meant to elicit opinions. Doesn't Dharma include saving lives??? Why do you see them as opposed to each other as an either/or proposition?
Comment: see https://hinduism.stackexchange.com/questions/10876/how-do-we-decide-what-is-dharma-and-adharma/10896#10896
Comment: I am not knowledgeable but if Dharma and Saving Lives are same then Kurukshetra Arjuna killed his own adharmic relatives so it is a special case ?
Answer: First of all you need to understand what is dharma? In simple words, Dharma is the moral duty of a person towards the society and god.
Dharma is meant for the protection and well being of people.

Dharma protects and preserves the people. So it is the conclusion of the pandits that what maintains is Dharma. [ Karna Parva 69]

Dharma was declared (by Brahman) for the growth and well being of living beings. Therefore, that which leads to well being and growth is dharma. Dharma declares that one should not harm any other creature. Therefore, that is Dharma which prevents injury to creatures. Dharma is so called because it upholds all creatures. [ Shanti Parva 109]

So the sole purpose of dharma is itself the protection life.
Comment: Does Dharma is really bound to Morality ?
Comment: @Kanil Dharma is all about morality.
Answer: Aphorisms on Dharma, can be well understood in 'Letter and Spirit' through their delineation in Smrithi,  ithihasa Puranas .As an eg.
Manu-smṛti 4.138

सत्यं ब्रूयात्प्रियं ब्रूयान्न ब्रूयात्सत्यमप्रियम् ।
प्रियं च नानृतं ब्रूयादेष धर्मः सनातनः ॥
satyam brūyat_priyam brūyan_na brūyāt_satyam_apriyam ।
priyam cha nānṛitam brūyādéṣha dharmaḥ sanātanaḥ
One should speak truth, speak congenial, not speak unpleasant truth, Nor should one speak pleasant untruths, this is the eternal law (dharma).

Explanatory notes by Ganganath Jha
That only such truth should be told as is agreeable; it quotes the words of Vyāsa to the effect that 'only such truth should be told as is beneficial to living beings.'
Yājñavalkya (1.132).-'He shall never expose himself to danger; he shall not, without reason, say what is disagreeable, nor what is not beneficial or untrue; he shall not be a thief, nor an usurer.'(wisdomlib)

Lord Sri Krishna  narrates the  story of Sage Koushika to  Arjuna.-Mahabharata,Karna Parva

अनृतं तु भवेद्वाच्यं न तु हिंसा कदाचन।।

Kaushika who had undertaken the vow always to tell the truth. One day a group of travelers fleeing a band of bandits passed by a crossroad where he was sitting. One of them pleaded with him not to tell the bandits which way they were going. But when the bandits showed up and asked, he told the truth, and the bandits found and slaughtered the travelers. Kaushika is said to have lost all of his accumulated merit for this one act of selfishness
Thus, in the conflict of universal dharmic precepts of truth-telling and noninjury, Kaushika misvalued telling the truth over saving innocent lives. What is most important to note, however, is that whenever there is a conflict between a universal dharma and a visesha dharma, the latter always prevails. (story briefed in Mystism and Morality -Lexington books)

update
The following anectode of Sri Shridhara AyyavAl  seemed to be so connected to this question .
Sri Shridhara AyyavAl was a true Bhaagavatottama in every sense, and saw the presence of the Lord everywhere. Once, overcome by compassion, Sri Shridhara AyyavAl fed the food prepared (ready) for shraaddha ceremony of His father to a chandaala dying in pangs of hunger,and saved his life. Coming to know of the incident,He was  condemned, by the village ,unless sought praayashchitta to absolve His sin, by taking a dip in the holy Ganges. Sri AyyavAl's physical health would not allow Him undertake such a long journey from down south to top North, so He composed the 'Gangaashtakam' and devoutly prayed mother Ganga to appear and relieve him of his trouble. In response to his prayers, Ma Ganga appeared in His well, and started flooding the streets of Tiruvisalur.  Sri AyyavAl then prayed to the Ma Ganga thus – भगीरथमनोभीष्टसिद्धये भुवनाश्रिते । ब्राह्मणानां मनःपूर्त्यै मम कूपे स्थिरा भव ॥ Ganges withdrew and stayed in the well at Sri Ayyaval's house. This incident happened on the Amavasya in Kartika month(Souramana)
Celebration of this incident until now,  as Gangavatharana Mahotsavam, is the proof of this anectode.
Comment: Agree with you, now I could get it
Answer: Perhaps, it can be both Yes, and No.
Yes = Save Life First.
No = Dharma First.
The Vedic Dharma is very subtle, and sometimes present with conflicts which look  irreconcilable.
1. Yes.

Sometimes, for the benefit of many, saving lives becomes important, and that assumes the nature of Dharma.

As I discuss in this answer,

Chapter 11, Kularnava Tantram

76, 77. O Kulesvari! For the protection of Guru, Devata, Kaulika,
Kulāgama and Kuladharma one who dies after killing a reproacher,
merges in Parama Siva. Where there is the welfare of many by the death
of one bad person, the murder of such a bad person is considered a
meritorious action.

Also,
Bhishma in the Mahabharata advice thus, to Yuddhishthira on the positive aspect of life-affirmation, if one's presented with a mortal peril, citing the famous case of Sage Vishvamitra, when he ate the dog meat sourced from a Chandala's hamlet.

Chapter 141, Book 12, Mahabharata
"Even thus, when the end in view is the preservation of life itself,
should a high-souled person possessed of learning and acquainted with
means rescue his own cheerless self, when fallen into distress, by all
means in his power. By having recourse to such understanding one
should always preserve one's life. A person, if alive, can win
religious merit and enjoy happiness and prosperity. For this reason, O
son of Kunti, a person of cleansed soul and possessed of learning
should live and act in this world, relying upon his own intelligence
in discriminating between righteousness and its reverse. "

Note that, in any case, one has to consider the larger implications of Dharma are to be followed.
So, when saving lives (apparently at the cost of Dharma) , even that act maybe considered Dharma, for it's for the larger good.

2. No.
I discuss in this answer, the act of saving life of a mother afflicted with a terminal pregnancy via abortion, with both perspectives.
So, as per this view Dharma takes precedence over any kind of life-affirmation. So, if view 2 is considered, bet it any circumstances, Dharma takes precedence, even if it comes at the cost of one's life
Comment: Totally agree and understood, it's intricate and one needs the required knowledge to grow into such understanding

Saving Dharma and Saving Lives


Will other devices interfere with programming a ATmega32U4 if attached to SPI bus?

Question: I'm designing a custom PCB around an ATMega32U4. The 32u4 will talk to another onboard component via the SPI bus. Since the SPI pins (MISO, MOSI, SCK) are also used for ISP programming could other onboard component attached to the SPI bus interfere with programming the 32u4? If so, what is are typical ways to deal with other onboard devices on the SPI bus during programming?
Answer: As per AVR042: "AVR Hardware Design Considerations", subsection 4.1.1, "Shared Use of SPI Programming Lines":

If additional devices are connected to the ISP lines, the programmer must be protected from any device
  that may try to drive the lines, other than the AVR. This is important with the SPI bus, as it is similar to the
  ISP interface. Applying series resistors on the SPI lines, as depicted in [figure 4-2], is the easiest way to achieve this. Typically, the resistor value R can be of 330Ω.

See AVR042 for further details and considerations.
Comment: Thanks, that's a great resource. Does it make sense add the 330 ohm resistors to the board itself or connect them externally during programming? I took a peek at the SparkFun Pocket AVR programmer schematic [1] at it had 100 ohm resistors on MOSI and SCK (but not MISO). Are these likely protection resistors or something else? [1] https://www.sparkfun.com/datasheets/Programmers/AVR-Pocket-Programmer-v15.pdf
Comment: If you examine figure 4-2 then you'll notice that the resistors are connected to the SPI bus, not the ISP connection. Connecting them between the programmer and the device may cause the waveforms to violate specifications. The resistors on the programmer are for protection; the values are likely too small to change the waveform too much.
Comment: Is the following correct? In the picture the AVR block is the 32u4, the SCK, MOSI, MISO, RST lines pointing up are connections to the programmer, and the resistors to the right are outputs to the bus to which the rest of the SPI devices are connected.


Is there a norm making $C([0,1])$ into a Hilbert space?

Question: The space $C([0,1])$ of continuous functions on $[0,1]$ is an inner product space under the $L^2$-norm, but not complete. Equipped instead with the $L^\infty$-norm, it becomes complete but the norm is no longer induced by an inner product (in particular it does not satisfy the parallelogram law). This got me wondering: can we equip $C([0,1])$ with a norm which makes it into a Hilbert space?
Comment: What would be the trivial examples that would make it a Hilbert space?
Comment: @TheoBendit My mistake, a non-trivial semi-norm would make sense. In my head I was thinking of a zero norm. Edited!
Answer: As a vector space, $C\bigl([0,1]\bigr)$ is isomorphic to $L^2\bigl([0,1]\bigr)$, since they both have Hamel bases with the same dimension (the cardinal of $\mathbb R$). So, if $\psi\colon C\bigl([0,1]\bigr)\longrightarrow L^2\bigl([0,1]\bigr)$, define $\lVert f\rVert=\bigl\lVert\psi(f)\bigr\rVert_2$.
Of course, this uses the Axiom of Choice. I don't know how to solve the problem without it.
Comment: @yi_li **First** you define $\psi$ as a linear isomorphism from $C\bigl([0,1]\bigr)$ onto $L^2\bigl([0,1]\bigr)$; it exists, since these spaces have the same dimenssion. **Then** you define, for each $f\in C\bigl([0,1]\bigr)$, $\|f\|$ as $\bigl\|\psi(f)\bigr\|_2$. Then $\psi$ becomes an isometry from $\left(C\bigl([0,1]\bigr),\|\cdot\|\right)$ onto $\left(L^2\bigl([0,1]\bigr),\|\cdot\|_2\right)$.
Comment: ,Hi the key point then is why this isometric isomorphism $\psi\colon C\bigl([0,1]\bigr)\longrightarrow L^2\bigl([0,1]\bigr)$ exist?


Continuity beep from VCC to Ground

Question: Ram IC showing continuity from Vcc to Ground but only with black probe on VCC and red on ground pin and only in circuit. Not sure what this means?
Comment: it means that you should not be using "continuity" measurement to check for short circuits ... measure ohms instead
Comment: The continuity check on a DVM just indicates a fairly low resistance between the probes (about 40 Ohms for one of my meters), not a direct short circuit.
Comment: jsotola, my question was why the beep happens with black to red and not red to black. Thats why I said shows continuity, not short.
Comment: reverse polarity is likely to conduct through a  deliberate/inevitable diode. try with diode test function of the DMM.
Comment: @josh your post does not say `why the beep happens with black to red and not red to black?` ... as @tobalt said, there is probably a diode in the circuit
Comment: jsotola, I thought but only with black probe on VCC and red on ground pin was obvious as there would be no need to mention the orientation of the probes unless the orientation was a factor being it's a continuity check and I said only.
Answer: Chances are you've encountered the ESD protection network in the integrated circuit. Many integrated circuits, especially ones based on CMOS technology, are extremely sensitive to electrostatic discharge. This is especially severe on input pins, where the pin is connected directly to the gate of an input transistor, since charge buildup threatens the very thin oxide layer under that gate.
In order to mitigate this risk, most pins are clamped to the voltage rails using a pair of diodes, for example shown in this datasheet:

Another example from the 4071 datasheet1:

If the gate voltage goes above VDD (the equivalent of VCC for CMOS circuits), the upper diode conducts, and likewise if the gate voltage goes below VSS (i.e. ground), the lower diode conducts.
When you perform a continuity test across all the supply pins in the manner you described, you see continuity from VSS to VDD, since all of these protection diodes are conducting in parallel through every pin's protection circuit. This is one of the reasons why reverse polarity is so destructive to CMOS chips, and likewise, it's the reason why it's possible to (partially, unreliably, and at high risk) power or backfeed a chip through its supply pins.
Chances are, if you perform a diode test with your multimeter, you'll see 1.2-1.4 V or so (i.e. two silicon diode drops).
1 There's a fun bit of trivia with the dashed line - rather than two diodes, there's actually a single diode distributed over the whole resistor.
Comment: @josh It's almost certainly internal, and it's not necessarily listed in every datasheet out there. From my experience designing circuits for CMOS microfabrication, it's more likely to be present (and not listed in the datasheet) than not listed - my latest fab run would have literally required extra approvals from the fab to skip the ESD protections. It may also be listed in prose text, in a footnote somewhere, or only indirectly mentioned via the Absolute Maximum Ratings showing an allowable input voltage range that's consistent with such diodes.
Comment: @josh Because it can be *any* chip's ESD protection, since those are all clearly connected to the supply rails.
Comment: nanofarad, could there be external gate protection on the board? I don't see anything in the datasheet detailing this feature and I only get the beep with the chip in circuit.
Comment: If the multimeter is showing continuity because of ESD protection, any thoughts on why it only sounds in circuit?

Continuity beep from VCC to Ground


New tires produced over 3 years ago

Question: Just today, 12/14/2016, I had new Michelin tires installed on my SUV. The production dates on 3 of them are the 32nd week of 2013, and the 4th tire was produced in the 37th week, of 2016.  Should I be concerned?
Answer: It depends on your use case and how the tires were stored.
Tires, like a lot of other rubber things - I'm looking at you, Garage Queen Corvette owner - degrade over time. How fast and how badly depends on temperature, humidity and a lot of other things.
Serious autocrossers and road racers will tell you that they bag or shrink-wrap their tires when off-season (or, if they have more money, buy a new set frequently) to keep them from drying out and hardening. (Soft tires get better traction, but also wear out faster.)
In all honesty, on an SUV, you shouldn't really see much of an effect. Are the tires noisy? Is the ride rougher than it was before? Those could be a symptom of rot or hardening due to improper storage.
Given the level of (in)competence I've experienced at Every Tire Change Place Ever, I'd demand replacements. Sure, your tires are going to start decaying on your vehicle; however, that should start when you get them, not when Discount Tire threw them on the pile behind the non-climate-controlled warehouse.
Answer: Some of my tires are 8 years old. Depending on how much you drive, you may wear them out in the next 4 or 5 years, and the age-degradation issue will be a non-issue.
Comment: My wife's Escalade tires last forever. Tires on my Solstice and G35 - not so much. I think I made it two years on the G35 once...

New tires produced over 3 years ago


Started with jquery 1.4, should I care about previous versions?

Question: I have a fair knowledge about Javascript, I started with jQuery 1.4 a week back and I have gone through some examples. It's very interesting to use it with my application. But my concern is, should I care about previous versions? Should I know what the downsides are of the previous version?
Answer: Always use the very latest version.
Learning about fixed bugs is interesting in the old versions, though your time is probably better spent learning and trying out the current version's features.
Answer: The only reason to really care about previous versions is for supporting legacy apps that haven't updated and are tied to an earlier version.  But since jQuery is pretty good about backwards compatibility and the cost of upgrading is so low, people tend to upgrade fairly soon.  I'd say focus on the current version
Answer: In my opinion, you only need to concern yourself with the limitations of previous versions of jquery if you're working on a project that uses a previous version. As far as I know, the 1.4 adds a few built-in functions that make some things easier or negate the use of some plugins.
Answer: No you should not because newer jquery versions cover previous ones, you just may need to know differences between versions in case you got a project which already using previous version.
Answer:
Should i care about previous versions?

You should be more specific about this but you need to make sure that the sites developed with previous versions run fine. Knowing limitations of previous version helps you know how better tool you have now in your hands. The points is you now have something better in your hands.

should i know What are the downsides
  of the previous version?

Not necessarily because downsides are gone with the new version.


Activate atime for a specific directory

Question: I know that by changing something in 'etc/fstab' I can activate atime for every file in the system. But what I need, or rather want, is to activate it for a specific directory, say 'var/www/vhosts/myfiles'. Is it possible? What would I need to add to the fstab file in order to do that? Thanks in advance.
Answer: Unfortunately you cannot. You only disable atime for specific items, not enable it.
So maybe, if your /var/www is on a separate partition, you can enable atime (in fstab) for everything on this mountpoint, then recursively disable atime for every root folder of this mountpoint minus 'var/www/vhosts/myfiles' using:
<code>chattr -R +A /path/to/your/folder
</code>
the '+A' is the 'disable atime' attribute.
But it can only be a real alternative if there is not too many changes inside your FS directories / files (newly created items won't have the 'disable atime' attribute set.
Sorry for not being able to help more, but I really think it's a system limitation.
Note that on recent kernel versions, you can use the mount option 'relatime' (it is even the default I think), which still updates atime but far less often, so you don't notice the performance impact of it.
Comment: Thanks, I solved it by forcing every user who opens a file go through a PHP script first, and there I call the touch() function.
Comment: Yes, that's a very good compromise.

Activate atime for a specific directory


Kinesis Consumption Lag Monitoring

Question: I am trying to collect metrics for Kinesis at the stream level, more specifically want to get the count by which a worker/consumer process is lagging behind at the stream level, I don't care about the lags at the shard level. I found an example on calculating consumption lag on AWS docs, but it calculates the lag time, not the lag by message count. I am trying to use the Java KCL to gather these metrics for a stream, these metrics will be collected periodically and published to a dashboard. Thanks.
Answer: The lag size by number of records is not a metric that you get out of the box. You could calculate it yourself, but it's not straightforward.
The producer knows nothing about the consumer and the consumer knowns nothing about the producer. The only reason why the lag time is available is that the sequence number of each record has the ingested timestamp encoded in it, so the consumers can publish the latest timestamp they saw, and then you can get the max lag for the entire stream.

Kinesis Consumption Lag Monitoring


Excel COUNTIF with strings, separated by comma

Question: I am trying to write a simple formula to count how many times a particular name appears in a column. I am using COUNTIF as it is a pretty straight forward process but I cannot work out how to make it happen for a name in particular. This is the case:

The column named Age will display cells with one or more names, separated by commas in case there are more than one value. Putting "Young" as an example is easy to tell the COUNTIF formula to give me the number representing how many times this word appears, either being the only value in cell or as a part of a cell with a longer string value by giving the formula the "Young" statement.
The problem comes when I want the formula to count how many times "Mature" appears in my column. I cannot work out the way to make it count only when it says "Mature" without also taking all the "Early_Mature" or "Semi_Mature"
I know this is easy for whoever knows the basics of Excel so I don't think there is need to give more details.
Thanks
Answer: Most of the times I succeed solving such problems by adding the same delimiter (of our string) at the beginning and end of the main string.
So since your data is at COL:Y, you may create a new helper COL:Z and enter this formula:
="," & Y1 & ","

I did not use any spaces before or after comma since your data seems not having any space. Depending on your case, you may have to use spaces.
Now your string is wrapped with commas, which you may alter COUNTIF formula to such:
=COUNTIF(Z:Z,"*,"&B1&",*")

* characters are jokers which stand for "anything" in this context.
Answer: With an UDF. Code goes in a standard module added by opening the VBE with Alt + F11 then right-click in project explorer and add module.

Code
Option Explicit

Public Function GetCount(ByRef selectRange As Range, ByVal searchTerm As String) As Long
    Application.Volatile
    With selectRange

        Dim arr(), joinedString As String, i As Long, outputCount As Long
        arr = .Value

        joinedString = Join(Application.WorksheetFunction.Transpose(Application.WorksheetFunction.Index(arr, 0, 1)), ",")

        Dim arr2() As String
        arr2 = Split(joinedString, ",")

        For i = LBound(arr2) To UBound(arr2)
            If Trim$(arr2(i)) = "Mature" Then
                outputCount = outputCount + 1
            End If
        Next i
    End With

    GetCount = outputCount

End Function

Usage in sheet
Answer: To get the number of occurrences of Mature excluding those that have prefix you can use this array formula:
=SUM(((LEN(A2:A7)-LEN(SUBSTITUTE(A2:A7,"Mature",""))) / LEN("Mature"))-((LEN(A2:A7)-LEN(SUBSTITUTE(A2:A7,"_Mature",""))) / LEN("_Mature")))

Please take note that this formula is applied with Ctrl + Shift + Enter.
Given that your range is in Y:Y column, just change the range to one you need.
Comment: Thanks to all for the answers, unfortunately It has to be without creating extra columns and, although I am a big fan of VBA  found this one quite useful.
Thanks mate ;)
Answer: An alternative would be to change "Mature" to "Fully_Mature". Then you could just use Countif().
You'd have to do this in steps:
1) Change "Early_Mature" to "E_M"
2) Change "Semi_Mature" to "S_M"
3) Change "Mature" to "Fully_Mature"
4) reverse of step 1).
5) reverse of step 2).


Proof for the determinant of a Cauchy matrix

Question: I want to proof the formula for the determinant of a Cauchy Matrix without recurring to matrix manipulation, but by directly applying the definition of the determinant.  That is, given two sequences of numbers of length n, $x_1,...,x_n$ and $y_1,...,y_n$, where $x_i \neq -y_i$, I want to show that the determinant of the matrix A, whose entries in the ith row and jth column are given by
\begin{align}
\frac{1}{x_i+y_j}
\end{align},
is given by:
\begin{align}
\det(A) = \frac{\prod_{i<j} (x_i-x_j)(y_i-y_j)}{\prod_{i,j} x_i+x_j}
\end{align}
Now my proof looks like this:
\begin{align}
\det(A) &= \sum_{\delta \in perm(N)} sign(\delta)\prod_j \frac{1}{x_{\delta j}+y_j}\\
& = \frac{\sum_{\delta} -sign(\delta)\prod_j x_{\delta j}+y_j}{\prod_\delta \prod_j x_{\delta j} +y_j} \\&= \quad ...\\ &= \frac{\left (\frac {\prod_\delta \prod_j x_{\delta j} +y_j}{\prod_{i,j} x_i+x_j}  \right ) \prod_{i<j} (x_i-x_j)(y_i-y_j) }{\prod_\delta \prod_j x_{\delta j} +y_j}\\&=\frac{\prod_{i<j} (x_i-x_j)(y_i-y_j)}{\prod_{i,j} x_i+x_j}
\end{align}
Where $N$ is the set of the first $n$ natural numbers. What I have yet to understand, is the jump from equation 2 to 4. For the case of $n = 2$ it obviously holds. For the case of $n>2$ my intuition says that for every permutation there is a permutation with opposite sign such that $\prod_j x_{\delta j}+y_j$ has $n-2$ common factors and that these can be factored out such that they cancel with the $x_i+x_j$ appearing more than once in $\prod_\delta \prod_j x_{\delta j} +y_j$.
Can you help me to formalize that intuition or, if its wrong, lead me towards the right path?
Comment: Yeah, that's quite a jump, though I'm not even sure what those $\prod_\delta$ are supposed to mean (you *definitely* don't want to multiply over all permutations). I don't know of any direct proof by considering all permutations. I know proofs by induction and LU-decomposition and even by combinatorics (via the RSK algorithm and Lindström-Gessel-Viennot -- it's quite a detour).
Answer: Here is a proof that goes along the lines of the OP's argument. The method is for numeric matrices, that is $x_i,y_j\in\mathbb{C}$ since it uses simple Calculus methods.
Notice that $$c_n(x_1,\ldots,x_n,y_1,\ldots,y_n):=\operatorname{det}\big(\frac{1}{x_i+y_j}\big)$$
is homogenous of over $-n$, that is
$$c_n(\lambda x_1,\ldots,\lambda x_n,\lambda y_1,\ldots,\lambda y_n)=\lambda^{-n}c_n(x_1,\ldots, x_n,y_1,\ldots,y_n)$$
For simplicity, set $\mathbf{x}=(x_1,\ldots, x_n)$ (similarly for $\mathbf{y}$). From the definition of determinant it follows that
$$
c_n(\mathbf{x},\mathbf{y})=\sum_{\sigma\in S_n}(-1)^{\sigma}\frac{1}{x_1+y_{\sigma(1)}}\cdot\ldots\cdot\frac{1}{x_n+y_{\sigma(n)}}=\frac{P(\mathbf{x},\mathbf{y})}{\prod_{1\leq i,j\leq n}(x_i+y_i)}
$$
where $P$ is a polynomial on $\mathbf{x}$ and $\mathbf{y}$ which is homogeneous of order $n^2-n$ (observe that $\prod_{1\leq i,j\leq n}(x_i+y_i)$ is the common denominator of all the rational expressions in the sum that defines $c$). Notice that if $x_\ell=x_k$ (or $y_\ell=y_k$) for some $\ell<k$, then the matrix $C_n=\big(\frac{1}{x_i+y_j}\big)$ would have rows (resp. columns) $\ell$ and $k$ identical. It follows that
$$c_n(\mathbf{x},\mathbf{y})=k_n\frac{\prod_{1\leq i<j\leq n}(x_i-x_j)(y_i-y_j)}{\prod_{1\leq i,j\leq n}(x_i+y_j)}$$
for some constant $k_n$.
I tried to find a particular choice of $\mathbf{x}$ and $\mathbf{y}$ that yields a matrix which a determinant easy to compute and which allow us to estimate $k_n$, but did not go very far. Then I turn to some simple Calculus: the function $\mathbf{x}\mapsto x_1 c(\mathbf{x},\mathbf{y})$ is the determinant of the matrix obtained from $C$ by multiplying the first row of $C$ by $x_1$ and leaving the other ones the same. The continuity of the determinant function yields
\begin{align}
\lim_{y_1\rightarrow\infty}\Big(\lim_{x_1\rightarrow\infty}x_1c_n(\mathbf{x},\mathbf{y})\Big)&=c_{n-1}(x_2,\ldots,x_n,y_2,\ldots,y_n)\\
&=k_{n-1}\frac{\prod_{2\leq i<j\leq n}(x_i-x_j)(y_i-y_j)}{\prod_{2\leq i,j\leq n}(x_i+y_j)}
\end{align}
On the other hand,
\begin{align}
\lim_{y\rightarrow\infty}\Big(\lim_{x_1\rightarrow\infty} x_1c_n(\mathbf{x},\mathbf{y})\Big)&=\lim_{y_1\rightarrow\infty}\Big(\lim_{x\rightarrow\infty}k_n\frac{x_1\prod_{1\leq i<j\leq n}(x_i-x_j)(y_i-y_j)}{\prod_{1\leq i,j\leq n}(x_i+y_j)}\Big)\\
&=k_n\frac{\prod_{2\leq i<j\leq n}(x_i-x_j)(y_i-y_j)}{\prod_{2\leq i,j\leq n}(x_i+y_j)}
\end{align}
Putting things together, we have that $k_n=k_{n-1}$
Clearly $k_1=1$. The desired formula follows.


How can I connect one mouse to the main computer and the other to the virtual machine?

Question: How to connect one mouse to the main computer and the other to the virtual machine so that their work does not overlap in any way and each works only on the assigned device?
Comment: maybe you are asking the wrong question ... ask instead `how to ignore a specific mouse?` ... follow that line of thought ... it may lead to a solution
Comment: @jsotola Not really. That use case is pretty normal and there is USB passthrough that can solve it (partially, so at least VM mouse won't affect host), too.
Answer: It is possible to connect a mouse to VMware Workstation guest. You need to configure your VM to show all USB devices.
Procedure

Select the virtual machine and select VM > Settings.
On the Hardware tab, select USB Controller.
Select Show all USB input devices.
This option allows users to use special USB HIDs inside the virtual machine.
Click OK to save your changes.
Power on the virtual machine.
HIDs appear in the Removable Devices menu.

See the dialog below (web image). In this example their "Show all USB input devices" is unchecked. You need to check this.

Once this is done, you can pick one of your mouse in the Removable Devices menu of your VM, and connect it to the VM. It will be disconnected from the host.
However, this cannot stop the other mouse from joining the VM if you click inside the VM window to cause it to grab input devices. The best you can do is to disable all shortcuts that can cause the VM to grab your input, then do not click inside the VM window.
Reference: https://docs.vmware.com/en/VMware-Workstation-Pro/17/com.vmware.ws.using.doc/GUID-07883F0A-E7B5-4CBA-837D-0BA986E8B900.html
Answer: I have VMware Workstation and on another machine Hyper-V. In both of these Apps, the mouse and keyboard cannot natively be disabled.
I looked up Virtual Box and it is the same thing.
So you cannot disable your host mouse on a Guest Machine.
It may be possible to add a USB mouse to a Guest with USB Pass Through. But that may lead to confusion in the Guest.
This is further complicated on a Laptop with a mouse in the keyboard or track pad plus a connected mouse. Both get passed through to the Guest.
The mouse (and keyboard) in the Guest is also used to install the Guest machine (any Windows or modern Linux guest machine), so the mouse (and keyboard) cannot be ignored (or else it may not be possible to install a system).
Short answer:  What you want can not natively be done.  All you can do is add a USB Mouse to the guest machine.


Difference between cyber security and information security?

Question: What is the difference between an IT security policy, an information security policy and a cyber security policy?
Answer: These terms have been used synonymously over the years, but in practice, they are starting to get differentiated.
IT Security policies tend to cover secure policies around the "information technology" itself, the systems that serve and process information. Servers, networks, etc. In some organisations, there would be nothing about end users in these policies and only the IT staff would read them, for instance.
Information Security policies are about the wider security of information, no matter what form that takes. So, that would include paper copies of data in warehouses, as well as databases, cloud services, etc.
Cyber Security policies is the newer term, and tend to cover the information that is served and processed for/by the public and 3rd parties in a digital form. Basically, any data that travels over the Internet. "Internet security" used to be the term used, but that got confused with just user security awareness and how to browse safely, so this other more generic term has gained popularity in use. I am unaware of any formal definition of "cyber", but this is how it is used in practice. Some older information security professionals still roll their eyes at the use of this buzzword in official documents.
But, an organisation can define their terms however they choose to. These policies will include some section explaining what the policy covers, its scope, and where it applies.
Answer: All of these terms are used somewhat interchangeably.
Cyber Security and IT Security I would view as the same thing. That being protecting computer systems from illicit access, modfication of operation and/or damage.
Information Security is the practice of preventing unauthorized access, use, disclosure, disruption, modification, inspection, recording or destruction of information.
The major differences -

Information security is not limited to computing. Securing physical copies of information is also required - for example making sure staff don't leave confidential documents in the pub opposite the office.
Information security doesn't cover systems damage and control manipulation. For example Stuxnet modifying control routines in centrifuges to cause physical damage.

For computing systems which hold confidential data the two are heavily intertwined.


Adjusting Blower Speed for Central AC

Question: I am trying to lower the fan speed on blower fan. It is currently set to factory default setting. My AC is 3 ton unit. Model no is 4A7A3036H1000NA. The fan settings on IFC are like TAP 1, 2, 3.... and currently it is set to Tap 7 which is the last setting. But when I look at the chart for CFM vs External Static Pressure Tap 7 comes around 2000 for all the numbers. My question is should I lower the fan speed to get closer to the required CFM instead of letting it be on factory default setting? I know that first static pressure need to be measured but again the factory default setting seems to be high for 3 ton unit.
Comment: It has more to do with your duct size and coil size you may have a 3 ton compressor but what is the rating on the evaporator coil and the duct sizes if you drop the flow two low across the coil it will freeze up I have seen this when all the components are sized based on price some flows need to be measured I can make your static pressure be high by damping a few ducts.
Comment: Do you have a 7 speed fan or a 9 speed fan? Lowering the fan speed will reduce the noise level, but the temperature of the air coming out of the coil will drop as the fan speed is reduced. You don't want it to get too low. Just as an example, in my system the air going in is at 75 F and coming out of the closest duct is 59 F.
Comment: Jim, I am not sure about 9 Tap speed. But I am just going off the std 300-450 CFM/ ton statement that I found on quite a few website. So in my case Tap 7 is still higher than what is actually needed right? On the product manual it states Designated Gas heating air flow taps for my model is 1-7. Not sure if it will apply to AC air flow as well.
Comment: @jim, I checked my AC fan speed can go to Tap 9. To my surprise I found that some HVAC companies don't do static pressure testing.I called three reputed companies in my area and all of them said We do not measure the static pressure. However for technician to come out it will be 89$ fees. I adjusted the fan speed by my self to Tap 4 which still is higher but my unit got quieter so will see how it performs in terms of cycling. And as far as icing of the coil goes I am not sure Tap 4 is low enough to ice it up. Because Tap 4 across the air flow table is still higher than avg 1200 cfm for 3 ton.
Answer: When I was still doing residential work the normal temperature drop across the Coil was between 15F.  and 20F.  A temp difference above 20F meant that more air flow was needed and a temp below 15F meant that there was too much air.  Unless things have changed recently or you have a special A/C system you can use these temp drops as a guide line. Just buy a temperature thermometer or a probe type and measure the air temp difference across the coil.  my 2 cents
Comment: This unit is installed recently. But I was not at home so not sure if the contractor did all the calculations or set the speed correctly. But just going by std 300-450 CFM/ ton. It looks higher than what is needed. I could be wrong but any suggestions are welcome.
Comment: Air flow must be "right". Too low and the coil will freeze. Too fast and not enough moisture will be condensed and humidity will be high; if extreme it can cause ducts to drip water.
Comment: I like to take the temperatures  close to the air handler. I always used a digital pocket thermometer that costs around $10.00 which could be inserted through a canvas connector if present or through a small hole in the duct within a couple feet of the coil. Using the access points you described would be OK . Remember, this is just a "rule of thumb" or a quick way to get the temp difference. Try to get closer to the 15F than the 20F drop.
Comment: @d.george I lower the speed to Tap 4. Can I check the temp at the return and supply vent closets to unit and take the difference. And if it is in 15-20F range am I ok with the speed I set?

Adjusting Blower Speed for Central AC


Korean equivalent of this English expletive

Question: A Youtube video series has a Canadian man and his Korean wife cycling in various places in South Korea. He narrates and they usually talk in English, with Korean subtitles. At 3:30 of this video she has a minor mishap and says 'Fuck'. The subtitles say 이런..씨.. ㅂ.
What is the translation of 이런 씹 and how does it compare in scope and effect to fuck? Google says 'holy shit' and 씹 by itself as 'chew'. Kakao says 'oh shit' and 씹 by itself as ??. Papago says 'chew like this' and 씹 by itself as 'fuck'. My Korean-born/Australian citizen wife simply says it's a bad word and I don't need to know anything more. Google shows 7.7 million search results, so it's common.
Answer: 씹..., 씨..ㅂ, or 씨발(the full word) is a curse in Korean.
씹 in the context of your question is just like saying Fuh.... instead of fully saying Fuck.
This curse word has seen changes in its pronunciations over time.
The original word 씹 (not the one in your question, but the archaic Korean word) is a vulgar version of referring to female vagina.
At first, this curse word was 씹할, which literally means "doing things with the vagina" and it referred to a prostitute or those women who have sex with many partners (against their then social norm). It was also pronounced 씹팔 since 할 and 팔 after the letter 씹 sounded very similar anyways. As you may see, it's a very severe level of insult, considering the conservative nature of old Korean society. (Maybe you can think of the book, A Scarlet Letter)
Then, the word is now read 씨발. So, yeah it has a reference to having sex, but with a very insulting connotation of prostitution. However, that's only when you actually know what it means. I think many native speakers these days just say it without thinking much. The daily usage is somewhat close to Fuck because people who don't care just say it while it is definitely considered taboo in formal or official occasions.
The way that youtube videos use it in twisted version of the word means that they are just saying it for fun in a light mood, not thinking about the etymology above. It's just like some TV shows or youtube videos use "Frek" or "F..."
The translation apps talking about "chewing" is a different word. 씹다 is to chew.


In system settings - network settings

Question: Network settings screen will not stay open to turn wireless hardware device on or turn airplane mode off
ubuntu updates will not install updates, error message no internet conection, but my laptop has internet by high speed ethernet cable direct to router/modem at 1000Mb/s
Answer: can you provide some helpful errors so that people can assist you better?
your going to need to start by opening a terminal.
in your term provide the outputs of the following commands:
first with the ethernet cable plugged in:
ifconfig
ping -c 1 220.127.116.11
now unplug the cable, and replug the cable and:
cat /var/log/syslog
to start..  :)
you can save those outputs to a file if you add a > and a location/filename following the carret...
(a double caret >> appends, and single caret > replaces contents)
for instance:
(let's say you want to make that output more readable to your helpers... lets add some echos in between.  echo simply create a new line if nothing is passed.  or it will echo(print, say, etcetc) things to the shell
the reason for outputting all this to a file is so you can move it to a usb drive, and then use your internet connected computer to paste it's contents to this topic..  :)

simply do the following in your terminal:
ifconfig > ~/Desktop/troubleshooting.out.txt
echo ; echo ; echo '-----------------------------' >> ~/Desktop/troubleshooting.out.txt ; echo ; echo
ping -c 1 >> ~/Desktop/troubleshooting.out.txt
echo ; echo ; echo '-----------------------------' >> ~/Desktop/troubleshooting.out.txt ; echo ; echo
now unplug the cable, replug the cable, and continue:
sleep 12; cat /var/log/syslog >> ~/Desktop/troubleshooting.out.txt
copy the file
you will now have a file with proper outputs and hopefully signs that point us to your problem that the community can use to help you troubleshoot your issue... now all you need to do is:

copy the file to your flash drive
copy the file from the flash drive to your internet connected pc
copy paste the contents to a comment...
post, and profit :)
Comment: try pasting it to http://paste.ubuntu.com/ and share the link
Comment: the file is too big for a comment
Comment: thank-you for the input, both wireless and ethernet connections are working.  I will troubleshoot system-network settings issue sometime in the near future
Comment: you could also try to reinstall the package (network-manager-gnome)

In system settings - network settings


Game architecture and design strategy for a multiplayer card game

Question: I am relatively new to game development so I decided I wanted to create a hobby project from scratch for both experience and entertainment.  The specific game is similar to poker known as Three Card Brag. The game is played in the movie Lock, Stock and Two Smoking Barrels.
I have been reading up on some of the topics on SO regarding game development, though mostly this question.  This has helped revamp the original way I was creating the objects.
One particular problem I am having is defining game state. My initial approach was to separate everything (e.g. keeping chip stacks inside a Player class) but after reading the responses to the question I mentioned previously, it seems as though all possible states of the game should be maintained within a GameState object.  What I came up with is essentially this:
abstract class CardGameState
{
    protected List<Player> _Players;
    protected Player _CurrentPlayer;
    protected Dictionary<Player, int> _Chips;
    protected Dictionary<Player, Hand> _CurrentHand;
    protected Dictionary<Player, PlayerStatuses> _PlayerStatus; // PlayerStatuses.InHand, PlayerStatuses.Folded, PlayerStatuses.SittingOut, etc.
    /* etc. */

where each CardGameState is modified by some action:
public interface IAction
{
    string Name { get; }

    CardGameState Apply(CardGameState state);
    bool IsLegal(CardGameState state);
}

Now I'm feeling very strongly that this is defeating the purpose of object-oriented programming, because the data specifically related to the player (in this case, his chip stack, hand, and current status) is not encapsulated by the Player object.
On the other hand, if a player were to raise the bet, I would be creating a RaiseAction that implements IAction, but the IAction interface only accepts the current game state, which I don't believe would be ideal if the chip stacks were stored within the Player class.
Basically, my question is: can I have the best of both worlds such that I can have an exact representation of the game state while simultaneously keeping all data related specifically to an object within the game state inside its given object?
Comment: Hey John, I was just reviewing this question and came to realize that you could also get the best of both worlds by replacing IAction.Apply with an IState.Apply using the visitor pattern. Probably too late now, but anyways it might server as future reference.
Answer: In online-games using the command-pattern (your IAction) is the standard, and proven, way to do it. It's not Object Oriented in the sense of the player, but the actions are Object Oriented, so from a purely theoretical point of view its a solid design pattern, I guess. And in practice thats how every successful online game I've seen implements it, but note that action games normally use very small discreet actions/packets, until it practically becomes a stream of sorts.
Edit:
A long time after I answering this, I came back here and realized another solution to this problem is to implement GameState's Players, Decks, etc... as derived from an IState class with an Apply(IAction action) member. This way objects apply actions on themselves, instead of having the application apply actions on objects, this would map actions and state to a visitor-pattern instead of a command pattern. Either solution will work, where visitor has the larger overhead and more encapsulation, while command is the easier solution with less encapsulation.
Comment: So I guess the question comes down to mutability, e.g. the player's name would reside in the Player class because it's not going to be affected by any game actions. This means that everything that could be changed by any action possible within the game would be stored directly in the game state.
Comment: Yes in a way (name could also change). But the Player State is a sub-part of Game State.
Answer: Seems like you might be Object-orientizing it for Object-orient's sake...
Seems like Bob Martin's classic bowling game problem.
EDIT: -Summary-
Its a long read, but basically, through TDD and refactoring, a bowling scoring application went from a huge cluster with lots of Classes and polymorphism to 20 or 30 elegant lines of code. Why? Because they didn't really need to be there in the first place
Comment: Good read - although I have tried writing this application without OO actions, and the only thing I could salvage were the classes that were used for hand comparison. The rest was a procedural attempt at controlling the game state, and it was easy to lose track of how each player action modified it