When flagging a question, I get a 404 error

is the question I'm attempting to flag as a duplicate.  When I click on duplicate, a red popup comes up simply stating "404" (although I assume it's meant to respond with a "Done" or "Error" type of message):    Chrome Dev Tools console shows:  Failed to load resource: the server responded with a status of 404 (Not Found) https://superuser.com/flags/questions/637322/close/popup?_=1377622359605


Prototype of main() function in c or c++?

I was going through a tutorial and i have read there, that we can not define void main() as the prototype is already defined as int main() or int main(int argc , char *argv) these are only two valid way to define main function in C.  so in which header file or library files these prototype are set  I don't how compiler giving me error in case of float main() what is the mechanism behind, I mean is it a syntax error or some prototype defined for main()?  please suggest an answer in easy language.


How many different sets of $6$ different numbers can we construct from $11, 13, 18, 19, 19, 20, 23, 25$?

Shouldn't be repeated in any case; if the numbers appeared is exactly the same as another but different orders, that doesn't count as a new set. For example: $11,13,18,19,19,20$ is the same as $13, 18, 19,11,19,20$.


lightning:dataTable action column is not rendering properly

I have added a lightning:dataTable within  like this  <lightning:card title="My Table" iconName="standard:contact">      <p class="slds-p-horizontal_small">             <lightning:datatable                   aura:id="sparesTable"                   columns="{! v.columns }"                   data="{!v.stipulationsSpares}"                   keyField="Id"                   hideCheckboxColumn="true"                   showRowNumberColumn="false"               />      </p>  </lightning:card>   I am creating columns like this in the controller  var actions = [             { label: 'Show details', name: 'show_details' },             { label: 'Delete', name: 'delete' }         ];  component.set('v.columns', [     {label: 'Start Date', fieldName: 'Start_Date__c',type: 'date'},     {label: 'End Date', fieldName: 'End_Date__c', type: 'date'},            { type: 'action', typeAttributes: { rowActions: actions } }  ]);   When I click on the down arrow on the action column the dropdown menu of actions appears but I need to scroll down to view    This looks bad particularly if there is just one row in the table . Its hard for users to understand that a menu is there if they don't scroll.  Is there any way this menu gets visible without scrolling ?


$$\lim_{n\rightarrow \infty}\frac{1}{n^2}\sum^{n-1}_{k=1}\cot^2\left(\frac{k\pi}{n}\right)$$ $n>1,n\in N$   Try: $\displaystyle \lim_{n\rightarrow \infty}\cot^2 \frac{k\pi}{n} = \frac{n^2}{k^2 \pi^2}$ (where $\lim_{x\rightarrow 0}\sin x=x, \lim_{x\rightarrow 0}\cos x = 1$)  so $$\lim_{n\rightarrow \infty}\frac{n^2}{\pi^2 n^2}\bigg(1+\frac{1}{2^2}+\frac{1}{3^2}+\cdots \cdots +\frac{1}{(n-1)^2}\bigg) = \frac{1}{\pi^2}\left(1+\frac{1}{2^2}+\frac{1}{3^2}+\cdots\right) = \frac{1}{6}$$  can someone please explain me whats wrong in my try and also explain me right answer


Database data needed in integration tests; created by API calls or using imported data?

This question is more or less programming language agnostic. However as I'm mostly into Java these days that's where I'll draw my examples from. I'm also thinking about the OOP case, so if you want to test a method you need an instance of that methods class.  A core rule for  is that they should be autonomous, and that can be achieved by isolating a class from its dependencies. There are several ways to do it and it depends on if you inject your dependencies using  (in the Java world we have Spring, EJB3 and other frameworks/platforms which provide injection capabilities) and/or if you mock objects (for Java you have  and ) to separate a class being tested from its dependencies.  If we need to test groups of methods in different classes* and see that they are well integration, we write . And here is my question!   At least in web applications, state is often persisted to a database. We could use the same tools as for unit tests to achieve independence from the database. But in my humble opinion I think that there are cases when not using a database for integration tests is mocking too much (but feel free to disagree; not using a database at all, ever, is also a valid answer as it makes the question irrelevant). When you use a database for integration tests, how do you fill that database with data? I can see two approaches:   Store the database contents for the integration test and load it before starting the test. If it's stored as an SQL dump, a database file, XML or something else would be interesting to know. Create the necessary database structures by API calls. These calls are probably split up into several methods in your test code and each of these methods may fail. It could be seen as your integration test having dependencies on other tests.    How are you making certain that database data needed for tests is there when you need it? And why did you choose the method you choose?  Please provide an answer with a motivation, as it's in the motivation the interesting part lies. Remember that just saying "It's best practice!" isn't a real motivation, it's just re-iterating something you've read or heard from someone. For that case please explain why it's best practice.  *I'm including one method calling other methods in (the same or other) instances of the same class in my definition of unit test, even though it might technically not be correct. Feel free to correct me, but let's keep it as a side issue.


Punctuating a sentential quote within a question

Is this sentence:     What kind of a mother would say, "That backpack looks ugly on you."?   correctly punctuated?


How do u recover your iPad clash of clans account without the old device

How do you recover iPad account without old device


How could the trained, physically stronger person lose this lightsaber fight?

How could     Kylo Ren   lose the fight against      Rey?   I find the outcome totally illogical even though the Force may be strong in the woman. Furthermore, I would expect a man to be physically stronger than a woman. It is like having a very intelligent but uneducated person beating a math Phd in a math exam.


cron job not redirect the output to file

I set the following line in cron job under /etc/cron.d/find_old_file  * * * * * root  [[ -d /var/log/ambari-metrics-collector ]] && find  /var/log/ambari-metrics-collector   -type f -mtime +10 -regex '.*\.log.*[0-9]$' -printf '%TY %Tb %Td %TH:%TM %P\n' >> /var/log/find_old_file   this cron should find the logs that older then 10 day ( but only if /var/log/ambari-metrics-collector folder exists )  from some unclear reason we notice that  /var/log/find_old_file not created  and when we test it this line works fine on shell bash but not from cron  we also add 2>&1 in the end of the file but this not work  please advice what is wrong in my cron job ?  more /etc/cron.d/find_old_file  * * * * * root  [[ -d /var/log/ambari-metrics-collector ]] && find  /var/log/ambari-metrics-collector   -type f -mtime +10 -regex '.*\.log.*[0-9]$' -printf '%TY %Tb %Td %TH:%TM %P\n'   >>    /var/log/find_old_file 2>&1   example when we test it on shell bash   [[ -d /var/log/ambari-metrics-collector ]] && find  /var/log/ambari-metrics-collector   -type f -mtime +10 -regex '.*\.log.*[0-9]$' -printf '%TY %Tb %Td %TH:%TM %P\n' 2018 Aug 13 12:54 collector-gc.log-201808130951 2018 Aug 13 04:22 collector-gc.log-201808130403 2018 Aug 01 12:40 gc.log-201808011229 2018 Aug 01 12:40 collector-gc.log-201808011229 2018 Aug 09 15:36 gc.log-201808091332 2018 Aug 09 10:50 gc.log-201808090825 2018 Aug 13 04:02 collector-gc.log-201808130346 2018 Aug 13 16:51 gc.log-201808131358 2018 Aug 01 13:35 gc.log-201808011241 2018 Aug 01 13:35 collector-gc.log-201808011241 2018 Aug 09 15:39 collector-gc.log-201808091332 2018 Aug 02 23:06 gc.log-201808022256   when I put this  * * * * * root echo test  >> /var/log/test   then its works , but not my line as described   so what are happens here?


Identify the ring $\mathbb {Z}[i]/(2 + i) $

I have to find an easy ring which this ring is isomorphic with.  I can prove that $5 = (2+i)(2-i) \in (2+i)$ but this doesn't help me further.  My book says the answer is $\mathbb {Z_5} $


The $ l^{\infty} $-norm is equal to the limit of the $ l^{p} $-norms.

If we are in a sequence space, then the $ l^{p} $-norm of the sequence $ \mathbf{x} = (x_{i})_{i \in \mathbb{N}} $ is $ \displaystyle \left( \sum_{i=1}^{\infty} |x_{i}|^{p} \right)^{1/p} $.  The $ l^{\infty} $-norm of $ \mathbf{x} $ is $ \displaystyle \sup_{i \in \mathbb{N}} |x_{i}| $.  Prove that the limit of the $ l^{p} $-norms is the $ l^{\infty} $-norm.  I saw an answer for $ L^{p} $-spaces, but I need one for $ l^{p} $-spaces. Besides, I didn’t really understand the $ L^{p} $-answer either.  Thanks for your help!


I was trying to install amd graphics drivers and after rebooting now I get just a blank black screen.Someone please help urgently.


If $p \mid a^n$ then does $p^n \mid a^n$?

I'm trying to figure out if the statement is true or not and I need to prove it if so.  Let $p$ be a  prime and $a$ be an integer. If $p\mid a^n$ , is it true that $p^n\mid a^n$ ?  I'm not sure how i would approach this problem. I started as $a^n = p \cdot b$ for some $b \in \mathbb{Z}$.


Disconnect someone else from my Skype account?

While my little brother is occupying my desktop he is also occupying my Skype account. I know about multi login and I am using it, but he keeps sending dirty messages to my friends from the desktop.    Is there any way I can kick him out of Skype?


I'm trying to find a discontinuous linear functional into $\mathbb{R}$ as a prep question for a test. I know that I need an infinite-dimensional Vector Space. Since $\ell_2$ is infinite-dimensional, there must exist a linear functional from $\ell_2$ into $\mathbb{R}$. However, I'm having trouble actually coming up with it.   I believe I'm supposed to find an unbounded function (although I'm not sure why an unbounded function is necessarily not continuous; some light in that regard would be appreciated too), so I thought of using the vectors $e^i$, which have all entries equal to zero, except for the $i$-th one. Then, you can define $f(e^i)=i$.  That'd be unbounded, but I'm not sure if it'd be linear, and even if it is, I'm not sure how to define it for all the other vectors in $\ell_2$.   A friend mentioned that at some point the question of whether the set $E=\{e^i:i\in\mathbb{Z}^+\}$ is a basis would come up, but I'm not sure what a basis has to do with continuity of $f$.   I'm just learning this topic for the first time, so bear with me please.   The space of sequences that are eventually zero (suggested by a few people) turned out to be exactly what I needed.  It also helped to cement the notions of Hamel basis, not continuous, etc.


How to find the radius of convergence of $\sum^{\infty}_{n=1}\frac{n!}{n^n}z^n$?

$$S=\sum^{\infty}_{n=1}\frac{n!}{n^n}z^n$$ Where $z \in \mathbb{C}$. Using D'Alambert's test of convergence:  $$\frac{1}{R}=\lim_{n\to \infty}\frac{\frac{(n+1)!}{(n+1)^{n+1}}}{\frac{n!}{n^n}}$$  $$\frac{1}{R}=\lim_{n\to \infty}\frac{n^n}{(n+1)^n}$$  Where $R$ is the radius of convergence. When we consider the difference between $4^3$ and $3^3$, for example, it seems clear to me that this limit cannot be computed as follows:  $$\frac{1}{R}=\lim_{n\to \infty}\frac{n^n}{(n+1)^n}=1$$  However, this is exactly how my textbook (Riley, Hobson and Bence) does it. How can this computation be justified, considering that $n+1$ to a large power will always be a lot larger than $n$.


Imgur issues in questions and rejecting upload

I've noticed a few questions today with images across multiple site (auto mechanics and GD.SE) haven't been loading in the questions and per discussion with a few other members they've experienced the same issue in chat.    All image issues seem to be loaded to imgur: https://i.stack.imgur.com/whatever  At this time, I'm told when I try to upload an image of what I'm seeing I get:     Failed to upload image; imgur is rejecting the request


Limit the post for differents custom post type in the same wp_query

I have three custom post type:    books magazine videos   Now i want to limit the number of post for custom post type, for example:   books => 3 post magazine => 2 post videos => 1 post   I used a query post like this:  query_posts( array(     'post_type' => array(     'books',     'magazine',     'videos' ), 'paged' => $paged, 'posts_per_page' => 6,  )); $counter = 1; if (have_posts()) :     while (have_posts()) : the_post();   if (($counter == 2) || ($counter == 3) || ($counter == 4)) {         $div = 'alpha';     } elseif(($counter == 6)) {         $div = 'omega';     } else {         $div = '';     }   The problems is i cant limit the numbers by custom post type.  Any idea?  Thank you :)


i got several tables/figures and sections like this:  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{...}\label{sec:...} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  \begin{table}[H]     \renewcommand{\tabcolsep}{3mm}     \renewcommand{\arraystretch}{1.5}     \begin{center}         \begin{tabular}{ll}             ...         \end{tabular}         \caption{...}         \label{...}     \end{center} \end{table}   After e.g. this definition I got a complete blank page within my PDF. I think it is something about the [H] parameter but i am not able to fix it, because without [H] the table does not appear below the section headline.  Any ideas how to fix this?


LS7 filling the gaps image with google earth engine

I would like to work with Landsat 7 images, but most of them have gaps... I would like to fill the Gaps by aggregate images bands by month. So I'm looking for a way to deal with this problem. I have tried to create a composite image with      var collectionLS7 = ee.ImageCollection('LANDSAT/LE7_L1T_TOA') //10m     // Select the bands of interest to avoid taking up memory.     .select(bandNames)     // Filter to get only imagery at a point of interest.     .filterBounds(roi); var composite = collectionLS7.median();   But it doesn't work   I have also tried   var customComposite = ee.Algorithms.Landsat.simpleComposite({   collection: collectionLS7,   percentile: 75,   cloudScoreRange: 5,   maxDepth: 4 });   But with an error Layer 1: Layer error: ImageCollection.reduce: Error in map(ID=LE72040492015361ASN01): Landsat.TOA: Band 'B1' is Type<Float>, expected Type<Short<0, 255>>.  Any ideas are welcome !


I'm writing a unit test to evaluate if a case was successfully assigned to a queue. Unfortunately, the SOQL query I'm using to get the case owner type is returning "null". I've validated that the owner is being set successfully, so I'm not sure why I can't retrieve the owner type. How can I access the case owner type in the SOQL query so that I can evaluate it in the System.assert line (2nd to last line)?  Here's my code:      @isTest static void insertByPartner() {     //tests that the partner is added to any cases that they create.          Case[] cases = TestClassUtils.getCases(1);          List<Database.SaveResult> results = new List<Database.SaveResult>();          User partnerTestUser = createPartnerUser();          Test.startTest();         System.runAs(partnerTestUser) {             results = Database.insert(cases, false);         }         Test.stopTest();          Set<ID> caseIdSet = new Set<ID>();         for(Database.SaveResult sr : results) {             System.assert(sr.isSuccess());             caseIdSet.add(sr.getId());         }          List<Case> queueCasesList = [SELECT Id, OwnerId, Owner.Type FROM Case WHERE Id IN :caseIdSet AND Owner.Type = 'Queue'];          for(Case newCase : queueCasesList) {             System.debug('The case owner is: '+ newCase.OwnerId);             System.debug('The case owner type is: ' + newCase.Owner.Type);         }          System.debug('Cases owned by queue when inserted by a partner user = ' + queueCasesList.size());         System.assert(queueCasesList.size() == 1);     }


When is an outer product $ab^\top$ diagonalisable?

If $a$ and $b$ are $n\times 1$ vectors and $A=ab^\top$, why is A diagonalizable if and only if $a^\top b \ne 0$ ?  From my understanding, $a^\top b$ is the sum of the diagonal of A. How does this relate to diagonalizability?


Having trouble with program output an printf

I am writing a program where it takes a file and tries to use data from the file in order to create an output.   this is the program:   import java.util.Scanner; import java.io.*;    public class WebberProjectTest  {   public static void main(String[] args) throws IOException   {   Scanner scanner = new Scanner(new File("portlandvip.txt"));  while (scanner.hasNext())   {  String firstName = scanner.next();  String lastName = scanner.next();  Integer number = scanner.nextInt();  String ticketType = scanner.next();   if(ticketType == "Court")  {  Integer a = 75 * number;  System.out.println(" " + firstName + " " + lastName + " " + a);              scanner.nextLine();    }   if(ticketType == "Box")  {  Integer a = 50 * number;  System.out.println(" " + firstName + " " + lastName + " " + a);              scanner.nextLine();    }   if(ticketType == "Club")  { Integer a = 40 * number; System.out.println(" " + firstName + " " + lastName + " " + a);              scanner.nextLine();     }   }           }     }   This is the data file:   Loras Tyrell 5 Club  Margaery Tyrell 8 Box  Roslin Frey 2 Box  Sansa Stark 2 Club  Jon Snow 5 Club  Edmure Tully 3 Box  Joffrey Baratheon 20 Court  Stannis Baratheon 4 Club  Jaime Lannister 2 Box  Cersei Lannister 1 Court  Beric Dondarrion 8 Court  Balon Greyjoy 16 Box  Olenna Tyrell 4 Court  Mace Tyrell 5 Box  Tyrion Lannister 2 Club  Sandor Clegane 2 Court  Gregor Clegane 6 Club  Samwell Tarly 3 Club  Petyr Baelish 6 Court  The purpose of this program is to that the input File and output for example.   Input: Loras Tyrell 5 Court  Output: Loras Tyrell $375.00  However, when i run the program, nothing happens. I have a few ideas on why this is happening, but i dont know how to fix it, any help would be appreciated.   I also have another question about printf statements. I altered the program so that it prints correctly, but now i have to change the println statements to printf statements. this is what i changed the program to look like now:   import java.util.Scanner; import java.io.*;   public class WebberProjectTest {  public static void main(String[] args) throws IOException  {  Scanner scanner = new Scanner(new File("portlandvip.txt")); while(scanner.hasNext())  { String line = scanner.nextLine(); String[] words = line.split(" ");   if(words[3].equals("Court"))  {     int a = 75 * Integer.parseInt(words[2]);     System.out.printf(" " + words[0] + " " + words[1] + " $%.2f\n ", a); }  if(words[3].equals("Box"))  {     int a = 50 * Integer.parseInt(words[2]);     System.out.printf(" " + words[0] + " " + words[1] + " $%.2f\n", a); }  if(words[3].equals("Club"))  {     int a = 40 * Integer.parseInt(words[2]);     System.out.printf(" " + words[0] + " " + words[1] + " $%.2f\n", a); } }           }     }    and this is what prints out:   Loras Tyrell Loras Tyrell $java.util.IllegalFormatConversionException: f !=         java.lang.Integer at java.util.Formatter$FormatSpecifier.failConversion(Unknown Source) at java.util.Formatter$FormatSpecifier.printFloat(Unknown Source) at java.util.Formatter$FormatSpecifier.print(Unknown Source) at java.util.Formatter.format(Unknown Source) at java.io.PrintStream.format(Unknown Source) at java.io.PrintStream.printf(Unknown Source) at WebberProjectTest.main(WebberProjectTest.java:32) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at edu.rice.cs.drjava.model.compiler.JavacCompiler.runCommand(JavacCompiler.java:272)   I dont know what i did wrong in the printf statement, thank you for any assistance.


I am trying to close all of the open files in the shared folders of a server via PowerShell script. I found the following script which only close files on one drive (F:), however, this server has 3 drives (F:\, G:\, H:) which I want to close all.   net files |      where   { $_.Contains( "F:\" ) } |     foreach { $_.Split( ' ' )[0] }   |     foreach { net file $_ /close }   Is there a way to add missing drives into this script or I have to use the same script separately for each drive?  I tried { $_.Contains( "F:\", "G:\", "H:\"  ) } but didn't work  Thank you for your help!


Product of binomial coefficient as a basis

I am stuck with the following problem. Every polynomial of degree $d$ can be expressed as $$ p(x) = p_d \binom{x}{d}+ p_{d-1}\binom{x}{d-1} + \cdots + p_0 \binom{x}{0} $$     What is the representation of    $$ \binom{x}{i} \binom{x}{j}  $$   in such a basis?   I have no idea how to solve this...


If I use a GLM with the identity link, is there any difference to a linear model? For example, if I use a Gamma GLM with identity link and an Inverse Gaussian GLM with identity link, what is the difference from these to a linear model? I've tried it in R and they give different coefficients, so I presume the models are different, but I don't see how.


Why use "was", not "were" in "If I was given more time, I would..."

Is this sentence formal?      If I was given more time, I would have less pressure   Why do we use "I was" rather than "I were"?


Getting last modification date of a PostgreSQL database table

I'm trying to get when my table was modified by checking its file modification date as it is described in . But the result is not always correct. The file modification date updates in several minute after I update my table. Is it correct behaviour? Does PostgreSQL store table modifications in some cache and then flush it to the hard drive?   So, how do I get the correct last modification date of a table (let's assume that auto vacuum modifications are ok too)?  I use PostgreSQL 9.2 under Linux Centos 6.2 x64.


I have about 30 tests in directory GameTests. There is a test like DeleteGameTest which is based on static ID (private const GAME_ID = '...') but PHPUnit runs this tests in alphabetical order. I was tried to organise them by testsuite but 30 items in this suite makes little mess. Is it possible to run this single test always last without setting it's name to starts with 'Z' letter?


How are the number of views in a question calculated?

I saw it's not just a page views number, because, if I press F5 several times, it won't increase the number of views.  They could store my IP address in a table, but wouldn't that make it slow? They would need to query a database one more time for each request.


Let $F$ be a finite field. How do I prove that the order of $F$ is always of order $p^n$ where $p$ is prime?


Is the light/fan combo in my shower safe?

In all of the bathrooms, there is a recessed light/exhaust fan combo installed. I assume, due to the combo feature, is the reason there is no cover over the light fixture.  However, the same light/exhaust is also located inside the master shower - not in the damp area but, the actual wet area.  Visualize yourself taking a shower and looking directly above you as your washing your hair, with water spraying and splashing everywhere, you look right up into the can of the light!  So, out of precaution, we keep the switch off -ALL THE TIME! Is this safe and to code?


Recently I worked on a game on Spritekit Engine. My question is not about spritekit, but generaly about game engines. When I write a loop code and run it (eg while i< 100000) my CPU usage goes to 100%, but when I run the test game there is no changes specially on CPU usage ,why is this so? (We know game engines runs in a loop that includes logic and graphic commands )


On September 4, I will be arriving in Geneva by airplane at approximately 11 AM. After that, I need to go to Lausanne. I have two questions:   Do I need to buy a train ticket online, or can I buy it directly at the station without any problems? (Problems such as: the trains are always full, it's not permitted to buy a ticket etc.) Moreover, are the tickets only for a specific train or it is like "you can board any train from Geneve to Lausanne with this ticket"? How do I get from the airport to the Geneva train station (as low a budget as possible, I guess walking is not an option though), and how much does it cost?   I'd appreciate answers from people who have been there, but if you're able to find an exhaustive link from any website that's okay too.


Evaluate the integral $$\int_0^{\pi/2} \frac{1}{1+\tan^\alpha{x}}\,\mathrm{d}x$$


Looking for some help understanding the following concept. I know when you are trying to determine the stability of fixed points for the system,  $$x'=\sin x$$  You proceed with the following steps,  $$x'=0$$ $$\sin x=0$$ $$x^{*}=k\pi$$  deriving $x'$ to determine stability would give,  $$\cos x$$  plugging in the fixed point,  $$\cos (k\pi)$$  Therefore, when $k\pi$ is even it is equal to $1$, so it would be unstable. On the other hand when $k\pi$ is odd it is equal to $-1$ so it would be stable.  However what if you were given $$x'=\cos x$$.  The derivative would be $-\sin x$ and the fixed points would still be $k\pi$ but when $k\pi$ is odd and when it is even, is it stable or unstable?


How can I find the m(x) (that is, EY|X=x), in a non-parametric regression, when Y and X have a joint bivariant normal pdf with both mean 0 and variance 1 (unknown correlation)? $f(x,y)=\frac{\exp \left\{ -\frac 1{2(1-\rho ^2)}\left[ \left( \frac{x-\mu _x% }{\sigma _x}\right) ^2-2\rho \left( \frac{x-\mu _x}{\sigma _x}\right) \left(  \frac{y-\mu _y}{\sigma _y}\right) +\left( \frac{y-\mu _y}{\sigma _y}\right) ^2\right] \right\} }{2\pi \sigma _x\sigma _y\sqrt{1-\rho ^2}} $ I have tried to integrate respect to dy the f(x,y), that is, a normal pdf of X divided by f(x,y) to find the conditional probability, and then make the integral of y times the conditional probability here, but I believe something is wrong. UPDATED: If you find the conditional probability, that is $\frac{f(x, y)}{f(x)}$, and simplify, you would found a pdf of a Normal with mean $\rho x$ and variance $1-\rho^2$, so m(x) = E(Y|X)= $\rho x$


QuickSmoke fire effect not appearing in render

I'm trying to add fire and smoke to my scene. I decided to use QuickEffects > QuickSmoke, and then change the flow type to Fire + Smoke on my emitter. It seems that both the fire and smoke appear in the scene view, however only the smoke appears in the render. (using Cycles)  Scene view:    Render:    (the smoke is a bit hard to see on the black background)  If required, I can share the settings of the smoke emitter and the smoke domain.  Thanks in advance.


I realize this is a common question around here, but I'm having trouble understanding one part of it. I want to setup a mail server to send newsletters and other marketing emails for a few of my domains. Obviously, deliverability is very important, so I want to make sure I have the PTR records right.  So, let's say I have 2 domains that I want to send mail for: example1.com and example2.com. I have my mail server setup on a VPS that's accessible at example1.com. I have a PTR record for example1.com's server's IP address (e.g. 1.1.1.1) that points to example1.com.  Now, if I want to send mail using my mail server from someone@example2.com, would I have a PTR record problem? I imagine the receiving mail server getting a message from a server with an IP address of 1.1.1.1. It checks the PTR record for that IP and get's example1.com. It then looks and sees that the email is coming from example2.com. Does this matter?  Sorry for the basic question, I'm just having a hard time understanding this particular situation.


Would an ally get an Opportunity Attack if I were to knock an enemy towards them?

Coming Sunday a party member and myself will be facing off against a wizard/warlock and some cultists.  The session last week ended on the Paladin initiating combat by jumping towards the warlock by surprise. (something I would've preferred to avoid before diplomacy had occurred but alas)  Now I was wondering, if I were to use the surprise to move towards the warlock without triggering Opportunity Attacks from the cultists, and I were to place myself in such a way that the Warlock was in between myself and the Paladin.  Upon using Thunderwave and the Warlock failing his saving throw (thus being knocked back), would our Paladin get an Opportunity Attack from the Warlock being knocked into his range? Or is this something that is entirely up to the DM?  I am an Evoker wizard so with Sculpt Spell I can protect the Paladin from my evocation spells.


I've seen many explanations for why the link count for an empty directory in Unix based OSes is 2 instead of 1. They all say that it's because of the '.' directory, which every directory has pointing back to itself. I understand why having some concept of '.' is useful for specifying relative paths, but what is gained by implementing it at the filesystem level? Why not just have shells or the system calls that take paths know how to interpret it?  That '..' is a real link makes much more sense to me -- the filesystem needs to store a pointer back to the parent directory in order to navigate to it. But I don't see why '.' being a real link is necessary. It also seems like it leads to an ugly special case in the implementation -- you would think you could only free the space used by inodes that have a link count less than 1, but if they're directories, you actually need to check for a link count less than 2. Why the inconsistency?


This has been asked before on stackoverflow but the answers were very unsatisfying.  I am looking for a tasked based plugin to Visual Studio that operates much in the same way as Mylyn does for Eclipse.  I am interested in something that a team could use to manage issues and requests from within VS, and it would be awesome if that could integrate with Eclipse (using something like bugzilla)  VS2012.   Any thoughts?


"not a valid identifier" error when I run `source ~/.bashrc`

I have made some changes (added an environment variable) to my .bashrc file, and I am trying to get them to take effect by running the command source ~/.bashrc. However, I am getting the error bash: export: `/mnt/c/Users/Lea/Documents/HSCFA/python-fsps': not a valid identifier  I am not sure where this error is coming from. For reference, I am using Windows 10, Ubuntu 20.04, and Python 3.


Why is the derivative of circle area the circumference?

Why is the derivative of the volume of a sphere the surface area? And why is the derivative of the area of a circle the circumference? Too much of a coincidence, there has to be a reason!  Also, why is the sum of the cubes the square of the sum of the integers?


How do we find the average value of the following function?

How do we find the average value of this function with the intervals $[0,1]$?  $$f(t)=10(e^{5t}-1)$$


Why is RSA encryption significantly faster than decryption?

I am designing an implementation of RSA . I recorded computation times in Java by using System.currentTimeMillis(). It returned an encryption time of 0.05 ms and decryption time of 0.55 ms, or a ratio of 1:11.   This seems like a large difference. Is it supposed to be this way?  //here my key has 256 bits  for (;;) {             long begin = System.currentTimeMillis();              for (int i = 0; i < num; i++) {              decrypt();             }              long end = System.currentTimeMillis();              long time = end - begin;              if (time >= 10000) {                 System.out.printf("Average Encryption takes: %.2f ms\n",                         (double) time / num);                 break;             }              num *= 2;         }  p = BigInteger.probablePrime(128, random); q = BigInteger.probablePrime(128, random); N=(p.subtract(one)).multiply(q.subtract(one)); e=BigInteger.probablePrime(32, random); d=e.modInverse(N); private void encrypt() {  C= M.modPow(e,N);  }  private void decrypt() {     RM = C.modPow(d, N);     }


I want to sort a table by name. These should not be alphabetic but the largest id. I have this table.  id  name      ---|-----| 1  | abc |  2  | abc | 3  | def | 4  | def | 5  | def | 6  | abc | 7  | abc | 8  | def |   That's what i need  id  name      ---|-----| 8  | def | 5  | def | 4  | def | 3  | def | 7  | abc | 6  | abc | 2  | abc | 1  | abc |    Does anyone have an idea?


The Interrupting Colon – ie a colon after a verb

I was taught that a colon never, ever follows a verb: it can follow only a complete sentence. Does anybody on this site support this type of usage? Can anybody provide links or examples of colons used after verbs? Have you ever used the colon in this manner in your writing?  I did some investigating this afternoon and unearthed some interesting information.  The Handbook of Good English and Merriam Webster's Standard American Style Manual support colons after to-be verbs. Awesome! This debunks the myth that colons cannot be used in this way. Does anybody agree with this? Two strong sources support this principle.  The Handbook of Good English by Edward D Johnson  The question was, did he like zucchini? is correct; the past tense of the question may seem to make it indirect, but it is still direct. Note that did is not capitalized; it could be, and some editors routinely capitalize in such a situation, but a capital is a surprise after a comma and in the example would give the question more independence and emphasis than the writer may want it to have. Note also the comma after was, needed to set up the question, almost as a weak colon.  We could, of course, actually use the colon and capitalize after it: The question was: Did he like zucchini? Or we could add quotation marks—which makes changing the tense desirable—and then would need no punctuation before the question The question was "Does he like zucchini?" These alternatives make the sentence rather stately, almost dramatic; the writer may prefer the smoother, more casual The question was, did he like zucchini?     Merriam Webster's Standard American Style Manual  The Interrupting Colon (as they call it)  Opinion varies regarding whether a colon should interrupt the grammatical continuity of a clause (as by coming between a verb and its objects). Although most style manuals and composition handbooks advise against this practice and recommend that a full independent clause precede the colon, the interrupting colon is common. It is especially likely to be used before a lengthy and complex list, in which case the colon serves to set the list distinctly apart from the normal flow of running text. With shorter or less complex lists, the colon is usually not used.  MWSASM Example:  Our programs to increase profitability include: continued modernization of our manufacturing facilities; consideration of distribution terminals; discontinuation of unprofitable retail outlets; and reorganization of our personnel structure, along with across-the-board staff reductions.


Removing Unnecessary Vertices on Mesh Like Terrain

Actually the tittle not correct at all but I can't find any words to describe my problem. I'm using blender and ripper for reach to my favorite game's map.   I don't have any problem importing etc. This my imported model;   As you see, there is too much grass, rocks and trees on the terrain of mesh. This is my problem. Is there any way to remove other-terrain objects in blender (or any other modelling software)? The terrain is continious but other objects start vertices have an angle bigger than normal angle which used by terrain continue vertice. Look that image:    Otherwise, if you see the second image, the terrain have tilled (e.g. 2x2, 4x4 I don't know the magnitude) squares basically. Maybe this can give a way for solve my problem. Is there any way?   Thank You..


Cron doesn't use the path of the user whose crontab it is and, instead, has its own. It can easily be changed by adding PATH=/foo/bar at the beginning of the crontab, and the classic workaround is to always use absolute paths to commands run by cron, but where is cron's default PATH defined?  I created a crontab with the following contents on my Arch system (cronie 1.5.1-1) and also tested on an Ubuntu 16.04.3 LTS box with the same results:  $ crontab -l * * * * * echo "$PATH" > /home/terdon/fff   That printed:  $ cat fff /usr/bin:/bin   But why? The default system-wide path is set in /etc/profile, but that includes other directories:  $ grep PATH= /etc/profile PATH="/usr/local/sbin:/usr/local/bin:/usr/bin"   There is nothing else relevant in /etc/environment or /etc/profile.d, the other files I thought might possibly be read by cron:  $ grep PATH= /etc/profile.d/* /etc/environment /etc/profile.d/jre.sh:export PATH=${PATH}:/usr/lib/jvm/default/bin /etc/profile.d/mozilla-common.sh:export MOZ_PLUGIN_PATH="/usr/lib/mozilla/plugins" /etc/profile.d/perlbin.sh:[ -d /usr/bin/site_perl ] && PATH=$PATH:/usr/bin/site_perl /etc/profile.d/perlbin.sh:[ -d /usr/lib/perl5/site_perl/bin ] && PATH=$PATH:/usr/lib/perl5/site_perl/bin /etc/profile.d/perlbin.sh:[ -d /usr/bin/vendor_perl ] && PATH=$PATH:/usr/bin/vendor_perl /etc/profile.d/perlbin.sh:[ -d /usr/lib/perl5/vendor_perl/bin ] && PATH=$PATH:/usr/lib/perl5/vendor_perl/bin /etc/profile.d/perlbin.sh:[ -d /usr/bin/core_perl ] && PATH=$PATH:/usr/bin/core_perl   There is also nothing relevant in any of the files in /etc/skel, unsurprisingly, nor is it being set in any /etc/cron* file:  $ grep PATH /etc/cron* /etc/cron*/* grep: /etc/cron.d: Is a directory grep: /etc/cron.daily: Is a directory grep: /etc/cron.hourly: Is a directory grep: /etc/cron.monthly: Is a directory grep: /etc/cron.weekly: Is a directory /etc/cron.d/0hourly:PATH=/sbin:/bin:/usr/sbin:/usr/bin   So, where is cron's default PATH for user crontabs being set? Is it hardcoded in cron itself? Doesn't it read some sort of configuration file for this?


I'm a surveyor and we are currently setting up our network. However, there seems to be a disagreement on the proper name of the group. The group is composed of young surveyors under the age of 35, hence the name Young Surveyors Network. However, somebody in the group has challenged it and has asserted that it should be Young Surveyor Network. Personally I think the original name is just fine but I'd prefer more ammunition wink wink   Can somebody resolve this issue? Should it be Young Surveyors Network or Young Surveyor Network? Or does it need to take an apostrophe and be Young Surveyors' Network  Thanks in advance!


Locally Lipschitz implies continuity. Does the converse implication hold?

Let $A$ be open in $\mathbb{R}^m$; let $g:A\rightarrow\mathbb{R}^n$. If $S\subseteq A$, we say that $S$ satisfies the Lipschitz condition on $S$ if the function $\lambda(x,y)=|g(x)-g(y)|/|x-y|$ is bounded for $x\neq y\in S$. We say that $g$ is locally Lipschitz if each point of $A$ has a neighborhood on which $g$ satisfies the Lipschitz condition. Show that if $g$ is locally Lipschitz, then $g$ is continuous. Does the converse hold?  For the first part, suppose $g$ is locally Lipschitz. So for each point $r\in A$, there exists a neighborhood for which $|g(x)-g(y)|/|x-y|$ is bounded. Suppose $|g(x)-g(y)|/|x-y|<M$ in that neighborhood. Then $|g(x)-g(r)|<M|x-r|$ in that neighborhood of $r$. Therefore $g(x)\rightarrow g(r)$ as $x\rightarrow r$, and so $g$ is continuous at $r$. This means $g$ is continuous everywhere in $A$. What about the converse? I don't think it holds, but can't come up with a counterexample.


I am stuck with this problem.  $f : [a,b] \to \mathbb R$ is double differentiable on $[a,b]$ and suppose $|f''(x)|\leq M ~ \forall x \in [a,b]$. Let $c \in (a,b)$. Then $|f(c)-f(a)-(c-a)\frac{f(b)-f(a)}{b-a}|\leq \frac{1}{8} M(b-a)^2$  I can prove this when the upper bound is $M(b-a)^2$.  $|f(c)-f(a)-(c-a)\frac{f(b)-f(a)}{b-a}|=|c-a| |\frac{f(c)-f(a)}{c-a}-\frac{f(b)-f(a)}{b-a}|$. This equals $|c-a||\frac{f'(\xi_1)-f'(\xi_2)}{\xi_1-\xi_2}||\xi_1-\xi_2|$ for some $\xi_1\in (a,c)$ and $\xi_2 \in (a,b)$. This equals $|c-a||f''(\psi)||\xi_1-\xi_2|\leq (b-a)^2M$  Although I know this is weak and I haven't exploited the $\xi '$s fully. I cannot find the solution afterer lots of tries, so any help is appreciated.


After update, Ubuntu has now become PopOS

I'm running Ubuntu 20.04.1 LTS. I was recently prompted to install an update from Ubuntu's GUI software updater, but I'm not sure which update. Now, I seem to have... a strange amalgamation of Ubuntu and PopOS all of a sudden? After booting up today, my desktop looks quite different:  It appears to be using Pop Shell, the tiling window manager that PopOS uses. The left-hand dock is gone. Looking at 'Appearance -> Background' in Settings, the PopOS wallpapers are present. If I go to 'Appearance -> Appearance', the light/dark theme chooser shows a visual with "Pop!_OS User" in it. The scrolling direction has been reversed. The icons are different. The Ubuntu Software Center is missing, but there's no "Pop Shop" in its place. The list goes on...  At the same time, a lot of my system is still very much how it was a few days ago when it was "pure Ubuntu" so to speak. My browser, IDE, files/folders, etc. are all the same... For context, I used to dual boot Windows and PopOS on a single SSD, but I've since wiped the drives I use (including resetting partitions). Now I use Windows on the SSD and Ubuntu on a new second drive... I can't imagine how anything from my old PopOS installation would carry over, let alone suddenly reappear inside Ubuntu after an update. EDIT: When running Software Updater again, it shows a full list of what it's trying to install: . When I try to install these packages, it fails midway through. That partially explains things... but why is this even happening? EDIT2: It is trying to install pop-gnome-initial-setup.deb which seems to conflict with gnome-initial-setup. Weird.


This is really a mystery for me.  What is the "daily reputation cap" that is required to get Epic, Legendary, and Mortarboard badges?


Fire and smoke to transparent in final render

I'm having a hard time rendering a fire and smoke simulation. I wanted to  record a animation and get the .pngs wiht alpha channel, but in the final render the objects in my case a meteor is transparent.  My goal is to achieve a animation file that works like an rgba.  How do achieve the correct results ?  I tried rendering .png looks transparent I tried composition nodes and with a blue and black background and it looks awful. Ill tried rendering .png and converting into .MOV with png rgba format and it looks like the final render , transparent thing and also I went to Adobe after effects and followed this steps ---> ` and is gets some of the solution but is still 70% transparent.   I am ussing Blender 2.79 for windows 10 and using cycles.  Here is my example.


Java "main" java.lang.NullPointerException due to ImageIcon in Beans

I am trying to run an application in netbeans, but regularly getting bellow given error:  Exception in thread "main" java.lang.NullPointerException at javax.swing.ImageIcon.<init>(ImageIcon.java:217) at Login.<init>(Login.java:36) at Login.main(Login.java:90) C:\Users\MyPc\AppData\Local\NetBeans\Cache\8.1\executor-snippets\run.xml:53: Java returned: 1 BUILD FAILED (total time: 1 second)   The image is used in line 36 as:   btnLogin = new JButton("Login", new ImageIcon(ClassLoader.getSystemResource("Images/login.png")));          This question is different as already answered questions have been reviewed but none of them are able to solve the issue. Similar questions can be different depending upon particular environment.


How python object memory works for int less than -5 and greater 256

In my understanding, all things in python are object and some of them per-allocate memory to them (for int the range is from -5 to 256).  My question is if the address not per-allocate, does it create in fly?  for example:  print id(256) a = 256 print id(a)  36609008 36609008   this example indicates variable a is referring the object 256's memory, thus they have same address.   print id(300) a = 300 print id(a)  106711544 106708304   for the example above:   does python create two objects? (it seems yes) why -5 to 256? would those per-allocated object be reused to create new objects?


Create an environment that uses another environment

I am trying to create an environment that wraps another one, lstlisting here.  \documentclass[12pt, dvipsnames]{report} \usepackage[english,french]{babel} \usepackage{listings}  \newenvironment{code}[1]{\begin{lstlisting}#1}{\end{lstlisting}}  \begin{document}  \begin{code} some code \end{code}  \end{document}   When I compile this code with texmaker, there is an "Emergency Stop", because "no legal \end" was found. I guess that the parser gets stuck in an infinite loop.  How to fix this code?  EDIT: replacing newenvironment by lstnewenvironment leads to the error "Extra }, or forgotten \endgroup" at the line \end{code}:  \documentclass[12pt, dvipsnames]{report} \usepackage[english,french]{babel} \usepackage{listings}  \lstnewenvironment{code}[1]{\begin{lstlisting}#1}{\end{lstlisting}}  \begin{document}  \begin{code} some code \end{code}  \end{document}


How can I make Ubuntu 18.04 stop asking me to unlock the login keyring?

There are 2 solutions floating on the web for this problem:   Disable the passwords keyring in Ubuntu or put in a blank password. I don't think I understand the full implications of this hack and I would not want to compromise the security of my system to fix this problem. So I'm looking for another solution. Make Google Chrome use its built in password storage instead of relying on the Ubuntu password keyring.You would do this by locating the Chrome launcher within the system folders and adding "--password-store=basic" to the exec command. None of these edits changes the launcher in the dock, though. Or should I say "dash"? I don't know the proper Gnome terminology but it's the application shortcuts in the left bar. If I click that Chrome launcher it always brings lots of popups that ask me to unlock the keyring.   Editing launchers like this does something, though, because it fixes the launcher in the "Applications" menu. By that I mean the list of installed applications that you see when you click the 9 dots in the bottom left of the screen. (I apologize for not providing the proper name for this menu but I was unable to find what Gnome names all its UI elements).  So if I open the menu and click the Chrome launcher there, everything is cool. But if I click the icon on the desktop or if I click a link in Thunderbird that launches Chrome, all hell breaks loose. Not only do I get a ton of popups that ask for my password to unlock the keyring, but some of the stored cookies are somehow reset too.  Edit:  I figured that Ubuntu uses 2 separate launchers for Google Chrome: one for the dash/dock on the desktop and a different one for the applications menu. Editing all launchers in all documented locations to append the command with "--password-store=basic" will only affect the one in the applications menu. That launcher will have the correct command and will behave as expected. The one in the dash/dock, however, seems to be kept in a secret location and you cannot get to edit it. This is also the launcher that Ubuntu uses whenever Chrome is launched by another application - like, for example - when Thunderbird launches Chrome to load a URL you clicked in an email.   Whenever that launcher is used, Chrome will try to use the passwords in the Ubuntu keyring, which is locked by default, so this results in a ton of popups that you have to dismiss at every launch. Even more annoying, this action also seems to clear some of the browser cookies that relate to authentication and site preferences. And in some circumstances can lead to losing all your browser stored passwords. Which is really bad because using the browser stored passwords seems to be the only way to avoid the buggy keyring.


Convergence of sequence of means: Define $A_n=\frac{a_1+a_2+...a_n}{n}$, Find $\lim_{n\to\infty} \sqrt{n}(A_{n+1}-A_{n})$

Let $a_n$ be a sequence of real numbers such that $|a_n| \le 1$.    Define $A_n=\frac{a_1+a_2+...a_n}{n}$, Find   $$\lim_{n \rightarrow \infty} \sqrt{n}(A_{n+1}-A_{n})$$   I was thinking of using Stolz Cesaro lemma, but that needs to show that $A_n$ is convergent which means that $a_n$ has to be convergent. But I have no clue how to approach this one.


How to optimize my SSD and HDD configuration

I have completed my first custom PC build. I installed Windows 8 Pro and I have a few questions pertaining to the OS and the way I should configure my hard discs.  I have a 128 GB SSD that I installed the OS on and I have a 3 TB HDD. I want to reserve as much space as possible on the SSD and limit the use because I know they have a limited life.   Q: How would I optimize the life span of my SSD? I wanted to put everything else on the HDD other than the OS of course. Is this the right choice? If so how do I change the settings for Program Files and folders such as My Documents, Downloads, Pictures etc. to default to my HDD (E:/ Drive)?


Merging LiDAR tiles without losing data in QGIS?

I'm trying to merge some LiDAR tiles together but when I do, the clarity of the image drops, so I think that means I am losing some data.   How do I merge the tiles and keep all of the data and the clarity of the LiDAR?  Before merge:    After merge:


Windows 10 ver 1607: File Explorer long paths not working?

I updated to the Windows 10 home anniversary edition version 1607 and set LongPathsEnabled to 1 with regedit.exe but the File Explorer doesn't seem to work with long paths still. If you select a long path file and try to rename it, no option will be available. I restarted the computer after making the changes and update.   Is there any way to enable renaming in the File Explorer in the new updated version? Did I miss a step somewhere?


I tried and failed . Please tell me, what am I doing wrong?


How to save a translation of a plugin in "CodeStyling Localization"?

Hi I was translating one of my plugins in "CodeStyling Localization". when I update my plugin my translation erased. Is there anyway to find it ? And How can I backup my translation (I don't want to waste my time next time :))


Valid metric for the following set in the three dimensional space

Suppose we have the set $M_{\alpha\in(0,1)} = \left\{\boldsymbol{x}\in \mathbb{R}^3: \boldsymbol{x} = f(\alpha)+\lambda g(\alpha), \lambda\in \mathbb{R} \right\},$ where $f,g:\mathbb{R} \rightarrow \mathbb{R}^3$. Intuitively, $M_{\alpha}$ is a line in the three-dimensional space. Then, is there a suitable metric $d(M_{\alpha'},M_{\alpha''})$ for $\alpha',\alpha'' \in (0,1)$ that we can use? I asked a simpler question in this post, , where sup-norm was recommended. However, $\lambda$ now is no longer bounded, and thus, sup-norm cannot be used. I wonder if there is any other metric out there that can be used here and involves $L^2-$norm? Update: One potential metric that I have in mind is $d(M_{\alpha'},M_{\alpha''}) = ||f(\alpha')-f(\alpha'')|| + ||g(\alpha') - g(\alpha'')||$. Please correct me if there is any flaws in this. Sketch of the proof: Let $(\mathcal{S},d)$ be the metric space.  $d(M_{\alpha'},M_{\alpha''})=0$ iff $||f(\alpha')-f(\alpha'')|| = 0$ and $||g(\alpha') - g(\alpha'')||=0$ iff $f(\alpha')=f(\alpha'')$ and $g(\alpha') = g(\alpha'')$ iff $\alpha'=\alpha''$ iff $M_{\alpha'}=M_{\alpha''}.$ $d(M_{\alpha'},M_{\alpha''})=||f(\alpha')-f(\alpha'')|| + ||g(\alpha') -g(\alpha'')||=||f(\alpha'')-f(\alpha')|| + ||g(\alpha'') - g(\alpha')||=d(M_{\alpha''},M_{\alpha'}).$ Let $M_{\alpha'}, M_{\alpha''}, M_{\alpha'''} \in \mathcal{S}$, $$d(M_{\alpha'}, M_{\alpha''})+d(M_{\alpha''}, M_{\alpha'''})=||f(\alpha')-f(\alpha'')|| + ||g(\alpha') - g(\alpha'')||+||f(\alpha'')-f(\alpha''')|| + ||g(\alpha'') - g(\alpha''')|| \geq ||f(\alpha')-f(\alpha'')+f(\alpha'')-f(\alpha''')||+ ||g(\alpha') - g(\alpha'')+g(\alpha'') - g(\alpha''')|| = ||f(\alpha')-f(\alpha''')|| + ||g(\alpha') - g(\alpha''')|| = d(M_{\alpha'}, M_{\alpha'''}).$$  Hence, $d$ is a valid metric. Thanks in advance for any help!


Qualcomm Atheros Device [168c:0042] (rev 30) Wi-Fi driver installation

I bought an Acer laptop and installed Ubuntu 14.04LTS but WiFi drivers are not available for it. So I am trying to install a windows driver using wifidocs/driver/ndiswrapper.  On doing lspci -vvnn, it gives:  Network controller ［0280: Qualcomm Atheros Device ［168c:0042］ (rev 30)   Then I also disabled the atheros drivers. Using lspci and lspci -n, I can say PCI id is 168c:0042. But Acer website has three atheros drivers. I could not figure out which one to download but downloaded one on a windows PC and pasted the zip file on my desktop then unzipped it from the terminal using unzip <filename>.zip. The page says you have to go to control panel system hardware and all that on the windows system. I did not do it. Windows computer not being mine, I am afraid I should not install any additional driver on it. After unzipping it has one .inx file and one .bin file but no .sys file. I don't know whether I am completely right till here or have I missed something? And if I am right then how to proceed from here? I also made a new directory and copied the unzipped .inx and .bin files in it. Then in that directory I ran the ndiswrapper -i <filename>.inf but it says ndiswrapper not installed and when I do sudo apt-get install ndiswrapper-common, I get the reply that ndiswrapper-common is already the latest version. What to do? here is my dmesg | grep ath10k result  [   7.882758] ath10k_pci 0000:03:00.0: pci irq msi-x interrupts 8 irq_mode 0 reset_mode 0 [    8.190016] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/cal-pci-0000:03:00.0.bin failed with error -2 [    8.334587] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/board-2.bin failed with error -2 [   10.140677] ath10k_pci 0000:03:00.0: qca9377 hw1.0 (0x05020000, 0x003820ff sub 105b:e09a) fw WLAN.TF.1.0-00267-1 fwapi 5 bdapi 1 htt-ver 3.1 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1 features ignore-otp [   10.140682] ath10k_pci 0000:03:00.0: debug 0 debugfs 0 tracing 0 dfs 0 testmode 0 Here is the output of lspci -nnk | grep -iA2 net  02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)     Subsystem: Acer Incorporated [ALI] Device [1025:098a]     Kernel driver in use: r8169 03:00.0 Network controller [0280]: Qualcomm Atheros Device [168c:0042] (rev 30)     Subsystem: Foxconn International, Inc. Device [105b:e09a]     Kernel driver in use: ath10k_pci


Cannot find pipe symbol "|" in Ubuntu server

This question might sound silly, but I'm trying to install webmin on Ubuntu server and I need to execute this command:  wget -q http://www.webmin.com/jcameron-key.asc -O- | sudo apt-key add -   but I'm unable to do it, because I cannot use the pipe symbol "|". I've tried every key from my keyboard, as well single key and combination Ctrl+key or Shift+key. I cannot copy paste as well, because Shift+Ctrl+V doesn't work neither (though I've enabled common buffer for my pc and virtual machine).  What else can I do here?


I've constructed a finite field as follows $K = F_3 [x] / (x^3-x+1) $.  Now my question is: How can I find primitive elements of my $K$?   Thanks for any help!


Pass arguments from one function to another (without templates) - C++

Question   Is there a way to pass arguments from a "sender" function to a "receiver" function in C++?     Expectation/ Theory   void print(const char character) { std::putchar(character); } void print(char message[], unsigned length) {     for (unsigned iterator = 0u; iterator ^ length; iterator += 1)         print(*(message + iterator)); }  void println(...) { print(...); print('\n'); std::fflush(stdout); }   In this example: • println is the "sender" function and • print is the "receiver" function.  The print function is to accept all arguments of the println function as denoted by the example ... syntax.     Context   I do know of template functions in C++ and how it can rectify the former example to be  void print(const char); void print(char[], unsigned); // They’ve been defined before already…  template <typename... types> void println(types... arguments) { print(arguments...); print('\n'); std::fflush(stdout); }   But I want to see if there is another approach to this problem — without fairly recent C++-only features i.e.: how was this problem solved in C?  I code in a C-style manner (using C features over C++ features) in C++ because I want to know how to build C++ features personally.


My Problem:   Early on when the repository was set up a mistake was made causing all the images at the time to be written to the repository. This was quickly rectified in the gitignore file and no longer presents a problem.  The problem is now that we have an enormous repository which contains the history of the images. This presents a problem when cloning the repository locally as it takes a lot longer than a clean clone from the tip.  My questions:  Is there a way of removing the part of the history that includes the images which are never going to be needed?  If I cannot remove can I compress or even cleanup the history in any way?


Getting a second GPU to speed up rendering times in Cycles

I don’t know much about hardware so, please, be gentle!  I’m thinking of getting a second GPU to cut (Blender Cycles) rendering times in half. After some research I found out that:   each GPU renders an assigned tile in Blender (hence the reduced half time) the new GPU has to be of the same type (Nvidia, in my case) Two GPUs can generate more heat ‘I need to check the power’ (not sure what that means)   I own a ‘GA-X99P-SLI LGA2011-3 ATX’ Motherboard, with a   ‘Palit Geforce GTX 1070 Super JetStream 8GB GDDR5’ Graphics Card, and a  ‘NH-D9DX i4 3U 92mm Intel Xeon’ CPU Cooler  Here are my questions:  A. Should i get the same GTX 1070 or should I go for a faster one (e.g. the 1080?) I was thinking of buying the same GTX 1070.  B. In terms of heat, will the PC be ok or should I do something about it?  C. In terms of power, what should i do?  D. For rendering in Blender, do i have to physically connect the cards via SLI, or they don’t need to be connected?  Many thanks for any comments and help  George


How to find datasource in an application which uses JNDI

I am analyzing dynamic web application and i am not able to find the datasource details anywhere in the application. In the application context all i could see is the below entry.  <je:jndi-lookup id="dataSource" jndi-name="java:comp/env/jdbc/App"/> <je:jndi-lookup id="mySQLDataSource" jndi-name="java:comp/env/jdbc/App_MySQL"/>   The application is deployed in Tamcat server. Where will be the datasource defined? Is it possible the DB details are configured in tomcat server?  Thanks


How does Vision lift Thor's hammer in Avengers: Age of Ultron?

In some scenes in Avengers: Age of Ultron Iron man, War Machine, and Captain America try to lift Thor’s hammer but they end up failing. At some point Vision lifts it easily. How can Vision lift it?


Identifying the noun for noun-verb agreement

In the following sentence, what is the correct verb to use:      "We identified $130,000 in costs that [were/was] not eligible for reimbursement."    I'm thinking that "$130,000" (and not "costs")  is the noun, is this correct?


How can I get my Windows 8 license key once I've installed Windows 10 preview?

I installed Windows 10 preview but now I want to re-install Windows 8 or Windows 8.1 How can I get my license key back so that I can do this? The computer was supplied with Windows 8 pre-installed.


Give two specific examples of a non-zero matrix X such that: AX = XA.

If matrix A = \begin{bmatrix}3&1\\-2&-1\end{bmatrix}  I am trying to give two specific examples of a non-zero matrix X such that: AX = XA.  so far I let X = \begin{bmatrix}a&b\\c&d\end{bmatrix}  And so AX = XA, and I multiplied X and A respectivley to give the linear equations:  3a + c = 3a - 2b  3b + d = a - b  -2a + c = 3c - 2d  -2b - d = c - d  I believe i am supposed to show this in matrix form and solve the system to get a 4x4 matrix containing expressions with two variables where any number can be substituted so that AX = XA. However I am unsure on how to do this and need some help.


Is it possible to override the command line's built in "cd" command?

Just about every time I 'cd' to a different directory on my machine (in this case, running Mac OS X 10.6.7) via the command line (which is bash), I immediately type 'ls' to get the list of contents in that directory. I'm trying to figure out a way to override 'cd' so that it changes to the requested directory and then gives me the list in one shot.   I've been able to get the basic functionality I'm looking for working by with the following line added to my ~/.bash_profile  function cl() { cd "$@"; ls -l; }   This works as expected. Changing to the requested directory and then showing me the contents. Where I run into an issue is trying to override "cd" itself instead of creating a new "cl" command.   The following things do not work  ##### Attempt 1 ##### # Hangs the command line  function cd() { cd "$@"; ls -l; }   ##### Attempt 2 ##### # Hangs the command line  function cd() { 'cd' "$@"; ls -l; }   ##### Attempt 3 ##### # Does not change directory.  # Does list contents, but of the directory where you started.  function cd() { /usr/bin/cd "$@"; ls -l; }   #### Other attempts that fail in various ways ##### alias cd=cd "$@"; ls -la; alias cd="cd '$@'; ls -la;" alias cd='cd "$@"'; ls -la; alias cd=/usr/bin/cd "$@"; ls -la;   I also tried several other iterations that aren't listed as well as making an alias that points to the working 'cl' function. None of which worked.   What I've read in documentation talks about the fact that 'cd' can't be run as an external command (which is what I understand to be the way the function would need to use it).   So, I can currently use my "cl" command and get what I want, but the question is/remains:  Is there a way to override the behavior of 'cd' to have it change to the requested directory and then do something else afterward?


Can relative velocity of a particle exceed the speed of light?

Consider two particles (having same mass) moving with constant velocity very close to speed of light, say $0.99c$ in opposite directions. Will the magnitude of their relative velocities exceed the speed of light?


Let's take the numbers 0-10.  Their mean is 5, and the individual deviations from 5 are -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 And so the average (magnitude of) deviation from the mean is $30/11 \approx 2.72$.  However, this is not the standard deviation.  The standard deviation is $\sqrt{10} \approx 3.16$.  The first mean-deviation is a simpler and by far more intuitive definition of the "standard-deviation", so I'm sure it's the first definition statisticians worked with.  However, for some reason they decided to adopt the second definition instead.  What is the reasoning behind that decision?


How do I know if I have got a congestion charge?

I drove to Westminster Bridge Road last Wednesday around 6.45 pm. Now different people have different statements to offer. How do I know if I need to pay any fees? Help.


Can't open News app after changing region/country

After changing region/country, News can't be opened. App Store shows installed, with "Open" button next to the App. Tapping on it does nothing.  Asking Siri to open it, Siri says "can't right now". I'm using an iPhone SE and the storage is not full. The widget shows. Tapping on articles (in widget) opens Safari.  Anyone else had this, and solved it?


Java confused about == in the overridden equals method

This is the piece of code I used from the SCJP book. I understand that == compares the memory location of the objects to find the equality and .equals compares the hashcode to determine the equality.  My question is in the below snippet, in the overrided equals method we compare :  (((Moof)o).getMoofValue()) == this.getMoofValue()  in the above code, does the == compare the memory location of the string value? If it does then it should be false. But it returns true. How does the == work here?  public class EqualsTest {      public static void main(String args[]){         Moof one = new Moof("a");         Moof two = new Moof("a");         if(one.equals(two)){             System.out.println("Equal");         }         else{             System.out.println("Not Equal");         }     } }        public class Moof {         private String moofValue;         public Moof(String i){             this.moofValue = i;         }         public String getMoofValue(){             return this.moofValue;         }         public boolean equals(Object o){             if((o instanceof Moof) && (((Moof)o).getMoofValue()) == this.getMoofValue()){                 return true;             }             return false;         }     }


Missing packages when installing .deb via dpkg -i

I'm attempting to install Citrix Receiver on a fresh install of Lubuntu. Being a flavor of Ubuntu, I figured it'd be safe to ask this here.  I run: sudo dpkg -i icaclient_13.10.0.20_amd64.deb  and I get the following  (Reading database ... 243579 files and directories currently installed.) Preparing to unpack icaclient_13.10.0.20_amd64.deb ... Unpacking icaclient (13.10.0.20) over (13.10.0.20) ... dpkg: dependency problems prevent configuration of icaclient:  icaclient depends on libwebkit-1.0-2 | libwebkitgtk-1.0-0; however:   Package libwebkit-1.0-2 is not installed.   Package libwebkitgtk-1.0-0 is not installed.  dpkg: error processing package icaclient (--install):  dependency problems - leaving unconfigured Processing triggers for desktop-file-utils (0.23-3ubuntu2) ... Processing triggers for mime-support (3.60ubuntu1) ... Errors were encountered while processing:  icaclient   I don't see these exact packages show up in the Muon Package Manager.  So, my question is: what is the safest way to go about installing these packages without breaking my OS?  Package libwebkit-1.0-2 is not installed. Package libwebkitgtk-1.0-0 is not installed.


if statement saying it's false even though it's true. Equals not working

The problem is that the variables "check" and "password" are both the same string, but the if statement says it's false for some reason. How do i fix this exactly?  Here's the code:  import java.util.Scanner; public class Manager {    public static Scanner input = new Scanner(System.in);    public static boolean isPasswordSet;    public static String password;    public static void password() {     String check;     while (true) {         if (isPasswordSet == false) {             System.out.println("Please set a new password: ");             password = input.next();             System.out.println("Enter password again: ");             check = input.next();             if (check == password) {                 isPasswordSet = true;                 System.out.println("Welcome");                 return;             } else if (check != password) {                 System.out.println("Password incorrect.");                 isPasswordSet = false;                 continue;             }         } else if (isPasswordSet == true) {             System.out.println("Please enter password: ");             check = input.next();             if (check == password) {                 System.out.println("Welcome");             } else if (check != password) {                 System.out.println("Password incorrect.");                 continue;             }         }     } } public static void main(String args[]) {     password(); }   }  Output:  Please set a new password:  ryan Enter password again:  ryan Password incorrect. Please set a new password:


From Hungerford, section V, chapter 4 exercise 9:     Let $x^4+ax^2+b$ in  $K[x]$ (with char $K\neq $2) be irreducible with   Galois group $G$.      (a) If $b$ is a square in $K$, then $G =  \mathbb{Z}_2\times\mathbb{Z}_2$.       (b) If $b$ is not a square in $K$   and $b(a^2-4b)$ is a square in $K$, then $G = \mathbb{Z}_4$.       (c)   If neither $b$ nor $b(a^2-4b)$ is a square in $K$, then $G = D_4$   (dihedral group).   What I've tried  With (a):  Let be $u_1,u_2,u_3,u_4$ the roots of the quartic, then $b=u_1u_2u_3u_4$ is in $K$ and there exists $a\in K$ with $a^2=b$. On the other hand, $G = \mathbb{Z}_2\times\mathbb{Z}_2$ if and only if $\alpha=u_1u_2+u_3u_4$, $\beta=u_1u_3+u_2u_4$, $\gamma=u_1u_4+u_2u_3$ are in $K$, but I don't find the way to rely those results.   With (b) I know that $b=u_1u_2+u_1u_3+u_1u_4+u_2u_3+u_2u_4+u_3u_4$ but again I dont know how to continue.  Any help? Thanks.


What is the difference between man and --help?

I used both command lines and displayed the same output


What is the Genetic Cause of Homosexuality?

So, I'm just wondering about this because I read the following in my Biology textbook about fruit fly genes:     "Normal male and female flies express distinct forms of the fru gene. When females are genetically manipulated to express the male form of fru, they court other females, performing the role normally played by the male..."   Out of curiosity, have any studies been conducted to see what causes homosexuality? Is there a similar gene in humans that, if randomly altered, causes attraction to same-sex individuals?  EDIT: a similar post exists, but nobody provided an answer related to the poster's question.


Some domains receive my emails, others aren't sent

I finally made it to set up my mail-server with exchange.  Receiving e-mails works perfectly, sending e-mails works not always:  When sending an e-mail to GMX, the e-mail doesn't get delivered. After a while I get following response (I guess from my own mail-server):     Die Zustellung an folgende Empfänger oder Gruppen verzögert sich:   Vorname Nachname (vorname-nachname@gmx.de)   Betreff: Re: Test   Diese Nachricht wurde noch nicht zugestellt. Es wird weiterhin versucht, die Nachricht zuzustellen.   Der Server wird noch 1 Tage, 19 Stunden und 50 Minuten versuchen, die Nachricht zuzustellen. Sie erhalten eine Benachrichtigung, falls die Nachricht bis dahin nicht übermittelt werden konnte.   means something like      the delivery to following recipients or groups is delayed: [...] This message wasn't delivered yet. It is still trying to deliver the message. The server will try to deliver the message for another 1 day, 19 hours and 50 minutes. You will receive a notification if the message could not be delivered by then.   Yesterday I tried to send a mail to some microsoft-mail (hotmail.com, outlook.com,...) I instantly got the message that I can't send mails to them. Today it worked (but I found the mail then in my spam-folder).  Mails to gmail aren't delivered and I don't get any error-mail.  Any idea what the problem could be?  I didn't add a certificate for now to my exchange, could this be the problem?


What is a native implementation in Java?

If we look at the Java Object class then we can find some of the methods like:  public native int hashCode() protected native Object clone()   What are these natives and how do these methods work?


Suppose I have a vector in c++ as v = ('a','e','i','o','u'). I want to check whether a string is a vowel or not by simply checking if the character is in the vector  v or not. I don't want any code for that as I myself know that , I am looking for a function or a keyword in c++ which is equivalent of below in python :   list = ['a', 'e', 'i', 'o', 'u'] if str in list:     #do stuff   PS : Also let me know if nothing equivalent to this exists.


Failure to install MySQL 8.0 on Ubuntu 18.04

I'm at the state of frustration trying to install MySQL 8.0 on my Ubuntu 18.04 box.  I have searched and see many answers (and also a lot of posts about failures) but nothing is working.  I start by the following:  wget https://dev.mysql.com/get/mysql-apt-config_0.8.13-1_all.deb   And then this:  dpkg -i mysql-apt-config_0.8.13-1_all.deb   On checking my apt package I see a new file created, /etc/apt/sources.list.d/mysql.list, but the content can't possibly be right for 8.0! - content here:  ### THIS FILE IS AUTOMATICALLY CONFIGURED ### # You may comment out entries below, but any other modifications may be lost. # Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications. deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-apt-config # deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-5.7 deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-tools #deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-tools-preview # deb-src http://repo.mysql.com/apt/ubuntu/ bionic mysql-5.7   Anyway, next step is this:  dpkg -i mysql-apt-config_0.8.13-1_all.deb   This give me a UI which looks correct:    Leading to this selection:    When I select OK on THIS option, I am sent back to the first screenshot.  Then that takes me to the 2nd.  I am now in an infinite loop.  When I hit escape, I get the following message:  Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config)   At this point, I don't know what further steps to take.  My thoughts are, is there any way to install MySQL 8.0 directly without apt-get?  I am appreciative of any and all solutions here, thanks.


I asked this same question on my original account that I no longer have access to. Yesterday when I turned on my computer a tab opened that is just a blue screen called      C\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe    I got an answer saying to disable it from startup which did not work. I got a comment that said I probably installed something that wants to run a script at startup but it is unknown is it is malicious or not due to lack of information. I got another comment saying to run a program to tell me the process and copy and paste it so here is that:      "C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe"    I need to know if I should be worried about this happening every time I start my computer or if I will be fine and a solution to get rid of it would be very helpful.


Does HDMI cable "quality" actually affect transmission?

I really don't want to pay a ridiculous price for a "name brand" HDMI cable if it doesn't really do anything for me. I'm just curious: now that most transmission is digital (packetized) is there such a thing as a "quality" cable?    I suspect that if the cable works at all, I'm safe saying I have a quality connection. I just want to double check. Some of these reviewers complain that generic cables "create noise, lack bandwidth, can't handle X, etc". I'm skeptical of these reviews.  If the logic for HDMI cables and quality can be applied to cables in general, please elaborate on that as well.


Why doesn't the definition of a category require an explicit notion of morphisms equality?

I am learning basics of the category theory (CT).  I do understand that CT is a modern powerful framework to describe various branches of mathematics in a unified way.  I do admit that category's definition tells a lot about the whole thing and focuses on the most important properties, shadowing unnecessary details. However, the more I go forward, the more it feels like it should explicitly require a notion of morphisms equality (like it does with morphism composition). It feels so because equality or inequality of morphisms arises everywhere, since the very beginning: any commutative diagram eventually reduces to an equality of two different paths and many other things involve equality as well. Even composition is defined grounding upon an (implicit) equality!  I'll try to give an example of my concern. Consider $\mathbb{SET}$. Its objects are sets and morphisms are functions. Now, let's recall that functions are sets as well - to be more precise, a function $f : A \mapsto B$ is a subset of a $A \times B$ obeying certain properties, which I omit. Thus, one could argue that $f$ is both a morphism between objects $A, B \in Obj(\mathbb{SET})$ and an object defined as a set of pairs $\{ (a_1 \in A, b_1 \in B), ..., (a_n \in A, b_n \in B) \}$ and those are equal because both are essentially exactly the same thing.  I hope my concern is clear and I need some kind of "conceptual insight" from knowledgeable people to move forward. Please give me the right perspective.


Checking which Fonts are already installed

I downloaded a .tex file and after changing some Helvetica fonts to Times New Roman, I can finally see the pdf. Changing to Times New Roman was a wild guess that worked, but the result is not aesthetically pleasing. However, I didn't like the Helvetica font much either. How can I check which fonts are already installed to experiment a little? I have Miktex 2.9 installed.


Question about SOT and compact operators

I need some help with functional analysis / Hilbert space theory. If you have a favorite text to recommend, please let me know~  Here is my question:  Given $v_t$ be the "squeeze operator" on $H=L^2[0, 1]$, where $v_t: L^2[0,1] \to L^2[0, \frac{2-t}{2}]$ acts on $f \in L^2[0,1]$ by squeezing the domain of the function. We have that $\{v_t\}$ for $t \in [0, 1]$ is a family of SOT continuous operators. I am wondering why given any $p \in \mathbb{K}(H)$, we have $\{ v_tpv_t^* \}$ is continuous in norm.  I found the following facts on a reference suggested by Wikipedia (Hilbert Space Operators in Quantum Physics), but I am not sure how to prove them or how I may use them...   $T_n \to^{SOT} T$ implies that for any $p \in \mathbb{K}(H)$, we have $T_np \to Tp$ in norm.   Hints or suggestions would be greatly appreciated!


Converting UNIX time to a date from an online json

Basically what I'm trying to do is using this api, api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=<key>&steamids=76561197960435530  and use the time created field and display it converted from UNIX time to regular time  This is some I code I have made      using System;     using System.Collections.Generic;     using System.Linq;     using System.Text;     using System.Net;     using Newtonsoft.Json;     using Newtonsoft.Json.Linq;       namespace JSONTest     {         class Program         {             static void Main(string[] args)             {                 string SteamKey = // key                  WebClient c = new WebClient();                 var data = c.DownloadString("http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/" + "?key=" + SteamKey + "&steamids=76561197960435530");                // Console.WriteLine(data);                 JObject o = JObject.Parse(data);                 Console.WriteLine("Name: " + o["response"]["players"][0]["timecreated"]);                 Console.ReadLine();                   // Prompt the user on what they want to do               }         } }   I have got it to display the field "timecreated" but I don't know how I would convert that to a Date. Pointers would be greatly appreciated.


Can't transfer purchases from iPhone to iTunes in iOS 9

After upgrading to iOS 9, I can't transfer purchases from my iPhone to iTunes. It happens to just start the process, then it finishes without transferring anything. However, I can still transfer purchases from my iPad with iOS 8.4 like before.   iPhone 5c, iOS 9 iTunes 12.3 MacBook Pro 13" with Retina Display Mid 2014, OS X El Capitan   Apparently, not many people happen to use this "transfer purchases" feature so it didn't get any real attention. I used it a lot, I used to update my apps on my iPhone, transfer them to iTunes and updated my iPad apps using iTunes. Still, I can update my apps using iTunes and update apps on all my devices.


sorting list in python based on dictionary key

I have a list which I have gotten from json.loads();  myList = [{'label': 'Users', 'host': 'XYZ', 'tags': {'customer': 'XYZ'}, 'data': [[1518756360, 1]]},            {'label': 'Users', 'host': 'ABC', 'tags': {'customer': 'ABC'}, 'data': [[1518756360, 1]]},            {'label': 'Users', 'host': 'EFG', 'tags': {'customer': 'EFG'}, 'data': [[1518756360, 1]]}]    Is there a way to sort this list based of host key so that it becomes like this?  mySortedList = [{'label': 'Users', 'host': 'ABC', 'tags': {'customer': 'ABC'}, 'data': [[1518756360, 1]]},                  {'label': 'Users', 'host': 'EFG', 'tags': {'customer': 'EFG'}, 'data': [[1518756360, 1]]},                  {'label': 'Users', 'host': 'XYZ', 'tags': {'customer': 'XYZ'}, 'data': [[1518756360, 1]]}]    I tried myList.sort() and myList.sort(key='host') but it didn't work.


How to replicate basic configuration tasks?

(This might be off-topic and/or not answerable, but I want to ask anyway.)  Recently, I am managing a lot of VPS server with Linux for my personal and professional projects.  However, I am kind of tired by the repetitive tasks. Let's say I have to do the following after installation of a VPS   add some users, add them to sudoers install the basic needed packages from apt-get find out that the package X is not in the basic repository, so I add some repositories do some basic configuration, both as a root and as a user, copy-pasting some stuff from the internet to some files and see what sticks finally start coding   Is there any way to automate the whole process? Basically to "seal" the whole configuration, so I can then do all this in somehow more simplier way.


I'm trying to implement a help message on my shell script to get a usage example when running my script with "-h" as a parameter. I looked for ways to do it on-line but it's just not working...  This is my code:  #!/usr/bin/env sh  usage="$(basename "$0") [-h] -- program to change all files from one extension to another extension  where:     -h      show this help text     ext1    extension to be changed     ext2    new desired extension      usage example: ./chage_entension.sh .cpp .c"  while [[ getopts ':hs:' option ]]; do     case "$option" in         h) echo "$usage"             ;;     esac done shift $((OPTIND - 1))  ext1 = "$1" ext2 = "$2"  for file in *$1; do     mv "$file" "`basename "$file" $1`$2" done   And this are the errors I'm getting when trying to run ./change_extension.sh  /home/andre/src/scripts/change_extension.sh: line 12: conditional binary operator expected /home/andre/src/scripts/change_extension.sh: line 12: syntax error near `':hs:'' /home/andre/src/scripts/change_extension.sh: line 12: `while [[ getopts ':hs:' option ]]; do'


When you type dir in terminal, the name file with space separate with symbol backslash \

Terminal Text  $ cd LALALA ~/LALALA $ dir la\ la\ 1 la\ la\ 2 ~/LALALA $    Directory Image    When I use dir command in terminal, the list of file show \ (backslash) to separate their word (see: Terimanal Image). Whereas in the origin, there is no '\' (backslash) (see: Directory Image). How do I change this back to normal?  NB. I think the reason is because of the pwd command on the terminal. After I use the PWD command, this happens.


How to do integral $\int\frac1{x^3+x+1}dx$?

I've been stuck by this integral. I only knew that roots of the cubic equation are complex. Please help me with this. $$\int\frac{dx}{x^3+x+1}$$


If there is a function that    continuous in a interval monotonic in the same interval   Does it mean the function is also differentiation function in the interval?


Making a Laser in Cycles - Straight Beam of Light?

I am modeling a laser pointer in Blender, but I am not sure how to make the laser's light beam.   The Spot light comes the closest to what I am looking for, but its starting diameter is 0, and you cannot set the spread amount to less than 1 degree.  I would like to be able to do this in the Cycles rendering engine if possible.      Edit: I am not trying to see the actual beam of light, like when you shine a laser beam through fog. Rather, I simply want to have the light beam go straight from the laser. So that if you were to shine it at an object up close, the dot would be the same size as if you were to shine it at a object farther away.  Not this:                              But this:        *Laser images from images.google.com


Why is my keyboard shortcut option+command+\ mapping to command+c?

It's the weirdest thing, all of a sudden on macOS Catalina when I try to use my 1password shortcut option + command + \ it for some reason gets mapped to command + c. I checked here:  and it really weird that the c key gets pressed when I am literally typing option + command + \. Here's a video:    What might be causing this??


This is a mistake I've seen many people make, a few physicists included, but I haven't ever seen a satisfactory explanation for what's going on.  Apologies for the lengthy setup.  Setup  Suppose I have a stationary 1 kg weight, and I apply a 1 N force for 1 second.  At the end of the second, it will have a velocity of 1 m/s and have moved .5 meters.  Its initial kinetic energy is 0 and its final kinetic energy is .5.  The force has done .5 Joules of work to the weight (just Force * distance).  Now suppose the weight is initially moving at 10 m/s in the same direction as the force, and I again apply a force of 1 N for 1 second.  After the second it will have a velocity of 11 m/s and have moved 10.5 meters.  Its initial kinetic energy was 50 and its final kinetic energy is 60.5.  The force has done 10.5 Joules of work to the weight.  The work done in either case is not the same, but the result of applying the work to change the velocity is.  So Work is a relative quantity depending on your frame of reference, just like kinetic energy.  It's not an absolute quantity in the same way that mass or distance or time is (assuming classical mechanics).  Suppose my weight is something with stored chemical potential energy.  Maybe a potent chemical or a battery or something like that.  The potential energy for it is measured in either Joules or calories or kilowatt hours or all sorts of things, but ultimately its the same unit as Work.  Suppose I use it to generate a force to accelerate itself.  "Paradox"  If I'm naive and assume that the chemical energy can be plugged in as work to find the final velocity of a weight, I'd get something like:  $$ v_f^2 = v_i^2 + 2 M W $$  M is 1 kg, and lets say my chemical energy is 0.5 Joules.  Let's start with the stationary case, and plug in my chemical energy for W.  I end up with a final velocity of 1 m/s, which is right.  But with the already-in-motion case, I end up with a final velocity of ~10.05 m/s, which differs from the right answer by quite a bit!  Question  So Work isn't the same as chemical potential energy.  The two have the same units but potentially different scales, depending on reference frame, which I think is the answer to this paradox?  But then, how do you convert between the two?  How do you find the impulse a battery or chemical reaction could produce?


I know that when we have a normed vector space the metric is, by definition, $d(x,y) = ||x - y||$. Why is it that, when we want to induce a norm from a metric, we have to satisfy two properties, namely translation invariance and scaling property? How are those two properties deduced and why are they required for this converse induction?


I have string with numbers:  string s1 = "cos555cos"; string s2 = "coscos1"; string s3 = "22coscos"; string s4 = "333coscos"; string s5 = "cosco444s";   I made a list:  IList<string> test = new List<string>(); test.Add(s1); test.Add(s2); test.Add(s3); test.Add(s4); test.Add(s5);   How to order it by number. The result should be like:  s2, s3, s4, s5, s1  foreach (var item in test) {     Console.WriteLine(item); }


Unable to install or boot live CD after upgrading my PC

I have recently upgraded my PC with a GTX 1080 Ti graphics card, and an i7 7700k Kaby Lake CPU, now however, I can't boot at all into my Linux partition, nor can I even run a live CD to customize the install to use non-free drivers. I tried on another PC to make sure my media wasn't going bad, and I was able to boot into Linux successfully and run the Live CD. Is there anyway to boot a live CD on this hardware and install Linux? I do also have a DisplayPort out on my motherboard for iGPU if that is necessary.


Please help, how to do off registration in Illustrator CS6?

I am trying to do an assignment and I need to do off registration. I cannot figure out how to get into the channels so I can move the colors to be off register. I can only figure out how to get into the separations, but it is not helping me. How can I make something off register? Thank you so much in advance! There aren't a lot of clear answers on Google.


Recursive application of a function : Symbol of

I need to apply a function $f(x)$ recursively/repeatedly for n times; how do I express it (mathematically) ?  Is their a mathematical symbol which denotes $f(x)$ applied n times ie  $g(x,n)$ =$f(f(\dots_{ times \quad n}(x)))\dots)$     ** With a variable parameter **  $h[x,1,n)]$ =$f(1,f(2,\dots_{ times \quad n}(n,x)))\dots)$ here the variable parameter say i varies from 1 to n for each successive application of $f()$ starting with 1 for the first (outermost) instance to n for the innermost.     In this context would using " $h[x,i,j]$ " be correct or may be $f_{i,j}(x)$ or $_ {_i}f_j(x,n)$?


In solving finite square well problem, we solve the TISE inside and outside the well, and we match the wave function at the boundary, by the continuity of wave function. Now this bugs me, since the wavefunction is only assume to be square-integrable, why we can use the continuity of wavefunction? Edit: There is no problem for this bound state solution to hold, but will we miss other non-continuous solutions?


splitting file based on values in specific column

I have a file that I would like to break up into multiple files with uniq values for the first column. For example, here is a file:  fileA.txt   1    Cat 1    Dog 1    Frog 2    Boy 2    Girl 3    Tree 3    Leaf 3    Branch 3    Trunk   I would like my output to look something like this:  file1.txt   1    Cat 2    Boy 3    Tree   file2.txt  1    Dog 2    Girl 3    Leaf   file3.txt  1    Frog 3    Branch   file4.txt  3    Trunk   If a value does not exist, I want it to be skipped. I have tried to search for similar situations to mine, but I've come up short. Does anyone have idea of how to do this?  Edit: My awk version is: awk version 20070501


Where is the photo for the outlook sign in page taken?

I would like to know where the photo of the Outlook.com sign in page was taken. Any ideas?


How do you make the content of this cell algin vertically centered?   Here is the current output based on the code below. Thanks  \documentclass[]{article} \usepackage[margin=0.5in]{geometry} \usepackage{pgfplots} \renewcommand{\thesection}{\arabic{section}} \usepackage{mathtools} \usepackage{cancel} \usepackage{pgfplots} \usepackage{amsmath} \newtheorem{theorem}{THEOREM} \newtheorem{proof}{PROOF} \usepackage{tikz} \usetikzlibrary{arrows,positioning,shapes,fit,calc} \usepackage{amssymb} \usetikzlibrary{patterns} \usepackage{fancyhdr} \usepackage{bigints} \usepackage{color} \usepackage{tcolorbox} \usepackage{color,xcolor } \usepackage{booktabs,array} \usepackage{hyperref} \usepackage{graphicx} \usetikzlibrary{arrows} \usepackage{polynom} \DeclareMathOperator{\rank}{rank} \makeatletter \newenvironment{sqcases}{%     \matrix@check\sqcases\env@sqcases }{% \endarray\right.% } \def\env@sqcases{%     \let\@ifnextchar\new@ifnextchar     \left\lbrack     \def\arraystretch{1.2}%     \array{@{}l@{\quad}l@{}}% } \begin{document} The graph of the quadratic function $y=ax^2$ \begin{center} \setlength\arraycolsep{6pt} % default is "5pt" $\begin{array}{>{\centering\arraybackslash}m{1in}cc} \midrule \text{ } & a>0 & a<0\\ \midrule \text{graph} & \pgfplotsset{every axis/.append style={ axis x line=middle,    % put the x axis in the middle axis y line=middle,    % put the y axis in the middle axis line style={<->}, % arrows on the axis title={$y$}, xlabel={$x$},          % default put x on x-axis ylabel={},          % default put y on y-axis ticks=none }} \begin{tikzpicture} \begin{axis}[ xmin=-1.3,xmax=1.3,ymin=-0.5,ymax=1.5 ] \addplot[thick,samples=20,domain=-1:1] {x^2}; \end{axis} \end{tikzpicture} & \pgfplotsset{every axis/.append style={ axis x line=middle,    % put the x axis in the middle axis y line=middle,    % put the y axis in the middle axis line style={<->}, % arrows on the axis title={$y$}, xlabel={$x$},          % default put x on x-axis ylabel={},          % default put y on y-axis ticks=none }} \begin{tikzpicture} \begin{axis}[ xmin=-1.3,xmax=1.3,ymin=-1.5,ymax=0.5 ] \addplot[thick,samples=20,domain=-1:1] {-x^2}; \end{axis} \end{tikzpicture} \\ \midrule \text{behaviour} & \text{increasing for } x>0, \text{decreasing for }x<0 & \text{decreasing for } x>0, \text{increasing for }x<0 \\\\ \midrule \text{vertext} & \multicolumn{2}{c}{(0,0)}\\ \\ \midrule \text{size} & \multicolumn{2}{c}{\text{If the value of }|a|\quad \begin{sqcases} \text{increases, the wider the shape of the parabola}\\ \text{decreases, the narrower the shape of the parabola}\\ \end{sqcases}}\\ \midrule \end{array}$ \newline\newline \end{center} \end{document}


When i try to use the move i.e. Slide.move(1,0) i get the error:  non-static method move(int,int) cannot be referenced from a static context  This is my code at the moment, which i have no idea whats wrong.      public void move(int row, int col) {         char [][] temp= new char [cells.length][];          for (int i= 0; i< cells.length; i++) {             int destRow = (i+row)%cells.length;             temp[destRow] = new char [cells[i].length];             for (int j= 0; j < cells[i].length; j++)                 temp[destRow][(j+col)%cells[i].length] = cells[i][j];             }               cells= temp;         }      }


The seasonality was observed in STL decomposition, but not in the ACF-PACF,

These are the monthly plot produced by eviews. Why is the discrepancy happened? Also the X-12 says identifiable seasonality is not present using F test for seasonality.  Can I say that the seasonality does not exist in the data? What is the oscillation pattern at the seasonal decomposition?


Do I need a US Visa even if I am only transiting? I'm from the caribbean

I am traveling to Spain and I have to pass through the US, would I need to get a visa and if so can I get it on the spot (transit visa)? If yes, how long would this process take? Thank you


What data type to use for the given description?

The constraints given in a question is as follows:     Constraints: 1<=T<=10^3, 1<=N<=10^7 0 <= Ai <= 10^18   Here T is the number of test cases, N is the number of elements in an array and Ai is the ith element in the array.  I want to declare something like:  int ar[100000000]   to satisfy the constraints but, it is not possible. Please help me.


Calling class methods (static) from inside a velocity view page

Can you call class methods from inside a view page?    Specifically ones that are not passed into the view?  In asp.net MVC I can do this:  <%= SomeClass.FixDateFormat(ViewData.Model.SomeClass.DateCreated) %>


Work done by our body in Cycling and Walking

Q. Why does Cycling consumes less body energy than walking?  Any logical explanation? I've been trying to seek any logical explanation for this question for few days! But why does Cycling consumes less body energy with more displacement, are there any factors related to this? Is it because of gravity or friction or work done and whatever! It is fair in the cases of motor  vehicles because much of the work is done by engine! But a cycle does not have any engine, then who provides the additional work required to displace ourselves from one point to other?  Any help would be appreciated


What is difference between Ill and Sick, How do I say "sick people" or "ill people" to refer to people not feeling well?


I have over 3k reputation on stackoverflow. I have edited few questions but i never got any reputation from it. Is there any restriction on who gets the reputation from edit?


script running in crontab not giving output on shell screen

I am trying to run a simple echo script via crontab. I set that to run every minute, but it doesn't give output on shell screen. However, it runs fine when I run the script independently.   Script  #!/bin/bash echo "Test Script"   Crontab entry:  root@example-server ~]# cat /etc/crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root HOME=/     # For details see man 4 crontabs  # Example of job definition: # .---------------- minute (0 - 59) # |  .------------- hour (0 - 23) # |  |  .---------- day of month (1 - 31) # |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ... # |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat # |  |  |  |  | # *  *  *  *  * user-name command to be executed   *  *  *  *  * root /root/test.sh


Contribution of each eigenspace's error to the loss

I'm reading  and I have a problem with a piece of math in part related to gradient descent analysis.   Article's author analyzes the gradient descent on the simplest nontrivial problem: quadratic form with $A$ being symmetric and invertible: $$ f(w) = \frac{1}{2} w^TAw - b^Tw, \quad w \in \mathbb{R}^n. $$ The problem has optimal solution at $w^* = A^{-1}b$. We approach it though using gradient descent: $$ w^{k+1} = w^k - \alpha (Aw^k - b). $$ If we change the basis for $w^k = Qx^k + w^*$, where $Q$ is the matrix of $A$'s eigenvectors ($A = Q \Lambda Q^T$), we soon realize that: $$ w^k - w^* = Qx^k = \sum_i^n x_i^0 (1 - \alpha \lambda_i)^k q_i. $$ So we get the error at $k$-th iteration of gradient descent.  Then, in Decomposing the Error section, the author visualizes how error components contribute to the loss. To do so he writes the contributions of each eigenspace's error to the loss: $$ f(w^k) - f(w^*) = \sum(1 - \alpha \lambda_i)^{2k} \lambda_i [x_i^0]^2. $$ How did he get that? I tried using least squares, so I assumed $d=w^k - w^*$ and took the norm ($d^Td)$ but I did get: $$ \sum(1 - \alpha \lambda_i)^{2k} [x_i^0]^2 [q_i]^2. $$ Do I even approach it in the right way?


How to remove everything Ubuntu One-related?

Is sudo aptitude purge ubuntuone? sufficient to remove everything Ubuntu One-related from my system?