My awk program to change spaces into tabs doesn't work

How to write a shell script which uses awk to read in the data file students.txt and output the data in the tabbed format as shown:  Surname Forename MSc Stream Date of Birth Smith John IT 15.01.1986 Taylor Susan IT 04.05.1987 Thomas Steve MIT 19.04.1986    Do not worry if tabbed columns don’t line up. The distance between each of (Surname, Forename, MSc Stream and Date of Birth) column is one tab.   Question:  Why this bellow code doesn't work for me?  awk 'BEGIN {IFS=" "} {OFS="\t"} {print $1,$2,$3,$4}' students.txt


Is it possible, without knowing Python, to animate between orthographic and perspective camera view?

I want to animate between perspective and orthographic camera views. How can this be done?  I found where people talk about successfully animating between orthographic and perspective camera views in Unity with code, so fundamentally this must be possible. But I don't know Python, so I wouldn't be able to figure it out manually with code in Blender.


$dx$ appears in differential equations, such us derivatives and integrals.  For example, a function $f(x)$ its first derivative is $\dfrac{d}{dx}f(x)$ and its integral $\displaystyle\int f(x)dx$. But I don't really understand what $dx$ is.


Logic error using INNER JOIN and WHERE to grab database info, PHP

This is for a self test for a college job application so I am not necessarily looking for the exact statement I need, instead I am trying to get a hint as to what direction to look, I DO NOT have access to the actual database to view it:  This problem tasks us with using JOIN to select data about users from one table based on if they have a hold on their account on another table, the problem also ONLY wants students in the College that is given by the $college argument.  I am pretty new to PHP so I've been using w3schools as a guide and I have used their INNER JOIN example exactly, yet it keeps giving me a 'unknown column E(or any other letter given by $college) in 'where clause'', or if I change the "" to '' it changes to 'unknown column $college in 'where clause''  Here is my code:  <?php  function hasHold($college) {     $query = "SELECT interview_student.Student_ID,      interview_student.Last_Name,      interview_student.First_Name,      interview_student.College,      interview_account_hold.Amount_Due         FROM interview_student INNER JOIN interview_account_hold         ON interview_student.Student_ID = interview_account_hold.Student_ID         WHERE interview_student.College = $college";      return $query; } ?>   Assuming access to the interview_student table from the previous question...  +------------------------------------------------------+ | interview_student                                    | +------------+-----------+------------+---------+------+ | Student_ID | Last_Name | First_Name | College | GPA  | +------------+-----------+------------+---------+------+ | 463127376  | Willemsen | Lucas      | A       | 2.37 | +------------+-----------+------------+---------+------+   The accounting office has provided us a list of students who currently have holds on their accounts because of unpaid tuition. They are only listed by ID and amount due; and they are only listed if they have an amount due. Students who have no amount due are not listed.  +-------------------------+ | interview_account_hold  | +-------------------------+ | Student_ID | Amount_Due | +------------+------------+ | 416996983  | 3,403.20   | | 287856417  | 2,318.13   | | 537713123  | 3,678.06   | | 187296716  | 2,202.83   | | 145768187  | 2,379.32   | +------------+------------+   Write a function called hasHold that takes one argument ($college) and returns a string (a SELECT statement).  The argument passed to the function will be a college code (such as 'A' for Agriculture).  The string returned should be a SELECT statement that will return all the students who are in the given college that have an account hold in place. The resulting query should return the following fields in the following order: Student ID, Last Name, First Name, College, Amount Due.  Once again, the function should return the SELECT statement as a string. You do not need to handle the actual connection, submitting the query, parsing the results, etc. Just return a string.


I recently opened up GParted to partition some space and I noticed an unknown partition being listen. I don't know whether this is why my computer has booting/waking from suspend really slowly but if someone could give me advice on whether to ignore it or directions on how to fix it, that'd be great.


How do I add a border around windows but keep the current theme?

I seem to live my life in the terminal - many terminals in-fact.  I also love the Ambiance theme - but the new borderless windows does not provide the visual differentiation I'm used to (the same black windows appear to blend into each other).    Thus to my question - how do I add back the single pixel border for windows that is found in earlier Ubuntu versions?  I want to keep the Ambiance overall theme since this looks good and I dont want to swap to another theme.      Now I know that I can modify the Ubuntu Ambiance theme as follows:  mkdir ~/.themes cp -r /usr/share/themes/Ambiance .themes   Then flipping between the theme options in the Settings - Appearance picks up changes in the theme in now in the .themes folder.  I presume I need to alter one of the .css files but I dont know which one.  I was also looking at  but the solutions there doesnt work for 14.04.  I also looked at the  but got rather lost trying to figure out which one applies to my situation.


when installing nginx on ubuntu 18.04, it gives the following error: N: Ignoring file 'ethereum-ubuntu-ethereum-xenial.' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension


I am very new to QGIS and mapping. I am trying to load a US state map shapefile in QGIS. But the problem is it does not look like another US state map available on the internet. The upper part looks very straight. Am I missing something? Do I need to convert to any other format before displaying?


LNK2019 Error at template function of my class

i got the following error  "Fehler 9   error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: bool __cdecl gameClass::getAttribute(class std::basic_string,class std::allocator >)" (??$getAttribute@_N@gameClass@@QEAA_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)" in Funktion "main". C:\Users\Weexe\documents\visual studio 2010\Projects\Engine\Engine\main.obj Engine "  My Code  class.h  template <typename T> T getAttribute(std::string attribute);   class.cpp  template <typename T> T gameClass::getAttribute(std::string attribute) { std::map<std::string,int> matchAttribute;  matchAttribute["windowTitle"]=1; matchAttribute["windowSizeX"]=2; matchAttribute["windowSizeY"]=3; matchAttribute["isMenue"]=4;  switch(matchAttribute[attribute]) { case 1:     return this->windowTitle;     break; case 2:     return this->windowSizeX;     break; case 3:     return this->windowSizeY;     break; case 4:     return this->isMenue;     break; } }   Any one have an idear how to fix that error ?  I think its a syntax error or smth like that :/


Problem with: $\int_{|z|=1} |z-1||dz|$ :contour integral with Abs. value |dz|

This problem just came across in the context of a course of Complex analysis and I don't know how to tackle it. Could anyone suggest a Hint on this?     Compute $\int_{|z|=1} |z-1||dz|$ in counterclockwise direction    I really don't know what would be the meaning of |dz|, or how to treat the abs in the integrand. Any help would by highly appreciated.


Wifi not working on Ubuntu 16.04 after just being installed alongside Windows 10

I have just installed Ubuntu 16.04 LTS and the installation went smoothly but I can't seem to connect to WiFi, the button to select networks is greyed and it shows WiFi Network disconnected. I have looked through the other threads and none seem to be working...  My laptop uses Realtek RTL8723BE 802.11 bgn Wi-Fi Adapter


I've figured out the x potion riddle, but despite killing myself on numerous occasions I cannot see a use in it, because I get no drops. Am I doing something wrong, or is killing myself really not going to get me anywhere in life?


How do I keep the following constant and true? (In other words globals?)    UP    ::  Direction DOWN    ::  Direction LEFT    ::  Direction RIGHT   ::  Direction dirs =  [UP,    DOWN,   LEFT,   RIGHT]   My attempt:  #global definitions UP = True DOWN = True LEFT = True RIGHT = True dirs = [UP, DOWN, LEFT, RIGHT]


please check if there's something wrong with my code

I am only starting to learn coding. I need to be able to use my custom controller I created for use in a visualforce page in production. I can't get past code coverage failure when I try to deploy from sandbox. I tried all the existing test classes available in production, because I don't know how to create a test class. Below is the code for my controller, please check if there's something wrong with it: public class MyController {  public ApexPages.StandardController sc;  public MyController(ApexPages.StandardController sc) {     this.sc = sc; }  public void quicksave() {     AVTRRT__Job_Applicant__c j = (AVTRRT__Job_Applicant__c) sc.getRecord();     update j.AVTRRT__Contact_Candidate__r; } }


Locking a vertex group from modification

In a mesh there is a group of vertices which should not move after being positioned once. I would like to find a way to lock them in place for the whole duration of the project.   Currently I 'lock' them by hiding them and then sculpting. I imagine it is possible also to create shape keys for the vertices. Or I could write a script which would save position of the vertices.   Is there a better way to do it?


Can I travel to Germany on a bus through France with a "Deutschland" visa not a Schengen stated visa?

I have been issued a German family reunion visa type D. it clearly states that the visa is for Germany and not Schengen states as I used to get in the past. Can I travel by bus from London through France to Germany with this visa?


When I start the game(C&C Tiberium Wars) I get this error: FATAL ERROR: Exception in exception handler  Problem signature:   Problem Event Name:   APPCRASH   Application Name: cnc3game.dat   Application Version:  1.9.2801.21826   Application Timestamp:    00000000   Fault Module Name:    igdusc32.dll   Fault Module Version: 10.18.14.4264   Fault Module Timestamp:   55c1952d   Exception Code:   c0000005   Exception Offset: 0039d9a5   OS Version:   6.1.7601.2.1.0.256.1   Locale ID:    1033   Additional Information 1: 300b   Additional Information 2: 300b6bae04fab042ce61851d7f2f171d   Additional Information 3: 6876   Additional Information 4: 6876f907424b380f357d6abfcd1730e8   I am using Windows 7 Ultimate 64-bit CPU - i5 4690k GPU - Intel HD 4600 RAM -  8GB X 1  Any Solutions?


unresolved external symbol error when using static library

I am trying to make static library for solving probability and stats.  I am getting LNK2019 unresolved external symbol error when running my code. I think the program isnt detecting the definitions of function from the .cpp file and i dont get the issue here. Also i have given the main file directions for the library so no issue there. I am new in using headers and templates so kindly help. The error occurs when the program calls the constructor for the object:  > LNK2019   unresolved external symbol "public: __thiscall ProbnStatslib::means<float>::means<float>(void)"(??0?$means@M@ProbnStatslib@@QAE@XZ) referenced in function_main   Header file:  // .h file #ifndef PROBNSTATSLIB_H #define PROBNSTATSLIB_H #include<iostream> #include<vector>  namespace ProbnStatslib {     template<typename any>     class means      {     private:         std::vector<any> xi_mean;         int N;     public:         means();         void initializer(int size);         void CalcMean();      };  } #endif   The .cpp   // .cpp #include<iostream> #include"ProbnStatslib.h" #include<vector> using namespace std; namespace ProbnStatslib {     template<typename any>     means<any>::means()     {         cout << "object constructed" << endl;         cout << "Enter number of ouccrances:" << endl;         cin >> this->N;         initializer(this->N);     }     template<typename any>     void means<any>::initializer(int size)     {         cout << "Enter event values or Xi of size:"<< size << endl;          /*for (any value : xi_mean)         {             cin >> this->xi_mean;         }*/     }     template<typename any>     void means<any>::CalcMean() {         cout << "Calculating" << endl;     }  }   The main file:  #include <iostream> #include <vector> #include "ProbnStatslib.h" using namespace std; using namespace ProbnStatslib; int main() {     means<float> myobj;     return 0; }


Proving that the order of permutations can be written as $ \text{lcm}(n_1,n_2...) $ for $n = \text{order of conjoined cycles}$, I am stuck where it says $ \pi^{n} = \text{identity}$.  Here it is explained in an answer:   I don't get it, though.


Some apps (Safari, iTunes...) quits fullscreen mode on Esc keyboard shortcut. Is there a way to disable it? It interferes e. g. with web apps control resulting in unintentional quitting fullscreen when you just hit one more Escape than you should.


Given two form $\omega$, find $\mu$ such that $d\mu=\omega$?

I am reading a textbook on differential forms and there is a question of the form: given a $k$-form, $\omega$, on say $\mathbb{R^3}$, find $\mu$ such that $d\mu=\omega$. For example, if $\omega= (x_{1}^2 +x_{2}^2)dx_1 \wedge dx_2$, what is $\mu$?  I am looking for a systematic method to solve these types of questions.  Thanks


If PhD programmes prepare the candidate for research, why do teaching positions require it?

, .  From the first example:     The Department of Biological and Agricultural Engineering invites applications for a full-time Assistant Professor of Teaching (Lecturer with Potential for Security of Employment (LPSOE)), comparable to a tenure-track assistant professor appointment. Professor of Teaching faculty are Academic Senate faculty members whose expertise and responsibilities center on undergraduate education and scholarly analysis/improvement of teaching methods. The successful applicant will be responsible for teaching both lower and upper division undergraduate Agricultural Sensing and Data Science lecture and laboratory courses (up to six courses per year) ... Qualified applicants must have a PhD in Engineering or a BS in Engineering with a PhD in a scientific field, preferably with postgraduate experience.   (Emphasis mine)  If this is a full-time teaching position, why are they looking for PhD degrees and postgraduate experience? How are these primarily-research degrees relevant to teaching?


The material preview not working only showing a black model

I'm new to blender and I was following a Udemy course on how to make ps1 or quake style graphics however when I try to texture the windmill nothing shows up in material preview mode it just turns black like in the picture, I tried changing the renderer from evee to cycling but that didn't work either this is in the newest release of blender if that helps


Prove that for $n>2$, $n$ cannot be a factor of $n+1$

For the sake of contradiction, we assume $n$ is a factor of $n+1$. Then by definition of divisibility, $nk = n+1$ where $k\in\mathbb{N}$. Case $1$: $k = 1$. Then $n = n+1$ which is a contradiction. Case $2$: $k>1$. I am stuck on how to approach a contradiction in Case $2$.


How can PCs estimate the power of opponents?

It's common for players to assume that opponents are always “level appropriate.” However, mixed level modules change this situation. Recent modules like Tomb of Annihilation can have PCs stepping into areas far beyond their skill.  This raises the question though: what in-game ways to the PCs have to estimate the power and capabilities of their opponents? If the PCs are an inexperienced level 1 party and meet a CR4 opponent where often one strike could kill a PC, not knowing this could be a total party kill.  (For the purpose of focusing this question, please ignore experienced players who know the contents of monster manual or who have gained out-of-character information they can use for judging enemies. Besides, even that often doesn't work for NPCs with class levels!)  I'm not looking for  — those are DM techniques. I'm looking specifically for what mechanics and rules players can use to have their PCs gauge the power of an opponent — whether that might be hit points, CR level, stats like strength, talents or magical abilities. How can PCs judge the opposition's strength?


Exponential map on Lie groups being a diffeomorphism

Consider a Lie group $G$ and let it's Lie algebra be $\mathfrak{g}$. Let the exponential map be denoted by $\exp: \mathfrak{g} \to G$.   Given any $g \in G$, does there exist an open set $O \subset \mathfrak{g}$ with $g \in \exp(O)$ such that the exponential map restricted to $O$ is a diffeomorphism?   Note: I am not conversant with Riemannian geometry.


If I buy a game on psn. Can I play it on another ps3 console?

I bought Minecraft for ps3 and two days later I had accidently broke my ps3 so Im buying another ps3 tomorrow, will I be able to still play it on my new ps3? Like redownload it from psn?


I have recently submitted a paper to arXiv, but the arXiv moderators put my paper in status "on hold", because they have to make a decision on the right classification for the paper.   To those who have experienced a similar situation, how long did it take before they made a decision and published the paper on the arXiv? I just want to have an idea of how long I will have to wait.


What does Unknown media type in type 'all/all' mean?

I reinstalled the Amarok player in my Kubuntu 14.04 because it seemed buggy. I noticed this in the terminal:  david@EMACHINE:~$ sudo apt-get install --reinstall amarok Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. Need to get 5,715 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://mirror.lstn.net/ubuntu/ trusty/universe amarok i386 2:2.8.0-0ubuntu3 [5,715 kB] Fetched 5,715 kB in 2s (2,611 kB/s)  (Reading database ... 128504 files and directories currently installed.) Preparing to unpack .../amarok_2%3a2.8.0-0ubuntu3_i386.deb ... Unpacking amarok (2:2.8.0-0ubuntu3) over (2:2.8.0-0ubuntu3) ... Processing triggers for desktop-file-utils (0.22-1ubuntu1) ... Processing triggers for mime-support (3.54ubuntu1) ... Processing triggers for shared-mime-info (1.2-0ubuntu3) ... Unknown media type in type 'all/all' Unknown media type in type 'all/allfiles' Unknown media type in type 'uri/mms' Unknown media type in type 'uri/mmst' Unknown media type in type 'uri/mmsu' Unknown media type in type 'uri/pnm' Unknown media type in type 'uri/rtspt' Unknown media type in type 'uri/rtspu' Processing triggers for man-db (2.6.7.1-1) ... Setting up amarok (2:2.8.0-0ubuntu3) ... Processing triggers for libc-bin (2.19-0ubuntu6) ...   Look at all the unknowns. Could these be the cause of the player not working correctly? How can I fix this if it is, an error?


An unexpected application of non-trivial combinatorics

PROBLEM STATEMENT     Given two finite sets $A$ and $B$, each containing $s \in \mathbb N$ elements, how many pairs of functions $f \colon A \rightarrow B$ and $g \colon B \rightarrow A$ are there, such that their composition $h = g \circ f$ has no fixed points?   THE ORIGIN OF THE PROBLEM     It is highly improbable that two people could happen to like each other by chance.   Which, under the following assumptions:   We are considering a group of $2n$ people with $n$ men and $n$ women; Each person likes exactly one person of the opposite sex with equal probability;   reduces to     Given two finite sets $A$ and $B$, each containing $n \in \mathbb N$ elements, and two arbitrary functions $f \colon A \rightarrow B$ and $g \colon B \rightarrow A$, what is the expected number of pairs of elements $(a \in A, b \in B)$ such that $f(a) = b$ and $g(b) = a$?   WHAT I HAVE DONE  Here I am using $E$ for expectation, $P$ for probability and $N$ for number.  $$E(\text{number of pairs}) = \sum\limits_{k=0}^n k \cdot P(\text{there are exactly }k\text{ pairs})$$  $$P(\text{there are exactly }k\text{ pairs}) = \frac {N(\text{situations with }k\text{ pairs})} {N(\text{total situations})}$$  $$N(\text{total situations}) = (n^n)^2,$$  because there are $n^n$ functions from $A$ to $B$ and the same number in the reverse direction.  $$ \begin{aligned}  N & (\text{situations with }k\text{ pairs}) = \\  & = N(\text{pairs of functions }(f \colon A \rightarrow B, g \colon B \rightarrow A) \\  & \quad \text{ whose composition has exactly }k\text{ fixed points}) = \\  & = \sum [\text{over selections of }k\text{ elements from both }A\text{ and }B] \\  & \quad N(\text{pairs of functions whose composition is identity only on the selection}) = \\  & = {\binom {n} {k}}^2 \cdot k! \cdot N(\text{pairs of functions on two sets containing } \\  & \quad s = n - k\text{ elements whose composition has no fixed points}) \end{aligned} $$  This is how I reduced the original problem to the problem in question. If the solution to that problem was $N(s)$, the answer to the original problem would be  $$E(\text{number of pairs}) = \frac {1} {(n^n)^2} \sum\limits_{k=0}^n k \cdot {\binom {n} {k}}^2 \cdot k! \cdot N(n - k)$$  WHAT I TRIED TO DO  Approach: fix $g$, count $f$s.  $$ \begin{multline} N(s) = \sum [\text{over all functions }g \colon B \rightarrow A] \\ N(\text{functions }f \colon A \rightarrow B\text{ such that the composition }h = g \circ f \\ \text{ has no fixed points}) \end{multline} $$  Problem: all such $f$s have to send every $a$ to anywhere but $g^{-1}(a)$. Therefore, there are $\prod\limits_{a \in A} (n - \left|g^{-1}(a)\right|)$ such functions. The sets $\left\{g^{-1}(a)\right\}_{a \in A}$ form a partition of $B$. The obvious next idea is to classify all $g$s based on that partition, but the formulas start to get really scary.  UPD: I wrote a simulation that actually counted directly the expectation for $n=1..5$ (the $O(n\cdot(n^n)^2)$ approach). The expected value is always exactly 1. I have no idea how to interpret that, given the crazy formula for expectation.  I would mostly appreciate an idea for an approach, not a complete solution.


Destroying an account deletes its comments but leaves flags on those comments pending

Just now, a comment flag on the site I moderate brought my attention to a troll account, which I accordingly destroyed. Account destruction automatically deleted the comment, as expected (although it left an annoying "show 1 more comment" which won't go away), but it didn't dismiss the flag on the now-deleted comment, which means I now can't mark the flag helpful without making an unnecessary edit to the comment.    The comment is "deleted by Anonymous 6 mins ago", but the flag still shows as pending. There is no "Delete" option to handle the flag, because the comment is already gone. I don't want to decline it, because it was helpful. The only remaining option is to edit the comment unnecessarily - which I'm going to do, but this seems like a silly bug.  Related:


Can I chose to bring a shockland untapped into play when I tutor it with an effect that brings a land tapped into play

One of my  is dying and I search for an . Does the Godless Shrine enters play untapped when I pay the 2 life?


People will finish updating when Photos is in the background

Photos on my phone and my laptop both say this at the bottom of the People section of the app. There has been no noticeable progress made in the past few weeks. It looks like all the people it has "identified" were carried over from when I manually tagged them in iPhoto years ago.   Is there a way to jumpstart this process or restart it?


Pixel correlations from two raster datasets in R

I am having trouble calculating the pixel by pixel correlation coefficient between two datasets. My current code takes in two folders full of rasters and creates two independent raster stacks. These rasters all have the same cellsize and extent. I then try and take the correlation coefficient (spearman in my case) between the column values of those rasters.  library(raster)  r <- raster() raster1 <- list.files(path = "data/List1", pattern = "*.tif$", full.names = T) raster2 <- list.files(path = "data/List2", pattern = "*.tif$", full.names = T) l1 <- stack(raster1) l2 <- stack(raster2)  list1Values <- values(l1) list2Values <- values(l2) corValues <- vector(mode = 'numeric')  for (i in 1:dim(list1Values)[1]){   corValues[i] <- cor(x = list1Values[i,], y = list2Values[i,], method = 'spearman') }  corRaster <- setValues(r, values = corValues)   However at the correlation for loop it gives six error messages saying  In cor(x = list1Values[i, ], y = list2Values[i, ], method = "spearman") :   the standard deviation is zero   Ignoring that and continuing on, the last line errors out saying  Error in setValues(r, values = corValues) :    length(values) is not equal to ncell(x), or to 1   My initial guess was that since the datasets have a lot of NA values (In this case it is a lot of open ocean that there is no data for), that could cause problems, so I added the   use = "complete.obs"   parameter to the cor function. This errors saying  Error in cor(x = list1Values[i, ], y = list2Values[i, ], method = "spearman",  :    no complete element pairs   My guess is that this last error is telling me the matrices it created don't line up, and no non-NA cells match. I have no clue how this is possible because I have been working with these rasters for years and they certainly line up. Other than that, I don't know why this isn't working.    This question is not a duplicate of  in any way. First I am not using point data, but instead raster. I am also interested in a simple pearson and/or spearman correlation coefficient NOT cross correlation nor spatial correlation. I'm also not using two layers, but two sets of hundreds of layers (making the statistical analysis of the correlation valid). Lastly, this code is doing fundamentally different things than that post and I am asking for specific help with the errors arising.


I recently got a pack of different value resistors, but some of them were zero ohms. Is there any purpose in using 0 ohm resistors?


The non-existence of a matrix $A\in M_3(\mathbb{R})$ such that $A^2-A+I=0$.

I'm trying to get my head around this problem, which states that no $3\times 3$ real-valued matrix can satisfy the equation $$A^2-A+I=0.$$  Of course, the problem is trivial if we consider characteristic polynomials and eigenvalues, but I want to prove it in the most elementary way possible, just basic theory of matrix operations and vector spaces. So considering the polynomial $p(λ):=\det (A-λI)$ without mentioning the word "eigenvalue" isn't good enough.  The only thing I can get out of this equation is that the matrix must be invertible and its inverse will be $A^{-1} = I-A$ and other deceptively useful identities, but I can't move on in any way.   Any hints are appreciated!


ArcGIS is one of the most popular software-packages available for GIS.  What are the lesser-known but useful features of the ArcGIS? Which little/hidden tricks do you known that make your experience with this software better?


How to partition active memory in Ubuntu?

How to partition active memory in Ubuntu ?  These are the details :-      I want to make partition just like windows of this 465 GB harddisk. How can I make it ?


How is observable universe so big if the universe is so young?

The diameter of observable universe is 93 billion light years but the age of universe is only estimated to be 14 billion years. So how does light have 46.5 billion years to travel from the boundary of observable universe to us? I mean if the radius is 46.5 billion light years then that should mean light took 46.4 billion years to go from there to here right?


How to know size of an array after passing it to a function

I have to know size of an array after passing it to a function. For example,  #include<stdio.h> void func(char *ptr) {      printf("%d\n",------); //Here i want the actual size of the array passed to ptr. What to fill in the blank to get total size of the arr[] } main() {     char arr[10] = "Hello";     printf("%d\n",sizeof(arr));  // here it is giving 10 bytes that is equal to total size of the array     func(arr); }


Is $A \to \neg A$ logically satisfiable if $A$ is false?

Is it true that the implication $A \to \neg A$ is logically satisfiable if $A$ is false?  I beg your pardon if it is trivial but my logic is rusty.


If L and M are algebraic over K then so is LM

This question was asked in my abstract algebra mid term exam ( in November) and I was uunable to solve this particular question.  Let L and M be intermediate fields in the extension $K\subset F$. Then if L and M are algebraic over K then so is LM.  I was unable to use the fact that L and M are given algebraic over K. So, I revised through my notebook today also but still couldn't  proceed. I need help in this so can you please outline main details of solution? For Theory I have been Using Textbook by Hernstein.


what is the regular expression for the language above {0,1} that does not contain the subword 000?  Thank you for your help!!


Command to delete a directory with files in it

I am trying to write a shell script that deletes a persistent but unnecessary folder in my home directory upon execution. So, I ask you fellow Ubuntu users, what is the terminal command to delete a file/folder?


Three versions of discriminant analysis: differences and how to use them

Can anybody explain differences and give specific examples how to use these three analyses?   LDA - Linear Discriminant Analysis FDA - Fisher's Discriminant Analysis QDA - Quadratic Discriminant Analysis   I searched everywhere, but couldn't find real examples with real values to see how these analyses are used and data calculated, only lots of formulas which are hard to understand without any real examples. As I tried to understand it was hard to distinguish which equations/formulas belonged to LDA and which to FDA.  For example let's say there is such data:  x1 x2 class 1  2  a 1  3  a 2  3  a 3  3  a 1  0  b 2  1  b 2  2  b   And let's say some testing data:  x1 x2 2  4 3  5 3  6   So how to use such data with all these three approaches? It would be best to see how to calculate everything by hand, not using some math package which calculates everything behind the scenes.   P.S. I only found this tutorial: . It shows how to use LDA.


Geometric interpretation of the multiplication of complex numbers?

I've always been taught that one way to look at complex numbers is as a Cartesian space, where the real part is the $x$ component and the imaginary part is the $y$ component.  In this sense, these complex numbers are like vectors, and they can be added geometrically like normal vectors can.  However, is there a geometric interpretation for the multiplication of two complex numbers?  I tried out two test ones, $3+i$ and $-2+3i$, which multiply to $-9+7i$.  But no geometrical significance seems to be found.  Is there a geometric significance for the multiplication of complex numbers?


NullPointerException when executing query on SQLite Db in android

Now I am getting null pointer Exception here. In, ViewAllData method myAdapter = new SQLCustomViewAllDataAdapter(SQLViewAllData.this,aList);  here I am getting Error on creating the Constructor.   SQLViewAllData.java  public class SQLViewAllData extends Activity {  private SQLDbHelper myDbHelper; private SQLCustomViewAllDataAdapter myAdapter; private ListView myListView; private ArrayList<SQLPojo.UserDetails> aList = new ArrayList<>(); //private Context myContext;  @Override protected void onCreate(@Nullable Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.listview_view_data);     //myContext = this;      widgetInitialization();     viewAllData(); } //Initializing Widgets public void widgetInitialization() {     myDbHelper = new SQLDbHelper( this );     myListView = (ListView)findViewById( R.id.listview_view_data_LV ); }  public ArrayList<SQLPojo.UserDetails> getUserInfo(){     return myDbHelper.getUserDetails(); }  //view all data stored in DB public void viewAllData() {     aList = getUserInfo();     myAdapter = new SQLCustomViewAllDataAdapter(SQLViewAllData.this,aList);     myListView.setAdapter(myAdapter); }   }


smoke&Fire CPU & GPU now getting black box

It was working, I finally got it to where i wanted it, then rendered it and the fire was not showing up, then i removed some extra nodes I had put in other then the flame ones needed to be added, then the box went black, and I removed the smoke and added it again, changed the setting to where they needed to be, and still I am getting black box using both the cpu or gpu     MOdded add pic, I downloaded what I uploaded, and got it working before I changed the smoke fire settings, should not matter but it is not rendering fire.  cpu or gpu with  partial system.


Allow Ubuntu Server Access only from specific IP's

How I can allow only my own ip to login for my ubuntu server ? Yesterday got 1500 unwanted failed login attempts.  Allowing only my own IP, could be the most secure from hackers ? I use Postfix only for sending, so that wont need to allow any incoming connections.


I have a problems with wp_editor() . Somewhere in my plugin, i want to dynamically add fields some are basic input, and there is also an editor. I use ajax to add these fields, and all is going as planned except for the editor fields throwing the error :   "Uncaught TypeError: Cannot read property 'canvas' of undefined"  Is there any specific way dealing with wp_editor in ajax request or am i missing something ?  php side :  add_action( 'wp_ajax_add_new_proposition_callback', array(&$this, 'add_new_proposition_callback') );  public function poll_manage() {     $nb_prop = 0;     <form method="post">

     <input type="button" value="Ajouter une proposition" class="button" id="addnewprop" />     <input type="hidden" name="nbprop" id="nbprop" value="<?php echo ($nb_prop+1) ?>" />     </form> }  public function add_new_proposition_callback() {     $prop_id = isset($_POST['prop_id']) ? (int)$_POST['prop_id'] : 1;     echo '

'.$prop_id.' : New proposition

Proposition     <input type="text" id="propo'.$prop_id.'" name="propo'.$prop_id.'" class="thepropo" size="60" value="" />

Description';     wp_editor( '', 'descrq'.$prop_id, array('teeny'=>true, 'editor_class'=>'thepropoc') );     echo $content.'

Answer

<input type="radio" class="open" name="open'.$prop_id.'" value="1"  /> yes

<input type="radio" class="open" name="open'.$prop_id.'" value="0"  /> no

     ';     die(); }   js side :   ...     $('#addnewprop').click(function(){         var params = {             "action": "add_new_proposition_callback",//callback function             "prop_id": $('#nbprop').val()         };         $.ajax({             data: params,             type: 'POST',             url: php_data.ajax_url,             success: function(data, status) {                 onSuccessAddNewProposition(data);             }         });     });     function onSuccessAddNewProposition(data){         $('#propositionlist').append(data);//append proposition         $('#nbprop').val(parseInt($('#nbprop').val())+1);//update proposition count     }   Thanks in advance PS: I'm using WP 3.8.2


I would like to define an additional sources.list.d folder just for my user; something like ~/sources.list.d so that I sync and use these across my machines.   Is it possible to do something like this with apt ?


The graph of $xy = 1$ is connected in $\mathbb{C}^2$.  The above statement is true. Why? Please show reason.  In $\mathbb{R}^2$ $xy = 1$ is not connected as it has two disjoint components in $1$-st and $3$-rd quadrant. I have no idea about this function in $\mathbb{C}^2$. I do not know multivariate complex analysis.   Thank you for your help.


I need to get all folders from registry paths HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall  and HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall and to change the Displayname of the selected by user value to for example displayname1.  Is that possible with java? never worked with registry before and dont wanna spoil something. thnx.


Finder Window when Uploading or Opening Files Missing Items

For some reason, my file window when I am opening a file/folder or uploading something the sidebar is missing a lot of items which makes navigating to my destination a pain. What am I missing? My normal finder window is fine and isn't missing any items. I tried to go into the library>preferences>and deleting any com.apple.finder.plist like in another thread but I didn't find any files like that in my library. I searched my entire mac for them and didn't find any.  I'm using El Capitan.


Rudin's Theorem 3.3 states:  Suppose $\{s_n\}$, $\{t_n\}$ are complex sequences, and $\lim\limits_{n \to \infty} s_n = s$, $\lim\limits_{n \to \infty} t_n = t$. Then   (a) $\lim\limits_{n \to \infty} \left(s_n + t_n\right) = s + t$;   (b) $\lim\limits_{n \to \infty} cs_n = cs$,  $\lim\limits_{n \to \infty} \left(c + s_n\right) = c + s$, for any number $c$;   (c) $\lim\limits_{n \to \infty} s_n t_n = st$;   (d) $\lim\limits_{n \to \infty} \frac{1}{s_n} = \frac{1}{s}$, provided $s_n \neq 0$ ($n = 1, 2, 3, \ldots$), and $s \neq 0$.  I proved (a) and (b) without trouble. I'm trying to understand his proof of (c). He notes that for any $s$ we have: $$  s_n t_n - st = (s_n - s)(t_n - t) + s(t_n - t) + t(s_n - s). $$ My first question is: where does this come from? By brute-forcing the right-side, I can tell that this amounts to adding and subtracting $st$, $ts_n$, and $st_n$. But is there another reason why this holds? Rudin calls it an "identity,' but I've never seen it before. Then, given $\epsilon > 0$, he takes $N_1, N_2$, so that $n \geq N_1$ implies $|s_n - s| < \sqrt{\epsilon}$ and $n \geq N_2$ implies $|t_n - t| < \sqrt{\epsilon}$. So for $n \geq \max(N_1, N_2)$, we have \begin{align*} |(s_n - s)(t_n - t) - 0| = |s_n - s||t_n - t| < \sqrt{\epsilon} \cdot \sqrt{\epsilon} = \epsilon,  \end{align*} so $\lim\limits_{n \to \infty} (s_n - s)(t_n - t) = 0$. Rudin then claims that the remaining terms in the first identity converge to $0$ by using $(a)$ and $b$. The first term converges, as we just proved, and the second and third are scaled versions of $t_n$ and $s_n$, so they converge. (I'm not sure how to word this exactly, since I need to have convergence first to use this identity, but I'm using the identity to prove they converge, so this is a very circular argument. I'm trying to figure out how best to word it.) With that aside, we have: \begin{align*} \lim\limits_{n \to \infty} [(s_n t_n - st) & = \lim\limits_{n \to \infty}  (s_n - s)(t_n - t) + s(t_n - t) + t(s_n - s)] \\ & = \lim\limits_{n \to \infty} (s_n - s)(t_n - t) + \lim\limits_{n \to \infty} s (t_n - t) + \lim\limits_{n \to \infty} t(s_n - s) \\ & = 0 + \lim\limits_{n \to \infty} (st_n - st) + \lim\limits_{n \to \infty} (ts_n - ts) \\ & = s \lim\limits_{n \to \infty}t_n - st + t \lim\limits_{n \to \infty} s_n - ts \\ & = st - st + ts - ts \\ & = 0 \end{align*} So $\lim\limits_{n \to \infty} (s_n t_n - st) = 0$. I'm trying to figure out exactly how this implies the result, because I can't just invoke part (a)/b to break the limit apart, as that requires convergence of $s_n t_n$, which is what I need. I think, however, it can be used to prove the fact directly. Given $\epsilon > 0$, we use this limit to find $N$ so that for $n \geq N$, we have $|s_n t_n - st| < \epsilon$ for all $n \geq N$, so $(s_n t_n) \to st$. As a general principle, am I allowed to just "break it apart," or was that just a coincidence? I would appreciate any help and any feedback on what I've written above.


Obtaining predicted values (Y=1 or 0) from a logistic regression model fit

Let's say that I have an object of class glm (corresponding to a logistic regression model) and I'd like to turn the predicted probabilities given by predict.glm using the argument type="response" into binary responses, i.e. $Y=1$ or $Y=0$. What's the quickest & most canonical way to do this in R?   While, again, I'm aware of predict.glm, I don't know where exactly the cutoff value $P(Y_i=1|\hat X_{i})$ lives -- and I guess this is my main stumbling block here.


Javascript filters not working for dynamically inserted HTML

I have a .wrapper with dynamically generated content(tasks). Each .task has a data attribute that I'm trying to use for allowing me to make this filterable with preset buttons but it doesn't seem to be working for new incoming data. Only works for the html on the page already on load.

Call Bob

Pay Bills

Ship Package

Buy Groceries

   <button id="filter-urgent">Urgent</button>   <button id="filter-veryurgent">Very Urgent</button>   <button id="filter-canwait">Can Wait</button>
        The problem I'm having is as soon as new tasks come in(from external API in html format with data-type attributes already), all dynamically inserted tasks ignore the filtration.


Are targets aware if they are being hexed?

If a creature is the target of a witch hex, such as Evil Eye, Slumber, or Charm, are they aware that they have been targeted?  Would they be able to determine who hexed them?  Does it matter if the target passed their save or not?


Is there a term for words that have a single meaning or are only used in a single context?

Certain words you hear in English are only ever heard in a single context. For example, skirl is used to describe . Etymonline generously says the word is "rarely" heard outside that context, but I can't recall ever hearing it used for anything else. I imagine one could use it figuratively to describe another godawful high-pitched screech (sorry, bagpipe lovers), but there's no other bona fide usage for it.  What I want to know is stated in the title of the question: Is there a term for these one-off words? I'm sure there must be, but I can't think of what it might be.  Edit: Judging from some of the head-scratching comments I've received, there seems to be some confusion. Perhaps I did not make my meaning clear. I'm not looking for a word to describe the single instance of skirl. I'm asking about a class of words like skirl. I know there exist other examples of words that are only ever used in one context, but I can't think of any others at the moment.


How can multiple people work on the same file?

I can't find any new answers to this question. I was just wondering if there is any way that multiple people can work on the same project? I don't mean at the same time. An example of what I am talking about is with the Unreal Engine, there is something called Perforce I think and it when one person is done working on it, they update it on their end, and the next person can "checkout" the file and it updates the changes the other guy did.  Any help will be appreciated!


I wrote a little . When I tried to run a.out, I got "command not found".  When I ran ./a.out, it worked fine.  Where can I learn about why that was?


To find the gravity at Schwarzschild radius of a black hole, I used the below equations. Assuming escape velocity at event horizon is speed of light c and M is the mass of the black hole  $$     v_e = \sqrt{\frac{2GM}{r}} = \sqrt{2gr\,} $$ or $$     g = {\frac{v_e^2}{2r}} = {\frac{c^2}{2r}} $$  Now substituting the Schwarzschild radius of ${\frac{2GM}{c^2}}$ for r we get  $$     g = {\frac{c^4}{4GM}} $$  Just thinking on a time dilation perspective, I have also read that acceleration can not be distinguished from gravity. So if I can accelerate a body with a rocket at above rate will it cause same time dilation like a black hole? And if at all the answer is yes, shouldn't such a value be independent of the mass of black hole?


Noticed in my  that the avatars of the Top Network Askers are blurry.  Quick check showed it's because SE is requesting the 16x16 thumbnail, while having 30x30 size of the image itself, which cause the image to stretch.  Changing the requested image to 32x32 makes the avatars more clear, e.g.  vs   Live demo. Nick looks like this at the moment:        Changing to  32x32 will make it much better:


Creating PDF bookmarks when the highest level is below section

I'm producing a small document where only unnumbered subsections and levels below are used, and would like PDF bookmarks to be created for them.  I tried  and  packages and did not find any option for this. How do I make it automatically generate such bookmarks? What's the most elegant way of doing this?  Update: corrected inaccurate question statement. Sorry.


I. Let $G$ be a group in which, for some integer $n\gt 1$, $(ab)^n=a^n b^n$ for all $a,b\in G$. Show that    $G^{(n)}=\{x^{n}|x\in G\}$ is a normal subgroup of $G$.  $G^{(n−1)}=\{x^{n−1}|x\in G\}$ is a normal subgroup of $G$.   II. Let $G$ be as in the problem above. Show that   $a^{n−1}b^n=b^n a^{n−1}$ for all $a,b\in G$. $(aba^{−1}b^{−1})^{n(n−1)}=e$ for all $a,b\in G$.


How do I calculate the power consumed by a lightbulb?

I'm studying a lightbulb and its variable resistance, given by the expression:  $R(T) = Ro[1 + α(T-T_0)]$, where $R_0$ is the resistance of the lamp at $T_0$.  In this case, $R$ is not given by Ohm's law ($V=Ri$). So, which expression can I use to calculate the power consumed by a lightbulb?   $P = R\cdot i^2$ $P = \frac{V^2}{R}$ $P = V\cdot i$ (I don't think I can use this one)   I have measured the current and the e.p.d. at the bulb using instruments.


The problem from Burton: show that the equation $n^2 + (n+1)^2 = m^3$ has no solution in the positive integers.  So far, I can see that gcd($n$,$n+1$)$=1$ and $m \equiv_4 1$ and $m=a^2 + b^2$ for some integers a,b. I'm guessing I need to reach a contradiction.  At this point, I am stuck. Any hints?


Show that cardinality of $\mathbb{Z}^n/T(\mathbb{Z}^n)$ equals the absolute value of the determinant of the matrix representing the homomorphism T

I am self teaching module theory and in the section on modules over PID, I have ran into the following problem. Show that the cardinality of M= $\mathbb{Z}^n/T(\mathbb{Z}^n)$ equals the absolute value of the determinant of the matrix representing the homomorphism T. Note: Assuming determinant of the matrix is not 0.  I am thinking let $e_1,...e_n$ be the standard basis for $Z^n$. Then $T(e_1)= c_11 e_1 + ... c_1n e_n$, etc.. so if I find the invariant factors of M by applying column and row operations to the matrix that represents this transformation until its a diagonal matrix, then I will have 1's and invariant factors on the diagonal, and hence M will be isomorphic to $Z^n/(a_1) \bigoplus  ... \bigoplus Z^n/(a_n)$ where the $a_i$ are the invariant factors and hence the cardinality will just be the product of the invariant factors, which I guess should be the absolute value of the determinant representing the matrix?  I am not sure if this approach would work or not. Could someone help me?


Normal space- equivalent condition: $\forall U, V$ - open $: U \cup V = X \ \ \ \exists F \subset U \ , G \subset V$ - closed $: F \cup G = X$

Could you help me prove that $X$ is normal $\iff$ for all open $U, V$such that $U \cup V = X$ there are closed $F \subset U,\ G \subset V,\ F \cup G = X?$  I've been trying to prove it using other equivalent condition for $X$ to be normal, namely that $\forall F \subset U,\ \ \ $ $F$-closed, $U$-open $\exists V$-open $F \subset V \subset \overline{V} \subset U$, but I keep failing.  Could you help me with that?


Is it possible to buy a physical copy of Ubuntu?

Don't want to waste money on buying windows 7, so the laptop is going to be ordered without an OS. Is it possible to buy a physical copy (CD) of Ubuntu?


Is quantum key distribution safe against MITM attacks too?

i read this recently:   and some parts of this:   they talk about direct fibre optic cable and evesdropping that seems passive.  i want to know whether quantum key distribution provides any security against active attacks too?  i mean, for example isn't it possible that fibre optic cable is cut at some point in its path by an attacker and then he places a repeater there and before repeating the signal he can read the secret information in the channel?


Is there an accepted rule for naming all of our various distant relatives (kinship terms)?

I’m going to the christening of my cousin’s first son soon. What is the proper name for his relation to me?  Second nephew? Nephew once removed? Nothing?  Looking at the overall picture, what's the accepted rule for the naming of all of our various relations?


Determinant of block matrix with commuting blocks

I know that given a $2N \times 2N$ block matrix with $N \times N$ blocks like   $$\mathbf{S} = \begin{pmatrix} A & B\\  C & D \end{pmatrix}$$  we can calculate $$\det(\mathbf{S})=\det(AD-BD^{-1}CD)$$ and so clearly if $D$ and $C$ commute this reduces to $\det(AD-BC)$, which is a very nice property.   My question is, for a general $nN\times nN$ matrix with $N\times N$ blocks where all of the blocks commute with each other, can we find the determinant in a similar way? That is, by first finding the determinant treating the blocks like scalars and then taking the determinant of the resulting $N\times N$ matrix.  Thanks in advance!


Why does value change although the function is defined as a constant?

I tested the program using static allocation and the compiler gives me an error when I had changed the value .  But when I used dynamic allocation, the value changed .  class Test{  private:     int *value;  public:      Test( int v ){         value = new int;         *value = v;     }      int getValue() const{         *value = 110;         return *value;     }      ~Test(){         delete value;     }  }; int main(){     Test t1(7);     cout<<t1.getValue()<<endl; }


Named ranges are duplicated when their sheet is duplicated. However, protected ranges are not.  I have 40 protected ranges on a sheet that I need to replicate six times, so I'm not really looking forward to defining 240 ranges.  Is there a way to keep the protected ranges when you replicate a sheet, or otherwise import them to the replicated sheet?


How do I use Ubuntu Server as file server?

In our company we would like to install Ubuntu server for file sharing, is it possible to use Ubuntu as file server for windows based client Operating systems.  what is the procedure to make Ubuntu file server, and i have installed Ubuntu 12.4 server.


Is there a correct gender-neutral singular pronoun ("his" vs. "her" vs. "their")?

Is there a pronoun I can use as a gender-neutral pronoun when referring back to a singular noun phrase?  Each student should save his questions until the end. Each student should save her questions until the end.


cardinality of set of all real continuous functions

Could somebody explain to me how to prove that the cardinality of all real continuous functions is $c$ ?  The first problem is that I don't know how to show that each real continuous function $f: X \rightarrow Y$ is uniquely determined by its values for $x \in Q $.  Secondly, how to show that $R^Q \sim  R^N \sim R$ ?  Thank you.


$D_3\oplus D_4$ not isomorphic to $D_{24}$

We need to prove that $D_{3} \oplus D_{4}$ is not isomorphic to $D_{24}$ .  The way in which I approach such type of questions is to count the number of elements of order $x$ in one group and then in the other group, and then conclude that they aren't equal and hence there can't be any isomorphism between them.  But this approach here doesn't look easy, with $D_{24}$ involved.  Could anyone suggest another way of solving this ?


a word for the existing state of affairs before you change something

I'm sorry for the question being so vague, I really don't know what to use for this. The word I'm looking for isn't status quo and the only way I can explain it to you is: When talking about opt-in organs, if you don't choose to opt out, the (dash) state is that your organs will be donated after your death.


Utilities for finding x/y screen coordinates

I have an application that needs the user to enter the x and y location of a couple of items on the screen. [Yes, this is crap and I'll replace it, but for now...]  On Mac OS X, I'm using Snapz Pro X.  When I choose to take a snap of a selection, the interface displays the mouse cursor location.  This is OK for my personal use, but I can't ask users to buy a $69 program for this function.  I thought I had a solution with the built-in program "Grab", but it reports the coordinates from the bottom left, and I need it from the top left.  I don't have access to Windows; not sure what to use there.  I've not even been able to come up with good search terms since mouse and coordinates and x/y are so common.  Ideas are welcome there.  Extra credit:  same x/y finder for Linux.  A Java program would be OK too, since the main application is in Java.


What are the different kinds of boxes in (La)TeX?

I've seen hbox, vbox, mbox, parbox and others used in various code samples. What are the different kinds of box in (La)Tex? Which are suitable for use in LaTeX, as opposed to plain TeX?


Conjectures that are false for very large numbers

Hi I would like to teach my students about false conjectures and computer approaches to them. I need references and/or direct examples of statements of the form $(\forall n \geq n_0)P (n)$ where $P$ is a relatively simple property (e.g. of elementary number theory) such that the smallest number $m$ for which $P (m) $ is false is ridiculously bigger than $n_0$.


$X_i$ follows Bernoulli distribution find UMVUE of $\theta(1-\theta)$

Let $X_1,X_2,X_3 ...X_n$ be a random sample from Bernoulli   distribution with parameter $\theta$.Find UMVUE of $\theta(1-\theta)$.   I know that $T=\sum_{i=1}^{n}X_i$ is complete sufficient statistic for our paramenter $\theta$. I am trying to find out function of T which is a unique unbiased estimator of $\theta(1-\theta)$. Now $T\sim Bin(n,\theta)$  $E(T^2)-E(T)^2=V(T)$  $n\theta(1-\theta)+n^2\theta^2-n^2\theta^2=n\theta(1-\theta)$  $\implies\dfrac{1}{n}(T^2-\bar{T}^2)$ is umvue of $\theta(1-\theta)$     If I have sample size $n=10$ with observations $1,1,1,1,1,0,0,0,0,0$   obtain the value of this estimator.   Now I am stuck at this point that is $T^2$ is $T^2=\sum_{i=1}^{n}X_i^2$ or $T^2=(\sum_{i=1}^{n}X_i)^2$. Can someone help me and tell at what point I am doing things wrongly?


why does sh -c over ssh discards the first command

sh -c 'echo hello ; echo world' Works fine on both host and remote machine, with the output of: hello world  but when I do ssh username@remote sh -c 'echo hello ; echo world', then the output is:  world  Why did the command eat my first echo hello command?


How to use dependency injection for Plugins/Blocks [\Drupal::formbuilder() and \Drupal::config()]?

I cannot get my head around this dependency injection theory. How are we supposed to get the below methods aligned with dependency injection?   \Drupal::routeMatch()->getParameter('node'); \Drupal::request(); \Drupal::formBuilder()->getForm('Drupal\enquirycart\Form\EnquiryForm'); \Drupal::config()   Here is a class that I need to fix this warning message when viewed in       "\Drupal calls should be avoided in classes, use | | dependency   injection instead"       class EnquirycartBlock extends BlockBase implements BlockPluginInterface {    /**    * {@inheritdoc}    */   public function defaultConfiguration() {     $default_config = \Drupal::config('enquirycart.settings');      return [       'label_display' => FALSE,       'enquiry_email' => $default_config->get('enquirycart.email'),     ];    }    /**    * {@inheritdoc}    */   public function build() {      $builtForm = \Drupal::formBuilder()->getForm('Drupal\enquirycart\Form\EnquirycartButtonForm');     $renderArray['form'] = $builtForm;      return $renderArray;    }    /**    * {@inheritdoc}    */   public function blockForm($form, FormStateInterface $form_state) {     $form_new = parent::blockForm($form, $form_state);      return $form_new;    }


I'm a newbie to Blender. I would like to know if we can create reeling effect (Cloth spooling around a cylindrical object).  I found couple of tutorials in which a map is rolled up... but it rolls up inside the circle. (Eg. ).  But I want the effect to be Turning & Growing in size as below.    Can anyone please guide me how it can be done (or if it can be done)   If possible, any links of the tutorials to follow would also be awesome.  Thanks in Advance!


Monitor accumulated number of bytes written by a process in Terminal?

I need a way to monitor the accumulated total number of bytes written to the disk by a process via the terminal. I've looked around quite a bit, and found several answers either saying to use pv, or iotop. However, pv is not installed on macOS out-of-the-box, and the version of iotop installed on macOS lacks the -a accumulated switch.  On top of that iotop requires SIP be disabled in newer versions of macOS, meaning it won't work with an out-of-the-box Mac. I need a method using tools built into macOS, they can require root access, they cannot require any non-stock macOS dependencies, e.g. Macports/Brew based software. Preferably in the stock version of Bash.


How can I edit the boot listing in ubuntu14

I want to hide some of the list from boot menu.Is it possible?


I am dealing with this problem:  Let $f: \Bbb C \rightarrow \Bbb C$ entire function such that for each $z\in\Bbb C$ :  $|f(z)| \leq A +B|z|^\frac{3}{2}$  Prove $f$ is linear.  I thought using Liouville's theorem, but it is about completely bounded function.I thought somehow to conclude that because the function is bounded by specific $z$ I can deduce the function is linear. I am struggling to formalize it properly.


In Blade Runner 2049, K/Joe discovers that his supposedly fake memories of a lost wooden horse (unicorn reference?) are in fact real, and belong to the child of Deckard and Rachel, and so both he and the audience assume he is the child. As it is eventually revealed, his memory was that of Deckard's daughter, the subcontracted memory artist who helped him determine that his memories aren't manufactured.  How did K/Joe get her memories?


How do I get a Broadcom BCM4313 wireless card working?

I upgraded Ubuntu from 11.10 to 12.04, until which wireless was working just fine. After the upgrade and reboot, wireless is not even being detected (When I click the network manager icon in the top panel, it does not show the wireless networks. Neither the Enable wireless option is there). But my laptop's LED indicator shows wireless is on.  This is a Dell Vostro 3450 laptop with:     Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)** (from lspci). Is any other info needed?   How do I get Wifi working?


Bound on integral implies bound on functions.

I don't know how to prove this example. Let $y(t):\mathbb{R}^+ \to \mathbb{R}^+$ be a nonincreasing function. Assume that there is a constant $A>0$ such that \begin{equation} \int_{s}^{+\infty}y(t)dt \leq Ay(s), \quad 0\leq s<+\infty \end{equation} then $y(t)\leq y(0)e^{1-\frac{t}{A}}$ for all $t>0$.


I'm trying to generate placeholders in clause IN then set values. It seems working but finally returns one less row. I can't use setArray method as it's Oracle and I can't modify db.  Code below. public void loadObject(Connection connection, number1, number2, commentCodeList)  throws SQLException{     String sqlToFind = "SELECT DISTINCT ccommid FROM COMMENT WHERE number = ? \n" +             "AND number2 = ? AND ccommid IN (%s)";      String sql = String.format(sqlToFind, preparePlaceHolders(commentCodeList.size()));      PreparedStatement preparedStatement = connection.prepareStatement(sql);     preparedStatement.setInt(1, number1);     preparedStatement.setInt(2, number2);     setValues(preparedStatement, commentCodeList.toArray());      ResultSet resultSet = preparedStatement.executeQuery();      while(resultSet.next()){         Comment comment = new Comment();         comment.setCcommid(resultSet.getString(1));         commentList.add(comment);     } }  private String preparePlaceHolders(int size){     StringBuilder builder = new StringBuilder();     for (int i = 0; i < size;) {         builder.append("?");         if (++i < size) {             builder.append(",");         }     }     return builder.toString(); }  public static void setValues(PreparedStatement preparedStatement, Object... values) throws SQLException {     for (int i = 0; i < values.length; i++) {         preparedStatement.setObject(i + 3, values[i]);     } }


What desktop enviroment is most efficent?

I don't really care if the desktop environment is quick. What I want is a desktop environment that lets me open apps and get things done the fastest. I don't care about flashiness or anything.   READ: I am not looking for the desktop environment that is the lightest. I am looking for the one that lets me open an app and use it most effectively, to minimize,for example, the time it takes me to open libreoffice and write up an essay for school. I want to be super efficient.


TempDB causing high IO writes - dependent on server's max memory setting

I have a mirrored SQL Server 2012 database. The first server has a hugh tempdb write IO load when the maximum memory limit is set above 8192 mb.   These 8192 where the original setting for both the first and second server and I can only assume this can be an origin of this wierd behavior. However, when I increase the limit on the second server, the first still causes high io load. Once I set it back to 8192 or lower, tempdb activity zeros.  Also changing the mirroring model between High Performance / High Safety / Monitor has no effect. I have not yet tried to remove the mirror as this will cause an application downtime...  Have I found a bug?


QGIS Error when clipping a raster with a shape layer

I am trying to clip a .tif file using the extent of a polygon (.shp). I am using the conventional Raster/Extraction/Clipper tool in QGIS 2.18.10. After choosing the appropriate settings, I get the following message:   ERROR 1: Attempt to create ADRG dataset with an illegal data type (Float32), only Byte supported by the format.   I am asking the exact same question as  in , which was marked as a duplicate for no apparent reason. The referred answer fails to address the issue. My raster is already in a supported format (Float32), and when changing the pixel depth with gdal_translate to other supported formats (e.g. Int32), I still get the this error.  Any thoughts?


When I was restarting the apche2, I was getting this message..   sudo service apache2 restart  * Restarting web server apache2                                                                                AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message   and when I was typed the localhost/phpmyadmin, it showing the message      -NOT FOUND The requested URL /phpmyadmin was not found on this server. Apache/2.4.7 (Ubuntu) Server at localhost Port 80   Please help me in this.


I'd like to have a time, say 6:45am, and add an amount of hours, say 1.45 hours, to result in another time. So I'd like to add 1.45 hours to 6:45am to get another time.   Is there a command line utile for that? I've done some Googling, and read the man page for date and haven't found anything like that. wcalc doesn't seem to handle time calculations.  EDIT: Mar 6, 2015. This is the script I ended up with to use decimal hours. It could use some error checking to make sure HH:MM uses 2 digits for the hours.  #!/bin/bash # Mar 6, 2015 # Add decimal hours to given time.  # Syntax: timeadd HH:MM HOURS # There MUST be 2 digits for the hours in HH:MM. # Times must be in military time.  # Ex: timeadd 05:51 4.51 # Ex: timeadd 14:12 2.05 echo " " # If we have less than 2 parameters, show instructions and exit. if [ $# -lt 2 ] then     echo "Usage: timeadd HH:MM DECHOURS"     exit 1 fi intime=$1 inhours=$2 # Below is arithmetic expansion $(()) # The bc calculator is standard on Ubuntu.  # Below rounds to the minute.  inminutes=$(echo "scale=0; ((($inhours * 60)*10)+5)/10" | bc) echo "inminutes=$inminutes" now=$(date -d "$intime today + $inminutes minutes" +'%H:%M') echo "New time is $now"


Foreign words reborrowed back into English

Wikipedia mentions several English words that have been :   Anime comes from animation and has been reborrowed into English to mean Japanese-style animation. Puroresu comes from professional wrestling and is a term for Japanese-style professional wrestling. Kosupure comes from cosplay (an abbreviation of costume play) and refers to the practice of dressing in costumes of anime and video game characters.    Do you know other examples of word reborrowings from Japanese or other languages back into English, or vice versa?


Who first determined the structure of water (two hydrogen atoms stuck to an oxygen atom at approx 105 degrees), and, more importantly, how was this done?


Splitting multiband raster into multiple bands using ArcGIS ModelBuilder?

I'm using the ModelBuilder functionality in ArcGIS, and would like to take a raster that contains 4 bands, clip it with a polygon and then make NDVI from the clipped file. To do that, I need access to the different bands in the raster. In QGIS (where I'm coming from), some libraries don't preserve all 4 bands.   In QGIS, the raster calculator menu gave access to all of the bands, but ArcGIS doesn't seem to. Examples I've found breaks the raster into multiple entities in the model builder and works with those?  In ModelBuilder, how would you go about breaking the raster into its 4 bands?


Tip of my tongue, a term for how we associate icons and logos with products

i remember one of the terms had to do with the icon was actually what it represented. (like illustration of a highway means this is now a highway)  and the other one was something in between like knife and fork reprecenting food  and if i recall correcly the third was something unrelated / abstract doing the reprecenting  (picto..something?)


Returning image for each iteration using Google Earth Engine?

I'm trying to map the maximal amount of days without rain using the TRMM dataset in Google Earth Engine. I'm doing this by iterating over the collection and if no rain has fallen, one gets added to the cell (code below). When rain has fallen the value gets multiplied by 0 so the "counter" is reset. Then I would like to store each result of each iteration in a Image collection and then select the maximum value to get the longest consecutive dry period.  But that is the theory. When I put this in a script I get an error while adding the image of one iteration to a list.   Does anyone know why this is and how this can be solved?  Code:  var list = []; function drylength(current, previous){   var mask = current.remap([0], [1], 0,"precipitation").rename('precipitation');   var sum = mask.add(previous).multiply(mask);    list.push(sum);   return sum; }  var dataset = TRMM .filterDate("2015-01-01","2015-02-01") .sort('system:time_start:');  var totalPrecipitation = dataset.iterate(drylength, dataset.max() .remap([0], [0], 0, "precipitation") .rename('precipitation'));  print(list); print(totalPrecipitation); Map.addLayer(ee.Image(totalPrecipitation), imageVisParam);   Furthermore it appears only 3 items are stored in the list which makes me assume the iteration is more complex than a literal iteration where all images are calculated one by one?   Here is an image of the error:    Errors written if image is not visible or for search engines:  Failed to decode JSON. Error: Field 'value' of object '{"type":"ArgumentRef","value":null}' is missing or null. Object: {"type":"ArgumentRef","value":null}.   and:  Unknown variable references: [_MAPPING_VAR_0_0, _MAPPING_VAR_0_1].


Why did Sauron blow up if he only had his fingers cut off?

In the Lord of the Rings why did Sauron blow up when he only had his fingers cut off?


Package unicode-math And Usage Of Math Fonts Like Euler

When I use the package \usepackage{euler} with the package \usepackage{unicode-math} then the Euler font is not used but the default math font is used instead. If I remove the unicode-math package then the Euler font is used as it should. So what is the problem with using both euler and unicode-math? Moreover I can only assume that this will happen with other math fonts too, so I have to guess it is an issue of unicode-math package and thus I have to ask, what is happening?


How do I shut down a command block if I don't know the coordinates?

In minecraft, I created a command block that kills any player within 100 blocks of it.  How can I shut it down if I don't know the coordinates?


Why are date-based hats awarded too early?

I just got the  hat which states "post or vote on December 21".  Does SE have a time machine now?


I mean instead of lualatex. I came across the , so I am not asking about python support.  What was so special about lua that people spent so much time on that instead of doing something with python (and which would be arguably be more useful)?


I have been writing a chapter of my thesis using Lyx. Everything was normal until I put the last image in the project. When I am trying to generate the DVI file I got this error message:  LaTeX Error: 'File 8D_***path to my image***'.  LaTeX Error: Cannot determine size of graphic in 8D_***"location of the image inside the .lyx file"***.   I don't understand why this happening because this image has the same extension of the other (.png), besides is not bigger than some of those. I tried to put the image in the same folder but this did not work, I also changed the extension to .bmp but it was worse.  What could happen?


how to feed the `find` output as the argument for bash?

I find a list of bam files using $bams=$(find /data/and/ -type f -regex ".*\.bam") #/data/DNA128441.bam #/data/DNA128442.bam #/data/DNA128443.bam  And wanted to feed in a script test.sh #!/bin/bash bam="$@" echo "You provided the arguments:" ${bam} s=${bam##*/} r1=${s%.bam}_R1.fastq r2=${s%.bam}_R2.fastq echo $r1 echo $r2  But when I run: $bams=$(find /data/and/ -type f -regex ".*\.bam") ./test.sh $bam You provided the arguments: /data/and/DNA128441.bam /data/and/DNA128342.bam /data/and/DNA128343.bam DNA128343_R1.fastq DNA128343_R2.fastq  My question is how to make it process one by one such like a desired output: $bams=$(find /data/and/ -type f -regex ".*\.bam") ./test.sh $bam You provided the arguments: /data/and/DNA128341.bam DNA128341_R1.fastq DNA128341_R2.fastq You provided the arguments: /data/and/DNA128342.bam DNA128342_R1.fastq DNA128342_R2.fastq You provided the arguments: /data/and/DNA128343.bam DNA128343_R1.fastq DNA128343_R2.fastq


Finding all domains registered in a nameserver

Up until now, I was pretty confident that it was pretty much impossible to list all the domains handled by a nameserver.  But apparently, there exists a couple of websites on the Internet that are able to list all the domains registered in a namerserver.   For example:      Or all domains pointing to a specific IP :      (These DNS/IP were picked at random)  Do you know how it's done ?


Producing CSV file from .tif file with elevation data

I have a .tif file that contains all the elevation of a country.   How can I convert that to a CSV file that contains x,y,z values where x and y are the latitude longitude respectively and the z column is the elevation using QGIS?


Are dexterity saving throws based on sight?

The 'blind' status defines     A blinded creature can’t see and automatically fails any ability check that requires sight.   Many spells and effects require targets to perform a dexterity saving throw. For example, the 'Fireball' spell requires that     each creature in a 20-foot-radius sphere centered on that point must make a dexterity saving throw.   Do blind creatures automatically fail this saving throw? If not, then, which saving throws are based on sight? Do the rules specifically mention this?


Trouble in filling dropdownlist based on previous dropdownlist PHP AJAX DATABASE

SOLVED, THANK YOU <3  I have a problem, when I try to populate a second dropdownlist with data from database from column selected in previous dropdownlist, like:  ddl:DDL1     ddl:DDL2    button:Search  When You choose in DDL1 e.g. ID, DDL2 should let You pick one of the existing ID's from database.  This is my HTML Form:  <form id="detailed_search_form">          <select id="select_columns" name="select_columns" onchange="take_value()">         </select>          <select id="select_value" name="select_value">         </select>          <button id="button_search" value="search" onclick="search()">Search</button>  </form>

   This fills DDL1, and THIS WORKS:      function take_columns(){ var tab = new Array(); $.ajax({     dataType:       "json",     url:            "take_columns.php",     data:   {  },     success:    function(data) {         for (var i=0;i<data.length;i++){             tab[i]=data[i]["Column_name"];         }         var $el = $("#select_columns");         $el.empty(); // remove old options         for (var i=0;i<tab.length;i++){             $el.append($("<option></option>").attr("value", tab[i]).text(tab[i]));         }     }   }); };   This SHOULD fill DDL2 and THIS DOESN'T WORK:  function take_value() { var e = document.getElementById("select_columns"); var requestedColumn = e.options[e.selectedIndex].value; $.ajax({     data: { column: requestedColumn },     url: 'take_value.php',     dataType: 'json',     success: function(json) {         for (var i = 0;i<data.length;i++){             tab[i]=data[i][requestedColumn];             alert(tab[i]);         }         var $el = $("#select_value");         $el.empty(); // remove old options         for (var i=0;i<tab.length;i++){             $el.append($("<option></option>").attr("value",  tab[i]).text(tab[i]));         }     }   }); };   This is take_value.php:  $pdo = new PDO($dsn, $username, $password); if(isset($_GET['column'])) {     $whatColumn = $_GET['column'];     $stmt = $pdo->prepare("SELECT $whatColumn FROM kandydaci");     $stmt->bindParam(':column', $whatColumn, PDO::PARAM_STR);     $stmt->execute();     $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); } echo json_encode($rows);


Reindex a removed domain in google search console (DNS changed)

My website was indexed in the Google search engine by a company. A few days ago I changed my server hosting company and transferred my domain it.  They may have removed my site, or blocked it, or changed something in Google Search Console. I had added my website to Google Search Console like other websites (a week ago) and in Google search console I see that website is indexed but its not showing in search results (site:www.-----.com). Help!!! :)  Notes:  1) In the admin panel i can still see the performance of my website for the last year.  2) My website was developed on WordPress CMS and now its a simple website not CMS.


I installed Lamp server in UBUNTU 16.04 with the command: sudo apt-get install lamp-server^.  The installation completed successfully. After that when I opened localhost in browser it displayed the "Apache2 Ubuntu Default Page".  BUT  When I am trying to open localhost/phpmyadmin I'm getting 404 error.  I'm not able to understand what is wrong here. Can anyone suggest a solution?  Note: Although this question may seem similar to the one here "", but the process I used to install LAMP is different than the one mentioned in that question. None of the solutions given there work either. Solutions suggest smylink for conf files, but when I try that it says the file or folder doesn't exist. I'm not very technical person, but I'm guessing my LAMP setup may be different from the one mentioned there.


sudo apt-get update not working after install PPAs

after install some PPAs when ever I do sudo apt-get update the output is  Hit:1 http://au.archive.ubuntu.com/ubuntu bionic InRelease Hit:2 http://repo.steampowered.com/steam precise InRelease                                                                                Hit:3 http://au.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                                                Hit:4 http://au.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                                Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease                                                                                Ign:6 http://ppa.launchpad.net/grumbel/ppa/ubuntu bionic InRelease        Hit:7 http://ppa.launchpad.net/kelleyk/emacs/ubuntu bionic InRelease         Err:8 http://ppa.launchpad.net/grumbel/ppa/ubuntu bionic Release                                                          404  Not Found [IP: 91.189.95.83 80] Get:9 https://qgis.org/ubuntu bionic InRelease [3,693 B] Err:9 https://qgis.org/ubuntu bionic InRelease   The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51F523511C7028C3 Reading package lists... Done E: The repository 'http://ppa.launchpad.net/grumbel/ppa/ubuntu bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. W: GPG error: https://qgis.org/ubuntu bionic InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51F523511C7028C3 E: The repository 'https://qgis.org/ubuntu bionic InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.


So I have difficulty with the concept of *args and **kwargs.  So far I have learned that:   *args = list of arguments - as positional arguments **kwargs = dictionary - whose keys become separate keyword arguments and the values become values of these arguments.   I don't understand what programming task this would be helpful for.   Maybe:  I think to enter lists and dictionaries as arguments of a function AND at the same time as a wildcard, so I can pass ANY argument?  Is there a simple example to explain how *args and **kwargs are used?  Also the tutorial I found used just the "*" and a variable name.   Are *args and **kwargs just placeholders or do you use exactly *args and **kwargs in the code?


What is the terminal command to show desktop?

In Xubuntu 13.04 there is a Show Desktop panel plugin.  I'd like to make a keyboard shortcut for this functionality.  How can I activate Show Desktop with a terminal command?


Wi-Fi speed on my laptop with RTL8723DE is a bit slow and its range is also very low, what to do?

My Wi-Fi connection seems to be very weak and the range is very low. It drops by two bars if I just move to the next room and by two if just step outside.  The speed is also not fast as compared to what I get from the router on my desktop .  My laptop is a HP laptop with RTL8723de module. Can anyone help me in bumping up my Wi-Fi speed?  Result of lspci -nnk | grep 0280 -A3:  03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:d723] Subsystem: Hewlett-Packard Company Device [103c:8319] Kernel driver in use: rtl8723de Kernel modules: rtl8723de


Is there a way to count the number of IL instructions executed?

I want to do some benchmarking of a C# process, but I don't want to use time as my vector - I want to count the number of IL instructions that get executed in a particular method call. Is this possible?  Edit I don't mean static analysis of a method body - I'm referring to the actual number of instructions that are executed - so if, for example, the method body includes a loop, the count would be increased by however many instructions make up the loop * the number of times the loop is iterated.


How do we know an $ \aleph_1 $ exists at all?

I have two questions, actually. The first is as the title says: how do we know there exists an infinite cardinal such that there exists no other cardinals between it and $ \aleph_0 $? (We would have to assume or derive the existence of such an object before we label it something like $ \aleph_1 $.)  My second question is, can we say for certain if there's any limit to the number of cardinals existing between $ \aleph_0 $ and continuum (i.e. $ 2^{\aleph_0} $)? I mean, how could we know that there's not an infinite number of cardinals between the two - perhaps even more than $ \aleph_0 $?


How to delete beta "update is available" after unenrolling from beta?

I unenrolled from macOS Big Sur beta program, however I am still getting the 11.0.1 "update is available" notification. I would like to remove this so that I upgrade directly to 11.0 when GM is released. I don't want to install 11.0.1. Is there a way to delete cached update data so I only get 11.0 when it's eventually released?


After updating from 18.04 to 20.04 HP OfficeJet 8720 produces no output

Before updating to 20.04 my HP OfficeJet 8720 worked. After updating from 18.04 to 20.04 HP OfficeJet 8720 gets lpstat -p \printer HP-OfficeJet-Pro-8720 now printing HP-OfficeJet-Pro-8720-0.  enabled since Sat 29 May 2021 09:34:09 PM EDT     Rendering completed  but nothing is printed.


When this code runs, the char variables contained in the array do not update and remain a blank space. The TicTacToe board prints in the correct format. Am I missing something obvious? Scanner scan = new Scanner(System.in);         String pos;         boolean win = false;                   char tl = ' '; char tm = ' '; char tr = ' ';         char ml = ' '; char mm = ' '; char mr = ' ';         char bl = ' '; char bm = ' '; char br = ' ';                  // INITIALIZE ARRAY         char[] tic = new char[15];         tic[0] = tl; tic[1] = '|'; tic[2] = tm; tic[3] = '|'; tic[4] = tr;         tic[5] = ml; tic[6] = '|'; tic[7] = mm; tic[8] = '|'; tic[9] = mr;         tic[10] = bl; tic[11] = '|'; tic[12] = bm; tic[13] = '|'; tic[14] = br;                               System.out.println("Player 1: Make your move!");             System.out.println("Choose between: TL TM TR ML MM MR BL BM BR");                      pos = scan.next();                      if(pos == "TL") {tl = 'X'; }             if(pos == "TM") {tm = 'X'; }             if(pos == "TR") {tr = 'X'; }             if(pos == "ML") {ml = 'X'; }             if(pos == "MM") {mm = 'X'; }             if(pos == "MR") {mr = 'X'; }             if(pos == "BL") {bl = 'X'; }             if(pos == "BM") {bm = 'X'; }             if(pos == "BR") {br = 'X'; }                          System.out.println("Player 2: Make your move!");             System.out.println("Choose between: TL TM TR ML MM MR BL BM BR");                          pos = scan.next();                          if(pos == "TL") {tl = 'O'; }             if(pos == "TM") {tm = 'O'; }             if(pos == "TR") {tr = 'O'; }             if(pos == "ML") {ml = 'O'; }             if(pos == "MM") {mm = 'O'; }             if(pos == "MR") {mr = 'O'; }             if(pos == "BL") {bl = 'O'; }             if(pos == "BM") {bm = 'O'; }             if(pos == "BR") {br = 'O'; }                          // PRINT BOARD             for(int i = 0; i <= 14; i++)             {                     System.out.print(tic[i]);                                          if(i == 4 || i == 9)                      {                         System.out.println();                     }                                                   }  I was messing around and realized that I have no idea how to resolve this issue


Let $p, q$ be prime numbers and $n ∈ \mathbb{N}$ such that $p \not\mid n- 1$.  If $p \mid n^q -1$ then show that $q \mid p-1$.   My ideas: I was thinking about the formula $$n^q -1 = (n-1)(n^{q-1} + n^{q-2} +\cdots+1),$$ but now here I do not know how to show that $q \mid p-1$.  Any hints or solution can be appreciated.


Let $A$ be nonempty, compact. Then, $\sup A$ and $\inf A$ exist are elements of $A$.  Pf. By Heine-Borel, $A$ is closed and bounded. By the completeness axiom, a bounded set of the reals has a sup and inf, so we have existence.  I'm not sure how to show they're actually elements in $A$. I know I can choose $x_n\in A$ with $x_{n_k}\rightarrow x$ where $x\in A$ by compactness, but I'm not sure how to guarantee that $x=\sup A$ or $x=\inf A$.


Which backpack theft protection features are there, and which of them work?

While wearing a backpack, what are common/known ways how someone might steal things out of your backpack (or even the whole backpack altogether)?   Which backpack security features can protect against which theft method?  {I’m asking only about features integrated in backpacks, not additional security products (like  or ).}


defining our own floating-point version of range() but can accept float values

I have to defined a function called float_range(start,stop,step). It works the same as a built in function only it can accept float values too.For the content I am not to use the range function at all and I am to assume start, stop and step are integer or float numbers. The problem I am having with my code, is I believe to have created a infinite loop  in one of the while loops and its not passing all the test cases. Some of the examples are float_range(0,1.0,.25) and should count out from 0 to 1 in a list as [0,0.25,.5,.75] or float_range(0,0.25,-1) this would not work because its never true so it would return a empty list. I need help making in finding that infinite loop I created and also passing these test cases.  def float_range(start,stop,step):    range_list = [start]    Value = start    while Value != stop:        if start < stop:          while Value < stop:             Value += step             range_list.append(Value)          return range_list[:-1]       elif start > stop:          while Value > stop:             Value += step             range_list.append(Value)          return range_list[:-1]


How can a case in a switch not have a break?

I have recently inherited some code that is very poorly written. Unfortunately, it is a system that we depend on highly, and there isn't time to re-write it all, so I am stuck maintaining it and re-writing pieces as I go along. However, today I stumbled on this method that contains a switch and one of the case statements has no break. How is this able to compile? It is my understanding that all cases have to break, return or goto.  private void ReadBadge_Activated(object sender, EventArgs e)     {         try         {             if (!bInHideMode)             {                 // Set Button states                 btnCancelSwipe.Visible = true;                 btnCancelSwipe.Refresh();                  // Enable the Timeout timer                 //tmrTimeout.Enabled = true;                  // Refresh data                 switch (mManageAction)                 {                     case "LogOnManager":                     case "NormalUse":                         lblSwipeStatus.Text = "Pass ID Badge\nNear The Reader";                         break;                     case "AddNewUser":                         lblSwipeStatus.Text = "Pass ID Badge\nNear The Reader\nFor: " + mUserName;                         break;                     default:                         lblSwipeStatus.Text = "Pass ID Badge\nNear The Reader\nFor: " + mUserName;                         break;                 }             }         }         catch (Exception ex)         {             MessageBoxNoClick.MessageBox2(ex.Message, "Error Message");         }     }


Math isn't rendered on my Galaxy Note II in Math.SE when I access it through the new Android app. Is this a bug or has it just not been implemented yet?


After installing android studio and running all the commands in terminal and saving the text editor ".desktop'' file..terminal is showing the following error:  ~/Downloads$ cd ~/Downloads ~/Downloads$ sudo -i [sudo] password for arpit ~# mv android-studio /opt mv: cannot stat 'android-studio': No such file or directory ~# gedit android-studio.desktop desktop-file-install android-studio.desktop  ~# desktop-file-install android-studio.desktop Error on file "android-studio.desktop": Key file does not start with a group  ~# desktop-file-install android-studio.desktop Error on file "android-studio.desktop": Key file does not start with a group ~# ^C ~#


Java regex resulted in null pointer exception error

I'm very new to Java and regex and has no experience with android development (but I've been tasked to fix a bug). My question breaks down into two parts.  I have an error that shows:  Fatal Exception: java.lang.IllegalStateException: Fatal Exception thrown on Scheduler. ... ... ...  Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.matches(java.lang.String)' on a null object reference        at utils.DataParsingUtils.isInteger + 195(DataParsingUtils.java:195)        at services.FCMService.createChatNotification + 255(FCMService.java:255)   Doing some tracing, I believe the error originates from the file /utils/DataParsingUtils and from the function isInteger, which is shown below.  public static boolean isInteger(String s) {     return s.matches("^-?\\d+$"); }   Based on the error, I think it has to do with a null value being returned. In this case from the isInteger function. This leads me to 2 questions.   What exactly is the regex doing? My research tells me:   a) " = matches the beginning of the line b) - = indicates a range c) ? = does not occur or occurs once d) \\d = matches the digits e) + = matches one or more of the previous thing. (In this case the digits) f) $ = matches end of the line.  However I'm having a hard time putting everything together. Does it only want matches that start or end with digits but where do - and ? come in?    Can this regex return a null? From different sources I see   Source A:  s.matches("regex") evaluates if "regex" matches s. Returns only true if the WHOLE string can be matched.   Source B:  If the regular expression matches the whole text, then the matches() method returns true. If not, the matches() method returns false.  You cannot use the matches() method to search for multiple occurrences of a regular expression in a text. For that, you need to use the find(), start() and end() methods.   It doesn't explicitly state that under no condition can a null be returned but my understanding is that it can only return True or False? If that is the case, why does the NullPointerException point to the isInteger function?  Note: I've checked line 255 within the function createChatNotification and it's a call to the function isInteger.  private void createChatNotification(String argA, final String argB, final String argC) {          if (DataParsingUtils.isInteger(argA)) {


which of the following sentences are correct

Glow and glowing are different forms of a verb, but does the tense make any difference?  Which one of these (in each pair) is correct and why?   "I saw you dancing" or "I saw you dance". "I will watch you cook" or "I will watch you cooking". "I am watching you sing" or "I am watching you singing".


Bohr's model of an atom doesn't seem to have overcome the drawback of Rutherford's model

We, as high school students have been taught that-because Bohr's model of an atom assigns specific orbits for electrons-that it is better than Rutherford's model. But what Rutherford failed to explain was why electrons don't emit EM waves & fall into the nucleus. I don't see how the introduction of 'atomic orbitals' overcame this defect. Can't it still radiate EM waves?


Can a fundamentally deceptive character work?

This question is in the spirit of another . I would like to explore a style of role-playing in DnD (specifically 3.5e) that may be slightly different from how characters usually work. The question aims to answer if and how such a character can work and be played for everyone's amusement. I am still relatively new to the game, so please forgive me if this question is naive. Probably people have tried before and discarded the idea.  Character concept The character is supposed to be deceptive, on both the character and the player level. He will thrive to achieve some higher goal that is different to the party's, but not in an open way. He will play along and work for the party's interest, but wait for his moment (ideally towards the end of the campaign) to strike. As such an evil religious fanatic would be ideal, who works towards achieving the goals of his deity by deceiving his party members, gaining their trust and acquiring resources together with them, but when given the choice would take the powerful magical item and bugger off with it. Motivation and Concerns The main motivation is to bring some diversity to the usual scheme. People tend to play funny characters and there is usually (at least in our games) happy peace in the party with the only dispute being about who gets the loot. I feel a character like the one suggested would make things more interesting since people can't take their party members for granted anymore. The concern is of course that it might not be very fun for the party to have their plans destroyed by one member of the party playing an "extra cool" character. I think done well, it could still be fun for the other players though, which is why the rest of the question will be about how to do it. How? First of all the DM should probably know, maybe he can even build it into his campaign. The exact story details will then depend on the exact setting, but I am sure together with the DM something could be worked out. I am mainly interested in if it can work and how it could be fun.


In the early area, the forest you will see a knight sleeping under the tree. When can I fight him and what do I get from defeating him?


Change tooltip under date / share comment link

Can we have tooltip under date / share comment link changed from useless (as I think) timestamp to clear meaning of its function (i.e., "Share this comment")?  I've been using Stack Exchange for over a year and I , nor can I find any reasonable arguments for what use is there to have the timestamp displayed in the tooltip.  Per comments, I see that timestamp is useful. This leads us to a question: Why we can't have both? For example: Posted on 2014-08-27 14:20Z. Use this link to share this comment?


When I run the following command :  sudo usermod –c "Richard Tracy" dtracy    I get the following error :  Usage: usermod [options] LOGIN  Options:   -c, --comment COMMENT         new value of the GECOS field   -d, --home HOME_DIR           new home directory for the user account   -e, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE   -f, --inactive INACTIVE       set password inactive after expiration                                 to INACTIVE   -g, --gid GROUP               force use GROUP as new primary group   -G, --groups GROUPS           new list of supplementary GROUPS   -a, --append                  append the user to the supplemental GROUPS                                 mentioned by the -G option without removing                                 him/her from other groups   -h, --help                    display this help message and exit   -l, --login NEW_LOGIN         new value of the login name   -L, --lock                    lock the user account   -m, --move-home               move contents of the home directory to the                                 new location (use only with -d)   -o, --non-unique              allow using duplicate (non-unique) UID   -p, --password PASSWORD       use encrypted password for the new password   -R, --root CHROOT_DIR         directory to chroot into   -s, --shell SHELL             new login shell for the user account   -u, --uid UID                 new UID for the user account   -U, --unlock                  unlock the user account   -v, --add-subuids FIRST-LAST  add range of subordinate uids   -V, --del-subuids FIRST-LAST  remove range of subordinate uids   -w, --add-subgids FIRST-LAST  add range of subordinate gids   -W, --del-subgids FIRST-LAST  remove range of subordinate gids   -Z, --selinux-user SEUSER     new SELinux user mapping for the user account   It states that we can use -c option , then why is it not accepting it my command ? I also see that while creating user and having -c in the useradd command , still I receive the above message and operation fails.  To reproduce the above error , just run sudo useradd dtracy to create a user dtracy with defaults and then try to modify by above usermod command.


Using Stack Overflow to discuss problems faced in a new software product

I have been working on some open source tools on github and there are quite a few number of people using it at the moment.  The problem is that everytime they want to ask something or don't understand something, they end up creating an issue on github.  I wanted to create a tag on Stack Overflow for this purpose, but I don't have enough privileges at the moment to create a new tag. What should be the right procedure to use Stack Overflow for a new software product?  Update: Tag name : wintersmith  Website:   Question which needs wintersmith tag:


Should I adjust rear derailleur as my chain seems too close to each other

I am learning to replace chain and freewheel (So far so good). After I put new freewheel and new chain on, the chain are too close to each other at the back now (as you can see in the photo).    I think I need to adjust rear derailleur, is it right? Or maybe the chain wasn't installed correctly ( I cycled around and think chain install seems not too bad).


Non parametric test to compare variances

I have two samples of same size but at least at one of them is not normal distributed (tested by Shapiro-Wilk-test). How can a compare the variances of theses samples? Especially, I want to know the p-value for the hypothesis: $\sigma_1^2 \leq \sigma_2^2$.


I am trying to migrate from Windows to Linux. Why is so difficult for beginners to install programs to a linux computer. Starting to miss the self extracting executable programs in Windows. I have spend hours trying to load Java8 JDK to begin to develop some programs. Can anyone give me some very simple help to install Java 8jdk?


I need to install a LaTeX package on my MikTeX system.  Specifically, I am trying to make biblatex work, but I always get the error message:    ! LaTeX Error: File `biblatex.sty' not found.   I have changed the options to have the "Quick Build" command that includes biblatex too.   Code/commands are correct because it's working under Overleaf.