I am developing news app and I have implemented filter in my RecyclerView.Adapter but when I run the code I am getting following exception Process: com.example.recycleviewsearchintent, PID: 27421     java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference         at   below my adapter class: public class UsersAdapter extends RecyclerView.Adapter<UsersAdapter.UsersAdapterVh> implements Filterable {      private List<UserModel> userModelList;     private Context context;     private SelectedUser selectedUser;     private List<UserModel> getUserModelListFiltered;       public UsersAdapter(List<UserModel> userModelList, SelectedUser selectedUser) {         this.selectedUser = selectedUser;         this.getUserModelListFiltered = userModelList;         this.userModelList = userModelList;     }      @NonNull     @Override     public UsersAdapter.UsersAdapterVh onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {         context = parent.getContext();         return new UsersAdapterVh(LayoutInflater.from(context).inflate(R.layout.row_users, null));     }       @Override     public void onBindViewHolder(@NonNull UsersAdapter.UsersAdapterVh holder, int position) {          UserModel userModel = userModelList.get(position);         String username = userModel.getUserName();         String prefix = userModel.getUserName().substring(0, 1);         holder.tvUsername.setText(username);         holder.tvPrefix.setText(prefix);     }      @Override     public int getItemCount() {         return userModelList.size();     }       @Override     public Filter getFilter() {         Filter filter = new Filter() {             @Override             protected FilterResults performFiltering(CharSequence charSequence) {                 FilterResults filterResults = new FilterResults();                 if (charSequence == null | charSequence.length() == 0) {                     filterResults.count = getUserModelListFiltered.size();                     filterResults.values = getUserModelListFiltered;                 } else {                     String searchChr = charSequence.toString().toLowerCase();                     List<UserModel> resultData = new ArrayList<>();                     for (UserModel userModel : getUserModelListFiltered) {                         if (userModel.getUserName().toLowerCase().contains(searchChr)) {                             resultData.add(userModel);                         }                     }                     filterResults.count = resultData.size();                     filterResults.values = resultData;                 }                 return filterResults;             }              @Override             protected void publishResults(CharSequence charSequence, FilterResults filteResults) {                  userModelList = (List<UserModel>) filteResults.values;                 notifyDataSetChanged();             }         };         return filter;     }      public interface SelectedUser {         void selectedUser(UserModel userModel);     }      public class UsersAdapterVh extends RecyclerView.ViewHolder {          TextView tvPrefix;         TextView tvUsername;         ImageView imIcon;          public UsersAdapterVh(@NonNull View itemView) {             super(itemView);             tvPrefix = itemView.findViewById(R.id.prefix);             tvUsername = tvPrefix.findViewById(R.id.username);             imIcon = itemView.findViewById(R.id.imageView);              itemView.setOnClickListener(new View.OnClickListener() {                 @Override                 public void onClick(View v) {                     selectedUser.selectedUser(userModelList.get(getAdapterPosition()));                 }             });         }     } }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


In Apex that is running in the context of an external API call (in my case, via the REST API - but same would apply for SOAP), is it possible to determine the 'client' value supplied in the Sforce-Call-Options header? For example, in an Apex trigger that has fired due to an incoming REST API call inserting/updating objects is there any means via which the Apex code can access that client name? I'm thinking in the same way that you can access contextual information about the Url that triggered some Apex via Url.getCurrentRequestUrl(). I've had a good root around the Apex class reference but am unable to find anything obvious.

We have various ways of invoking apex. Triggers, Inbound Webservices, @InvocableMethod,@RemoteAction and what not. Often we call some or other utility methods from these execution contexts. I have some generic utility method,that should behave differently from the context it is called?  I know about Trigger.isExecuting but it only tells if its running in trigger context or not.  I have a utility method that creates lead from Webservices, VF button click and via Lightning . Whenever we create a lead I want some special operations to be done via the source it was originated.(Its not just updating a simple field leadSource, I have some methods that creates some childs and update other records of other type) . I can achieve this by passing an extra parameter to utility method to tell about source, but i have then to edit hundred of other class that uses this utility method. If i could dynamically find out via which context this piece of code is running,then i would have to change only one class to satisfy my requirement.    Is there something in APEX that tells in what context the apex method was called?


I have two files: in linux redhat version 6  list1.txt         - this files contain 34732 words  list2.txt         - this files contain 272 words  I want to remove all words from list1.txt that spears from list2.txt  what the best approach to do that ( both files include only one field )  more list1.txt  dweferf fr grgr gefyh fergtrg ggtgg fergth gtg . . .  more list2.txt  dweferf fr frgrgggb rggtgtrgrt fergtrg rfergrtg fwed4  . . .

I have two lists, a complete list and a partial list. I want a bash script that will search the complete list for any lines that are in the partial, if there are, they will be removed from the complete list. Can anyone help?


Check the following screenshot from CS meta:    It says,      Take the tour and earn your first badge   Clicking the button redirects to the tour page of the main site and scrolling it doesn't change anything in the meta. Which is obvious as the badge informed doesn't exist on meta, unlike the main SE sites. However, this phenomenon is true for other sites as well. Is it a developer oversight?

I just joined Sports, and I decided to take a look on Sports Meta. I clicked on my profile there. This is part of what I saw:     Yet the profile shouldn't indicate that it is, in theory. . .  This seems to be a bug.


I'm stuck on this. I'm doing a dynamic form in jQuery and I want to add a remove button which is dynamically created when I click on a Add new tasks.  So there is my JS script. First one is the Add new tasks button:-  $("#bttn-add").click(function(){                 $("#bttn-add-function").before(             '
'+                 '
'+                     'Función a desarrollar *'+                     '<input class="form-control" type="text" placeholder="Función a desarrollar" maxlength="200" required>'+                 '
'+                 '
'+                     'Tarea principal en esta función *'+                     '<textarea class="form-control"  placeholder="Enumere las funciones de su puesto de trabajo comenzando por las más representativas, así como las tareas necesarias para el cumplimiento de las mismas" rows="3" required></textarea>'+                 '
'+                 '
'+                     '<button class="button btn-danger" type="button"></button>'+                 '
'+             '
'         );  });   And then, the snippet for adding a behavior to the Delete button which doesn't work:-  $("button .btn-danger").click(function(){    console.log($(this).parent()) })    Note: it works with the "Add new Tasks" button but "Delete"

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I have two questions:  1. Which one is determined first: (i) Random variable's values, (ii) the random experiment?  For instance  link says the following:     Suppose a variable X can take the values 1, 2, 3, or 4.       The probabilities associated with each outcome are described by the following table:   Outcome     1   2   3   4 Probability 0.1 0.3 0.4 0.2      The probability that X is equal to 2 or 3 is the sum of the two probabilities: P(X = 2 or X = 3) = P(X = 2) + P(X = 3) = 0.3 + 0.4 = 0.7. Similarly, the probability that X is greater than 1 is equal to 1 - P(X = 1) = 1 - 0.1 = 0.9, by the complement rule.   Which means, the values of Random Variables are decided first which is very unusual.  2. Can a Random Variable take random values?  For instance, can we roll a die and a random variable associated with it take on,  X = {99, 0, 100, 1, -35, 2.4} ?

What do they mean when they say "random variable"?


The spell  reads:  Choose one creature, object, or magical effect within range. Any spell of 3rd level or lower on the target ends. For each spell of 4th level or higher on the target, make an ability check using your spellcasting ability. The DC equals 10 + the spell's level. On a successful check, the spell ends.  The Cleric's  feature reads:  At 2nd level, you gain the ability to channel divine energy directly from your deity, using that energy to fuel magical effects.  Am I correct in my understanding that Dispel Magic would have no effect when targeting a magical effect caused by Channel Divinity because Channel Divinity is not a spell? As linked by Peter Duniho  seems to answer my question well.

In D&D 5e, the spell Dispel Magic says     Choose one creature, object, or magical effect within   range.    The rest of the spell description explains that spells "on the target" of a level lower than that at which Dispel Magic was cast automatically end, and those of a higher level require a check.  This makes perfect sense when targeting creatures or objects which may have spells on them. But what does it mean to target a magical effect?  Does it mean that you can choose to target just one specific ongoing spell effect instead of stripping the whole shebang (clearing a negative spell from an ally with positive spells also in place, or a positive spell from an enemy who is under attack from a negative spell)?  Or, is this only for the special case of certain spells (like Imprisonment) which have effects which specifically mention being targeted by Dispel Magic, and since no effect is described otherwise? (This is a literal reading: a spell is a magical effect, but does not have spells on it, so the Dispel Magic effect has nothing to act on.)  Or — and I think this is a stretch — can magical effects which are not spells be dispelled by Dispel Magic? If so, what are the mechanics?


I get the error ! pdfTeX error (ext4): \pdfendlink ended up in different nesting level than \pd when trying to compile. I'm on texlive/texmaker on Linux. It was compiling fine before I added another source in bibtex, now it craps out. I've tried deleting the sources I entered, didn't work. I tried deleting all files apart from the .tex and .bib files I use to compile - still same error.

I ran into the "mysterious"  \pdfendlink ended up in different nesting level than \pdfstartlink   error.  According to , "this happens when hyperref is used under pdftex and a citation splits across a page boundary".  The given solution is to manual fix the citation to not split across the page boundary.  However, this workaround isn't feasible for me, as the documents are automatically generated on a server with no user interaction.  Is there any solution to the problem known, perhaps an experimental hyperref action or a patch to pdftex?  (Probably, one could use luatex to solve the problem, but for other reasons, luatex is not an option in this project.)  MWE:  \documentclass[%draft               ]{article} \usepackage{hyperref} \setlength{\textwidth}{3cm} \setlength{\textheight}{3cm}  \begin{document} Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna \href{http://www.tug.org/errors}{aliquyam erat, sed diam voluptua.} \end{document}


Let $p(z)=z^n+a_{n-1}z^{n-1}+\dots+a_0$.  Prove that if $p(z)\neq z^n$, then there is $z_0$ on the unit circle such that $|p(z_0)|>1$.  Hint: Consider $q(z)=z^np(1/z)$.  I have really been messing around with $q(z)$, I have considered the case when $|z|=1$ (since that would put $z$ on the unit circle.  I have done many other things, tried Triangle Inequality, Lower Triangle Inequality, etc.  I just can't seem to find the required clever step to solve this.  I am only looking for a hint, please, as this is a homework problem.  By hint, I mean a tad bit more of a hint than the one that is given in the problem.  Thanks

Given a polynomial $ P(z) = z^n + a_{n-1}z^{n-1} + \cdots + a_0 $, such that   $\max_{|z|=1} |P(z)| = 1 $      Prove: $ P(z) = z^n $      Hint: Use cauchy derivative estimation    $$ |f^{(n)} (z_0)| \leq \frac{n!}{r^n} \max_{|z-z_0|\leq r} |f(z)| $$ and look at the function $ \frac{P(z)}{z^n} $     It seems to be maximum principle related, but I can't see how to use it and I can't understand how to use the hint.


How do I get some space back? I have no space.  Edit: Clarification, I did run at least a few different Conda environments, could then be the source of this tmpfs files ?  Filesystem      Size  Used Avail Use% Mounted on udev             15G     0   15G   0% /dev tmpfs           3.0G  920K  3.0G   1% /run /dev/sda1        49G   47G  2.0G  96% / tmpfs            15G     0   15G   0% /dev/shm tmpfs           5.0M     0  5.0M   0% /run/lock tmpfs            15G     0   15G   0% /sys/fs/cgroup /dev/loop0       98M   98M     0 100% /snap/google-cloud-sdk/126 /dev/loop1       55M   55M     0 100% /snap/core18/1705 /dev/loop2       94M   94M     0 100% /snap/core/8935 /dev/loop3       99M   99M     0 100% /snap/google-cloud-sdk/127 /dev/sda15      105M  3.6M  101M   4% /boot/efi

When administering Linux systems I often find myself struggling to track down the culprit after a partition goes full. I normally use du / | sort -nr but on a large filesystem this takes a long time before any results are returned.  Also, this is usually successful in highlighting the worst offender but I've often found myself resorting to du without the sort in more subtle cases and then had to trawl through the output.  I'd prefer a command line solution which relies on standard Linux commands since I have to administer quite a few systems and installing new software is a hassle (especially when out of disk space!)


I was looking into the HTML forms of Stack Overflow and I realized that it doesn't use AntiForgeryToken. So I created a localhost page with the forms of Stack Overflow, posted something and it worked.  So, why doesn't Stack Overflow use it?

I am a bit reluctant to ask this question since it may appear sinister (or that it may belong to SO), but my curiosity has peaked: I'm wondering what the "fkey" does that gets sent with a new comment.  I  some forms of session hijacking. I would like to understand how that process works. Is the "fkey" an example of this? I don't need or want a detailed description of what SO does with the "fkey"; I would like an overview of the technical aspects of such security a technique (if my assumptions are correct) and any further reading.  Perhaps this question is better suited for SO, but it seems as relevant to SO as it is to the backdrop of the topic.


I am running the latest version of ubuntu (18.04.1) and the TP link T6E PCI-E wifi card is not working. I do not have the ability to run a wired connection to my computer. I have no idea where to even start I am just starting to learn linux.

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


If I were to draw 4 quadrants of circle inside a square, with each right angle being the angle between the arms of the quadrants, what will be the area of intersection.   Now I've tried this a few times and there's no way to find the area of the inner squarish figure which occurs twice in the intersection.   Finally, a preemptive apology, I am just a 15-year old who is a semi-Maths enthusiast who is unaware of proper terminologies.  The diagram (pardon, sire for 'tis drawn by me):

Let the centers of four circles with the radius  $R=a$ be on 4 vertexs a square with edge size $a$. How calculate the shaded area in this picture?


Ubuntu 16.04LTS -> 18.04LTS upgrade failure Yes it was a long in the tooth install. But it finally got a release upgrade.  Since then I haven't been able to get apt to install anything much looking for dosemu but has no targets, and update spews errors about InRelease not containing bionic. W: Skipping acquire of configured file 'bionic/cnf/Commands-amd64' as repository                                          'http://archive.ubuntu.com/ubuntu focal InRelease' doesn't have the component ' #------------------------------------------------------------------------------# #                            OFFICIAL UBUNTU REPOS                             # #------------------------------------------------------------------------------#   ###### Ubuntu Main Repos deb http://au.archive.ubuntu.com/ubuntu/ focal bionic main restricted universe multiverse deb-src http://au.archive.ubuntu.com/ubuntu/ focal bionic main restricted universe  ###### Ubuntu Partner Repo deb http://archive.canonical.com/ubuntu focal bionic partner deb-src http://archive.canonical.com/ubuntu focal bionic partner deb http://archive.ubuntu.com/ubuntu focal bionic main # auto generated by ubuntu-release-upgrader  deb http://in.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe deb-src http://in.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe  deb http://in.archive.ubuntu.com/ubuntu/ focal-security main restricted universe deb-src http://in.archive.ubuntu.com/ubuntu/ focal-security main restricted universe  deb http://in.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe deb-src http://in.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe   The google-fu gives all sorts of strange answers, but nothing I can find fixes this issue. Regards, A

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


Considering the following complex random vectors (Complex Gaussian random variables): \begin{align} \textbf{h} &= [h_{1}, h_{2}, \ldots, h_{M}]^{T}\ \ \sim \mathcal{CN}(\textbf{0}_{M},d\textbf{I}_{M \times M}),  \\ \textbf{w} &= [w_{1}, w_{2}, \ldots, w_{M}]^{T} \sim \mathcal{CN}(\textbf{0}_{M},(\frac{1}{p})\textbf{I}_{M \times M}),  \\ \textbf{y} &= [y_{1}, y_{2}, \ldots, y_{M}]^{T}\ \ \ \sim \mathcal{CN}(\textbf{0}_{M},(d + \frac{1}{p})\textbf{I}_{M \times M}),  \end{align}  where $\textbf{y} = \textbf{h} + \textbf{w}$ and therefore,  $\textbf{y}$ and $\textbf{h}$ are not independent.   I'm trying to find the following expectation:  $$\mathbb{E} \left[ \frac{\textbf{h}^{H} \textbf{y}\textbf{y}^{H}   \textbf{h}}{ \| \textbf{y} \|^{4} } \right]$$   where $\| \textbf{y} \|^{4} = (\textbf{y}^{H} \textbf{y}) (\textbf{y}^{H} \textbf{y}$).  In order to find the desired expectation, I'm applying the following approximation:  $$\mathbb{E} \left[ \frac{\textbf{x}}{\textbf{z}} \right] \approx \frac{\mathbb{E}[\textbf{x}]}{\mathbb{E}[\textbf{z}]} - \frac{\text{cov}(\textbf{x},\textbf{z})}{\mathbb{E}[\textbf{z}]^{2}} + \frac{\mathbb{E}[\textbf{x}]}{\mathbb{E}[\textbf{z}]^{3}}\text{var}(\mathbb{E}[\textbf{z}])$$  However, applying this approximation to the desired expectation is time consuming and prone to errors as it involves expansions with lots of terms.  I have been wondering whether it is possible or not to use Mathematica to find the desired expectation.  Would it be possible?  $\textbf{UPDATE 21-04-2018}$: I've created a simulation in order to identify the pdf shape of the ratio inside of the expectation operator and as can be seen below it seems much like the pdf of a Gaussian random variable. Additionally, I've also noticed that the ratio results in real valued terms, the imaginary part is always equal to zero.  Is there another kind of approximation that can be used to find the expectation (one analytical/closed form result and not only the simulated value of the expection) given that the pdf looks like a Gaussian and probably can be approximated as such?      $\textbf{UPDATE 24-04-2018}$: I've found an approximation to the case where $\textbf{h}$ and $\textbf{y}$ are independent.  $$\mathbb{E} \left[ \frac{\textbf{h}^{H}_{l} \textbf{y}_{k} \textbf{y}^{H}   _{k} \textbf{h}_{l} }{ \| \textbf{y}_{k}  \|^{4} } \right] = \frac{d_{l}[(M+1)(M-2)+4M+6]}{\zeta_{k}M(M+1)^{2}}$$  where $\zeta_{k} = d_{k} + \frac{1}{p}$, $\textbf{h}_{l} \sim \mathcal{CN}\left(\textbf{0}_{M},d_{l}\textbf{I}_{M \times M}\right)$ and $\textbf{h}_{k} \sim \mathcal{CN}\left(\textbf{0}_{M},d_{k}\textbf{I}_{M \times M}\right)$. Note that $\textbf{y}_{k} = \textbf{h}_{k} + w$ and that $\textbf{h}_{k}$ and $\textbf{h}_{l}$ are independent.  I have used the following approximation: $$\mathbb{E} \left[ \frac{\textbf{x}}{\textbf{z}} \right] \approx \frac{\mathbb{E}[\textbf{x}]}{\mathbb{E}[\textbf{z}]} - \frac{\text{cov}(\textbf{x},\textbf{z})}{\mathbb{E}[\textbf{z}]^{2}} + \frac{\mathbb{E}[\textbf{x}]}{\mathbb{E}[\textbf{z}]^{3}}\text{var}(\mathbb{E}[\textbf{z}]).$$

Considering the following random vectors:  \begin{align} \textbf{h} &= [h_{1}, h_{2}, \ldots, h_{M}]^{T} \sim \mathcal{CN}\left(\textbf{0}_{M},d\textbf{I}_{M \times M}\right),  \\[8pt] \textbf{w} &= [w_{1}, w_{2}, \ldots, w_{M}]^{T} \sim \mathcal{CN}\left(\textbf{0}_{M},\frac{1}{p}\textbf{I}_{M \times M}\right),  \\[8pt] \textbf{y} &= [y_{1}, y_{2}, \ldots, y_{M}]^{T} \sim \mathcal{CN}\left(\textbf{0}_{M},\left(d + \frac{1}{p}\right)\textbf{I}_{M \times M}\right), \end{align}  where $\textbf{y} = \textbf{h} + \textbf{w}$ and therefore,  $\textbf{y}$ and $\textbf{h}$ are not independent.   I'm trying to find the following expectation:  $$\mathbb{E} \left[ \frac{\textbf{h}^{H} \textbf{y}\textbf{y}^{H}   \textbf{h}}{ \| \textbf{y} \|^{4} } \right],$$   where $\| \textbf{y} \|^{4} = (\textbf{y}^{H} \textbf{y}) (\textbf{y}^{H} \textbf{y}$).  In order to find the desired expectation, I'm applying the following approximation:  $$\mathbb{E} \left[ \frac{\textbf{x}}{\textbf{z}} \right] \approx \frac{\mathbb{E}[\textbf{x}]}{\mathbb{E}[\textbf{z}]} - \frac{\text{cov}(\textbf{x},\textbf{z})}{\mathbb{E}[\textbf{z}]^{2}} + \frac{\mathbb{E}[\textbf{x}]}{\mathbb{E}[\textbf{z}]^{3}}\text{var}(\mathbb{E}[\textbf{z}]).$$  However, applying this approximation to the desired expectation is time consuming and prone to errors as it involves expansions with lots of terms .  I have been wondering if there is a more direct/smarter way of finding the desired expectation.  $\textbf{UPDATE 21-04-2018}$: I've created a simulation in order to identify the pdf shape of the ratio inside of the expectation operator and as can be seen below it seems much like the pdf of a Gaussian random variable. Additionally, I've also noticed that the ratio results in real valued terms, the imaginary part is always equal to zero.  Is there another kind of approximation that can be used to find the expectation (one analytical/closed form result and not only the simulated value of the expection) given that the pdf looks like a Gaussian and probably can be approximated as such?


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

On duplicate questions, I often see different headings for the duplicate question list. These include:     Possible Duplicate:    [duplicate question list]   and      This question already has an answer here:    [duplicate question list]   and more recently,     This question is an exact duplicate of:    [duplicate question list]   What decides which heading is placed before the duplicate question list?


Using LIKE is very common in MySQL. We use it like this: WHERE field LIKE '%substring%'. Where we have a substring and field has full string. But what I need is something opposite. I have substrings in field. So, I want that row which contains a substring of my string. Suppose the table is:  ----+-------------------  id | keyword ----+-------------------   1 | admission ----+-------------------   2 | head of the dept ----+-------------------   and I have a string from user: Tell me about admission info. I need such a MySQL query that returns admission as this is a substring of user string. Something like:  SELECT keyword FROM table WHERE (keyword is a substring of 'Tell me about admission info')   thanks in advance.

LIKE operator in MySql is used to find rows that contain our query text, for example:  select name from user where name like "%john%"   which will return John Smith, Peter Johnson etc.  What if I need the opposite - to find rows that are CONTAINED in our query text? For example I give it John Smith and Peter Johnson are best friends and want it to find me all names from the table that could be found in this string.  How to do that?


A point 'P' is picked uniformly at random inside a regular hexagon. Find the probability that the point P is closer to the centroid than the sides.  I came to know from this site that if that's a equilateral triangle, the formula is =3^(-1)–3^(-2)–3^(-3) But how can I use this formula when the figure is regular hexagon ?

My friend gave me this puzzle:     What is the probability that a point chosen at random from the interior of an equilateral triangle is closer to the center than any of its edges?      I tried to draw the picture and I drew a smaller (concentric) equilateral triangle with half the side length. Since area is proportional to the square of side length, this would mean that the smaller triangle had $1/4$ the area of the bigger one. My friend tells me this is wrong. He says I am allowed to use calculus but I don't understand how geometry would need calculus. Thanks for help.


No matter what I do, I can't seem to get json_encode to work on returned results from my fr column.  Here is an export of my table:  mctrivia.com/language.zip  I set everything to utf8mb4 as suggested by my googling this problem but no luck.  If $language is 'en' and $fileID=1 this works. If $language is 'fr' and $fileID=1 this fails.  Either way the print_r gives proper results. The echo is showing null with fr.      //get list of words in current language file     $query='SELECT `key`,`' . $language . '` FROM `language` WHERE `file`=' . $fileID;     $stmtGetWords = $conn->prepare($query);     $stmtGetWords->bind_result($wordID,$text);     $stmtGetWords->execute();     $wordList=array();       while ($stmtGetWords->fetch()) {         $wordList[$wordID]=$text;     }     print_r($wordList);     $stmtGetWords->close();      //create json file data     $fileData=json_encode($wordList);     echo '
'. $fileData . '
';   Results from language en:  Array ( [lang] => English [subPage1Intro] => Welcome to sub page 1. )  {"lang":"English","subPage1Intro":"Welcome to sub page 1."}   Results from language fr:  Array ( [lang] => Fran�ais [subPage1Intro] => Bienvenue � sous page 1. )

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


Drawing cards both with and without replacement and finding probability of drawing Ace of Spades.  What would that be for the two specific cases below?  1) Randomly draw cards from a standard deck of cards WITHOUT replacement. What is the probability that the last card drawn is the Ace of Spade?  2) Randomly draw cards from a standard deck of cards WITH replacement. What is the probability that the 40th card drawn is Ace of Spade?

We had this question arise in class today and I still don't understand the answer given. We were to assume that drawing cards are independent events. We were asked what the probability that the second card drawn is a queen if we take two from the deck. The answer given was 4/52, which seems counter-intuitive to me. How is the probability still 4/52 if there was a card drawn before it? What if the first card drawn was a queen?


I need to show the following: let $\phi$ be a linear function $V \rightarrow V$, $V$ with finite dimensions and with $\phi^*$ as adjoint function, than $\phi$ is normal if and only if there is a polynomial $f$ so that $$f(\phi)=\phi^*$$   can you help me out?  Here is normal as $\phi \circ \phi^*=\phi^*\circ\phi$ to intend. Thank you

Suppose that $T\in \mathcal L (V)$. prove that T is normal iff there exists a polynomal $f(x) \in \Bbb C [x] $ s.t $T^* = f(T)$  $(\Leftarrow) $ notice that $T^* T= f(T) T = T f(T) = T T^* $ as T commutes with a polynomail in T.  $(\Rightarrow ) $ Let $ v_1 , \cdots , v_n $ be an orthonormal basis for T.  $$ p(x) = \sum_{i=0}^{k} a_i x^{i} $$ $$ p(T) = a_0 I + a_1 T + \cdots + a_k T{k} $$ $$p(T)v_j = a_0 v_j + a_1 \lambda_{i} v_j  + a_2 \lambda_{i}^2 v_j \cdots + a_k \lambda_{i}^{k} v_j $$ $$ = p(\lambda_i) v_j $$ $$ =\bar {\lambda_{i}} v_{j} $$ $$= T^{*} v_j  $$


How can we use ago with Past perfect? Are below lines correct?  The boy’s father had separated from the family many years ago while his mother worked as a gardener in Mukesh’s school.  Above lines taken from below link of Times of India article. 8/may/2018.

As a non-native speaker but a teacher of the English language I've come across the following question reading a pupil's report: Should she use the simple past or past perfect in her sentence?     Last week we came back from a class trip to New York. We planned (OR) had planned that trip half a year ago.   (meaning: half a year before NOW)   Although we teach that ago is a signal word for simple past, I would go for past perfect here, since the action of the second sentence clearly takes place before the first one and before the rest of what the report is about (the class trip itself).  How would a native speaker put it?


I saw a previous proof on this site that addresses this question, but the proof leaves off with a number of form $4k-1$ can't divide $t^2+1$. Why is this? Thanks.

Find all solutions of the equality $y^2=x^3+23$ for integers $x,y$   I guess, that x cannot be even. because we can apply mod 4 test  say $x=2k$ then $y^2=8k^3+23\equiv3\mod(4)$   but, this is not possible, since the square of an integer is congruent to $0$ or $1$ $\mod (4)$  so $x$ is of the form $4k+3$ or $4k+1$  $x=4k+3$ is also not possible for the same reason but for the last case the test fails.  any hints ?


Let $(a_n)$ a sequence of positive terms, show that  if $\lim\limits_{n\rightarrow\infty} {a_{n+1}\over a_n}$ exists, then so does $\lim\limits_{n\rightarrow\infty}\root n\of{a_n}$ and the two limits are equal.

Both the ratio test and the root test define a number (via a limit).  If both limits exist (and shows that the series is convergent), what (if any) is the relation between the 2 numbers ? are they equal ?  What is the relation (if any) between them and the original series (other than the fact that they say the series is convergent) ?


Often, a paper is submitted to a journal, rejected, then sent to a different journal. Each journal has different style guides. In theory, changing the style should be as easy as changing the document class. But in practice, this is never that easy. Each journal has several peculiarities such as: how exactly the author names are specified, how keywords are specified, whether "cite" or "citep" or "citeN" should be used for citations, etc.   After doing such technical changes manually several times, I wonder: are there any automatic converters that take a LaTeX file in e.g. the format of e.g. ACM/Springer/Elsevier, and converts it to the format required by a different publisher?

In most cases one does not write papers for one journal exclusively. Changing your code to match all specifications takes a lot of afford and time. There is a wide variety of question referring to this topic        Going through the comments it looks pretty hopeless to find »One Package To Rule Them All«. Licences and changing templates make it nearly impossible to maintain all of those templates in one class or package.  Point is, are there some sort best practices to save time writing articles for different journals?


I have this given problem:  In a class there is 6 students,every 2 students of 6 know each other in advance or they don't.  Show that there is 3 students that don't know each other in advance or that there is 3 that know each other in advance.  This problem looks simple but when i try to write a solution for it i'm confused if it's enough or not, here is my attempted:  Case (every two students know each other in advance):  Let $G=(V,E)$ be a graph with $|V|=6$ vertices ,to represent this case the number of edges in this graph should be $|E|=3$. By using the pigeon hole principle we want to place $|V|=6$ pigeons(vertices) in $|E|=3$ holes(edges) where at each hole there is exactly 2 pigeons.  if we choose a pigeon(vertex) $u\in{V}$ at hole $a\in{E}$ then this ensures that there is 3 other vertices in different holes that are unreachable from $u$.  Is this solution correct or even enough? for the second case i'm planning to use the same reasoning but I plan to let the vertices be the holes ,and edges for the pigeons.

Prove that in any group of 6 people there are always at least 3 people who either all know one-another or all are strangers to one-another.  Hint: Use the pigeonhole principle.  I don't see how this applies to the pigeonhole principle because I keep imagining a group of 4 strangers, and then 2 friends. This would be 6 total but against what the proof is asking. Maybe I don't understand the proof in question...


Is it possible to publish independent research paper without any academic or industrial affiliation in a reputed journal?

Financial terms, content quality, etc, is not a problem. The author has a contribution that will significantly impact the advancement of human knowledge about a particular topic.  Can anyone submit a paper? Or does it require some affiliation with a larger group such as an educational/governmental/corporate institution?  I am talking about journals of such clout as the Journal of Fluid Mechanics, Physics of Fluids, etc.


I'm looking for proof that  Let $a_{0},a_{1}>0$,and such $$a_{n+2}=\dfrac{2}{a_{n+1}+a_{n}}$$  show that: there exist $\lambda,c>0$ such $$|a_{n}-1|\le c\lambda ^n,\lambda\in (0,1)$$  I tried using induction, but i'm not sure how it would work ,Thanks in advance.


I ran chown -R <user> /usr/bin in arch thinking I could easily fix it if anything went wrong. Unfortunately, that has proven to be incorrect.  As a result of this, startx won't run i3 automatically at startup, ping won't work, and loading webpages seems really slow.  I am able to get sudo working by running chown root /usr/bin/sudo && chmod 4755 /usr/bin/sudo, but giving root recursive ownership of /usr/bin doesn't seem to reverse the effects of my chmod.  How can I reverse this?

I accidentally run the following command as root chown mike -Rf / backups the point is that I added a space between / and backups my mistake, I stopped the command after 1-2 seconds, how can I recover from this? I have problems with DirectAdmin right now for example when accessing it I recive the error:  Unable to determine Usertype user.conf needs to be repaired http://help.directadmin.com/item.php?id=456   Or I stopped recieving emails, I dont even know what else is messed up right now...


I have a scene full of linked objects from other blender files. How do I clay render the scene with linked objects in blender 2.80?

I have a collection that contains linked assets. I would like to override their materials and give them a unique material. Is it possible to assign a material to a whole collection, and how ?  Thanks !


For example, I have two projects sharing some functions, let's say them A and B. So I create another library project C, containing the public code. I put the common code in a class, but in the class, not all the methods are used in both projects. Some of them are only used in A, some only used in B and the rest are used in both of them.  Now, after compiling, I got A.exe, B.exe and C.dll. What I want is:   I don't want the dll, just want A.exe and B.exe I don't want methods only used in A.exe appears in B.exe, and vice versa.   Merging the dll and exe can solve the problem 1, but how about 2?

I am not too familiar with .NET desktop applications (using ). Is it possible to have the entire application run from a single .exe file?


It is well-known that $R=k[x^2,x^3]$ is not a UFD, since $x^2x^2x^2=x^3x^3$ are two different decompositions of $x^6$ to irreducibles.  Question 1: Are $A=k[x^2,x^3+x]$ and $B=k[x^3,x^2+x]$ UFD's?  It seems to me that they are, but I have not found a proof (or a counterexample).  Question 2: If $A$ and $B$ are UFD's, is it because one of the generators ($x^3+x$ or $x^2+x$) is separable (=have different roots)? In $R$ both generators are not separable.  Thank you very much!

Let $f,g \in k[t]$, $k$ is a field of characteristic zero, $\deg(f)=n \geq 2$, $\deg(g)=m \geq 2$.     Is it possible to characterize all such $f$ and $g$ for which $k[f,g]$ is integrally closed in its field of fractions $k(f,g)$?   I do not mind to further assume that $k(f,g)=k(t)$ (but I do not want to assume that $k[f,g]=k[t]$, which makes my question trivial).  Thank you very much!  Edit: (i)  is relevant.  (ii) If also $k(f,g)=k(t)$, then being integrally closed is equivalent to $k[f,g]=k[t]$. Indeed: (a) If $k[f,g]=k[t]$ then $k[f,g]$ is integrally closed (since $k[t]$ is). (b) If $k[f,g]$ is integrally closed then, in particular, since $t \in k(t)=k(f,g)$ (= the field of fractions of $k[f,g]$) and obviously $t$ is integral over $k[f,g]$ (for example, $t$ is a root of $f(T)-f \in k[f,g][T]$) hence $t \in k[f,g]$, so $k[f,g]=k[t]$.  For example: $f(t)=t^2+1$, $g(t)=t^3-4t$. We have, $t= \frac{t(t^2-4)}{t^2+1-5}=\frac{g}{f-5}$, so $k(f,g)=k(t)$. By Abhyankar-Moh-Suzuki theorem, $k[f,g] \neq k[t]$, so $k[f,g]$ is not integrally closed. Similarly, for every $f,g$ such that $k(f,g)=k(t)$ and one of the degrees does not divides the other, then $k[f,g]$ is not integrally closed.  (iii) If also $k(f,g)=k(t)$ and $k$ is algebraically closed, then being integrally closed is equivalent to $H(t)=(f(t),g(t))$ is injective and $H'(t)=(f'(t),g'(t)) \neq (0,0)$ for every $t \in k$. Indeed, $k[f,g]=k[t]$ is equivalent to the new conditions (it is important that $k$ is algebraically closed!!).  Edit: What if we replace $k$ by an integral domain $D$ (which is a $k$-algebra)? See also  question.


I'm trying to install metatrader 4 but every time the installation process hangs up while trying to download the necessary files from internet. Seems that it cannot access at internet at all... why?  Here is the photo of the installer searching for an "access point" to download files.    I tried all possible solutions/ideas:   install the latest Wine version (1.9.x) install winetricks install the Microsoft Compatibility Layer install core fonts with winetricks vcrun6 command install an older version of the metatrader4   Nothing works... I'm crying...

I am trying to install  under Wine. The program setup continually requests proxy settings. My broker tells me this shouldn't happen, and is a problem on my end. Here is what I have tried to attempt to solve this error:   I have gone into Network settings and proxy is set to none. I have looked in Wine Regedit and proxy_enable is set to 0. I have checked the firewall settings on my modem. I have tried reinstalling wine. I have installed lib32nss-mdns I can log on to my modem in iexplore using the gateway ip but thats it I've set my DNS to 10.0.0.138 to reflect the gateway I've set up a 32 bit Wine prefix   How should I proceed in solving this?


I was just going through some of the lectures of angular momentum where it was defined as  Conservation of angular momentum, one of the fundamental laws of physics, observes that the angular rotation of a spinning object remains constant unless acted upon by external torque.  But I found quite a decent example that contradicts this. Consider a bullet (point mass) having a velocity that strikes a coin on its edge.The coin will definitely start spinning!! If the bullet(being a point mass) had no angular momentum then how could it transfer it to the coin? Please suggest how can I understand this..

I am not a physicist (math/comp-sci) but I understand that Angular Momentum is supposed to be conserved.  I find this confusing because there seems to be many simple, common cases where a restrained, revolving body, when released seems to lose it's angular momentum.  For example, let's say that a hammer thrower is revolving a 10kg hammer around herself at a 1 meter distance from their combined center of mass every second.  Taking the hammer as a point-mass, then before release, the hammer and the thrower each have an angular momentum of      $l\omega = (mr^2)*(2\Pi) = (10*1*1)*(2*3.14..) =~ 62.8 kg\text{-}m^2/s$   Now, after the hammer is released, the thrower still has her same angular momentum (also 62.8), but the hammer no longer seems to have any.  Yes, I know that the hammer is still rotating (spinning) as it did when it was revolving around the thrower, so that angular momentum seems to be conserved, but the angular momentum from revolution (orbiting) seems to be gone.  AFAIK, it's not transferred to it's spin angular momentum (observation seems to bear this out).  Nor is it transferred to the thrower.  Besides having no mechanism for this (she let go of it), if it did, we would have noticed hammer throwers being knocked over by having their angular momentum suddenly doubled.  So where does it go?  Or is it not actually conserved in this case?


In minecraft, there are many pets you can tame, in mostly different biomes. If you bring one of your pets that is already tamed to your base, can you somehow transfer ownership of the pet to one of the other players in your game?

I have successfully tamed 4 wolves but of course my friends aren't able to "use" them. Is there any way to transfer ownership to other players?  I asked a friend of mine to feed two of them so that at least the baby wolf could be used by him, but even doing this the newborn is only usable by me


I am planning to use adapter for dslr prime/zoom lenses from Nikon/Canon with Sony Mirrorless A7iii camera. Will this impact the quality photos taken? Will it be advisable to go for Sony E mount prime/zoom lenses rather than using adapter.

I've got some lenses of brand X, but I've just got a new camera of brand Y. How can I tell if it's possible to use my lenses on my camera? I accept that I may lose a lot of automatic functionality like autofocus, aperture control and metering when using an adapter to connect the two.


Ok so I have a table of components and a colleague needs some data from this table in a different format, now I could do it with some python or java code but wondered if there is a simpler way in MS-SQL with a PIVOT maybe?  Components Table:-  ID_RECIPE  COMPONENT    QTY    1          CPA       1.00    1          CPC       0.50    2          CPA       10.0    2          CPF       7.50    2          CPH       3.00    2          CPJ       2.25    2          CPP       0.25   There is never more than 5 components to a recipe so I want to be able to output something like this:-  ID_RECIPE  COMP_1  COMP_2  COMP_3  COMP_4  COMP_5  QTY_1  QTY_2  QTY_3 QTY_4  QTY_5    1        CPA     CPC     NULL    NULL    NULL   1.00   0.50   NULL  NULL   NULL    2        CPA     CPF     CPH     CPJ     CPP    10.00  7.50   3.00  2.25   0.25             Any ideas would be appreciated.

I have a SQL Server instance that has a linked server to an Oracle server. There is a table on the Oracle server called PersonOptions which contains the following data:  ╔══════════╦══════════╗ ║ PersonID ║ OptionID ║ ╠══════════╬══════════╣ ║        1 ║ A        ║ ║        1 ║ B        ║ ║        2 ║ C        ║ ║        3 ║ B        ║ ║        4 ║ A        ║ ║        4 ║ C        ║ ╚══════════╩══════════╝   I need to pivot that data so the results are:  ╔══════════╦═════════╦══════════╦══════════╗ ║ PersonID ║ OptionA ║ Option B ║ Option C ║ ╠══════════╬═════════╬══════════╬══════════╣ ║        1 ║       1 ║        1 ║          ║ ║        2 ║         ║          ║        1 ║ ║        3 ║         ║        1 ║          ║ ║        4 ║       1 ║          ║        1 ║ ╚══════════╩═════════╩══════════╩══════════╝   Any suggestions?


So:  //aValue = 4.45 //bValue = 4.35 //maxValueDiff = 0.1 //The absolute value of a - b = 0.1  if( Math.abs(aValue - bValue) <= maxValueDiff ) return true; logger.info("valueDiffCheck a:" + aValue +" b:"+ bValue + " e1:" + maxValueDiff);   Why do I see this in my logs:  valueDiffCheck a:4.45 b:4.35 e1:0.1   Suspect this is because Double is a double pain with it's inaccuracies but if that were the case shouldn't I see that? Like it should print that 0.1 is actually 0.10000000111 or something? ...or is there something pesky about the printing format?  The target code is high performance with a LOT of data so we don't want to use BigDecimal. What's the next best thing to ensure that 0.44 is 0.44?   OK let me state unequivocally that we only need two decimal places. The accuracy involved in using BigDecimal is major overkill.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I'm trying to understand the difference in variable declaration of a class inside or outside of a constructor. In this case creating the list for grades. To me, the below achieves the same result so which would be recommended and is there any reason why I should do one or the other? I have one way commented out and the other not.  class Book {     //List<double> grades;     List<double> grades = new List<double>();     public Book()     {         //Why not declare it here?         //grades = new List<double>();     }      public void AddGrade(double grade)     {         grades.Add(grade);     } }

I've been programming in C# and Java recently and I am curious where the best place is to initialize my class fields.  Should I do it at declaration?:  public class Dice {     private int topFace = 1;     private Random myRand = new Random();      public void Roll()     {        // ......     } }   or in a constructor?:  public class Dice {     private int topFace;     private Random myRand;      public Dice()     {         topFace = 1;         myRand = new Random();     }      public void Roll()     {         // .....     } }   I'm really curious what some of you veterans think is the best practice. I want to be consistent and stick to one approach.


I want to create bounding boxes around polygons, the bounding boxes will then be used in a ST_Hausdorffdistance to determain the squarness of every polygon. My first choice is using the ST_Envelope function but the problem with this is that all the envelopes are orientated to the north. The result is the following image.  The following image is how I would like it to look.  This is created with the Minimum bounding geometry tool in ArcGIS. Is there any possibilty to do this in PostGIS? I tried doing it with the Box2D function in PostGIS, but I can't seem to find the way to save the geometry to the geom column?

As you see in the figure,  the question is:    How to find the minimum-area-rectangle (MAR) fitted on the given points?    and a supporting question is:    Is there any analytical solution for the problem?    (A development of the question will be to fit a box (3D) to a cluster of points in a 3D point cloud.)  As a first stage I propose to find the convex-hull for the points which reforms the problem (by removing those points are not involved in the solution) to: fitting a MAR to a polygon.  The required method will provide X (center of rectangle), D (two dimensions) and A (angle).      My proposal for solution:     Find the centroid of the polygon (see )   [S] Fit a simple fitted rectangle i.e., parallel to the axes X and Y   you may use minmax function for X and Y of the given points (e.g., polygon's vertices)  Store the area of the fitted rectangle Rotate the polygon about the centroid by e.g., 1 degree Repeat from [S] until a full rotation done Report the angle of the minimum area as the result   It looks to me promising, however the following problems exist:   choose of a good resolution for the angle change could be challenging, the computation cost is high, the solution is not analytical but experimental.


I would like to know the difference between push and give a push when used in the conversation. Why people use the phrase, 'give a push' instead of the word, 'push'?  ex) walk=take a walk, shower=take a shower.

When do exactly we choose to use have or take? They look sort of having similar context     I have a bath      I take a bath   And by the way, I saw that      I take a chance   Can't be transformed to     I have a chance   Can it?   *Moreover, If there's a verb used like the bath, it means the bath is no more a verb but a noun right?  Also very important is that , can they be applied randomly to *a verb or a noun?  Like :  *  - I take a choose   Or    I take an option ( this one makes sense but I mean in the context of delexical verb)   ?  *EDIT: My mistake , bath is actually not "a verb transformed to a noun, but its absolutely a noun."  So my concerns would be if they can be used interchangeably? And be applied to random noun?


I can see from my firewall that apt is downloading packages using http. Considering this is an insecure protocol, how does apt verify the integrity of the downloaded package?

What security systems and processes are in place to prevent malicious third parties from hacking/compromising the security of code in the Debian mirrors, or to verify that the packages we get are in fact the ones the maintainers think they are?


Is it      "John is a friend of the Smith's."   or      "John is a friend of the Smiths."   ?   Thank you for your answer :)

As  shows, we nearly always use the possessive form of personal pronouns for friend of mine/his/ours/etc.  But when it comes to actual names, we prefer  without the possessive apostrophe. That preference is even more marked with, say, . Not that I think the usage itself is particularly American - it's much the same with .  Personally, I find friend of him grates. In general I've no strong feelings either way as to whether it's friend of Peter or friend of Peter's (though I deplore the possessive in ), but in line with many others, I really don't like the possessive in relation to things like countries.  Why is this?   Edit: Noting an apparent "progression" (pronoun -> person -> nation) marked by reduction in use of the possessive, I checked at a finer "granularity". NGram shows that although it does occur,  virtually "flatlines" against friend of mine. But the bias reduces through of you, of us, and by the time I get to  it's much less extreme. There seems to be something "egocentric" about the double possessive.  Presumably when babies learn to speak, they soon notice that possessive pronouns, possessive apostrophes, and the word "of", all do the same job. Parents would correct a child who says "of mine's", but probably wouldn't even notice the same "redundancy" in "of Peter's". Younger speakers are unlikely to even be talking about something "of America's". Perhaps as we mature we tend to discard the "double possessive" for the more "distant" things that only adults are likely talk about, but we keep it for "closer" people because that's how we spoke when we were younger.  EDIT2 I note that I'm a great fan of him is vanishingly rare compared to ...fan of his, but with ...fan (of John) the double possessive occurs far less often than ...friend (of John's). Usage seems to be affected by the noun before "of" as well as the one after it. This is getting complicated...


Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch http://ppa.launchpad.net/fossfreedom/packagefixes/ubuntu/dists/xenial/main/source/Sources  404  Not Found E: Failed to fetch http://ppa.launchpad.net/kroq-gar78/ppa/ubuntu/dists/xenial/main/source/Sources  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


I have a HTML like this:
This is something I want Google to crawl.

However, I don't want Google to crawl this
  Is it possible to do it on one page?

As a webmaster in charge of a tiny site that has a forum, I regularly receive complains from users that both the internal search engine and that external searches (like when using Google) are totally polluted by my users' signatures (they're using long signatures and that's part of the forum's experience because signatures makes a lot of sense in my forum).  So basically I'm seeing two options as of now:   Rendering the signature as a picture and when a user click on the "signature picture" it gets taken to a page that contains the real signature (with the links in the signature etc.) and that page is set as being non-crawlable by search engine spiders).  This would consume some bandwidth and need some work (because I'd need an HTML renderer producing the picture etc.) but obviously it would solve the issue (there are tiny gotchas in that the signature wouldn't respect the font/color scheme of the users but my users are very creative with their signatures anyway, using custom fonts/colors/size etc. so it's not that much of an issue). Marking every part of the webpage that contains a signature as being non-crawlable.   However I'm not sure about the later: is this something that can be done?  Can you just mark specific parts of a webpage as being non-crawlable?


My question is linked to  and expands on it a little. I experience the same behavior of Skype in a fresh install of Ubuntu 15.10. More specifically, when I start Skype immediately after booting into Ubuntu, it will most likely work all right, but if I turn it off at some later time, it will more often than not show up with a completely garbled up and unusable interface such as here (copying the image from the question linked above):    I also observe the same behavior with Clementine. If I open it immediately after starting an Ubuntu session, it will most likely show up ok:    but if I start it some time into the session, it will often display a completely broken interface:    I suspect this may have something to do with the fact that both Skype and Clementine may be using gtk2, and my Ubuntu install does not have some libraries required for proper rendering of these applications, but I am at a loss of how to diagnose the problem more precisely and fix it. Perhaps you could help?

Skype app in my Ubuntu system work perfectly. But today when I run the app, I see this:    How Can I fix this?


Currently, I am having a hard time collecting resources.    I am constantly attacked every time I'm without a shield. The losses of gold and elixir are huge: I can lose 50-80% of my resources in 2 attacks.  I always though that picking the resources would reduce my losses, but I'm no longer sure of this.  If I pick my resources, will it reduce any loss from attacks? Or there is absolutely no difference?

In Clash of the Clans, to minimize loss of resources when your base is attacked is it better to store loot in clan castle and not collect it? Also is it better to leave resources in elixir collectors/mines for as long as possible before collecting it (at what point is it necessary)?


All that empty space would be a great place to put the network-wide rep and badges, as appears in the flair.    This would fill the space, in addition to making it more in line with the regular site-specific profile.

Looking at your network profile, there is no number anywhere in your entire profile that has a sum of all your reputation across the network except for the flair page, which isn't always accurate because it's cached, and isn't exact because it rounds. Yet, there's so much empty space on the profile page.  My simple idea is to list the user's total reputation and badge counts below their Gravatar image like on any normal profile page across the network (keeping the rule of only accounts with over 200 reputation). It would make it incredibly easy to find and I wouldn't have to go search for myself on Area 51 to figure it out.


I've got a new Asus x550V notebook without OS preinstalled. The only thing on this laptop is FreeDos. For some reason Installation though USB stick does not working.   I followed all of the steps I found to try and get the usb drive to boot. I've change my Bios boot option priority to USB and it still does not give me the option to install though USB.   I can only enter Freedos. So I burned a DVD with a downloaded .ISO file from ubuntu. I changed my boot options to give the DVD ROM priority but it still does not want to install ubuntu. I always end up booting FreeDos.   Do I need some kind of command to start booting linux? I am sorry for my english, I am kinda frustrated.

On trying to install Ubuntu 12.10 Desktop amd64 to a desktop pc using a ga a75 ud4h motherboard (which is using an AMD 3870k APU with a new 1TB HDD) following the advice in the  and  have now got to grub option screen for EFI install. Booting live dvd in EFI mode gives "Secure Boot is not enabled" just before grub kernel option list shows.  If the option to "Install Ubuntu" or "Try Ubuntu without installing" is selected gives "can not read cd/0" and "the kernel must be loaded first" errors. Using DVD or USB installation media gives same results and there has never been at any point an UEFI entry in bios/firmware settings or boot device list/s. It might be helpful to say that have had an alternative non-linux OS installing EFI mode on this hardware giving a GPT installation automagically using USB installation media when the hdd space was completely unallocated space. The USB device was listed under hard drives in bios/firmware one time boot list and did not have an UEFI entry. i.e. it installed EFI although no EFI or UEFI entry was assigned to the device like what is shown in many tutorials regarding UEFI installs. The only constructive information regarding this question is found at  and  but can not work out the answer. Checking md5sum and sha256 checksums on downloaded .iso and used "Check disk for defects" to check burned .iso when booting DVD in BIOS mode. No errors found. "Check disk for defects" will not run (or any other options) when DVD booted in EFI mode. Due to trying different distributions as well as older and newer flavours of Ubuntu all giving similar results in that no options from grub option screen in EFI mode are bootable (if getting that far) as well as spending time searching Ubuntu Forums have come to conclusion the firmware on this system is hardcoded to handle Microsoft EFI files only. After installing Windows EFI mode here is a  and here is a link to a thread i started at  which may be helpful to others building a dual boot system. Installing BIOS mode and using Boot-Repair to install grub-efi is not a complete solution due to the inability of using installation media EFI mode for recovery and maintenance due to the "you need to load kernel first" and "can not read cd/files" errors as described when trying to boot installation media using EFI. Secure Boot is not an issue. Using msinfo32 from windows confirms Secure Boot is not supported on this hardware. How to edit kernel or load kernel for EFI install? = How to EFI install Ubuntu? PLEASE CONSIDER: This is not a dupe!  The linked question that is indicated to having a working answer does not have a working answer to "###How to edit kernel or load kernel for EFI install? = How to EFI install Ubuntu?" therefor the workaround of installing using BIOS then manually install grub-efi without renaming bootloaders which works to get Ubuntu booting using EFI or using boot-repair to do this (and many unnecessary "fixes" if recommended repair is not changed in advanced settings) also works.  This goes some way to confirming hardcoding of firmware is not stopping grub the boot manager seeing the vmlinuz.efi files in /casper on DVD.  I would like an answer to this so would like this question to be reopened.


Clearly for $G \approx \Bbb{Z}_2$ this is not true since $G = \{1, a\}$ and so the product equals $a$.  Was wondering what sufficient conditions are such that the product of all the group elements amounts to $1$.    For $G \approx \Bbb{Z}_3$ it's true since $G = \{1, a, b\}$ with $ab = 1$.  I'm a little lost as to how to proceed.  I think if each element pairs with an inverse distinct from it, then it's true that the product equals $1$.  But is there another way to state that, and is that a neccessary condition as well?  In addition, is it possible to cover all finite abelian groups by taking the product of the squares of all elements?

Suppose $G=\{a_1,...,a_n\}$ is a finite abelian group, and let $x=a_1a_2\dotsm a_n$.   Prove that if there is more than one element of order $2$ then $x=e$.   What I've done so far: (#1 is just for illustration, There should be at least $3$ such elements)   $G$ has an even number of elements with order $>2$ (They are paired so: $(a,a^{-1})$ ). And then there are $e$ and $\{b|o(b)=2\}$. Also, if $G$ has at least one element of order 2 then $|G|$ is even (Lagrange). Thus $|\{b|o(b)=2\}|$ must be odd. If there is exactly one element $b$ of order $2$ then $x=b$. That's because $G$ is abelian, and we can write: $x=e\cdot b\cdot(a_1 a_{1}^{-1}\dotsm a_n a_{n}^{-1})=b\cdot(e\dotsm e)=b$. If there are exactly $3$ such elements $a,b,c\in G$, then, as shown above, $x=abc$ and thus $x=e$ (That's because $(abc)^2=a^2b^2c^2=e$ which means $abc\in \{a,b,c,e\}$. If $abc=a$ then $b=c^{-1}=c$ which is false, same goes for $abc=b,abc=c$.)   I haven't managed to find a reason why the claim must hold for $5, 7, ...$ (i.e. All other odd integers). Does anyone have an idea?  Thanks in advance. Please excuse my English.  edit: Not a canonical answer but a simple one (if such even exists).


Why is it brighter at noon than at just after sunrise? Does it have something to do with the geometry of spheres? Or is it due to the atmosphere?

Why is 8 am (just after sunrise) darker than 12 pm (noon)? Does it have something to do with the geometry of spheres? Or is it due to the atmosphere?


Let $H$ be a complex Hilbert space. Let $T\in B(H)$ be such that $\langle T x,x\rangle = 0$ for all $x\in H$. Prove that $T=0$. Here $\langle\cdot,\cdot\rangle$ is the inner product, and $B(H)$ is the space of bounded linear operators. How do I show $T$ that is the $0$ operator? I thought of considering $x=au+bv$ in $H$ and then $$T(x)=T(au+bv)=aT(u)+bT(v)$$ Hints would be great.

This is exercise 10 in section 3.2 of Kreyszig's Introductory Functional Analysis with Applications:     (Zero Operator): Let $T:X \to X$ be a bounded linear operator on complex inner product space $X$. If $\langle Tx,x\rangle =0$ for all $x \in X$, show that $T=0$.    I had solved little kindly guide me further       Solution:   Let $\langle Tx,x\rangle =0$ for all $x \in X$. Let $x=u+av$ where $v,u$ belong to $X$ and $a$ be the scalar then  $$ \langle Tx,x\rangle =\langle T(u+av), u+av\rangle $$ since $T$ is linear then  \begin{align} \langle Tx,x\rangle &=\langle Tu+aTv, u+av\rangle \\     & =\langle Tu,u\rangle +\overline{a}\langle Tu,v\rangle +a\langle Tv,u\rangle +a\overline{a}\langle Tv,v\rangle \\     & =\overline{a} \langle Tu,v\rangle +a\langle Tv,u\rangle  \end{align}


I am working on an ERD which represents the relationships between entities in a Web development company behavioral model. There I have entities like:   Customer Service ----------- (like: web development, web design, web consultation, ...) Order-item ------- (like: web development, web design, web consultation, ...) Order Invoice Project Project-phase Task --------------- (like: web development task3, web design task7) Developer Delivery ----------- (like: the developed web app, web consultation session, ...)   I have this diagram so far, though I know it still has major problems, and it is just for a start point:    Main concept   Customer makes order-items on services, combined to form an order which relates to an invoice. Each project has multiple project-phases with each project-phase related to an order. Each project-phase has multiple tasks, each of which is assigned to a developer. Each project-phase has a delivery, which will be delivered upon payment of the related orders invoice.   Questions   Are has and contains completely the same? If not, how to choose between them for relationships?! what is the measure?! Are there any rational problems with the Main concept section? Any helpful ideas or suggestions to improve this model?   Any help with this, would be really appreciated.  Update  Final version of the diagram

I am working on an ERD which represents the relationships between entities in a Web development company behavioral model. There I have entities like:   Customer Service ----------- (like: web development, web design, web consultation, ...) Order-item ------- (like: web development, web design, web consultation, ...) Order Invoice Project Project-phase Task --------------- (like: web development task3, web design task7) Developer Delivery ----------- (like: the developed web app, web consultation session, ...)   I have this diagram so far, though I know it still has major problems, and it is just for a start point:    Main concept   Customer makes order-items on services, combined to form an order which relates to an invoice. Each project has multiple project-phases with each project-phase related to an order. Each project-phase has multiple tasks, each of which is assigned to a developer. Each project-phase has a delivery, which will be delivered upon payment of the related orders invoice.   Questions   Are has and contains completely the same? If not, how to choose between them for relationships?! what is the measure?! Are there any rational problems with the Main concept section? Any helpful ideas or suggestions to improve this model?   Any help with this, would be really appreciated.  Update 1  Refined version of the diagram     Update 2  Considering an analogy of a Fast food restaurant would be helpful:   Customer ---------- A hungry person Service ------------- Making a burger, Home delivery, Mobile delivery, ... Order-item --------- A burger, ... Order ---------------- A home-delivered burger Invoice -------------- The printed invoice Project -------------- Serving the customer for a complete year (like a contract) Project-phase ----- Serving the customer for a single day Task ----------------- Preparing the kitchen, process the meat, ... Developer ---------- The cookie Delivery ------------- A burger in wrapped in wax papaer and a drink with the tray   Update 3  ()     Project seems to be unrelated to Customer in your diagram. Is this what you intended?   I think Order is and Project should not be related, as I think it is something off-the-counter and customer has nothing to do with it. she/he is only after the delivery and is concerned about time and money, nothing else. Please tell if I am wrong.     Are all Orders part of a Project or can you have orders that aren't in a project at all?   All Orders are part of a project, except those new ones which are waiting in the process queue.     Similarly, you relate order item directly to customer, but also to order. Are orders split between customers?   Please think of Order-Item as these:   web design web design consultancy domain name consultancy ...   So, customer choose some of these items, collected as an Order which has an invoice and could be paid. Order-Items are directly related to offered Services. I don't understand what do you mean by Are orders split between customers?.     If not you don't need a ternary relationship between customer, order item and service. Rather, an order item is an intersection between order and service. Order items belong to customers by inheritance from order (or even project?)   This is somehow true: Order items belong to customers by inheritance from order, but I think it is more rational to say it like this:     Order-Items, inherited from Service, belong to Order which itself belongs to Customer.


When I try to download new software or update (in terminal) I get these errors...  W: chmod 0700 of directory /var/lib/apt/lists/partial failed - setupAPTPartialDirectory (1: Operation not permitted) E: Could not open lock file /var/lib/apt/lists/lock - open (13: permission denied) E: Unable to lock directory /var/lib/apt/lists/ E: Could not lock the file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?   This is driving me crazy!  Any help would be much appreciated.  I am new to Linux.  Thank you in advance!

I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?


Where should I put the "Just" in a sentence? Before be or after be?     It is just enough.  or     It just is enough.

I'm a bit confused about this. Which expression is correct?     You can't just do that.    or      You just can't do that.   I'm trying to say:     You can't just bash an ideology because of what someone has said/done.


I have my bash_profile on my Mac and the remote computers I connect to setup to automatically put the hostname in the window's (or tab's) title area.  A bash shell on my local machine    A remote host name "Socrates"; also a bash shell.    The problem is, when I exit (and disconnect) from the remote host, the window title stays with the host name of the remote.  So, in effect, I'm on the local Apple bash shell with the remote name.  To fix it, I do one of the following:   close the window and open a new one re-source the .bash_profile (. ~/.bash_profile) create a new sub shell by issuing the command bash (not desirable at all)   How can I have this done automatically so that when I exit a remote shell, the title goes back to the original host name so I know what host I'm actually connected to?  Note, the previously asked question,  didn't adequately address the issue because the solution was to modify .bash_logoff which only worked for login shells.

I am using the terminal app to ssh and when I do, it conveniently tells me (at the very top) what and where I am logged into for example:  user@computer:/home/user/directory/  and so forth. However, when I exit the ssh session and am sitting nicely at my local directory, it still tells me the directory path of the place I was previously logged in to.  Is there any way to have it tell me that information only when I am actually logged in to a remote machine? I have already gone to Terminal -> preferences -> profiles -> window and I only have "Dimensions" checked.


I have listen a lot that we should always load the java script at the end of the page why we should do that. If i write the java script at starting of the page how it will make the difference?

I've recently read the Yahoo manifesto . They recommend to put the JavaScript inclusion at the bottom of the HTML code when we can.  But where exactly and when?  Should we put it before closing </html> or after ? And above all, when should we still put it in the <head> section?


It is said that a matrix $A$ is said to be invertible if there exists a matrix $B$ such that $AB=I=BA$, but if we only know $AB=I$, can we be sure that $BA=I$?

If $A$ and $B$ are square matrices such that $AB = I$, where $I$ is the identity matrix, show that $BA = I$.    I do not understand anything more than the following.   Elementary row operations. Linear dependence. Row reduced forms and their relations with the original matrix.   If the entries of the matrix are not from a mathematical structure which supports commutativity, what can we say about this problem?  P.S.: Please avoid using the transpose and/or inverse of a matrix.


How to split an array to 2 arrays with odd and even indices respectively? For example  int[] a = new int[]{1, 3, 7, 8};   then get two arrays     a1: {1, 7}    a2: {3, 8}

Say I have a list of all Projects, and that I group them by Category like this:  var projectsByCat = from p in Projects                     group p by p.Category into g                     orderby g.Count() descending                     select new { Category = g.Key, Projects = g };   Now I want to display this as a list in a web page, where first I create the left side div, secondly the right side div. I am ordering by number of Projects in each Category to show the Categories with the most Projects on top - thus I would like to split projectsByCat in two - if I put all the "odd numbered" Categories on the left and the "even numbered" categories on the right, I think I will get a reasonably sane view.  So I thought I could do this to get the odd and even members of projectsByCat:  var oddCategories = projectsByCat.Where((cat, index) => index % 2 != 0);  var evenCategories = projectsByCat.Where((cat, index) => index % 2 == 0);   And it compiles - however, when I run it, I get an exception such as this:     Unsupported overload used for query operator 'Where'.   And I thought I was safe since it compiled in the first place.. ;)  Is there an elegant way to do this? And also, is there an elegant explanation for why my creative use of Where() won't work?  Thanks in advance!


JAXBContext jc = JAXBContext.newInstance(StackOverflowXPathMap.class);  Unmarshaller unmarshaller = jc.createUnmarshaller();  URL xmlURL = new URL("https://stackoverflow.com/feeds");  URLConnection conn = xmlURL.openConnection(); conn.addRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36"); conn.connect();  InputStream xml = xmlURL.openStream(); StackOverflowXPathMap stackOverflowXPathMap = (StackOverflowXPathMap) unmarshaller.unmarshal(xml); System.out.println(stackOverflowXPathMap.getAuthor()); xml.close();  Marshaller marshaller = jc.createMarshaller(); marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); marshaller.marshal(stackOverflowXPathMap, System.out);   I`m trying to parse RSS from stackowerflow, but I have some troubles. Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL:  I used to off my firewall and try run this code from other computer. I had the same 403

Im trying to access a web service from a remote computer. I managed to access the web service from the browser. But Im getting HTTP 403 when I try to call the web service from the application.  Any idea why?


I attempted to extend my ubuntu partition using windows disk management, but quickly realized that you cannot extend a volume with this file system using that method.   I want to be able to extend my ubuntu partition to use the unallocated space.

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


The original one is:  $$\sin z - \cos z = 3$$  by defenition:  $$\left(\frac{e^{iz}-e^{-iz}}{2i}-\frac{e^{iz}+e^{-iz}}{2}\right) = 3$$  $$\left(\frac{e^{iz}-e^{-iz}}{i} - e^{iz}+e^{-iz}\right) = 6$$  $$\left( \frac{e^{iz}-ie^{iz}-ie^{-iz}}{i} \right) = 6$$  What am I suposed to do next? I am not sure that it is right direction at all, i wass thinking of represention of $e$ via eulur's formula but it seems it makes the proccess even more complicated...

I found a solution but when testing it, it does not work....?    $$\cos z + \sin z = i \\ \frac{e^{iz} + e^{-iz}}{2} + \frac{e^{iz} - e^{-iz}}{2i} = i \\ e^{2iz}(1+i) + 2e^{iz} + i - 1 = 0 \\ e^{iz} = \frac{-1 \pm \sqrt{2-i}}{1+i} \\ z = -i \mathrm{Log}\left(\frac{-1\pm\sqrt{2-i}}{1+i}\right) + k2\pi$$    Upon testing it in W|A with $k=0$, I don't get the required result $(=i)$. I'm not sure where I went wrong and I did this a few times already.


I have been trying very hard to find the answer to the following integral$$\int_0^\infty\frac{\sin^2x}{x^2}dx$$ given that $$\int_0^\infty\frac{\sin x\cos x}{x}dx = \frac{\pi}{4}$$

I am looking for a short proof that $$\int_0^\infty \left(\frac{\sin x}{x}\right)^2 \mathrm dx=\frac{\pi}{2}.$$ What do you think?  It is kind of amazing that $$\int_0^\infty \frac{\sin x}{x} \mathrm dx$$ is also $\frac{\pi}{2}.$ Many proofs of this latter one are already in this .


Here I want to filter numbers from asNum array  self.protocolArray = [{     protocol: "OSPF",     asNum: [0, "", undefined, null, 1, 2] }];  for (var j = 0; j < self.protocolArray.length; j++) {     self.protocolArray[j].asNum.forEach(function (asNumitem) {         if (asNumitem && (asNumitem !== "")) {             asNumStoreData.items.push({                 "name": asNumitem.toString(),                 "value": asNumitem.toString(),                 "selected": "false"             });         }     }); }   expected result {items:[0,1,2]}  Any idea?

What's the cleanest, most effective way to validate decimal numbers in JavaScript?  Bonus points for:   Clarity. Solution should be clean and simple. Cross-platform.   Test cases:  01. IsNumeric('-1')      => true 02. IsNumeric('-1.5')    => true 03. IsNumeric('0')       => true 04. IsNumeric('0.42')    => true 05. IsNumeric('.42')     => true 06. IsNumeric('99,999')  => false 07. IsNumeric('0x89f')   => false 08. IsNumeric('#abcdef') => false 09. IsNumeric('1.2.3')   => false 10. IsNumeric('')        => false 11. IsNumeric('blah')    => false


If I execute the following command in LXTerminal:  gnome-terminal &   gnome-terminal gets opened. But as soon as I close the LXTerminal, gnome-terminal will be closed as well because it's a child process. Is there any way to open the second process independently?

What are the differences between  $ nohup foo   and  $ foo &   and  $ foo &  $ disown


I have the following script that is concatenating files in a directory in a particular fashion. I did some testing on a toy example and it is not doing what I thought it was doing. First, to describe the directory structure, there are three types of files(bulk, reference, and single-cell), each with a "left" and "right" polarity. I want to merge all files of the same type and polarity. That is, files labeled with "bulk_left_*" are all merged into a final file "left_bulk" and the same for the reference files. The single cells are unique in that there are a specified number of single cells and each must be merged by index. That is, if all files with the prefix single_cell_left0_* are merged together but should NOT be merged with "single_cell_left1_*" type files. In the end I should have 4 + 2*(number of singlecells) files in the directory. Here is the current script I use to do the merging. I tested it on a directory with some made up files and I saw that it merged every single cell file into the specified outputs instead of only selecting them one index at a time. I think this has something to do with way I write the variable into the bash directory, and it is treating it as an integer instead of a string variable, but I am not sure. WORKING_DIR=/media/drive0/USER/data cat $WORKING_DIR/bulk_reads_left_*.fasta > $WORKING_DIR/left_all_bulk.fasta cat $WORKING_DIR/bulk_reads_right_*.fasta > $WORKING_DIR/right_all_bulk.fasta rm $WORKING_DIR/bulk*.fasta cat $WORKING_DIR/reference_fast_number_left*.fasta > $WORKING_DIR/left_reference.fasta cat $WORKING_DIR/reference_fast_number_right*.fasta > $WORKING_DIR/right_reference.fasta rm $WORKING_DIR/reference*.fasta NCELLS=5 for i in `seq 0 $(($NCELLS-1))`  do                                                                                do     cat $WORKING_DIR/single_cell_number_left$i_*.fasta > $WORKING_DIR/left_single_cell_$i.fasta     cat $WORKING_DIR/single_cell_number_right$i_*.fasta > $WORKING_DIR/right_single_cell_$i.fasta done rm $WORKING_DIR/single*.fasta ~

The variable BUILDNUMBER is set to value 230. I expect 230_ to be printed for the command echo $BUILDNUMBER_ but the output is empty as shown below.  # echo $BUILDNUMBER_  # echo $BUILDNUMBER 230


$\exists$ this exercise in Rosenthal's :    For letters d and e, how do you show that the ff events are pairwise independent?    My attempt:  It suffices to show that $B_n$ and $B_{n+1}$ are pairwise independent (because Borel-Cantelli 2 can use pairwise independence). To do this, it suffices to show that the index of the last event in $B_n$ is less than the index of the first event of $B_{n+1}$, that is, $\left \lfloor n\log_2 n^2 \right \rfloor + \left \lfloor \log_2(\left \lfloor n\log_2n^2 \right \rfloor) \right \rfloor \leq \left \lfloor (n+1)\log_2 (n+1)^2 \right \rfloor + 1$.  How to show this? I tried using $\left \lfloor k \right \rfloor \leq k$, but I'm not sure that that does anything...  LHS $\leq \left \lfloor (n+1)\log_2 (n+1)^2 \right \rfloor  +  \left \lfloor \log_2(\left \lfloor n\log_2n^2 \right \rfloor) \right \rfloor $ < $\left \lfloor (n+1)\log_2 (n+1)^2 \right \rfloor + 1$ because...ugh...  $\left \lfloor \log_2(\left \lfloor n\log_2n^2 \right \rfloor) \right \rfloor \leq \log_2(\left \lfloor n\log_2n^2 \right \rfloor) < 1$?  I don't think the last inequality is true.  Help please?

$\left \lfloor n\log_2 n^2 \right \rfloor + \left \lfloor \log_2(\left \lfloor n\log_2n^2 \right \rfloor) \right \rfloor \leq \left \lfloor (n+1)\log_2 (n+1)^2 \right \rfloor + 1$  How to show this? I tried using $\left \lfloor k \right \rfloor \leq k$, but I'm not sure that that does anything...  LHS $\leq \left \lfloor (n+1)\log_2 (n+1)^2 \right \rfloor  +  \left \lfloor \log_2(\left \lfloor n\log_2n^2 \right \rfloor) \right \rfloor $ < $\left \lfloor (n+1)\log_2 (n+1)^2 \right \rfloor + 1$ because...ugh...  $\left \lfloor \log_2(\left \lfloor n\log_2n^2 \right \rfloor) \right \rfloor \leq \log_2(\left \lfloor n\log_2n^2 \right \rfloor) < 1$?  I don't think the last inequality is true.  Help please?  I think it's supposed to hold for all natural numbers or at least all natural numbers after a certain index.


It seems that all LaTeX formatting assumes we will ultimately print the document but if the goal is to publish online - under some circumstances, we might desire to have all the document in one "infinite" page so the reader can scroll it. That is the idea behind . How should go about to try to implement this idea in a TikZ picture? How to avoid the picture being cropped by the page length set by document class?

Does anybody know of a documentclass that produces a page that has a fixed width and a variable length, depending on the actual content that needs to fit on the sheet? I'm trying to get something like a kind of scroll if possible.


Please, can anyone help me solving this problem?  $$\frac{\partial U}{\partial t}−(\frac{\partial U}{\partial x})^2=0$$  where $U=U(x,t)$  with side condition as $U(x,0)=\cos x$

Please can anyone help me solving this problem?  $$ \frac{\partial U}{\partial t} - \left(\frac{\partial U}{\partial x}\right)^2 = 0 $$  where $U=U(x,t)$ with side condition as $U(x,0)=\cos x$.  The problem is given in the following article: A. Thess, D. Spirn, B. Jüttner, "Viscous Flow at Infinite Marangoni Number", Physical Review Letters 75(25), 1995.


Good morning.  I recently posted a question on Math Stack Exchange  and got a fantastic solution.  The problem in question is one that I've had for some time, and both myself and research professor have been searching for proof of the claim both through papers and using mathematical techniques. It would appear that a particular solution to the problem has been found, though I must go through the proof with my professor to verify its truth.  If it is true, what is the protocol for citing the proof and giving the author credit?  Do stack exchange contributors post solutions knowing that their work may not be credited?  I would never want to plagarize, but the information is useful for the greater problems that we have been trying to solve.

Sometimes we may ask questions on stack exchange or online forums wherein the response is helpful or even essential to a piece of work that gets published in an academic journal. If this occurs, how should credit be given to those involved in the exchange? Should they all be included as authors? Should a link to the forum be included as a reference in the paper?  Once something is in a stack exchange or forum, it's "published". Perhaps in the future, the current peer review model will transform into people writing blogs and posting in forums and databases. But for now, how might this issue be dealt with while forums, blogs, etc coexist with journals?


I want to go back Ubuntu 16.04, because a lot of packages are not supported yet in 18.04. For example, MSSQLServer.

I looked up on the internet but all those steps to install were regarding 16.04 version. Is it available yet on 18.04 ? If yes,how?


I am trying to get all .java-files in a directory (that is given)  and all its subdirectories . This is what Ive come up:  public static void getJavaFiles(Path path) {       DirectoryStream<Path> stream = null;     try {          stream = Files.newDirectoryStream(path);         for (Path entry : stream) {             if (Files.isRegularFile(entry)) {                 if(entry.getFileName().toString() == "*.java") {                     System.out.println(entry.getFileName().toString());                 };              } else if (Files.isDirectory(entry)) {                 getJavaFiles(entry);             }          }        } catch (IOException e) {          throw new RuntimeException(String.format("error reading folder %s: %s", path, e.getMessage()), e);      } finally {         if(stream != null) {             try {                 stream.close();             } catch (IOException e) {              }         }     }     }   Unfortunately entry.getFileName().toString() == "*.java" is not working how I thought it would. I get all the files but how do I get only the .java files ?

Say I have two strings,  String s1 = "AbBaCca"; String s2 = "bac";   I want to perform a check returning that s2 is contained within s1. I can do this with:  return s1.contains(s2);   I am pretty sure that contains() is case sensitive, however I can't determine this for sure from reading the documentation. If it is then I suppose my best method would be something like:  return s1.toLowerCase().contains(s2.toLowerCase());   All this aside, is there another (possibly better) way to accomplish this without caring about case-sensitivity?


I accidently somehow enabled jumping when moving objects (when you move an object it moves by short and precise steps) and I don't know how to disable it.

My cursor is moving by every selection by large increments!  Normally when I use Blender, I am able to select and move objects to any coordinate. Now, all of the sudden, when I select an object or mesh the selection moves by an inch or so in each direction.  How do I reset it to normal?


I stuck to do this,     $$\lim_{n\to \infty} \frac{1+2^2+\ldots+n^n}{n^n}=1.$$   The only thing I have observed is $$ 1\le \lim_{n\to \infty} \frac{1+2^2+\ldots+n^n}{n^n}$$ I am unable to get its upper estimate so that I can apply Sandwich's lemma.

$$\lim_{n \to \infty}{\frac{1^1+2^2+3^3+\cdots+n^n}{n^n}}.$$  With a first look this must give $1$ as a result but have a problem to explain it.  How can I do it?  Edit  I noticed that it is $\frac{\infty}{\infty}$.  $$\lim_{n \to \infty}{n^{n}\frac{(\frac{1^1}{n^{n}}+\frac{2^2}{n^{n}}+\frac{3^3}{n^{n}}+\cdots+1)}{n^n}}= \lim_{n \to \infty}{\frac{1^1}{n^{n}}+\frac{2^2}{n^{n}}+\frac{3^3}{n^{n}}+\cdots+1}=1$$  Is this correct?


I have this type of variable :     What kind of return type should I write for my method? I wrote object but it didn't work out. Thanks.  EDIT :   I made such classes :   public class IlIlceTarife {     public string Il { get; set; }     public string Ilce { get; set; }     public string Tarife { get; set; } }  public class a {    public IlIlceTarife Name { get; set; }     public int Sayi { get; set; } }   And I made return type as this :   public List<IEnumerable<a>> TarifeGiver1(string il, string ilce)   And VS gave this error :   > Cannot implicitly convert type > 'System.Collections.Generic.List<System.Collections.Generic.IEnumerable<<anonymous > type: <anonymous type: string Il, string Ilce, string Tarife> Name, > int Sayi>>>' to > 'System.Collections.Generic.List<System.Collections.Generic.IEnumerable<WebApplication2.Controllers.a>>'

Using the simple example below, what is the best way to return results from multiple tables using Linq to SQL?  Say I have two tables:  Dogs:   Name, Age, BreedId Breeds: BreedId, BreedName   I want to return all dogs with their BreedName.  I should get all dogs using something like this with no problems:  public IQueryable<Dog> GetDogs() {     var db = new DogDataContext(ConnectString);     var result = from d in db.Dogs                  join b in db.Breeds on d.BreedId equals b.BreedId                  select d;     return result; }   But if I want dogs with breeds and try this I have problems:  public IQueryable<Dog> GetDogsWithBreedNames() {     var db = new DogDataContext(ConnectString);     var result = from d in db.Dogs                  join b in db.Breeds on d.BreedId equals b.BreedId                  select new                         {                             Name = d.Name,                             BreedName = b.BreedName                         };     return result; }   Now I realize that the compiler won't let me return a set of anonymous types since it's expecting Dogs, but is there a way to return this without having to create a custom type?  Or do I have to create my own class for DogsWithBreedNames and specify that type in the select?  Or is there another easier way?


this question is about change a variable for while ,but not valid in it . the code like below:  public class StopThreadTest extends Thread { private boolean isStop = false;  private void setStop() {     isStop = true; }  @Override public void run() {     while (!isStop) {         try {             Thread.sleep(1);         } catch (Exception e) {             e.printStackTrace();         }     } }  public static void main(String[] args) throws InterruptedException {     StopThreadTest test = new StopThreadTest();     test.start();     //     Thread.sleep(2000);     test.setStop();     System.out.println(" has set stop ... "); }}   when i run this code ,the program can terminated normally. but when i comment out the code in run method (just like below) ,the program can't terminate itseslf.  @Override public void run() {     while (!isStop) {         try {             //when comment out the blow line ,the program will runs forever .             //Thread.sleep(1);         } catch (Exception e) {             e.printStackTrace();         }     } }   but when i set the variable "isStop" volatile ,the programe again run normal.  private volatile boolean isStop = false;   so, my question is :  a. if not use volatile ,the variable can't read again in while loop ? but why when has an operation (such as print a word,or sleep 1 mills) in while loop,it can work normal ?   and my env is (windows 10,x64, jdk1.8)  hope anyone can help to explain this phenomenon?

At work today, I came across the volatile keyword in Java. Not being very familiar with it, I found . Given the detail in which that article explains the keyword in question, do you ever use it or could you ever see a case in which you could use this keyword in the correct manner?


What is the meaning of $d$? Is is Delta? If it is Delta, why is it then not $\Delta$? I am still confused with that. Can someone help explain it to me?

I have read the thread regarding , but it does not answer my question.  I am confused about the notation for change in Physics. In Mathematics, $\delta$ and $\Delta$ essentially refer to the same thing, i.e., change. This means that $\Delta x = x_1 - x_2 = \delta x$. The difference between $\delta$ and $d$ is also clear and distinct in differential calculus. We know that $\frac{dy}{dx}$ is always an operator and not a fraction, whereas $\frac{\delta y}{\delta x}$ is an infinitesimal change.   In Physics, however, the distinction is not as clear. Can anyone offer a clearer picture?


In L. D. Landau and E. M. Lifshitz Quantum Mechanics it is  about oscillation theorem, is there any short and simple way to prove it, which would be understandable for the 2nd year student of math/physics department?     As one can see it states that in bounded (let it be one dimensional) space $\psi$ function of the ground energy state have zero "zeroes" and in $n$th excited state have exactly $n$ "zeroes". How one can prove it in short and easy way?   Note: this is not a hometasklike question. This is a try to deeper understand the general physics course.

In Moore's introductory physics textbook Six Ideas that Shaped Physics, he describes a set of qualitative rules that first-year physics students can use to sketch energy eigenfunctions in a 1D quantum-mechanical potential.  Many of these are basically the WKB formalism in disguise;  for example, he introduces a notion of "local wavelength", and justifies the change in amplitude in terms of the classical particle spending more time there.  He also notes that the wavefunction must be "wave-like" in the classically allowed region, and "exponential-like" in the classically forbidden region.  However, there is one rule that he uses which seems to work for many (but not all) quantum potentials:     The $n$th excited state $\psi_n(x)$ of a particle in a 1D potential has $n$ extrema.   This is true for the particle in a box (either infinite or finite), the simple harmonic oscillator, the , and presumably a large number of other 1D quantum potentials.  It is not true, however, for a particle in a double well of finite depth;  the ground state, which has a symmetric wavefunction, has two maxima (one in each potential well) and one minimum (at the midpoint between the wells).  The following questions then arise:   Are there conditions can we place on $V(x)$ that guarantee the above quoted statement is true?  For example, is the statement true if $V(x)$ has only one minimum?  Is the statement true if the classically allowed region for any energy is a connected portion of $\mathbb{R}$?  (The second statement is slightly weaker than the first.) Can we generalize this statement so that it holds for any potential $V(x)$?  Perhaps there is a condition on the number of maxima and minima of $V(x)$ and $\psi_n(x)$ combined?   I suspect that if a statement along these lines can be made, it will come out of the orthogonality of the wavefunctions with respect to some inner product determined by the properties of the potential $V(x)$.  But I'm not well-enough versed in operator theory to come up with an easy argument about this.  I would also be interested in any interesting counterexamples to this claim that people can come up with.


Let $f$ and $g$ be entire functions which satisfy $f(0)=g(0)\neq0$ and $|f(z)|\leq|g(z)|$ for all $z\in\mathbb{C}$.  Show that $f=g$.    My approach:  Since $f$ and $g$ are both entire, we know that $f(z)=e^{g(z)}\neq0$.  Let us suppose that $f'(z)/f(z)=g(z)$.  Then, $f(z)=e^{g(z)}\implies f(z)=e^{\frac{f'(z)}{f(z)}}$.  Taking the log of both sides gives $log(f(z))=\frac{f'(z)}{f(z)}$ and so $f(z)\log(f(z))=f'(z)$..... and now I feel like I'm going down a rabbit hole that does not lead into Wonderland.  Any thoughts?

Suppose $f$ and $g$ are entire functions with $|f(z)|\leq|g(z)|$ for all $z$.  How can we show that $f=cg$ for some complex constant $c$?  Thanks for any help :)