This question is a little bit stupid and silly.   As I am chemist, I don't remember electricity physics very good. As I remember it shouldn't harm anything, but I need to be sure.  LEDs will be blinking sometimes together. But not longer than 50ms.  They will be parallel for only short time. Because they supposed to blink reporting 2 modes 1st - normal, 2nd - error. And switching between them can be no longer than 50ms.         – Schematic created using   I use resistor for both LEDs, but it just curiosity question.


Why are rectified linear units considered non-linear?

Why are activation functions of  (ReLU) considered non-linear?   $$ f(x) = \max(0,x)$$  They are linear when the input is positive and from my understanding to unlock the representative power of deep networks non-linear activations are a must, otherwise the whole network could be represented by a single layer.


Event not firing for element added via jquery (that has same class as existing element where it does fire)

I have a row in a div with a button at the end, when I click on the button it logs in the console.  I add another row via jquery with the same class but when I click on the button on the second row the event does not fire.  See the example here   Click add (to add second row) then on 'X' for each row (whilst monitoring console). Only row 1 works for me  code also below: HTML

Description 1

                                     <input id="button_1" class="removeTaskButton" type="button" value="X">

  <button id="addTaskButton" type="button"                             class="btn btn-sm btn-primary">Add Task</button>   JS  $('.removeTaskCol').on('click', function(){            console.log("Clicked X");     });    $('#addTaskButton').on('click',function() {         $('#tasksTableDiv').append('
'                                 + '
Description 2'                  + '
'                                 + '
'                                     + '<input id="button_2" class="removeTaskButton" type="button" value="X">'                                 + '
'                             + '
');      });


I DM for a group of a group of rather intellectual players. They like to discuss the situations at hand and really try to do the right things. I use that a lot by posing them with moral questions and missions where the "good" solution is not always obvious or even contradicts the mission target.  So far this worked out very well, but last round a new player joined our game. She plays an impatient, man-hating Amazon (her self-chosen description). The man-hating part kinda does work since she frequently gets into arguments with the male players, which is funny, but the impatient part is the real trouble.  Whenever the group stops to discuss something, she interrupts and just wants to fight stuff. Whenever they talk (in character) about anything else than the mission she interrupts saying that it doesn't matter or doesn't help the group.  Also, whenever someone says anything against her, she does get a bit offended.  In the end of the mission I put a moral choice, where they had to retrieve a magical object, but by doing so kill a whole forest and everything within it. While the rest of the group was discussing it, and trying to find a different solution (of which there where some), she just went ahead and cut that object from it's socket, thus killing the whole forest. This in turn will have negative consequences for the group and the world they live in in the sessions to come.  I expected her to be like that so I included a couple of things where only thinking would get them ahead and just charging into fights would hurt them, but she doesn't care about consequences and just barges in.  Since she doesn't fit into the group at all, I'd usually just put her into another of my groups where she'd fit better, but she's the girlfriend of one of the core players of that group, so I can't do that.  I thought about having an NPC, that the rest of the group know, join the group and keep her in check every time she goes overboard again, but I fear that by limiting her I'd take the fun away for her.  My problem here is not that I don't want the players to commit mass murder. I have another group that is quite murderous and that's fine. The problem here is that I have a quite homogenous group and one player that really doesn't fit the group. It's not even so much about her murdering people (which can be quite fun in an otherwise good minded group) but that she is disrupting the kind of play that the other players want to have.  Do you have any ideas what I can do here?  This is not so much a My-Guy-Syndrome, but rather a clash of expectations. I talked to the player in question. It is really not about her "having" to stick to her character, but rather that her character reflects herself. She says of herself that she is impatient and that she rather wants to fight than to discuss. In the end she wanted to get transferred into my other group, which is more combat-oriented and generally more diverse.


Similar question:   I am searching for a word, that indicates that something was created OR updated. Currently I am going with modified which seems ok but not perfect in case of creation.  As the OP in the linked question I am developer and would like to write a method like updated_created_since(timestamp). Any better ideas than modified?


Clone an array and make it unique - Javascript

I have a problem. I have an array of objects. I need to make a copy out of it and make it unique, so when I modify my new array, it doesn't change anything in the original one. I have tried the following: let excelData = [...this.state.tableData];  let excelData = this.state.tableData.slice(); let excelData = this.state.tableData.concat(); let excelData = Array.from(this.state.tableData);  But all of the previously listed methods also modify the original array. Here is my function: addDynamicExcelColumns() {         let excelData = [...this.state.tableData];         if (this.state.compRentAttr.length > 0) {             excelData.map((d, idx) => {                 this.state.compRentAttr.map((i, idx1) => {                     excelData[idx][i.AttrName] = d.optionalAttributes[idx1];                 });             });         }         return excelData;     }


Comparisons: "so [adjective/adverb] as" or "as [adjective/adverb] as"

When learning how to make comparisons, students of English as a foreign language are first told to use the structure "as [adjective/adverb] as". However, at higher levels, they are told that both options ("as/so [adjective/adverb] as") are correct.   I've been wondering if there are any differences between them, but I can't find an answer in my grammar (Cambridge Grammar of English). In a school book, I saw two examples that led me to think that:   "as [adverb] as" is possible with both positive and negative sentences "so [adverb] as" is only possible in negative sentences   Is this correct? If so, does it also apply to adjectives?  Examples for adjectives:   This is as good as that.  This is so good as that. This isn't as good as that.  This isn't so good as that.   Examples for adverbs:   Anne plays as well as John.  Anne plays so well as John. (not correct?) Anne doesn't play as well as John. Anne doesn't play so well as John.


Strikethrough markdown not rendering on post, but works on preview

I just made an edit to a question on an SE site. I wanted to strikeout some of the text, so I used the ~~ wrap to do this. I could see this correctly applied in the preview. However, after posting the update, the rendered post just shows the original text with the ~~, and not the strikethrough effect. Example: ~~this text is strikethrough in the post preview~~ Screenshot from edit:


I am trying to use printf in order to print the binary representation of a double onto the console. Here is the code that I have so far:  #include <stdio.h>  int main() {     double a = 4.75;     unsigned long long b = *(unsigned long long *) &a;     printf("Double a = %f (0x%x)" a, b); }   I also tried changing it from a long long to a long instead. Here is the result that I get from doing this in gcc linux:  Double a = 4.750000 (0x0)   I'm pretty sure since my system is little endian that it is only grabbing the first 32 bits which are all zeroes. However, I'm not sure how to fix this.   I thought it might have been because long is 64 bit in linux but after testing that I got the same result again. Maybe I'm printing it incorrectly? Not sure, let me know and thanks for your time.


InDesign extract each page as a separate file

In a document where I have, say, 20 business cards front and back, and I have to export them as individual PDFs. That's 40 exports! I know that in acrobat I can extract the pages afterward, but I was wondering if there is a script or something that can do that straight out of InDesign?


I have the option to retain copyright on my published paper. Should I?

My coauthors and I have just had a paper accepted by a journal.  The journal in question is published by a nonprofit professional society and offers two options in their copyright agreement.   We transfer copyright to the publisher, as is traditional.  The journal has exclusive publication rights but we retain the rights to post the paper on our web pages or arXiv (post peer-review), distribute to colleagues, etc.  We also have the right to release our paper to the public domain after 28 years. We retain the copyright for ourselves, but grant exclusive publication rights to the publisher.  We still have the rights to post and distribute the paper privately as before.   I am trying to determine the pros and cons of each option.  From a practical standpoint there doesn't seem to be much difference: in each case, both we authors and the journal have the rights to do the things that we respectively care about.  In principle, it would seem better for us to retain the copyright rather than transfer it, just on the grounds that it is better to keep as many rights as possible.  I could only think of one possible drawback: suppose that a number of years from now, some person X wants to republish our paper, or use it in some other way that requires the permission of the copyright holder.  If we transfer it, X can work it out directly with the journal, who should remain easy to contact.  If we don't, X has to track down all three of us authors (or our heirs) to get permission, and then we have to decide what to do about it.  I'm not asking for legal advice, and I know you're not a lawyer, etc, etc.  But I would be interested to hear about any experiences with this, or other issues I haven't thought of.  The publisher is the American Mathematical Society and their copyright agreement form can be found at


Why does my formatted string repeat here?

I'm making a loop to see how many calories will be burned every 5 minutes (starting at 10 minutes) and ending at 30 minutes.     x = 30     cals = 0     mins = 0      while x > 0:              x -= 5     mins += 5     cals += 4.2     strcals = str(format(cals, '1'))     if mins > 5:         print(f"After {mins} minutes, you have burned {strcals} calories")  When I run this program, it works just fine. My loops work for finding the amount of calories burned per minute and it ends at 30. However, once I reach 15 minutes something weird happens in the output After 10 minutes, you have burned 8.4 calories After 15 minutes, you have burned 12.600000000000001 calories After 20 minutes, you have burned 16.8 calories  Can someone explain why I get this output from my program at 15 minutes? What can I do to fix it?


What else could I do to improve my own password hashing

This is being used for a personal website, so it's more a learning experience than being super secure. That said, I've been reading various things you're supposed to do, and to me at least, this seems pretty secure, despite perhaps the low memory usage.  However, everywhere I read says never try do it yourself, so obviously there will be some flaws with my way. Could anyone suggest any improvements? For the record I was trying to do it with libraries that were built into the free webhosts, since both PBKDF2 and bcrypt weren't in.  The salt is generated via substr(uniqid(mt_rand(), true), 0, 32) (substr to avoid it overflowing the database occasionally it ends up as 33 characters), and encrypted before being entered into the database. This is via a hash of a global key, so you'd also need the contents of a php file to crack it (I may switch it to 'global key + email' though). The IV is just stored inside a folder, so even if you hack the database and get the contents of a php file, you still need to get past htaccess to read a file. This can be deleted, where the next run of the function will generate a new one, and therefore render all passwords invalid.  The actual password hash uses key stretching, but to a value that's a modulus of a crc32 value, so each user has a different amount of hashes that are done. Each repeat hash uses a few hashes inside it to try keep it unique.  $salt_key = 'seemingly random string of characters, numbers and symbols';  function get_iv(){     // It stores it as a file, but there's no point showing that part so here's the actual code bit     return mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_CBC), MCRYPT_RAND); }  function generate_salt(){     global $salt_key;     $salt = substr(uniqid(mt_rand(), true), 0, 32);     $key = hash('sha256', $salt_key, true);     $iv = get_iv();     $encrypt = mcrypt_encrypt(MCRYPT_BLOWFISH, $key, $salt, MCRYPT_MODE_CFB, $iv);     return array($salt, $encrypt); }  function decrypt_salt($encrypted){     global $salt_key;     $key = hash('sha256', $salt_key, true);     $iv = get_iv();     return mcrypt_decrypt(MCRYPT_BLOWFISH, $key, $encrypted, MCRYPT_MODE_CFB, $iv); }  function hash_password($password, $salt){     #return hash('sha512', $password.$salt, true);     $hash = $salt;     for($i=0; $i<(crc32($salt.$password) % 129197); $i++){         $hash = hash('sha512', $hash.$password.$salt.hash('sha512', $salt.$hash.$password).md5($salt.md5($password.$hash)), true);     }     return $hash; }   There are a couple of other functions but they're mainly for checking the entered password against the one in the database. Are there some important parts I've missed, or for a small scale site would this probably be alright?  Also, quick question about key stretching, if I make it take half a second to calculate, doesn't that mean if the site suddenly gets 500 people trying to log in, someone will have to sit there for 250 seconds because the CPU is overloaded?I just had an idea to store the max value of hashes (129197 in the above code) in the user table, so it can be changed if needed without invalidating the passwords.


A word describing someone who says "like" or "um" every couple of words in most sentences

Is there a word (or a few words) that accurately describes someone with the "like disease" (or the many other unnecessary words or small phrases spread throughout most sentences, such as "um") in "proper" English?  I often find having a conversation which such a person very distracting, even annoying, and it makes it difficult to concentrate on the intent of their conversation when I constantly here like x, like y, like z, ...  if such a "word" describes this too, even better.


`http_proxy` not showing up with `printenv` on WSL

I am having trouble getting pip to work behind a corporate firewall. I added the http and https proxies to my /etc/environment file, and if I execute echo "$HTTP_PROXY" it prints the right thing. However, if I execute env or printenv none of the proxy variables show up. I think this is why pip is failing too. Any insight would be appreciated. My /etc/environment file looks like  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" http_proxy="http://<stuff>.<stuff>.org:80" HTTP_PROXY="http://<stuff>.<stuff>.org:80" https_proxy="https://<stuff>.<stuff>.org:443" HTTPS_PROXY="https://<stuff>.<stuff>.org:443"   And I added the same lines to my ~/.bashrc file as well.


Proper way of converting string to long int in PHP

I tried (int) "4209531264" and intval("4209531264") but sadly all I get is 2147483647 (I realize this is because of 32 bit architecture or some php dependencies or something).  I came up with "4209531264" + 0 which returns the correct result but it is surprising to see it working since it is beyond maxint.  but the real question: is this the "right way" of converting string to long?  edit:  (float) that is.  thanks for the comments! eye opening!


Let $\{A_i\}_{i\in I}$ be a collection of subsets of a topological space $X$, such that $X = \bigcup_{i \in I} A_i$. Let $f:X \rightarrow Y$ be a map of topological spaces such that the restriction of $f$ to each $A_i$ (equipped with the subspace topology induced from $X$) is continuous.  Show that if each $A_i$ is closed, and $I$ is finite, then $f$ is continuous.  I understand that this can be solved by the pasting lemma, but I don't see how I can do it using both hypotheses that $A_i$ is closed and $I$ finite.


I have a JLabel in my about us form which I'd like to be a hyperlink to www.samteksystems.com, which means that whenever I click on that JLabel it should go to www.samteksystems.com. Please help me.


RegEx validation Issue for allowing multiple whitespaces

I have a requirement to do a field validation using regEx. The requirement is not to have any special characters. It is working for me for a single white space, but not for multiple white spaces. It does not work if there is a white space at the beginning. Can you please help me with this?  This is what I used:  ^(\w+ ?)*$


Fixing Script Error Invalid Pointer from ArcGIS Geoprocessing Tools?

I am just learning ArcGIS 10.2 and it was working well until I tried to use the Export to a Geodatabase (single) option for a dbs table I made. Since then, it seems I now get the same Script Error for import/export functions. However, I just tried to export to Geodatabase (multiple) and error did not pop up. I spoke with tech support and they could not help me so far. I really do not know much about GIS so it is hard for me to fix this problem and cannot proceed with some things.


How to improve schema access performance

We have Apex code that needs to interrogate the schema to dynamically handle configuration-based behaviour (e.g. for defining fields that should be loaded or saved) for specific types of object (such as "Account" or "MyCustomObject__c") and have seen that a lot of CPU time is spent just loading the schema. What's the best way to use the Salesforce APIs to minimize the overheads?


In a commutative unital ring, can we find invertible codivisors for mutual divisors?

Let's say we have a commutative ring $R$ with a unit and elements $a,b \in R$ which divide each other, e.g. $a | b$ and $b|a$. The question is now:     Does there exist an invertible element $\epsilon \in R^\times$ with $a \epsilon = b$ or are there counterexamples e.g. rings and elements as above, for which you can't find such an $\epsilon$?   This question arose from an exercise I gave to my students for commutative rings without unit (where there are plenty counterexamples, e.g. $R=\mathbb Z \times 2\mathbb Z$). Since we couldn't find counterexamples or a proof for unital rings I am asking here the question.  Stuff we already tried/figured out:   It is quite clear, that in a counterexample $a$ and $b$ are zerodivisors. It is useless to consider cross-products of rings, since you can solve the problem pointwise. $\mathbb Z / n \mathbb Z$ are no counterexamples.


Do memory cards have any max file size limitation?

I am not sure where to ask this question, so perhaps it is physical limitation.   I have a 8 GB flash micro SD memory card. When I copy any file size of up to few gigabytes, copying happens normally. But if I am trying to copy file over 4 GB file, then the system tells me like insufficient memory on card, although 8 GB is available. So perhaps only 32 bit address is used for keeping size of file in micro SD card, or is my micro SD defective?


Given fields $K\subseteq L$, why does $f,g$ relatively prime in $K[x]$ imply relatively prime in $L[x]$?

$K,L$ are fields, $K\subseteq L$. $f,g \in K[x]$. Suppose that $f,g$ are relatively prime as elements of $K[x]$. Prove they remain relatively prime  in $L[x]$.  I've tried everything I can think of. I feel like working with the contrapositive may be helpful but that's just a feeling.


Finding the Fibonacci term from the Fibonacci number

Given that the Fibonacci number is 165580141 Is it possible to find $n$ using the closed form. I tried simplifying the closed form but I get stuck at:  $\sqrt5F_n = (\frac{(1+\sqrt5}{2})^n - (\frac{(1+\sqrt5}{2})^n$  $\sqrt5(165580141) + (\frac{(1+\sqrt5}{2})^n = (\frac{(1+\sqrt5}{2})^n$  ($370248451 + (\frac{1+\sqrt5}{2})^n)^{1/n} = \frac{(1+\sqrt5)}{2}$  I don't know how to proceed further.


Delete a picture from the look-back movie

How can I delete one of the pics on my look back movie? There is no edit button or delete button, only share.


Prove or disprove that $$ \{x: 2x^2\cos(1/x) \le 1\} \cup \{0\}\  \text{is complete}.  $$  Define $$f(x)=\begin{cases} 2x^2\cos\left(\frac{1}{x}\right), & x\neq 0\\ 0, &  x=0  \end{cases}$$ Clearly, $f$ is continuous and $T=f^{-1}\big((-\infty,1]\big)$ which is closed and hence $T$ is complete.   Am I right?


Java swing - how to choose between programs using JFileChooser and JMenu?

In my program, I have created a menu bar which allows the user to switch between three programs using file chooser. However, it does not seem to be compiling or working. I am pretty sure my code is incorrect however, I could only find a few examples to work with. I have copied the code that for when "Basic" is clicked on, it is supposed to open BasicCalculator.java. Any help would be appreciated.   JMenuBar menuBar = new JMenuBar(); JMenu calculatorMenu = new JMenu("Calculator"); menuBar.add(calculatorMenu); JMenuItem basic = new JMenuItem("Basic"); JMenuItem intermediate = new JMenuItem("Intermediate"); JMenuItem scientific = new JMenuItem("Scientific");  basic.addActionListener(new ActionListener(){     public void actionPerformed(ActionEvent e){         if (e.getActionCommand().equals("Basic")){             JFileChooser fileChooser = new JFileChooser();             fileChooser.setCurrentDirectory(new File(System.getProperty("BasicCalculator.java")));             int result = fileChooser.showOpenDialog(frame);             if (result == JFileChooser.APPROVE_OPTION){                 File selectedFile = fileChooser.getSelectedFile();                 System.out.println("Selected file: " + selectedFile.getAbsolutePath());             }         }     } });


Efficient Algorithm for finding left (or right) Transversal in a Group

I'm wondering if anyone knows an algorithm to find a  in a group efficiently. The definition is you are given a subgroup $H$ of a group $G$, and you want to find a representative of each coset of $H$ in $G$.  Recall the : $x, y \in G$ are in the same coset iff $x^{-1}y \in H$. This yields a trivial $O(|G|)$ algorithm. Simply test each element of $G$ until you find $|H : G|$ unique representatives.  I'm wondering if there is a more efficient way to do this, preferably deterministically. Also, if finding a base or strongly generating set is necessary beforehand, the cost of such should be included in the efficiency of the algorithm.  I am interested in such an algorithm for any arbitrary group, but if a special algorithm exists when $G = S_n$ and $H$ is a permutation group, possibly $S_k$ for some $k < n$, I'd be happy to learn of this as well.  I would also appreciate any references to textbooks or papers that might help solve this problem.  Thanks!


Binary classification with imbalanced classes

I have a manufacture dataset of 65 million rows corresponding to 65 millions distinct items.  Out of those 65 millions, I have 60,000 of them that failed a certain test, thus I have very imbalanced classes.   I have about 200 to 300 variables/features that describe them that are both categorical (2 levels or more) and numerical.  So    y = failed items = 1 or 0 (binary) X = $X_1$ ... $X_{300}$ (categorical and numeric).   What is the proper methodology or model to use to root cause the important variables that contribute to the failed items? In other words, how to I identify the top variables that may be responsible for the failure?


Do any of the currency exchanges at Istanbul Atatürk Airport deal in Korean won?

I'm about to fly from Istanbul to Seoul and I have a useful amount of Turkish Lira (TRY) left but I don't have any South Korean Won (KRW) to pay for the metro to my hostel when I get there.  Several times in the past I've ended up being stuck with currencies that are very difficult to exchange in the country I've arrived in.  Can I buy KRW at the airport in Istanbul?  (I've also asked , since Stack Exchange questions are meant more for the long tail than just for the original asker.)


How can I use calc to set things properly with dynamic heights?

I essentially want the first block to take up whatever height it will naturally. Then I want the second block fill out the rest of the page with its natural height, without letting it create a vertical scrollbar.   I'm basically hard-coding the 100px via the template row. How can I make things more flexible? I've tried various values like 100% instead of 100px in the rows, as well as auto.    .container {   display: grid;   grid-template-rows: 100px 1fr; }  .rest {   max-height: calc(100vh - 100px); }

Welcome

Some text that can change length/height

I want this block to be the remaining 100% height


Frisch-Waugh-Lovell Theorem: Partialing out a set of regressors

I am trying to understand the result of the Frisch-Waugh-Lovell Theorem that we can partial out a set out regressors. The model I am looking at is $y=X_1\beta_1 + X_2\beta_2 +u$  So the first step would be to regress $X_2$ on $X_1$: $$ \begin{align} X_2&=X_1\hat{\gamma}_1+\hat{w}\\ &=X_1\hat{\gamma}_1+M_{X_1}X_2 \end{align} $$ with $M_X$ being the orthogonal projection matrix ($M_X=I-P_X$). The second step is then to regress $y$ on $X_1$: $$ \begin{align} y&=X_1\hat{\gamma}_2+\hat{v}\\ &=X_1\hat{\gamma}_2+M_{X_1}y \end{align} $$ And the third step would be to regress the residuals of the previous regressions on each other: $$ \begin{align} \hat{w}&=\hat{v}\beta_2+u\\ M_{X_1}y&=M_{X_1}X_2\beta_2+u \end{align} $$ Can somebody tell me whether this would be a correct way of describing this result and in particular whether the residuals in the last equation $u$ are equal to the residuals in the model?


Despite water being a conductor how does light pass through water.[note: electric field inside a conductor is zero due to gauss' law]


Why does Math.floor() produce different results in JavaScript when using an operation as argument?

I'm currently investigating a bug in our system which is related to rounding errors. I just discovered that Math.floor() produces different results when using an operation as argument - e.g.: Math.floor(1681); // produces 1681 Math.floor(16.81 * 100) // produces 1680 Math.floor(16.811 * 100) // produces 1681  Can anyone explain why? This is hurting my brain.


How to code the complete graph $K_8$ but with two edges between each vertex?

I understand it would look horribly cluttered -- but I can't figure out how to even go about starting to create this in LaTeX.  See:


I want to export an FBX with textures. How do I do it? All I get is the model without textures. Please explain with as much detail as possible. Basically I want to convert an GLB into FBX with textures because Unity doesn't like GLB.


Why is the flag link hidden on review pages?

The links share | edit | close | flag are hidden when viewing the post from a review queue. I know we don't need share, and edit is already a button above. But there are cases where we should flag, (e.g., flagging for spam or migration) instead of, or in addition, to casting a close vote. The flag link should either be shown below the question under review, and/or as a button next to 'Edit.'


When is it correct to return a null reference type in C#

I have a C# method that is expected to return an object. I would prefer if this method does not throw any exceptions.   My question is, is it acceptable to let the method return null and therefore give the null check responsibility to the caller without further warning?  Should the called assume that the object may be null, simply because it is a reference type? (And the default value of reference types are null:   )  Please see my example below  // this method is expected to return an object public MyClass getObject() {   MyClass myObject = null;   // Another option would be to initialize to a new instance, calling the default constructor and not setting any properties    // MyClass myObject = new MyClass(); // no null check needed by the caller, but it is a pretty useless object     try   {     // just as an example       myObject = new MyClass();   }   catch (Exception e)   {     Console.WriteLine(e.Message);   }   return myObject; // will return null when and exception occured }  public class MyClass {   public int id { get; set; }   public string name { get; set; } }


Sometimes In order to get the effect I want I'll subdivide more than I need, then use Limited Dissolve to remove unused areas.  I just noticed that it sometimes (or maybe always?) leaves the separate edges/verts that were there from the original subdivision.  Is there a way to prevent this or clean up verts that do nothing?   Thanks!


When to use function reference instead of function pointer in C++?

When to use function reference such as  void (&fr)() = foo; fr();   instead of function pointer such as  void (*fp)() = &foo; fp();   Is there something function pointer can't do but function reference can?


How to select the row with the lowest value- oracle

I have a table where I save authors and songs, with other columns. The same song can appear multiple times, and it obviously always comes from the same author. I would like to select the author that has the least songs, including the repeated ones, aka the one that is listened to the least. The final table should show only one author name.


Can Two Or More ATTinys Share One External Crystal?

I've got two I2C Slave ATTiny85 chips both running at 16MHz with external crystals. Can they both share a single crystal with the 22pf caps? Is there anything wrong with this?   I don't have any free pins on the ATTinys to route a clock signal out of one ATTiny into another.   If there's some type of external clock circuit, how is that constructed and connected/shared with both ATTinys.         – Schematic created using


Can  I find a continuous function  f  :R to R such that for every real number  c  ,f (x)=c has exactly  three  solutions . I tried but I couldn't  get any idea


If the number of units of a ring is odd, then the ring has cardinality as a power of two

If the number of units of a finite ring is odd, then  does the ring has cardinality as a power of $2$? I think yes. For fields, it is trivial. For non-fields, it is a hard question for me. I saw a paper  that sates that an odd number is the cardinality of the group of units of a ring if it is of the form $\prod_i (2^{n_i}-1)$. But, that proof is quite lengthy, and still the ring need not be a power of $2$. Any short proof? Thanks beforehand.


Why do we convert string to charArray when we do operations on a string?

When I do algorithm exercises, I found many people like to transfer a string to charArray before do operations?   I don't understand why do we bother do that? I mean, I can use string.charAt(), why use string.toCharArray() and then charArray[i]? It's the same and even charArray use O(n) memory.  Can anyone explain that to me?


Negative Moments and Binomial Distribution

Let $X$ be a random variable with a distribution given by $\mathrm{Bin}(n,p)$ for $p$ in the open unit interval. Compute the moment $E(1/(X+1))$, where we define the negative moment of order $n$ by $E(X^{-1})$ for $n>0$ integer.     How would one do the above computation? I've tried for a while to no avail. I was thinking that perhaps one could manipulate the $1/(X+1)$ term so that the evaluation of the sum becomes easier (kind of how we use $X^{2}=X(X-1)+X$ for some computations).  Thanks for the help!


How is possible that somebody with little reputation (as little as 20) can edit my posts? I got a notification about a suggested edit, but I couldn't find how to reject it, and when I opened the post, the changes were there and I had to undo them manually.


How do I set default accounts for YouTube and GMail?  I have an email for school and an email for personal use. How can I make it so that, in Chrome, when I go to YouTube it logs me into my personal account but when I go to GMail it logs me into my school account?


Suppose λ ∈ [0, 1]. Suppose also F and G are distribution functions. Prove that (1 − λ)F + λG is also a distribution function.  I know a function a a distribution if  the random variable X is less than or equal to x of function  and if λ equals something in between 0 and 1 and including them would result just in a multiple of F and G expect in cases when λ is 0 and G becomes zero,   what does multiplying a distribution function by a constant do to it?


How to enumerate questions alphabetically

Is there a method like {enumerate}, but which can enumerate questions in alphabetic order, As in the list in Question 2 in the image below.    I tried something like this:  \documentclass{article} \usepackage[utf8]{inputenc}   \begin{document}  \section{} \subsection{} \begin{enumerate}     \item     \item \end{enumerate} \end{document}


Is it better to use device channels (sharepoint) or media queries (css) for large sharepoint sites?

I am building a large sharepoint site. Visitors will use various devices to access the site. Should i use device channels to control the display of elements or would it be more advisable to use css media queries???  Thanks!!


Let $X \sim N(0, \sigma^2)$. Obtain the density of $Y = |X|$.   Thoughts:  Since a normal density with mean $0$ is symmetric about the $y$-axis, and since $|X|$ doesn't take on negative values, its density is identical to the density of $X$, but multiplied by a factor of $2$ so that $ \int_{0}^{\infty}f_{|X|}(x)dx = 1 $  Edit about possible duplicate  Instead of going through all the calculations to find the pdf of $Y$, it's more elegant to come up with a 1-line solution based on correct reasoning about the problem.


What is the difference between security, updates, proposed and backports in /etc/apt/apt.conf.d/50unattended-upgrades?

I see the following lines in /etc/apt/apt.conf.d/50unattended-upgrades. But I'm not able to find the man page for them. Could anybody point me the detailed document for each of them? Thanks.  Unattended-Upgrade::Allowed-Origins {   "${distro_id}:${distro_codename}-security";   "${distro_id}:${distro_codename}-updates"; //  "${distro_id}:${distro_codename}-proposed"; //  "${distro_id}:${distro_codename}-backports"; };


Build of SLR lens vs point-and-shoot lens

There are point-and-shoot cameras that offer large range of angle of view. For example, Nikon P900 with 24mm-2000mm.  How such lenses exist only in point-and-shoot and too at a very low price? Why does the same equivalent lenses in SLR cost very high?


In order of importance:   Add a reason field for rollback Notify the author of the edit that's being rolled back of the rollback and the reason Notify the approvers of the edit too (if they exist due to editor's low reputation) of the rollback and the reason   A few times after I've received edit notifications for answer of mine, which other users have (incorrectly!) approved, I have then rolled back the edit, because the edit was in fact wrong. I really wanted to add a message for why the edit was rolled back.  Why isn't there a field to add a (optional) message for why the edit is being rolled back, similar to the "Edit summary" field for an edit?  In addition to the message field, I really wanted the other user to be notified about the roll back, and notify tell the users who approved the edit (if any), so they are more careful in the future.


I don't have administrator account on my mac

On my mac I have 2 accounts and the both are normal account. So in this moment I don't have a Administrator account, only one that was in the past a administrator, but now is not.  How I can have again a Administrator account?


Hi I am new to Scala and the following behavior is really weird. Is Scala making mistake even for this simple calculation? Or I am doing something wrong?  Thanks,  scala $ Welcome to Scala 2.12.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111). Type in expressions for evaluation. Or try :help.  scala> val radius:Double = 10.2 radius: Double = 10.2  scala> radius * 10 res0: Double = 102.0  scala> radius * 100 res1: Double = 1019.9999999999999  scala> radius * 1000 res2: Double = 10200.0


Error Sending mail through Gmail SMTP relay

I'm working on building a contact form for my new Web site and want to send mail through Google's SMTP relay server (smtp-relay.gmail.com) because I want to set up a "dummy", "no-reply" address from which to send the mail. Also, I tried sending it through the regular SMTP server (smtp.gmail.com) using my own actual Gmail credentials for that account and it got blocked as an insecure app. I'd rather not turn on the "" option (it's not really an option for me anyway because I use 2FA on this account), so this seems like the best way to get there - if I can get it working. The domain's mail is hosted in G Suite and I've configured the SMTP relay service in the  for my domain as per the instructions in the support article, . I have the relay configured using both the public static IP address of my Web site, as well as the static IP address of the firewall behind which the Web server lies. I configured the relay to accept mail from my domain(s) to allow for the "dummy" address that doesn't actually have a mailbox, and set it to require SMTP Authentication and TLS encryption:  I've set up DNS records for MX, SPF, and DKIM with my domain registrar.  I've waited over 24-hours for the changes to take effect (as per the notification when making the changes in the Google Admin Console) I've even set up an app password for my Web site to use for my domain e-mail address:  I'm using an ASP.NET (VB) Web site on IIS. My code for sending looks like this: Dim NewContact As New System.Net.Mail.MailMessage()  With NewContactMessage     .From = New System.Net.Mail.MailAddress("no-reply@mydomain.com")     .To.Add("myaddress@mydomain.com")     .Subject= "TEST MESSAGE"     .IsBodyHtml= True     .BodyEncoding = System.Text.Encoding.UTF8     .Body = "This is a test."     .Priority = System.Net.Mail.MailPriority.Normal End With   Dim Server As New System.Net.Mail.SmtpClient()  With Server     .Port= 587     .Host= "smtp-relay.gmail.com"     .EnableSsl= True     .Send(NewContactMessage) End With  However, when I try to submit my contact form, I get an error, Mailbox unavailable. The server response was: 5.7.1 Invalid credentials for relay [X.X.X.X]. The IP address you've:  It looks like there should definitely be more to that actual error message, but it's apparently being truncated somewhere along the way. I've tried feeding the credentials in the SmtpClient block: With Server     .Credentials = New System.Net.NetworkCredential("myaddress@mydomain.com", "my_app_password")     .Port= 587     .Host= "smtp-relay.gmail.com"     .EnableSsl= True     .Send(NewContactMessage) End With  In this case, I get a different error: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Authentication Required. Learn more at. (If I use the credentials with the "default" Gmail SMTP server (smtp.gmail.com), I get the same error.) According to the Audit Logs, it appears that all of my configuration setting changes have completed. Everything appears to be correct for this to work, but what am I missing?


Is the next claim about automorphism group ${\rm \mathit Aut} _\mathbb{Q} (\mathbb{C})$ correct?

Let $G={\rm \mathit Aut} _\mathbb{Q} (\mathbb{C})$ be the automorphism group.  $K \subset \mathbb{C}$ is defined as $K =\ \bigr\{ \alpha \in \mathbb{C} \  |\  \sigma(\alpha) = \alpha \ ( \forall \sigma \in G)\bigl\}$ .  Then $K= \mathbb{Q} \ $ is true??


I am still learning Tkinter and I am trying to make a simple programe that on a button click will gen three random nums but the def will not change the var, it will print it to the console but will not change the vars  from tkinter import * import random  firstNum = 0 secondNum = 0 thirdNum = 0  def PickNewNums():     firstNum = random.randint(1, 100)     secondNum = random.randint(1, 100)     thirdNum = random.randint(1, 100)     print(firstNum)     return firstNum, secondNum, thirdNum  root = Tk()   mainTitle = Label (root, text = "Amazing Title") newNumbers = Button(root, text = "Get New Numbers", command=PickNewNums)  firstNumber = Label(root, text = firstNum) secondNumber = Label(root, text = secondNum) thirdNumber = Label(root, text = thirdNum)  mainTitle.pack() firstNumber.pack() secondNumber.pack() thirdNumber.pack() newNumbers.pack(side = BOTTOM) root.geometry("600x300") root.mainloop()   Thanks for any help here guys!


Defining metrics as a function to something other than the reals.

Generally speaking, a metric for a space R is defined as a function from RxR -> Reals, but does it have to be? Can we define it in more generic terms such as a function from R to a field with certain properties?


Using an object clone method and a for loop to push objects into array, the objects are all still the same reference and are the same in the array

let promiseArr = [];     for (let i = 0; i < ISOarr.length; i++) {         options.body.start_time = ISOarr[i];         let newOptions = cloneOptions(options);         promiseArr.push(newOptions);     }     console.log(promiseArr);  Returns an array of the same object. Clone method: cloneOptions = options => {     let clone = {};     for( let key in options ) {         clone[key] = options[key]     }     return clone; }  So my question is how do I push an object that is not the same reference as the previous objects pushed, because even with it supposedly creating a new clone each loop it still somehow creates the same referenced object. In the loop if I console.log I get the proper output with the value of the key changed, but once it's pushed into the array and we console.log the array, all objects are the same. Any suggestions would be super helpful. Thank you in advance!


Python: How to ignore an exception and proceed?

I have a try...except block in my code and When an exception is throw. I really just want to continue with the code because in that case, everything is still able to run just fine. The problem is if you leave the except: block empty or with a #do nothing, it gives you a syntax error. I can't use continue because its not in a loop. Is there a keyword i can use that tells the code to just keep going?


I'm getting sick of version numbers in tag names (aka version tags). Look,      I just want them all to be just . They are all about JSF. I browse and answer questions about JSF. I don't want to browse in all those different tags. I don't want gold badges for both  and . I can't hammer a duplicate  question because I don't have a gold badge for that. Across years I observed that a version tag is usually only picked by the asker when a "relatively new" or "relatively old" version is being treated in the question. When the "currently mainstream" version is being treated,  or when the asker is "more proficient" in the language, then askers often just pick the versionless . While moving in time, this may cause confusion by future readers when the version isn't explicitly specified anywhere in the question. I try to maintain them by adding/removing the version tag depending on its relevance, and by adding the versionless tag when it's absent. It only feels a neverending story. I'm sure other tag caretakers also have mixed feelings on this. I propose to normalize the version from the tag name:  Ban version numbers in tag names in the model (not in the UI). Add an optional single-choice version field to the Tag entity in the model. Users with edit privileges (no suggested edits please) must be able to change versions. Users with gold tagbadges must be able to add and edit versions. I'd imagine the version edit thing to be reachable via that tag info popover (when you hover the tag). Tags themselves however should look exactly the same, the version just separated with e.g. a hyphen from the tag name.  When in place, migration of existing version tags should be piece of cake. There's apparently already a script in place which recognizes version tags, it could be reused to re-match current tags and extract the version from it into the new version field. The alternative would be to automatically add the versionless tag when a version tag is being used. But this is IMO only tag pollution.  I'm posting this on meta.se instead of meta.so because version numbers aren't only on SO a problem, but on basically all HW/SW related sites.


Biblatex displaying second author as first initial + last name for Chinese authors only?

Quite puzzled by what is going on.   Biblatex consistently displays the second author as first initial + last name, but seems to do this for Chinese authors only. Which does not seem possible or logical.  For example, (1) returns Ding and M. Zhang (2015), while (2) returns Nevins and Anand (2003). I use the authoryear format.   Any clue of what the issue may be?  (1)  @inbook{ding2015, Author = {Jiayong Ding and Min Zhang}, Publisher = {Commercial Press}, Title = {VP patterns in Xiang dialects on the semantic map of ditransitives}, Url = {http://repository.ust.hk/ir/Record/1783.1-78869}, Year = {2015}, Bdsk-Url-1 = {http://repository.ust.hk/ir/Record/1783.1-78869}}  (2) @inproceedings{nevinsanand2003, Author = {Andrew Nevins and Pranav Anand}, Booktitle = {WCCFL 22 Proceedings}, Editor = {G. Garding and M. Tsujimura}, Pages = {370-383}, Publisher = {Cascadilla Press}, Title = {Some AGREEment Matters}, Year = {2003}}


E is closed. K is compact. Show that every open cover of $E\cap K$ has a finite subcover

Let me know what you think (By the way, we are assuming our universal set to be $\mathbb{R}$)  Proof Let $U$ be an open cover of $E\cap K$ $U\cup(\mathbb{R}\backslash E)$ is an open cover of K Since K is compact $U\cup (\mathbb{R} \backslash E)$ has a finite subcover Choose $U_n=U_1\cup U_2\cup ...\cup U_n$ as a finite subcover of $U\cup(\mathbb{R}\backslash E)$ So $K \subseteq U_n \subseteq U\cup(\mathbb{R}\backslash E)$ But also note that $E\cap K \subseteq K$ Then, putting it altogether, we have $E\cap K \subseteq K \subseteq U_n \subseteq U\cup(\mathbb{R} \backslash E)$ $E \cap K \subseteq U_n$ Thus $E \cap K$ is compact  But this doesn't seem to tell me that $U$ has a finite subcover. If $U$ doesn't have a finite subcover, then my argument is null. Any advice on where I'm going wrong?


Proof that $H \cap K$ is a group if $H$ and $K$ are subgroups of $G$

I need to show that if $H$ and $K$ are subgroups of $G$, then $H \cap K$ is also a subgroup.  My working:  $I \in H, I \in K$, $I$ is unique $\implies I \in H \cap K$, so identity present in $H \cap K$  $h_c \in H \implies h_c^{-1}\in H$ and   $h_c \in K \implies h_c^{-1}\in K$ so  $h_c \in H, h_c \in K \implies h_c \in H \cap K$ and  $h_c \in H, h_c \in K \implies h_c^{-1} \in H \cap K$  so inverse of every element present in $H \cap K$.  $h_c, k_c \in H \implies h_ck_c \in H$  $h_c, k_c \in K \implies h_ck_c \in K$  $h_c, k_c \in H, h_c, k_c \in K \implies h_c, k_c \in H \cap K$  $h_c k_c \in H, h_c k_c \in K \implies h_c k_c \in H \cap K$  so $H \cap K$ is closed.  Is this correct? Do I need to say anything else?


Why do we neglect the hydrostatic pressure difference in a hydraulic lift?

If we have a simple hydraulic lift with one piston which we push down (piston A), and the other piston (piston B) which is below the first one, why do we neglect the hydrostatic pressure difference in our equations?                                                        Textbooks give the following equation: $$\frac{F_b}{A_b} = \frac{F_a}{A_a}$$  But why shouldn't that be like the following?: $$\frac{F_b}{A_b} = \frac{F_a}{A_a} + \rho g h$$  where h is the height difference between the pistons.  In short, why don't we consider the hydrostatic pressure difference due to the weight of the fluid in the vertical columns of a hydraulic lift and only consider the pressure due to the weights above the pistons?


How do posts get closed as duplicates vs exact duplicates?

I've come across some posts that said they were closed as exact duplicates, and some that were closed as duplicates.      The first image is a duplicate question and the second one is an exact duplicate.  How does a question get closed as a duplicate and how does it get closed as an exact duplicate?


REST API filter by start and end dates using 'today'

I'm new to filtering dates with REST in SP but am trying to do something like below but am not sure how to get today's date in as a variable into the request. I don't think I'm too far off so any help is greatly appreciated.       var today = new Date();     $.ajax({         url: "/_api/web/lists/GetByTitle('DateItems')/items?$orderby=SortOrder asc&$filter=StartDate le datetime'" + today + "' and EndDate ge datetime'" + today + "'",         ...     });


After rejecting a suggested edit and cancelling, I can't continue

Steps to reproduce:   Click Reject   Click the X in the corner to close the reject window   This happens forever (until a refresh)    3a. Also, I see a JS error:     I'm using Chrome 31.0.1650.48, on Windows 7.  The same problem occurs when I press Esc, but clicking outside of the popup box does not seem to cause this issue.


What is the Ubuntu equivalent of the Windows Start Menu?

Is there an equivalent of the Windows "Start Menu" in Ubuntu from where all installed programs can be easily accessed?


Cannot create custom config entity fails because ID is blank

I have created the following custom config entity. When I try to create a new one, I get the following error:  Drupal\Core\Entity\EntityMalformedException: The entity does not have an ID. in Drupal\Core\Config\Entity\ConfigEntityStorage->save() (line 248 of core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php). Drupal\Core\Entity\Entity->save() (Line: 637) Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 151)   My understanding is that the entity system will create an ID for this entity, but it doesn't seem to be working in my case. I'm struggling to figure out what I need to change to get this work:  <?php  namespace Drupal\example\Entity;  use Drupal\Core\Config\Entity\ConfigEntityBase; use Drupal\example\Entity\ExampleConfigInterface;  /**  * Defines the ExampleConfig entity.  *  * ExampleConfig config entities define a configuration for a specific  * entity/bundle. Per entity settings are then saved as ExampleContent  * entities.  *  * @ConfigEntityType(  *   id = "example_config",  *   label = @Translation("Example configuration"),  *   fieldable = FALSE,  *   handlers = {  *     "list_builder" = "Drupal\example\ExampleConfigListBuilder",  *     "form" = {  *       "add" = "Drupal\example\Form\ExampleConfigForm",  *       "edit" = "Drupal\example\Form\ExampleConfigForm",  *       "delete" = "Drupal\example\Form\ExampleDeleteForm",  *     }  *   },  *   config_prefix = "example",  *   admin_permission = "administer site configuration",  *   entity_keys = {  *     "id" = "id",  *     "example_entity_type" = "example_entity_type",  *     "example_bundle" = "example_bundle",  *   },  *   links = {  *     "edit-form" = "/admin/config/content/example/{example_config}",  *     "delete-form" = "/admin/config/content/example/{example_config}/delete",  *   }  * )  */ class ExampleConfig extends ConfigEntityBase implements ExampleConfigInterface {    /**    * The ID of the block.    *    * @var string    */   protected $id;    protected $exampleEntityType;   protected $exampleBundle;   protected $exampleExpiry;   protected $exampleDefaultStatus;    /**    * Get the bundle    */   public function getExampleBundle() {     return $this->exampleBundle;   }    /**    * Get the entity type.    */   public function getExampleEntityType() {     return $this->exampleEntityType;   }    /**    * Get the expiry time for this configuration.    */   public function getExampleExpiry() {     if (!$this->exampleExpiry) {       return example_expiry_default();     }     return $this->exampleExpiry;   }    /**    * Get status for this configuration.    */   public function getExampleStatus() {     return $this->exampleDefaultStatus;   }  }   I have ended up prefixing all the custom properties to try to make sure I wasn't overriding something on accident. Even when the custom entity is blank, it still won't add.


If I can't vote for my posts, why do I see voting buttons for my posts?

This seems a no-brainer: Remove voting buttons for logged-on user's posts.  If there were no buttons on my posts, there wouldn't be a need for the "You can't vote for your own post" message, because it would be impossible to vote for your own post.    The way it currently stands is actually nonsensical, because you can vote for your own post - there's a button right there and I can click it - but when I vote for my post I get an error message.  Put another way, there's an active control presented to the user that will always and can only produce an error. I'm not a UX design expert, but that doesn't sound like good design to me.    Notwithstanding a backend check to prevent malicious calls.


unable to access mounted iso through terminal

Can anyone tell me please what I'm doing wrong?  PS: here is a link:


What's the fastest way to level up in GTA online? I want't to level as fast as possible to beat my friends. But what is the fastest way to level up?


filling area between 2 functions, with shading

I would like to plot two (rather simple) functions f, g over domain -2:2 and fill the area between them. The fill color should be red if f > g and green if f < g (for example), and in later stage also shaded depending the x coordinate (to show weighting of the difference).  So far I got to filling the area between them with uniform color with  \documentclass{minimal} \usepackage{tikz,pgfplots} \begin{document} \tikz[scale=.6,domain=-2:2]{     \begin{axis}[axis on top=false, axis x line=middle, axis y line=middle,stack plots=y]         % plot first function         \addplot+[mark=none] {.55*x+.13} \closedcycle;         % substract first function from the second one, since they are stacked, and fill that area         \addplot+[mark=none,fill] {.2*x^3-.05*x^2+.2-(.55*x+.13)} \closedcycle;         \addplot+[mark=none] {0} \closedcycle; % should make the second function visible?     \end{axis} } \end{document}     with the following problems/questions:   the second function is not shown, it is only border of the filled area how to make the fill color different depending on the sign of the difference? how to shade it depending on x? would I finally be better off using plain TikZ, perhaps specifying the functions as splines?


Finding instantaneous rotation and translation from multiple forces

I'm having trouble extrapolating torque, rotation, and such into the information I want.  I'm trying to set up an estimation of a sea ship's movement for a game. The system is 2D. The ship has multiple arbitrary forces acting upon it to represent propulsion. I am assuming the ship is always stationary and facing forward. I want to get the rotational and translation accelerations for this simple ship and use them to change the velocities of a moving ship.   Does this approach make sense?   If so the main question is: 2. How do I determine how fast it accelerating in x,y and θ?  And relatedly   If there are opposite rotational forces, say +80 and -60 units, you would get +20 units rotation, but would the 60 that cancels out be converted back to translational force and added back into x and y?     Note: Ignoring other forces such as drag, which will be calculated separately. I understand all of the math just not the physics. The biggest problem I have is splitting up the forces and vectors in the correct way.


American citizen travelling to London from Ghana - do I need a UK visa?

I am a naturalized American travelling to Ghana and UK. I know I need a visa for Ghana, but what do I need to show at the Ghana airport coming to UK?


How to display the label with "Identify Features" in QGIS?

I have been struggling for one hour with this simple problem (QGIS 1.8.0-Lisboa, Windows 7) :  I have a raster layer. I would like to display the label and not only the band value when I use the Identify Features button. Is it possible?


Let $a_1,a_2,\ldots,a_n$ be positive real numbers.Prove that...

Let $a_1,a_2,\ldots,a_n$ be positive real numbers.Prove that  $$\lim_{x\to 0}\bigg(\dfrac{a_1^x+a_2^x+\cdots+a_n^x}{n}\bigg)^{\frac{1}{x}}=\sqrt[n]{a_1a_2\cdots a_n}$$ Got no clue where to begin from though looks like somewhat AM-GM property! Please help!


Appropriate word for "intermediate approach"

In a paper, I need to mention something meaning "intermediate approaches" and looking for a suitable word or phrase for that.  For example:  Approach 1 is ...  Approach 2 is ... (Approaches 1 and 2 are the two opposite extremes of the possible approaches)  We have studied many intermediate approaches [between approach 1 and approach 2] and the results are shown in Fig. 1.


Let $\Omega, F, P)$ be the classic setting. I saw that if $f$ is a function which satisfies some assumptions then the integral with respect to the brownian motion is Gaussian. Ie $\int_{0}^{t} f_u dB_u \sim normal$  1)How we can see this gaussianity?  Ok generally, the integral of a progressively measurable process $f$ is a limit of the integrals $I(f^{n}) = \int_{0}^{t} f^{n}_u dB_u$ where $f^{n}$ are simple processes and these integrals are gaussian by definition. In fact we have also $L^{2}\Omega)$ convergence which implies weak one. So the distribution functions of $I(f^{n})$ random variables  converge uniformly( for all $x \in R$) to the distribution function of $I(f)$. But why this implies gaussianity of $I(f)$. Ok I get that the distribution function of $I(f)$ should be continuous but why gaussian? Actually this is a simple question in probability theory but I'm just thinking about it )))  Thanks


Can I restrict what biomes appear in my world?

Ok, so for the last few worlds I have created, I did a bit of exploring, and so far the norm has been:   Plains Forest Birch Forest Hills (If I'm lucky) A Swamp   These seem to be the only biomes that want to spawn in my world. I can find others, if I go searching for them (flying about in creative).  Basically, I'm sick of this world generation. I want a bit more diversity in my worlds, so I was wondering what can I do to open up a bit more of a biome diversity in my world? Eg. restrict what biomes do/don't spawn?


Residuals correlated positively with response variable strongly in linear regression

I did the multiple linear regression on a dataset of 412 observations, with one response variable (Y) and 25 explanatory variables(X1-X25). Y and most of Xs are not normally distributed. Besides, there are some correlation between several Xs. The plot show that the residuals strongly correlated with Y positively and weakly correlated with fitted Y negatively.(Sorry.As I'm newer in this website, I am n't allowed to post images.)  To address these problems, I have tried the principle component regression, the weighted least squared regression and the ridge regression. They all didn't work. I want to know what's wrong with the regression. Why did the residuals correlate with observed Y so obvious?


Where the hell is it?! I've been looking for ages and I can't find it! I want to find it so I can change the resolution of War Thunder as it doesn't have my native resolution.


What are some good ways to showcase someone's portfolio work online?

I've been happily employed for awhile now, so I've not kept up on various trends and changes in the online portfolio field. I would like to remedy this knowledge gap.  I can do a search for "best online portfolio sites" but a search like that is a little  tainted by people who want you to buy their solution.   If you've made a portfolio site for yourself or a client, what are you using?  It seems to me that you can use a service like Behance (but are there other services that are equal or better in terms of features, ease of use, ads, etc.?), adapt a theme to a blog/CMS WordPress or Tumblr, or build something from scratch.  If it's necessary to narrow the scope of the question a bit, I'd say that the ideal portfolio site looks modern but not trendy, has a great user experience, and is easy to update. Preferably, it can be self-hosted, unless people have found that going on a dedicated social network is better.  It'd be interesting to hear answers from graphic designers who don't code a lot as well as web designers who do it for a living.


Power law fitting of data with uncertainties

I need to fit data points on a power law and each one of these carries an uncertainty.  I've been using Python, more precisely scipy.optimize.curve_fit to get the job done but I don't know how to handle the uncertainties with it.  I thought about using a linear fit in log-log scale but it seems less precise compared to fitting directly on a power-law (not taking care of the uncertainties, just testing both on generated data and added noise).  I found  but it's not really helping me.  I wouldn't mind using R to do the job if needed.


Find a lower bound for the size of a binomial coefficient.

I'd like to show that $${n \choose k} \ge \left( \frac{n}{k} \right) ^ k$$  I understand that $\forall \delta \ge 0$, $$\frac{n}{k} \le \frac{n-\delta}{k-\delta}$$ since as $k \le n$, then $k - \delta \le n - \delta$, thus as $\delta$ grows, the fraction grows too. But I can't show it formally.


How to parse doc files on a mac with python?

I've searched and found pywin32, but I can't seem to install it on the mac. Any suggestions? I want to parse doc files I have.   I'm specifically looking to parse DOC files, not DOCX.


Is it not possible to use Dynamic binding of sObject fields in a Lightning Component?

I'm trying to loop a list of sObject fields and displaying the fields as column in a table.  In Visualforce, we could bind an sObject field like value="{!Contact[fieldName]}". But I'm unable to make this happen in a Lightning Component.  I'm trying to output my field data like this:  <aura:iteration items="{!v.contactColumns}" var="col"> <td> <ui:outputText value="{!'contact.' + col.fieldName}"></ui:outputText> </td> </aura:iteration>   But it is displaying Empty output, without any value.  Am I doing it wrong in preparing dynamic field value binding for ui:outputText in above code?  Ive even tried using force:outputField without any luck and same empty value output:  <force:outputField value="{!'contact.' + col.fieldName}" />


Excuse me for the title I know it's not so descriptive so I describe my point with a sample image:  I want to fill that white/gary grid with a third color(red e.g) based on the transparent brain like image. like this:  How to do this?


centering within a table cell not working in one cell only

I'm trying to create a table using custom columns as explained . For some reason in the last row of my table the very left column is not centered horizontally and I don't know why.  Here is the code im using:  \documentclass[                 german,                 paper=a4,                 oneside,                 DIV=15,                 12pt,                 parskip,                 headsepline,                 cleardoublepage=empty,                 ]{scrreprt}               \usepackage[automark, autooneside=false]{scrlayer-scrpage} \clearpairofpagestyles \usepackage[latin1]{inputenc} \usepackage[english,ngerman]{babel} \usepackage[T1]{fontenc}     \usepackage{lmodern} \parindent 0pt \usepackage[onehalfspacing]{setspace} \usepackage[decimalsymbol=comma,             loctolang={DE:ngerman,UK:english},             ]{siunitx} \usepackage{wg_makro} \usepackage{ wasysym } \usepackage{caption} \DeclareCaptionFont{white}{\color{white}} \DeclareCaptionFormat{listing}{\colorbox[cmyk]{0.43, 0.35, 0.35,0.01}{\parbox{\textwidth}{\hspace{15pt}#1#2#3}}} \captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white, singlelinecheck=false, margin=0pt, font={bf,footnotesize}}  %*************************************************************** %this is where I defined the new columntypes \usepackage{array} \newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}} \newcolumntype{M}[1]{>{\centering\arraybackslash}m{#1}} %*************************************************************** \usepackage{chemmacros}  \begin{document}  \begin{center} \begin{table}[H]     \begin{tabular}{|M{3cm}|M{2.5cm}|M{2.3cm}|M{2.2cm}|M{2.5cm}|M{3.25cm}|}         \hline         Substrat & Abmessungen & Leitfähigkeit & Orientierung & Dotierung & Brechungsindex \newline $( \lambda = \SI{632,8}{\nano\meter})$ \\   \hline\hline         p-Si & \diameter: \SI{2}{"} \newline H: \SI{1}{\milli\meter} & \SI{0.1}{\ohm\meter} & <100> & Bor-Dotiert & \num{1,5667-i0,016}\\ \hline         n-Si & \diameter: \SI{2}{"} \newline H: \SI{1}{\milli\meter} & \SI{0.1}{\ohm\meter} & <100> & Bor-Dotiert & \num{1,5667-i0,016}\\ \hline         p-Si \newline \ch{SiO2} (\SI{200}{\nano\meter}) & \diameter: \SI{2}{"} \newline H: \SI{1}{\milli\meter} & \SI{0.1}{\ohm\meter} & <100> & Bor-Dotiert & \num{1,5667-i0,016}\\ \hline     \end{tabular}     \caption{Haupteigenschaften der verwendeten Substrate}     \label{tbl:substrate} \end{table} \end{center}  \end{document}     This is what I get as an result:    I added a red line so one can immediately see the wrong alignment.  So my question is: How do I align the last "p-Si" with the ones in the cells above?


A man begins to suspect there is something wrong in his city, in which, we notice, product offers are repeatedly made to him.  The denouement is that the town all died in an industrial accident and their spirits are being used in an advertising experiment, and they are living in a table top model of the town. I am looking for the name of this episode from the TV Show Twilight Zone.


Confused about elements and attributes in XML

I have recently started learning XML and very much confused about the use of elements and attributes. I have read many articles and some rules of thumb but still unable to get a clear picture of when to use what. For example one good rule of thumb is to use single valued data as attributes and multiple valued data as elements. Another to represent data as elements and meta data as attributes. Some articles say describe several other approaches or rules. I have several questions in mind and will much appreciate if any one can help me in understanding   What if the data is single valued ? Should I make it an attribute or an element. E.g. Marital Status of a person is single valued at the same time its data. What will be a difference in an attribute and element in such a case?  For example Date of birth is also a single valued data but many forums suggested making separate elements for day month and year and some suggested making a date of birth element and day year and month its attributes. What is the difference How will either approach help?  what is more useful for search operations and how ? If I want to design it in such a way that its more useful and efficient for searching what shall I do. For example what difference an element or an attribute of date of birth will make for a search operation I.e. if I want to search people born in 1980 or blah blah.


"[In] any way, shape, or form" is a rhetorical idiom, in which shape and form tend to function as intensifiers. It is normally used for emphasis where the non-idiomatic phrases "[in] any way" or "[in] any form" would have been sufficient, and perhaps clearer. It is  (Colonial Times), already as a fully-formed idiom. Since this source is a provincial newspaper that can hardly have been responsible for popularizing the phrase, it must already have been in use before that time. However, I could not find any discussion whatsoever regarding its origins.  Earlier examples are found (around the 1790s) of the phrase in any shape, having much the same meaning, in both  and  usage (Mornington; Washington). However, this seems to have disappeared in later usage and been supplanted by the modern three-term form, which may have originated about 1800. , but afterwards  by itself seems either to mean a literal shape, or the sense of shape meaning condition, e.g. "not in any shape to/for [...]".  (Etymonline) that the latter arose about 1865 in AmE, and so cannot have influenced the earlier usage. Thus it seems that the inclusion of shape in the idiom may have been motivated by the existence of the phrase in any shape, using a sense of the word that was seemingly current in the 18th century but had become obsolete by the 20th.  No dictionaries that I consulted included any clear description or origin for the modern idiom, only mentioning that it is indeed an idiom and offering usage examples. I also could not find any detail about the sense of shape employed in the phrase in any shape:  notes in 1828 (Webster) a sense of shape meaning manner, but no further detail is given.  If one understands any way, shape, or form straightforwardly, its emphatic intent is seemingly obscured, rather than strengthened, by the inclusion of what appears to modern speakers as an inappropriate or irrelevant term. My impression is that shape, specifically, is seldom, if ever, appropriate in any current context in which this idiom is used. It could be argued that the emphasis now comes from the contrast between the modern meanings of the various alternatives offered, but if so, it would presumably be understood that at least one of them is usually contextually inappropriate and the phrase is a rather self-conscious cliché.  So, I would like to ask: when and how did this sense of shape originate, and what led it to be displaced by the modern idiom also including way and form? Was the resulting three-term phrase always an essential pleonasm, or are there any attested, or at least reasonably plausible, cases in which way, shape and form are simultaneously applicable without being redundant, in either their original or modern senses?    References:  Colonial Times and Tasmanian Advertiser. Vol. 11, no. 528: Hobart Town, Tasmania. 16th June 1826. Print.  Richard Wellesley, 2nd Earl of Mornington. Letter to Henry Dundas, Fort St. George, 7th June 1799. In The Despatches, Minutes, and Correspondence, of the Marquess Wellesley, K. G.: During His Administration in India, Volume 2, Montgomery Martin, Ed. London: Wm. H. Allen. 35. Print.  George Washington. Letter to Mary Washington, Mount Vernon, 15th February 1787. In The Writings of George Washington from the Original Manuscript Sources 1745–1799, Volume 29, September 1, 1786–June 19, 1788, John C. Fitzpatrick, Ed. Washington, D.C.: Library of Congress, 1939. 160. Print.  Douglas Harper. "Shape", entry in Online Etymology Dictionary. Accessed 21st November 2015. Available:   Noah Webster. "Shape", entry in An American Dictionary of the English Language. New Haven, Connecticut, 1828. Republished as Webster's Dictionary 1828 - Online Edition. Accessed 21st November 2015. Available:


SD card not showing files when connected to pc

When my phone MOTOROLA G3(2015) is updated to Marshmallow, its not showing files when connected to PC. While connecting, it shows options as charing only, PTP, MTP, MIDI. When I select MTP, it shows the external card, but not showing the contents, where as internal memory is detected and all files are shown.


Pork tenderloin was put into hot oven which was accidentally turned off for 1 and 1/2 hours. Was it safe to finish cooking?

I had a partially frozen pork tenderloin that I browned on all sides, then put into a hot oven at 365 degrees.  At some point the oven was accidentally turned off.  An hour and a half later I discovered the oven was warm, but off.  The internal temp of the pork at this point was 120 degrees.  I then turned the oven back on and finished cooking to an internal temp of 180 degrees. It was actually very tender.  Is it safe to eat?


Why are the site icons different sizes when you look at "All Sites"?

I found this site just moments ago and this question is eating away at me. I have compared all their stats, vistis per day, questions, answers, all that good stuff. I made this account just to have this question answered.  Can anyone fill me in on why they are different sizes? I don't even know why this is bugging me so much..


Looking at past events by observing sky?

Since solar system (and our galaxy) is constantly in motion at a great speed, is it possible that we can look at our own image as it was sometime ago? Since the light of that age takes sometime to reach us, is it possible that we can look at earth as it was at that point in time. In more simple case, if I go to Mars and start looking at earth in detail, I will be looking at past as seen from earth, correct? Now, relative to current position of earth, past position would have been very far (much farther than distance between Mars and Earth). So, can we look at past?  As the distance increase, we are looking at older past. Please correct me if I'm wrong.  [Not a homework. Curious question]


Is it possible to get Google to treat a .it domain as a generic top-level domain?

We have the option of using a .it domain which is a ccTLD (country code top-level domain).  We don't want it to be specific to Italy though, we want Google to treat it as a gTLD (generic top-level domain).  It seems like in Google Webmaster Tools I can't change the geo targeting to switch it off from targeting Italy, but I was wondering if there is some other way we can get Google to realize that our .it domain is really a gTLD?   some details I found from Google regarding geo targeting domains.  There's also  question where user  says (in reference to a .nl domain):     You can only specify the region yourself if you have a generic   (non-country specific) TLD such as .com or .org.      However, this does not mean that your site won't appear on google.com   or even google.co.uk, providing your content is deemed relevant to   those users. Having a country specific TLD (or specifying a particular   geographic target for a generic TLD) makes your site more relevant in   a localised search but not necessarily any less relevant in a global   search.   The interesting part there for me is that a .it domain might not be any less relevant in a global search.   Yet to make matters slightly more confusing (given w3d's empirically proven answer above), Matt Cutts says it's a bad idea generally in  video.  Does this mean that our .it domain would appear in Google.it search results first over time, but then would appear on Google.com and Google.co.uk once we have enough relevance, and that this would be the same amount of relevance we'd need if we used a standard .com domain?  Given that we're targeting worldwide traffic should we avoid using a .it domain, or will it not make any difference? What's the real story? I need evidence and sources too please.


$(n!+1,(n+1)!)$ can be rewritten as $(n!+1,(n+1)*n!)$.  I know that if $n!$ is divisible by a prime $p$ then $p$ doesn't divide n!+1. So when I'm looking at then is $(n!+1 , n+1)$ which I can make $(n!-n,n+1)$ by  subtracting $n+1$ from $n!+1$ and since gcd is preserved in linear combinations I  still get the same gcd for $(n!-n,n+1)$. I then look at $n!-n = n[(n-1)!-1]$ again if a prime $p$ divides $n$ I'll find that $p$ doesn't divide $n+1$. So I'm looking at $((n-1)!-1,n+1)$. I've looked at the first few n's and it seems that the gcd is either 1 or n+1. But I'm stuck on how to get there from $((n-1)!-1,n+1)$.   Can anybody provide a hint as to how to proceed?


Proving that if $a^n \equiv 1 \pmod m$ then $d\mid n$

I'm having some trouble proving the following:  Let $d$ be the smallest positive integer such that $a^d \equiv 1 \pmod m$, for $a \in \mathbb Z$ and $m \in \mathbb N$ and with $\gcd(a,m) = 1$. Prove that, if $a^n \equiv 1 \pmod m$ then $d\mid n$.  The first thing that came to my mind was Euler's theorem but I couldn't conclude anything because I'm not very skilled when it comes to using Euler's totient function. Can someone give me any tips or show me how to solve this?


When using Logistic Regression, and the categorical variables are one hot encoded, do we always have to drop a variable to avoid the dummy variable trap? If I recall it correctly, I have seen somewhere that if you use regularization, you don't need to drop 1 variable, but I can't find seem the find the article back. I'm a newbie. Many thanks


I have a chapter of attachments which contains pdf files in this format, using the awesome pdfpages package:  \chapter{Title} Lots of multipage pdfs following \includepdf[pages=-,frame,scale=0.9]{abc.pdf} \includepdf[pages=-,frame,scale=0.9]{def.pdf} ...   This works, but apparently clears out the header and page numbers of the parent document. What setting do I have to change to get back the header and page numbers?


How can I create the compound interest formula in C++ without a math library?

I've been trying to finish an assignment that requires me to run a compound interest formula, but I can only use iomainip and iostream libraries.  do (cout << BaseMembershipFee * pow((ONE+(GoldRate/CompoundMonthly),(CompoundMonthly*years)) << years++) << endl;     while (years < 11);   This works with a math library (I think), but I can't figure out how to make it without pow.  Variables:  const float BaseMembershipFee = 1200, GoldRate = 0.01, CompoundMonthly = 12, ONE = 1; float years = 1;


How come that the system partition is C:\ and not A:\ or B:\?  I know A:\ was used for floppy drives, but why not use B:\ then? And why was floppy drives used as A:\ as if it was more important than the system drive?  In regard of duplicate post I will paste the comment that has been posted below as it sums up what i think:  QUOTE Michael Kjörling:      I'm not sure I agree with that duplicate suggestion. The proposed duplicate asks "what and where are A: and B:?" while this question asks "why is the system partition labeled C:?". The two are certainly related, and answers are going to draw from much of the same knowledge, but the focus is different


Ubuntu install on Chromebook using codestarter script stalling at updates

I'm trying to install ubuntu on my chromebook (acer 720) using the codestarter script here .   It seems to be stalling on the portion of the install script that has to do with installing updates.  I see the message "Installing updates..." from the script but then nothing happens after that.  log_msg "INFO" "Installing updates..." run_command_chroot "export DEBIAN_FRONTEND=noninteractive; apt-get -y -q update" run_command_chroot "export DEBIAN_FRONTEND=noninteractive; apt-get -y -q upgrade"   As near as I can tell from the chrome task manager nothing is happening - no network activity and almost no cpu use.  Advice on how to proceed?


I want to create with TikZ a yellow arrow with black margin (border, edge). I thought I could do this by using two arrows which lie on the top of each other, e.g. with:  \documentclass[12pt,twoside, a4paper]{report} \usepackage{tikz}  \begin{document} \begin{tikzpicture}[yscale=0.25]% \draw[->,black,very thick](-1974*0.107pt,119*0.107pt) -- (-2258*0.107pt,820*0.107pt);%first layer, black arrow \draw[->,yellow,thick](-1974*0.107pt,119*0.107pt) -- (-2258*0.107pt,820*0.107pt);%second layer, yellow arrow \end{tikzpicture}% \end{document}     But I am not so satisfied with the result because the black arrow should be a bit longer.  I know I could play with the end point coordinates of the black arrow so that it fits well. But if I want to change the coordinates of my black-yellow arrow, this means I have to play again with the coordinates of the black arrow, which would cost a while.  Does anyone have a better solution? I would be glad to hear any hint.:-) Thanks in advance!


Standalone Python script to split a polyline with a point layer

I have a polyline layer and a layer of points that are on top of the polylines. I do not have the ArcGis advanced license so I can't use the Split Line at Point tool. Can someone help me with a standalone Python script that will split my polyline by my point layer? (By the way, I know that there is a tool like this in ET Geowizards, but I don't have the license for that so I can't make that tool into a standalone script).


Using WHILE on Python 3 for testing decimal input can't make it work

I'm a newbie on Python programming, and I'm testing some features that I've learned so far. I wanted to create a program that helped me opening the cashier in the morning. I wrote a script that assings a string content to a n variable, so it tests first (with a while loop) if the user typed an alphabetic input. If so, it tells the user that one needs to type a numeric value and calls the input again, to be filled with a string value again. If it's not an alphabetic input, it exits this while loop. Now's the problem. I want it to ask for the user to keep typing numeric (float) values until one wants to exit this module, and then the sum is shown on screen. Inside this while loop, I put a conversion line from string to float, so it can sum the numbers and not only concatenate them together as a string. But I can't seem to make it work. This is the code so far   `n = input('n = ') na = 0.00 while n.isalpha():     print('Valor inválido. Insira um valor numérico.')     n = input('n = ') while n.isdecimal():         n = float(n)         na += n         print('Insira o próximo valor: ')         print('Digite qualquer letra para sair')         n = input('n = ') print('A soma é {:.2f}'.format(na))`   But then, if I type 5.22, for example, it exits the program without showing any errors:      n = 5.22 A soma é 0.00  Process finished with exit code 0   How can I make this while loop work the way I want?   Ah, it works perfectly when I enter integer values on the n variable.  n = 5 Insira o próximo valor:  Digite qualquer letra para sair n = 5 Insira o próximo valor:  Digite qualquer letra para sair n = 5 Insira o próximo valor:  Digite qualquer letra para sair n = 5 Insira o próximo valor:  Digite qualquer letra para sair n = 5 Insira o próximo valor:  Digite qualquer letra para sair n = m A soma é 25.00   Thanks in advance!!


What is the story in which a man and an alien are penpals?

The human has a terminal disease and the alien is incarcerated. The alien has a long lifespan and he wants to travel the universe. Hence, he exchanges "souls" with the human (without the human's consent). The alien couldn't handle paper with his bare hands because he was maybe hot or radioactive. So he sent metal sheets to the human, to write on with acid. I think it is a short story from a collection, written before 90s or early 90s.


What are the rewards for each Steam Level?

As many of you know, Steam now offers a profile level system. Upon leveling up, you seem to receive rewards (eg ability to receive cards from voting on Community Choice, more friends).   As far as we know, what are these rewards, per level? Are there any rewards other than more friend slots? I know that each level gives five more friends, and 10-level milestones grant higher booster pack drop rates (20% more each milestone up to fifty).


Why can a contrail only form below -40 degree Celsius?

I read that contrails can only form if the outside temperature is below -40 degree Celsius. But why not earlier? Water is already super-cooled below 0 degree Celsius. If a condensation nuclei touches the water, it will instantly freeze, from what I understood from :  Contrails form at -40 degrees Fahrenheit (which is also -40 Celsius), or colder. At that temperature the tiny drops of condensed water will instantly freeze.  Now, an aircraft outputs lots of soot, that can also act as condensation nuclei. So, why aren't contrails forming at 0 degree Celsius already? EDIT: For example, let's just take a look at this weather balloon data: ----------------------------------------------------------------------------- PRES   HGHT   TEMP   DWPT   RELH    hPa     m      C      C      %     ----------------------------------------------------------------------------- 955.0    614    3.4   -0.6   75    932.0    812    2.2   -2.0   74    925.0    873    1.8   -2.4   74    885.0   1227   -0.3   -5.3   69    850.0   1548   -3.3   -6.2   80    842.0   1622   -4.0   -6.6   82    797.0   2051   -7.8   -8.9   92    781.0   2209   -9.2   -9.8   96    769.0   2330  -10.3  -10.4   99     As we can see, the temperature at a pressure altitude of 769, what is 2330 meter on that day, is -10 degree and the relative humidity is 99%. My question is: Why can't contrails form in this condition? Or can they? Because the air is very humid and the engine's vapor would give it the rest to be over-saturated, what makes the water vapor condense on the soot. And the temperature would freeze them. Every internet source says, they can only exist at or below -40 degree Celsius. But what about this condition? What stops them to form at this temperature and humidity? I need to know this, because I'm writing my pre-scientific work about it. I understand contrail formation pretty much so far, but some small puzzle parts are still missing.


How do I delete a folder but not the contents?

My directory (in Linux) looks like com/com/{various,files} where com and com are folders of the same name and the second com holds the various files. I want the first com removed, but the second and files in the second kept.


Does Jon Snow create a precedent by doing this and why everyone is OK with it?

Spoilers season 6, 7  Wouldn’t John be creating a precedent by leaving the Watch after his       resurrection? Technically it may be OK for him as the oath ends with the death.    Yet practically nobody in the realm knows about this though and he’s not eager to tell the story to others,      (even Dany)    Why isn't he questioned by lords, etc. about the matter? Does he create precedent for future generations of watchers (assuming it's not the last WW invasion)? Isn't it reasonable for everyone to do the same thing?


"Pin down" an automatically installed package so apt-get autoremove keeps it

Say I install package A, which depends on package B. Then I remove A.  Now apt-get autoremove wants to remove B, but I want to keep it. How do I "pin down" B so that the system acts as if I installed B myself?  I come from Gentoo, where the solution would be to add B to my world file. What's the Debian/Ubuntu equivalent?


I often have to do some work from home, so I connect via VPN and RPD to my Workplace!   Unfortunately with Remmina I can´t get AltGr-Shortcuts working, it doesn´t show TextCursor in Editors and the Performance is also not very well which is really annoying when you have to work a few hours with it!  So does anyone know a better RDP-Client for Linux it doesn´t have to be OpenSource or Free, I'm willing to pay for a good RPD-Client!


Downloading and installing programs in Ubuntu 14.04 LTS

It’s the first time I use Ubuntu and I don’t have a clue how to download and install programs. Can anyone help?


Mouse movement on Synergy-controlled PC is slow/laggy?

Update: They fixed the macOS wifi lag on Synergy 1.9.0!   I'm not sure why this started happening. I just started using Synergy again to control my laptop using my desktop's keyboard and mouse, and the cursor (when accessing my laptop) is incredibly laggy, jumpy, etc. (and it wasn't like this before). Any ideas on how this can be fixed?


Android development, how to change the value of a customized class's member when the controller button is pressed

IDE: Android Studio I want to write a program that when a user pressed down the KEYCODE_DPAD_UP button(like the up button on an Xbox One controller), the value of a member variable of a customized class will be increased. However, when I debug the program on my physical phone, if I pressed down the KEYCODE_DPAD_UP button, the program will shut down and an exception will be thrown: java.lang.NullPointerException: Attempt to read from field 'int com.example.myClass.MainActivity$Demo.number' on a null object reference  Here is the code, it's a quite simple demo. I guess the myclass in function onKeyDown is not initialized, so myclass.number can't be solved. Thanks for anyone's help. package com.example.Demo; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.KeyEvent;  public class MainActivity extends AppCompatActivity {     myClass myclass;     @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);         final myClass myclass = new myClass();     }      @Override     public boolean onKeyDown(int keyCode, KeyEvent event) {         if (keyCode == KeyEvent.KEYCODE_DPAD_UP) { myclass.number++; }         return true;     }      public class myClass{ public int number; } }


I'm beginner with Java EE, when I try to transfer an object between a JSP and a Servlet I use a session. For an homework, I have to create an e-commerce website. I just have this in my jsp:  HttpSession sess = request.getSession();               Panier pan = new Panier(); sess.setAttribute("panier", pan); sess.setAttribute("produit", produits.get(0));   produits is an arraylist of "produit" object.  In my Servlet:  HttpSession sess = request.getSession(); Panier pan = (Panier) sess.getAttribute("panier"); Produit p1 = (Produit) sess.getAttribute("prod");   When I'm here, all works cause I can display the good attributes of the object pan or p1. But, when I use my method "ajouterProduit" (addProduct in English), a savage null pointer exception appears.  My class "Produit":  public class Produit implements java.io.Serializable{ private String nom; private int prix;  public Produit(String name, int price){     this.nom = name;     this.prix = price; }  public void setNom(String n){     this.nom = n; }  public void setPrix(int p){     this.prix = p; }  public String getNom(){     return this.nom; }  public int getPrix(){     return this.prix; } }   My class "Panier" (basket in english):  public class Panier implements Serializable{ private List<Produit> panier; private static int montant = 0;  public Panier(){     panier = new ArrayList<>(); }  public void ajouterProduit(Produit p1){     panier.add(p1);     montant = montant + p1.getPrix(); }  public void ajouterProduit(Produit p1, Produit p2){     panier.add(p1);     montant = montant + p1.getPrix();     panier.add(p2);     montant = montant + p2.getPrix(); }  public void ajouterProduit(Produit p1, Produit p2,Produit p3){     panier.add(p1);     montant = montant + p1.getPrix();     panier.add(p2);     montant = montant + p2.getPrix();     panier.add(p3);     montant = montant + p3.getPrix(); }  public List<Produit> getPanier(){     return panier; }  public int getMontantTotal(){     return montant; } }   Thanks in advance for help ! ;)


What happens when a distribution certificate expires or revoked?

My app is already in App Store. Now my distribution certificate is expired. I know my app in App Store will continue running, but my questions are:   If now I have a bug fix in my app, does it mean I am not able to submit the updated app to App Store since my distribution certificate expired? If I renew the distribution certificate, my understanding is that it is identical as revoke the distribution certificate and create a new distribution certificate, am I right? If the answer to my 2nd question is "Yes", does it mean in future when I see my distribution certificate is expiring soon, I just revoke it and create a new one for existing app in App Store, am I right?


Problems that involves two facts in the definition of vector spaces

I have two small questions that I can't solve. So, there are 8 axioms for vector spaces. One of them is that $1 \cdot a = a$ for all $a \in V$ and of course $1$ is multiplicative identity in $\mathbb{F}.$ How can I be sure this axiom cannot be derived from other 7 axioms? Also, why is there no definition of $\alpha a= a\alpha, \forall \alpha \in \mathbb{F}, \forall a \in V$? Why is multiplication of scalars and vectors not defined in commutative way?


Cryptoclass Throws Error. Invalid private key. Must be 16 bytes. Sending 16 characters long key

key__c :- abcdefghijklmnop  public static String decrypt(String data) {     EncryptionSettings__c settings = EncryptionSettings__c.getOrgDefaults();     if (settings.key__c == null) {         throw new FacebookException('Cannot decrypt without a key!');     }     Blob key = EncodingUtil.base64Decode(settings.key__c);     return Crypto.decryptWithManagedIV('AES128', key, EncodingUtil.base64Decode(data)).toString(); }  public static String encrypt(String data) {         EncryptionSettings__c settings = EncryptionSettings__c.getOrgDefaults();     Blob key = null;     if (settings.key__c == null) {         checkUserCanCustomizeApplication();         key = Crypto.generateAesKey(128);         settings.key__c = EncodingUtil.base64Encode(key);         insert settings;     } else {         key = EncodingUtil.base64Decode(settings.key__c);     }     return EncodingUtil.base64Encode(Crypto.encryptWithManagedIV('AES128', key, Blob.valueOf(data))); }


Why do we use Φ while calculating the encryption key in RSA method?

As you know, in RSA encryption, we calculate an n value by multiplying two long primes. Then we calculate Φ(n), which is equal to (p-1)(q-1). After that, we choose an encryption key which satisfies gcd(e,Φ(n))=1. I know that it is necessary to calculate decryption key, which is the modular inverse of e. My question is: Why do we use Φ(n) in determination of encryption and decryption key processes? How can one prove it is working for RSA encryption?


Help finding a combinatorial proof of $k {n \choose k } = n {n - 1 \choose k -1}\;$

I am unsatisfied with the answers    . (Half of which used algebraic methods despite being advised not to!)   Help finding a combinatorial proof of $k {n \choose k } = n {n - 1 \choose k -1}$  I have completed the algebraic proof, it was easy. I am unsure how to do a combinatorial proof, or what exactly that pertains to.   Is this the expression needed:  $$\begin{pmatrix} n+1\\r\end{pmatrix}=\begin{pmatrix}n\\r\end{pmatrix}+\begin{pmatrix}n\\r-1\end{pmatrix}$$$$???$$


I am running Rent a car bussines and I am wondering how to setup image for google search... When someone search for Skoda Fabia, I am SEO optimised enough to be shown on the first page of google search, but I also want picture of the car next to the text (on mobile phones). Is there any way to include it on wordpress? Thanks in advance!


Quantity conserved for the 3D spherically symmetric harmonic potential $V(r)=\alpha r^2$

I know that in the case of the Kepler problem there is a quantity (other than energy, momentum,...) conserved which is the Runge-Lenz vector.  Is there also an "exotic" quantity conserved for a 2-Body system with a potential: $V(r)=\alpha r^2$? I'm asking this because the radial harmonic oscillator and the inverse square force are the only ones that have a bounded orbit.  If the answer is positive; is there a symmetry associated to the conservation of this quantity?


C functions like getch() that do not work on Mac — can I use a Windows VM to get them to run?

There are some Windows C functions that do not work on Mac — e.g. getch().  If I run them in a Windows VM will they work? Or is there a way to get them to work on OS X?


How do I control which drive Ubuntu installs to?

I have 2 320 GB drives on my computer. I have Windows 7 installed on Drive C:  How do I install Ubuntu onto Drive D, and still have dual boot capability?


How can I solve Exception in thread "main" java.lang.NullPointerException error

I am having a problem at a Java program. Exception in thread "main"  java.lang.NullPointerException at twoten.TwoTenB.<init>(TwoTenB.java:29) at javapractice.JavaPractice.main(JavaPractice.java:32) Java Result: 1    is the error that I'm getting. I could really use some help, since i am stuck hours on this spot...  package twoten;  import java.util.Scanner;  public class TwoTenB {  public TwoTenB() {     double percentage;     double a[] = null;     double total = 0;     double var;     System.out.print("\tRESULT\n\n");     Scanner scan = new Scanner(System.in);     //double[] mark = new double[7];     for (int i = 0; i < 7; i++) {          System.out.print("\nMarks in subject " + (i + 1) + "\t:\t");         var = scan.nextDouble();          a[i] = var;          total = total + a[i];        //percentage = first * second * third * fourth * fifth * sixth * seventh * 100 / 700;     }      percentage = total * 100 / 700;      if (a[0] > 35 && a[1] > 35 && a[2] > 35 && a[3] > 35 && a[4] > 35 && a[5] > 35 && a[6] > 35 && percentage > 35) {         if (percentage >= 60) {             System.out.print("\nCongratulation!!! you've got FIRST dividion\n");         } else if (percentage >= 45 && percentage < 60) {             System.out.print("\nCongratulation!!! you've got SECOND dividion\n");         } else if (percentage >= 35 && percentage < 45) {             System.out.print("\nCongratulation!!! you've got THIRD dividion\n");         }     } else {         System.out.print("\nSORRY!!! you've FAILED\n");     }     } }


Understanding divison by monic polynomial in $R[x]$ where $R$ is an arbitrary ring

I read "Algebra: Chapter 0" by P.Aluffi. I encountered a topic where it says you can divide any polynomial in $R[x]$($R$ is any ring) by a monic polynomial(that is, a polynomial of the form $x^d + \sum\limits_{i=0}^{d-1} a_i x^{i}$).   It says if $g(x)$ is any polynomial and $f(x)$ is a monic polynomial. Then $\exists \ \ \ q(x), r(x) \in R[x],\: \deg r(x) < \deg f(x): g(x) = f(x)q(x) + r(x).$  I have two questions regarding this:  1) Why $f(x)$ needs to be monic?   2) How can we prove it? The book talk about induction and that if $\deg  g(x) = n > d = deg \ f(x)$, then $\forall a \in R$ we have $ax^n = ax^{n-d}f(x) + h(x)$ for some $h(x): \deg \ h(x) < n$. It's true, but how do I take it from here?


I need to prove that $$\sum_{i=0}^{n-1}  {2^i} = 2^n -1.$$ I tried induction but something didn't work.