I followed this  to render fire. But, for some reason when I render the images, any image format with transparency just shows a box instead of the image. I can render the image with a background, but not without one. Any idea what would cause this, and how I can fix it? I'm using blender 2.92 by the way.  It should look like this, minus the background.  Edit: Here's the blender file:

This is what I have so far:  The rendered image has a transparent background, but the glare filter creates an output with a black background, so after merging the two togheter, the background turns black but I need it to be transparent, what can I do?


On my Mac I use three user accounts. From what I understand when I'm logged in as one the processes of the other accounts are suspended. I switch between them with fast user switching.  My question is - can one assure that some processes keep running? Searching I found a few hints how to do on command line - but I'm considering to let a graphic application - like Steam - update itself for one user, and work as another user at the same time.

I am wondering if programs keep running when users switch account, alas account is locked and another user account logs in. For instance, user Mike runs Photos (that will start curating pictures), then locks account and user Sue logs in to other account; will Photos instance keep running in Mike account in the background?


Well the question states it all. Why do we subtract λ from the diagonal of matrix A to calculate eigen values?

Does anyone know how this equation came.I was studying about Eigenvalues and a doubt that arised was how could the equation $(A- \lambda)V = 0$ become $|A- \lambda I| = 0$.


In  Ted talk The Geometry of Particle Physics: Garrett Lisi at TEDxMaui 2013 is he referring to the gauge group space while using the toys ? (Seems so to me). Can someone provide some references that approach quantum gauge theory from such geometric perspective ?

For gravity, we have    General Relativity, which is a geometric theory for gravitation.  Is there a similar analog for Electromagnetism?


I am currently in my junior year, studying abroad in another country. The advisor at this school told me that I was enrolled in 5 businesses classes. I had asked her to drop one of them because I didn't need it and she said okay I will drop this course for you and you have 12 credits. I left her office and went on with my day and I came to find out later that she had not dropped my course and that I am still enrolled in 5 classes. The way the school works here is that you are unable to add/drop once that period is over.   Upset and frustrated, I went to her office and she said she can't remember what had happened because she has too many students. She had told me that I can either take the course or fail it and it won't affect my GPA. But on my transcripts it will say grade not available aka "F." I normally take 4 classes at home and I do want to enjoy my time here, so I don't know if I should take the "F" and explain what had happened to graduate school admissions office or just suffer and take the class that I don't need toward my major. It will not affect my GPA whatsoever if I were to take the F it will just be on my transcripts.  I trusted my advisor that she dropped my course, had I known that she wouldn't do it I would've done it myself. I do understand that I am at fault to for not checking it right after she'd done it, but by the time I found out it was too late. Thoughts?

When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it.


Let $(G, * )$ be a group . For any $a_1,...,a_n \in G$, the value of $a_1 * ... * a_n$ is independent of how the expression is bracketed. Attempt: hint is to use inducition . Notice that for $n=3$ we have $$ (a_1 * a_2 ) * a_3 = a_1 * (a_2 * a_3) $$ and there is not other way to place the parenthesis but is true by definition. Now, $n=4$ let try see all possible ways to place the parentesis: $$ a_1a_2a_3a_4 = ((a_1a_2)a_3)a_4 = (a_1 (a_2a_3)) a_4 = a_1 ((a_2a_3)a_4) = a_1(a_2 (a_3a_4)) = (a_1a_2)(a_3a_4)$$ Let us assume it is possible to do so for some $n$: that is Let $S_n$ be the statement that: value of $a_1...a_n$ is independent of how we place parenthesis. We prove $S_{n+1}$ is true.Let $A = a_1...a_n$. Now express this as $$ A = (...(a_1...)))a_{n-1}) a_n $$ Now, consider $A a_{n+1}$. That is, $$ A * a_{n+1} = (...(a_1...)))a_{n-1}) a_n * a_{n+1} $$ but here I get stuck. Im not quite sure whether the LHS actually can be done... any help would be greatly appreciated.

I've always heard this reasoning, and it makes obvious sense, but how do you actually show it for some arbitrary product? Would it be something like this?  $$(a(b(cd)))e=((ab)(cd))e=(((ab)c)d)e=abcde?$$  Do you just say that the grouping of the parentheses now corresponds to just multiplying straight through? Thanks.


Using C# and Silverlight  How do I get the index of the current item in the list?  Code:  IEnumerable list = DataGridDetail.ItemsSource as IEnumerable; List<string> lstFile = new List<string>();   foreach (var row in list) {   bool IsChecked = (bool)((CheckBox)DataGridDetail.Columns[0].GetCellContent(row)).IsChecked;   if (IsChecked)   {      // Here I want to get the index or current row from the list                       } }   How to achieve this

Is there some rare language construct I haven't encountered (like the few I've learned recently, some on Stack Overflow) in C# to get a value representing the current iteration of a foreach loop?  For instance, I currently do something like this depending on the circumstances:  int i = 0; foreach (Object o in collection) {     // ...     i++; }


$G$ has no odd cycles $\iff$ the $X(G)=2$   I already proved the reciprocal but I'm having trouble with this.  Here is my thinking:     Let be $G=(V,E)$. If $G$ has no cycles, then $G$ is a tree so $X(G)=2$   since trees are bipartite.      If $G$ has one cycle, I know it's an even cycle. Let be   $C_1=\{v_1,...,v_n\}$ an even cycle of $G$. We can define   $k:C_1\rightarrow \{a,b\}$ a coloring of c.       $k(v_1)=a, k(v_2)=b, ... , k(v_n)=b$      Since $k=a$ for odd indexes, $k=b$ for even indexes, and $n$ is even.   So $X(C_1)=2$.   But I don't know how affirm that $X(G)=2$. Not to mention $G$ with more than one cycle.   Any help will be appreciated, thanks in advance.

How can we prove that a graph is bipartite if and only if all of its cycles have even order? Also, does this theorem have a common name? I found it in a maths Olympiad toolbox.


'use strict';  const characters = [   { id: 1, name: 'ironman', env: 'marvel' },   { id: 2, name: 'black_widow', env: 'marvel' },   { id: 3, name: 'wonder_woman', env: 'dc_comics' }, ];  function hasCharacterFrom(env) {   return character => character.env === env; }  console.log(characters.find(hasCharacterFrom('marvel'))); // { id: 1, name: 'ironman', env: 'marvel' }  console.log(characters.some(hasCharacterFrom('marvel'))); // true     I am not able to understand how the function hasCharacters() works internally.  Its neither an arrow function, nor a ternary operation been used there.  How is the =》 used here?

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


I recently installed windows 10 and on the machine there are two accounts - let's call them u1 & u2. U1 is password protected and u2 is not. By default windows 10 auto logs in to the last user who logged off.  So, if u1 is last logged off, the next time the pc is started, it will stop at the welcome screen as it requires a password to log in u1. But if u2 is the last one, it will directly log in to the u2 desktop, as it does not require a password.  Me being u1, I find it very annoying to have to log out of u2 and log back into u1, every time I start my pc, if u2 was the last logged off user. Is there any way to avoid this, short of adding a password to u2 ??

I recently setup a new computer for my parents with windows 10 home. I made two local accounts for them - no microsoft accounts. I also would like to keep them without a password. Problem is now that windows automatically signs in with the last used account. No lock/login screen.  I tried a number of answers from similar questions here but none worked. Since it's a home version there are no group policies and the method using task scheduler does not work because accounts with no password are not allowed to create such tasks.  Are there other options to force windows to show a user list on startup without setting passwords for the accounts?


Background  Looking at  about rice, I was suprised (I'm quite ignorant) that difference between brown and white rice is process-based. White rice is brown rice without bran, and both of them are chaffless rice.  What seems strange to me is that white rice is so popular, being that wikipedia article about rice shows a Brown vs White rice table and brown rice seems a healthier food, respect to nutrition values.  Question  As white rice is so popular I wonder, and ask you, are there any health benefits to avoid brown rice?

Health benefits of eating whole-grain rice are often mentioned. But is there any downside in eating whole-grain rice instead of white rice?


I've just stumbled upon this situation: Background I saw a question and posted my answer. It's got some upvotes. Some comments were made on my answer stating that it isn't the best solution (and I agreed). I check and there is indeed a posted answer with a better solution (that has got accepted). I upvoted that better answer. Now I thought on a slightly better solution, but it is similar to the accepted answer. Question Should I post another answer, edit my answer and add the other solution or not post the answer at all? Edit 1: As raised by @Bathsheba, one could say that posting a similar answer is plagiarism. This made me search and as by Merriam-Webster's, it is  if:   one steal and pass off (the ideas or words of another) as one's own : use (another's production) without crediting the source one commit literary theft :  present as new and original an idea or product derived from an existing source   So by refering to another answer and stating that mine offers an improvement, would not be plagiarism. Question 2: Would the new answer be well-received by the community?

When is it okay to post two answers to one question?


How to prove that there exist infinitely many primes of the form $3k-1, \ k\in \mathbb{N}$?  I know the proof that there exist infinitely many primes of the form $3k+1$, but I don't know how to do it in this case.  I tried to use:  Let $p_1,...,p_n$ be primes of the form $3k-1$. Then $N:=(3p_1\cdot \cdot \cdot p_n)-1$ is of the form $3k-1$ and $N$ must have at least one prime divisor of the form $3k-1$.   But $N$ is not divisible by any primes $p_1,...,p_n$.   So $N$ is a prime of the form $3k-1$ outside $p_1,...,p_n$.  This procedure can be continued indefinitely, so there exist infinitely many primes of the form $3k-1$.  Is this correct? Or is there something missing or wrong?

I have to prove that any number of the form $3n+2$ has a prime factor of the form $3m+2$. Ive started the proof  I tried saying by the division algorithm the prime factor is either the form 3m,3m+1,3m+2.  Case 1: $3m$      suppose $3m$ does divide $3n+2$. That means $3mr=3n+2$ where $r$ is some integer. But we get $mr-n= 2/3$ and since $mr-n$ is an integer that's a contradiction. Thus $3m$ does not work.  Case 2: $3m+1$ Same argument here  Case 3: $3m+2$ By the fundamental theorem of arithmetic every integer is divisible by a prime. But not sure what to do from here.


prove or disprove  if $\lim_{n\to\infty} a_n=0$ then $∑a_n$ converges if and only if $∑a_n+a_{n+1}$ converges.  I wasn't able to write the indices above and below the ∑. it should be from n=1 to infinity.  I've thought that this statement is incorrect at first, but I found no counterexample.

Let $a_n$ be a sequence. $\lim_{n\to\infty} a_n =0 $ then the series: $\sum_{n=1}^\infty a_n, \ \sum_{n=1}^\infty (a_n+a_{n+1}) $ converge and diverge together.  It doesn't seem right, there are no convergence tests that fit this question yet every counterexample I try does not seem to work. Is this how I should see the sum? $\sum_{n=1}^\infty (a_n+a_{n+1})=2\sum_{n=1}^\infty a_n +a_{n+1}$ If so then there's no real difference between the two series since you multiply it by a constant and add just one more value.


Prove that $S_5$ has no elements of order $120$.  I know that by Lagrange's theorem, elements can have order $1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30, 40, 60, 120$.  I feel like I need to use some sort of contradiction argument here but I'm not sure where to go with that. Any suggestions?

Given the following groups, what is the maximum possible order for an element for   (a) $S_5$ (b) $S_6$ (c) $S_7$ (d) $S_{10}$ (e) $S_{15}$  My book justifies the answer as          (a) The greatest order is $6$ and comes from a product of disjoint cycles of length 2 and 3          (b) The greatest order is $6$ and comes from a cycle of length $6$      The other answers were justified exactly the same way, that is (c) 12, (d) 30, (e) 105  I do not understand how in (a) we even got the number "6" from $S_5$ and what disjoint cycles they are referring to. Could someone at least justify one for me?


I need to find the Poisson distribution of successes that occur in a 30 minute period based on a 3% per hour success rate, i know the Poisson distribution formula (P.M.F) but can't figure out how to calculate it as you can't factoral a non-integer.

A car hire firm has three cars, which it hires out on a daily basis. Number of cars demanded per day follows a poisson distribution with mean 2.1  a) Find the probability that all cars are in use on any one day.   b) Find the probability that all cars are in use on exactly three days of a five day week.  What I tried:  For the a) part: normal poisson formula with mean = 2.1 and x = 3   $$\frac{(e-2.1)(2.1^3)}{6}$$  Got the answer as 0.1890. The book's answer is 0.350   For the b) part: did poisson to binomial. Found out p = 0.7. Then used 5C3. But I think my method here is wrong.


At the moment, when I do apt-get dist-upgrade on my Raspbian it prompts me to throw out upstart again and install sysvinit. I don't get the same with apt-get upgrade.  However, I find the behavior of dist-upgrade more desirable in general, just not in this specific case.  I use apt-get most of the time and dpkg every once in a while. I don't use aptitude or any of the other front-ends.  What would be the proper method to tell apt-get that I want to keep any version of upstart over any version of sysvinit? Will this work, or will it screw up something else in the process?:  Package: sysvinit Pin: version * Pin-Priority: -1   Is pinning (apt_preferences(5)) the way to go - and if so how - or do I have to tell one of the many package management tools to "hold" the package some other way? This is somewhat related to the as of yet unanswered (at least not in a meaningful way) question .    The following will at least shut up apt-get dist-upgrade, but will it perhaps mess up something in future? There are numerous explicit warnings in apt_preferences(5) about how much things can be messed up by pinning.   Create a file /etc/apt/preferences.d/prefer-upstart-over-sysvinit.pref. Fill in the contents produced below this list. Run apt-get update && apt-get dist-upgrade.   File contents:  Package: sysvinit Pin: version * Pin-Priority: -1  Package: upstart Pin: version * Pin-Priority: 1001   According to the man page this should yield the desired result.     P >= 1000        causes a version to be installed even if this constitutes a        downgrade of the package     990 <= P < 1000        causes a version to be installed even if it does not come        from the target release, unless the installed version is        more recent     500 <= P < 990        causes a version to be installed unless there is a version        available belonging to the target release or the installed        version is more recent     100 <= P < 500        causes a version to be installed unless there is a version        available belonging to some other distribution or the        installed version is more recent     0 < P < 100        causes a version to be installed only if there is no        installed version of the package     P < 0        prevents the version from being installed   The confusing part is whether this is the proper method and why the entry only for sysvinit (with priority -1) didn't work out.    # apt-cache policy sysvinit upstart sysvinit:   Installed: (none)   Candidate: 2.88dsf-41+deb7u1   Version table:      2.88dsf-41+deb7u1 0         500 http://mirrordirector.raspbian.org/raspbian/ wheezy/main armhf Packages upstart:   Installed: 1.6.1-1   Candidate: 1.6.1-1   Version table:  *** 1.6.1-1 0         500 http://mirrordirector.raspbian.org/raspbian/ wheezy/main armhf Packages         100 /var/lib/dpkg/status  # apt-get install sysvinit Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required:   libjson0 Use 'apt-get autoremove' to remove it. The following packages will be REMOVED:   upstart The following NEW packages will be installed:   sysvinit 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. Need to get 129 kB of archives. After this operation, 940 kB disk space will be freed. Do you want to continue [Y/n]?

Each time I do apt-get dist-upgrade, the package sysvinit comes back and replaced upstart. Well, I have some scripts written for upstart, and I need to reinstall it every time (typing the annoying confirmation Yes, do as I say!) How can I flag it as a solid rock choice, so it won't be replaced forever?


I'm still in search of a good backup scheme for my Xubuntu 18.04 machine. In looking at Deja Dup (aka Backups), it seems dead simple and it said it successfully backed up my data. And it runs once a day.   But exactly when does it run once a day?  What were the results of the last run? Did it even run today? Were there errors? Where are they logged?   It's interface might be a little too simple. Any ideas on where to find at least the info above? I tried this:  DEJA_DUP_DEBUG=1 deja-dup --backup   Not sure this is the answer - I just want to check in on it every once in a while to make sure all is well.

I have made a duplicity backup with Ubuntu 14.04 in another laptop of my home directory.  I copied all duplicity back files to my current laptop to "/home/user/Ubuntu-backup"  How do i browse the content of that backup see if it is worth restoring? I want to restore how do i restore from those files.


Due to financial struggles brought on by marital struggles—or perhaps it was the other way around—, the family had to forsake it as the bank foreclosed on it.   I normally wouldn't place a comma, but had the statement between the dashes been missing like so—     Due to financial struggles brought on by marital struggles,the family had to forsake it as the bank foreclosed on it.   ...then there would be a comma.  Thanks for the help, lads and lasses.

I use em dashes frequently to break up random or ancillary thoughts in my writing. However, I'm uncertain how to deal with punctuation after an em dash when my sentence continues. For example, which of the following is correct?  If at first you don't succeed—I seem to encounter this scenario frequently—try, try again. If at first you don't succeed—I seem to encounter this scenario frequently—, try, try again.  Would I discard the comma in this case? It seems unnatural to keep it. EDIT: I originally left out an obvious comma between the two "try"s, but that shouldn't affect the intent of my question.


One not-so-well-known hidden feature of Stack Exchange is that, if a comment contains certain phrases, they may be instantly removed after a single flag.  For instance, any comment beginning with +1 can be deleted after a single "Not Constructive" flag.  Is there a list of phrases which, when included in comments, can trigger an instant deletion when flagged?

Caution: R-rated language  Some words, when present in a comment, make it eligible for instant, automatic one-flag deletion. Out of the , only      shit and fuck    appear to work this way. But then there are other, Stack Exchange-specific dirty phrases:    accept rate or accept-rate acceptance rate  what have you tried   whore    Are there other such words or phrases? Is there a complete list of them?     Some suspect words and phrases that do not suffice for automatic deletion:       accept an/the answer, thank you, voting to close, piss, bitch, idiot, cunt (often found on Stack Overflow as a misspelling of "count").


I'm wondering why it is required to put ~/ before .bashrc when opening the bashrc file.  To illustrate:   I normally open files on my system as follows:   vim filename.extension    But while in the /home directory if I do the following:   vim .bashrc    vim will open a new file called .bashrc  In order to open my bashrc file I must do as follows:  vim ~/.bashrc   Why?  My current system is Linux Mint 18.3

Edit: This is a duplicate of .  I don't have the reputation to close this question as duplicate.  I'm not referring to ~ as in the home directory but rather this:  $ ls ~foo/bar /some/mount/point/foo/bar   However if I attempt it with a different mount point, e.g.:  $ mount | ag "/dev " devfs on /dev (devfs, local, nobrowse) $ ls /dev/stdin /dev/stdin $ ls ~stdin zsh: no such user or named directory: stdin .  # bash has a similar error message:  ls: ~stdin: No such file or directory   What is the ~ called in this context?  How does it work?  Edit: More information based on some of the comments below:   I can attest that foo is not a username on my system. When attempting to autocomplete ls -lah ~ not all options are shown.  i.e. I'm able to cd ~qux, when qux doesn't show up in the autocomplete.  Again qux is not a user in my system. If it matters /some/mount/point is a network share. All of the details suggest some named path muckery, a Z shell feature of pathname expansion, but this works in bash as well, which apparently doesn't support things like the Z shell's named paths.


I have a computer with three USB 2.0 ports, but only one of them works correctly (the other two disconnect on their own after a seemingly random interval; it's a refurbished Lenovo ThinkPad running Windows 10). I successfully plugged in a hard drive enclosure that uses USB 3.0. It plugs in to AC power. It works better than I thought it would. I also bought a 2TB USB 3.0 external hard drive. It's much smaller than the hard drive in the enclosure and it's got four times the capacity. But it doesn't have its own power. Twenty years ago, I worked in a computer lab. A guy plugged in a 1GB thumb drive into an USB port and blew it out. We were told to post signs telling people not to use thumb drives in excess of 512MB. This is the only reason I'm worried that a 2TB USB 3.0 external hard drive without its own power plugged into a USB 2.0 port might be a problem. I've been shopping for a brand new computer with all USB 3.0 ports. In the meantime, would it be safe to plug in the external hard drive or would that risk disabling my only working USB port for the time being?

I'm on the verge of buying myself a new bus-powered USB 3.0 2.5-inch external hard drive. However, my computer only has USB 2.0 ports on it. I understand that the USB 3.0 HDD will simply run slower on USB 2.0 until I upgrade my machine, but my question is this:  Can I be sure that my USB 2.0 port can provide enough power for this bus-powered USB 3.0 device?  I read that the maximum power provided by USB 3.0 is 900 mA, which is almost twice the maximum power provided by USB 2.0: 500 mA. This made me think that even though USB 3.0 is backward compatible with USB 2.0, a USB 3.0 powered device may not work on a USB 2.0 port. If it depends on the device, what would indicate USB 2.0 power compatibility when choosing which external hard drive to buy?


If I borrow from two of my parents 50 dollars and spend 45 dollars at the store, I am left with 5. On my way home, I borrow to my friend 3, now I am left with just 2. I return home and give 1 to my dad and 1 to my mom, so I owe them 48 in total. And my friend owes me 3...so in total it becomes 51 and not 50 it used to be at the start. What is it? Anyone has explanation to this? Thank you. (sorry about the tag, couldn't figure out where to put it)

I'm not sure how well known this "riddle" is but here it goes.  3 people go to a restaurant, each buy food worth 10.00.  When they're done, they give 30.00 to the waitress.  She gives the money to the manager, manager says they paid too much, gives 5.00 back to the waitress.  She comes back to the table, gives a dollar back to each person and then puts the remaining 2.00 in her pocket for tip.  So now, each person has paid 9.00.  9.00 x 3 = 27.00.  Plus the 2.00 in the waitresses pocket is 29.00.  What happened to the 30th dollar?  So what's the issue with this way of calculating (since if you backward it works fine), that doesn't give us the correct result?


I'm trying to draw an under brace below some subscripts. The thing is that, if I do it the normal way, displays just fine, but with the subscripts letter a little big for a subscript. However, if I force the size, it becomes horribly spaced from the preceding text.  Here's the code I'm using for each case Preamble:  \ProvidesPackage{mystyle} \usepackage[spanish]{babel} %Idioma \usepackage[utf8]{inputenc} %Codificacion \usepackage[T1]{fontenc}    %Para que use las formas vectoriales de las fuentes %\usepackage{lmodern}       %Cambia Computer Modern por Latin Modern \usepackage{mathtools}      %Paquete matemático general \usepackage{commath}        %Funcionalidad matemática adicional, como por ejemplo, derivadas \usepackage{hyperref}       %Links dinámicos en los capítulos y demás \hypersetup{hidelinks}      %Configura hyperref \usepackage{siunitx}        %Notación científica y unidades \usepackage{cancel}         %Para tachar expresiones matemáticas \usepackage{graphicx}       %Importar imágenes   First case          \begin{align}  \varepsilon_{\underbrace{ijl\hdots}_{n \text{ índices}}} =  \end{align}    Second case  \begin{align}   \varepsilon_{\underbrace{\scriptstyle ijl\hdots}_{n \text{ índices}}} =  \end{align}    Here the outputs, respectively:      (Do not worry about the overfull to the right... I'm into that)

Consider this:  \left( x-1 \right) \underbrace{ \left( ? \right) }_{ \text{what is this?} }   The label is longer than the braced portion, which causes unwanted space between the parentheses.  Is there a way around that, so that the parentheses "touch" as they would normally?  Please note that I just started on LaTeX, and I'm using TexMaths inside LibreOffice Writer.


Been a while since I last read LoTR but I remember Legolas would sometimes take the arrows he loosed from the enemies' body. Obviously he has a limited supply and there are times where he couldn't retrieve some (enemies are too far high up or below, arrows "might" be damaged but they're Elvish so probably not etc).   Did he ever take and use Goblin/Orkish arrows or would that have been too frowned up as those arrows are used against the Free Races?

In the movie version of Lord of the Rings, Legolas is seen many times shooting arrow after arrow, yet he never seems to run out.  For example, after the long battle at the end of The Fellowship of the Ring, his quiver is completely filled.  Where are all these arrows coming from? Is it some form of elven magic? If so, it is never explained either in the movie, nor in the book that I can recall.


I am having listview with employeename and radiobutton. I am using setonclicklistner for radioButton but i am getting nullpointer exception and app got crashes. Can someone help me with this problem?  delivery.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             LayoutInflater inflater1 = (LayoutInflater) ct.getSystemService(Context.LAYOUT_INFLATER_SERVICE);             View v1 = inflater1.inflate(R.layout.activity_employees_list_for_pop_up, null);             RadioButton employeechecked = (RadioButton) v1.findViewById(R.id.employeeChecked);             final Button ok = (Button) v1.findViewById(R.id.do_ok);             Button cancle = (Button) v1.findViewById(R.id.do_cancle);             ok.setEnabled(false);             listView = (ListView) v1.findViewById(R.id.employeePopUpList);             employeePopUpAdapter = new EmployeePopUpAdapter(ct, employeeIdNameBeans);              //enable ok button if listitem is checked             employeechecked.setOnClickListener(new View.OnClickListener() {                 @Override                 public void onClick(View v) {                     int pos=listView.getCheckedItemPosition();                     if (pos > -1)                     {                         ok.setEnabled(true);                     }                     else if (pos <= -1)                     {                         ok.setEnabled(false);                     }                  }             });   error I am getting nullpointer exception when i click on textview   java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.RadioButton.setOnClickListener(android.view.View$OnClickListener)' on a null object reference   at com.example.jithendra.businessstorestart.adapters.DeliveryOrdersListAdapter$3.onClick(DeliveryOrdersListAdapter.java:300)   at android.view.View.performClick(View.java:4756)   at android.view.View$PerformClick.run(View.java:19749)   at android.os.Handler.handleCallback(Handler.java:739)   at android.os.Handler.dispatchMessage(Handler.java:95)   at android.os.Looper.loop(Looper.java:135)   at android.app.ActivityThread.main(ActivityThread.java:5221)   at java.lang.reflect.Method.invoke(Native Method)   at java.lang.reflect.Method.invoke(Method.java:372)   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)   Here is layout file  <LinearLayout     android:id="@+id/lv1"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:orientation="horizontal">      <TextView         android:id="@+id/employeeId"         android:layout_width="0dp"         android:layout_height="wrap_content"         android:layout_weight="1"         android:text="@string/loading"         android:textColor="@color/TextcolorforBlack"         android:textSize="20dp" />      <TextView         android:id="@+id/empFullName"         android:layout_width="0dp"         android:layout_height="wrap_content"         android:layout_weight="3"         android:text="@string/loading"         android:textColor="@color/TextcolorforBlack"         android:textSize="20dp" />      <RadioButton         android:id="@+id/employeeChecked"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:background="@color/TextcolorforBlack"         />  </LinearLayout>  <LinearLayout     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:orientation="horizontal">      <ImageView         android:layout_width="match_parent"         android:layout_height="1dp"         android:layout_weight="0"         android:background="@color/TextcolorforBlack" />  </LinearLayout>   This is list I am inflating it in listview. In this listview I am having radiobutton. If radiobutton check I need to enable button

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?


Aaron and Billy are working on the same file (abcd.text) on master. Aaron committed the file first. When Billy do git pull, he has a conflict. How can Billy take in the changes from Aaron and still keep his own changes? What is the best way to achieve this?

I want to resolve merge conflicts in my Git repository. How to do that ?


What's the shortest command I could use to find out my WAN IP?

I need to find my external IP address from a shell script. At the moment I use this function:   myip () {      lwp-request -o text checkip.dyndns.org | awk '{ print $NF }' }   But it depends on perl-libwww, perl-html-format, perl-html-tree installed. What other ways can I get my external IP?


I want to use some images as backgrounds but I have no control over the images. If the images are 500px x 500px , is it possible with just CSS3 to scale the image down to 200px x 200px and then only use 100px x 100px from the center?

Let's say I want a way to display just the the center 50x50px of an image that's 250x250px in HTML. How can I do that. Also, is there a way to do this for css:url() references?  I'm aware of clip in CSS, but that seems to only work when used with absolute positioning.


I would like to ask if how to do simple paging and pagination like GOOGLE.  should I use javascript?  should I use bootstrap?  This is my code for my pagination and I have 30 page buttons right now with 9 records per page  and all of them are present on the page.  $results_per_page = 9; // find out the number of results stored in database $result = mysqli_query($link, $query); $number_of_results = mysqli_num_rows($result); // determine number of total pages available $number_of_pages = ceil($number_of_results/$results_per_page); // determine which page number visitor is currently on if (!isset($_GET['page'])) {     $page = 1; } else {     $page = $_GET['page']; }  // determine the sql LIMIT starting number for the results on the displaying page  $this_page_first_result = ($page-1)*$results_per_page; // retrieve selected results from database and display them on page $sql='SELECT * FROM policy LIMIT ' . $this_page_first_result . ',' .  $results_per_page;  $result = mysqli_query($link, $sql);  // display the links to the pages ?> <form method="post"> <?php for ($page=1;$page<=$number_of_pages;$page++) { ?>     <input class="btn btn-success" type="submit" value="<?php echo $page;?>" name="page" > <?php   } ?>  </form>  <?php $page = 0; ?>   I want to hide other buttons while the 10 buttons are shown.   Thank you in advance ^_^

I'm looking for an example algorithm of smart pagination. By smart, what I mean is that I only want to show, for example, 2 adjacent pages to the current page, so instead of ending up with a ridiculously long page list, I truncate it.  Here's a quick example to make it clearer... this is what I have now:  Pages: 1 2 3 4 [5] 6 7 8 9 10 11   This is what I want to end up with:  Pages: ... 3 4 [5] 6 7 ...   (In this example, I'm only showing 2 adjacent pages to the current page)  I'm implementing it in PHP/Mysql, and the "basic" pagination  (no trucating) is already coded, I'm just looking for an example to optimize it... It can be an example in any language, as long as it gives me an idea as to how to implement it...


I googled around and i couldn't find any solution. I'd like to use the (`) in the comments but i don't really know what is the keyboard sequence to achieve it. I'm using an Italian/European keyboard. How would I be able to generate the "tick"?

I'm using an Italian keyboard so I do not have backticks. The problem for me is not when I'm writing a question, because I can use the UI of course, but when I'm writing a comment I have to use the keyboard to format my text.  I know the Ctrl+K shortcut, but it's not working on comments, to me at least. I was wondering if there is an alternative char?


I have Bought 2 SSL certificate one Basic and One Premium   The basic one will just give me https://example.com  The Premium will also giving me https and a Greebar in URL displaying the Company Name  Will implementing SSL would make any difference to my Google SEO ranking? And will the result be any different if By Implementing the premium one rather than the basic one

I would like to set up a new business site. I plan to direct www.example.com to example.com and only use that domain. My plan is also to only use HTTPS and not HTTP.   Does this affect the SEO for the site? E.g. do Google put lower or higher rank for sites that is only available via HTTPS?


I have files from an old document control paradigm that I want to put into SharePoint.  If I have a file that the old paradigm called "version 14" how can I upload that document into SharePoint and assign it the initial version 14.0?  I was prompted for a version string when I uploaded and I provided one but when I view the file's version history, it starts at 0.1.

We are looking at moving a some documents into a SharePoint 2010 document library.  Is there any way to set the starting version number for each document?


I am looking at organizing a small conference next summer and I would like by all means to avoid concurrent dates with any major or highly-overlapping conference on the same or related topics. I thought that it would be really useful if there was an online directory where I can check a calendar of upcoming scientific conferences and workshops (maybe sorted by field) and plan mine on a week in which it does not coincide with an already planned event. That way I would not be "competing" for speakers and attendants against the organizer of a different event. I would prefer to avoid "manually" browsing the internet to find this information out, so a centralized online service would be perfect for my needs.  Does such an online resource exist? If the answer depends on the discipline, I am mostly interested in physics, chemistry and materials science conferences and workshops.

What is the best way to search for conferences all over world? I need to participate in one in the near future.


No matter which way I try to install Wine It doesn't install, I'm new to Ubuntu, but its not hard to copy and paste and click "install". I tried to install it via Commands on the Wine website, and commands on a Youtube tutorial, then I tried the one in the software store (I didn't use that one in the beginning because I wanted the stable release not the development release.) Does anyone know why its doing this, and how to fix it?   sudo dpkg --add-architecture i386 wget -nc https://dl.winehq.org/wine-builds/Release.key sudo apt-key add Release.key sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/ sudo apt-get update sudo apt-get install --install-recommends winehq-stable   Those are the exact commands that were in the Youtube Tutorial and the Wine HQ website.

I am looking for a step by step instruction to guide me in the ways of installing, configuring and debugging many of the issues new users have when dealing with Wine in Ubuntu.  What is the recommended way of installing Wine, some of the key issues that it has and how to solve them?  If I have a specific problem with an App in Wine, how do I go about solving it? What are the recommended steps to ensure that I can fix a problem related to an app I wish to use?


I need to install Oracle 18C XE version in ubuntu. Can you guys give me a guide for this installation?

I have downloaded Oracle 18C XE the rpm file, but I don't know how to install the database.


My brother asked me this (for some reason).  My solution is:  $(3^{4n}-2^{4n})\bmod{65}=$  $(81^{n}-16^{n})\bmod{65}=$  $((81\bmod{65})^{n}-16^{n})\bmod{65}=$  $(16^{n}-16^{n})\bmod{65}=$  $0\bmod{65}$    I think that this solution is mathematically flawless (please let me know if you think otherwise).  But I'm wondering if there's another way, perhaps with the binomial expansion of $(81-16)^{n}$.  In other words, something like:  $3^{4n}-2^{4n}=$  $81^{n}-16^{n}=$  $(81-16)^{n}+65k=$  $65^{n}+65k=$  $65(65^{n-1}+k)$  How would I go from "$81^{n}-16^{n}$" to "$(81-16)^{n}+65k$"?

I did some mathematical induction problems on divisibility   $9^n$ $-$ $2^n$ is divisible by 7. $4^n$ $-$ $1$ is divisible by 3. $9^n$ $-$ $4^n$ is divisible by 5.   Can these be generalized as $a^n$ $-$ $b^n$$ = (a-b)N$, where N is an integer? But why is $a^n$ $-$ $b^n$$ = (a-b)N$ ?  I also see that $6^n$ $- 5n + 4$ is divisible by $5$ which is $6-5+4$ and $7^n$$+3n + 8$ is divisible by $9$ which is $7+3+8=18=9\cdot2$.  Are they just a coincidence or is there a theory behind?  Is it about modular arithmetic?


Lots of questions from me today. Here is my command so far:  /give @p minecraft:writable_book 1 0 {pages:[""],display:{Name:"Command Book",color:purple}}   I want a simple command book but I'd like it to look nice, with a colored name for when I hover over it in my inventory. I have tried and tried and searched the internet, but without third party sources I cant find a way to spawn it with a colored name within a command block. Can anyone help?

I came across a map and when I was playing I found some coloured and bolded item names. I thought it isn't possible as at most you can only use the custom name tag to rename things! Is there a way to colour and bold item names in vanilla Minecraft? External programs are OK. Oh, and the wiki page of formatting codes doesn't really do much.


Let $\displaystyle a_n = \sum_{m=1}^{n} (n \mod m)$ where $0 \le n \mod m \le m-1$. It appears that $a_n \sim Cn^{\alpha}$ with $\alpha = 2$ and $C \approx .177448$. Is this true, and if so why?

I learnt that      $$\lim_{n\rightarrow \infty} \frac{1}{n^2}\sum_{k=1}^{n}(n \bmod k)=1-\frac{\pi^2}{12}$$   where $ (n{\bmod {k}})$ is the remainder upon division of $n$ by $k$. However, I am not sure how to arrive at this equation.   I understand that   $$\infty \bmod 1 = 0$$ But I don't see how infinity can mod anything else. For example,  $$\infty \bmod 2 = ~?$$ $$\infty \bmod 3 = ~?$$ I am thinking about either converting the limit into an integral, but I haven't figured out how. Any hints on how to evaluate the limit?  I also found a more general form of the limit (not sure if this will help with the original question): For $a>0,~b\geq1$, $$\lim_{n\rightarrow \infty} \frac{1}{n^2}\sum_{k=1}^{an}(an \bmod bk)=a^2\left(1-\frac{\pi^2}{12b}\right)$$


I've recently started using PHP and decided to create a website with an attached SQLite database. All was running smoothly until I ran into a very confusing issue. The query in the function below returns with 0 rows, no matter what parameters are passed in.  public function articleListSearch($blog_id, $search_for, $search_column){         $sql = "SELECT article_id, article_name, article_content, art_img FROM articles WHERE parent_blog = :blog_id AND :search_column LIKE :search_for";         $stmt = $this->pdo->prepare($sql);         $stmt->execute([             ":blog_id"=>$blog_id,             ":search_column"=>$search_column,             ":search_for"=>"%{$search_for}%",         ]);         $results = [];         while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)){             $results[] = [                 'article_id' => $row['article_id'],                 'article_name' => $row['article_name'],                 'article_content' => $row['article_content'],                 'art_img' => $row['art_img'],             ];         }         return $results;     }   Now, the reason this is so confusing to me is that a similar query returns the correct number of rows with the correct data. To create the articleListSearch function, I literally modified the code from the following query and modified the SQL and execute() parameters.  public function search($param){         $sql = "SELECT blog_id, blog_name, about, cover_img FROM blogs WHERE blog_name LIKE :param ORDER BY hits DESC";         $stmt = $this->pdo->prepare($sql);         $stmt->execute([             ":param"=>"%{$param}%",         ]);         $results = [];         while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)){             $results[] = [                 'blog_id'=>$row['blog_id'],                 'blog_name'=>$row['blog_name'],                 'about'=>$row['about'],                 'cover_img'=>$row['cover_img'],             ];         }         return $results;     }   I'm sure the issue is something small that I've overlooked, but I can't find it.

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


I have conducted 2 tests for my event study.   One is the parametric T test which rejected the null hypothesis, and my returns on event day is very significant.   However, I have conducts the non-parametric rank test. No matter using event window 1 day to 20 days, I couldn’t reject any null hypothesis. My return on the event day is way higher than the rest of the days, still it cannot reject the null hypothesis   Does anyone know what could affect on this? I have tested the normality, it is not normally distributed.   EDIT: @jbowman @EdM The event study deals with announcement returns of a large M&A transaction in the US. Data for the returns was obtained from Thomson Reuters. Assuming the data to be normally distributed I started using the market model and t-test. For the market returns I use the S&P 500 index. I use different event windows to see if for example, insider trading occurs before the event date. My estimation window is 220 days, event window in the largest specification 41 days.  The non-parametric rank test is the Corrado test, based on his paper from 1989 (see link below). I use this test since it is easily implemented in Excel, and it was recommended by my finance lecture as check for parametric tests. In the Corrado test abnormal returns obtained from the market model are ranked and compared to the average return.   On the announcement date I have large abnormal returns (31%) that are highly statistically significant at the 1% level (t-value 16.4). The abnormal return on the event date is ranked 1st, however for the announcement date I only obtain a p-value of 8%. Therefore, I wonder why a return ranked first, is not significant at conventional levels. I have checked my calculation multiple times, and do not think i have made an error. The file provided by my university shows similar results for announcement returns of another company, that has large abnormal returns on the announcement date. If I extend the event window, with multiple extreme returns occurring after another, the rank test becomes significant.   Corrado (1989):


In the dialect I grew up with (1960's Leicestershire/East Midlands), I'd say "me", when I meant "my". For example:  "That's me car."  vs  "That's my car."  What I have wondered for a long time is, am I saying "my" with a different pronunciation, "m-ee" vs "m-eye". Or am I, in the dialect, using an entirely different part of speech, pronoun vs possessive. 5000 miles and 40 years away, I'll still often say "me" instead of "my".

Native North American speaker here.   It's fairly common in certain British dialects to substitute "me" for "my" (Shiver me timbers) in informal speech. My impression is that some speakers mix the two. What are the descriptive rules for selecting between the two variants? Specifically, I'm asking about usage of  A non-standard variant of my (particularly in British dialects) is me. (This may have its origins in the fact that in Middle English my before a consonant was pronounced [mi:], like modern English me, (while me was [me:], similar to modern may) and this was shortened to [mi] or [mɪ], as the pronouns he and we are nowadays; [hi wɒz] he was; versus [ɪt wɒz hi:] it was he. As this vowel was short, it was not subject to the Great Vowel Shift, and so emerged in modern English unchanged.)  () As an example, here is an excerpt from the character Daisy in Downton Abbey:  DAISYSomeone walked over me grave.  () Someone please supply a video clip of this speech pattern.   I'm sure it can be found, but I can't.


Is there an easy way to calculate the homology groups $$H_k(\mathbb{R}\setminus \{0\}), k\geq 0$$ I was able to calculate $H_k(\mathbb{R}^m\setminus \{0\}), m > 1$ because we have a homeomorphism onto the sphere $S^{m-1}$ whose homology groups I know, but we do not have $\mathbb{R}\setminus \{0\} \cong S^0 = \{-1,1\}$ so for $m=1$ this approach fails. Of course, $H_0(\mathbb{R}\setminus \{0\}) \cong \mathbb{Z} \oplus \mathbb{Z}$ since there are two path components.

I have written a proof for the following and would like you to correct me if I made any mistakes, thanks in advance:  claim: $X = \sqcup_i X_i$ then $H_q (X) \cong \oplus_i H_q (X_i)$  proof: Proof of case $X = A \sqcup B$, the general case follows by induction.  By the Mayer-Vietoris theorem the following sequence is exact:  $$ \dots \xrightarrow{k_\ast} H_{n+1}(X) \xrightarrow{\partial_\ast} H_n(A \cap B) \xrightarrow{(i_\ast, j_\ast)}  H_n(A) \oplus H_n(B) \xrightarrow{k_\ast} H_n(X)\xrightarrow{\partial_\ast} \dots$$  Then $A \cap B = \emptyset \implies H_n(A \cap B) = 0 \implies \partial_\ast = 0$  Then $k_\ast$ is injective because $ker k_\ast = im \partial_\ast = 0$ and $k_\ast $ is surjective because $im k_\ast = ker \partial_\ast = H_n(X)$


I hope my question fits superuser. I am a PhD student and I must use a software on my computer at the faculty's office but unfortunately, the informaticians are not at the university since a quite long time and I can not install the software myself because the computer requires an administrator password in order to install softwares.  Is there any way to open and use a software without installing it to the computer ? For example, installing the software on the USB key ? or another method ?  Any help highly appreciated.

I've tried applications like Mojo and portableapps creator but either it doesn't work or I need Administrative rights (Mojo).  How can I get a simple install app to work on my USB without being an Administrator?


I was using Python to add some simple numbers together, and I got a strange result  >>> 16+4.8+6.4+0.48+1.92+.48 30.080000000000002   That is clearly not the right answer, so why does Python add that extra bit? How reliable is Python for more complicated computations?

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


Is it legal to target myself with Warding Bond?  It would be great to have +1 to saves and AC for 1 hour without concentration.

Find Familiar lets you cast touch spells through your familiar. Warding Bond is a Touch spell, that creates a connection between "you and the target". I can't find anything against it, but would it be possible to have my Wizard make his familiar cast Warding Bond on the Wizard himself, so that the Wizard gets the +1 to AC and saving throws and resistance to damage?  I realized after I wrote this much that Wizards don't get Warding Bond, but I think the question is still valid for multiclassers.


I have an Australian visitor Visa valid till end of Dec 2019. My passport got renewed in February 2019 and I only just got around to informing them of the change via form 929. The reply was it will be updated within approx 4 weeks!   (1)Since I had done a paper application for the visa , I don't have an Immi account. Is that why it is taking so long? If I had done the visa application via Immi account would it have been faster?  (2) If it doesn't get updated fast enough, can I travel with the old and new passports as well as my 929 submission proof and hope the airlines will do the updation before they let me board? Or is that a risk? What are my chances of getting turned back?  (3) The visa itself took 37 days (although they said 29 days)to come and I couldnt travel with my family in December. What are others experiences in getting passport details updated after submitting 929?

I transferred my visa to my new passport and it’s saying it takes 2 weeks to come, my flight is Sunday I arrive in Sydney Monday at night, I still have my old passport! If I bring that will they let me go into the country because my new one literally arrived two days ago! And the visa will be transferred in 2 weeks! Will I have to push my flight or will I be left?


I am working on Problem 4.4 in Atiyah & Macdonald, which asks the reader to show the following: In the polynomial ring $\mathbb{Z}[t]$, the ideal $m = (2,t)$ is maximal and the ideal $q = (4,t)$ is $m$-primary, but is not a power of $m$. Specifically, I'm struggling with showing that $q$ is not a power of $m$. Here is a solution to that part: $q \neq m$ because $2 \notin q$. $q \neq m^2 = (4,2t,t^2)$ because $t \notin m^2$. For $n \geq 2$, $m^n \subset m^2$ by induction. Thus, $t \notin m^n$ for any $n \geq 2$, and $q \neq m^n$ for any $n \geq 2$. Therefore, $q$ is not a power of $m$. My question is, how can we see that $m^n \subset m^2$ for $n \geq 2$ by induction? Thank you!

Let $R$ be a ring and $I,J$ ideals of $R$. Let $$IJ = \left\{ \sum_{i=1}^n a_ib_i \big\vert\ n \geq 0, a_1,\cdots, a_n \in I, b_1,\cdots,b_n \in J \right\}$$ i) Show that IJ is an ideal of R and $IJ \subset I \cap J$. ii) Let $K$ be another ideal of $R$. Show that $I(J + K) = IJ + IK$.  i) In order to show that $IJ$ is an ideal, I need to show that $\forall r \in R\ \forall s \in IJ: r s r^{-1} \in IJ$, right? Let $r \in R$ be arbitrary, $s\in IJ = (a_1b_1)+\cdots+(a_kb_k)$. $rsr^{-1} = r( (a_1b_1)+\cdots+(a_kb_k))r^{-1} = (\underbrace{ra_1}_{\in I}b_1)+\cdots+(\underbrace{ra_k}_{\in I}b_k) \in IJ$, as I is an ideal of R, and therefore any $r\cdot a_i$ is, right? So what about $IJ \subset I \cap J$? If I consider a single summand $a_ib_k$, that the result need to be in I as well as in J, because both are ideals of R. But why does this apply for the whole sum? ii) I have no idea, do you have a hint for me?


Having a record of all actions taken on a site, as is provided by the "activity" and "votes" tabs of our profile, comes in handy very often. Perhaps the most common case is being able to find a question I've interacted with in the past, to see if anything has changed about it. This applies to questions a user has protected as much as anything else. Users are theoretically encouraged to unprotect questions when it's no longer necessary, as emphasized , but in practice they often do not. In many cases it's hard to blame them: unless they specifically marked it as a favourite, the site doesn't keep any record of the question to allow them to find it again. We should help users more easily review their own protections in the future.    For personal review, the votes tab is adequate, but there may also be value in displaying this publicly in the activity tab. In the past I have specficailly noticed users with a history of repeatedly protecting questions over-egearly. It would be useful to be able to review other users' protection histories to see if this is the case. Even if this is not available to regular users, it may be helpful to moderators, unless their user activity views already allow them to filter down to see this.

Having a record of all actions taken on a site, as is provided by the "activity" and "votes" tabs of our profile, comes in handy very often. Perhaps the most common case is being able to find a question I've interacted with in the past, to see if anything has changed about it. This applies to questions a user has protected as much as anything else. Users are theoretically encouraged to unprotect questions when it's no longer necessary, as emphasized , but in practice they often do not. In many cases it's hard to blame them: unless they specifically marked it as a favourite, the site doesn't keep any record of the question to allow them to find it again. We should help users more easily review their own protections in the future.    For personal review, the votes tab is adequate, but there may also be value in displaying this publicly in the activity tab. There may be users with a history of repeatedly protecting questions over-eagerly. It would be useful to be able to review other users' protection histories to see if this is the case. Even if this is not available to regular users, it may be helpful to moderators, unless their user activity views already allow them to filter down to see this.


from datetime import date, timedelta as td  d1 = date(1980, 1, 1) d2 = date(2000, 1, 1)  delta = d2 - d1  for i in range(delta.days + 1):     print d1 + td(days=i)   How would I make it so it displays it in this form: dd/mm/yy Thanks :)

This is my code:  import datetime today = datetime.date.today() print(today)   This prints: 2008-11-22 which is exactly what I want.  But, I have a list I'm appending this to and then suddenly everything goes "wonky". Here is the code:  import datetime mylist = [] today = datetime.date.today() mylist.append(today) print(mylist)   This prints the following:   [datetime.date(2008, 11, 22)]   How can I get just a simple date like 2008-11-22?


covers the ownership of the droids in the "official" canon but I've never been entirely clear about their specific ownership in the other Star Wars properties out there.  Who owned the droids in the Legends continuity?

Is there any concrete evidence that Anakin officially owned R2-D2 or C-3PO?  I found this episode of Star Wars: Clone Wars that shows it, but it's fairly vague...


If there was really such a book that contained all sports results (football, baseball, races etc.) within 50 years, wouldn't it be a little bit thicker than just a magazine size?  Maybe something like this:

So, the main plot device in Back to the Future II (aside from the DeLorean) is Gray's Sports Almanac 1950-2000.  As we're now in 2015, the statistics must be available, so my question is does the book (or at least a book very similar to that i.e. not necessarily that thin or by Gray's!) exist?


In A Song of Ice and Fire universe, how do people know that a man is a knight? Is there any symbol or proof by which people know someone for a knight? Is there any written proof to prove a person's knighthood?

Motivating scenario:  I'm a swell upstanding guy, so Ser/Lord X, an acquaintance of mine, knights me. So I walk into my village tavern; the barkeep asks "What'll it be, friend?" and I tell him "That's 'Ser' to you now. I have been knighted by X!" He sneers and goes "well then, X can call you Ser if he likes."  Actual Question:  What about a person's being knighted makes the knighting 'stick'? Is it the identity/standing of the knighter (is that a word?) ? Is it the fact that many other knights walk around telling people that the new guy is also a Knight? Is it the public nature of the knighting?  The  says  about knighting:     This usually happens when a squire reaches adulthood and his master   judges him worthy of accepting the responsibilities of a knight. A man   who has not been raised in the knightly tradition can also be made a   knight as a reward for service. This is often granted to soldiers or   other smallfolk who have shown bravery or performed a great feat.   Notes:   I'm only asking about Westerosi Andal-culture Knights, around the time of Robert I Baratheon's rule.


I have a maximization problem with an objective function of two variables. To prove the concavity of the function, is it sufficient to prove that it is concave with respect to each of the variables? Does the concavity of the function wrt each variable result in its joint concavity?  Thank you in advance.

I have a function $f:\mathbb{R}^p\rightarrow\mathbb{R}$. For the purposes of illustration let's say that $p=2$. I want to prove that $f$ is convex. Suppose I can show that both  $f(\alpha x_1 + (1-\alpha)x_2,y)\leq\alpha f(x_1,y)+(1-\alpha)f(x_2,y) \quad \forall y \in \mathbb{R}$  and  $f(x,\alpha y_1 + (1-\alpha)y_2)\leq\alpha f(x,y_1)+(1-\alpha)f(x,y_2) \quad \forall x \in \mathbb{R}$  is true, i.e. I can show that the resulting univariate functions obtained by holding all but one of the arguments fixed is convex.  Is this sufficient to prove that $f$ is convex in $x$ and $y$? Namely  $f(\alpha x_1 + (1-\alpha)x_2,\alpha y_1 + (1-\alpha)y_2)\leq \alpha f(x_1,y_1) + (1-\alpha)f(x_2,y_2)$.  I am looking for a proof or counter example.   Merely applying each conditional inequality sequentially gives $f(\alpha x_1 + (1-\alpha)x_2,\alpha y_1 + (1-\alpha)y_2)\leq \alpha^2 f(x_1,y_1) + \alpha (1-\alpha) f(x_1,y_2) + \alpha (1-\alpha) f(x_2,y_1) + (1-\alpha)^2 f(x_2,y_2)$  If $f$ is a convex function, this implies the first two univariate inequalities of this post. This post is asking if the reverse direction holds.


Consider an equation $\frac{dy}{dx}=y - x$. Is there a solution to this? If so, will it have a local mininum along $y=x$? Sorry if the question is not specific, this is the best I can phrase it, and I don't really understand how to approach the problem.

$$\frac{dy}{dx} = x-y$$  How do I separate so I can integrate both sides? Thanks for getting me started.  I know the solution is $$ y = x-1+2e^{-x}$$


I wonder if this is a broken functionality just on the stack exchange that I'm part of. I've subscribed to ethereum.stackexchange.com and I have three watched tags solidity parity and ethereum-classic and I've been watching them since mid-October 2018 but I have yet to receive any emails about new questions asked with those tags in it. Checking those tags manually shows that they are being used for asking questions on the site.  I guess the email functionality isn't working? Not sure what's causing this.

There used to be subscribe button in the popup window which appears when you hover the mouse over a tag. It then sent you a confirmation e-mail and later it was sending e-mail feeds when new question tagged with the tag appeared.  The subscribe button is not there anymore. How can I subscribe to the e-mail notifications?    Old duplicate question:


Blake2b has a lightning fast compression function with more-than-overkill security even against quantum attacks.  It seems to be based on ChaCha, but with 64-bit words and different rotation constants.  Is it possible to use this compression function with feed-forward as a stream cipher?  If not, would a different variation on ChaCha with a 64-bit word size be secure?

Can I use ChaCha with four rounds as a good non-cryptographic PRNG with different streams if I use 64 bit integers instead of the standard 32 bit integers? I need a bigger state and this seems the easiest way to do it.


I read the explanation by Ocram  about how to calculate the stddev of coefficients in linear regression.  I also run experiment with my sample data. I have test1 which contains 1000 samples; I then created   test2 = pandas.concat([test1, test1])   and run the same regression again. It is true that the standard deviation of each coefficient ($\beta$) decreased.   However, I cannot visually think about this behavior. Can anyone provide an intuitive visual explanation why the stddev goes down when I duplicate my samples?

Suppose I have a random sample $\lbrace X_i, Y_i\rbrace_{i=1}^n$. Assume this sample is such that the Gauss-Markov assumptions are satisfied such that I can construct an OLS estimator where  $$\hat{\beta}_1^{OLS} = \frac{\text{Cov}(X,Y)}{\text{Var(X)}}$$ $$\hat{\beta}_0^{OLS} = \bar{Y} - \bar{X} \hat{\beta}_1^{OLS}$$  Now suppose I take my data set and double it, meaning there is an exact copy for each of the $n$ $(X_i,Y_i)$ pairs.  My Question  How does this affect my ability to use OLS? Is it still consistent and identified?


After messing up the .bashrc and then sourcing it when I was installing ROS, my ubuntu system is ruined. Now the terminal is missing. Doing Ctrl + Alt + T does nothing. No left or top bar. There is nothing but the desktop. I can't even do a right click on the desktop. Everything is  missing except for the console, it appears when I do Ctrl + Alt + F1 but I can't exit from it. I have tried the solution posted  but it didn't work.   I'm using ubuntu 14.04.4

When I login, nothing happens.   I am presented with my desktop wallpaper.    No Dash, no Launcher, nothing.


Why is the word 'Hello' used universally to begin a phone call? What was the origin of it?

The word hello seems to have become popular with the coming of the telephone. Did our ancestors greet each other with ahoy before that?


In ESB, at the end of Hoth's attack, Vader saw the Falcon take off.  He's looking for Luke Skywalker. For him, Luke is on the ship, according to this:     "Our pursuit ships have sighted the Millennium Falcon, my lord. It has   entered an asteroid field.” “Asteroids don’t concern me, Admiral,”   Vader said as he slowly clenched his fist. “I want that ship, not   excuses. How long until you will have Skywalker and the others in the   Millennium Falcon?”   (ESB - Novelisation)  Why is he certain that Luke is onboard of the Falcon? He hasn't seen him...  Has he sensed, via the Force, that a Skywalker was onboard?  If so, was it not Luke, but rather Leia?

In The Empire Strikes Back film, the opening crawl says:     The evil lord Darth Vader, obsessed with finding young Skywalker, has dispatched thousands of remote probes into the far reaches of space....   It has also been established in Return of the Jedi that Force users can sense each other:     Chewie whines nervously. Luke stares at the Huge Super Star Destroyer    that looms ever larger before them.      LUKE: Vader's on that ship.   If Darth Vader is obsessed with finding Luke and he can sense his presence, the obvious thing to do would be to follow Luke's X-Wing after the battle of Hoth rather than the Millennium Falcon. Why didn't he?


This is in an Algebra and Combinatorics module and I don't know how to prove this. The full question is,  Let $n$ be a natural number greater than $1$. Suppose that $n$ is a factor of $(n-1)!+1$. Prove that $n$ is prime.   Any help would be greatly appreciated -thanks.

How can I show that $(n-1)!\equiv-1 \pmod{n}$ if and only if $n$ is prime? Thanks.


Todd is asking Dan about his concept of slow travel. The following passage is part of  Dan's reply.     Yeah, I mean especially maybe because I'm a blogger, we're always   seeking to define things in unique ways. And there’s a lot of terms   out there. There’s expat; people that have left their native country.   There’s backpacker, which is someone who tries to keep their cost very   low and they’re continually moving from place to place. There’s flash   packer, which is a term that means you still have income from   somewhere and you have more tech and toys, and you stay at maybe nicer   hotels.      But what I did was always a little bit different, which is I would go   and get long term leases or medium term leases at apartments. So I   would go and get a house or an apartment in a place for anywhere from   one to six months, and enjoy what it feels like to actually live   somewhere.And that to me is so exciting, you know. Although the   sights and everything are cool, and hanging out with tourists can be   fun, I much prefer to go down to the local café, open up my laptop,   talk to the people that are working there, and really get a sense for   what it’s like to live in a city. (From   )   At first the speaker is using the present tense (the entire first paragraph). Then he suddenly starts using the past tense(did, would go, would go), and then returns to the present tense again.   The speaker could well have said the following instead to keep the tense consistency.      But what I do is always a little bit different, which is I go and   get long term leases or medium term leases at apartments. So I go   and get a house or an apartment in a place for anywhere from one to   six months, and enjoy what it feels like to actually live somewhere.   I want to know why the speaker chooses the past tense over the present tense in the beginning of the second paragraph.  Thanks for the comments and the answer which help me clarify my question.

For example:  "Last week, I found out that NASA stands for 'National Aeronautics and Space Administration.'"  or  "Last week, I found out that NASA stood for 'National Aeronautics and Space Administration.'"


How to remove the launcher border?  The orange border (my background image is orange):

Is this a bug or is it expected?  How can it be solved if it's not expected?


I know that $\mathbb{C}[x]$ stands for polynomial in $x$ with coefficients from $\mathbb{C}$, so that is  $$a_0+a_1x+a_2x^2+ \dots a_nx^n \in \mathbb{C}[x]$$  Than what is $\mathbb{C}[[x]]$?

What does $\mathbb{Z}[[t]]$ mean? Why are there double square brackets?  I can't search through Google, because I can't search Latex.


Hi I am trying to import a height-map and create a 3d model of it, but when I import it the resolution of it is very low. I've seen it done in youtube videos and it seems I am doing the exact same, but their image imports at a much higher resolution and therefore they get much more detail in their model. My heightmap is 2017x2017 pixels. Anyone knows why this is happening?  I am very new to blender. I added a plane, a subdivision surface and a displace modifier

Trying to do some golf course layouts in 2.73a. Would like to use topo elevation info. Currently have grayscale .jpg of site - top view. How do I get this into Blender as a "lumpy" plane?


I'm looking for some books on abstract algebra which go into a lot of depth and still ensure I gain a lot of intuition.  Any suggestions?

I've taken up self-study of math. (How smart can that be?) I've just about finished a course in real analysis which spent a lot of time on metric spaces and some time revisiting calculus.  I was thinking of trying abstract algebra. I would appreciate any book recommendations.  Thanks in advance.  Andrew


Is it true that the number $$\frac{b^3+1}{ab-1}$$ is never an integer for positive integers $a$ and $b$ such that $a\geq 6$ and $a\geq b$?

Question:     Find all ordered pairs $(m,n)$ where $m$ and $n$ are positive integers, such that $$\dfrac{n^3-1}{mn-1}$$ is an integer.   I know this problem is very simaler this 1994 IMO,problem 4,But My problem is different. This IMO problem is :  Find all ordered pairs $(m,n)$ where $m$ and $n$ are positive integers, such that $$\dfrac{n^3+1}{mn-1}$$ is an integer.  this problem solution can see   Thank you for you help to solve this


Which one is better in the following sentence? I think I can use both.    [Even though/Even if] we wear fashionable clothes, we can't be truly beautiful without good manners.

Are these two totally synonymous? Can one be used in place of the other anywhere? Are there any differences in nuance, or anything at all?


How can I change <textarea> height (or row) when input text wraps? It has a fixed length so when input wraps to another line I want textarea's height (or row) to increase. HTML  <textarea name="message" rows="1" class="message" placeholder="Send a message"></textarea>   CSS  textarea {   resize: none;   padding: .5em;   width: 320px; }

There was , which I've tried. But there is one problem: the textarea doesn't shrink if you delete the content. I can't find any way to shrink it to the correct size - the clientHeight value comes back as the full size of the textarea, not its contents.  The code from that page is below:  function FitToContent(id, maxHeight) {    var text = id && id.style ? id : document.getElementById(id);    if ( !text )       return;     var adjustedHeight = text.clientHeight;    if ( !maxHeight || maxHeight > adjustedHeight )    {       adjustedHeight = Math.max(text.scrollHeight, adjustedHeight);       if ( maxHeight )          adjustedHeight = Math.min(maxHeight, adjustedHeight);       if ( adjustedHeight > text.clientHeight )          text.style.height = adjustedHeight + "px";    } }  window.onload = function() {     document.getElementById("ta").onkeyup = function() {       FitToContent( this, 500 )     }; }


This is weird.  I always heard the rule about removing the other person's name, but what's the deal in this case? "[Person] and I." would be the subject, so that seems like it is right, but I don't think I would just say "I." in response to the question.  Edit: My question was flagged as maybe a duplicate. I suppose it is different because I am asking if I were to include another person in the answer.

With the enthusiastic question of "Who wants ice-cream?", what is the more correct response?         (Not) I.   (Not) me.      Neither response is a sentence. The first response of "(not) I" sounds stuffy, like it should be followed with an indignant sniff. The second sounds like American idiom and acceptable for casual speech.    What do you say?


The lexical and direct meaning of albeit seems approximately equal to the meaning of although. I would like to know what the practical differences in usage of the two aforesaid words are in sentence making.

What are the differences between albeit, although, howbeit, however, and though?


How to find the sum of the following series ? Kindly guide me about the general term, then I can give a shot at summing it up.  $$1 - \frac{1}{4} + \frac{1}{6} -\frac{1}{9} +\frac{1}{11} - \frac{1}{14} + \cdots$$

Find the limit of the following series:  $$ 1 - \frac{1}{4} + \frac{1}{6} - \frac{1}{9} + \frac{1}{11} - \frac{1}{14} + \cdot \cdot \cdot  $$  If i go the integration way all is fine for a while but then things become pretty ugly. I'm trying to find out if there is some easier way to follow.


I'd like to iterate on all contrib modules, pull their repos and extract information (such as drush commands, graph dependencies, etc.)  Is there a way to list all modules, other than scraping ?

Is there a drupal.org API for retrieving the list of available modules, a description of them and available versions?


Let $X$ be a continuous random variable with uniform distribution between $0$ and $1$. Compute the distribution of $Y = \sin(2\pi X)$.  $\sin(2\pi \cdot0)$ and $\sin(2\pi \cdot1) =0$. So, the inverse image of the function has multiple roots. How can I find the PDF of $Y$ then?

Let $X$ be a continuous random variable having uniform distribution on $[0, 2\pi]$. What distribution has the random variable $Y=\sin X$ ? I think, it is also uniform. Am I right?


Ubuntu version: Ubuntu-12.04.2-desktop-amd64.iso Computer Configuration: X86-compatible desktop computer model Operating system: Windows XP Professional 32-bit SP3 (DirectX 9.0c)    Hardware Processor: Intel Pentium (Pentium) Dual-Core E5300@2.60GHz Motherboard: ASUS P5G41T-M LX V2 (Intel 4 Series Chipset - ICH7) Memory: 4GB (Shitai DDR3 1333MHz) Hard Drive: Seagate ST500DM002-1BD142 (500GB / 7200 rpm / min) Graphics: Intel G41 Express Chipset (256MB / ASUS) Monitor: MON2150 ANALOG (21.5 inches) Optical Drive: Toshiba - Samsung CD/DVDW TS-H652H DVD burner Sound Card: Realtek ALC887 @ Intel 82801G (ICH7) High Definition Audio NIC: Realtek RTL8168E PCI-E Gigabit Ethernet NIC / ASUS    Using Universal-USB-Installer-1.9.3.6.exe I made a boot disk. I restarted my computer, pressed F8, selected USB boot, then got no response from the computer, only a black screen. I removed the USB drive on the restoration of normal Windows start.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I want to prove whether the following is true using congruencies: If $n$ is odd and $3\not | n$, then $n^2\equiv 1\pmod{24}$. I tried a direct proof. Let $n=2k+1$ for an integer $k$ such that $3\not| n$, or $3c=n+r$ such that $r=1$ or $r=2$ for an integer $c$. Then in the first case, $3c=n+1$ implies $n\equiv 1\pmod 3$. Or in the second case, $3c=n+2$ implies $n\equiv 2 \pmod 3$. Then $$n^2\equiv 1 \pmod 3 \text{ or } n^2\equiv 4 \pmod 3$$ iff $$3|{n^2-1} \text{ or } 3|n^2-4$$ or $$8n^2\equiv8, 32 \pmod{24}$$ This was the farthest I got. I'm having a hard time going from mod 3 to mod 24 just given the conjunction that $n$ is odd and that $3\not| n$

Let $p>3$ be a prime. Prove that $24 \mid p^2-1$.   I know this is very basic and old hat to many, but I love this question and I am interested in seeing whether there are any proofs beyond the two I already know.


I'm trying to make a list in Python 3.4.3 containing numbers between -10 to 10 with a step of .1 difference, so that my list becomes: a =[-10.0,-9.9,-9.8,-9.7............. 9.9,10]  I also want to draw a graph using matplotlob.pyplot , Here's my code:   import numpy as np import matplotlib.pyplot as plt a = [] b = [] for i in range(-10,10,.1):     a.append(i) npa = np.array(a) npb= np.array(b) npb = 1 / (npa**2) plt.plot(npa, npb) plt.show()   But I'm getting error saying:     for i in range(-10,10,.1):     TypeError: 'float' object cannot be interpreted as an integer Any solution,please?  and for these lines:  a = [] b = [] for i in range(-10,10,.1):     a.append(i)   is there any shorter code?

Is there a way to step between 0 and 1 by 0.1?   I thought I could do it like the following, but it failed:  for i in range(0, 1, 0.1):     print i   Instead, it says that the step argument cannot be zero, which I did not expect.


For starters, we know that a trirectangular tetrahedron is a tetrahedron where all three face angles at one vertex are right angles.   Here's an interesting property I stumbled upon, of which I look for an elegant proof:  (For the sake of explanation, I shall model this tetrahedron in the Cartesian plane, with origin as a vertex and the three normal vectors of the three faces intersecting at the origin, along the coordinate axes)  And here it goes  Consider the plane, $$ \frac{x}{a}+\frac{y}{b}+\frac{z}{c}=1 $$ forming a tetrahedron OABC, with the XY, YZ, and ZX planes. O is the origin, and A,B,C are the other three vertices. The property is, that, the foot of perpendicular from O, on plane ABC, is the orthocentre of triangle ABC.  I have already proved it, with an analytic approach (extending the Cartesian model I describe above), however, I'm looking for a rather elegant, and possible geometric proof for this property.   Please share your ideas and proofs, thanks a lot!   P.S. Feel free to ask for the analytic proof (It's probably too obvious, and also undesirably lengthy) which I've completed. (I shall attach a picture of the handwritten work to this post)

Consider a tetrahedron with a right-angle corner (like the corner of a cube) at $D$. Prove that the foot of the height from $D$ to the face ABC is the orthocenter of $ABC$.  Is this well-known?


I'm currently pursuing a Masters degree in Philosophy at a top UK university, and as my grades currently stand, I'm looking to graduate with a Distinction.  During my second and third years of undergraduate study, I was struggling with diagnosing and dealing with a medical issue. Unfortunately, this affected my grades in several modules throughout those two years. My undergraduate degree transcript features a patchwork mixture of Firsts, 2.1s and then a couple of those 2.2 grades. As a result, I graduated with a low 2.1 overall. Of course, this is all documented, supported by my physicians, and my supervisors were aware of my situation.  My issue is that I am now in the process of preparing to apply to PhD programs in Philosophy. I am hoping to apply to several Canadian institutions to be closer to family, but I will likely apply to some UK institutions too. I can see that GPA is an important factor in the admissions process.   My questions are:  How far will my undergraduate underperformance be likely to affect my chances of admission, and what can I do to strengthen my application to these programs in light of this?  Will my strong Masters GPA be enough to counterbalance my undergraduate transcripts?

Suppose you do bad in undergraduate school in say computer science. But you do very well in a masters program in computer science. If you want to apply to a PhD program in computer science, will the masters degree grades offset the undergraduate degree grades?


Every Christmas, Harry receives a mediocre gift from the Dursleys. In Harry Potter and the Chamber of Secrets he gets a toothpick.     At that moment, Hedwig swooped into the room, carrying a very small package in her beak.     “Hello,” said Harry happily as she landed on his bed. “Are you speaking to me again?”     She nibbled his ear in an affectionate sort of way, which was a far better present than the one that    she had brought him, which turned out to be from the Dursleys. They had sent Harry a toothpick    and a note telling him to find out whether he’d be able to stay at Hogwarts for the summer    vacation, too.    They hate owls, but obviously use them to contact Harry at school?

How do muggles with children at Hogwarts (for example, Hermione's parents) communicate with their children while they're at school? The students are able to send owls but does that mean the parents can only send letters when their students send an owl? What if it's an emergency? What if their children never send an owl?


This is more of a question about my understanding of the concept; suppose we have a normal linear model $Y = X\boldsymbol{\beta}+\epsilon$, where $\epsilon \sim N(0,\sigma^{2}I_{n})$ and $\boldsymbol{\beta}$ is the vector of unknown parameters.  When we estimate the unknown parameter $\boldsymbol{\beta}$ using the maximum likelihood approach, are we basically finding the $\boldsymbol{\hat{\beta}}$ that maximises the probability of obtaining a set of realisations ($y_{1},...,y_ {n}$) given our covariates? E.g. if we postulate that two variables have such a relationship and we know the realisations of the response and also the covariates, we want to maximise the probability that the model spurts out the values of the realisations?

Could anyone explain to me in detail about maximum likelihood estimation (MLE) in layman's terms? I would like to know the underlying concept before going into mathematical derivation or equation.


please help me so that i can use all windows applications and softwares so i could daily use ubuntu.I need microsoft office 13,photoshop cs6,nero 10 and other all softwares to support in my ubuntu software please help to make the ubuntu os which is installed in my pc to support exe files.

Can .exe and .msi files (Windows software) be installed in Ubuntu?


As a condition, I am equating two variables String a and String b. They are exactly the same, in fact I printed the values to the logcat and they are the same string, no extra spaces. But whenever I equate them (a == b), I am getting false back. I even printed out the value with  Log.v("BOOLEAN", Boolean.toString(a == b));   And I got false back. Though when I print out the values sandwiched between the letters I (to make sure there weren't spaces on the end messing the string up), I get  V/BOOLEAN: I123I123I   This is the relevant code  user_pin = USER_PIN.getText().toString();      DatabaseOperations DOP = new DatabaseOperations(ctx);     DOP.open();     Cursor CR = DOP.getRow(id);     CR.moveToFirst();     user_pin_database = CR.getString(3);      Log.v("BOOLEAN", "I" + CR.getString(3) + "I" + user_pin + "I");      if (user_pin == user_pin_database) {...}   Does anyone know what's causing this?

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I've created a web app where you can leave recommendations for a person, a person can have multiple recommendations, and got to the point where I'd like to view all recommendations for a particular Person. Once I click on the link to view the recommendations I get an error saying :      'KeyValuePair <`string, Recommendation> does not contain a definition for 'Recommendations' and no extension method 'Recommendations' accepting a first argument of type 'KeyValuePair' could be found.    Here's some of my code, hopefully someone can help me resolve this issue I've been stuck on for hours.   Recommendation Controller   using Lab3Models.Models; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc;  namespace Lab3Models.Controllers {     public class RecommendationController : Controller     {         private static IDictionary<string, Person> _people = null;                  ....          public ActionResult Show(string id)         {             if (Session["people"] != null)             {                 _people = (Dictionary<string, Person>)Session["people"];             }             else             {               _people = new Dictionary<string, Person>();                 Session["people"] = _people;             }             if (!_people.ContainsKey(id))             {                 return HttpNotFound("Sorry, but can't find id: " + id);             }             return View(_people[id]);             }     } }    Person & Recommendation Models    public class Person     {         public string Id { get; set; }         public string FirstName { get; set; }         public string MiddleName { get; set; }         public string LastName { get; set; }         public ICollection<Recommendation> Recommendations { get; set; }          public Person()         {             Recommendations = new List<Recommendation>();         }     }   public class Recommendation     {          public string Id { get; set; }         public int Rating { get; set; }         public string Narrative { get; set; }         public string RecommenderName { get; set; }         public Person ThePerson { get; set; }     }     Show View    @model IDictionary<string, Lab3Models.Models.Recommendation>
@ViewBag.Title

                      Id         	                      Rating         	                      Narrative         	                      Recommender's Name
                   @foreach (var item in Model)     {         foreach (var rec in item.Recommendations)         {
                                      @item.Value.Id                 	                                      @item.Value.Rating                 	                                      @item.Value.Narrative                 	                                      @item.Value.RecommenderName
         }     }
     Please, any help would be great.   EDIT Iterating over a dictionary isn't my problem though, I've iterated through my person dictionary already to display all people I've added to the list. My problem is showing the list of recommendations for a particular person from the original person dictionary.

I've seen a few different ways to iterate over a dictionary in C#.  Is there a standard way?


My disk have 3 partition, one for system and others for store data. I can change its label, but I can not change path for that partition. My partition have a "work" label name, but I must input /media/dd7e8652-201e-4ea6-bb9b-8469091ecb25 to access in command line.  How can I access via /media/work command?  Thank for any command and answer :-)

When I mount the logical volume through Unity dash or the File Manager it creates the mount point at /media/$USER/557808d2-b3a5-4bf2-b84b-93a3b42ce36a.  I want to change the volume label from 557808d2-b3a5-4bf2-b84b-93a3b42ce36a to some simple string like 'data' and keep it as it is permanently, so that it wont change next time when I mount it.  How do I do that?


5 persons own a safe with a number of locks (arranged parallel, i.e. all locks must be opened to open the safe).  One lock can have any number of keys. The owners want any combination of (a minimum of) 3 persons to be able to open the safe.   I can see that one solution is to have 5!/(3!2!)=10 locks and distribute the keys according to the permutations owners. But is that also the minimum number of locks?  Edit: following new searches using the work "lock" I see that the question might be a duplicate. I see also that my own solution may be wrong according to a comment

Eleven scientists want to have a cabinet built where they will keep some top secret work. They want multiple locks installed, with keys distributed in such a way that if any six scientists are present then they can open all the locks, but if only five are present then they cannot open all the locks. What is the minimum number of locks on the cabinet that would satisfy these conditions?


I am new to this whole thing and I was wondering if there is an easier way to travel between folders, like I just type one thing and I get to see what folders and I can go into and then I press one button and I'm in them, cause that seems more convenient and easier.

In the Ubuntu terminal I find myself spending considerable time to switch to a particular directory every time the computer starts up. Is there some way I can make this process easier? Is there some hotkey or some quick directory change that I can use (like speed dial on a phone)?   eg:     cd 1:Changes to saved directory one


I have built a dll for libtensorflow, and I now wish to add it to my Visual Studio 2019 C++ project. Can anybody help me do this? If I click Reference->Add Reference I cannot find my dll. I want to add an external item as a link, but whenever I do that VS does not give me the option to add as a link. Any suggestions? Thank you.

I have a solution in VS 2008 with 2 projects in it. One is a DLL written in C++ and the other is a simple C++ console application created from a blank project. I would like know how to call the functions in the DLL from the application.  Assume I am starting with a blank C++ project and that I want to call a function called int IsolatedFunction(int someParam)  How do I call it?


In Cocoa, there is a method () on NSAttributedString to find appropriate line breaks in a piece of text.  Since NSAttributedString does not exist on the iPhone, does anyone have any suggestions for similar functionality?  Edit: Realized that I'm really looking for a word-wrap algorithm. For example, I want the text to wrap at 80 characters; where do I place line breaks so that words are not split over two lines?  Edit: An example will probably help. Say I have the following lines: Here is line 1 that probably won't even be 80 characters long. Here is another line with different text that is longer but not by much.    I would like to turn that into something like: Here is line 1 that probably won't even be 80 characters long. Here is another line with different text that is longer but not by much.  Edit: I'm looking to place this text in a UITextView so that additional edits can be made (very similar to a quoted reply with emails)

Word wrap is one of the must-have features in a modern text editor.  How word wrap be handled? What is the best algorithm for word-wrap?  If text is several million lines, how can I make word-wrap very fast?  Why do I need the solution? Because my projects must draw text with various zoom level and simultaneously beautiful appearance.  The running environment is Windows Mobile devices. The maximum 600 MHz speed with very small memory size.  How should I handle line information? Let's assume original data has three lines.  THIS IS LINE 1. THIS IS LINE 2. THIS IS LINE 3.   Afterwards, the break text will be shown like this:  THIS IS LINE 1. THIS IS LINE 2. THIS IS LINE 3.   Should I allocate three lines more? Or any other suggestions?


I want to store the text users enter into a textarea in a website into a javascript variable in order to compare it to another variable already defined.  How would you do it? Any hints? Thanks in advance!

Recently I have started playing with jQuery, and have been following a couple of tutorials. Now I feel slightly competent with using it (it's pretty easy), and I thought it would be cool if I were able to make a 'console' on my webpage (as in, you press the ` key like you do in  games, etc.), and then have it Ajax itself back to the server in-order to do stuff.  I originally thought the best way would be to just get the text inside the textarea, and then split it, or should I use the keyup event, convert the keycode returned to an ASCII character, append the character to a string and send the string to the server (then empty the string).  I couldn't find any information on getting text from a textarea, all I got was keyup information. Also, how can I convert the keycode returned to an ASCII character?


I'm having trouble figuring out this if statement in this code:  import java.util.Scanner;  class TrafficSignal2 {      public static void main(String[] args) {         Scanner keyboard = new Scanner(System.in);         char approachingGreen;         char safeToProceed;         char officerDirectingNotToProceed;          System.out.print("Are you approaching a green light? (Y/N) ");         approachingGreen = keyboard.findWithinHorizon(".", 0).charAt(0);          System.out.print("Is it safe to proceed? (Y/N) ");         safeToProceed = keyboard.findWithinHorizon(".", 0).charAt(0);          System.out.print("Is is a traffic officer directing you not to proceed? (Y/N) ");         officerDirectingNotToProceed = keyboard.findWithinHorizon(".", 0).charAt(0);          if ((approachingGreen == 'Y' || approachingGreen == 'y') &&                  (safeToProceed == 'Y' || safeToProceed == 'y') &&                  (officerDirectingNotToProceed != 'Y' && officerDirectingNotToProceed != 'y')) {             System.out.println("Go");         } else {             System.out.println("Stop");         }          keyboard.close();     }  }   source ()  Why doesn't the code work when I use the || logical operator instead of the && in   (officerDirectingNotToProceed != 'Y' && officerDirectingNotToProceed != 'y')   When I use || it tells the user to 'Go' when it should say 'Stop' right?  What am I seeing wrong?  Thank you


So, recently, I got this old computer. I put Windows XP on it, and that was fine, but last name I put Ubuntu 12.04 on it, but some error about the graphics came up, so I assumed the graphics was just too old. I was planning on removing Ubuntu 12.04 and then maybe installing an older version, or just not getting it. Well, I've never removed Ubuntu off a computer before, so I just assumed that you delete the partitions Ubuntu was on. Apparently not. Now, when I start up the computer, I get command line-like prompt that is something like 'grub>' and says 'filesystem not recognized' or something like that. How do I get it to boot on Windows XP again?

I get this error:  Error: unknown filesystem. grub rescue>   I'm not exactly sure what I did. I believe I installed Ubuntu over Windows on my Acer netbook. I then tried to install , but it wouldn't start installing.  I turned the netbook off and back on. Now I get the error.  I have read a lot of other questions like this, but in my case I cannot boot a CD. If I put a Ubuntu CD or a Linux Mint CD into my external CD/DVD drive and change my BIOS to boot the CD-ROM first, it just gives me the same error screen.  Update copied from comment dated 2012-05-26 02:54:29Z  Here are some results from my commands:   grub rescue>ls (hd0) (hd0,msdos5) (hd0,msdos1)  grub rescue>ls (hd0,msdos5) unknown filesystem  grub rescue>ls (hd0,msdos1) unknown filesystem  grub rescue>ls (hd0) unknown filesystem


Prove that every subset of a metric space $M$ can be written as the intersection of open sets.  My attempt:  If $A\subset M$ is open, $A$ can be written as $A\cap M$, which is the intersection of 2 open sets.   If $A\subset M$ is closed, it can presumably be written as the intersection of infinitely many open sets. But I'm not sure how.  And what if $A\subset M$ is neither open nor closed?

Show that any set contained in the metric space $(X, d)$ can be   written as the intersection of open sets.   Definitions: A set $A \subseteq X$ is open if $\forall x \in A$, $\exists \varepsilon>0$ such that $B_{\varepsilon}(x) \subseteq A$. A set $C \subseteq X$ is closed if and only if $X \setminus C$ is open.   I also know that the intersection of a finite collection of open sets is open and that any open ball contained in $X$ is open. How can I prove this question?


I recently bought a VPS with Ubuntu 18.04 (Server) on it, and ever since I've started using it I've been spammed by one of my friends regarding that he wants an account. I wanna take some revenge on the spamming by pulling a prank on him by creating an account that has no access to any binary file/command, the goal is to make his account only be able to write in the command line but really have no access to execute any commands. His account won't be added to the sudoers list.  Is there any way to achieve this?  Thanks, Richard.

Can I create a whitelist of commands that a standard user can execute in the terminal in Ubuntu 12.04 desktop?  I don't want to block the terminal for the standard user.