I am a British citizen residing in South Africa. In June I will be visiting family in the UK accompanied by my South African wife who holds a valid C Business visa (expiring in 2018). Under the new regulations, can my wife use her existing visa to enter the UK or must she apply for a new visitor visa?

I already have a 6 month valid UK business visa received prior to April 24 2015. I was supposed to travel to the UK in April, but my trip was cancelled on medical grounds.  I am now planning to visit the UK in July for tourism. Would it be fine for me to do so? Will I be allowed to enter the UK? Should I carry the original invite letter and medical certificate to prove why I didn't go the first time?


Recently I saw some of the developers coding their VOs with nested builder class like   public class User {      private String firstName;     private String lastName;      public String getFirstName() {         return firstName;     }      public void setFirstName(String firstName) {         this.firstName = firstName;     }      public String getLastName() {         return lastName;     }      public void setLastName(String lastName) {         this.lastName = lastName;     }      public static class UserBuilder {          private String firstName;         private String lastName;          public User build() {             User user = new User();             user.firstName = firstName;             user.lastName = lastName;             return user;         }          public UserBuilder withFirstName(String firstName) {             this.firstName = firstName;             return this;         }          public UserBuilder withLastName(String lastName) {             this.firstName = firstName;             return this;         }            }  }   Now, they claim that this makes code more readable. My point is, this has following disadvantages:   I can't simply add fields and expect my IDE to complete code for me, as now I need to update this inner class too. Simple POJOs are carrying code which is not relevant for VO.   I am looking for any advice if I am missing something here. Feel free to add your thoughts about the same.   Sample code after this modification looks like,  User user = new User.UserBuilder()                 .withFirstName("Name")                 .withLastName("surName")                 .build();

What are some common, real world examples of using the Builder Pattern?  What does it buy you?  Why not just use a Factory Pattern?


I have a shapefile attribute table on display. After some processing, I have to right click click Refresh to get updated version of table. I am wondering if there is a way using arcpy to update it automatically every time I make an edit to shapefile.  Note: I have a dialog box with values which I change based on my requirement and press recalculation which gives me updated attribute table.

I am running the Calculate Field GP tool from the arcpy in ArcMap. When a row value is updated, it does not show up untill I use the Reload Cache tool (Table Options > Reload Cache). How do I refresh the attribute table automatically without using ArcObjects?  I have tried updating the definition query as @blah238 suggested , but this doesn't help. Resetting the data source is not an option because the feature class might be in the editing session and I don't want to lose the connection to the source data.


Imagine a two-dimensional grid that all $(2k+1, 2k+1)$ are prohibited. Suppose the origin $(0,0)$ is in the bottom-left corner and the point $(2n,2n)$ is the top-right corner. A path on the grid consists of a series of moves in which each move is either one unit to the right or one unit up. Diagonal moves are not allowed. How many diﬀerent ways are there to construct a path starting at $(0,0)$ and ending at $(2n,2n)$, avoiding all the prohibited points $(2k+1, 2k+1)$?  I'm a little stuck on this one. Seems it can be counted by a lot of inclusive-exclusive computation, but is there a simpler result?

How many lattice paths are there from $(0,0)$ to $(2n,2n)$ that do not go through one of the points $(2i-1,2i-1)$ for $i=1,\dots,n$?   My idea is to count the number of total lattice paths one can take from $(0,0)$ to $(2n,2n)$. There are ${4n \choose 2n}$ such paths. Then subtract the number of paths that are not valid. In counting these, I reasoned that we must avoid the "odd points" inside the grid with height and width of $2n$. I counted the number of paths that take these of points to be ${4 \choose 2}^{n-1}{2 \choose 1}{2 \choose 1}$ with the reasoning that from $(0,0)$ to $(1,1)$, there are ${2 \choose 1}$ paths, similarly for $(2n-1,2n-1)$ to $(2n,2n)$. Now, there are a total of $n-1$ "odd points" we consider and the number of paths from say $(1,1)$ to $(3,3)$ is ${4 \choose 2}$, we consider $n-1$ such scenarios. But in comparing my result, it is wrong, I seem to be undercounting the number of invalid paths that I need to subtract from the total paths.    Edit: The result is expected to be the Catalan numbers of the form $C_{2n+1}$.  Edit 2: I've reworked the problem to make the first couple of terms match $C_{2n+1}$, by removing from the total number of lattice paths the invalid paths (a sum of all the possible cases by which we choose how many and which odd points our invalid path has gone through). It seems to be some recursive function, any ideas how to express this recursively?


Suppose $a>0, b>0, c>0$.   Prove that:  $$a+b+c \ge \frac{3}{2}\cdot [(a+b)(a+c)(b+c)]^{\frac{1}{3}}$$     Hence or otherwise prove:    $$\color{blue}{\frac{a}{b+c}+\frac{b}{a+c}+\frac{c}{a+b}\ge \frac{3}{2}}$$

I am currently attempting to prove the following inequality   $\dfrac{a}{b+c}+\dfrac{b}{a+c}+\dfrac{c}{a+b} \geq \dfrac{3}{2}$ for all $ a,b,c>0$   My instinctive plan of attack is to use the AM/GM inequality with $x_1=\dfrac{a}{b+c}$ etc.  Using that I get this  $\dfrac{a}{b+c}+\dfrac{b}{a+c}+\dfrac{c}{a+b} \geq 3\times \sqrt[3]{\dfrac{abc}{(a+b)(b+c)(a+c)}}$   From here, I used the fact that $(a+b)(b+c)(a+c)\geq 8abc$, which can be easily proven by considering that $a+b\geq 2\sqrt{ab}$   But by using this, I get the following...  $\dfrac{a}{b+c}+\dfrac{b}{a+c}+\dfrac{c}{a+b} \geq 3\times \sqrt[3]{\dfrac{abc}{(a+b)(b+c)(a+c)}} \leq 3 \times \sqrt[3]{\dfrac{abc}{8abc}} = \dfrac{3}{2}$   Everything seems so perfect because I get the value $\dfrac{3}{2}$ as required, but this method isn't valid due to the change in direction! What is going on?  Is there a way of proving this inequality otherwise then?


Actually  would solve my question about how to use the extrayear parameter in biblatex-chicago-style but I have another special case:   \documentclass{article} \usepackage[authordate,backend=biber,maxnames=1,minnames=1]{biblatex-chicago} \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @article{Smith2012,   author = {A. Smith and S. Else},   title = {A title},   journal = {A Journal},   year = {2012}, } @article{Smith2012b,   author = {A. Smith and B. Schmidt},   title = {Another title},   journal = {Another Journal},   year = {2012}, } \end{filecontents} \addbibresource{\jobname.bib} \usepackage[colorlinks=true,citecolor=red]{hyperref}  \begin{document}  \cite{Smith2012} said something \cite{Smith2012b} said something else  \printbibliography \end{document}   Will give:  Smith and Else 2012 said something Smith and Schmidt 2012 said something else   However, I'd like it to be:  Smith et al. 2012a said something Smith et al. 2012b said something else   Can anyone think of an easy way?

In the header of my document I set the maximal author names to 2:  \usepackage[style=authoryear-icomp, maxbibnames=9, maxcitenames=2, backend=biber]{biblatex}   Now, when I cite texts with two authors, LaTeX gives me the following:     (Author_A/ Author_B 2012: 232)   When I have three authors or more, LaTeX makes it:     (Author_A/ Author_B et al. 2012: 232)   But I want LaTeX to just name the first author if there are more than two authors ... like this:     (Author_A et al. 2012: 232)   Any tips on how to achieve this ?


I am trying to use a column that has a comma delimited list of values in an in clause.  I thought about doing a contains but it would not be correct when searching for single digit values. Example:  1,5,12,14,16,15,18,19,23,24,25,26,27,28,29,31,32,33,34,35,36,37,38,40,41,43,44,45,47,48,49,51,53,54,55,56,57,59,61,62,63,64,65 This is the error that I am getting:  [MySql.Data]   ErrorCode: -2147467259, Number: 1064   ErrorMessage: You have an error in your SQL syntax; check the manual that   corresponds to your MySQL server version for the right syntax to use near   'cpei5.value' at line 12   Here is my query: SELECT soi.* FROM   sales_order_item soi        INNER JOIN sales_order so             ON  so.entity_id = soi.order_id        INNER JOIN sales_order_address soa             ON  soa.parent_id = so.entity_id        INNER JOIN catalog_product_entity cpe             ON  cpe.sku = soi.sku        INNER JOIN catalog_product_entity_text cpei5             ON  cpei5.row_id = cpe.entity_id        INNER JOIN eav_attribute ea5             ON  ea5.attribute_code LIKE 'state_not_allowed'             AND ea5.attribute_id = cpei5.attribute_id WHERE  soa.address_type = 'shipping'        AND date_add(so.created_at, interval 365 DAY) >= CURRENT_DATE()        AND date_add(so.created_at, interval 365 DAY) <= date_add(CURRENT_DATE(), interval 30 DAY)        AND cpe.type_id = 'simple'        AND soa.region_id IN cpei5.value

I have a simple mysql table which I use as a server booking system. A user can log in to a server, if he has a valid booking for that server. A sample data might look like this:  +----------+----------------+---------------------+---------------------+ | server   | user           | start               | end                 | +----------+----------------+---------------------+---------------------+ | server01 | Alice,Bob      | 2013-10-28 00:00:00 | 2013-12-31 00:00:00 | | server02 | Carlos         | 2013-10-28 00:00:00 | 2013-12-31 00:00:00 | | server03 | Dan,Erin,Frank | 2013-10-28 00:00:00 | 2013-12-31 00:00:00 | +----------+----------------+---------------------+---------------------+   To check whether user Carlos has a booking for server02, I use the following SQL query:  SELECT 0, id FROM booking WHERE user = 'Carlos' AND (( start < now() and end > now() ) AND server = 'server02') ;   But this query does not work if there are multiple (comma-separated) users. How can I check if Alice has booking for server01 ?


I have a list with collection names collection_names = ["Collection", "Collection 2"] and I want to duplicate this collections. How to do this? Thanks!

Is it possible to duplicate a collection from a Python script? When I do it manually, the Console shows bpy.ops.outliner.collection_duplicate(), however if I call it from script, there is a problem with context: RuntimeError: Operator bpy.ops.outliner.collection_duplicate.poll() failed, context is incorrect Does that mean that collection_duplicate() can be called only from the Outliner editor? If so, how to 'fake' it from a script?


I log in to stackoverflow using Google account. I then logout by clicking logout link. It then takes me to a page where below message appears:     Clicking Log Out will clear our cookies and log you out on all   devices.   And I click on Logout button provided. After I press that button I am redirected to stackoverflow home page.  All works well till here. But if I open the Google page in the same window by entering URL www.google.co.in, I see that I am still logged into the Google account.  Why is it happening? Why aint I completely logged out after clicking on Logout button?  I am using Mozilla Firefox 23.0.

Why does logging in to Stack Overflow keep me signed in to my Gmail email after logging out and regardless of the Stay signed in checkbox?  Steps to reproduce:   Browse to  and confirm you are logged out Browse to  and confirm you are logged out Click login Click Google Enter Email/Password and confirm Stay signed in is unchecked Click Sign in Click logout (up top) Click Logout (down below) Browse to  and confirm you are still logged in Click Sign out <- Shouldn't clicking Logout on Stack Overflow be doing the same thing as this? Browse to  and confirm you are logged out     Answers are making sense but my frustration is that clicking Logout (twice) on StackOverflow essentially does nothing. If I proceed to click login and Gmail I am immediately authenticated because I still have an active Gmail cookie. In order to effectively logout I need to click Logout twice on Stack Overflow and then manually browse to  and Sign out.


I have noticed the following weird behavior on PSE and MSE, and I believe it probably applies to many more SE websites :  whenever one loads the 'new' tab for questions, all the questions displayed are shown with a "asked xx minutes ago" text. However when new questions come in, they are displayed with a "modified xx seconds ago" text. Why is that ?

I commonly review , sorted by newest, and just now it showed "1 question with new activity":        So as always, I clicked on that bar to show it.  showed here as "modified".         But yet, when I opened it up, it didn't show that it was modified.  It's my understanding that if you modify your question within the first minute or so, it doesn't show as a modification. The OP did in fact quickly edit their question right after asking it, after I asked them.  Shouldn't this say "asked" for instead of "modified"?  After refreshing, it shows "asked". But when I clicked on the message to show new activity, it showed "modified".


for $n \ge 1$ , Let $f(n)$ be the number of ternary sequences {$0,1,2$} of length n,  that the sum of their characters are even, and they have at least one show of $0$.  How do i find the recurrence relation for f(n), thanks in advance.

I'm trying to find a recursive formula for all the ternary (using ${0,1,2}$) sequences of length $n$ which contain at least one zero, and have an even sum of digits.  My attempt so far is added below. I think the idea is right, but the recurrence relation I get fails when setting in numbers (and it's not always an integer..). any ideas?     Denote with $f\left(n\right)$ the number of legal sequences as in the question, $\bar{f}\left(n\right)$ as the number of sequences with at least one 0 with an odd number of digits, and as $g\left(n\right)$ the number of sequences with an even sum of digits and with no zeroes.      For any sequence, the sum of digits would be even if and only if there is an even number of 1s, therefore any legal sequence of length $n$ can be achieved in a unique way out of the following:      • Starting from a sequence where the digits are even and there is no zero, append zero at the end. There are $g\left(n-1\right)$ such sequences.      • Starting from a legal sequence of length $n-1$, append 0 or 2 at the end, adding $2f\left(n-1\right)$ sequences.      • Starting from a sequence with a zero where the sum of digits is odd, append 1 at the end, adding $\bar{f}\left(n-1\right)$ sequences.      These gives us that $$f\left(n\right)=2f\left(n-1\right)+\bar{f}\left(n-1\right)+g\left(n-1\right)$$      Considering $g\left(n\right)$ first, we are interested in strings of length n from $\left\{ 1,2\right\} $ with an even number of 1s. There's a simple bijection to the set of strings of length $n$ with an odd number of 1s by “flipping” the first value, and as these sets include all possibilities with no overlap, it follows that $g\left(n\right)=2^{n-1}$.      Next looking at $\bar{f}\left(n-1\right)$. We can use the fact that the sequences with a zero where the sum of digits is odd and the sequences with a zero where the sum of digits is even are exactly a disjoint union of all the sequences with a zero.      As there are $n\cdot3^{n-1}$ such sequences (we first choose one location to be 0, and fill the rest normally), we get that $\bar{f}\left(n\right)+f\left(n\right)=n\cdot3^{n-1}$, or $\bar{f}\left(n\right)=n\cdot3^{n-1}-f\left(n\right)$      Putting this all together we get that $$f\left(n\right)=2f\left(n-1\right)+\left(n-1\right)\cdot3^{n-2}-f\left(n-1\right)+2^{n-2}  or f\left(n\right)=f\left(n-1\right)+\left(n-1\right)\cdot3^{n-2}+2^{n-2}$$


Currently I do not belong to any institution and work from home.  Now can I put the name of the last university I attended  in place of affiliation in a journal paper?   I have masters degree from Linkoping University, Sweden. Do I need to ask permission in this case ?  Regards, Umair

Recently my paper is reviewed (by a professor from independent third party) and accepted by a journal. But, my employer allows me to publish this paper only without its name there.  Publishing house is expecting affiliation for each author, i.e. I can not leave affiliation as blank.   What should I write as the affiliation?


So, I'm not necessary new to Linux, I just never took the time to learn it, so please, bare with me.  I just swapped out one of my wireless cards from one computer to another. This wireless card in question would be a "Broadcom BCM4321 (14e4:4329)" or actually a "Netgear WN311B Rangemax Next 270 Mbps Wireless PCI Adapter", but that's not important. I've tried (but probably screwed up in the process) installing the "wl" , "b43" and "brcmsmac" drivers, or at least I think I did. Currently I have only the following drivers loaded:  eugene@EugeneS-PCu:~$ lsmod | grep "brcmsmac\|b43\|ssb\|bcma\|wl" b43                   387371  0  bcma                   52096  1 b43 mac80211              630653  1 b43 cfg80211              484040  2 b43,mac80211 ssb_hcd                12869  0  ssb                    62379  2 b43,ssb_hcd   The main issue is that with most of the drivers available that I've installed, they will find my wireless network but, they will only stay connected for about a minute with abnormally slow speed and then all of a sudden disconnect. Currently, the computer is hooked into another to share it's connect so that I can install drivers from the internet instead of loading them on to a flash drive and doing it offline.  If anyone has any insight to the problem, that would be awesome. If not, I'll probably just look up how to install the Windows closed source driver.  Edit 1: Even when I try the method , as suggested when this was marked as a duplicate, I still can't stay connected to a wireless network.  Edit 2: After discussing my issue with @Luis, he opened my question back up and told me to include the tests/procedures in the comments. Basically I did this:   Read the first answer of the link above when this question was marked as duplicate which involved installing removing bcmwl-kernel-source and instead install firmware-b43-installer and b43-fwcutter. No change of result and contacted Luis in the comments, who then told me to try the second answer which involved removing my previous mistake and installing bcmwl-kernel-source Now the Network Manger (this has happend before, but usally I fixed it by using a different driver) even recognizes WiFi exist (both non-literal and literal). Luis who then suggested sudo rfkill unblock all rfkill unblock all didn't return anything, so I decide to try sudo rfkill list all. Returns nothing (no wonder rfkill unblock all did nothing). I enter lsmod | grep "brcmsmac\|b43\|ssb\|bcma\|wl" and that returns nothing. Try loading the driver by entering sudo modprobe b43 and try lsmod | grep "brcmsmac\|b43\|ssb\|bcma\|wl" again. Returns this:  eugene@Eugenes-uPC:~$ sudo modprobe b43 eugene@Eugenes-uPC:~$ lsmod | grep "brcmsmac\|b43\|ssb\|bcma\|wl" b43                   387371  0  bcma                   52096  1 b43 mac80211              630653  1 b43 cfg80211              484040  2 b43,mac80211 ssb_hcd                12869  0  ssb                    62379  2 b43,ssb_hcd   So to recap: Currently Network Manager doesn't recognize Wireless exists, b43 drivers are loaded and I've currently hardwired a connect from my laptop to the computer that's causing this.  Edit 3: So I just decided to try again to install bcmwl-kernel-source. It was able to find my network and it tried to connect. However, in never really succeeded and kept asking me for the network pass phrase. I give it the correct one every time but it keeps asking about three times and then stops trying. At this point I'm starting to research how to use ndiswrapper but haven't had any luck with that either.  Edit 4: After crying in a corner for about a month, I've decided to do a fresh install of Ubuntu and install the Broadcom STA drivers (wl.ko) right off their website. It does indeed find networks and seems to know how to connect to them, however, It will connect to them for a few minutes with very slow connection speed and then just drop. That was with the Wicd Network Manager too, with just plain old network-manager, it will keep asking for my password to connect to the network never actually connecting to the network.

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


Is there is any special meaning for raw pointer?  Is normal pointer variable and raw pointer are same?

I am programming with normal pointers, but I have heard about libraries like Boost that implement smart pointers. I have also seen that in Ogre3D rendering engine there is a deep use of shared pointers.  What exactly is the difference between the three, and should I stick on using just a type of them?


Consider the download link  http://trac-hacks.org/changeset/latest/accountmanagerplugin/tags/acct_mgr-0.4.4?old_path=/&filename=accountmanagerplugin/tags/acct_mgr-0.4.4&format=zip   with the query part  ?old_path=/&filename=accountmanagerplugin/tags/acct_mgr-0.4.4&format=zip   Downloading the file in firefox 37.0 causes the query to be resolved and a download of a .zip file while   wget 'http://trac-hacks.org/changeset/latest/accountmanagerplugin/tags/acct_mgr-0.4.4?old_path=/&filename=accountmanagerplugin/tags/acct_mgr-0.4.4&format=zip'   retrieves a file named acct_mgr-0.4.4?old_path=%2F&filename=accountmanagerplugin%2Ftags%2Facct_mgr-0.4.4&format=zip which one definitely should rename in order to work with it on the command line.  How to get wget to store the download as .zip with the correct name without the need to figure out this name (diff-from-_-14559-to-accountmanagerplugin_tags_acct_mgr-0.4.4-14559.zip in the example) and specify it to the -O/--output-document= option?  I checked , but adding --content-disposition doesn't help.

I'm downloading a site with wget and a lot of the links have queries attached to them, so when I do this:  wget -nv -c -r -H -A mp3 -nd http://url.to.old.podcasts.com/   I end up with a lot of files like this:  1.mp3?foo=bar 2.mp3?blatz=pow 3.mp3?fizz=buzz   What I'd like to end up with is:  1.mp3 2.mp3 3.mp3   This is all taking place in ubuntu linux and I've got wget 1.10.2.  I know I can do this after I get everything via a script to rename everything. However I'd really like a solution from within wget so I can see the correct names as the download is happening.  Can anyone help me unravel this?


I know this has been asked before, but it's still unclear whether this is an OK practice. The advice seems to never do this unless you have to, but I can think of some examples where this could be useful. For example, a program that supports encryption and signing like GPG could support generating Ed25519 keys and then use them for encryption (by converting them to Curve25519 keys) and signing (leaving them as Ed25519 keys). This would mean that only Ed25519 keys would have to be generated, preferable from the user input perspective since handling multiple key types could get confusing.

NaCl and libsodium libraries use Curve25519 for authenticated encryption (actually for sharing a key which is used for encryption) and Ed25519 for signatures. What is the purpose of using different primitives for these operations? Why just not to use the same primitive for both key-sharing and signatures?  Are there some security or performance considerations? But both key-sharing  and signing rely on multiplication of curve point by scalar so I guess you can't gain anything here by using different curves. If one of the curves is faster it should be faster in both cases.


in BGE, I have set up a near sensor for enemy tracking, however, it won't do anything, so I'm wondering if I did something wrong, I don't know if I have to attach a file, but if I do, for this question to be answered, I have it on a filehost link already to upload it The duplicate questions answer is not working, however I do have the exact same problem

None of the physics sensors in my game work, I'm trying to create an AI man that chases after a player, but for whatever reason, he just won't sense the player, I've tried copying and pasting the property name just to be sure, but that's not it.


I have a simple script to send a back-up of my db to email:  #!/bin/sh  timestamp=$(date '+%d-%m-%Y@%H:%M')  mysqldump -u root  -pPASSWORD DBNAME | gzip > /tmp/database_$timestamp.sql.gz  mutt -s "backup from DBNAME | $timestamp" my.g.mail@gmail.com  -a /tmp/database_$timestamp.sql.gz < /opt/message.txt  rm /tmp/database_$timestamp.sql.gz   saved in /opt/db_backup.sh  when I run   . /opt/db_backup.sh   I SUCCESSFULLY got email on my gmail!!!  /var/log/mail.log :        Jan 24 00:30:34 ip-173-32-37-92 postfix/pickup[1483]: 85308320E:    uid=1000 from=   Jan 24 00:30:34 ip-173-32-37-92 postfix/cleanup[1884]: 85308320E:    message-id=<20180124003034.GA1873@vista9.ru>   Jan 24 00:30:34 ip-173-32-37-92 postfix/qmgr[1484]: 85308320E:    from=, size=323952, nrcpt=1 (queue active)   Jan 24 00:30:34 ip-173-32-37-92 postfix/smtp[1887]: connect to    gmail-smtp-in.l.google.com[2a00:1450:400c:c04::1a]:25: Network is   unreachable   Jan 24 00:30:35 ip-173-32-37-92 postfix/smtp[1887]: 85308320E:    to=<my.g.mail@gmail.com>,   relay=gmail-smtp-in.l.google.com[209.85.203.27]:25, $   Jan 24 00:30:35 ip-173-32-37-92 postfix/qmgr[1484]: 85308320E:    removed      I've created a cron task: crontab -e  */1 * * * * /opt/db_backup.sh   so after a minute CRON worked:        Jan 24 00:57:01 ip-173-32-37-92 CRON[2034]: (ubuntu) CMD    (/opt/db_backup.sh)      and ... I GOT NO EMAIL :(...  /var/log/mail.log :        Jan 24 01:02:02 ip-173-32-37-92 postfix/pickup[1483]: 01DC83238:    uid=1000 from=   Jan 24 01:02:02 ip-173-32-37-92 postfix/cleanup[2038]: 01DC83238:    message-id=20180124010202.01DC83238@ip-173-32-37-92.eu-central-1.compute.internal   Jan 24 01:02:02 ip-173-32-37-92 postfix/qmgr[1484]: 01DC83238:    from=<ubuntu@vista9.ru>, size=674, nrcpt=1 (queue active)   Jan 24 01:02:32 ip-173-32-37-92 postfix/smtp[2040]: connect to    vista9.ru[81.177.141.15]:25: Connection timed out   Jan 24 01:02:32 ip-173-32-37-92 postfix/smtp[2040]: 01DC83238:    to=<ubuntu@vista9.ru>, orig_to=, relay=none, delay=30,    delays=0.01/0/30/0, dsn=4.4.1, status=deferred (connect to vista9.ru[81.177.141.15]:25: Connection timed out)      my /etc/mailname:     vista9.ru   What am I doing wrong?  thank you!

I have a script.sh file and type of this file is shellscript file. I want to make this file as application/x-executable file. How can I make it?


when I open / directory in Ubuntu 18.10,  some  directories' names are as follows, I am confused how to read them in full.  bin = binaries ? boot = boot cdrom = - dev = devices ? etc = extras ? home = - lib = libraries ? lib64 = libraries 64 bit ? media = media mnt = mount opt = ? proc = ? root = - run = - sbin = ? snap = - srv = ? sys = system ? tmp = temporary ? usr = user ? var = variable ?

In Windows there’re perhaps only a couple of important folders (by important I mean important in my logical picture of the Windows file system) in the installation drive (in my case C:\). Namely Program Files and Windows. I simply stay away from Windows folder and the “add remove program files” is good enough to handle the program files folder of Windows. Of course there’s a folder named Users where the users (who are not admins) can access only their folders.  Thus there’s a clear picture at some level in my mind of the Windows file system. In Ubuntu, when I reach the location /, there’s a huge list of folders, most of which I have no clue as to what they contain. The /bin folder seems to be the equivalent of the Windows folder in windows. The /usr folder seems like it’s the equivalent of the Users folder in Windows. But even the /home folder looks like it can fit the bill.  Please understand that I do understand, that Ubuntu (Linux) has a different character than that of Windows, i.e., there need not be exact equivalent of Windows functions, in Ubuntu. All I am looking for is a bit more clearer picture of the Ubuntu file system.   This question is a part of a bigger question which I am splitting up to make it more answerable. The original question can be found here:


I bought a 15'' MacBook Pro a few days ago and it gets too hot under load. Idle temperatures are about 40-50 degrees light use 60 degrees but opening a light game like league of legends will set the CPU at 80-90 degrees. I want to know if this is normal or not and if it will damage my battery.I still have time to return the laptop. Thank you.

My MacBook sometimes becomes hot when I'm using it, and I want to make sure it is operating within normal temperature. What's the operating temperature for the MacBook that was released in May 2016 normally?


I'm going to use a very precise potentiometer that can measure angles from 0 to 3600 degrees (10 rounds), but I only need the first 180 degrees or so in this project and I need it to be more precise than 3600/1024=3,52 degrees. I thought about connecting the pot to 5v and setting analog reference to INTERNAL (1.1V on Uno r3) so I can measure the first 1.1V with enough precision. My question is if this will damage my Arduino if the pot accidentally gives more than 1.1V. It will never increase 5V though. I have read multiple answers on the internet but I don't know who to trust. I want an answer of someone who knows what he's talking about. Will supplying up to 5V damage with analog reference set to 1.1V?

If I use the internal 1.1V reference for the ADC, and my Analog input exceeds 1.1V, lets say 2.5V, is that harmful to my microcontroller? Or will ADC value simply clip (to 0x3FF) at 1.1V?  For convenience, I am including an excerpt block diagram from the ATMega328 datasheet.


I am learning about regular expressions and don't know how to write a regular expression for selecting a whole string which can consist of any character.  For example string like " Happy coding_programming with-C"

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


It should . What I have tried so far:  \documentclass[a4paper, twocolumns]{article} \usepackage[utf8]{inputenc} \usepackage{titlesec} \titleformat{\section}   {\large\scshape}{\thesection}{1em}{\\ \hfill}  \begin{document} \section{Education}  \section{Something}  \end{document}   I will give it some more tries later on. Could be nice with some help.

If you have a TeX'ed resume, did you use a template or make your own? Are there any useful packages? What looks the most professional? How about special considerations for different areas of work (e.g. in academia)?


I'm stuck in this problem.      Let $f: R \rightarrow S$ be a surjective homomorphism of rings with kernel $K$ and let $P$ be a prime ideal in $R$ containing $K$. Show that $f(P)$ is a prime ideal in $S$.    This problem has already been posted , but I want to prove it without the corresponding between prime ideals.   My try is here: Suppose $ab\in f(P)$. Then since f is surjective, there are $p,q\in R$ such that $f(p)=a,f(q)=b$. So, $f(pq)\in f(P)$, and since $K\subset P$, $pq\in P$.  Now, I want "$pq\in P$ implies $p\in P$ or $q\in P$", but in order to imply this property, not only P is prime, but also R is commutative. However, it is not guaranteed!  How to prove it? Thanks in advance.

I'm currently trying to solve this problem.      Let $f: R \rightarrow S$ be a surjective ring homomorphism. Let $K = \ker(f)$. Assume $P$ is a prime ideal s.t. $K \subset P$. Show $f(P)$ is a prime ideal in $S$.   I solved the ideal part.   Let $y \in f(P)$, by definition then $y = f(x)$ for some $x \in P$. Now let $s \in S$. Then since $f$ is surjective $\exists r \in R$ s.t. $f(r) = s$. So then since $f$ is a homomorphism we have $f(x)\cdot s = f(x) \cdot f(r) = f(x\cdot r)$. Then since $P$ is ideal and $x \in P$, $x\cdot r \in P$, so $f(x \cdot r) = f(x)\cdot s \in f(P)$ so $f(P)$ is closed under multiplication by an element in $S$.   Now let $y, y' \in f(P)$, again by definition we have $x, x' \in R$ s.t. $f(x) = y, f(x') = y'$. By $f$ homomorphism we have $y - y' = f(x) - f(x') = f(x-x')$. Then by $P$ ideal we have $x-x' \in P$, thus $y-y' \in f(P)$.   Therefore $f(P)$ is an ideal.   The part I'm having trouble with is showing that $P$ prime implies $f(P)$ prime.   I started off let $AB \subset f(P)$, by definition we know we have $C \subset P$ s.t. $f(C) = AB$. From here I need to arrive at showing that either $A \subset f(P)$ or $B \subset f(P)$. I'm not really sure how to move forward from here but I know I somehow need to involve the fact that $K \subset P$ since I haven't used that yet.  Any help would be appreciated.  Note: I'm not assuming that $R$ or $S$ is commutative, I already know how to solve it if they are using the commutative definition of prime.


I was in creative on my Xbox One. I had just finished an awesome house and was even re-doing the village it was by. I decided to go into the nether world with a portal. I got into the Nether and explored and I couldn’t find the portal I had come in. I build another one and a spawned somewhere completely different.  I’m so stressed because the house took me so long to build and I was almost finished with the village. Is there any way that I can get my house back?

I wandered too far to go look for sheep and now I'm on a completely different island.  How do I find my way back to my house?


Here is the problem:  Let M (the sum) be 10 and N (the number of numbers) be 4.  Some possible combinations are are (10, 0, 0, 0), (5, 3, 2, 0), (8, 1, 1, 0), (8, 2, 0, 0), (6, 2, 1, 1), etc.  How do I calculate the number of possible combinations?  Thanks for the help.

How to use the  method?  Say I want to find number of combinations I can get with $x_1+x_2+x_3+x_4=22$,  where $x_i\in\mathbb{N}$.  Is this the correct time to apply the method?  This is being repurposed in an effort to cut down on duplicates, see here:     and here:


I'm trying to use command blocks for my next creation, but I'm making it so that command blocks make it for me when I press a button. However, I need to have a command that once placed in a command block, it will place another command block with a command already in it (when given a redstone signal, that is). I'm on Education Edition, so only the Bedrock Edition type of command style will work -  Java Edition won't. I have looked for a command that does this, but I can not find one.

This question was recently split into different questions for each workaround. See   meta posts for more information.   Can you use NBT tags in commands? I’ve tried commands that normally work in Java Edition like: give @s minecraft:planks 30 1 {display:{Lore:["Wooden planks"]}} give @s stone_pickaxe{Unbreakable:1b} give @s item_frame{EntityTag:{Invisible:1b}} summon villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:"emerald",Count:5b},sell:{id:"diamond_sword"}}]}} summon tnt ~ ~ ~ {Fuse:20s}


I am currently writing a paper in Latex. I am using \section, \subsection, etc. for sections. In each section I use  \begin{equation} bla... \end{equation}   for equations I have.  I want my equation to be numbered like (3.3.1), (3.3.2), ... for section (3.3) and so on, but the code I used just gave me equations numbered (1), (2), .... I am wondering how to change the way I number my equations.

Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)?  And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering?  \documentclass{book}% for "vice versa" variant, replace `book` with `article`  \begin{document}  \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section`  \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure}  \end{document}   Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?


I have Ubuntu 16.04 lts.  While removing some applications using synaptic my system crashed and then I restarted my laptop, but the system wouldn't boot.  Now I have Ubuntu 16.04.2 on a USB flash drive.  How can I install Ubuntu 16.04.2 LTS from the USB to my  laptop before booting the laptop?

I would like to see a full how-to guide on how to install Ubuntu.


I am trying to write a command that will replace \ref in a special way. It will add some text next to the number based on the last character(s) of the number \ref outputs.  I will try to explain this with an example:   If the last character of \ref output is 1 (like if it is 11, 21, etc.) then the output shall be "1'de" instead of "1" Similarly if the last character of \ref output is 5 (like if it is 5, 15, etc.) then the output shall be "5'te" instead of "5" If the last character is "0" then, the code should check last 2 characters. It will output something for 10 and another thing for 20 and so on.   So the spec goes like this:   1: 1'de 2: 2'de 3: 3'te 4: 4'te 5: 5'te 6: 6'da 7: 7'de 8: 8'de 9: 9'da 10: 10'da 20: 20'de 30: 30'da ...   It goes on forever. I will cut at some point.  I am stuck at the beginning. I couldn't get the output of \ref{} to compare it with anything. I tried the following as a first trial using etoolbox and xparsebut unfortunately failed to compare:  \NewDocumentCommand \reftr {m g}{% \ref{#1}%Outputs the output of \ref with no problem \IfNoValueTF{#2}{}{%     \expandafter\ifstrequal{\ref{#1}}{1}{'de}{'??} %this should at least give me 'de for the first crossref but it doesn't. }% }%   What am I doing wrong?

In Turkish (and possibly in other similar languages), there are suffixes that change corresponding to the word they are applied. This also holds for the numbers.   For example,   in Figure \ref{fig1}   is written in Turkish as follows:  Şekil \ref{fig1}'de   The problem here is that the suffix "de" should change according to the number rendered before it. It should be like  1'de, 2'de, 3'te, 4'te, 5'te, 6'da, ..., 60'ta, ..., 70'te, ...   I don't like to check the suffixes manually after finishing the paper. This also happens for the other cross-references like equations.  How can I do this in LaTeX?   Edit: I'm adding the complete rule as @egreg asks. The determining numbers are as follows:  0'da 1'de 2'de 3'te 4'te 5'te 6'da 7'de 8'de 9'da 10'da 20'de 30'da 40'da 50'de 60'ta 70'te 80'de 90'da 100'de 1000'de 1000000'da 1000000000'da   For all the others, the number at the end determines the suffix if it is non-zero. For example  1234'te  (4'te) 303'te (3'te)   But, if there's a zero at the end and the number is not zero, then the right-most non-zero digit determines the result:  230'da (30'da) 200'de (100'de) 4000'de (1000'de) 40000'de (1000'de) 400000'de (1000'de) 4000000'da (1000000'da)   The suffix is determined by the last read word. For example 40000 is read as "kırk bin" and it becomes "40000'de". It is the same as "1000'de" which is read as "binde".


I tried reading Wedderburn (1974)  but I'm not wrapping my head around exactly what quasi-likelihood model is, in particular with generalized estimating equations.  I understand that GEE extends GLM, but what is it about GEE that makes it quasi-like?

Question(s): What is the idea and intuition behind quasi maximum likelihood estimation (QMLE; also known as pseudo maximum likelihood estimation, PMLE)? What makes the estimator work when the actual error distribution does not match the assumed error distribution?  The  for QMLE is fine (brief, intuitive, to the point), but I could use some more intuition and detail, perhaps also an illustration. Other references are most welcome. (I remember going over quite a few econometrics textbooks looking for material on QMLE, and to my surprise, QMLE was only covered in one or two of them, e.g. Wooldridge  (2010), Chapter 13 Section 11, pp. 502-517.)


If we have two measurements of the same quantity, say, $m_1=a\pm c$ and $m_2=b\pm d$, how many sigma away are these values? In other words, when we say that two measurements are in e.g. $3$ sigma tension, which measurement sigma ($c$,$d$, or combination thereof) do we refer to?

The people say that the value measured for the Hubble constant for the  CMB is 4.4 $\sigma$ away from the value measured by Type Ia supernovae. I don't get it  The value for CMB is $H_{0} = 67.4 \pm 0.5 km s^{−1} Mpc^{−1}$ while for Supernovae $H_{0} = 74.03 \pm 1.42 km s^{−1} Mpc^{−1}$.  If I do some easy calculation (taking the mean value of $H_{0}$ as the real value for $H_{0}$ and $\sigma$ as the value measured by Supernovae  )  I get  $$\sigma=\frac{74.03-67.4}{1.42}=4.66$$  I think that is to far from $4.4\sigma$. What I am doing wrong?


Situation is I have simple mechanism, which sends messages from apex trigger to our processing server. My trigger framework creates object for every change and save it to the WorkflowQueue__c. There is job running which periodically withdraws items from WorkflowQueue__c table and sends them asynchronously outside SF.   Issue: When change on User object occurs, there is supposed to be inserted new object to the given table, but I get such message:     System.DmlException: Insert failed. First exception on row 0; first error: MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): WorkflowQueue__c, original object: User: []   Why is this happening? WorkflowQueue__c contains only some string and original User object is not edited/update. I cannot see why apex prevents me from inserting such unrelated object. I would by grateful for explanation. Thank you

I need an approach to allow delegated admins (i.e., non-Administators) to add members to Public Groups and Collaboration Groups (the GroupMember and CollaborationGroupMember objects).  I added a custom object (UserGroupRequest__c) to capture which Users should be added/removed to which Groups.    I've also built a batchable class to process the requests.  However, GroupMember is a Setup object, and CollaborationGroupMember is not.  So this doesn't work if I combine the operations in a single batchable class.  Should I instead be using 2 batch classes, calling one from the finish method of the other?    Any recommendations on how best to proceed?  Am I way off base?    Would a trigger on the Request object perhaps be better? I'm guessing that there may be a permission problem if this is attempted via a trigger as the delegated admins won't be able to add users to public Groups.  Also, I'm guessing the trigger approach would run into the same mixed DML issue - on Insert of the Custom object, I would need to Insert/Delete from GroupMember and from CollaborationGroupMember, and then perform a 2nd update on the Custom object to indicate that processing was completed...


I bought Thunderbolt 3 (USB-c) to Thunderbolt 2 by Apple and Thunderbolt Cable (0,5m). Cmd+F2 doesn't work for me. I guess it's just because Apple now prevents to use old iMacs as monitor with new Macbooks. So my question mainly is there any other non-conventional way to use my iMac as a monitor with my new Macbook? What if I run Windows in my old iMac? Would it be easier to connect it as a monitor to new Macbook?

I have a Surface Pro 4 and an iMac (late 2019). I would like to connect my Surface Pro to the iMac to use the iMac screen as a second monitor.  Is that possible?  What are the requirements to use an iMac as a second screen?


After coating my chicken with Shake & Bake, I transfer the remainder into a container and freeze it until I need it again. Is this an unsafe practice? I figure if I'm freezing meat so it won't spoil, then the Shake & Bake coating mix should be safe in the freezer until I need it again.

I love to make (and eat) buttermilk fried chicken but I always get carried away with the amount of flour I use.  I am fully aware of contamination due to raw chicken, but is it safe to keep the excess seasoned flour used to coat the raw chickens in an airtight container and use it solely for this purpose?  Before storing the flour I sift out any larger pieces.


How to add a repository using python?  I want to do this using python  sudo yum install -y http://rdo.fedorapeople.org/openstack/openstack-grizzly/rdo-release-grizzly.rpm

How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script?


Let's say there is a variable int x. It size is 4 bytes, that is 32 bits.  Then I assign a value to this var, x = 4567 (in binary 10001 11010111); So now, in memory it should look like this:  00000000 00000000 00010001 11010111  Is there a way to get the length of the bits which matter. In my excample, length of bits would be 13 (I marked them with bold). If I use sizeof (x) it returns me 4 bytes, which the size of int. How do I get only the size of bits that represent the number (without the unnecessarily zero's that follow after)?

8 bits representing the number 7 look like this:  00000111   Three bits are set.     What are algorithms to determine the number of set bits in a 32-bit integer?


In Splendor there is a max coin limit of 10. If I exceed that limit by one, Would I need to return the most recently acquired coins, or could I return any in my hoard?  The rules:     A player can never have more than 10 tokens at the end of   their turn (including jokers). If this happens, they must return   tokens until they only have 10 left. A player can return all or   some of those they’ve just drawn.

Splendor rules regarding tokens (gem coins) state:     A player can never have more than 10 tokens at the end of their turn (including jokers). If this happens, they must return tokens until they only have 10 left. A player can return all or some of those they’ve just drawn....   That phrase "those they've just drawn" is used ambiguously.  1) Does the phrase "those they've just drawn" mean you can return only those drawn on that turn?  That doesn't make sense, but the phrase could be interpreted that way (or not). Or does it simply mean that you aren't required to hold newly acquired coins for a turn?  2) Does the phrase "return all" mean that the player can return literally any number of their coins to the bank without purchasing, no matter when they were acquired?  3) Can you return coins without purchasing, even if you are below the 10 token limit?


If $f$ is Riemann integrable on $[a,b]$ then so is $|f|$   Here is my attempt:  Since $f \in \mathscr{R}[a,b]$, then $f$ is continuous almost everywhere on $[a,b]$ and is bounded. Let $V$ be a set of points where it is discontinuous so $V$ is of measure zero.  Let $S$ be the set of intervals where $f$ is negative. That is, $S=\{I_1, I_2,...,I_n\}$.  Let $T=\{x_0,x_1,...,x_p\}$ be the set of endpoints of these intervals.  Then $|f|$ is discontinous on $V \cup T$. Since $V \cup T$ is of measure zero, then $|f|$ is continuous almost everywhere on $[a,b]$. It is also bounded since $f$ is bounded.  Hence, $|f| \in \mathscr{R}[a,b]$  $\Box$  Is my proof correct? How can I improve it? What's another way to prove this?

Show that if $f$ is integrable on $[a, b]$ then $\lvert f \rvert$ is also integrable. Hint: Show that $$U (P , \lvert f \rvert) − L(P , \lvert f \rvert) ≤ U (P , f ) − L(P , f ).$$ I have: $$U (P , \lvert f \rvert) \ge U (P , f )$$ and $$ L(P , \lvert f \rvert) \ge L(P,f)$$ Thus, $$U (P , \lvert f \rvert) − L(P , \lvert f \rvert) ≤ U (P , f ) − L(P , f ).$$


Grid = ["A1","A2","A3","B1","B2","B3","C1","C2","C3"]   print("This is the grid.")   for i in range(3):     print("\t".join(Grid[(i*3):(i*3+3)]))   I was looking for a way to create a 2D 3x3 grid in Python and found this. I want to use it but I'm not sure how line 4 actually works, other than "\t".  Help much appreciated, thanks :)

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I was trying to reinstall windows but on the step "Choose a Physical Location to Install Windows On" I stumbled upon this MSR partition I knew nothing about. What is it for? Am I to delete it or leave it as it is? Which partition should I choose on this step?

I wonder what the GPT Reserved Partition and the GPT EFI System Partition are for. Do I need them and what would happen if I removed them?  Also what is it for?  I mean the 2nd and 3rd one in the picture.


Find the value of the series $\sum\limits_{n=1}^ \infty \dfrac{n}{2^n}$  The series on expanding is coming as $\dfrac{1}{2}+\dfrac{2}{2^2}+..$  I tried using the form of $(1+x)^n=1+nx+\dfrac{n(n-1)}{2}x^2+..$ and then differentiating it but still it is not coming .What shall I do with this?

How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$


Method to calculate the number of derangements for any given 'n'(length of permutation) :    Suppose, for n = 3, the derangements are as follows : -  1 : {3,1,2}  2 : {2,3,1}  (Meaning of derangement : All permutations of {1,2,3} such that no element in the permutation occurs at it's  original index )   But , the new problem is : If only first 'k' indices need to be deranged , then how many permutations are possible  ?   Example : -   n=2 and k=2 ,   Answer : (3-ways)  1){2,1,3}  2){2,3,1}  3){3,1,2}

What are the total number of ways to arrange $N$ objects such that first $K$ are deranged? That is, how many permutations of $N$ objects do not fix the first $K$?  I know the general formula for the derangement of $N$ objects. Is there any way the above problem be reduced to this one?


I want to apply an equivalence test on my sample to infer whether they are equivalent or not. Since my data are binominal [0,1] I don’t know whether the TOST procedure (tost() in R) can handle my problem or not. My data consists of one group (G) which are not equal in numbers of samples. E.g., G= 264 people. The outcome variable is binominal, such that G includes the number of Yes and NO. I want to know if I can run an equivalence test for one-portion test.  Hypothesis: H0:p1=0.5; H1: p1>0.5

I have two binomial (success=1 and failure=0) datasets and intend to apply a statistical test to show whether they are statistically equivalence or not. First dataset (x) includes around 164 data points in which 58 of them are "1" and the rest are "0". The second dataset/group (y) consists of 280 data points in which 113 of the are "1" and the rest are "0".  I applied the following test in r:    equivalence::tost(x,y,paired = FALSE, epsilon=0.15,conf.level = 0.95, alpha = 0.05)   And I got the following  results:     data:  x and y    df = 348.24    sample estimates:    mean of x mean of y     0.3536585 0.4035714      Epsilon: 0.15     95 percent two one-sided confidence interval (TOST interval):    -0.12840509  0.02857931    Null hypothesis of statistical difference is: rejected     TOST p-value: 0.01809221    Regardless of the epsilon value (which is somehow high! and shows the difference between the mean of two population), I think this function is for another type of data, Not binomial data. Does anyone know, Is this the right function to test the equivalency and if not, is there any other test which is appropriate for Binomial data?  I also applied the following test as @user2974951 suggested:   prop.test(c(58, 113), c(164, 280),alternative = 't')   And I got these results which I can not interpret:   data:  c(58, 113) out of c(164, 280)  X-squared = 0.88749, df = 1, p-value = 0.3462  alternative hypothesis: two.sided  95 percent confidence interval:  -0.1477880  0.0479622  sample estimates:   prop 1    prop 2  0.3536585 0.4035714


I have a problem with deriving the formula for the sum: $cos(\phi) + cos(3\phi) + \dots + cos((2n+1)\phi)=\dots $  Any hint of which series should be used here?

How can we sum up $\sin$ and $\cos$ series when the angles are in arithmetic progression? For example here is the sum of $\cos$ series:  $$\sum_{k=0}^{n-1}\cos (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \cos \biggl( \frac{ 2 a + (n-1)\cdot d}{2}\biggr)$$  There is a slight difference in case of $\sin$, which is: $$\sum_{k=0}^{n-1}\sin (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \sin\biggl( \frac{2  a + (n-1)\cdot d}{2}\biggr)$$   How do we prove the above two identities?


I have a page called send.email.php which sends an email - pretty simple stuff - I pass an order id, it creates job request and sends it out.  This works fine when used in the context I developed it (Use javascript to make an AJAX call to the URL and pass the order_id as a query parameter)  I am now trying to reuse the exact same page in another application however I am calling it using php file_get_contents($base_url.'admin/send.email.php?order_id='.$order_id).  When I call the page this way, the $_SESSION array is empty isempty() = 1.  Is this because I am initiating a new session using file_get_contents and the values I stored in the $_SESSION on login are not available to me within there?  --> Thanks for the feedback. It makes sense that the new call doesn't have access to the existing session...  New problem though:  I now get: failed to open stream: HTTP request failed! When trying to execute:  $opts = array('http' => array('header'=> 'Cookie: ' . $_SERVER['HTTP_COOKIE']."\r\n")); $context = stream_context_create($opts); $contents = file_get_contents($base_url.'admin/send.sms.php?order_id='.order_id, false, $context);   YET, the URL works fine if I call it as: (It just doesn't let me access session)  $result file_get_contents($base_url.'admin/send.sms.php?order_id='.$order_id);

I'm trying to get the contents from another file with file_get_contents (don't ask why). I have two files: test1.php and test2.php. test1.php returns a string, bases on the user that is logged in. test2.php tries to get the contents of test1.php and is being executed by the browser, thus getting the cookies. To send the cookies with file_get_contents, I create a streaming context: $opts = array('http' => array('header'=> 'Cookie: ' . $_SERVER['HTTP_COOKIE']."\r\n"))`;  I'm retrieving the contents with: $contents = file_get_contents("http://www.example.com/test1.php", false, $opts);  But now I get the error:  Warning: file_get_contents() [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found  Does somebody knows what I'm doing wrong here? edit: forgot to mention: Without the streaming_context, the page just loads. But without the cookies I don't get the info I need.


I was reading recently about double-faced cards. Basically, they are cards that are otherwise typical creature cards, but some condition allows you to flip them over so that they become a new card.   , introduced in the Eldritch Moon set, are one fairly noteworthy example. For instance, this    Becomes this when you flip them over    How do you actually put double-faced cards like this in your deck, given that they do not have Magic: The Gathering card backs? Is it only playable with sleeves (requiring you to pull it out and flip it over)? Or is there some other aspect that I'm unaware of?

I read about the new mechanic in Innistrad, the upcoming MTG edition, called . These cards have two faces, and no standard Magic back. They have actual creatures on both sides. In the linked article they describe two options for handling those cards:     To put a double-faced card into your deck, you have two options: You   can put your entire deck in opaque card sleeves, as many players   already do, or you can use the checklist card provided in many   Innistrad packs. If you're using checklist cards to represent any of   the double-faced cards in your deck, you must use checklist cards to   represent all of them.   I am not happy with either of these options. As a card collector I want my cards nice and clean and I will definitely not remove them from their sleeve during actual play, which is required for the first option. Those cards would take damage really fast. So this option does not work for me.  The alternative is using those checklist cards, but as far as I understand it, this requires me to keep the real cards on a separate pile. Every time I play a checklist card, I will search this pile and put the right card into play. Shouldn't be a problem if you are playing for fun at home or with people who know your deck well. But in a tournament situation, this will leak important information to my opponent. How many double-faced cards am I playing? How many of those are left? It is also very likely that my oppponent my get a glimpse at some of them while I search for a card in the pile, because double-faced cards are hard to hide.  I am considering additional cards to act as decoys. Lets say I only have 4 checklist cards in my deck but I bring 20 different double-faced cards for the exchange-pile. Would this be allowed in a tournament? Or are there better ways to handle that?


In my xml snippet there is a ToolBar in which I try to add a button to the left of the text but an error occurs while executing the code     java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.appcompat.widget.Toolbar.setNavigationIcon(android.graphics.drawable.Drawable)' on a null object reference   Code      public View onCreateView(LayoutInflater inflater, ViewGroup container,                          Bundle savedInstanceState) {      drawerLayout = getActivity().findViewById(R.id.Drawer);     settings = getActivity().getSharedPreferences("Settings", getActivity().MODE_PRIVATE);     toolbar =  getActivity().findViewById(R.id.toolbar);     toolbar.setNavigationIcon(getResources().getDrawable(R.drawable.menu)); //ERROR HERE       toolbar.setNavigationOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             drawerLayout.openDrawer(Gravity.LEFT);         }     });     viewPager = getActivity().findViewById(R.id.rager);     pagerAdapter = new MainActivity.PagerAdapter(getActivity().getSupportFragmentManager());     viewPager.setAdapter(pagerAdapter);     tabLayout = getActivity().findViewById(R.id.tabLayout4);     tabLayout.setupWithViewPager(viewPager);     tabLayout.setScrollX(tabLayout.getWidth());     tabLayout.getTabAt(5).select();     Date start = new Date();     switch (start.toString().substring(0,3)) {         case "Mon":             viewPager.setCurrentItem(0);             url = "Monday.txt";             break;         case "Tue":             viewPager.setCurrentItem(1);             url = "Tuesday.txt";             break;         case "Wed":             viewPager.setCurrentItem(2);             url = "Wednesday.txt";             break;         case "Thu":             viewPager.setCurrentItem(3);             url = "Thursday.txt";             break;         case "Fri":             viewPager.setCurrentItem(4);             url = "Friday.txt";             break;         case "Sat":             viewPager.setCurrentItem(5);             url = "Saturday.txt";             break;         default:             viewPager.setCurrentItem(0);             url = "Monday.txt";             break;     }       SharedPreferences.Editor editor = settings.edit();     editor.putString("Day", url);     editor.apply();      addListenerOnButton();     return inflater.inflate(R.layout.fragment_znonki, container, false); }   An error occurs on the           toolbar.setNavigationIcon(getResources().getDrawable(R.drawable.menu));   line  In the main activity this code works without errors

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?


Show that $e^x\ge x^e$ for all $x\ge0.$ I was playing around with splitting a number into parts (that add to the original number) and then multiplying the parts to get the result, and I found that the product is highest when the parts tended towards $e$. This inequality is a consequence of that. Is there a proof or intuitive explanation for this?

I find it very strange that $$ e^x \geq x^e \, \quad \forall x \in \mathbb{R}^+.$$   I have scratched my head for a long time, but could not find any logical reason. Can anybody explain what is the reason behind the above inequality? I know this is math community, but I'd appreciate a more intuitive explanation than a technical one.


I tried to solve it and I got answer '3'. But that is just my intuition.I don't have concrete method to prove my answer .I did like this, in order to maximize the fraction, we need to minimize the denominator .So if plug in '1' in expression,    denominator becomes '1'.Now denominator is minimalized,the result of expression is '3'. Thats how I got to conclusion.But I can't prove that " 3  is the solution" mathematically. Can anyone show me how to prove it properly

How to find the Range of function  $$f(x)= \frac{x^2-3x-4}{x^2 - 3x +4}$$ I tried to equate the expression to $y$, then cross multiplied  $$ y= \frac{x^2-3x-4}{x^2 - 3x +4}$$ $$ y(x^2 - 3x +4)= x^2-3x-4 $$ bought the terms to one side so it becomes a quadratic and made Discriminant to zero , but i cant seem to reach anywhere.. Any suggestions?


I have selected the best ARIMA(p,d,q) model via maximisation of AIC and got the estimates of its AR & MA coefficients.  However, after having subsequently modelled the conditional volatility with a GARCH(1,1) via rugarch package in $R$ (and having previously specified to consider ARMA(5,5) for conditional mean) the estimates for conditional mean comes out to be different!    Questions:   Is it normal? Why just adding  a model for conditional variance I'm affecting the conditional mean model? Should I force rugarch to use the the same estimates I got before by modelling just the residuals of the ARMA(5,5) model with GARCH? Would I get "better estimates" or not?

I have a time series that shows a nonstationary seasonal autoregressive component as well as known heteroshedasticity. In order to model the series, I have fit a seasonal ARIMA model for the mean with the auto.arima model in the forecast package in R and a GARCH model on the residuals of the ARIMA model.   Is the procedure of sequentially estimating ARIMA and GARCH model correct or would it have been better to jointly model the mean and the variance of the series? If this were correct, is there a (possibly R) function to do it?


I have windows PC with a VM installed.  I installed Ubuntu 20.04 to learn Linux. I am unable to install anything due to an Authentication required. I have seen there is a way to disable this authenication requirement. Is there a script or a list of the commands to disable it?

I have no root access on this machine.  I would like to know if there is a way I can download Ubuntu packages and install them as non-root?  Probably in my ~/bin or ~/usr/share or something like that? Would that work?


I was playing with my calculator when I tried $1.5!$. It came out to be $1.32934038817$.   Now my question is that isn't factorial for natural numbers only? Like $2!$ is $2\times1$, but how do we express $1.5!$ like this?

My TI-83 calculator doesnt allow me to do this, but using Windows calculator, I can compute the factorial of say 5.8. What does this mean and how does it work?


So I have a real challenge for the mecha manga/anime buffs around here. Here goes:  Way back in the mid 1990s, I borrowed a VHS tape from a schoolmate that was some kind of mecha anime. The only things I really remember about it are that it featured a robot character called "The Colonel", who said something along the lines of "your world has become entangled in our problems", that there was a human character called Karachi, and that it involved a subplot of a man who pretended to be mentally enfeebled in order to keep some sort of aristocratic woman from assassinating him. He later got rid of her and assumed power, and controlled a giant floating mecha without legs (a giant flying robot torso with arms basically) called "Libo" or something similar. One other scene I distinctly remember was that this aforementioned aristocratic woman went insane, was holding her dead infant son in her arms, convinced herself that the boy was still alive, and asked her terrified handmaidens to go get him something to drink.  This isn't much to go on, but if any of the above rings a bell, please let me know. I've been browsing mecha anime lists like crazy, but haven't been able to find anything so far.

This is all I can remember.  There are four worlds whose people and technology were all swapped so humans ended up with high tech mech suits that they used to kill each other. There was a supposedly handicapped prince who faked being mentally handicapped and had a giant mech suit hidden underground that he eventually used to wreak havoc on earth.  The protagonist also had a suit and he saved the day. He was in love with a girl who was from another world and when he saved the day, all the people and technology from the different worlds were sent back to their original one causing the girl to leave him. She had colored hair and the final scene was her waking up somewhere with some children commenting on her hair.  There may or may not have been a reference to the protagonists scars in the shape of the constellation of orion on his body.  Any ideas? I've searched the internet for two years trying to find it.


Prove that $5^{3^n} + 1$ is divisible by $3^{n + 1}$ for all nonnegative integers $n.$ I tried to use Proof by Induction, but I'm stuck on the case for when $n=k+1.$

The problem was to prove that $5^{3^n}+1$ is divisible by $3^{n+1}$ for all nonnegative integers.   I attempted to prove the claim by induction.  Claim: For all $ n \ge 0 $  $$ 3^{n+1} ~|~ 5^{3^n}+1 $$ Basis case: $$ 3^{0+1} = 3  ~|~ 6 =  5^{3^0} + 1 ~ ~\checkmark$$  Inductive step: Assume $$ 3^{k+1} ~|~ 5^{3^k} + 1 $$ It follows by the definition of divides, $ 5^{3^k } + 1 = 3^{k+1}\cdot m $ for some integer $m$.     Then $$~~~~~ 5^{3^{k+1}} +1 \\   = 5^{3^k \cdot 3 }+1  \\ = 5^{3 \cdot 3^k}+1   \\ = \left( 5^3 \right)^{3^k} +1  \\=  125^{3^k} +1 $$ I have no idea how to proceed. Am I on the right track? If it is possible can I get a hint. One thing I did notice is that it might be easier to prove $$ 3^{n} ~|~ 5^{3^n}+1 $$ This statement seems to be true, since the basis case is then $1|6$.


Yesterday I had flagged , question as "Not a Real Question", and my flag was declined. But when I checked the question today, it had been closed as "Not a Real Question". I don't exactly understand the reason behind this. Why is the question closed for exactly the same reason I flagged it, but my flag was declined?  No offense is meant. Just want to know how this ambiguity may have been caused, that's all.

I flagged a post and (choose one)   my flag was marked as helpful, yet nothing was done my flag was marked as declined, yet the post was deleted/edited/closed   Why?


I had booked a ticket for travel through Indian Railways using IRCTC and got a confirmed ticket. While booking, I mentioned the details of a four year old child who will also be traveling.but it does not get mentioned in ticket anywhere.   Will it create any problem while boarding the train?

I booked an e-ticket with IRCTC for my family. There was a form to fill in the children's details and I gave the information about the 1-year-old child who is going with me. Once the booking was done, I'm not able to see the child's details in the e-ticket. Even though no money is charged for children and I entered their name, why wouldn't names show on the e-ticket?


My keyboard layout is optimized for the left hand in single handed use. For right handed use key functions such as undo, redo, cut, copy and paste are becoming unreachable from home row.  How can I remap these keyboard functions, for example cut:  Ctrl+c -> Ctrl+m  I am using x11 gdm3 Display Manager on Ubuntu 18.04 with standard keyboard layout. I do not want to relocate keys.  In System settings Keyboard Shortcuts can be defined. The desired functions are not listed there. I tried to figure out which keysym is used for cut using dumpkeys -l  xmodmap allows to reposition keys but it will not work for key combinations.

In a terminal I have Alt-C and Alt-V shortcuts to copy/paste.  That's why I want make the same to system wide.  How to remap system wide shortcuts Ctrl-C and Ctrl-V to Alt-C and Alt-V?  Ubuntu 18.04


I'm having problems settings my JTextField from another class. When i press button "=" it is supposed to do calculations inside AddNumbers class and set JTextField as result of calculations. But for now it is throwing NullPointerException. I can't figure out how to set up JTextField. I have to set it inside AddNumbers due to Chain of Responsibilities Design.  public class AddNumbers implements Chain { private Chain nextInChain; public CalcGui calcgui; int result=0;  @Override public void setNextChain(Chain nextChain) {     // TODO Auto-generated method stub     this.nextInChain=nextChain; }  @Override public void calculate(Numbers request) {     // TODO Auto-generated method stub     if(request.GetCalcWanted()=="add") {         result = request.GetNumber1()+ request.GetNumber2();         this.calcgui.txtWynik.setText(String.valueOf(result)); //NULLPOINTER     }else {         nextInChain.calculate(request);     } }   And here is CalcGui class  public class CalcGui {  private JFrame frame; JTextField txtWynik;  static Numbers request; int x,y; String operation; boolean clicked = false; /**  * Launch the application.  */ public static void main(String[] args) {     EventQueue.invokeLater(new Runnable() {         public void run() {             try {                 CalcGui window = new CalcGui();                 window.frame.setVisible(true);               } catch (Exception e) {                 e.printStackTrace();             }         }     }); }  /**  * Create the application.  */ public CalcGui() {     initialize(); }  /**  * Initialize the contents of the frame.  */ private void initialize() {     frame = new JFrame();     frame.setBounds(100, 100, 270, 361);     frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);     frame.getContentPane().setLayout(null);      txtWynik =new JTextField();     Chain chainCalc1=new AddNumbers();         JButton btneq = new JButton("=");     btneq.addActionListener(new ActionListener() {         public void actionPerformed(ActionEvent e) {             request = new Numbers(x,y,operation);             chainCalc1.calculate(request);          }     });

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?


I want to get the child class name, in parent class constructor. The classes are namespaced so if I use get_class(); function, it will retrieve the entire namespace and I need only the class name of a child.  The parent class is a abstract class if that's matter.

Lets say I'm building a base class which will be extended upon by the children class. So a base class is called Base and children can be Child1, Child2, etc.  In the base class's constructor, how can i get the value of Child1/Child2?  This is all using PHP


Want to move a wordpress site to a new domain.  So far I have downloaded the existing site files and exported the .sql database.  I have a fresh install of Wordpress on the new domain, can anyone explain the next steps in what order for moving the site across please?  I have tried a few things but the database import is failing via phpMyAdmin

I'm planning to buy a domain and install a WordPress site on it at a web-hosting company.  But first I'll need to iron-out some bugs...  I got a working LAMP-stack at my home-computer, so I'm thinking about first installing my site locally - off the Internet.  I'll be mostly tweaking and making "test-posts" to check that everything works, but I'll probably also make some posts I'd like to keep when I move the site and take it online.  When I'm done chasing bugs; I guess I'll just package the public_html|www directory-tree and upload it to the web-hosting company, and also export the database from my home-computer to the web-hosting.    What I'm wondering if there are some "best practices", some do-s and don't-s, some major pits to take note of?    For example, how can ensure the smooth transition of domain-name in posts and links as such, from localhost to whatever-i-end-up-buying.com (I know from previous attempt of running WordPress at my home computer, that this didn't always work quite well...).


I am not extremely well versed in Regular Expressions but I believe I have found a pattern that should work for my use case (tested on sites like regex101.com). My issue is that I am trying to find the index of the last occurrence of [1] within the String and insert a new line at its position. Here is the String (note: this is a single string with a newline character inserted before 'Set 2' and 'Encore'):  Set 1: Llama, Bouncing Around the Room, Divided Sky, Fee, It's Ice, My Sweet One > Guelah Papyrus, The Lizards, Foam, David Bowie[1]  Set 2: Golgi Apparatus, The Squirming Coil, Brother, Sparkle, The Landlady > Destiny Unbound, Mike's Song > I Am Hydrogen > Weekapaug Groove, Lawn Boy > Chalk Dust Torture  Encore: Memories[2], Poor Heart, Sweet Adeline[2][1] "Dr. Seuss" chants from Fish.[2] Without microphones.   And here is the RegEx pattern:  var pattern = /(\[1\])(?!.*\[1\])/g;   I then call the following two methods:  var match = pattern.exec(setlistFormatted); var finalFormat = setlistFormatted.splice(match.index, 0, "\n");   The splice method here is a custom function I found on StackOverflow for my use case:  String.prototype.splice = function(idx, rem, str) {     return this.slice(0, idx) + str + this.slice(idx + Math.abs(rem)); };   I'm having trouble recreating the exact issue, but in most cases the RegEx pattern returns the first occurrence of [1] instead of the last and outputs:  Set 1: Llama, Bouncing Around the Room, Divided Sky, Fee, It's Ice, My Sweet One > Guelah Papyrus, The Lizards, Foam, David Bowie [1]  Set 2: Golgi Apparatus, The Squirming Coil, Brother, Sparkle, The Landlady > Destiny Unbound, Mike's Song > I Am Hydrogen > Weekapaug Groove, Lawn Boy > Chalk Dust Torture  Encore: Memories[2], Poor Heart, Sweet Adeline[2][1] "Dr. Seuss" chants from Fish.[2] Without microphones.   From other posts I've searched / read I've seen that Google Apps Script does not support certain functionality of Javascript's RegExp - mainly capture groups. So my questions are these:   My pattern does return instances of [1]. Does this not count as a capture group? Clearly my code finds an instance of [1] and inserts a newline before it. If the pattern is able to capture instances of [1], why does my expression return all occurrences instead of the last? Calling Logger.log(match) returns [1],[1]   BACKGROUND: For those interested I am creating a GroupMe bot that posts Setlist data for the jam band Phish using the Phish.net API. In this particular case, everything following the last [1] represents the setlist notes and should be displayed on a new line instead of the same line as the Encore.

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


So let me begin by saying that I've seen that this is a very common issue, especially with texmaker on windows, and there are a lot of solutions out there, but I've tried all the ones that I found and they either didn't work or I couldn't understand them.  My code looks something like this:  \documentclass[a4paper,10pt,twoside]{report}  \usepackage[acronym,nonumberlist]{glossaries}  \loadglsentries{acronyms} \makeglossaries  \begin{document}  \chapter*{Symbols and Abbreviations}\label{chapter:symbols and abbreviations} \setglossarystyle{long} \printglossary[title=Symbols] \setglossarystyle{long} \printglossary[type=\acronymtype, title=Abbreviations]  A whole bunch of text from my thesis with the following abbreviations and symbols, \acrfull{nf}, \acrlong{efr}, \gls{z}.  \end{document}   In my acronyms.tex file I have the following (plus a lot more)  \newacronym{nf}{NF}{Near Focus} \newacronym{efr}{EFR}{Extra Focal Radiation} \newglossaryentry{z}        {name={\ensuremath{z}},     description={\tabto{1cm}[$mm$] \tabto{4cm} top surface of shutters and fs distance}}   As most people I've read about this runs without the glossaries being printed.  I've tried changing some line in the Xindy file but I found it already changed. I tried changing the commands to \makeglossaries and \printglossaries or \makenoidxglossaries and \printnoidxglossaries but nope. I tried making the makeglossaries % user command in texmaker but I get the following error when running it:   Process started  makeglossaries  : The script engine could not be found. makeglossaries: Data: scriptEngine="perl.exe"  Process exited with error(s)   I've read among other solution something about installing Perl and manually adding it to some path but I don't really know what to do specifically and I have no clue if it will actually solve the problem.  If somebody could help clear out some of this and point me in the right direction it would be of great help, I've already spent a couple of hours on this stuff. Thank you all!

I have the strange experience that from the combination      \glossarystyle{altlisthypergroup}     \clearpage     Printing acronyms     \printglossary[type=acronym]   only the debug message is printed, the glossaries not.  Even, the \printglossary leads to hanging. At the same time, in the text commands like \gls{} work as expected.  Any advice, what other package can interfere with glossaries? (It is part of a bigger project, the MWE works as expected.)    I changed to command line version from TeXstudio. I receive the output  makeglossaries DSc2 makeglossaries version 2.12 (2014-01-20) added glossary type 'main' (glg,gls,glo) added glossary type 'acronym' (alg,acr,acn) makeindex  -s "DSc2.ist" -t "DSc2.alg" -o "DSc2.acr" "DSc2.acn" This is makeindex, version 2.15 [TeX Live 2013] (kpathsea + Thai support). Scanning style file ./DSc2.ist.............................done (29 attributes redefined, 0 ignored). Scanning input file DSc2.acn....done (9 entries accepted, 0 rejected). Sorting entries....done (36 comparisons). Generating output file DSc2.acr....done (15 lines written, 0 warnings). Output written in DSc2.acr. Transcript written in DSc2.alg. Warning: File 'DSc2.glo' is empty. Have you used any entries defined in glossary 'main'? Remember to use package option 'nomain' if you don't want to use the main glossary.   What I do not understand, that if there are entries accepted, and sorted, why do I receive the warning about empty .glo file? And also, why the pdflatex hangs if I try to continue with using pdflatex again?


Here's a common problem I'm facing in Android: sometimes it automatically connects to a network when the signal is very low or there is a problem with the network itself and there is no Internet connectivity available at that moment.  I would like to find an solution which would automatically disconnect from the wi-fi network if it detects a problem with the Internet connection.  Anybody have any advice?

I have a wifi hotspot that is always on but sometimes internet isn't available within the connection; in such a situations, the phone is connected as expected to the wifi hotspot but because there's no internet, apps can't check for updates(messages) so I wont be notified of incoming messages from IM apps unless I manually turn off wifi and use mobile data for internet connectivity(2g or 3g for example)  Is there any way to automatically check for internet availability (by pinging a website maybe) and if there's no internet available within the connected wifi network, turn the wifi off? (so that the phone can use mobile data for internet connectivity)


I've making simple aplication to download files. I did the checkbox and I want to get state of this checkbox. I also did a simple code but I've getting error like this: pastebin.com/s8ZegvEr . Here is my code: pastebin.com/W1HAFJwS , pastebin.com/MUVpm099 , pastebin.com/iuTfb1aU Has anyone knows how to fix it?


In my perception of the universe, there's the theater which is the 'spacetime' and the actors meaning the 'particles'. If i got it right, GR claims that the 'actors' effect the 'theatre' by 'bending' it. Also in order to combine GR and QM, some beleive in the existence of the 'graviton'. Does this mean that the 'theater' is no longer needed since gravity is not a property of spacetime anymore? Does the hypothetical existaence of the graviton cancels out the spacetime and it's  'curvature'?  If gravity is 'transfered' trough 'gravitons' and its not a property of spacetime and its curvature, how can we explain its impact to EM transmision ? How does a particle (graviton) can influence the path of motion of another particle (photon) in space?

General relativity tells us that what we perceive as gravity is curvature of space-time.   On the other hand (as I understand it) gravity can be understood as a force between objects which are exchanging (hypothetical) virtual particles called gravitons, similar to the way electromagnetic forces are due to objects exchanging virtual photons?  At least at first glance, the two concepts seem mutually exclusive. Is there a description of gravity which includes both, or is this contradiction one of the problems in combining GR with quantum mechanics?


I know they are UMTS country. Can I rent 3g modem for a week?

Next month I am traveling to country X, where I would need Y minutes of calls, Z text messages and most importantly Q megabytes of data. How can I find the cheapest/most reliable SIM card for my needs?


I am completely new to a Linux operating system and was trying to setup Owncloud to use as a file server. I need to copy the owncloud folder into /var/www/ as an example but every folder on my system I am denied access to other than folders within my home folder. I am logged in as administrator but it tells me I am not the owner and do not have permission to access or make changes to any of the other folders. Any help with this would be greatly appreciated.

Having installed the web server is there a simple way to set a user able to use the graphic interface to copy files and directories to the local web server /var/www  I gave myself administrative privileges in Ubuntu but it still doesn't allow copies.


Old Handheld games like The Legend of Zelda: Oracle of Ages/Seasons, Golden Sun and Golden Sun : The Lost Age have the possibility to share data between games in the form of passwords. I was wondering how such a password is constructed and checked.

How would I make a password system for a single-player game like the ones used in older console games?  For example, Mega Man X saves work by giving you a series of numbers that you can enter later to load your save.


I want to show there is no non-abelian group of order 9. How should I attempt this?

The trick here is to provide an elementary solution; I'll explain what I mean.  Prove that a group of order 9 must be Abelian.  The standard approach is to use the class equation to show that any $p$-group has a non-trivial center.  From that, it's easy to show that any group of order $p^2$ is Abelian.  If not, pick an element $a$ not in the center and look at its centralizer.  This includes the center and $a$, so it has at least $p+1$ elements; hence it's the whole group by Lagrange; hence $a$ is in the center, a contradiction.  Okay, but the problem is given as an exercise very early in Herstein, before any of this is discussed.  Other than Lagrange and some easy consequences, all we really have to work with is the fundamental homomorphism theorem; in fact, the exercise is included in the set at the end of the section introducing the theorem.  So what I'm looking for is an approach that uses only very basic group properties and, especially, one that applies the homomorphism theorem.


Gollum (Smeagol) was once a Hobbit. His life was extended over 500 years while he had the Ring.  Eventually Gollum lost the Ring to Bilbo, who I think had it around 50-60 years (?).   At the end of the movie "The Return of the King" Bilbo has only been without the Ring for a year, but looks completely aged, wrinkled, suffers from poor memory, seems to lack energy (falls asleep on Frodo) and appears to be near death. On the other hand Gollum had gone without the Ring for 50-60 years, but despite his incredibly old age, he still had smooth, wrinkle-free skin and more energy than either of the 2 young Hobbits (Frodo or Sam).  Is this a result of the longer amount of time that Gollum spent with the Ring before losing it?  I'm basing my question on the 6 semi-recent movies; I haven't read the books but feel free to use them to answer this.

In the LoTR movies (not sure if the books are the same) but when Gollum lost the ring to Bilbo decades ago in The Hobbit, he appeared to look the same and even move the same in The Fellowship of the Ring. Bilbo on the other hand, seemed to have aged very rapidly when he passed the ring to Frodo. When Frodo met up with Bilbo in Rivendell shortly after his quest began, Bilbo appeared much older and even more much slower.  I realize that Gollum had the ring for much longer than Bilbo, but wouldn't him losing the ring have the same effect as it had on Bilbo?


Suppose U is a punctured disk,if f is holomorphic on U and $\int_{U}$$|f|^2$dxdy<$\infty$,prove that z=0 is a removable singularity it is obvious to prove f is bounded. however. I do not know where to do first

I'm having trouble with the following problem:  Let $f$ be holomorphic on the punctured unit disc, $D$. If $\int_D|f(z)|dA(z)<\infty$, then $z=0$ is either a removable singularity or a simple pole of $f$.  A similar problem is to prove or disprove that if $\int_D|f(z)|^2dA(z)<\infty$, then $f$ has a removable singularity at $0$.  I've tried using the Mean Value Property for $f$ and taking the limit as $z\to0$, but I didn't get anywhere.


I currently have a database that stores some transactions for several users, for example purchasing or selling products is stored as 1 entry in the transactions table. It can also store profits made between transactions (stored in another table called profits).  I also need to store a daily history of purchases, revenues and profits for each user. I have a history table that looks something like this:  user_iduser   date        total_buy  total_sell total_profit     2500    2016-04-02     24555       45121        2566   Right now, the way I keep the history table updated is outside the database side. The application automatically calculates and updates this table everytime the user logs in (after fetching whatever new transactions come from that day) and updates the corresponding totals for that day. The application also runs a script everyday at midnight that fetches every user's transactions and updates their totals for the previous day. However, I would prefer if this behavior was done by the database instead if possible (the less code the better).  So my question is: would creating triggers be a good way to do this, performance wise? It would be simple to create a trigger that, for example updates a user's history.total_buy column everytime a new 'buy' transaction is inserted, but considering I have several million transactions already stored and thousands of new ones arriving a day, wouldn't the constant trigger calls put a stress on the database? Or am I just getting worried for no reason?

A post here on DBA.StackExchange () has spawned an interesting question (at least, interesting to me) regarding performance in MySQL.  The context is that we want to insert a record in a table for each row that is updated.  Before the row is updated, we want to store off a previous value and then increment one of the columns (a "version" column).  If we do this inside a trigger, it works out nicely.  For MySQL, the triggers are , so it would be an easy solution.  Select the data currently in the table, insert it into the logging table, and the update the "version" column in the new data.  However, it's possible to move this logic to a stored procedure. If you do that, you're performing the insert, then incrementing the "version" column in the table.  The entire thing would be set based.   So, when it comes to performing this insert, would this be more performant to use the set-based stored procedure approach or a trigger based approach?  This question is for MySQL (since it has row-by-row triggers), although it could apply to other row-by-row trigger DBMSs.


After upgrading to Ubuntu 18.04, the whole design is suddenly broken. There's an ugly tinge or orange everwhere, the dock is visible all the time (not only when in overview mode) and basically everything I used to love about the Gnome desktop is gone :-(  I tried various means of getting the vanilla Gnome experience back but nothing has worked:  sudo apt install gnome-session sudo apt install ubuntu-gnome-default-settings sudo apt install vanilla-gnome-default-settings vanilla-gnome-desktop sudo update-alternatives --config gdm3.css # (and then I selected gnome-shell.css)   None of this got rid of the permanent dock and when logged out I don't see a 'gear' icon to switch to Gnome on X.org.  Any ideas how to get rid of the Ubuntu modifications?

Some people (me) would prefer the straight GNOME experience as opposed to the Unity style desktop offered in Ubuntu 17.10.  How can I get the standard GNOME desktop and interface?


I'm using Ubuntu 12.04 32 bit on a HP Compaq Elite 8300 PC. Sometimes my machine freezes while I'm working. I want to know whether Ubuntu is well-supported on this hardware.

All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when...   just one program stops responding? nothing at all responds to mouse clicks or key presses? the mouse stops moving entirely? I have an    In what order should I try various solutions before deciding to pull the power plug?  What should I do when starting up Ubuntu fails?  Is there a diagnostic procedure I can follow?


Can I consider it as an abuse if I seek for reason but ignored? Can I flag it saying it is an abuse or what can I do to know what is wrong with my question?  Assume the question has 20 downvotes and has no comments at all.

I've posted a question or an answer, and I have received one or more downvotes. I am not really sure why I was down voted, or I think I know why, but I disagree.  Why did this happen, and what should I do about it?


In [Casella, Berger] Statistical Inference there is a short discussion on countability of sample spaces and its implications:  This distinction between countable and uncountable sample spaces is important only in that it dictates the way in which probabilities can be assigned. For the most part, this causes no problems, although the mathematical treatment of the situations is different. On a philosophical level, it might be argued that there can only be countable sample spaces, since measurements cannot be made with infinite accuracy. (A sample space consisting of, say, all ten-digit numbers is a countable sample space). While in practice this is true, probabilistic and statistical methods associated with uncountable sample spaces are, in general, less cumbersome than those for countable sample spaces, and provide a close approximation to the true (countable) situation.  I'm having a bit of trouble wrapping my head around the nuances of the distinction, and concretely picturing the implications discussed. A couple of questions: how is the way that probabilities are assigned different in an uncountable space? Can you provide an example of the way probabilities are assigned to some uncountable space and how it differs from assignment to the countable space that it is closely approximating? Further, can you provide an example of how the mathematical treatments are different? What makes the uncountable spaces less cumbersome to work with (I would imagine it would be the opposite)? Lastly, I'm not too sure what they mean by measurements of infinite accuracy in this context. While of course the finite set of ten-digit numbers is of finite accuracy and we can certainly work with it, why would a countably infinite be any more philosophically sound to work with? Wouldn't it also be of infinite accuracy (I'm thinking of e.g. the natural numbers, although again maybe I am misunderstanding what is meant by accuracy)? I imagine some of these could be answered as I read on, but at the very least I'd like to have something in my mind so I know what to pay attention to as I keep reading. I also haven't been able to find much other discussion online regarding the nuances of countability, so any insights or references that I missed would be greatly appreciated.

We have a random experiment with different outcomes forming the sample space $\Omega,$ on which we look with interest at certain patterns, called events $\mathscr{F}.$ Sigma-algebras (or sigma-fields) are made up of events to which a probability measure $\mathbb{P}$ can be assigned. Certain properties are fulfilled, including the inclusion of the null set $\varnothing$ and the entire sample space, and an algebra that describes unions and intersections with Venn diagrams.  Probability is defined as a function between the $\sigma$-algebra and the interval $[0,1]$.  Altogether, the triple $(\Omega, \mathscr{F}, \mathbb{P})$ forms a probability space.  Could someone explain in plain English why the probability edifice would collapse if we didn't have a $\sigma$-algebra? They are just wedged in the middle with that impossibly calligraphic "F". I trust they are necessary; I see that an event is different from an outcome, but what would go awry without a $\sigma$-algebras?     The question is: In what type of probability problems the definition of a probability space including a $\sigma$-algebra becomes a necessity?       provides a plain English accessible explanation. The idea is a spinning pointer rotating counterclockwise on a circle of unit perimeter:       We begin by constructing a spinner, which consists of a circle of unit   circumference and a pointer as shown in [the] Figure. We pick a point   on the circle and label it $0$, and then label every other point on the   circle with the distance, say $x$, from $0$ to that point, measured   counterclockwise. The  experiment  consists  of spinning the pointer and    recording the label of the point at the tip of the pointer. We let the random   variable $X$ denote the value of this outcome.  The sample space is   clearly the interval $[0,1)$.  We would like to construct a   probability model in which each outcome is equally likely to occur. If   we proceed as we did [...] for experiments with a finite number of   possible outcomes,  then we must assign the probability $0$ to each   outcome,  since otherwise,  the  sum  of  the  probabilities,  over    all  of  the  possible  outcomes,  would not equal 1.  (In fact,   summing an uncountable number of real numbers is a tricky business;    in  particular,  in  order  for  such  a  sum  to  have  any  meaning,   at  most countably many of the summands can be different than $0$.)    However, if all of the assigned probabilities are $0$, then the sum is   $0$, not $1$, as it should be.   So if we assigned to each point any probability, and given that there is an (uncountably) infinity number of points, their sum would add up to $> 1$.


I have been asked by a journal to provide my affiliated university. The assumption is that I am a professor or researcher. I work in industry and spend my non-working hours doing research. What is a common way to handle this problem?

Recently my paper is reviewed (by a professor from independent third party) and accepted by a journal. But, my employer allows me to publish this paper only without its name there.  Publishing house is expecting affiliation for each author, i.e. I can not leave affiliation as blank.   What should I write as the affiliation?