Prove that if $d$ divides $n$ then $φ(d)$ divide $φ(n)$ for $φ$ denotes Euler's φ-function.

Question: Prove that if $d$ divides $n$ then $φ(d)$ divide $φ(n)$ for $φ$ denotes Euler's $φ$-function.
I know that $d|n$ mean there exists some integer $k$ such that $n=kd$, but how can I use this to prove $φ(d)$ divide $φ(n)$
Comment: Why use the abstract algebra tag rather than the number theory tag?
Comment: this problem is from abstract algebra class :D
Answer: It is true for $\rm\color{#0a0}{prime\ powers}$, so for all naturals, because  $\phi$ is $\color{#c00}{\rm multiplicative},$ i.e. $\,\phi(ab) = \phi(a)\phi(b)\,$ for coprime $a,b,\,$ therefore $\ \phi(p_1^{n_1}\cdots p_k^{n_k}) = \phi(p_1^{n_1})\cdots \phi(p_k^{n_k})\,$ for distinct primes $\,p_i$. Explicitly
$$\begin{eqnarray} &&\qquad\qquad\qquad\ \ \ p^i \cdots q^j\ \mid\  p^I\cdots q^J\quad\ {\rm for\ distinct\ primes}\ \ p,\ldots, q \\
\Rightarrow\ &&\qquad \quad\ \ \color{#0a0}{p^i\mid p^I},\qquad\quad\ \ldots,\qquad\quad \ \  q^j\mid q^J \\
\Rightarrow\ &&\color{#0a0}{(p\!-\!1)p^{i-1}\mid (p\!-\!1)p^{I-1}},\ldots,(q\!-\!1)q^{j-1}\mid (q\!-\!1)q^{J-1} \\
\Rightarrow\ &&\qquad\ \color{#0a0}{\phi(p^i)\mid \phi(p^I)},\qquad\ldots,\qquad\,\phi(q^j)\mid\phi(q^J)\\
\Rightarrow\  &&\qquad\qquad\ \, \phi(p^i)\cdots\phi(q^j)\mid \phi(p^I)\cdots\phi(q^J)\\
\Rightarrow\  &&\qquad\qquad\qquad\!\phi(p^i\cdots q^j)\mid \phi(p^I\cdots q^J)\quad\ \   \rm by\ \phi\ is\ \color{#c00}{multiplicative}
\end{eqnarray}$$
Remark $\,\ $ Similarly, generally a "multiplicative" statement about a multiplicative function is true if it is true for prime powers.
Answer: Lemma1: $\phi(n)=n\prod_{p|n}(1-1/p)$
Lemma2: $\phi(mn)=\phi(m)\phi(n)\dfrac{d}{\phi(d)}$, where $d=(m,n)$. (Deduced from Lemma 1)
Since $a|b$ we have $b=ac$ where $1 \leq c \leq b$. If $c=b$ then $a=1$ and $\phi(a)|\phi(b)$ is trivially satisfied. Therefore, assume $c<b$. From Lemma2 we have $\phi(b)=\phi(ac)=\phi(a)\phi(c)\dfrac{d}{\phi(d)}=d\phi(a)\dfrac{\phi(c)}{\phi(d)}(*)$
where $d=(a,c)$. Now the result follows by induction on $b$. For $b=1$ it holds trivially. Suppose, then, it holds for all integers $<b$. Then it holds for $c$ so $\phi(d)|\phi(c)$ since $d|c$. Hence the right member of (*) is a multiple of $\phi(a)$ which means $\phi(a)|\phi(b)$. This proves the assertion.
Comment: [See here](http://math.stackexchange.com/a/114866/242) for a proof of Lemma 2 $\ $
Answer: You can use the formula
$$
\text{If } n=p_1^{a_1}p_2^{a_2}\cdots p_r^{a_r}\Rightarrow
\phi(n)=p_1^{a_1-1}p_2^{a_2-1}\cdots p_r^{a_r-1} \left(p_1-1\right)
\left(p_2-1\right)\cdots\left(p_r-1\right).
$$
Answer: Since another question asked this question for the case that $d$ is a prime$~p$, and it was closed as a duplicate of this one before I could post my answer, I'll post that answer here, admitting that it only deals with a special case; on the other hand I imposed myself an addition restriction.
I'll add that the method below can in principle be extended to the case of an arbitrary divisor $d$ of $n$ instead of a prime divisor$~p$, still essentially by reducing to showing the fibres of the reduction $\def\Z{\Bbb Z} \def\r#1{\Z/#1\Z} \def\m#1{(\r{#1})^\times} \m{n}\to\m{d}$ are all non-empty, which can be done by lifting first in any way to the maximal divisor of$~n$ with the same prime factors as$~d$, and then using the Chinese remainder theorem to lift from there to$~n$. But this requires a bit more effort (and more Chinese remaindering) which I'll leave as an exercise.

Just as a challenge, I'll try to see if I can formulate a proof of without using the explicit formula for $\phi(n)$.
From $p\mid n$ we get the existence of a ring morphism $\r{n}\to\r{p}$, which maps invertible elements to invertible elements. So if we define $r:\m{n}\to\m{p}$ to be the restriction of that ring morphism to the respective groups of invertible elements (which are of sizes $\varphi(n)$ respectively $\varphi(p)=p-1$), our divisibility $p-1\mid\varphi(n)$ will be assured if we can show that all fibres of $r$ above any $~u\in\m{p}$ (which are the sets $r^{-1}(\{u\})=\{\, x\in\m{n}\mid r(x)=u\,\}$) all have the same size.
To this end I first show that each fibre is non-empty: we can lift any$~u\in\r{p}^\times$ to an $x\in\r{n}^\times$. Setting $q=p^k$ for the largest $k\in\Bbb N$ for which $p^k$ divides $n$, we shall first lift $u$ to$~\m{q}$, and invertible class modulo$~q$. Indeed any representative $\tilde u\in\Bbb Z$ of $u$ gives rise to such and invertible class since a Bézout relation $\gcd(\tilde u,q)=1=s\tilde u+tq$ provides an inverse$~s$ of$~\tilde u$ modulo$~q$. Next for $m=n/q$, so that $\gcd(q,m)=1$, the Chinese remainder theorem says that the congruences $x\equiv\tilde u\pmod q$ and $x\equiv1\pmod m$ admits a common solution, whose image in$~\r{n}$ is invertible (a common solution of similar congruences with $s$ in place of$~\tilde u$ gives an inverse) and provides our lift of$~u$.
Now to show that all fibres of $r:\m{n}\to\m{p}$ have the same number of elements, it suffices to observe that for any fibre $F=r^{-1}(\{u\})$ and any $x\in F$, multiplication by$~x$ provides a bijection $r^{-1}(\{1\})\to F$ (since multiplication by the inverse of $x$ in $\m{n}$ gives the inverse map), so that all fibres have the same number of elements as the fibre $r^{-1}(\{1\})$, QED.
Answer: Hint: Use that if $p$ and $q$ are primes you have
$$ \varphi(p\cdot q) = \varphi(p)\cdot \varphi(q) $$
Answer: You may know that $\phi(pd)=p\phi(d)$ and $\phi(pd)=(p-1)\phi(d)$ if $p\not\mid d$ (where $p$ is a prime).
Comment: can you explain a little more, I still can't see how this can help me prove that statement.

Prove that if $d$ divides $n$ then $φ(d)$ divide $φ(n)$ for $φ$ denotes Euler’s φ-function.


Keyboard shortcut to autocomplete the user in comments

Question: While commenting on posts, when we start typing <code>@</code> and a few characters that match one of the earlier commentators, a suggestion appears above the comment text area. Is there a shortcut to accept that suggestion?
Answer: Yes, the Tab key will cycle through potential targets. You can hit Space to accept. When there are multiple possible targets, you can Tab until the right one has been highlighted in bold:
Answer: Yes. Just press the Tab key.
Comment: @Dennis Tab doesn't auto-complete particularly when there are multiple choices. See my comments on my answer (though AllDani removed his comments demanding I update my answer to match yours).


Apparent existence of a semi-regular polyhedron, but that I cannot find in any table.

Question: I propose the existence of a semi-regular polyhedron with one square, one hexagon and two triangles at each vertex. The sum of angles at reach vertex is $330°$ and therefore the external angle is $30°$, which divides $720°$. That would imply $\frac{720}{30} = 24$ vertices, from which can be easily calculated that there are $48$ sides and $26$ faces ($4$ hexagons, $6$ squares and $16$ triangles). That´s fine, but I cannot see any sign of this supposed polyhedron in lists of the $13$ Archimedean solids, etc. What condition does this polyhedron violate? Why does it not exist?
Comment: Have you tried making one (or part of one)  out of card? Does it seem to fit together?
Comment: I am a bit confused. If you go around a vertex, in what order do the faces appear in your suggested construction?
Comment: In other words, can you draw the planar graph corresponding to your suggestion? I tried and I couldn't make all vertices look the same (remember that semi-regularity requires a group of isometries transitive on the vertices, not just the same unordered collections of faces at each vertex) but, perhaps, I'm misunderstanding your suggestion.
Answer: Did you try to build them?
As mentioned by @fedja in the comment there are 2 possibilities for the (to be used unique) vertex configuration: either 6-3-4-3 or 6-3-3-4 (cyclically each). For sure, in the second case it might be allowed to use the mirror copy as well.
Consider 6-3-4-3 for the first try. So start with one hexagon. Then you have to attach triangles to each side. Into each gap you would have to insert a square. But then the tips of those triangles already would contain a partial configuration 4-3-4, which is not compatible with the assumed configuration.
Now consider the other possibility 6-3-3-4. Then you'd have to start with a hexagon again. Because 6=2*3 and 3 is odd, you would have to attach alternatingly triangles and squares to that hexagon, and will have to insert further triangles inbetween those attached faces. But then again at the tips of the hexagon-attached triangles you'd get a partial configuration 3-3-3, which is not compatible with the assumed configuration.
--- rk


How to unlock phone using ADM application?

Question: I'm using Asus Zenfone and I'm not able to unlock it. I've tried ADM but without success. Utility says that password wont be used when there is a lock pattern. How to use this application?
Answer: here:
https://www.ifixit.com/Guide/Android+Device+Manager+-+Bypass+Screen+Lock+on+any+Android+Device/34600
remotely unlock your phone
Answer: Basing on Google's support site, it doesn't say that the Android Device Manager could be used to unlock a device that's already locked. Remotely ring, lock, or erase a lost device. It mainly depends on what is asked from your phone, usually, it's the PIN code, Passcode, or Pattern lock that was added on your device. If this doesn't work, I suggest Factory Device Reset.


Can't drag button action to existing function in Xcode 8

Question: I have a weird issue with Xcode 8. When I try to ctrl + drag button to existing function, I can't I can only create new outlet or Action. What is more weird, that even when I create action by ctrl + drag i can't connect event the same button that I used for creating action. IB icon is also blank like there is no connection between action and button, but real time clicking runs action.
On the other hand when I try to connect action to button from swift to storyboard I can (@IB icon becomes "full"), but then I get exception on real time clicking unrecognized selector myActionWithSender
Answer: In my Xcode version, IBAction is created automatically with "Any" parameter, instead of "AnyObject". Creating IBAction explicitly with UIButton instead worked for me.
Comment: This was my solution as well.  You can also manually change Any to AnyObject it the existing code and it works as advertised.  Why does Xcode default to Any?  Thanks for this solution!
Answer: In my case, you will need to change Any to UIButton. It need to be specific that the action coming from UIButton.
@IBAction func buttonClicked(_ sender: UIButton) {

}

Answer: Click on the UIButton, then go to "Connections Inspector" from Utilities area.
Click on the empty circle beside the event and drag the line into func body.
Answer: In your .swift file change:
@IBAction func buttonClicked(sender: UIButton) {
    // Do something
}
to
@IBAction func buttonClicked(z sender: UIButton) {
    // Do something
}
Just add that little 'z' (or whatever label you want really). I tried an underscore '_', and that works as well, but it gives a warning, so I just used a 'z' instead to get around the warning.
I believe it's a bug in Xcode 8. Somewhere (IB probably) it's expecting Swift 3 compliant code where the first parameter MUST have a label. So when it sees the word "sender" it assumes (wrongly) that that's the label.  So adding a label ('z' in my case) makes everybody happy.
Swift 2.3 does not require a label. Swift 3 does. So, as Jaroslaw pointed out upgrading from 2.3 to 3.0 will also get around this problem. But if you're project is stuck on 2.3, just adding a label seems to do the trick.
Comment: Strange observance: if I use an underscore '_' I can drag from IB to the function name in code, and it highlights the entire function - and it makes the connection.  However, if I use 'z' or any other alphanumeric label, I cannot drag from IB to the function name.  Weird.
Answer: Change sender from Any to AnyObject works for me
Answer: Even in Swift 3, you'd like to change the @IBAction's argument from (_ sender: Any) to (_ sender: UIButton) or (_ sender: AnyObject), but manually.
It might work.
Answer: In my case, I was had a similar storyboard open. Once I closed it and then
- clicked the button once to see the blocks around it for alignment.
- Then right clicked and dragged it to the ViewController.
- Lastly, click/tap where you want to place the event's code block inside the ViewController.
Answer: Right click with open button function in select touchup inside to drag.
Answer: To fix it, I had to update my project language to Swift 3.0 from Swift 2.3


the time scale of cox regression model

Question: I have a breast cancer database. I applied the Cox PH model to estimate the hazard ratio of covariates and breast cancer risk. When I used age at censor as the time scale and adjusted for age at baseline, I got different effect sizes of the association between the variable of interest and breast cancer risk, compared to the Cox ph model using age at baseline as the time scale without adjusting for any time-related variables. For example, the hazard ratio of height is 1.10(1.02,1.19) V.S. 1.15(1.06,1.23). Which time scale should I stick to? Thanks so much!
Answer: Often it does not make sense to use age at censor as timeline. The timeline often start at inclusion time, then the time run until one observes an event or no event.
I found an introduction to survival analysis here.
The time-scale should always be chosen based on what is most relevant in your study - usually (calendar time, age, or time since a specific event (fx surgery)).
I hope this helps you.

the time scale of cox regression model


Can I raid with only 2 people?

Question: Is it possible to complete any raid bosses in Borderlands 2 with only 2 people? Or are they really that hard? Answers that cover both true vault hunter mode and ultra vault hunter mode would be appreciated!
Comment: @michel don't get bogged down in trying to use language to weasel something out of the on topic box. Please. It's clear what's being asked; the fact that it's phrased as "can I do this" rather than "how do I do this" is a semantic rabbit hole that isn't worth following.
Comment: Hi Jan, i think you're misunderstanding the voting system. If it were any of those things, it would be closed, not down voted. Down voting is for when you think a question doesn't show effort on the part of the asker, isn't generally useful or a 'good question'. For example, just asking 'is X possible?' doesn't attract useful answer (yes, or no are the two options). If you're having difficulty with a strategy for a particular fight, you could ask a more specific question that solicits useful information.
Comment: I don't understand the downvotes. The question is regarding strategies (at a high level), obstacle clearing (raid bosses), game mechanics (are raids possible for two people, or not? e.g., the mechanics of WoW prohibit such behaviors: raids are for 10+ people, and anything less is not likely to succeed by use of intended mechanics).
Comment: Further, it's clearly NOT about pirated games, game identification, opinion-based answers (see above), identification, or too many answers. (And I realize these are just guidelines, but I still think it is appropriate). Admittedly, it could be phrased clearer, e.e. "do the mechanics allow for the possibility of the average pair of players to beat a raid boss?". But I don't think that really conveys anything my question doesn't. 3 down votes seems harsh.
Comment: "I'm trying to clear the raid bosses from Borderlands 2, but only with 2 players. It's possible or they are too hard to do (with only 2)?" - You are not asking HOW... just IF it possible, I think this is the reason behind the down-votes.
Comment: @LessPop_MoreFizz thanks for pointing that out =) will take care next time.
Answer: The "raid bosses" in Borderlands 2 are designed for 4-players, but they can be beaten with fewer.  It takes good players, good teamwork, and careful builds, but it can be done.
If you're just doing it for the achievements, you can always decrease the difficulty by going back to a previous playthrough.  My wife-slash-co-op-partner is not a particularly hardcore player, so the two of us opted to play on TVHM when we were leveled for UVHM.  This didn't make them trivial, but it did make them doable for the two of us.  Our goal was achievements and "having seen all the content" so the lower difficulty didn't bother us.
The Borderlands Wikia gives strategies for various combinations of parties and raid bosses, for instance, here's the strategy page for Terramorphous.  Be prepared to respec and relearn what role you will play.
Sometimes, farming legendary gear will make these fights easier, but they're extremely rare and you're going to spend a lot of time farming them if you need them.  (There was a "Loot Hunt" event recently that made a lot of them more common for a short time, though)
Having specific characters can also be critical - for instance, a Siren with Res.  If you haven't been playing a Siren, you might have a tougher time or you might have to consider power-leveling one for some of these "low party count" tactics to work.
Answer: It is completely possible, my friend and I completed the whole game on every difficulty, every boss, just him and I. It might be difficult at some points, but it is totally possible, just need the right equipment.
Comment: Your welcome, enjoy the game! Make sure to farm for some good equipment too. Get a good sandhawk if you have the scarlet's booty dlc too, its good with the bee shield
Answer: From what I have read, it definitely seems possible, yet very difficult.  Raid bosses are meant for 4 players, so it would seem logical to do so, but I should assume you only have 1 or 2 friends who play Borderlands 2, like myself. I have also read that there are a few places to hide and shoot where you will be generally safe. My suggestion? Farm for legendary equipment, like The Bee (Available from Hunter Hellquist) And the Infinity Pistol (Available from Doc. Mercy) There are more legendary equipment that can help, so you should be able to have a pretty good selection.
Comment: The bee and infinity pistol combo is basically worthless since they fixed a glitch giving the infinity pistol more than one bullet a shot. We like experience too, I played this game with just one friend the whole time, all dlc and modes we beat everything. Sure we may have exploited a few things, but who doesn't? :) Oh and your gonna want to get the light blue weapons.....dpn't remember what they are called, but they are above legendary status.
Comment: pearlesants are what they are called....and you want them...trust me

Can I raid with only 2 people?


Kitchen Faucet Cap

Question: Trying to replace a Moen kitchen faucet cartridge on a single lever faucet. The cap which is supposed to be pried off with a screwdriver seems to be frozen. I don't want to scratch it is oil rubbed bronze. Any suggestions?
Comment: Vinegar mighty loosen Ca deposits.
Answer: Moen will send free replacements for any damaged part or part that needs to be replaced to keep your faucet working right, including the cap and cartridge. I damaged the cap on mine while trying to remove it and they sent me a free one. It might help to have them send you a parts list and exploded diagram before you go prying on it.

Kitchen Faucet Cap


Google showing static title instead of dynamically set javascript title

Question: Let's say I have set my title using HTML to "Something - Example" and with Javascript I change the title to "Apple - Example".
When I google my website (after waiting for it to update) or the link gets embedded on websites like Twitter or Discord, it shows the static "Something - Example" title instead of the new title.
Comment: Twitter and discord are not going to be able to show your JS set title.   Their bots that fetch pages for preview purposes don't execute JS.  Googlebot should be able to understand the JS.   How long has been since you updated your title?
Comment: The page that has waited the longest has waited for about a week now without updates.
Answer: A week can be too early for Google to process/render JavaScript and index the final content. (There is no time guarantee from Google on this. Realistically, the JS processing and rendering can take days to weeks.)
https://developers.google.com/search/docs/guides/javascript-seo-basics#how-googlebot-processes-javascript

At first, Google indexes the HTML that is not modified by JS. You can call it the first phase.
Later, based on resource availability, Google processes (executes) JavaScript in the render queue. Then it indexes the final content. You can call it the second phase.
I think in your case, Google may not have completed the second phase.
Comment: I've seen reports that the second stage of rendering and then indexing the result of that render can take up to 2 months in some cases.


How to prevent the user from going to the apps and continue with browser

Question: In my mobile site I have links to other websites that also have apps. when my users click on the links they get options in Android (I don't know about iPhone) to go to the app or continue with the browser. How do I prevent the user from going to the apps and just cntinue with the browser after clicking my links without seeing this menu (browser/app)?
Answer: What you're asking is how to prevent the expected behavior of a webpage you load in your app.  That's generally not good UI/UX design.  But, to do so you would need to set a WebViewClient on your WebView and evaluate the url that is being loaded to see if it is for the download of an app:
<code>    webView.setWebViewClient(new WebViewClient(){

        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url){

            if (url.contains("play.google.com")) {
                //handle alternate action here
            }

        }

        @Override
        public void onPageFinished(WebView view, String url){

        }

        @Override
        public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {

        }

    });
</code>
Comment: Thanks for the answer but I have a mobile site in PhP and not an app. Is there also a way?
Comment: Sorry no there's not
Answer: That's something that's been set up on the 3rd party site, not something that's being done by the OS. There's no way to control the behavior of the browser after the user has left your web site.
For example LinkedIn will do this but Last Pass does not, even though they also have an app. This is something LinkedIn has chosen to do with their site; you can't do anything about that from your web site.


Should there be a "word" tag?

Question: We currently have a very frequently-used phrase tag, presumably used whenever the question is asking about anything regarding a phrase in English or Spanish. Should there be an analogous word tag for questions about a single word? If not, should the phrase tag even exist?
Answer: Probably not. The English site doesn't have a word tag, or at least tries not to [1] [2].
Generally speaking, I recommend following the tag structure of the English Language & Usage Stack Exchange. It's already gone through most of the issues, and I think it's done a good job with a difficult subject matter.
On French Language & Usage, we've largely followed EL&U's tagging practices from the start, and haven't regretted it. Of course, there will be minor differences, for example having to do with grammatical constructs that don't exist in the other language, or having [american-english] on one and [quebec] on the other.
Comment: There are some bad tags which seem to have crystallized on EL&U and got stuck there. I think "single word requests" is particularly bad since it is often misused for requests which are not single words and fractured into not so useful sibling tags like "phrase requests" and I don't think either truly "characterises" their questions which are all about finding the right way to say something you can provide an explanation for but can't think of a good word or phrase. Not hard to come up with a good tag that covers it all though!
Answer: It strikes me that both phrase and word are worthless tags, since every question on this site will be about words or phrases.  Which questions would not use the word tag?
Now, there's a word-choice tag, which I think makes sense.
I propose that word and phrase should be done away with.
Comment: Note that "phrase" is useful because it doesn't just mean "sentence". Actually it doesn't mean "sentence" at all (as you know because you're an English speaker). :D
Comment: @Joze: Wouldn't **translation** work better for the first class of question, and **grammar** or **syntax** for the second?
Comment: "word choice" is good for now but soon enough we will have questions about choosing between to short phrases or a word vs a short phrase. So at some point it might be a good idea to change it to just "choices" or "choosing".
Comment: I agree with deleting word but not phrase... phrase is different than sentence and than statement as well...
Comment: @Joze: When would you use a *phrase* tag, though?
Comment: @Flimzy: hmmmm I think I would use it for phrase transition questions into another phrase like connectors and those kinds of things. Or on phrase structure.
Comment: @Flimzy: You have a point there mister. You're right, phrase should die too. :-)
Answer: Tags are created automatically when you tag your question with a tag that doesn't exist. If that tag is used, it will survive. If not, it will disappear by itself. So, since you can create them, try to use this feature wisely. Always prefer existing tags when they exist.
That said, there are many more words than phrases, so this last one defines something more specific than the former tag would... But I'd like to ask you a question, so you see it for yourself if the tags is needed: what questions could/would use the tag words?
Comment: Well, many questions are asking about a specific phrase, and they're tagged *phrase*. Many other questions are asking about a specific word, and I was wondering what people thought about tagging them *word*. I'm not arguing either way, just thinking it should be consistent whatever we end up doing.
Comment: You make a good point, but "words" sounds too general. I mean, almost any question would get that tag... I think that *maybe* there was a similar issue on EL&U, but I'm not sure... :/
Comment: @Alenanno ["Word" tag -- useful?](http://meta.english.stackexchange.com/q/140) [Blacklist the \[words\] tag](http://meta.english.stackexchange.com/q/1053)
Comment: There are some blog posts or podcasts talking about what makes a tag a good tag in the way the Stack Exchange people want them to be. They always use that each tag must be able to **characterize** the question and should be usable on its own and still be good. This means that popularity of a tag is not the only concern. Yes tags can grow wildly but it is better to cultivate them.
Comment: @hippietrail if you're the one who "disagreed" with me, then I don't understand your point, since I basically agree with what the others said.

Should there be a "word" tag?


How to customize fonts with redactor font menu

Question: In Redactor it is easy to enable the font-family plugin via your redactor config, which gives us a menu in the wysiwyg shown below

Is there a way to customize what font options show up here? I couldn't find any documentation about it.
Answer: It's undocumented (like all Redactor plugins), but you can configure the list of fonts used in the JSON config you assign the Redactor field in the settings. You can download the original fontfamily plugin here (the one that comes with the Craft Redactor plugin is minified). Checking the source code, you can see that it looks for a fontfamily option and falls back to the default list you see in the editor if it doesn't exist:
this.opts = app.opts;

this.fonts = (this.opts.fontfamily) ? this.opts.fontfamily : ['Arial', 'Helvetica', 'Georgia', 'Times New Roman', 'Monospace'];

If you add the fontfamily option to your Redactor config, the plugin uses it :
{
    "plugins": [
        "fontfamily"
    ],
    "fontfamily": ["Arial", "Roboto"]
}

See the documentation on Redactor configs.
Keep in mind that the plugin does not include the fonts themselves (the default fonts are mostly web-save, except maybe for Helvetica). So if you want to use a custom webfont that some user might not have installed on their machine, you'll have to include the font-family definition and source files yourself. Make sure you include the font definition in both the frontend and the backend, so that your editor can see how the text will look with that font in the backend.
You can register CSS in the backend using a simple module through Craft::$app->view. See Registering CSS in the Yii2 documentation.
Comment: @AugustineCalvino Yeah, redactor is a mess … the plugins in particular are pretty half-assed. Control Panel CSS works fine, though I try to avoid it now – the function is so small that it can be integrated in a couple lines of code through a module, not worth it adding a plugin to the site that has to be updated and maintained.
Comment: Glad to know it's not just me that finds the redactor documentation somewhat lacking. I used [Control Panel CSS](https://plugins.craftcms.com/cp-css) to register css since it makes it so easy.
Answer: @MoritzLost has the answer to my question, but I also found a workaround that I thought would be worth sharing.
Using a plugin like Redactor Custom Styles allows to you add configs of the form below to add custom elements, attributes, etc.
    "textColor": {
      "dropdown": {
        "red": {
          "args": {
            "tag": "span",
            "class": "color-red",
            "type": "toggle"
          }
        },
        "green": {
          "args": {
            "tag": "span",
            "class": "color-green",
            "type": "toggle"
          }
        }
      }
    },

Using this you can add a span with a given style, or with a given class which then applies your font face (or any other styles) via your css files.
The Advantages to this approach, and why in my case I will probably still use it over the answer above, are

I can specify fallback fonts for each option, rather than just a single font per option
I can use css custom properties (variables) to define what font I am using, which happens to be necessary for my case. See below snippet.

font-primary {
    font-family: var(--font-primary);
}


2017 BMW Alignment problems

Question: 2017 BMW X1 - front tire blew out and when inspected the mechanic advised a special shim was needed to set the right front camber setting . BMW dealership did not know what I was talking about when I called them. Any ideas ?
Comment: Welcome to Motor Vehicle Maintenance & Repair!
Answer: The Camber Angle is the angle between the vertical axis of the wheel and the vertical axis of the vehicle - how much the wheel tilts in or out. On many cars it's quite common for it to be adjusted by adding or removing shims from behind the suspension arm mountings, however a hunt round Google suggests that on some modern BMWs it's adjusted using slotted nuts at the top of the strut.
The BMW dealership ought to know how to adjust it, whichever method is used!
Comment: Why would you have to adjust the camber setting on a fairly new and completely stock car? I'm not surprised that the dealer does not know anything about such modifications.
Comment: @MadMarky damage from a pothole causing misalignment? Incorrectly set from the factory (it's not unknown...)?

2017 BMW Alignment problems


How can I have my Google Assistant and Home devices play an MP3 in response to voice command?

Question: I want to have my Google Assistant and Home devices (and Mini) respond to a voice command by playing an MP3 file. How can I do this?
Comment: What's your goal, they'll react to properly used audio stimulation....
Answer: Google  Assistant's Actions can return a subset of SSML, part of which allows you to instruct the device to play an audio file such as an MP3. An example is given of the SSML to use in the Actions on Google documentation; I've adapted it below for reference:
<code><speak>
  Here is an MP3 file.
  <audio src="https://www.example.com/MY_MP3_FILE.mp3">didn't get your MP3 audio file</audio>.
</speak>
</code>
This requires you to be developing an Action — the entire process is a little more complex than that, and more detailed information is available directly from Google. If you aren't interested in that, and just want a simple home solution, read on.

You could alternatively upload your MP3 to Google Play Music, then use a shortcut to map whatever phrase you want to "Play [file name] from my library".
Shortcuts can be configured from the Google Home app, as follows:

Menu > More Settings > Shortcuts > Add
Under 'When I say Ok Google', enter your desired phrase
Under 'Google Assistant should do', type 'Play [file name] from my library' after uploading your file to Google Play Music. It's possible that you might need a paid subscription to do this; try it first and see.
Save your shortcut, and give it a try.


What's the best way to find the CMYK and RGB of a HTML color?

Question: I found some colors on the web that I'd like to use in my print brochure. What's the best way to find the CMYK equivalent of a HTML color?
Comment: What's the purpose? Do you just want "something close" or are you concerned about an *exact* color? HTML (or Hex) **is** RGB.
Comment: Color conversion is not that straightforward. There is a *physical* difference between RGB (light) and CMYK (ink), which makes it impossible to convert some colors.
Comment: I like to use the ColorPicker Plugin for Chrome to get colors of a website. You can also inspect the html and get the hex color that way. If you want a RGB value from a Hex you can use http://hex.colorrrs.com/. There are also other generators for rgb or hex to cmyk
Comment: I'm starting a branding guide for my company so I want to provide the color in CMYK, RGB and HEX
Comment: 'starting a branding guide for my company' - your best option if you are in at the start is to choose brand colours that are close across RGB, CMYK and Pantone (for spot printing) rather than randomly choosing colours. I have a Pantone swatch set for this and its been reliable over the years. I generally start with CMYK so that I can control the print consistency and cost without difficult Pantone's like Reflex Blue. Starting at the website is troublesome - its RGB for screen and a wider gamut than print (simple terms - some RGB colours don't convert - bright orange an example).
Answer: Your best option is probably to talk to your printer and borrow their CMYK or spot colour Pantone® book. There's just no quick or reliable way to convert a colour you see on screen to a CMYK or spot colour.
The Pentone books are pretty expensive, so borrowing is a good idea (or visit your printer, if you can).

Pantone Coated & Uncoated

If you can't do that, then another option is to find something (anything, really) that matches the colour you like, and ask the printer to do their best to match it.
And, if you can't do that… there are some obvious choices for strong Pantone / CMYK colours, if you want bright red, bright sky blue etc.
This may help:

Pantone Color Finder
Comment: This is the correct answer. The 'best' way is to use one's eyes.
Comment: If you are handling print on a regular basis, a Pantone set is essential... not a luxury. Would you borrow tools if employed as a mechanic? No of course not, you will build up your own set. A Pantone set includes several options including a swatch set that is a CMYK to RGB to Pantone comparison. I use it on every new brand to give me a decent chance of a closer match - screen, litho print and spot colour for signage and vinyl graphics.
Answer: Since I can't comment yet, I'll put this in an answer.
I usually use this site: Encycolorpedia
Just paste in the HEX-code and they'll give you more info on the color than you'd ever want or need.
Be aware though that color conversion isn't always straightforward, as has been said before.


integrate html, css code into a drupal theme

Question: My client has hired a vendor to create html, css, javascript for a website and we are planning to use Drupal as CMS for this website. I'm one of the front end devs involved in choosing a base theme for this site and our team is fairly new to Drupal. How do we integrate this vendor provided html,css code into a drupal theme? What are the things we need to know before integrating the code? How do we start with integrating this code into Drupal? How do we select a theme that would work with the vendor provided code? What are the things we need to look for ?
Comment: If you're new to Drupal and you must create a theme for your vendor, then you should read about theming. See https://drupal.org/documentation/theme. Asking "how to do look and feel" becomes asking "how to theme" in Drupal, and it is like asking how to do an SQL SELECT statement: before asking about here you should read about the core knowledge first, to avoid too-broad questions
Answer: Read about theming to create your own theme. If what you need is just to append files and folders to your drupal theme without altering it, you must create your own module for your application functions (if you have any), and add your script or styles files with calls to:
<code>drupal_add_js(drupal_get_path('module', 'yourmodulefolder').'/path/to/your/js/file')
drupal_add_css(drupal_get_path('module', 'yourmodulefolder').'/path/to/your/css/file')
</code>
See Adding CSS files and Adding JS files here for more information. The use cases I gave you are for files (assuming the files are inside your module).
You can add these calls in any hook in your module (I take the dirty way: I put this kind of lines in the global scope, althought it's not the better solution, it doesn't break what I'm doing).


Do the Separatist leaders know that Dooku was a Sith?

Question: Aside from General Griveous, in whom Tyranus trained, did the Separatist Leaders, specifically Viceroy Nute Gunray, Rune Haako, Poggle the Lesser, Wat Tambor, San Hill, Passel Argente, Shu Mai, Senator Po Nudo, and Senator Tikkes, know that Dooku was a Sith?
Comment: They thought he was merely the Count of Serenno and left the jedi order afaik, they may have known he was a Force user but more than that I don't think so. In fact, the general population of the Galaxy don't know the Sith exist or what they are.
Comment: I think poggle the lesser know that Dooku is a Sith
Comment: Why do you think that? Like I said, the Galaxy at large knows little of the Jedi and nothing of the Sith.
Comment: Because when dooku takes the death star from poggle the lesser,  he mentioned master. And that master is Darth sidious.
Comment: A blacksmith has a master, that doesn't make him a sith lord. He can report to a superior without knowing they are sith.
Comment: Nute Gunray knew that Darth Sidious was a Sith, didn't he?  It seems a reasonable guess that he also knew Dooku as Darth Tyranus, to ensure that he wouldn't question Dooku's authority over him, but I don't know whether there's any *direct* evidence in canon.
Answer:     They probably put two and two together. People killed on Mustafar by Vader were in contact with Lord Sidious since Episode 1. He explicitly mentioned Sith to them when he introduced Dath Maul as his apprentice ("Not for a Sith"). They were not total imbeciles, so they probably spent some time researching history and figuring what Sith were (1000 years is not that long even on Earth, we have lots of books about Romans for example) . Also, Sidious constantly mentions his apprentices (" I am sending you my new apprentice, Darth Vader. He will... take care of you.") . If Darth Vader was new apprentice, they must have known that old one existed. Was Dooku introduced as apprentice is unclear, but they knew he had Force powers (ex-Jedi master), and he also obeyed Sidious, therefore conclusion is clear from that. One thing that they probably didn't know is Dooku's Sith name (Darth Tyranus).


What are advantages and disadvantages of low/high difficulty?

Question: What are advantages and disadvantages of low difficulty? What would happen, if it were low? and high! Can you give me some examples and tell me why ethereum developers picked 17,179,869,184 for difficulty?
Answer: The difficulty of the ethereum puzzle was not picked by the developers. It is automatically adjusted by the protocol in order to keep the time between blocks in a certain time interval.
If the hashrate of the network grows because more miners join and the dificulty is constant, then the puzzle will be solved faster and the block time would decrease. In order to maintain the time between blocks, the difficulty is raised. The opposite happens when the network hashrate decreases.
The reason why the time between blocks was chosen at its value,somewhere between 10 and 19 seconds, was to make sure all transactions are propagated properly and to reduce the number of orphan blocks.


How can I switch to sa account from guest session in SQL server 2012?

Question: I have a situation where I can log into my server as guest, and see that there is no password on the sa account.  However when I try to login as sa with null password over the network it is rejected.
My question is, since there is no sa password, how can I do the equivalent of a unix sudo or su command, while logged in as guest?  I looked into runas and changing passwords but guest lacks the very privilege I am trying to gain.  ('alter login sa..' doesn't work.)
Also, why does the server refuses login when there is no sa password?
This is SQL Server 2012 SP1 Web edition 64-bit 11.0.3153.0.
For example, there is a command in MySQL called change_user. This command can be used as the name suggests to change a user during a MySQL session. There may be a way to do this in SQL Server but I am not a SQL Server expert so I seek more experienced input.
Answer: When signed in under the guest account, you have very few privileges by default. The sa password is displayed as blank because you do not have the necessary rights to view it. Disabling the guest account is a security best practice, where it is not required.
The real sa password is almost certainly not blank. SQL Server does not allow a blank sa password since the 2005 release.
SQL Server does provide a way to impersonate another login or user (assuming you have sufficient rights). See EXECUTE AS (Transact-SQL) for details.
Note that SETUSER is deprecated, provided only for backward compatibility, and has inferior functionality.
Answer: You are basically asking if there is a way to do an escalation of privileges without proper authorization. The answer is obviously NO, there is not.
If you need to gain administrative access to an instance on which local administrators are locked out follow the procedure described in Connect to SQL Server When System Administrators Are Locked Out. As a local administrator you can then grant all necessary privileges to the authorized users.


download Ubuntu for Vmware

Question: I am willing to download Ubuntu for VMware..I'm much confused among Ubuntu Server and Ubuntu desktop,which one should i go for? and what is the differnce between them?
Comment: you can install any one as your choice both will works.But ubuntu server not preloded with GUI desktop.So my recommendation for you is Ubuntu Desktop.
Comment: which one is better among them for installing in VMware
Answer: There's one version of the Ubuntu Server, and it does not include any GUI, so if you're comfortable with the Linux CLI (Command Line Interface), it will run faster, and gove you the opportunity to add many services during installation.
You can also use official versions of Ubuntu, described at Wikipedia's Ubuntu page with a GUI: Edubuntu, Kubuntu, Xubuntu, Lubuntu, Ubuntu (Unity) and Ubuntu GNOME. These and other versions are linked from the Ubuntu official releases page.  Although these will not prompt you for services during installation, you can add them later through apt-get, the Synaptic Package Manager or the Ubuntu Software Center.

download Ubuntu for Vmware


How do i write an applescript application from terminal?

Question: I want to write an applescript application from terminal. So far I have been able to write an .scpt file but that is not enough. I need to convert it to an applescript application that can then be opened and run. I know how to do this using the GUI but for various reasons I need to do it from terminal. Any ideas on any way to do this?
Comment: RTM- `osacompile`. `apropos` can be your best friend.
Comment: Can you explain how to use those things?
Answer: To make apple scripts executable from terminal, you may define osascript in shebang, for example:
#!/usr/bin/env osascript
say "Hello World!"

Make it executable, and just run it:
./AppleScriptTest.applescript


Real Snow addon crashing blender

Question: im trying to apply snow to an object in my scene and every single time it crashes. i have a pretty good pc and i know for a fact that specs arent the problem because it worked just find in a fresh blend file. i also made a copy and deleted everything but the object and it still diddnt work. i have tried it on 3 different computers and they all crashed
blend file
Answer: Putting everything in a new collection and appending it to a new blend file worked

Real Snow addon crashing blender


Pulling filament through long tubes

Question: I'm setting up my printer in a small room, and I thought I'd come up with a system for more easily swapping filaments, but I'm not yet sure it is feasible.
Rather than physically replace the spool, I'd like to hang most of my spools on the wall, where they can rotate, and only swap filament leads in the (direct drive) extruder. The spools would be placed at some distance from the extruder, and at various angles. So to make sure the filament is pulled from the spool at the proper angle, and to avoid breaking it, I think it should probably run through a flexible tube to reach the printer.
I know such tubes are used for Bowden style extruders, but what I'm proposing is different in at least two ways: [1] the extruder motor would be pulling (not pushing) filament through the tube and [2] the tube would be longer than normal, e.g., between 1 and 2 meters.
Is this plan feasible? Or are the problems I am not foreseeing?

Edit 1: I don't know where I got 1-2 meters from. The distance is actually closer to 50cm.
Edit 2: To clarify my proposed setup, here's a crude mockup:
Comment: Fantastic approach and I really like the possibilities that this idea creates. My questions: How would the printer know to swap filaments, and which filaments to swap? (potentially written into the G-Code?) How will the printer swap the filament? In answer to the second question, I am envisioning some type of cutter which then melts (fuses) the second filament to the first, but how can this be accomplished in a uniform fashion? Anyways, I think this is a fantastic idea, I'll be watching this thread closely! Contact me if I can help in any way.
Comment: @J.Roibal: Your interpretation is a bit more ambitious than my actual idea. :-) I was still thinking of swapping filaments manually, just minimizing the time and effort required. This would certainly help you to hot-swap filaments during a print, but I currently have no plans to fully automate this. --- I know about [another recent project](http://www.mosaicmanufacturing.com) you may be interested in. But it's a bit more pricey than what I have in mind.
Comment: my heavens, mhelvens! I can totally see how this could become automated, removing the necessity of dual-extruder 3-d printers while adding the capability to print in dozens of colors and types of materials, automatically.
Comment: @J.Roibal: Sure. I can see that too. And I may automate the process in the future. But it would be a hobby project, as this is, and I would not achieve the precision required for multi-color prints. Developing that technology would be a full-time effort, because it is more complicated than you might think. --- Anyway, as I hinted in my previous comment, the technology you want does already exist. Have a look at the [Palette](http://www.mosaicmanufacturing.com). I wish I could afford one.
Comment: @J.Roibal: The Palette splices multiple filaments into a single stream, as you suggest. The problem is that colors mix together in the hot-end. To get crisp color-swaps, they build a 'transition tower' on the side of the main print, to purge the mixed plastic. --- The solution we're talking about here would work differently. For every swap, it would retract the current filament, and start extruding another. This would probably evolve into multiple Bowden extruders feeding the same hot-end, and might not produce as much waste. Sounds like a fun project. But I do have a day job. ;-)
Comment: Interesting idea. Sadly you are overthinking it.

At the hackerspace we have plenty of setups like this, but we do not bother with tubes. Just hang it and go :-)
Comment: @StarWind: Could you link me to some examples, perhaps? With pictures / descriptions?
Comment: Yeah so it is the guys who make the Flexon extruder.. here is their site with photos
http://diabasepe.com/
Answer: I would say it's not the best approach.
In the situation you've described I would rather install some kind of vertical ring a bit above your printer. This ring would organize your filament going from any direction.
So let's assume you got one spool on the right and one on the left of your printer, both are 1m away from the printer itself. If you get filament and put throught the ring then to your extruder.
In my opinion the ring should be around 15..20cm over the printer, it should have around 10..15cm diameter and spools should not be too low.
The only issue I see is unwinding spools which are too far from the printer because then filament would be unwinded angular but the same issue would be with and without teflon tube.
[edit]
Here is a simple change of your design

[edit2]
Please also note that you can assure proper angle of unwinding filament by installing small rings ("eyes") next to spools. These eyes will direct filament out of spool and then filament will turn to your big ring mounted on the printer. This is common solution in textile industry
Comment: Thanx Tormod. Acording to my experience - tube longer than 1m is not a good idea. #1 it's harder to pull/push filament. #2 such long/heavy tube has influence on movement of the caret. #3 it's uncomfortable to install/uninstall filament
Comment: I absolutely agree, Darth! :-)
Comment: I'm not sure I understand your proposed setup with the ring. Would it be too much trouble to ask for a quick mockup image (like the one I added to the question)?
Comment: And the issue of pulling filament at an angle (and expecting the spool to keep up) is the reason I'm suggesting tubes. If the filament angle is properly guided at the source, I don't see that as a problem. Thoughts?
Comment: @mhelvens please take a look on my post (edit). Please also note that rings can be used on both sides of the design (Thanx Tormod). You can apply little "eye" next to the spool which will assure the filament is unwinded at proper angle, then there could be a loooong way to the ring proposed by me :) (of course on that way there could be even more rings which will direct filament properly)... assuming you are pulling, which you do
Answer: This is somewhat similar to a question I asked a while back. Pay attention to Ryan Carlyle's response in the question I posted. His post essentially explains various ways that guide tubes may hinder extrusion due to drag. In regards to the length of your guide tubes, ensure that the tube is relatively straight.
If you are holding the filament above the machine, chances are that you wont really need the tubes anyways and the distance between the spool and the extruder won't matter either. The point of tube is to ensure the filament doesn't bind coming from the back of the machine, thus potentially clogging your extruder.
Update
Based on the OP's drawing, I think it would benefit to change the design to drop the tubes all together. The tubes can provide many point of contact and managing so many lines at once may become problematic. So, possibly drop the tubes and intend on not drawing your filament unless they are fed into the extruder. You could install smaller ends of tubes at either end of assembly (one at the storage rack, the other above the extruder) to ensure the filament is being fed/pulled straight. The space between the storage rack and the machine doesn't matter. Here's a basic edit of your design that might be easier to manage. For kicks, here's a design I made for my own machine as a "quick-change" design.
Comment: Even if the spools hang above the printer (which is the plan), I feel like things might go wrong if the extruder tries to pull filament from the spool at an awkward angle. Anyway, the answer you're referring to is useful. Thanks!
Comment: Thank you for uploading your sketch, it helped understand more of what you're trying to achieve! +1
Answer: I would like to add to the already great discussion, that this general approach is prone to filament degradation by water intake. That is, if you are using filament for which this is an issue (PLA as the most prominent example).
Also, your goal is to exchange more quickly, that is without (un-)mounting whole spools each time. Basically you want to have a multi-filament spool holder, if I understand correctly. If you design an enclosed box with a single outlet you could incorporate silica gel inside and a reduced effort to swap the filament. I would still avoid a nice free-hanging spool solution due to the degradation issue.
Comment: A good point! An enclosed box would definitely be a good move. This also seems to be an argument in favor of tubes all the way, rather than short filament guides on both ends. --- I don't understand your "box with a single outlet" plan, though. I don't see the point, and it would probably complicate filament swapping, because I'd have to open up the spool enclosure to feed a new strand through the tube. Right now I'm still inclined to run a bunch of separate tubes to slightly above the extruder, like in my mockup image.
Comment: Yes, if you can get the tubes somewhat airtight or don't use the first part of the filament each time you swap, your idea works better. Why wouldn't you want the whole box very close to the printer so that you wouldn't need the individual tubes altogether? Having 5 tubes being moved by the carriage is additional load to the motor that doesn't benefit the print itself.
Comment: The placement of the spools is purely a matter of constraints in the printer-room. It turns out the spools would have to be at a distance of about 50cm. --- Moreover, as J. Roibal has suggested in a comment, it may be fun to try to fully automate filament swapping some day. I'd definitely need individual tubes for that. Would multiple tubes really add significantly to the load? I'll have to experiment.
Comment: The load may depend on how the tubes are directed to the printer. I had a problem when building a repstrap, - as soon as the bowden tube was attached, the motor wouldn't move anymore. Truth be told, it was a tiny cd laser carriage drive motor, but but it moved flawlessly without the tube. You can easily find out how much you have to increase the current at the border to losing steps. I would guess that it doesn't influence your printer too much (watch ghosting), but if it can be easily avoided, why shouldn't one think about it when designing ;) Fully automated sounds like real fun ;)
Answer: Yes, this is feasible. You should constrain the tube at both ends, this prevents the spool from pulling up on the extruder. This approach is known as reverse bowden setup.
Comment: What do you mean by 'constrain the tube at both ends'? Are you simply suggesting that neither end should hang loose? Please have a quick look at the image I added to the question, to see if it matches your meaning.
Comment: Yes, this matches what I mean. Without the tube, the force required to get the spools to unwind is transferred to the extruder (possibly moving it around and decreasing print quality). With the tube in place, that force is instead applied to the mount of the tube.
Answer: This shouldn't be too much of an issue, as long as:

You guide the filament properly to avoid breakage (at both ends as Tom mentions)
You avoid too much friction between the pulling extruder motor and the spool itself.

You mention that you consider using a 1-2 meter teflon tube to guide the filament. Although this might work, long teflon tubes will increase the friction from pulling the filament. Furthermore, I really doubt having such a long tube will be beneficial at all; quite on the contrary, I think it could be rather impractical. Most likely, having simple guides at both ends (whether its tube stubs or rings) will suffice.
Comment: @TormodHaugene Actually, tube v.s. rings makes a difference. A tube has the advantage I mentioned in my answer, rings don't.
Comment: Aha. Guides at both ends, rather than a tube all the way. I can see the sense in that. Now that I think about it, other answers (like darth pixel's) may also have hinted at this.
Comment: @mhelvens, I believe that both Tom and Darth hinted at this. Whether it's a tube or rings probably doesn't really matter that much. :-)
Answer: Your idea is actually good, but i would add some edits to it. First of all, to keep your equipment clean, you would like to add little foam rubbers to clean the filament at the entrance of the tubes, to clean out the dust that will be accumulating over the rolls.
Another thing that i would recommend is to hang the tubes on a separate support for them and not on the extruder head, as it would add some additional friction to it and can cause the 3d model with additional friction making it distorted.
Comment: @DanBoyko: I'd be interested to see you finish that last sentence. :-)
Comment: Can you discuss your improvements further? I am interested in the maintenance portion of your answer, in particular.
Comment: i am really sorry, don't know why it cut the answer, i was about to say that i would damage the 3d model with additional friction making it distorted

Pulling filament through long tubes


How well can woodwind instruments leap large intervals?

Question: I've composed this passage:

I'm concerned about it due to the large leaps in three of the four instruments. I have tried to find some information online about leaps and woodwind instruments, but found mostly nothing. Are these passages playable by a decent flutist/clarinetist/oboist?
Comment: You might add that nearly all of the leaps are octaves. Since at least some winds have octave keys, that may affect the answer.
Comment: @nuggethead The clarinet part is obviously in concert pitch, but that makes no difference to the playability.
Comment: Exactly, sax for instance have octave keys, so it would be trivial to play it. For the ones without, it is not an extreme leap either but it's true than you have to change fingering, which is partly what playing a woodwind is about ;)
Comment: Please indicate whether the clarinet parts appear in concert pitch or transposed
Comment: @Tom the octave key is near-irrelevant.  Especially on leaps down,  breath control and embouchure are critical to maintaining clear tone.
Answer: In fact woodwinds are particularly good at doing jumps very quickly because on a woodwind essentially all your fingers stay at the same place. This means that theoretically to get from one note to a different one the only thing you need to do is to open or close the correct fingers.
Woodwinds allow you to play overtones by overblowing them, special holes or keys or special fingerings. Most instrument to have a key to facilitate overblowing once, which gives the instrument a base range where it is very flexible. Especially when the jump is done simply by pressing this key it is very easy to do.
But keep in mind that not all woodwinds behave the same. Open flutes and conical reeds (e.g. oboe) will overblow into the second harmonic, while cylindrical reeds (e.g. clarinet) and closed flutes will overblow into the 3rd one. So on some instruments you get an octave, on others an octave plus a fifth.
Also you should be aware that fingering systems for reeds are really straightforward for diatonics, but they get more complicated when you get chromatic. This means that some chromatic intervals are awkward to play!
Lastly you should keep in mind that woodwinds tend to be a bit worse for response in their lowest notes as well as in really high notes. Doing fast jumps in these ranges can be a bit challenging.
That being said, unless your example is to be played in an insane prestissimo this is not at all fast, and will be playable with no problems even by amateur musicians. But please keep in mind that woodwinds will show significant tonal differences between the registers, which affects how the instruments mix and project.
Answer: These leaps should be okay. Mozart, for example, in his concerti for flute, oboe, and clarinet, respectively, routinely included leaps of two octaves.
Some woodwind leap examples from Mozart
Flute
Flute Concerto, K313, Mvmt 3, mm. 155 – 59

Flute concerto, K313, Mvmt 3, m. 246.

(Image source: IMSLP, Flute solo, ed. Paul Sarcich)
Oboe
Oboe Concerto, K.Anh.C 14.06, mvmt 1, mm. 140 – 42

(Image source: ISMLP, Oboe solo, arr. L. Gärtner)
Clarinet
Clarinet concerto, K. 622, mvmt 3, mm. 314 – 18

(Image source: IMSLP, Clarinet solo, ed. Notenschreiber)
Comment: @guidot None of those examples are particularly hard to play as far as I can tell.
Comment: I find the examples unconvincing. That a (likely: professional) soloist manages the admittedly more demanding passages, gives little clues about decent player level  on the examples.
Comment: @Nobody: I agree, from what I know those intervals look fine.  But in general, it's not good to use examples from solo parts as a guide for what's reasonable in ensemble writing.  Examples from ensemble writing would be much more useful here.
Comment: @PLL Why would ensemble vs. solo writing make a difference? The question is just about the presence of leaps, not orchestration. Please elaborate.
Comment: @It'sHEDLEY: The question asks "Are these playable by a decent player?"  "Playable" is a very context-dependent standard: concerto solos often include technically challenging material which requires a lot of intensive work and practice, and is only "playable" given that extra work.  For a solo part, or a particularly prominent section in an ensemble piece, it's reasonable to expect that extra effort, and assume it in judging "playability"; for meat-and-potatoes ensemble parts like what the OP pictures, it isn't.
Comment: @It'sHEDLEY I would agree with PLL and guidot, to avoid using solo repertoire as a reference to playability in ensemble writing. Any soloist of an instrument would likely be at a much higher level at their instrument than orchestral musicians of the same instrument. Because of that, their parts are often far more difficult than an orchestral part of the same instrument, purely for the sake of showing off the soloist's virtuosity in a concerto or solo piece.
Answer: As the other answers suggest, these notes are playable.  The bigger consideration is Orchestration.  The flute does not project in its lowest octave.  I suggest writing bars 35 and 36 an octave higher, and also reconsidering the final low E.  The flautist will grumble - rightly so - about playing a note that no one will hear.
Comment: In this passage, the violins have the melody (and a countermelody), and the woodwind passage is just outlining the bassline and filling out the harmony(The bassoon is playing a variant of the bassline with pizzicato cellos). I know you flautists hate it when you don't have the melody, I'm just evil like that :)
Comment: Tell that to your principal flautist and earn yourself a black eye. :)
Comment: I agree, though those notes anyway look more like a sort of _echo_ that might not actually be necessary to hear.
Comment: * not actually a flautist, for the record
Answer: An octave is not a large leap for woodwinds. This passage is easily playable, even at a fast tempo.
Even if the leaps were two octaves it would only be difficult at a fast tempo.
Now this is difficult (from Carl Baermann's "Complete Method for Clarinet"):
Comment: @ToddWilcox Yes, tongued leaps are generally easier.
Comment: I'm still not great on clarinet but doesn't the articulation also make a difference in difficulty? As in tongued leaps are easier than slurred, right?
Comment: @ToddWilcox - Yes, at least in my experience, tongued leaps on the clarinet are easier than slurred ones.
Answer: Great question and as a woodwind player I appreciate the attention you are giving to playability!
Woodwinds are great at leaps generally speaking and particularly doing octaves as in your example.
A suggestion: Have a range chart for each of the instruments and stay away from leaps to or from the very lowest or very highest notes. Those can be handled technically by a skilled player but it may be difficult to execute depending on the dynamics or tempo of the section. There can also be a sonority/intonation challenge with either end of the instruments' range.
Answer: Speaking as a flutist: the notes you wrote are articulated, and you should expect any professional to be able to do such leaps between any notes in the range of the instrument as long as it's not terribly fast. Slurs are trickier. Slurs from low to high even wider than an octave are very doable, but the sort of thing I might practice to really try to get smooth (thinking of Mov III solo in Shostakovich 5). Slurs descending are much more of a challenge (e.g. high E to middle E would be very awkward; which doesn't mean you can't write it though!)


Reduce backup creation time

Question: I will be performing a postgres upgrade from 11.5 to 12.5 that will affect production environment. The first step assumes, that the most recent backup of database was taken, before upgrading - we would like to reduce time of this stage, due to performing upgrade in night hours. After unsuccessful research I would like to as if taking a backup made few hours before exact upgrade backup will reduce the time of next backup procedure?
Comment: "snapshot" has a meaning in PostgreSQL which differs from what you use here.  Are you talking about a file-system snapshot?  Or a PostgreSQL backup? Or something else?
Comment: Thanks for correcting me, actually I ment database backup
Answer: That depends on how you take the backup.
If you use pg_dump or pg_basebackup, the backup time is not influenced by how long ago the previous backup was taken.
If you backup with pg_basebackup or another online file system backup technique, you don't need a new backup. Just use the previous one and the WAL archives, and you can restore any point in time in the life of the database.

Reduce backup creation time


GeoServer s3 uri with ImagePyramid plugin

Question: I would like to create pyramid and use the ImagePyramid plugin to create a store in GeoServer. I know GeoServer has a community module to support S3 uri in GeoTiff file, is it possible to use the S3 url also in the setup of ImagePyramid store?
Comment: did you try it? did it work?
Comment: i'm building the test environment from draft and i would like to understand if it is possible or if I have to consider other approaches to manage pyramid (or to support s3 using for example s3fs but I read it's not the best solution)
Answer: I tried to configure both ImagePyramid plugin and S3GeoTiff community module and I found it isn't supported the s3 uri provided by community module also in the pyramid plugin :(


Creating new data frames from inside a loop

Question: I have a large data frame , say "df.1000". I want to break it into 100 smaller data frames.
I don't want to use the subset function manually, e.g. I don't want to type in a 100 times:
df.10 <- subset( df.1000, time >=0 & time <10)
df.20 <- subset( df.1000, time >=10 & time <20)

 ...                     ...

df.990 <- subset( df.1000, time >=980 & time <990)

So, how can write a loop to create the new data frames without writing their names?
I envision something like:
for( k in 1:100){
       [create object called "df.k"] <- subset( df.1000, time >=10*(k-1) & time <10*k)
  }

So far, this loop with create an object named, literally df.k, and will not output df.1, df.2, ... df.100
Answer: for( k in 1:100){
   assign(paste("df.", k, sep = ""), subset( df.1000, time >=10*(k-1) & time <10*k))
}


Dataflow import - products not showing after import

Question: I have a file with new products. I am trying to import the products. every thing is working as it should be it is running in popup and no error what so ever.
but the products are not showing up on my admin panel neither on front end.
for your reference I have been using this method from day one but suddenly it stop working this item. regarding any new extension. yes I have installed new extension for sage pay. but I don't think this relate with import system. I have checked all the heading and matched with new exported file and match the data every thing seems ok.
I have made another change. I have deleted var/package files which some one told me not important, can this be a problem?
I need help guys. I don't have much of technical know how but can change things by reading instruction, so your quick help will be very handy.
thank you for your time.
Answer: Found the problem,
for other people getting same issue.
I had a space [ ] in front of enabled. it was like this "Enabled " so I deleted the extra space and it is perfect now.


How to choose between logit, probit or linear probability model?

Question: To decide whether to use logit, probit or a linear probability model I compared the marginal effects of the logit/probit models to the coefficients of the variables in the linear probability model. However, since they are not similar, I am not sure how to go about choosing a model that would best fit?
Comment: not that easy, @kjetilbhalvorsen. OP appears to be a budding econometrician, and nothing is as simple as it seems in economics ;)
Comment: Its easy! Use logit.
Comment: See also:  https://stats.stackexchange.com/questions/20523/difference-between-logit-and-probit-models?noredirect=1&lq=1
Answer: Modeling a dichotomous outcome using linear regression is a big no-no.  The error terms will not be normally distributed, there will be heteroskedasticity, and predicted values will fall outside the logical boundaries of 0 and 1.
Logit and probit differ in the assumption of the underlying distribution.  Logit assumes the distribution is logistic (i.e. the outcome either happens or it doesn't).  Probit assumes the underlying distribution is normal which means, essentially, that the observed outcome either happens or doesn't but this reflects a certain threshold being met for the underlying latent variable which is normally distributed.
In practice the end result of these different distributional assumptions is that coefficients differ, usually by a factor of about 1.6.  However, if you look at marginal effects (meaning the effects on the predicted mean of the outcome holding other covariates at the mean or averaging over observed values) the logit and probit models will make essentially the same predictions.  So if you're looking at marginal effects the choice probably doesn't matter.
On the other hand, if you're not going to go about calculating the margins then logit has the obvious advantage of generating coefficients that can be transformed into the familiar odds ratio by exponentiating the coefficient.  Probit coefficients are essentially uninterpretable - given a probit model I would report average marginal effects for this very reason.  Of course most people improperly interpret odds ratios as probabilities which is a big no-no.  The odds of an outcome occurring is a ratio of successes to failures (an odds of 1 would correspond to a probability of .5).  Odds RATIOS, then, reflect the predicted change in the odds given a 1 unit change in the predictor.  Thus, the odds ratio reflects change relative to the base odds of the outcome occurring.  Given an outcome that either rarely occurs or almost always occurs, a small change in probability can correspond to a large odds ratio.  Odds ratios are a ratio of ratios which can be quite confusing and so we arrive at a reason to report marginal effects in the context of a logit model.
So, to summarize, don't use a linear probability model.  Use logit or probit and report the marginal effects.  The choice is, perhaps, of theoretical significance but probably of no practical consequence if reporting marginal effects.  If you're not going to report marginal effects then use logit but be sure to properly interpret the odds ratios so you don't look like an uninformed idiot.
Comment: "If the main purpose of estimating a binary response model is to approximate the partial effects of the explanatory variables, averaged across the distribution of x, then the LPM often does a very good job. The fact that some predicted probabilities are outside the unit interval need not be a serious concern. But there is no guarantee that the LPM provides good estimates of the partial effects for a wide range of covariate values, especially for extreme values of x." (Wooldridge 2010, pp. 563)
Comment: Good answer. In my experience, people don't misinterpret odds ratio as the probability but rather as relative risk. I'd like to point out that the less common the outcome is, the better will odds ratio approximate relative risk. So if you have an uncommon event, it ma
Comment: "The statistical arguments against the use of linear regression with a binary dependent variable are not as decisive as it is often claimed. Even if the homoscedasticity
assumption is violated, this in practice has little effect on the outcome of significance
tests. The results for linear and logistic significance probabilities as we have seen turn
out to be nearly identical, even with small samples and skewed distributions on the
dependent variable." – Hellevik 2009: Linear versus logistic regression when the dependent variable is a dichotomy, Quality & Quantity 43(1):59-74
Comment: An analogy: with some difficulty you CAN use a flathead screwdriver to screw in a Philips head screw....but why not just use a Philips head screwdriver? It's true that OLS and logit/probit will often produce similar answers...but the linear ones will still be objectively worse. In the olden days computers weren't fast enough to run a logit model so running OLS for binary DVs was sometimes necessary, but this is 2022. If you can run OLS you can run a logit/probit model, so why not use the model that was explicitly designed for the job at hand?
Answer: Following the response of whauser, I would also add that it depends on your data.
I learnt from my professor that: If we are dealing with spatial data of high dimensionality in our fixed effects, it would be better to use LPM to minimize bias (and then use HAC correction), because logic and probit suffer from  « incidental parameter problem ».


MVC - FileContentResult Different depending on Dropdownlist selection

Question: In my MVC project I have a chart being generated on my view as so

Which calls a controller that returns FileContentResult
Function GetChart() As FileContentResult
    Return File(MyChart(), "image/png")
End Function

Where mychart is a private sub that returns a byte array being the chart image.
Anyway, my problem is that I want this to generate different data off a dropdownlist I have on the View. So when the post is clicked I will read the selected item and generate the chart against it. Now the Dropdownlist and button work fine and on the post method I can read the selected dropdown item using "Request" or by passing the Dropdown id as a parameter however this does not work with the chart, I cannot read the dropdown selection or pass it in as the controller is being called in the html src tag. How can I get the value of the dropdown to this controller function. Any help appreciated, thanks
Answer: You would need to use javascript to do this.  Note that you'd also want to set the initial chart id using a Url.Action helper on a model parameter.  I've used InitialChart as the variable to hold the default chart id.
$(function() {
   $('#chartDropdown').change( function() {
       $('#reportChart').attr( 'src', '<%= Url.Action( "Chart", "Home" ) %>'
           + '/' + $(this).val() );
   });
});

Then change your mark up (view)
<img id="reportChart"
     alt="Report Chart"
     src='<%= Url.Action( "Chart", "Home", new { id = Model.InitialChart } ) %>'
     />

and your action
Function GetChart(ByVal id as Integer) As FileContentResult
    Return File(MyChart(id), "image/png")
End Function

Comment: Thanks all, I've put this as the correct answer as it's the most detailed but all posts helped :)
Answer: You can pass in the value (or ID) of the selected dropdown item into the actual src path it's self.
Something like:
<img alt="Report Chart" src="/Home/GetChart/<%=ViewData["DropDownValue"]%>" />

(Assuming you've made sure DropDownValue is safe to be used in a URL like this)
This will give you the routing address as {controller}/{action}/{id}
Depending on the id passed to the controller method, you can return the data you want for the image.
If you're wanting the image to change without a postback to the server then you'll need to change the src attribute value using Javascript, populating the {id} section with the new value from the dropdown.
Answer: Why not just pass it as parameter:
<img
    alt="Report Chart"
    src="<%= Url.Action("GetChart", "Home", new { id = Model.SomePropertyThatDropDownIsBoundTo }) %>"
/>

Answer: I might mention a simpler solution again I came across for future reference, similar to Jaime's above
<img alt="Report Chart" src="/Home/GetChart/<%=Request("ChartType") %>" />

where ChartType is the dropdownlist, this returns the selected value rather than the full IEnumerable of SelectListItems.
Cheers again guys


Store media item in Sitecore somewhere else instead of Media Library

Question: Is this possible to store Media items in some other Content tree node in place of Media Library?
Comment: I believe it is because apparently `SXA` stores it in a [different part of the tree](https://sitecore.stackexchange.com/q/9734/135)... I've never looked into the implementation though.
Comment: Last time I checked much of the Sitecore API relies on `sitecore/media library` existing in the path of items to determine that it's a media item. I would avoid going down this path.
Answer: Since everything in the content tree is, at its root, a basic item, then yes, you should be able to store media items wherever you want. A few things to consider thought:

You need to be sure the insert options are set to cover all the possibilities you want to allow
You need to ensure your indexes are pointing to wherever you're storing your media items...look how the default implementation is done and expand from there

There may be other considerations, but if you test it out thoroughly in development, you should be able to find them all.
Answer: Yes, you can create media folder anywhere in content tree and upload media item in that folder. But, it's depends upon your requirement, sitecore by default consider media library as standard location to manipulate media items. You will not get your custom media location if you click on browse option for any image field. It will by default fallback to media library location, if there is no source path define for specific field.


Particles not appearing in viewport

Question: I am trying to make a missile. I want to put bolts on it to make it look a little more realistic. I was going to use a particle system to put them on there, but when I add the bolt in dupil object it doesn't show up. Help!
Answer: Please excuse my ignorance on Dupil Objects function. However, you could possibly create a bolt mesh and use the array modifier to get equal distance across the body, both vertically and also across the circumference with the same modifier set to an 'empty'. that's how I usually create bolts
Comment: Thanks, can you tell me how to put bolt mesh onto the missile with the modifier? Kind of a noob with blender.
Comment: @GamerWiz there are many ways to do it depending on how you want it. do you want bolts running up the length? and do you want them going round it's circumference? also, do you wish to place some on the nose or tail? maybe a quick reference drawing could help, just the basic shade with some lines to show where you want them. And don't worry about being a noob mate, I'm not that much better and I've been doing this for 12 months

Particles not appearing in viewport


About parachain auction and parachain upgrade

Question:
Once a team successfully bid for a parachain slot, how long is the window that they can leave the slot empty? What will happen if they cannot successfully connect their chain in before the window closes.

Is there a more detail instructions on how a bare-bone shell parachain got upgraded to Statemint?

During the parachain upgrade, can the team reset the genesis block information?
Comment: More detailed explanation of upgrading the Polkadot shell parachain to statemint can be found here: https://polkadot.polkassembly.io/referendum/46
Answer:
I don't really quite get your question. One can bid for a slot as long as there is an ongoing auction. Once a winner is chosen, its parathread will be granted with a slot and then onboarded as a parachain. This parachain will start producing blocks as soon as there are a couple of nodes and collators running for it. And will keep on onboarded until the end of the LPs that were won during the auction. For a more detailed explanation on how auctions work please refer to the wiki - https://wiki.polkadot.network/docs/learn-auction
Just to add here, there is nothing like that window you talk about in the implementation, so collators can be run anytime, but block production won't start until they are not running.

I think Bruno's comment answers this point by itself.

Thinking on an upgrade from shell to another runtime with more features, in that process you might need some genesis storage for a few of the new included pallets. You can add this storage items as part of a migration during the upgrade process.


Protect access to an SD card

Question: How can I protect access to an SD card, so that only authorized users can read or modify the content of the SD card. Currently everybody who has physical access to the SD card can read or modify everything.
Comment: What are you using the SD card for? Is it possible to give everyone their own card?
Comment: The SD card is used to store the configuration of an embedded system. Now everybody who has physicak access to the SD- card can change the configuration of the embedded system. To avoid this situation I need a protection, that allows only authorized users (e.g who knows the password ) to read and modify the configuration.
Comment: How are changes made to the SD card, are they made by the embedded system or from a normal computer? Is the card required to use the emebedded system or just to load configuration?
Comment: Changes can be made online/(over a TCP/IP Network) or using a PC. Both options must be supported. The access over the network is protected using IPsec but the physical access is not protected at all.
Answer: Simplest solution for protecting against unauthorised viewing or modification: encryption. You can use TrueCrypt, PGP, GPG, OpenPGP etc to either encrypt individual files on the card or to set up an encrypted volume for the whole card.
This will mean only those people who have the passphrase will be able to access the data (given the usual assumptions around correct implementation, no sharing of keys etc)
The latter solution also allows you to effectively securely delete the card, by getting rid of the encryption passphrase (or password or certificate etc)
Comment: Of course, now you have to manage access to the encryption key which may or may not be easier.
Answer: Secure digital cards define a protocol and commands for password protection of read/write access to the part of the stored data. Data access is impossible without presenting a password.
A specification snapshot is available at http://blog.ednchina.com/Upload/Blog/2007/10/26/eb26e3c5-586e-43c7-a0a1-ff4920ee7113.pdf

Protect access to an SD card


Ethernet splitter

Question: I have two computers side by side (one work and the other personal). Due to the location of the wireless connection, sometimes the signal is weak, so I normally access one of the computer via the ethernet, but my modem has only a single jack. Is there a splitter or something that will allow me to access both computers at same time without having to swap the ethernet from computer to computer
Comment: I'm missing something here:  You say that the modem has only one port but you also apparently have a wireless router.  How is it attached?  Doesn't the router have any ports?
Answer: There's two options here - get a router or switch and connect it to the modem - if your modem is also a router, you'd have to switch off DHCP on the router. You might also be able to use a hub, but those are nearly extinct these days.
You might also be able to use a windows PC as a router by setting up Internet connection sharing if your modem is a 'simple' modem with no routing capabilities. I am unsure if you can turn off DHCP on ICS tho.
Splitters are passive devices, and ethernet as we know it uses a star configuration, so such a device is impossible.
Comment: Strictly speaking, Ethernet uses a bus configuration, not a star. The wiring is configured in a star because modern Ethernet network always consist of a set of twisted pair connections with a hub or switch in the center. (In most home networks, the switch is built into a router.) In the bad old days, before twisted-pair Ethernet and cheap switches, a network often consisted of a single coaxial cable running past all systems on the network; most system would connect with a "tap", which included a spike driven into the cable.
Comment: For clarity, there is such a thing as ethernet spitters. We use them here on sites when we're low on ports. They allow 2 devices to use a single run of network cable. You need one splitter at each end and it uses 2 of the twisted pairs per port. Unfortunately some devices (printers, VOIP phones) can have issues with this - embedded LAN often needs to be set to run at half-duplex in such a configuration. But it's still better than wireless.
Comment: No, you don't have to switch off DHCP on a router that's connected to another router. Any decent router can be both a DHCP client and DHCP server.
Comment: Keep it simple: get a router and don't turn off DHCP. Just install the router, connecting its uplink (or port 1, most routers these days auto-detect which port is the upstream connection) port to the modem (you may need to power cycle your modem) and connecting your two computers, using separate cables, to separate jacks on the router. Easy peasy.
Comment: Yes, a PC can serve as a router, but only if it has enough Ethernet ports. Unless you have the necessary hardware lying around, and don't mind the power costs of keeping the PC running all the time,  it makes more sense to just buy a router.
Answer: Yes there is such a device, we call them RJ-45 splitters but they are also called RJ45 CAT 5 6 LAN Ethernet Splitter Connector Adapter. All three ends need to be female, the end with 1 female end will go to the cable that is connected to your modem/router, the end with 2 female ends go to each computers. Your done run one cable with splitter for 2 computers. They have this at Dollar Stores, eBay for $1.00, Radio Shack $10 I think you get the picture. Good luck
Comment: That would allow the OP to physically connect all three. But just a physical splitter will not allow both work and personal computer to use the network at the same time. (Powering off one computer and then powering up the other computer would work).
Comment: @Hennes -- You don't understand -- it breaks the 8-wire cable into two 4-wire cables.
Comment: That works for 10mbit and 100mbit connections if you use plugs at both ends. The OP's modem only has a single Ethernet plug.
Comment: For sharing connections you want a router or switch, not a splitter.
Answer: I think the thing you're looking for is called a network switch. This is a data-link (second) or higher layer device for combining Ethernet connections. Actually a  lot more functionality than you need, but some layer 2 switches are so cheap (NewEgg has them for $10) it doesn't matter.
There used to be simpler devices called network hubs that worked on the physical (first) layer. Switches got so cheap, they drove hubs off the market. Some people call switches hubs, but I'm a technical writer, and thus a semantic nitpicker.
There are ways to split Ethernet cables so that you don't need a hub or switch, but unless there's some big reason you can't install that extra box, splitting cables is an unnecessary hassle.
Here's why I'm not 100% sure I understand your question. It's not clear to me exactly what kind of device you're talking about when you refer to a "modem". Is the WAN interface configuration built into your "modem"? Or do both computers contain the configuration? If you're not sure, posting the make and model of this device would be helpful. If the "modem" does handle the WAN connection itself, than it's providing a network endpoint, and a switch or hub will work. Otherwise, you need to move a level up from switches and get a router. Since you're using physical Ethernet, the router doesn't have to be wireless, though you probably won't save any by buying a wired-only router for a two-computer network.
Answer: Assuming your Ethernet is connected via a RJ45 plug:
No. A simple splitter will not work. You can use a switch or a hub though.
(RJ45 mentioned because you can do what you want if you used old coax to connect. Feel free to google for 10base2_t, but this is very unlikely)
Comment: 10B2! How quaint!
Comment: Aye. Truly ancient. But there still are devices alive which use it.  Even if my last coax switch died. (And yes, I meant a switch, not a hub. Back in the days of yore it cost as much as a small car and it was quaint enough that I saved it from the trashcan).
Answer: The typical ethernet cable has 8 wires.  Most ethernet schemes only use 4.  Thus you can use a "splitter" at each end to effectively squeeze 2 cables into 1.  There are several varieties available.
(But note that some "enterprise" wiring used 4 or 6-wire cables, so this scheme won't work with those.  Also, the scheme won't work with certain high-speed ethernet protocols that use more than 4 wires.)
The other option is a small hub, but this will not work with some routers that assume one computer per port.
Added: And people in the past have actually gotten away with "OR-tying" two Ethernet cables together, relying on Ethernet collision detection to handle conflicts.  But this is not a very reliable approach, if it even works at all anymore.
Comment: This is a horrible idea.  Yes, at least in the past, you could use a splitter to accomplish this.  I dont know if this holds true.  However, the two PCs would not be able to communicate with each other, since the TX/RX are not switched.
Comment: IIRC, Gigabit Ethernet requires all 8 wires to be available?
Comment: @Keltari -- Which is a bad idea?  Splitting the cable is perfectly fine so long as the protocol uses no more than 4 wires.  And the OR-tying trick I didn't recommend, just said it had been done.

Ethernet splitter


Nginx: Conditional request gunzip when `Content-Encoding: gzip` is set

Question: How would it be possible in nginx to evaluate if the Content-Encoding: gzip request header is set (coming from a web client to nginx), and then let nginx gunzip the request before it gets forwarded to an upstream (e.g. fastcgi)?
Comment: have you tried `if ( $content_encoding = 'gzip') { gunzip on; }`
Comment: @DavidParlevliet I think the `if` condition is redundant.
Comment: Thanks! But it seems that `gunzip` is only decompressing `responses`, not the incoming `requests` from a web client (I refined my question a bit). How could I nginx unzip a web request before it gets forwarded to an, e.g. fastcgi, upstream?
Answer: After more research it seems decompressing requests is not possible out of the box. Using LUA like described here is unfortunately not something I want to do: http://www.pataliebre.net/howto-make-nginx-decompress-a-gzipped-request.html#.VrCv87IrKHt.
Seems like I'd have to handle the decompression in my backend server code :/


Do the physics inside a black hole event horizon allow a person to remain conscious/alive?

Question: Descriptions of black holes often include stories of a person falling through the event horizon. Since the physics inside the event horizon is dramatically different than outside the EH, are biological processes even possible inside? Can a human being remain conscious/alive after passing the event horizon?
Answer:
Since the physics inside the event horizon is dramatically different than outside the EH, are biological processes even possible inside?

The physics inside is not dramatically different. The equivalence principle says that the laws of physics operate in exactly the same way.
If you want a person to be able to stay alive for any given time $t$ inside the event horizon, then this can happen, provided that the black hole is big enough and doesn't have a violent accretion disk. They will have some maximum time they can live before they hit the singularity, and this time is proportional to the mass of the black hole.
For realistic astrophysical black holes, the person might be killed by radiation or tidal forces before or after reaching the event horizon.
Comment: Thanks. I only have a superficial understanding. But for a person to remain conscious biological processes like blood flowing, neurochemicals passing around the brain, and such must continue. Are all the particles free to move about in such fashion after passing the event horizon? I was under the impression that the paths of each particle (much less the entire person) would no longer be so freely flowing.
Comment: It's worth mentioning that for a supermassive black hole like those found in the center of many galaxies, the tidal forces are weak enough at the horizon that a human could survive falling in.
Answer: Locally, the laws of physics are exactly the same inside of a black hole (at least in classical general relativity; we don't really know how quantum mechanics modifies this picture). In fact, it is logically possible that the entire observable universe is inside of a really, really, really, really, really, really, really big black hole. If it were big enough, then we would have no way of noticing.


How calculate profit margin of a IT project?

Question: I want to calculate:
How much money I have for each dollar invested in each product of my portfolio. For example, each 1 dollar I invest in one product, I have 1,25 dollar. It can be the ROI, or profitability.
But, the problem is: I have a Initial Investiment and as any IT product, I must keep investing more for new releases and updates. So, I have a timeline table by months, and I must calculate profitability for each month separately and acummulated profitability. I don't know what I consider to calculate it.
I have already some informations: Month Result, accumulated results, developing costs, commercial costs, marketing costs, taxes costs. How can I manage all this costs and investiments to have what I want?
Thank you
Comment: Welcome to PMSE! From an accounting perspective a lot depends on the accounting practices adopted by the company. Items like development costs may be amortized over a longer period of time than one month or one year, as with marketing costs, etc.  Ask the company accountant or do deeper research on the accounting rules your organization uses in your area.
Comment: We consider now net profit or the result = revenue - (dev costs + commercial cost + marketing cost + product cost + support cost). All in average budget for each product. So my doubt is if I should consider or not this cost and how calculate it.
Answer: TL;DR
Most projects deliver features or value (however the organization defines value for itself), but projects are unlikely to generate profit directly. Generally speaking, profits can only be generated once a shippable product is released into a sales channel, and the revenue from the sold product exceeds its associated costs.
Track Value Instead of Profit
While there are certainly exceptions, such as projects that have rolling releases directly into a sales channel, most projects are a cost center rather than a profit center. It rarely makes sense to track "profit" month-to-month on something that has not yet been fully built.
Instead, many projects use Earned Value Management, where the project periodically "cashes out" earnings as defined by the project's Planned Value in accordance with predefined rules. Planned Value could conceivably be used as a proxy for potential profit once the product eventually ships, but that isn't really using the methodology to best advantage.
Other frameworks such as Scrum focus on iterative delivery of potentially-shippable features. Assuming you ship monthly and tie your sales earnings to specific monthly releases, you could use those numbers retroactively to identify profit or loss for each iteration. However, iterations generally have a short fixed duration (e.g. one month), while sales generally follow a longer cycle and often have a long tail. I suspect that trying to tie sales to each tagged release will cause most of your iterations to represent a "loss," at least on paper, but your mileage may vary.
Comment: Understood. Here, we launch product versions. So, you suppose I should consider the proffit of each version. For example, 2.0, 3.0, 4.0...? Just for you to know, we launch versions when laws changes, so not always we launch features or value provided, just a cost to maintence the product updated to contract customers. So I should consider this new releases as a cost and not investiment?
Comment: @user3446267 Yes, I would consider compliance-related work to be a cost, not an investment. Your accounting department may have its own unique definitions, but a Product Manager (or Product Owner) would be better off simply treating it as a cost.
Comment: I solved the following question with this: Just sum the initial investiment to build the whole product until launch it. Then for each month I divide the net profit or earnings discounted costs per initial investiment ajusted for opportunity tax.