Induced emf problem

Question: This is not homework question,just a thought experiment about a general question i have about induction.  Let's suppose that we have a closed circuit with only two resistors in series.We also have a changing magnetic flux going through the circuit(we do not care about exact numbers here).
As we know,this produces an emf due to induction(changing magnetic flux causes induced current).
So,we make our calculations and we find that we have an emf=5V(we do not care about its sign because we have already figured out which way the induced current flows with Lenz's law).
The question is,that emf is the potential difference between which two points in the circuit?  I mean,when we have an emf in a battery for example,we know that the battery has say 6V and we know that it is the potential difference between its two ends.So,in this case,between which two points is the induced potential difference?
Answer: Electric fields produces a difference of potential on two points with different distances of the field source. Magnetic fields induces current on a closed loop if the loop is not on parallel in relation of the lines of field and the magnitude of the field does have to change (you have to have a flux).
If you have a magnetic field interfering on your circuit, you will have a constant inducted current flowing on it (which depends of its magnitude, the radius of your circuit and the tax of change of your field). So, the voltage drop will only depend of where is the point you are measuring, since it will depends of only the resistance between that two points. (Ohm's law - constant current)
If you have an electrical field interfering on your circuit, you will have a change of voltage on your circuit which will depends of the distance of the electrical field and also the distance between two points. So you have only to know the magnitude of the field at the two points you chose and the distance between them.
To consider both effects you have only to sum them.
God already stated all EM effects on four simple equations.
Also, we have an Electrical Engineering SE on which probably you will get more (and better) answers of related questions.
Answer: Take the simplest case of a uniform magnetic field and a circular wire perpendicular to the magnetic field. You know that a changing magnetic field induces an electric field. Because the magnetic field is uniform and the wire perpendicular, the electric field has the same magnitude on all points of the wire. You can find the total emf from the change in flux. But remember the definition of emf for a closed loop.
$$ emf= \oint_C \vec{E}\cdot dl$$
   This is also equal to $-\frac{d\Phi_B}{dt}$ for the same closed loop. Now say you calculate from the magnetic flux that the induced emf is 6V. This also means taking the line integral of the $\vec{E}$ field around the entire closed loop gives you 6V. Now instead of going around the whole loop, integrate around half the loop. Our $\vec{E}$ field is the same magnitude at every point, so we get half the emf, 3V. If we take two points that are only 10% of the total circumference of the loop, then between those two points there will be a .6V emf.
In other words, unlike a battery where the emf is confined to one point on the circuit, in the case of an induced emf, there is a voltage gain across any two points of the circuit where $\int_A^B\vec{E}\cdot dl$ is nonzero.
In order to then find the voltage difference between two points, you need to add the contributions from $\int_A^B\vec{E}\cdot dl$ and from the resistors. You know the induced emf is equal to the voltage drop across the resistors. So if the emf is 6V, the voltage  across both resistors is -6V. So lets say again use the simplest example where the field is the same magnitude at every point. Choose two points so that they have two resistors and 25% of the wire between them. In the part of the loop with no resistors and 75% of the wire loop, you would see a 4.5V gain. In the section with 25% of the wire and both resistors, you would see a 1.5V - 6V = -4.5V gain.
The absolute voltage at any point would be difficult to calculate without a reference point. You would at the very least need to know if the wire was originally at 0V or some other $V_0$, and then I think you would be able to calculate it. But normally in these kinds of cases you would ground a portion of the circuit.
Comment: Good answer.But i have one question.When you go around the wire,the voltage ramps up and at the resistors it falls.In this we agree.But where is the point that the voltage is zero and from there and on it starts growing(until it drops at the resistors)?
Comment: I'm not completely sure. In certain situations you can use symmetry to figure it out. For example, if both resistors are the same size, you can split the loop down the middle between the resistors and along that line there should be zero voltage. For a general configuration where the $\vec{E}$ isn't circular and the initial voltage is $V_0$, I think you would need to make sure $\oint Vdl=V_0$. If your loop does not have a reference voltage anywhere, this integral will be difficult.
Comment: And in reality, almost all circuits will have a reference voltage at some point(usually ground). The reason is wires without a reference voltage can develop a floating voltage. If something at 2V touches the circuit, the circuit will now be stuck at 2V. This can cause problems if certain circuit elements break down outside of specified voltage ranges.
Comment: Yes,i understand.Great answer although i did ask something just a bit different(about where is OV and 5V in the system).I think it is a difficult question.
Comment: @LandosAdam There's no 0V and 5V. What matters is the 5V of difference of potential. Have you heard about isolation transformer? If not, search for it. For example, suppose you have not 5V on your loop, but now 5kV. Do you expect to be electrified if you touch one point of your circuit? (Considering your feet is grounded on earth)
Comment: I know that it is not what matters.But,in order to say that you have emf of say 5V,then you must have a point of 0V and 5V.
Comment: If it is not isolated by some material with low conductivity,then yes,i would expect to be electrocuted
Comment: @LandosAdam Your lowest point might be 0V, your highest 5V. Or you might have your lowest point at -2.5V and your highest at 2.5V. Or imagine if your entire wire had the same exact resistance. Then you would need the wire to dissipate voltage as fast as the electric field added emf, and the entire wire would be at 0V. Because the emf is spread out over a larger distance and not concentrated in a battery, a 5V net emf doesn't necessarily mean the difference between the highest and lowest circuit point is 5V.
Answer: OP's question...... "So,in this case,between which two points is the induced potential difference?" ...... An emf (source of voltage) will be induced across any two points bathed in changing flux.  Add up all your sources (induced emf) and sinks (resistors) between arbitrary test points as you wish, remembering sources and sinks will reverse sign. Any point can be a reference and grounded or just your meter terminals can be floating + and - temporary reference points as you move them around the cct.  Even a resistor bathed in changing flux will be both a source and sink, the equivalent cct. will be a source in series with a sink?

Induced emf problem


"I'm home" or "I'm at home"

Question: The second form looks more correct to me, but the first expression is present in several titles of movies and songs. Which form is preferable?
Answer:
"I'm home" is what you say when you walk in through the door to tell people there that you've arrived.

"I'm at home" is what you say when someone asks you on your cell phone or IM (Instant Messenger) where you are located: "Where are you?" "I'm at home right now."
Comment: I guess "I'm home" is effectively short for "I've arrived home"...
Comment: Yes. @Mitch is right. It's not about correctness. It's about the meaning.
Answer: I think the implication in the expression "I'm home" is that you're home from somewhere. It may, as Mitch says, be that you've just come/gone in, but it doesn't need to be — you can be home from the front or home from university and have been back for a week or so. But a homecoming in the not-too-distant past is certainly connoted.
The nature of the word home in "come/go home" is often argued over; noun and adverb are suggestions, but directional particle is what I'm voting for at the moment. Apparently, home in go home can be used without a preposition because it is the remnant of an earlier form that fused preposition (to) and noun, and when this type of inflection for case disappeared from English, this particular usage continued, with the to-home form standardising with the base noun. We don't have "I'm going school". Possibly, "He is home" has arrived via "He has/is come to-home". Home in "He is home" is locative rather than directional now.
It may be another legacy from the fused to-home that we never use the preposition to with home (except with an intervening determiner etc.), but this is true for other nouns also.
Certainly, other prepositions (at, from) can be used with the noun home in the expected way, and "I'm at home" is strictly locative. To express arrivals at other venues, we are forced to use a different expression — "I've just got to school / I've arrived at school", as psmears says.
Answer: "I'm home" means "I have arrived at home" (after being away for while, for instance after a trip, or after working in an office the whole day).
In the phrase "I'm home", the word "home" is used as an adverb, not a noun. Compare the expression "to go home".
Example: in the movie Star Wars: The Force Awakens, when Han Solo and Chewbacca set foot on the Millennium Falcon for the first time in many years, Han Solo says "Chewie, we're home". (YouTube link)
Another example: in a TV sitcom set in the 1950s, a husband might return from work and loudly announce to his wife "Hi honey, I'm home". This would only make sense if, for instance, she is in the kitchen and might not hear him entering the house, so he has to announce his arrival. It would not make sense if she is already at the door to greet him.
Note however: sometimes the expression "X is home" is used as an abbreviated version of "X is at home". For instance, "We rang the doorbell, but nobody's home" = "Nobody is at home", no one answered the door.
Answer: @Mitch I don't think you're completely correct. Some people say something like "I'm home, I'll talk to you later" over the phone so in that situation you may be announcing your arrival or coming home to someone who is not present in your house. "I'm at home right now" is really only a response used when initiated by a question as to where you are; when you say "I'm home" it refers to your unexpected arrival and is typically only used either to end or begin a conversation depending on the way in which you use it.
Comment: This seems to be exactly what Mitch stated. I don't really understand the difference you're pointing out.

"I'm home" or "I'm at home"


Soldering USB contacts - what kind of solder tip and what temp?

Question: I am going to try and make my own mechanical USB cable. For soldering the wires to the usb plug, what is the recommended Solder tip type/size and also what is a good temp to use?
Comment: Datasheet for the part?
Comment: Added a pic of the do it yourself USB-C plug
Answer: I would use a fine tip, very thin.
Also some very thin solder.   The tip & the solder should be about the size of those pads or less.  I would also set my soldering gun to about 700°F ( ≈ 370°C) (Lead solder, not RoHS)
First touch the tip to the pad, then touch the solder.  This will leave a little blob of solder on the pad.
Next using multi-strand wire of AWG26 or 28, I would remove about 3mm of insulation, and tin the wire with more solder.  Not a big blob here, just wet it.
Last, place the wire on the pad, then place the soldering tip on the wire.  Push down very lightly.  After a second or two, the solder blob will melt, the wire will move down.  Remove the soldering tip.  Hold the wire steady for about 3 second, and you're done  :)
I would then look at it REALLY CLOSE with a magnifying lens or some such, to see the quality of my work.
Last - After I'd tested it, I would cover the entire area with hot melt glue, so I don't break the wires later or accidentally rip off the pads.
Comment: What strength magnifying lens should I get?
Comment: Also, would that be a T18-D08 - 0.8 x 14.5mm? I am looking at Hakko T18 Series Chisel Pack with T18-D08/D12/D24/D32/S3 Tips Model (Japan Import)
Comment: I have a benchtop microscope.   But a jewelers loop is a great option - I have a clip on that's especially convenient with my glasses.   Such as:   https://i.ebayimg.com/images/g/ffoAAOSwBY5d3FEa/s-l1600.jpg     Or    https://i.ebayimg.com/images/g/R6wAAOSwqIleE-bZ/s-l500.jpg       For tips, 0.8mm is pretty small, should work.  If fine solder is hard for you to source, I could send you some.  I have a 1 pound spool.  That'll last me the rest of my life!  LOL  I can spare a few feet of it   ;)  Send me email with your address if you're interested.


when should high z mode of oscilloscope be used to measure signals?

Question: My textbook says that high z mode allows the Vout to closely match Vin in value.(Is this impedance matching?) If this is the case, in what sort of scenarios should I be using a High Z mode vs. a 50ohm mode on an oscilloscope?
Comment: High z most of the time, I guess. Sometimes you are connecting the scope to a piece of equipment that wants the load to be 50 Ohms. A signal generator or a current probe amplifier or something like that. There may also be rare occasions when the source impedance is much less than 50 Ohms (current shunt). Then you can use a 50 Ohm cable and set the input impedance to 50 Ohms to get a little less noisy signal.
Answer: When working with a lot of non-RF situations, and dealing with voltage signals, you want to use the high-Z mode. Many lower frequency, more general purpose scopes (generally sub-1 GHz bandwidth) only have a high-Z mode, or if they do have a 50 ohm mode, it is not the default.
Once you start dealing with RF systems and higher frequencies, people tend to talk about power signals and not voltages or currents. Everything is impedance matched and we have to take care that our measurement does not impact this. Reflections due to mismatch could not only give errors on the readings, but cause amplifiers to start oscillating or mixers to perform incorrectly. At these frequencies we tend to either use a 50 ohm (or whatever your systems impedance is, 75 ohms is still commonly used in television broadcast and related applications) or use an active probe which connects to our scope with a 50 ohm line.
A key reason why is not only the fact that we are dealing with matched impedance systems, but also noise. Oscilloscopes are generally used from DC to their bandwidth. As we increase the bandwidth, so does our thermal noise. As a result, the voltage noise becomes very large. To put this into perspective: with 1 MOhm impedance and 1 GHz bandwidth, we have 4 mV RMS noise. This means that if we probe a 50 Ohm system with our 1 MOhm probe, the noise floor of our measurement is about -35 dBm. For a 10 MOhm probe (common in a times 10 probe) that would go to a noise floorof just -25 dBm. These are very bad noise floors, making the scope almost useless for any measurement! For comparison: a 50 ohm probe wit the same 1 GHz bandwidth would have a noise floor of just 28 micro volts or -83 dBm. Keep in mind that the oscilloscope itself will add noise on top of this, but will likely still perform far better than it possibly could wit a 1 MOhm impedance.
Answer: In my experience, the Hi-Z mode (and a 10X probe for even higher impedance) is the normal mode - and on many 'scopes, the only mode.
The 50 Ohm mode would only be used for RF or other situations where you are measuring signals in a 50 Ohm trasmission line.
Answer: Good question! The High Z input of a scope is typically used for measurements up to 700 MHz or so, then people switch over to 50 ohm mode. The 50 ohm path is typically much lower noise.
Use the high Z path to avoid loading down your circuit - and the 50 ohm path to match impedance and avoid reflections and other mismatch effects.


Multivariate and high-dimensional data, are they the same?

Question: I read about the multivariate and high-dimensional data set. I found that the multivariate data is the data with more than 3 variables. In addition, the high-dimensional data is the data with a large number of variables. So, for me, the multivariate and high-dimensional data set are the same, is that correct? I think, do not know if it is correct or not, the multivariate data is a data with more than 3 variables but the number of observation is quite small (300 to 500 observations). However, high-dimensional data is the data with a large number of variables (10 to 100 or even larger) and a large number of observations (1000 observations). Is that correct?
Comment: `multivariate data is the data with more than 3 variables` No. Please read the tag [multivariate-analysis] info. As well as [high-dimensional] tag.
Comment: @ttnphns thank you for your comment and I am really sorry if I use a wrong tag. I actually have to work with multivariate and high-dimensional analysis.
Answer: What is considered 'high' in high-dimensional is a futile discussion in my opinion. However, univariate, bivariate and multivariate usually refer to the number of outcome variables.
High-dimensional data analysis is a term more often used for dealing with things specific to a large number of explanatory variables, or parameters. For example:

Inability to perform matrix inversion and most forms of decomposition when $n < p$;
Increasingly sparser coverage of the sampling space with growing dimensions;
The combinatorial explosion

A multivariate approach, can but need not involve these issues. You can have multiple outcome variables with only a handful of explanatory variables. You can also have a high-dimensional multivariate problem.

Tangentially related, for a classification task consisting of two classes, the outcome can be argued to follow a binomial distribution, whereas a multi-class classification task can be argued to follow a multinomial distribution.


How to remove fade effect when "Hiding all normal windows" with CTRL+ALT+D shortcut (show desktop)?

Question: I'm using Unity on 12.10, with most of the Compiz Effects disabled.
I'd like to remove the fade effect when using the CTRL + ALT + D default shortcut to show the desktop.
The effect consists in fading out the active windows and fading 'em in when they get focus again.
I couldn't find anything in CCSM or dconf to set the value of the fade effect to zero.
Answer: Similar functionality of hiding all windows and showing the desktop is right now provided by several plugins: Show Desktop, Fade to Desktop and Ubuntu Unity Plugin, that seem to conflict with each other. Among those you'd of course choose Unity Plugin if you are using Unity, but it has no configurable option to control the fadeout.
More about the current status of the problem an proposed fixes here - https://bugs.launchpad.net/compiz/+bug/1063171 and here - https://bugs.launchpad.net/unity/+bug/1067534.
The simplest workaround I have found so far that allows to achieve the requested effect is to go to Ubuntu Unity Plugin -> Switcher and disable Show minimized windows in switcher in CompizConfig Settings Manager. Obviously not a very elegant solution, but those like starting showdesktop after unityshell with gconf, proposed in bug 1067534 have been explicitly forbidden in bug 1063171 and will remain such until Unity 7 or compiz 0.9.9.0.
Comment: thanks for tip. Many milliseconds in my life has been recovered.
Comment: Glad it helped someone, but personally I had to switch that box back on since switching windows became very unusual (well, I told you this is not a very nice solution, but I don't know if there is another one as of the time of writing).
Comment: there was no problem for me. everything is good.
Answer: The slow fading was bothering me for a long time until about 5 min ago, when I changed the settings in CCSM Fading windows plugin from "constant speed" to "constant time", and minimized the corresponding value (to 1, I think).
Now, "show desktop" (ctrl alt d) is way faster and near instant.
Note that I was reluctant to just disable the fading-windows plugin, because I think the dim unresponsive windows setting serves a good purpose as quite a useful visual indicator of system (un)responsiveness.
Answer: I am unsure how to disable that specific effect but if you want to disable all compiz effects (by going into ow graphics mode) you should do the following:
gedit ~/.xprofile
Then enter the text export UNITY_LOW_GFX_MODE=1
Logout then log back in
To check if this worked enter in the command glxgears -info
The output should look something like
GL_RENDERER = Gallium 0.4 on llvmpipe (LLVM 3.1, 128 bits)
GL_VERSION = 2.1 Mesa 9.1-devel
GL_VENDOR = VMware, Inc.
I hope this helps. Not quite the answer you are looking for but this should do it


What differences exist between relates and relationship class in a geodatabase?

Question: I am doing a project for my class and I was just wondering what differences exist between relates and relationship class in a geodatabase? And why and when would you use a relationship class over a relate or join?
Comment: I think this question is too broad because it seeks to assemble a list of differences.
Answer: A quote from ArcGIS documentation summarizes it:

Relationship classes help ensure referential integrity. For example,
  the deletion or modification of one feature could delete or alter a
  related feature. Furthermore, a relationship class is stored in the
  geodatabase, which makes it accessible to anyone who uses the
  geodatabase.
On-the-fly relationships, also called relates, are defined as a
  property of an ArcMap layer. Use them for improved editing
  performance.
Joins are best suited for labeling and symbology. You define joins
  through the relational database to make standard SQL queries cross the
  database as well as a variety of data sources.

Some examples are presented at the Esri GeoNet Community.


One-hot encoding for SOM

Question: I have a question regarding how I should convert categorical data to numerical data. I'm using this kdd99cup intrusion detection dataset, which has a 41 attributes and class label is the type of attacks. I need to feed this dataset to self-organizing map because I want to gauge how difficult it is for an unsupervised algorithm to group data of the same class together.
The problem is some of the columns have categorical data but if I use one-hot encoding, the number of dimensions increases to around 120 and I heard that SOM does not work well if the dimension is too large.  How should I deal with these categorical attributes?
Answer: There are many possible solutions if you have many features in the data:

feature selection -- just drop some of the categories that are of less importance, for example, in a natural language processing scenario, this may be some very rare words, that are unlikely to be useful, though in most cases this would be the worst possible solution (e.g. the rare words can have great predictive power),
dimensionality reduction -- use a dimensionality reduction algorithm (for example, PCA, or have neural network produce categorical embeddings) on the data,
regularization -- I have no experience with using self-organizing maps, but most of the machine learning algorithms have some ways of regularizing them (see regularization), e.g. by using $L_1$ or $L_2$ penalties, dropout, etc,
hashing trick -- you can reduce the number of dimensions by randomly binning together some of the categories, it sounds crazy, but it is known to work quite well in some cases.
Answer: You could perform the onehot encoding and then do feature selection or extraction on these one-hot encoded features. I.e., you could use Multiple Correspondence Analysis (MCA) for those.

One-hot encoding for SOM


Putting Triggered email in Journey Builder

Question: I am using a triggered email to send email to a person who registers to my page. The triggered email works fine. However, I would like to send a next email to persons who open the previous triggered email. I don't know how to do that. I usually do that in a Journey, but not with triggered email. I can't find any feature in Journey Builder that relates to triggered email. If there is anyway to achieve my gold, please give me a suggestion.
Comment: What is the reason for not sending the first mail with journey builder in the first place?
Comment: Umm. I think you are right. I should implement a new API to inject contacts to Journey Builder and then send email to them instead of triggered email.

I am implementing it by following this link [link](https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/postEvent.htm). Does SFMC FuelSDK support injecting contacts to Journey Builder?
Answer: You can also use the API entry event, and keep all emails in Journey Builder
https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/how-to-fire-an-event.htm
Answer: My suggestion will be to use the Automation Studio Audience entry event. The automation will contain a Query activity, looking into Open data view:
https://help.marketingcloud.com/en/documentation/automation_studio/using_automation_studio_activities/using_the_query_activity/data_views/data_view_open/
You can then select the open events for that specific email, and use the Subscriber Key to inject the recipient into the journey.


Under what conditions does loot despawn?

Question: I have found that when my bags get full and I need to vendor loot I can sometimes leave loot on the ground and return to it.  Other times it seems to disappear almost instantly once I leave the area.  Is the loot despawn time based, based on my distance from the dropped loot, or some other factor(s)?
Comment: A friend reminded me of a few times we left single guns in a zone for hours and hours and they never de-spawned. However when the machines reset AND there were dozens of guns/items we had sold to the vendor AND a dozen or more that we had dropped, THEN when the timer on the vendor reset they all (what we dropped and what we had sold to the vendor) disappeared. it may just be a matter of a limit on the number of items that can be sitting in a given proximity. To reduce strain on the memory of the system they make stuff start de-spawning every 20 minutes if more than a certain amount is present.
Comment: I think it despawns at the same time as enemies respawn? Just a guess. However, I'm not sure how often that happens. In BL1, it was every 2 fast travels; but BL2 doesn't seem to follow that mechanic that closely.
Comment: I lost quite a few guns in sanctuary near the slot machines.  My bank was full and so was my backpack. Being greedy and stupid, rather than narrow my items to the best i just dropped all i was carrying and played the slots until i was full, ran to the vendor and sold all the trash and rinse repeat. when the vendor reset after roughly 20 minutes as they always do i noticed all my purple and several of my blue items i had dropped were suddenly gone. I do not know if the vendor reset timer was related but it seemed that the times lined up very well.
Comment: @BrandonBouquillon I'm sure the despawn mechanic has something to do with saving system resources.  Your theory on vendor reset sounds plausible, but so do a lot of other suggestions on this question.  If you'd care to do some testing with the slot machine I'd be happy to award the bounty if you had some empirical data.
Comment: won't have the time this week, but thank you for the offer.
Answer: To my knowledge only white loot despawns (this includes things like ammunition) and while I don't know how long it takes specifically it is possible to tell by looking at it. The item steadily shrinks in size until it basically disappears. So yes, it does seem to be based on time.
I'm fairly sure items rarer than white (green, blue, purple, E-tech, orange, obviously) don't despawn. I've left them lying in open chests before and come back ten, 15 minutes later and still seen them lying there. I'm not certain about them being on the ground though, if you take them from the chest then drop them again they may have exactly the same "shrinking away into nothingness" time as white items.
Comment: Unfortunately, I have found out that the chest from a loot goliath can despawn fast.  (Minor spoilers on a quest ahead) While doing the protection part of the "Tea Party" quest for Tiny Tina, a loot goliath spawned during wave 2.  Before I had a chance to get to the chest the enemies were on me again so I had to leave it.  A few minutes later I finished all the enemies, but the chest was gone :(
Comment: Yesterday i dropped on the ground some items for a couple of friends. While they were checking on those items, a green one completely vanished :(
Comment: I'm almost 100% sure that loot from chests despawns 'different' than dropped loot. I once opened a chest with some green guns and i also got a green drop from a Badass near the chest. With no backpack space, I ran back to a vending machine and when returned the guns from the chest were still there but the dropped one wasn't.


How do I edit the contribution confirmation page

Question: How do I edit the contribution confirmation page? I need to change the text so that the instructions are consistent with the buttons
Comment: This is being updated in core (https://lab.civicrm.org/dev/core/issues/1407) so should be available in a future release.
Comment: So it can't be changed?
Comment: @Kirsten the solution Mick suggests below is available now.  What's going to change is that the default text of the "Confirm" button will change to "Confirm Your Contribution" to make it easier to target the button text itself as part of word replacement.  However, you're correct that the language should be consistent out of the box, which is what issue #1407 addresses.
Answer: I think you could probably manage it with Adminster >> Customise Data and Screens >> Word Replacements if you chose a sufficiently long phrase to ensure it doesn't affect anything elsewhere.


Scikit learn + Random forest - features of single trees

Question: I have a very specific question regarding random forests and its implementation in scikit.
I constructed a forest, and prediction works just fine so far. However, I need to know which particular features end up in the leaves of single trees after fitting the forest.
I already understood the hierarchical structure, where the random forest builds single Decision trees, which I can access by the "estimators_" attribute, and further down the road each Decision tress has a "tree_" attribute. In this tree I find information about the specific nodes, leafs and splits, but I am unable to find out which specific features end up in a leaf, or even which features are assigned to that specific tree ?
Just to clarify I do not intend to manually analyze tree nodes, but I want to have a similarity measure, based on how frequently a certain set of features is ending up in leafs of the tree together.
Thank you very much !
P.s. just in case anyone is interested, I got the idea for this similarity measure from this paper:
http://www.sciencedirect.com/science/article/pii/S1053811912009834
edit: Ok, I have got further. Apparently there is a method for the Ensemble that "Finds the terminal region (=leaf node) for each sample in X." This can be found here (line 2465)
https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/tree/_tree.pyx
I already fiddled around, but can't fully understand the code. I can make rf.apply(np.array([i,j])), where i,j is the number of the sample in the 2D matrix used to fit the model, and it returns me the leaves in which it is situated. Great ! But the only strange thing is i can use numbers way greater then my actual sample ? Does it assume the last sample if the index is way to big, or am I doing something wrong ?
For test purposes I made a 10x5 matrix, but i can index rf.apply(np.array([500,2333])) without error ?
Sorry but I'm not entirely sure on how to feed data to this function.
Answer: You can pull out the decision nodes in Python, as explained in explained in how extraction decision rules of random forest in python. Can then traveral the trees to check which features led to each leaf.


How to get price items of bundle product in order API-REST Magento 2.3?

Question: How to get the price of items of bundle product in order?
Comment: There is an Admin REST API endpoint for getting all children of a bundle product using the parents sku.
Check the documentation: https://devdocs.magento.com/redoc/2.3/admin-rest-api.html#tag/bundle-productsproductSkuchildren
Comment: @HelgeB Tks.
But I need the price of the bundle item for the order, because if I change the price, I will not have the correct value.
Answer: You can use below code.
<code>$orderItems = $order->getAllItems();</code>
foreach ( $orderItems as $item ) {
    $customOptions = $item->getProductOptions();
    $itemOptions = $customOptions['bundle_options']
    echo '';print_r($itemOptions); // In this array, you can get the price of the selected option of the bundle product.
}


Evaluate $\sum\limits_{k = 0}^n \binom{n}{n-k} \binom{m}{k}$. Give combinatorical arguments.

Question: Evaluate $\sum\limits_{k=0}^n \binom{n}{n-k} \binom{m}{k}$, $n \leq m$. So far, I have $\sum\limits_{k=0}^n \binom{n}{n-k} \binom{m}{k}=\sum\limits_{k=0}^n \binom{n}{k} \binom{m}{k}$ since $\binom{n}{n-k} = \binom{n}{k}$. I believe I need to use Vandermonde's Identity somewhere, but I'm not sure what to do from where I'm at.
Comment: "*I believe I need to use Vandermonde's Identity somewhere*"  This *is* the left hand side of Vandermonde's identity (*or right hand side, depending on the order in which you write it*).
Answer: Vandermonde's Identity:
$$\sum\limits_{k=0}^r \binom{m}{k}\binom{n}{r-k} = \binom{m+n}{r}$$
Your expression you wish to evaluate is exactly this where we replace $r$ by $n$.

An example of a combinatorial argument: Suppose you have $n$ men and $m$ women.  We wish to make a team of $n$ people.  We could count how many ways we could do this by just choosing $n$ people directly from the $n+m$ total people.  Alternatively we could count this by breaking into cases based on the number of men selected in the group which yields the expression given.
Comment: I didn't think of it that way. Thanks for clearing that up for me.
Comment: Would you call this a combinatorical argument?
Comment: @GNUSupporter8964民主女神地下教會 no, I wouldn't but given that the OP has heard of vandermonde's identity before, I would assume that they are aware of the combinatorial proofs for vandermonde's identity in the first place.  If they are not aware of such proofs, there is one included in the wikipedia link.
Comment: OK.  This addresses the first prompt in the question body.  I believe that the link can help others.


Is there a way to run the Apple Hardware Test without an optical drive?

Question: I have a MacBook Pro 13", Mid-2009 and it came with Mac OS X 10.6 Snow Leopard. As I understand it, that means I would have to use the DVDs provided by Apple
to boot into Apple Hardware Test. The problem is I don't have my optical drive anymore since I swapped it out for an extra HDD. How can I run the Apple Hardware Test?
Comment: Did you upgrade to Lion/Mountain Lion ? If yes do you have the recovery partition (press Alt/option at boot chime)
Comment: I just checked and I do have it.
Answer: This answer Diagnosis or Hardware Test on a mid 2009 Macbook Pro with MacOS 10.9.2 discusses a GitHub page https://github.com/upekkha/AppleHardwareTest which has assembled various versions of the AppleHardwareTest which you can download and install in a specific place on your harddisk. This allows you to run the test without a working CRROM.
It worked for me on a Mid 2009 Macpook Pro.
Answer: If you have the recovery partition there is a way to do from the partition : Using Apple Hardware Test (Apple.com)
Just press D at the boot chime.
Comment: Right, I should have said so I already tried and nothings happens. I release D and it boots up like normal
Answer: If the model of MacBook Pro that you're using does not support the Internet version of AHT and/or does not have an AHT partition on the drive, another Mac that does have an optical drive can be used to copy the Applications Install Disc onto other media (including SD cards, USB flash drives, and external hard drives).
Using Disk Utility's "Restore" feature, you can restore the Applications Install Disc that came with your Mac onto an SD card, USB flash drive, or external hard drive. After restoring the DVD image to another disk, you can startup from the AHT partition by holding the "D" key at boot (while that disk is connected).

Note: this will require you to erase the external drive that you're restoring the Applications Install Disc (AHT) to.
Comment: Or of course you can plug in an external DVD drive if you don't have another Mac sitting around.
Comment: So basically, I'd have to have the DVD image on a USB?
Comment: Yes, you could image the DVD to an external USB flash drive or hard disk. If you wanted to put the partition onto your internal drive, you may not be able to get AHT to boot. This assumption is based on the fact that the DVD uses the Apple Partition Map, while your startup disk is GPT formatted.


Interpretations of $\sin(x)$

Question: As sin(x) has an infinite number of maximum and minimums, I wondered if $\sin(x)$ could be interpreted in such a way as:
$$ax^\infty+bx^{\infty-1}\cdots zx $$Or something. Am I talking nonsense here or is there actually an interpretation of sine that involves polynomials?
Comment: Things like "$\infty - 1$" don't make sense, but Euler's solution of the Basel problem (finding the value of $\sum_{n = 1}^\infty \tfrac{1}{n^2}$) involves looking at $\sin x$ as an infinite product $x \prod_{n \in \Bbb Z \setminus \{0\}} (1 - \tfrac{x}{n\pi})$ (analogous to a polynomial being a product $\prod (x - \lambda)$, where $\lambda$ ranges over the roots). As the answers that have appeared below suggest, you want to read about Taylor polynomials to make this rigorous.
Answer: You're close, though what you wrote is kind of nonsense because there's no such thing as having $x^{\infty}$.
The Taylor expansion of sine is
$\sin(x)=\displaystyle\sum_{n=0}^{\infty} \frac{(-1)^n x^{2n+1}}{(2n+1)!}$, so sine is actually given by an infinite polynomial which is equal to it everywhere. You can prove this using calculus.
Answer: Really good question!
You would be right on that there exists such an interpretation for sine. It is called sin's Maclaurin representation and looks like this:
$$\sin x=x- \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \frac{x^9}{9!}+\dots$$
Comment: This is also known as a Mauclarin or Taylor Series. There exists a distinction between the two but it would require a knowledge of calculus to understand.
Comment: *There exists a distinction between the two* [Maclaurin or Taylor Series] *but it would require a knowledge of calculus to understand.* It seems to me that the difference between the two can be understood using the precalculus idea of a horizontal shift.
Answer: There are many ways of unterstanding $\sin(x)$ for example the one as a taylor series
$$\sin(x)=\sum_{k=0}^\infty (-1)^k \frac{x^{2k+1}}{(2k+1)!}$$
or as
$$\sin(x)= \frac{e^{ix} - e^{-ix}}{2i}$$
Those gives you the geometric interpretation as you are going in the complex plane and seeing the so called euler formula:
$$e^{ix} = \cos(x) + i \sin(x)$$
Well both of them really don't point that stuff out with the infinit many maximums, there are other definition like
$$\sin(x)=x \prod_{k=1}^\infty \left( 1- \frac{x^2}{k^2 \pi^2}\right)$$
which gives you an idea that the $\sin(x)$ function really infinitly many zeroes and this one can be interpreted really nice as a polynomial (written as a product of it's zeroes).
Another way to define the $\sin(x)$ function is over a ordinary differential equation: We call $\sin(x)$ the solution of
$$\begin{cases}
y''=-y\\
y'(0)=1\\
y(0)=0
\end{cases}$$
Here one can "see" that this functions has infinitly many zeroes, when we start at $0$ we know the function is increasing (as $f'>0$) so the function will increase, but the second derivative is lower than $0$ when $x$ is a bit bigger than $0$ so the function is increasing slower till the maximum, than it is decreasing, it will become smaller $0$ and then the idea goes on like that.

Interpretations of $\sin(x)$


Unexpected azure-function timeouts on app-service-plan

Question: Azure functions recently got 5 minute timeout behavior on consumption/dynamic plans.
I'm using an queue triggered function on a standard tier app service plan with AlwaysOn enabled, but I'm still seeing the timeout (after ~10mins), followed by infinite retries, despite my host.json specifying a maxDequeueCount of 1. I've tried setting functionTimeout in host.json (to 1h) but it has no impact.
Am I missing something? Is this functionality documented anywhere, and is it configurable?
I can only find multiple references to execution time being unlimited for premium & standard tier app service plans, but this doesn't match what I'm seeing.
(Runtime version: latest (~1))
Comment: Are you talking about Storage or Service Bus queues? I had this problem with a Function App listening with up to 15 Functions on corresponding Service Bus queues in parallel with a maxConcurrentCalls 16. When changing this setting to 2 or 1 the Function App was getting back to normal behavior without timeouts.
Answer: encountered with the same issue. removed "function-timeout" property from the host file. this worked for me for functions with queue trigger in app service plan with Always-On enabled and my function was able to run for more than 30 minutes.


Do you get differentiated data from Google Optimize A/B test with multiple user targeting variables?

Question: If you target test variations for your users with Google Optimize will you get differentiated values for those variations such as mobile, tablet, location and so on in one single A/B test, or we just receive a bulk data test result?
Answer: When you AB test is complete you can can than view the segmentation of this data on Google Analytics. From there you can add additional filters such as device, region etc.
The overview Optimize is great so perhaps as this these details in how your going to score the test but don't be concerned if you forget, you can always dig deeper after the test.
Comment: Hiya. That really helped. Thank you so much. Regards, Estela


characters in login screen replaced by question marks

Question: My log-in screen appears with question marks instead of the usual text. (See screen shot - I have removed my log-in name from the picture).  I am using MacOS Sierra 10.12.3 on a MacBook Pro (early 2011).
Comment: What language text encoding are you using?
Comment: English (Australia)
Comment: Booting in Safe Mode gives the correct characters
Comment: The issue is in your text encoding, let me post an answer soon
Comment: This happens to me after my mac get somewhat slow and unresponsive
Comment: None of these answers worked for me. Anyone have any other ideas?
Answer: The issue is due to missing fonts. (Where the system picks a poor choice to substitute for the "missing characters"). If you use font management software, be sure to reinstall or re-enable the system fonts.

1. Run validations with Font Book
Launch Font Book and press command-A to select all fonts. Then from
  the "File" menu select "Validate Fonts" and wait for the results in
  the font validation window. Keep in mind that even though you may find
  minor problems with your current fonts, its best to follow the saying
  "if it's not broken then don't fix it", and leave well-enough alone
  unless you're experiencing problems.
2. Clear the font cache
In OS X, fonts are handled by the Apple Type Server process, which
  stores commonly used fonts in a cache for quick access. If there is
  corruption in this cache then you may experience a variety of
  troubles. To clear the cache, in pre-Leopard versions of OS X go to
  the /Macintosh HD/Library/Caches/ folder and remove the
  "com.apple.ATS" file. After doing this, restart the system.
For OS X 10.5 and later, you cannot easily access the user and global
  font caches, but you can use Apple's "atsutil" terminal command to
  manage the ATS process. Open "Terminal" and enter the following
  commands to clear the user (or global) databases and restart the
  server:
atsutil databases -removeUser atsutil server -shutdown atsutil server
  -ping
NOTE: Use "sudo atsutil databases -remove" instead of the first
  command to remove the database for all users.
3. Avoid older font formats
If you can, avoid ".dfont" and "Type 1 PostScript" fonts. This
  suggestion may depend on the requirements for various programs, but if
  you have an older font suite that you are thinking about installing,
  it may run into problems with newer programs so you might consider
  getting an updated version of the suite before installing. Granted you
  can always try, but there is the potential that older font formats can
  cause problems so we recommend you stick to the more modern ".ttf" and
  ".ttc" fonts.
4. Manually clear out duplicates
Font Book has an option to "Resolve Duplicates" (available in the
  "Edit" menu), but this is limited in functionality and may not remove
  the specific font duplicate which you desire to remove. As such, the
  best approach to managing duplicate fonts is to do it manually
  (tedious, but effective if done correctly). In Font Book, you can use
  the "Show Font info" option (command-I) to see information about a
  selected font, and especially where the font is located on your
  system. Doing this for your duplicate fonts will allow you to select
  which one to remove, either by removing it from its font folder, or by
  right-clicking it and selecting "Disable".

From: https://www.cnet.com/news/font-problems-and-management-in-os-x/
Comment: I would delete the part about text encoding, which has nothing to do with this problem.  It's a font issue.
Answer: Try going to Applications/Font Book/ and do File > Restore Standard Fonts and restart.


Is nikah valid when one is called by his step father's name?

Question: My Mom and Dad has been in Nikah for more than 20 years, and my mother has been called with her step father's name since. I recently got to know from a drama serial that Nikah is not valid if spouse(s) is/are called with their step father's name, but I want to confirm if this ruling is true. Prescribe in the light of Koran and hadith. As soon as I come to know, I can persuade my parents to perform Nikah again or not.
Comment: Almost all drama series are corrupt and unreliable, so I advise you not to learn ANYTHING from drama series, especially if it's something related to our religion, cuz media nowadays aim to make us astray. And i've never heard a hadeeth about the matter you asked nor read an aya in the Quraan about it.
Comment: I don't believe in drama serials but the matter is: the drama serial has islamic features. It is a Pakistani drama serial based on a true story of muslim characters. God knows the serial is true or not but I had to confirm, I said, not to believe. BTW, I think you have not been through the whole Koran nor hadith and so can't immediately say that the drama serial is corrupt.
Comment: Yes, i haven't been through all hadeeths, and i didn't say i did, i just said i didn't hear about a hadeeth which mentions what i said, but i've been through the whole Quraan, and such situation wasn't mentioned.
Comment: @AbdelRahmanShamel, I appreciate your advice "You not to learn... to religion" but I think none would instantly learn a religious concept from plays, at least not a normal person. And as far as the second part of your comment is concerned: I tell you that I have also been through the whole Koran but never read something like this but the purpose to post this question on this site was to get answers from experts. When you say "I have not found something related to this topic yet" it sounds silly, doesn't it? You can post when you are sure but when u r not u can help  through other means. :)
Comment: There is a philosophy that says, everything related to dunia matters are halal, except for what was prohibited. But everything related to religion practice is haram, unless what was permitted and ordered to do with. So the reason that I said i never heard any hadiths or Quraan talking about this specific matter, was to say that as long as there were no views about this, then there is no harm doing it.
Answer: I found a fatwa in Arabic, where a man found out that he was adopted and he inherited from his adoptive father and the family of his wife wanted to declare his marriage as invalid as they felt cheated because his family name was false. This is briefly the basis of the fatwa question.
The answer about the marriage was: the nikah is valid but he must change or better correct his name and the family documents because of these ahadith (for example) from sahih Muslim and sahih al-Bukhari and the Verses (33:37-40) and (33:5) see also the explanation of these Verses in sunan at-Tirmidhi or in sunan an-Nasa-i.
So the marriage of your mother is valid, but she has to change her family name and documents for her peace of mind!
And Allah knows best!


Suggestions on how to organize a chair rotation

Question: I am suggesting a chair rotation for a department in sciences. I was wondering about pitfalls and advantages, things to watch out for, best practices and general advice. If you have organized such an an arrangement or have been part of one I would like to hear your recommendations.
Answer: I've been involved in a few. It's a good idea because it gives everyone a chance to participate in a leadership role. The biggest thing you can do is get organized -- ideally through documentation but maybe with something as simple as having outgoing chairs train incomings. It doesn't matter much how you rotate although at the beginning you'll probably want to start with more experienced faculty. To that same point, there might be some faculty who are not be capable of taking on the role, for whatever reason. It does no one any good to utilize these people just because it's "their turn." Good luck!
Answer: There are arrangements with a strict rotation and arrangements in which the next chair is nominated by a vote of the faculty.  In either case, a higher level dean will probably have to approve the appointment.  There are typically some faculty who simply shouldn't be chair for various reasons- don't lock yourself into a strict rotation.
Answer: As others have "answered" and "commented", the idea of rotation certainly has the plus of keeping people involved, and reducing the feeling of "status/hierarchy", which can become invidious.
To my mind, one key diagnostic issue is about whether your dept head is a "strong" or "weak" head. That is, if they can (if they want...) make unilateral decisions, or even simply control the agenda of faculty meetings, you'd want a sensible, balanced person in the role, obviously. On the other hand, if the chair/head mostly just signs papers and presides over faculty meetings, then, sure, anyone can do the job.
Also, I do think that there is a pitfall for mathematicians and other academics, namely, thinking that "administration" is a job that anyone can do... It is certainly true that it's a different job than "research" or "teaching" (or even refereeing papers), but in any sort of serious/large situation it is a "skill position".
And, after all, not only are not all faculty really ideal for such positions, but would often be completely happy to be left out of such a rotation, since they just want to do their research and teaching. :)
TLDR: if you have "strong" chair/head, don't have everyone rotate through, because it can make a mess. This may be an argument in favor of not having a "strong" chair/head, ... but, at my university, authority is very hierarchical... faculty only recommend upward, and all decisions about hiring/firing and money actually "descend from above". :)
Comment: An important difference between administration and the rest of our work, whose importance I noticed very soon after becoming an associate chair for the first time: As graduate students, we were trained in research. And, although we weren't explicitly trained in teaching (in olden times), we saw enough teachers to at least distinguish good from bad teaching. But we were never trained in administration, nor even allowed to observe it in action. I suddenly had to make decisions without the necessary information and without training. (Fortunately, people seem to have forgotten my blunders.)


Syntax highlight in bugzilla

Question: I have Bugzilla installed on Ubuntu Server. Is that possible to add syntax highlight to Bugzilla comments (for C++ code)? Now code pasted in comments looks not well formatted and it makes harder to understand it.
Answer: No, unfortunately that's not yet implemented, though people have asked for it:
Last Comment Bug 358987 - Show attachments with colored syntax highlighting in certain views
An alternative might be to put a code highlighting tool into your browser. There are at least tow Firefox add-ons which do that:
CodeViewer: https://addons.mozilla.org/de/firefox/addon/6855
CodeSnippet: https://addons.mozilla.org/de/firefox/addon/9113
They let you select code in a web page and display it with highlighting.
Comment: Firefox plugin is not an option. May be there are available onofficial syntax highlight patches?

Syntax highlight in bugzilla


How can I make Unity maximize windows like Gnome 2, KDE, Xfce et al?

Question: Unity, of course, puts the window buttons and menus at the top left for maximized windows and removes the titlebar. I hate this. Is there a way to make it stop and just make the windows as big as the screen? I'm in 12.10, if that helps.
Answer: If what you really want is making the windows as big as the screen, then it is as simple as setting the Launcher behavior.

Open Appearance from the Dash or Device Menu > System Settings... > Appearance
Select Behavior tab
Set Auto-hide the Launcher to ON

The result will be like this:
Comment: No, what we really want is for the titlebar to behave normally instead of hiding buttons and text depending on where your mouse is.


Between the cardano-graphql and cardano-rosetta APIs, which one is recommended for apps and dapps integration?

Question: From what I understand, cardano-graphql as well as cardano-rosetta APIs enable interaction with the Cardano blockchain. Which of these is recommended for developing apps/dapps that interact with Cardano? Will the Rosetta API be a more comprehensive solution given rosetta is a blockchain specific standard?
Answer: It really depends on your dApp.
Cardano Rosetta is build by and for exchanges and Cardano GraphQL is more universal.
Review both APIs to make the best decision.
Comment: You can also add Ogmios to the mix, as it's more reliable than Cardano GraphQL for some things, like submitting transactions.


Do I need to update my Linux servers older Java to Java JRE 5 Update 22?

Question: I have web application running in jboss 4.0.2 and it has older java 5 version, is this new update causing possible security flaws in my web application server?
Answer: Java 5 is already EOL, this is, no more upgrades unless you have a support contract.
If you are using the freely downloadable version of the jdk and not a "java for business" release, if the previous statement is true, then the probable best approach is to upgrade to java6 after upgrading jboss to a newer version.
See this documentation from redhat:
http://www.jboss.com/products/platforms/application/supportedconfigurations/#JEAP4.2
jboss-eap 4.2 is way newer than the 4.0.x branch and the jdk6 is not a supported configuration.
What I am trying to say is that you may run into issues, and also that the version of jboss you are running is extremely old.
You should evaluate jumping to jboss as 4.2.3 (you can read the release notes here http://sourceforge.net/project/shownotes.php?release_id=614346&group_id=22866).
Bottom line your situation is catch-22.
Just need to bite the bullet and do some testing and then try the upgrades needed.
Answer: I'm not quite sure what your problem is. Have you upgraded your server to Java 6 and are now concerned about security holes ? What evidence do you have for this (if any) ?
Here's the Java 6 adoption guide. As well as a bunch of new APIs there'll be bug fixes and (possibly) security holes closed. But I don't know of any particular issues being introduced in Java 6. If you have security holes in your app, they're likely to be there as part of the application itself, and not the underlying Java infrastructure.
Comment: Sorry, I copy pasted wrong version to title. I have old Java 5 version and I'm wondering if this new update contains important updates, because I undestood that in some cases these new vurnabilities can allow hacker to take control of your server. Im just wondering if this is the case with jboss..
Comment: I've not heard of such an issue with Java JRE updates within a particular version. However I don't think it's unreasonable to keep up-to-date with Java versions (allowing for time to upgrade etc.)
Answer: You should generally always use a distribution which allows you to automatically upgrade to the latest versions of software.
E.g. under Ubuntu the sun-java6-jdk package does exactly that.
In any case, I would always upgrade to the latest version recommended by Sun.


Re-enter Italy on Permesso di Soggiorno/Residence Permit receipts with Single Entry Visa

Question: I have been in Italy since November on Employment Visa D-Type. When I came here and applied for first issue of residence permit, the date given to me was June. Due to COVID-19, my date has been shifted by several months and is still slipping down. My original visa was a single entry Visa and so it will expire when I exit. I am now in possession of the Residence Permit receipts and my Single Entry Visa. How do I exit and re-enter Italy to visit home?
Comment: The receipt is the result of the **Permesso di Soggiorno Kit** and serves as a temporary residence permit. Under the present conditions, you should clarify if a temporary visit home is considered essential travel.
Comment: Are you planning to leave after the COVID-19 situation?
Comment: What do you mean by receipts??? In the body of your question you make it sound like you haven't yet applied for the permesso, so what are these receipts you're talking about?
Comment: @Ozzy I think OP applied for residence permit already, but the date of issuance is being pushed down. After they applied, the post office or the police will give them a receipt that's valid to prove temporary status in Italy (but is not a travel document and does not allow re-entry unless it's a renewal receipts). But OP should clarify.
Comment: Under usual circumstances (without COVID-19 restrictions), you need to apply for a permesso di soggiorno provvisorio with justified reasons (you need a reason even without COVID-19) at the local police station. You may get it, you may not get it (work-, or health-related reasons and family emergencies are easier to justify than travel alone).
Answer: It was possible in the past to travel with the receipt (cedolino/tagliandino) and there were restrictions to do so which I will highlight below;

You should have handed in the renewal of your permit with the police headquarters (Questura) and should be awaiting for your permit which is in process of been issued.

You should take a direct flight from an Italian airport to your home country airport without transiting in another Schengen country. (There are some cases in the past that allowed transit in Schengen countries but communication was issued explicitly by Italy to the other Schengen countries and this was between the months of November and January when Italy had a backlog of permits to process and couldn't cope)

The best thing I would recommend is go to the Questura and ask them because you have not had your first permit of stay yet, which will be based on your expired visa.
After you have a first permit of stay issued, successive permits will not be based on an entry visa but on your previous permit which is issued by the Questura and falls under the jurisdiction of Ministero dell'interno. Visa issuance fall under the ministry for foreign affairs (Ministero degli affari esteri) and the last thing you want to do is deal with two Italian ministries when you are blocked abroad.


Server Side JavaScript to create a filtered data extension?

Question: The Salesforce documentation provides helpful examples of creating regular data extensions using SSJS, but no example for creating a filtered one.  Does anyone have a code sample for creating a filtered data extension? I'm unsure of the syntax that would need to be used.  Thanks!
Answer: I've done this with WSProxy:

Comment: nice. Didn't know that. Another piece of related info: If you need a data extension that is populated by a filter _activity_, not manually refreshed, you can just create a normal DE and reference it in the filter activity (which can be created via API). The data extension will not show as "filtered", but when referenced in the filter activity, it acts as if. Meaning that the Data Extension fields change if the Source Data Extension of the filter changes upon filter refresh. Which is quite handy in case your source DE gets new fields and the dependent DEs automatically adapt.
Comment: This was part of a larger solution to automatically refresh segments from a master by retail store.  Coupled with a meaningful naming scheme, it sure reduced the LOE for targeting.
Comment: Problem with it is, IIRC, that you can only select one filtered data source in the send definition.  I have a query version of this that is more flexible.
Answer: Filtered data extension comes from the main data extension from which you want to filter a data. I don't think you need ssjs to create a filtered data extension. You can simply click on create in DE and from the type of DE choose filtered DE and the source DE you want to filter it from. You filtered DE will be created.
Comment: Thanks, but I'm interested in creating a script to automate needed data extensions (regular and filtered).  From what I can see, a [filter definition](https://help.marketingcloud.com/en/documentation/server_side_javascript/server_side_javascript_syntax_guide/core_library_server_side_javascript_functions/filter_definition_server_side_javascript) ([SOAP API](https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/filterdefinition.htm)) specifying the source DE may be what I need.
Comment: I need the same answer. were you able to finish this task?


If a given DNA oligo is an aptamer, will the corresponding RNA oligo with the same sequence be an aptamer aswell?

Question: Functionality of aptamers depends upon the oligo's sequence and secondary structure. So, if I take a DNA aptamer and make an RNA oligo of the same sequence (T replaced with U obviously), will this RNA oligo also act as an aptamer?
Answer: There is at least one known case where both the DNA and RNA versions of the same aptamer sequence bind the same target (Lauhon and Szostak, 1995).
But you can't generalize this, there are two differences in structure between RNA and DNA, the Uracil/Thymine change and the missing 2'-OH in DNA. Those differences can affect the binding and overall structure of the aptamer.
It is possible that the RNA version of a DNA aptamer binds the same ligand, but this won't be always the case.
Comment: But does the backbone really play role in ligand binding for the aptamer? I mean had the backbone been playing any role, aptamer sequences wouldn't have been as specific as they are, because every oligo has the same backbone and hence would have had atleast some amount of affinty for any given aptamer ligand.
Comment: @Kunal24 Not just the backbone, the tertiary structure varies between ssRNA and ssDNA with same sequence. The tertiary structure is crucial for aptamer function.
Comment: @WYSIWYG: Oh I wasn't aware of the fact that tertiary structure of ssDNA and ssDNA are different. Could you please cite some informative sources for the same? Thanks a lot!
Comment: @Kunal24 that may be a question in itself; can't cite all the references in comments. The backbone flexibility (search persistence length) is different. RNA forms GU wobbles too. For wobbles you can see my answer [here](http://chemistry.stackexchange.com/a/35224/5295).


Problem with cmd + tab now that I've loaded macOS Sierra

Question: Loaded macOS Sierra this morning. Now, once VMWare is running, cmd+tab switches me back to the mac environment but system immediately and automatically switches me back to vm. Result? Can't access mac environment when vm is running. Help?
Answer: Force quit Dock from Activity Monitor. Dock automatically restarts, and Cmnd+Tab should now work. Some glitch with Dock, it seems. Worked for me.
Answer: In my case, I wasn't even able to open the Activity Monitor (or the Launchpad)
I had to use the terminal to kill the Dock process, it restarted automatically after a few seconds
In the terminal, type: ps aux | grep -i dock
Note the PID (2nd column) of the process named: "/System/Library/CoreServices/Dock.app/Contents/MacOS/Dock"
Kill that process: kill pid. E.g. if the PID was 708, run kill 708
Comment: @grgarside No reason specifically. I tend to avoid `killall` in general - but I guess that would work too.
Comment: recommend `ps aux | grep -i dock | grep -v docker` if you're a developer and might have a ton of docker related processes running.
Comment: Is there a reason these steps are preferred over `killall Dock`?
Comment: Sometimes you have to kill -9 the pid for this to work.
Answer: Apparently, Sierra set the keyboard preference to a loop. Turned that off and everything worked as usual. (Detailed path: system preferences>keyboard>shortcuts>input sources) Both boxes were checked. I unchecked both.
Comment: I don't understand. What was the problem? Could you elaborate how or why your solution fixes the problem?
Answer: I have found that when you're running a Virtual Machine manager like VirtualBox sometimes an open Virtual Machine window can grab the ⌘ key (which is often used switch between VM keyboard capture mode).
In this case you can fix it by bring the VirtualBox Console window up (e.g. using the Dock bar icon) and tap the ⌘ key again and it should release it properly. With VMWare the settings may be different but it's worth looking at the keyboard capture/mapping options to see if a similar thing is happening.
Answer: Launch Activity monitor, then select user tasks, and shut down the process called 'dock'.  This worked like a charm for me.  Problem solved, instantly.  Well, it took about ten seconds while the dock rebooted itself, then command tab worked like a charm as usual, no restart needed.
Comment: Instead of replicating an existing answer please upvote the one which helped you.


Kali disconnect from WiFi when tools are used

Question: My kail linux (desktop dual boot, not vm) disconnects from WiFi whenever I do something with the given tools. It works fine with the browser and even other terminal procedures like vim. However, when I try to use a tool like wifite, arimon-ng or airodump-ng, it disconnects. After it disconnects, the adapter can no longer find any networks.
Answer: -Hello! this ends up happening just because unfortunately the use of some tools mainly airmon-ng or other tools that make use of the network device is this very thing, why they need access to a network device "card" even to create addresses the virtual items of the tools in use, so the fall of the internet connection is normal, if you want to continue to have access, use the internet access during this process you need to have another network device to do it! or reset the changes that you have made it like, mac-address changing, and others...
Answer: I've had this problem many times when it comes to using wifite, airo*-ng, fluxion, where it will disconnect my wlan0 (connected to regular AP serving inet) when the apps are launched.. I'm working on a definite fix.  But for now, experiment with this method:
Get famliar with the CLI tools iw, iwconfig, ifconfig, wpa_supplicant, wpa_passphrase.
Get unfamliar with nm-applet (the wifi gui connection app in top task bar)
This has worked for me in the past:
Prior to starting wifite or any of the haxing tools above:
service network-manager stop
killall wpa_supplicant
killall dhclient
ps guax | grep wpa   # verify there are no other rogue wpa_* proc. running

start your attack (in your lab of course) with wifite or fluxion
one that is initiated, manually connect to your AP:
in another term:
wpa_passphrase <SSID> <PW>  > /etc/wpa_ssid.conf
ifconfig wlan0 up
wpa_supplicant -i wlan0  -c /etc/wpa_ssid.conf
<in another term once that connects>

verify your associated with iwconfig wlan0
if so:
dhclient wlan0


Hyperplanes in finite and infinite dimension vector spaces.

Question: I know that hyperplanes of a n-dimensional vector space are sub-spaces of dimension n-1, This is in finite dimension spaces. BUT what about infinite dimension spaces what are hyperplanes? are they the same?
Answer: I know this is an old question, but it seems to me that no one has answered it in a "correct" fashion yet, concerning "infinite" of course.
The most generalized definition I've seen is the next one:
Let H be a subspace in a vector space X. H is called hyperplane if $H \neq X$  and for every subspace V such that $ H \subseteq V $ only one of the following is satisfied: $ V = X$ or $ V = H $.
Lemma: A subspace H in X is hyperplane iff e is in X \ H such that $$ <\{e,H \}> =  \{ \lambda e + h : \lambda \epsilon \mathbb{R}, h  \epsilon H\} = X  $$
Just for fun:
Theorem: A subspace H in a vector space X is hyperplane iff there is a non-zero linear function $$ l : X \to \mathbb{R}$$ such that $$ H = \{x \epsilon X : l(x) = 0\} = Ker( l ) $$
Good luck proving this.
Comment: It's sort of cruel to state this definition and theorem without saying where you got it from. I'm sure if you thought about it for a second, you'd know. In any case, an excellent book to look things like this up in is: Infinite Dimensional Analysis, A Hitchhiker's guide https://link.springer.com/book/10.1007/3-540-29587-9
Answer: Usually this is how one hears the definition anyway: "a subspace of codimension 1."
So yes, I believe that any subspace $W$ of a vector space $V$ can be called a hyperplane if $\dim(V/W)=1$.

(Added)
This is, of course, equivalent to saying that $W$ is the kernel of a linear functional (if you want to do it that way.)
If $\dim(V/W)=1$, then picking a basis for $W$ and extending it by one element "$v$" to be a basis for $V$ allows you to project onto the coefficient of $v$, obtaining a linear functional from $V$ to $F$ with kernel $W$.
In the other direction, an easy application of isomorphism theorems tells you that for a nonzero linear functional $f$, $V/\ker(f)\cong F$, so $V/\ker(f)$ has dimension $1$, and $\ker(f)$ has codimension $1$.
Comment: Do you mean the above definition is not good?
Comment: @Mohamez. Well, what does it mean $\infty -1$?
Comment: @AgustíRoig $\infty$ isn't it?
Comment: I think saying "kernel of a linear functional" is a little fancier than it needs to be, but at any rate that definition is equivalent to the one I gave.
Comment: @Mohamez. So, does it make any sense to define a hyperplane as something having the same dimension as the total space?
Comment: @AgustíRoig I got it thank you
Answer: When you are generalizing an idea to a domain in which it is not, a priori defined, you can do it in any way you want.
If your definition of hyperplane is that it is a subspace of dimension $n-1$ where $n$ is the dimension of the space, and now you want to extend this for when $n$ is $\infty$, you could say that $\infty-1=\infty$ and therefore you will call hyperplane any subspace of infinite dimension.
The thing is that often one generalizes when there is a need for it. When you can find something interesting in the generalization.
For finite dimension a hyperplane is the zero set of a linear form (a linear functional), a linear function from the space to the scalar field. So, another possibility is to say that a hyperplane is the zero set of a linear functional. This is the option that is more often used.
A rough criterion of how good a definition is Halmos': A good definition is the hypothesis of a theorem. The thing is that many theorems involve the zero set of linear functionals. 'any infinite dimensional subspace' are less interesting as a class.
Comment: How to prove that the zero set of a linear functional always has codimension of 1, even if the original space has infinite dimensions?
Answer: I have seen that this is a very very old question nevertheless I would like to make this little contribution which would be of interest for someone.
I will consider the correct: $H$ is called a hyperplane of a given space $V$ iff $H$ is a subspace of $V$, $H\neq V$ and for any other subspace $W$ of $V$, $H\subset W\implies$ either $H=W$ or $W=X$.
We are then going to prove that: $H=$hyperplane of $V$ iff $dim(V/H)=1$ iff $H=Ker(f)$ for some linear form $f$.
(1) Suppose $H=$hyperplane of $V$ and $dim(V/H)\neq 1$. Sine $H\neq V$, $dim(V/H)\neq 0$. Then $dim(V/H)>1$. Hence there are $\tilde{x},\tilde{y}$ linearly independents in $V/H$ such that $\mathbb{K}\tilde{x}+\mathbb{K}\tilde{y}\subset V/H$. Let $x$ and $y$ be their representers in $V$. It is clear that $x,y\notin H$. The space $W=\mathbb{K}y+H$ is a subspace of $V$ containing $H$. Since $y\neq \overrightarrow{0}$, then $H\neq W$. H being a hyperplane, this condition implies that $W=V\ni x$ therefore $x=k\cdot y+h$ for some $0\neq k\in\mathbb{K}$ and $h\in H$. So $\tilde{x}=k\tilde{y}$ which means that $\tilde{x}$ is proportional to $\tilde{y}$ which is impossible as they are independents.
(2) If $dim(V/H)=1$ then there is a non zero vector $w\in V$ such that $V/H=\mathbb{K}\tilde{w}$. So for all $x\in V$ there is $f(x)\in \mathbb{K}$ such that $\tilde{x}=f(x)\cdot \tilde{w}$. We get the rule $x\overset{f}{\mapsto} f(x)$ from $V$ to $\mathbb{K}$. It is easy to show that $f$ is a linear form and that $H=ker(f)$.
Comment: Thank you it sure helps
Answer: They are kernels of linear forms thus their codimension is one.


I asked a question about if building a houseboat on dry land would be a useful solution and it was deleted by the 'community'

Question: I made a suggestion about building a houseboat on dry land in a flood-prone area might help people and their properties survive a flood, and the question was rudely discarded by the 'community' with no chance of further comments. I'm just trying to think of ideas to help people yet many of your privileged users who like to edit other peoples work seem to feel insulted if I do not agree with their non- encouraging criticism. My question here is shouldn't  the content of a question even if amateurishly expressed be more important than strictly following syntax or grammar rules? More important than if the question, in the opinion of the privileged users, has too many opinions in it.
Link to original question
Comment: Please note, the OP has asked two very related questions.  [The first is about housing and tornadoes](http://engineering.stackexchange.com/q/2855/16) and has been deleted by the Community user.  [The second is about housing and flooding](http://engineering.stackexchange.com/q/2984/16).  Oddly enough, no one commented about housing being built in flood plains that experience tornadoes.
Comment: Can you include some information about the question (e.g. close reason, some body content, etc.)?
Comment: It's all in the question I wrote in the engineering stack exchange site under user 201044.
Comment: Is it [this](http://engineering.stackexchange.com/questions/2984/with-all-the-flooding-that-is-going-on-in-the-world-recently-here-is-an-unusual)? That doesn't match the link in the question here.
Comment: Yes. This is the question.
Answer: Why your question was deleted
From How does deleting work? on Meta Stack Exchange:

The system will automatically delete closed (not as a duplicate), unlocked questions with zero or negative score having no
upvoted or accepted answers or pending reopen votes, that were closed
9 or more days ago and haven't been edited in the past 9 days.

When the Community user's regular cleanup routine ran ~12 hours ago, your question met the above criteria for an "abandoned" question and so was automatically deleted.
Why your questions were closed
Your more recent question was closed for the same reason as the your first (now deleted) question, and it has nothing to do with syntax or grammar. In both cases, the first revision of the question didn't contain a question at all. You corrected that in the second revision of the deleted question by adding:

So I'm asking if it would be better in Tornado prone areas to build or
rebuild houses so they are partly underground ( and made without a
wooden framework) like a big stormshelter you can live in? This might
save people and there properties.

After you made this edit, the question was automatically put up for review in the Reopen Queue. I completed that review by voting "Leave Closed." Note that this does not prevent any user from voting to reopen who has the necessary privileges to do so---it only removes the question from that particular review queue.
In both cases, you're looking for an open-ended discussion, which Stack Exchange does not support on its Q&A sites. The Help Center clearly states:

You should only ask practical, answerable questions based on actual
problems that you face. Chatty, open-ended questions diminish the
usefulness of our site and push other questions off the front page.
Your questions should be reasonably scoped. If you can imagine an
entire book that answers your question, you're asking too much.
If your motivation for asking the question is "I would like to
participate in a discussion about ______", then you should not be
asking here. However, if your motivation is "I would like others to
explain ______ to me", then you are probably OK. (Discussions are of
course welcome in our real time web chat.)

You want to brainstorm ideas; that's not what we do here. There are an incredible number of alternative venues on the internet for what you want to do. We even provide an Engineering chat room for discussing almost anything you want, up to and including Trevor's pizza misconceptions.
Alternatively, you can still revise your questions to fit our guidelines. More than one user, including a moderator, left you comments pointing out issues that you have yet to address. However you may feel about the tone of those comments, I assure you they are not personal. These users are trying to help you participate by explaining our expectations---and so am I.
Please familiarize yourself with the guidance in the Help Center and do not hesitate to ask questions here on Meta if you need support or would like to discuss the site itself.
Comment: Utility is the most fundamental metric for deciding whether a question belongs here—but it is utility in a very specific context. Your questions are vague and speculative; they show no understanding of or desire to engage in any engineering process. The best guidance I can give you is to ask detailed, specific questions based on actual problems that you face.
Comment: Yes, I was referring specifically to your questions on the main site that were closed and/or deleted. Not to this one on meta, which is clear, albeit based on the false premise that any of this has anything to do with your writing ability.
Comment: I know the users with a lot of priveledges basically 'run' these sites and you people use your strict editing policies to enforce this. There is no point inmy suggesting policy changes. It is your peoples opinion that some of my questions are 'chatty'. I have never asked open ended chatty questions. Trying to find a solution to property loss and saving people during a flood is practical...
Comment: I would not use a chat room on with the non-restrictive potential for discouraging comments is a lot greater than on the regular sites. I have gotten many discouraging comments on the regular sites so I don't hold much hope for encouraging respectful discourse in any chat room. My question still stands ; I know you have a lot of strict  rules on what questions and responses are allowable  yet you people admit the 'rules' about what is off topic or too broad can be open to interpretation or 'hard' to define. If a question is very useful though outside your rules shouldn't it be considered?
Comment: My question on this meta site was neither vague or speculative ; you may call my question on the engineering site vague although building a house that is like a houseboat seems clear  enough. The question on this site is about if a question with interesting content should be analysed even if it is terribly written. Even if it doesn't fit your strict definitions of clarity.
Comment: Why is  it a false premise; the objections to my question on the engineering site WAS partly to do with my writing ability. Instead of discussing the grammar or syntax or semantic or vagueness issues what about the original meta-question; if a user's question could be considered very useful even if rottenly written or rottenly presented etc. Or if the user's question isn't considered acceptible by the priveledged users. I know I PROBABLY won't change ANYBODY'S minds about policy issues....
Comment: Could your 'rules' be too strict and opinion based?


How to show coordinates in Minecraft PC without F3 button on my Gaming keyboard

Question: I know how to show coordinates if I had a f3 button but I own a gaming keyboard and don't have any f keys on it so is there a way to show them or do I need to switch keyboards every time I want to play Minecraft?
Comment: What keyboard do you have that doesn't have an F3 key?
Comment: There are laptop keyboards that don't. OTOH a *gaming* keyboard without function keys is an abomination that should be cast into fire.
Answer: As other answers suggest you can use third party programs to rebind a key or key combination to F3.
Other options include the Windows on screen keyboard if you're actually using Windows.
You can install a minimap mod if there is one for whichever version of MC you're playing. They usually display coordinates.
If the mod or an equivalent exists for your MC version, I remember one called something along the lines of "In Game Info XML" which could be configured to display your coordinates as well as other information.
I haven't looked at the controls menu in a while but the debug menu (the F3 menu) might be rebindable in there as well.
Answer: Does your keyboard have a Fn key?  Maybe you can hold down the Fn key and press another key?
There are probably some apps out there to bind other keys to your function keys too.  This article on How To Geek should show you how to do it:
https://www.howtogeek.com/howto/windows-vista/map-any-key-to-any-key-on-windows-xp-vista/
Essentially, if you're on Windows you can use an open source app called Sharp Keys to rebind things.  So if you don't use the home button for example, you could rebind that to F3.
Answer: If your keyboard actually has no F keys (which I somewhat doubt), you have a few options to generate an F3 keystroke.

Make an AHK script to bind a key combo to F3. This script will bind ALT+3 to generate the F3 key press:
 !3::
 send {f3}

Of course you can modify this to be whatever key or key combo you want. I have had very good luck using AHK for this type of problem and I highly recommend it.

If you can't or don't want to go to the trouble of installing AHK. You also have the option of using Windows On-screen Keyboard. This gives you a virtual keyboard that you can use to type key presses, including the F3 key. I have only personally used OSK rarely for doing things like remote troubleshooting and the like. You could have some difficulties using the OSK in game, unless you have a second monitor or are able to run the game in borderless windowed mode.


Threads in brass floor lamp post have been stripped. No longer twists and stays in place. How can I fix the threads?

Question: I have a floor lamp that comes in sections that you twist to screw together. the threads on one section have become stripped and the sections no longer stay together. Is there a way I can fix these threads at home instead of throwing the whole lamp out?
Comment: JB weld will do it but it will no longer be able to dissamble (JB weld is a metal filled epoxy )  it is silver gray in color so if the threads are exposed it may not look as nice but it can handle heat and is very strong. most hardware stores and auto part stores carry it.
Comment: Do you need to be able to disassemble the threaded sections later?
Comment: Self-tapping screws one size larger?
Answer: If there are any remnants of the stripped threads that you can feel, you might try wrapping some plumber's teflon tape, or other vinyl tape around them several times, and see if they will screw tight with the tape on.  You might need only one wrap, if the tape is thick.
Answer: If I am reading this right, it isn't a screw that's stripped, it's the main tubular shaft of the floor lamp that screws together.  Using epoxy might be strong enough but you might need electrical continuity in that shaft for grounding purposes.
Depending on how mangled the threads are, you may be able to clean them up with a small sharp file.  Once in a while that works.
You could re-tap the threads, or cut off half an inch and re-tap the tubing, but you have to have the right size tap, and that's not something you probably have laying around the house.  A plumber might, a machine shop would.
Comment: I doubt either has the appropriate tap, I'd assume tiny threads like that are lathe cut and the couplings are cast and then machined. Hiring this out or purchasing any equipment will cost more than a nice new lamp.
Answer: OMG... I fully get how trivial thus is, but FINALLY my favorite floor lamp is straight. I bought the lamp almost 20 yrs ago. The house it was bought for has been GONE over a decade. The lamp is a stupid relic, but it's my fav. So withbthat said, one of the threaded sections was stripped out and wouldn't support top. Hubby had put 2 support brackets, but still was "off." After I'd gotten tired of looking at the jacked up lamp, it got moved aside. I grabbed the teflon tape. Tried that, but not "quite" enough. Found electrical tape and DONE! I haven't seen it like this in YEARS! Now to add the antlers to jazz it up for the cabin.
Answer: You could remove the screws, fill the holes with jb weld, durhams putty, or a similar material, then when is dry, drill out smaller holes in the filler material and use screws to fit those holes.  Or skip that and just use screws a tiiiiiny bit bigger than the stripped holes so they still dig in.


Why does dispersion occur?

Question: In a vacuum, electromagnetic waves of all frequencies travel with the same phase speed, so they propagate with a fixed shape once determined. In a dispersive medium, waves of different frequencies travel with different phase speeds and this causes the wave packet to change shape when propagating. Certainly, the dispersion phenomenon is due to the medium, but what is its property responsible for dispersion?
Answer: Electromagnetic field induces polarisation and magnétisation in the media, which are not an instantaneous response. This results in k-vector being frequency-dependent, hence the group velocity,
$$
v_g=\frac{d\omega}{dk}=\left(\frac{dk}{d\omega}\right)^{-1}
$$
is different from the phase velocity
$$
v_{ph}=\frac{\omega}{k},
$$
which is what we call dispersion.
Update
Dispersion and causality section of the Wikipedia article on permittivity gives a rather good review of the relevant .EM equations
Comment: Do you mean the inability of the medium to respond to the waves instantaneously causes the wavenumber to be frequency dependent?
Comment: @KamKahSen yes, indeed - the media responds with different speed to different frequencies
Comment: How can we show this fact (If the response to waves is not instantaneous, then the properties must be frequency-dependent) mathematically?
Comment: @KamKahSen you can check section *Dispersion and causality* in the Wikipedia article on permittivity : https://en.m.wikipedia.org/wiki/Permittivity
Comment: That's very useful,thanks for the info.
Answer: . . . . . the dispersion phenomenon is due to the medium, but what is its property responsible for dispersion?
The incoming electromagnetic wave interacts with the medium and the result of that interaction depends of the frequency of the electromagnetic wave and the properties of the medium.
The situation is very complex as one has to consider the effect on a single charge of not only the effect of the electric field of the incoming electromagnetic wave but the electric field produced by all the electric fields produced by all the other charge in the medium.
To reduce this complexity it is often assumed that the effect on the charge under consideration of the electric fields produced by the electric fields of all the other charges is negligible as compared with the electric field produced by the incoming electromagnetic wave.
The medium is a very complex system with very many natural frequencies of oscillation so let me pick one component of the system, the electrons orbiting the nucleus of an atom which can be polarised and assume that the electron shell fastened elastically to the atom, ie, liken it to being like a mass on the end of a spring with a natural frequency of oscillation of $\omega_0$.
That electrons will be undergoing forced oscillation due to the electric field of the incoming electromagnetic wave at the frequency of the wave $\omega$.  In general this will mean that the electrons will be oscillating out of phase with the incoming electromagnetic wave and so producing an oscillating electric field which is out of phase.  Here is an example of the origin of the apparent slowing down of electromagnetic waves within a medium.
For light and glass one of natural frequencies (resonant frequency) of glass is in the ultra-violet region of the electromagnetic spectrum so the change of phase is smaller for red light than for blue light light because the frequency of blue light is greater than that of red light and hence closer to $\omega_0$.
This in turn means that the phase velocity of a given frequency of red light is greater than that of blue light which is also true of the group velocities over a small range of frequencies and thus the refractive index of glass for red light is less than that for blue light, ie red light appears to travel faster through glass than blue light.
Another interesting fact is that in certain circumstances the phase velocity can actually exceed the speed of light in free space but that would be for a single frequency and the group velocity would still be less than the speed of light.
Much more here from Feynman, The Origin of the Refractive Index.
Answer: Dispersion is phenomenon in which the temporal form of the signal pulse is altered.
It is called dispersion because the pulse usually expands over time ("disperses").
The pulse has a spectral content
The different spectral components of the pulse travel at different speeds and therefore reach the output  at different times (expansion)
Cause of Dispersion
Spectral components reach the output at different times ...
Pulse time segments also occur at different times

Why does dispersion occur?


I build solc from source v0.4.18 but can't not use it to compile solidity. How can I solve this problem?

Question: <code>$ solc  --bin -o ./contracts SimpleStore.sol

Warning: This is a pre-release compiler version, please do not use it in product                                                                                ion.
SimpleStore.sol:1:1: Error: Source file requires different compiler version (cur                                                                                rent compiler is 0.4.18-develop.2018.12.6+commit.9cf6e910.Linux.g++ - note that                                                                                nightly builds are considered to be strictly less than the released version
pragma solidity ^0.4.18;
</code>
Comment: Can you provide the pragma directive of your smart contract? Something like `pragma solidity `.
Answer: it looks like you compiled a nightly commit, and the pragma requires the 0.4.18 version or later. You can use a later version of solidity, or use the release version
Remember that <code>^0.4.18</code> means "0.4.18 or later", so you can simply use a later version, and that would be more secure. Just know that if you choose a 0.5.x version things may fail, since there where breaking changes, like going from function scoping to block scoping.


bootstrap-carousel.tpl.php not used

Question: I have the bootstrap D7 Theme as a base themen. I added a new content-type for my header images and then create a bootstrap carousel using the bootstrap carousel view type.
Now I do get a carousel which seems to work fine but it looks crap, so I'd like to style it etc.
So accomplish this I though I could just "overload" bootstrap-carousel.tpl.php. But it doesn't work - it works for other template files though. Even worse: The original bootstrap-carousel.tpl seems to never be used. (Which porbably is the reason why my carousell looks totally unstyled).
What could be the reason for this?
Permission should be fine since it all the same and as I said, overloading other template files works.
Edit: For the carousel feature I use the bootstraps views module. I kind of expected that the tempalte files from the base theme kind of overwrite the ones from the module but it seems that isn't the case. why?
Answer: Since the bootstrap carousel is based on a content type, you should be overriding node.tpl.php instead. Try dropping a node--bootstrap_carousel.tpl.php into your theme and making your markup changes there.
Comment: ok I'll try it .

bootstrap-carousel.tpl.php not used


Visual Studio 2010 and Cassini web server can't make windows authentication! (Access Denied 401.2)

Question: How it could be difficult to make a web site which is integrated with domain authentication in visual studio!?
This is my web.config:
    <authentication mode="Windows"/>
    <identity impersonate="true"/>
    <authorization>
        <allow users="xxxDomains\yyyGroup"/>
        <deny users="*"/>
    </authorization>

This is the result:

But I think there would be a logon dialog which is for entering domain_name\username and password. Bu page is directed me always to the Access Denied Page without asking my username and password.
PS: I'm not belong to any domain. I want to use visual studio's web server(cassini). I will deploy the site after finishing project, I don't want to deploy project to web server in every F5 ...
Any help would be appreciated...
Comment: I updated my answer. Was that of any help?
Answer: I guess what you are missing is checking the box for NTML Authentification in your web projects properties under Servers in the Web tab.

Anyhow, I would recommend upgrading to IIS Express 7.5, which is a simple and self-contained version of IIS that is optimized for developers:

The way IIS Express treats Windows Authentication is the same as a "real" IIS instance.
You still have the comfort of a local development server (e.g. F5) without deploying.
The ASP.NET Development Server is not developed anymore by Microsoft and will be replaced by IIS Express in future releases of Visual Studio.

See also this blog post by Scott Guthrie for more information on IIS Express or this article.
Hope this helps!
Answer: In solution explorer pane select the Web Project and hit F4. (not right click+properties, thats different)
In properties Pane set:
Windows Authentication: Enable
Anonymous Authentication: Disabled
In Web.config: <authentication mode="Windows"></authentication>
To get Username:
HttpContext.Current.User.Identity.Name OR User.Identity.Name

Run your project, Happy Days!


binomial sum binomial (a + k , a)

Question: Anyone know a way to compute such a sum :
$$S = \sum_{k=0}^{n}\binom{a+k}{a} $$
I encountered this sum in a problem in which $a=7, n=7$. In this case the sum can be computed by hand, but I was interested in fiding a general formula.For anyone who might be interested, I was computing the number of increasing sequences of length 8 with terms between 1 and 10.
Comment: This is certainly a duplicate you might look in the website before posting such questions
Comment: @Elaqqad This duplicate is becoming ridiculously common... I think this is something like the sixth instance I've seen in the last month. If only we had sticky questions... (Or maybe the matching algorithm for duplicates is bad at finding these...)
Comment: As an aside, $~\displaystyle\sum_{k=0}^\infty\binom{a+k}{a}x^k ~=~ \sum_{k=0}^\infty\binom{a+k}{k}x^k ~=~ \dfrac1{(1-x)^{a+1}}~.~$ See [binomial series](http://en.wikipedia.org/wiki/Binomial_series).
Answer: Note the identity, derived from Pascal's identity,
$$ \binom{a+k+1}{a+1}-\binom{a+k}{a+1} = \binom{a+k}{a}, $$
and then make the sum telescope.
Answer: I just finish the work started by @Chappers
$$\begin{align}\sum_{k=0}^n\binom{a+k}{a}&=\sum_{k=0}^n\binom{a+k+1}{a+1}-\sum_{k=0}^n\binom{a+k}{a+1}\\
&=\sum_{k=1}^{n+1}\binom{a+k}{a+1}-\sum_{k=0}^n\binom{a+k}{a+1}\\
&=\binom{a+n+1}{a+1}-\binom{a+1}{a+1}\\
&=\binom{a+n+1}{n}-1
\end{align}$$

binomial sum binomial (a + k , a)