unable to insert values in postgresql using PreparedStatement in java from intelliJ

i am new to java.i want to insert values into my database(pgadmin) using java.i am using a PreparedStatement but everytime it is giving me an error.The problem seemed to be in the INSERT statement..please help me  public void obtaindata(){         System.out.println("enter the data you want to insert");         System.out.print("Product Name");         String productname=input.nextLine();         System.out.println("Product Price");         Double productprice=input.nextDouble();         Database2 database2=new Database2();         database2.insertRecord(productname,productprice);  public void insertRecord(String productname,Double productprice){         try{             //using preparedstatement             PreparedStatement stmt = con.prepareStatement("INSERT INTO                  public.product(product_id,product_name,product_price)" +                "VALUES (?,?,?);");              stmt.setString(1,"nextval('productid_sequence')");             stmt.setString(2,productname);             stmt.setDouble(3,productprice);             stmt.executeUpdate();             stmt.close();          }catch(SQLException e){             e.printStackTrace();         }     }


I came across  on hold question and decided to edit it to keep it open. It is very badly written and therefore the edit took quite a bit of an effort to write. My suggested edit is now in the question comments.  When I was done writing, I tried to submit the edit for approval as my rep is rather low on this site. I was told my edit changes too much. I don't understand why this should refrain me from submitting this edit for approval by a moderator.  Can anyone explain to my why this message exists? I feel this should go into the moderator queue like any other edit.  Edit: I managed to edit the question at a later time, which is even weirder.


Should I take consent before listing referee names?

I am about to submit my research article in a Mathematics journal and the online system is asking to mention three Referee/Reviewer names. Should I take the consent of a few experts in my topic before I enlist three expert names as referees, by individually mailing them? I think, I should take. Any suggestions and advice regarding the question, please?


Deriving total (within class + between class) scatter matrix

I was fiddling with PCA and LDA methods and I am stuck at a point, I have a feeling that it is so simple that I can't see it.  Within-class ($S_W$) and between-class ($S_B$) scatter matrices are defined as:  $$ S_W = \sum_{i=1}^C\sum_{t=1}^N(x_t^i - \mu_i)(x_t^i - \mu_i)^T $$  $$ S_B = \sum_{i=1}^CN(\mu_i-\mu)(\mu_i-\mu)^T $$  Total scatter matrix $S_T$ is given as:  $$ S_T = \sum_{i=1}^C\sum_{t=1}^N(x_t^i - \mu)(x_t^i - \mu)^T = S_W + S_B $$  where C is number of classes and N is number of samples $x$ are samples, $\mu_i$ is ith class mean, $\mu$ is overall mean.  While trying to derive $S_T$ I came up to a point where I had:  $$ (x-\mu_i)(\mu_i-\mu)^T + (\mu_i-\mu)(x-\mu_i)^T $$  as a term. This needs to be zero, but why?    Indeed:   \begin{align} S_T &= \sum_{i=1}^C\sum_{t=1}^N(x_t^i - \mu)(x_t^i - \mu)^T \\ &= \sum_{i=1}^C\sum_{t=1}^N(x_t^i - \mu_i + \mu_i - \mu)(x_t^i - \mu_i + \mu_i - \mu)^T \\ &= S_W + S_B + \sum_{i=1}^C\sum_{t=1}^N\big[(x_t^i - \mu_i)(\mu_i - \mu)^T + (\mu_i - \mu)(x_t^i - \mu_i)^T\big] \end{align}


If $a_n$ and $b_n$ are converging sequences, and for all $n\in\mathbb Z+$, $a_n \leq b_n$, then $\lim_{n\to\infty} a_n \leq \lim_{n\to\infty} b_n$.

I am having a bit of trouble answering this question. If $a_n$  and $b_n$  are converging sequences, and for all $n \in\mathbb Z+$, $a_n$ ≤ $b_n$, then $\lim_{n\to\infty} a_n \leq \lim_{n\to\infty} b_n$.  Letting $\epsilon>0$,  I began with showing that there  exists $N_1\in \mathbb N$ such that for all $n \in \mathbb N$, if $n>N_1$, then $|a_n - L|< \epsilon$.  Similarly exists $N_2\in \mathbb N$ such that for all $n \in \mathbb N$, if $n>N_2$, then $|b_n - M|< \epsilon$.    However from here I do not know how to proceed. Do I use the triangle inequality somehow?


Removing Anonymous DIV from search-block-form

I have created a sub theme under  and am having issues removing the "anonymous" div from inside the form.  Here is the displayed code:
     <form class="form-search content-search form-search content-search" action="/" method="post" id="search-block-form" accept-charset="UTF-8">

                 <input title="" placeholder="Search" class="form-control form-text form-search" type="search" id="edit-search-block-form--2" name="search_block_form" value="" size="5" maxlength="128">                 <button type="submit" class="btn btn-default">Search</button>
             <input type="hidden" name="form_build_id" value="form-XXXX">             <input type="hidden" name="form_id" value="search_block_form">             <button class="element-invisible element-invisible btn btn-primary form-submit" id="edit-submit" name="op" value="Search" type="submit">Search</button>
     </form>
  I have my own versions of form-element.func.php and search-block-form.tpl.php and I have created my own theme wrapper to customize this as much as possible but I still cannot figure out a way to get rid of that stupid div!  How can I remove this div WITHOUT modifying the Bootstrap theme or the Drupal Core?  Edit: At the very least, I would be ok with adding the class input-group onto the div and getting rid of the current div.input-group


What will happen when Winter Bash is over?

Tomorrow (January 2nd 2019) is the day that Winter Bash will be gone.  So I am thinking: Will there be some sort of a final ranking page anywhere?  It would be nice so I don't need to keep going to  every day to see my rank.  If there isn't going to be anything like that, what should I do to see my final rank on Winter Bash?


I'm trying to draw a grouped bar plot, but with added dots "on top" to signify outliers in the results.  Currently I have:      \begin{figure}[]       \begin{tikzpicture}         \begin{axis}[             width  = 1*\textwidth,             height = 4.5cm,             major x tick style = transparent,             ybar=1*\pgflinewidth,             bar width=13pt,             symbolic x coords={A,B,C,D},             xtick = data,             enlarge x limits=0.25,             ymax=15,             ymin=0,             legend cell align=left,             legend style={                     at={(1,1.05)},                     anchor=south east,                     column sep=1ex             }         ]             \addplot[style={fill=red,mark=none}]                 coordinates {(A, 4.44) (B,0.1) (C,4.37) (D,4.07)};              \addplot[style={fill=green,mark=none}]                 coordinates {(A, 0.4) (B,0.8) (C,0.3) (D,0.5)};              \addplot[style={fill=blue,mark=none}]                 coordinates {(A, 0.2) (B,0) (C,0.9) (D,0.8)};              \addplot[style={fill=yellow,mark=none}]                 coordinates {(A, 9.59) (B,0.2) (C,8.86) (D,8.62)};          \draw node[fill,circle,scale=0.5]{} (axis cs:A,7);         \draw node[fill,circle,scale=0.5]{} (axis cs:B,11);         \draw node[fill,circle,scale=0.5]{} (axis cs:C,3);         \draw node[fill,circle,scale=0.5]{} (axis cs:D,12);          \legend{C1,C2,C3,C4}       \end{axis}     \end{tikzpicture} \end{figure}   This draws the grouped plots etc, but the "dots" always appear at the (0,0) position, ignoring the relative coordinates. See the picture below, where it is close to the "A". Ideally, I'd like to position such a dot above every bar in the graph. How can I properly specify the coordinates?


What article should be used in such sentences?

What article should be used in the following sentence?     He was English by [a/the/] blood.   I feel there should be a zero article here, but I was taught that the zero article is impossible in English.


How can standing waves be produced in an open organ pipe if the ends are open?

How can standing waves be produced in an open organ pipe even though both of its ends are open? Can someone explain with more clarity?


Why is it Wrong to use what in place of which (Context of American English) | Specific to GMAT

(B) According to some analysts, the gains in the stock market reflect growing confidence in the economy to avoid the recession, what many feared earlier in the year, rather to come   This is an excerpt from GMAT Question.  some instructor has given this response - * it appears that this choice is trying to substitute "what" for "which". that is not acceptable.   Can some one explain in detail why the usage of what is wrong here?  The whole complete sentence -   According to some analysts, the gains in the stock market reflect growing confidence that the economy will avoid the recession that many had feared earlier in the year and instead come in for a “soft landing,” followed by a gradual increase in business activity.   (A) that the economy will avoid the recession that many had feared earlier in the year and instead come    (B) in the economy to avoid the recession, what many feared earlier in the year, rather to come    (C) in the economy’s ability to avoid the recession, something earlier in the year many had feared, and instead to come    (D) in the economy to avoid the recession many were fearing earlier in the year, and rather to come    (E) that the economy will avoid the recession that was feared earlier this year by many, with it instead coming    Which one is correct. It is GMAT question.


Are these examples interchangeable or it's better to use the second one if we say "he was living in Seattle", because there is emphasis of temporary action?  Tom worked in a hotel when he was living in Seattle. Tom was working in a hotel when he was living in Seattle.


Im building on my app and I got this error on the console " java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.cassieleong.delishcart/com.example.cassieleong.delishcart.FruitMain}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference"  I am trying to build an activity that contain listview with checkboxtextview.   I do not know how to solve this error. Please help. Thanks alot.  Java.  public class FruitMain extends AppCompatActivity { ListView listView; String[] fruit; Context context;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_fruit_main);     context = this;     listView = (ListView) findViewById(R.id.listView4);     String [] fruit = {"Apple","Applesauce","Apricot","Banana","Barlett Pears","Blackberries","Blueberries","Cantaloupe","Cherry","Citron","Coconut","Cranberry",     "Currants","Dates","Dried Fruit","Fig","Fruit Cocktail","Fruit Sauce","Grape","Grapefruit","Green Grapes","Honeydew Melon","Juniper Berries","Kiwi",     "Kumquat","Lemon","Lime","Lime Juice","Mango","Nectarines","Orange","Papaya","Passion Fruit","Peach","Pear","Persimmon",             "Pineapple","Plantain","Plum","Plum Tomatoes","Pomegranate","Prunes","Raison","Raspberry","Red Grapes","Strawberry","Sweet Cherries","Tangerine",             "Watermelon"};      ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.fruititem_list, fruit);     listView.setAdapter(adapter);     listView.setItemsCanFocus(false);     listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE); } @Override public boolean onCreateOptionsMenu(Menu menu) {     //Inflate the menu; this adds item to the action bar if it is present.     getMenuInflater().inflate(R.menu.menu_ingredient_choices, menu);     return true; }   }  XML.   <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:context="com.example.cassieleong.delishcart.FruitMain" tools:showIn="@layout/activity_fruit_main">  <TextView     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:textAppearance="?android:attr/textAppearanceLarge"     android:text="         Fruit Product            "     android:id="@+id/textView6"     android:textSize="35dp"     android:background="#f97c7c"     android:layout_alignParentTop="true"     android:layout_alignParentStart="true" />  <ListView     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:id="@+id/listView5"     android:layout_below="@+id/textView6"     android:layout_alignParentStart="true"     android:layout_above="@+id/button2"     android:layout_alignParentEnd="true"/>  <Button     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:text="Submit"     android:id="@+id/button3"     android:layout_alignParentBottom="true"     android:layout_centerHorizontal="true" />     XML  <CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/checkedTextView4" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:text="" android:gravity="center" android:drawableLeft="?android:attr/listChoiceIndicatorMultiple" android:textSize="25dp">


How to install java-JDK 8 & maven in Ubuntu 16.04 without adding any PPA?


I was taught in my high school that a noun can be a person, place, animal or a thing? The word "benchmark" does not qualify to be any one of them yet it is considered as a noun  Can someone please explain me how?


Change highlight color in Mavericks preview?

In Preview on OS X 10.9 Mavericks, is it possible to change the color to something other than yellow, green, blue, pink, purple?  I know it is possible to highlight in other colors because I did it while using Preview for the first time after upgrading to Mavericks, but now that I've changed I can't seem to change back.


$100$-th derivative of the function $f(x)=e^{x}\cos(x)$

I've got this task I'm not able to solve. So i need to find the 100-th derivative of $$f(x)=e^{x}\cos(x)$$ where $x=\pi$.  I've tried using Leibniz's formula but it got me nowhere, induction doesn't seem to help either, so if you could just give me a hint, I'd be very grateful.  Many thanks!


Confused about independent probabilities. If a fair coin is flipped 5 times, P(HHHHH) = 0.03125, but P(H | HHHH) = 0.5

I'm confused about how to reconcile the probability of independent events not having anything to do with prior history, but sequences of events do (seemingly) take into account prior history. This question asks a similar question: . However, having read that, I found I had a very specific confusion about the seeming contradiction between two formulas for probabilities that seem equal to me, but will produce different results based on our understanding of P of sequences versus P of independent events: (A) P(HHHHH) = 0.03125 (B) P(H | HHHH) = 0.5 Can anyone explain how the left side of both equations, P(HHHHH) and P(H | HHHH) are different. And does anything change if we shift from a frequentist to bayesian perspective?


What are Uncertainties in Quantum Mechanics intuitively?

So $\Delta x$ and $\Delta p$ are uncertainties in quantum mechanics. What exactly does the term "uncertainties" mean?


Change the default search engine for Firefox's address bar

I love the ability to just type something into Firefox's address bar and do a Google search. But I was wondering if there was some way to customize what search engine Firefox used?


What is a simple and efficient way to find rows with time-interval overlaps in SQL?

I have two tables, both with start time and end time fields. I need to find, for each row in the first table, all of the rows in the second table where the time intervals intersect.  For example:             <-----row 1 interval-------> <---find this--> <--and this--> <--and this-->   Please phrase your answer in the form of a SQL WHERE-clause, AND consider the case where the end time in the second table may be NULL.  Target platform is SQL Server 2005, but solutions from other platforms may be of interest also.


[0] => Array         (             [id] => 9             [order_address_id] => 9             [created] => 2015-12-17 12:24:20             [order_status] => dispatched             [total_discount] =>              [total_shipping_charge] => 60             [s_state] => NY             [b_state] => NY             [order_id] => 9             [p_name] => Product 1             [qty] => 1             [price] => 475         )      [1] => Array         (             [id] => 9             [order_address_id] => 9             [created] => 2015-12-17 12:24:20             [order_status] => dispatched             [total_discount] =>              [total_shipping_charge] => 60             [s_state] => MA             [b_state] => MA             [order_id] => 9             [p_name] => Product 2             [qty] => 1             [price] => 349         )   I want to find if array with same ID repeats then I have to delete total_shipping_charge from second and subsequent array having same id. How can I do it in PHP?


Custom IPv6 stateless autoconfiguration suffix

When a router announces an IPv6 prefix via , a host can use  to automatically derive the remaining bits from its MAC and use the combination as its globally routable IPv6 address.  As far as I understand, all this is magically done by the kernel. This behaviour can also be altered by setting net.ipv6.conf.<interface>.use_tempaddr = 1, which will make the host generate a random suffix instead of deriving one from its MAC.  The question is whether there is a way to make the host use a predefined fixed suffix for this purpose. Is there a way to tell the kernel to do that? If no, then what are other options? Is there something like a daemon that listens for advertisements and runs a custom hook (which will configure the ip address)?


How to stop OSX from automatically opening iTunes when iOS device plugged in to charge?

Is there a way i can stop OSX from automatically opening iTunes when iOS device plugged in to charge ? Im currently running OSX 10.13.x But presume the solution would be the same for most versions of OSX


Intuitively dropout make sense to me but I don't understand how backpropagation works in presence of dropout.   It looks like at each training step we backpropagate gradients to parameters in the thinned network and ignore the dropped paths as if there was nothing stochastic in the network. Why is this valid? Shouldn't we apply something similar to reparameterization trick or gumbel-softmax approaches to backpropagate through dropout layers?


GCD in a PID persists in extension domains

Let $R$ be subring of integral domain $S.$ Suppose $R$ is $\text{PID}.$ Let $a\in R$ be a greatest common divisor of $r_1,r_2$ in $R$. ($r_1,r_2 \in R$, not both zero). Could anyone advise me on how to prove $a$ is greatest common divisor of $r_1,r_2$ in $S?$   Hints will suffice, thank you.


Let $A$ be a subset of $\mathbb{R}^n$, and let $B$ be a subset of $\mathbb{R}^m$. Note that the Cartesian product $\{(a, b) : a \in A, b\in B\}$ is then a subset of $\mathbb{R}^{n+m}$. Show that $m^{*}_{n+m} (A \times B) \le m^{*}_n(A)m^{*}_m(B)$.   $m^*_n$ denotes an n-dimensional outer measure.   The definition of an outer measure is that $m^*_{n+m}(A \times B) = \inf \{\sum_{j \in J} \text{vol}(C_j) : A \times B \subseteq \bigcup_{j \in J} C_j\}$ and similarly $m^{*}_n =  \inf \{\sum_{i \in I} \text{vol}(A_i) : A  \subseteq \bigcup_{i \in I} A_i\}$ and $m^{*}_m(B) = \inf \{\sum_{k \in K} \text{vol}(B_k) : B  \subseteq \bigcup_{k \in K} B_k\}$.   I can also observe that the Cartesian product of a cover of $A$ and a cover of $B$ covers $A \times B$, but I am not sure how to proceed from here. I appreciate if you give some help.


\.{I} in springer gets mangled in when bbl is produced

I have cited authors whose first or last names start with the capital i in Turkish \.{I}in the BibTeX file. I am using spbasic.bst and natbib  BibTeX produced .bbl file with \{I} instead of \.{I}. With other style files I have used I never had this problem. This does not occur with say \c{S} in the author names.  Here is a bibtex entry  @inproceedings{aycse2011,   title={Extraction of semantic word relations in {Turkish} from dictionary definitions},   author={Ay{\c{s}}e {\c{S}}erbet{\c{c}}i and Zeynep Orhan and  {\.{I}}lknur Pehlivan},   booktitle={Proceedings of the ACL 2011 Workshop on Relational Models of Semantics},   pages={11--18},   year={2011},   organization={Association for Computational Linguistics} }   If I use {\.I} it produces  "i", If I use {\.{I}} as above, it  does not even go through pdflatex (the . is eaten by bibtex somewhere along the way)  as in   \bibitem[{{\c{S}}erbet{\c{c}}i et~al(2011){\c{S}}erbet{\c{c}}i, Orhan, and   Pehlivan}]{aycse2011} {\c{S}}erbet{\c{c}}i A, Orhan Z, Pehlivan {\I} (2011) Extraction of semantic   word relations in {Turkish} from dictionary definitions. In: Proceedings of   the ACL 2011 Workshop on Relational Models of Semantics, Association for   Computational Linguistics, pp 11--18   and I get  ! Extra }, or forgotten \endgroup. l.32 ...}erbet{\c{c}}i A, Orhan Z, Pehlivan {\{I}}                                                    (2011) Extraction of   I believe is specific to spbasic as I did not have a  problem with other bib styles I use frequently (e.g. acl.bst)  Any suggestions?


Let $f'$ exist for all $x$ on $[a,b]$, and suppose that $f'(a)=-1, f'(b)=1$. Prove that even if $f'$ is not continuous, there must exist a number $c, a<c<b$, with $f'(c)=0$  I'm not sure how to approach this problem. I thought about Rolle's Theorem, but can't really show it.


Watch or favorite answers, not just questions

Often I will have downvoted an answer shortly after it is posted, or commented on an answer suggesting some improvement or addition, and want to follow up later and see if my input has been acted upon, so that I can retract my downvote or take further action as appropriate. (Aside: do others do this, or am I a sad obsessive?)  Currently, I can favorite the question that the answer was on, both as a reminder to myself that I'm interested in it and in order to get notified when something changes, and I do so, but it's not an ideal solution when I'm only interested in a single answer on the page, for two reasons:   It generates noise that I'm not interested in on my favorites tab, as I get notified whenever anything on the question or the other answers there gets modified, not just stuff on the answer I'm interested in. When I do come to have a look at the question, I've frequently forgotten which answer I'm interested in or why the heck I ever favorited this question in the first place.   (I realise that , but since it was a long time ago, my particular use case for the request was not discussed, and I think notifications on favorites weren't even implemented yet back then, I figured it was reasonable to start another thread for this request. Feel free to downvote or close if you think my doing so wasn't appropriate.)  The ability to favorite answers would solve this use case for me. Is there any chance we could get this feature?


Positioning action buttons on right hand side of a table really is user friendly?

We are designing an application which has multiple tables and there are multiple action items like the view, edit, etc.   Placing the action buttons on the right side of the table will not be the best option as the number of columns increases the width of the table increases which introduces a vertical scroll that hides the buttons.    So, keeping the action buttons on the right-hand side will be user-friendly? Or it has to be kept on the left-hand side so the buttons are always visible.


Find a bijective function between two sets

I want to find a bijective function from $(\frac{1}{2},1]$ into $[0,1]$. So, What is a bijective function $f:(\frac{1}{2},1]\to[0,1]$?


I'm dealing with a longitude array named LON, but I encountered some problems with the numpy.where() function.  >>> print LON[777,777] 13.4635573678 >>> print np.where(LON == 13.4635573678)[0] [] >>> print np.where(LON == 13.4635573678)[1] []   It doesn't find the LON entry where the array is equal to a value that certainly exists. Is the problem related to the fact I'm dealing with double variables? Because until now np.where() always worked fine for both integers, floats and strings...


Nginx installation error in Ubuntu 16.04

:~$ sudo apt-get remove nginx* && sudo apt-get install nginx-full*  Reading package lists... Done Building dependency tree        Reading state information... Done  After this operation, 5,579 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 nginx-full-dbg amd64 1.10.0-0ubuntu0.16.04.1 [3,789 kB] Fetched 3,789 kB in 33s (112 kB/s)                                              Selecting previously unselected package nginx-common. (Reading database ... 189767 files and directories currently installed.) Preparing to unpack .../nginx-common_1.10.0-0ubuntu0.16.04.1_all.deb ... Unpacking nginx-common (1.10.0-0ubuntu0.16.04.1) ... Selecting previously unselected package nginx-full. Preparing to unpack .../nginx-full_1.10.0-0ubuntu0.16.04.1_amd64.deb ... Unpacking nginx-full (1.10.0-0ubuntu0.16.04.1) ... Selecting previously unselected package nginx-full-dbg. Preparing to unpack .../nginx-full-dbg_1.10.0-0ubuntu0.16.04.1_amd64.deb ... Unpacking nginx-full-dbg (1.10.0-0ubuntu0.16.04.1) ... Processing triggers for ufw (0.35-0ubuntu1) ... Rules updated for profile 'Apache Full' Rules updated for profile 'Nginx HTTP'  Processing triggers for systemd (229-4ubuntu4) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for man-db (2.7.5-1) ... Setting up nginx-common (1.10.0-0ubuntu0.16.04.1) ... Setting up nginx-full (1.10.0-0ubuntu0.16.04.1) ... Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.  invoke-rc.d: initscript nginx, action "start" failed.  dpkg: error processing package nginx-full (--configure):  subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of nginx-full-dbg:  nginx-full-dbg depends on nginx-full (= 1.10.0-0ubuntu0.16.04.1); however:   Package nginx-full is not configured yet.  dpkg: error processing package nginx-full-dbg (--configure):   dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                            Errors were encountered while processing:  nginx-full   nginx-full-dbg  E: Sub-process /usr/bin/dpkg returned an error code (1)


Does anyone know of any good tools (I'm looking for IDEs) to write assembly on the Mac. Xcode is a little cumbersome to me.  Also, on the Intel Macs, can I use generic x86 asm?  Or is there a modified instruction set? Any information about post Intel.  Also: I know that on windows, asm can run in an emulated environment created by the OS to let the code think it's running on its own dedicated machine. Does OS X provide the same thing?


How to understand "accelerating charge radiate" using intuition?

While I know that accelerating charges produces EM radiations (at least in lots of cases), most discussion about this matter only focuses on which kind of situation will emit EM radiations and which does not, with very little mention of the intuition behind this physical phenomenon.  Recently I'm trying to understand why accelerating mass generates gravitational wave (predicted by General Relativity), so I thought the first step is to understand it for charge first (they're very similar, after all), but surprisingly for the discussion I could find there isn't really any explanation about this matter.  While mathematics can prove accelerating charges sometimes radiates EM waves, I want an explanation using intuition that shows why this is true. Please don't use formulas to explain it.  Also, yes, I searched about the topic, and saw some mention of "conservation of energy" and "work done to the particle". But then, It still doesn't explain why the energy is lost in terms of EM radiation. Wikipedia said this kind of behavior has something to do with Special Relativity.


Is there any way to set the same icon to all my forms without having to change one by one? Something like when you setup GlobalAssemblyInfo for all your projects inside your solution.


What is the purpose we run ssh-agent with eval `ssh-agent`  not just ssh-agent  ?


Isn't is far more likely that general relativity, and not QFT, is "wrong?"

At the risk/certainty of both sounding super ignorant and talking out of my arse, I have always wondered why there is some big mystery about why there are contradictions between the predictions arising from QFT and GR.  I know almost knowing about either but (after) being a math student in university I do believe that the mathematics of GR require local differentiability except at points (maybe), and that the empirical evidence from quantum mechanics observations shows that there is a "minimum" distance required to ignore quantum effects.  Then to believe GR is right, you have to conceive an almost-everywhere-locally-differentiable function who derivative is necessarily defined piece-wise. To believe QFT is right, you just have to believe that GR is incomplete but very close. (Right?)  If someone could shed some light on this and why people bother believing GR is "the" description of gravitation (and consequently that we live in this locally smooth universe) I would love to be introduced to some of what I don't know. For a layperson like me, having an opinion on this is pretty much useless, because I don't know enough to have a solid intuition about it. But I can see that having an opinion is super important for a theoretical physicist because a wrong choice could mean a lifetime largely squandered, trying to square the circle.


I'm learning vue.js now on laracasts.com and there jeffrey way shows 2 way to display data on web page.  One is to display data from Laravel foreach and second is to display data with vue.js. I have one question: is there any difference by performance to display data with Laravel or display data with vue.js?


Why we shouldn't use == to compare strings?

We can create Strings using explicit or implicit constructions.  Implicit construction example:  String str1 = "hello"; String str2 = "hello"; str1==str2 // returns true, both str1 and str2 points to the same String object in string pool   Explicit construction example  String str3 = new String("hello"); String str4 = new String("hello") str3==str4 // returns false because str3 and str4 points to different String object   Since it's preferred (memory save) to use implicit construction why we shouldn't use == operator? As far as I know the only one reason to not use == operator is that we can forget about not using explicit constructions and try to do something like  str1==str3 str3==str4 // and so forth


So  (don't judge me, it was years ago...) I know that when a person with little knowledge about a field try to explain a problem to someone with a lot of experience it can easily lead to a lot of misunderstandings, everyone gets frustrated and more often than not nothing good comes out of it. So this time I will try with an analogy that (some) children can understand in order to explain my question. If you are too lazy, simply scroll down for my most likely terrible attempt on a short explanation.  Story  Once upon a time there was a guy called Bob, Bob was a great mechanic and he wanted to build a racing-car, and as anyone who wants to build a racing-car he wanted it to go as fast as possible. He knew his highschool maths and physics, however he knew that it would not be enough for finding out how to make the fastest car. Bob was very lucky because he had gotten his hands on a machine that calculated how fast a car would go based on a lot of knobs and switches that controlled things like, car height, type of engine, shape and etc. Unfortunately the machine was very slow and used around 5-10 minutes for one calculation. Bob knew he could make an other machine that would try a lot of different random combinations and try to find the best one, but he also knew that there were so many combinations that he would never be able to try all of them. Another problem is that Bob has no idea of how his machine works and he thinks there is no way he could find out.  Question is: how to help Bob?  tl;dr  I have a very slow and complex function $f(x_1 \cdots{} x_n)$ and I would like to find the best way to maximize/minimize this function with the least number of runs.


I had windows 8.1 on my laptop, and I tried to upgrade to windows 10, which broke it. I put Ubuntu 14.04 on it (wiping out everything else) and I would like to go back to windows 8.1. Is there a way I can do this?


Without glue, how do DNS servers know the ip of nameservers?

The domain rspb.org.uk has the nameservers   ns1.namecity.com.   ['62.128.193.35'] (NO GLUE)   [TTL=172800]  ns2.namecity.com.   ['84.22.161.171'] (NO GLUE)   [TTL=172800]  And on the website intoDNS, there is this warning:  The parent nameserver ns1.nic.uk is not sending out GLUE for every nameservers listed, meaning he is sending out your nameservers host names without sending the A records of those nameservers. It's ok but you have to know that this will require an extra A lookup that can delay a little the connections to your site.  In the registrar's settings, I can change these nameservers, but it only allows names, not ip addresses.   My question is, how does the DNS server know the ip address of the nameservers?   I did read somewhere that all nameservers must first be registered in the registry so perhaps an IP address is required during this step. The intoDNS warning mentions "an extra A lookup". Where is the DNS looking?


Reputation required to create my own Tag

I am quite confused now. I am not sure how much reputation I require to create a new tag.  From   I came to know that I need 250 points to create my own Tag. But I already have the sufficient points, but when I try to create a new tag I am getting a message that I need 1500 rep points. Can anyone clarify this.


Algorithm to detect intersection of two rectangles?

I'm looking for an algorithm to detect if two rectangles intersect (one at an arbitrary angle, the other with only vertical/horizontal lines).  Testing if a corner of one is in the other ALMOST works.  It fails if the rectangles form a cross-like shape.  It seems like a good idea to avoid using slopes of the lines, which would require special cases for vertical lines.


I have shown that  $1+\cos(\theta)+\cos(2\theta)+\cos(3\theta)+\dots+\cos(n\theta)=\Re(\frac{1-e^{(n+1)i\theta}}{1-e^{i\theta}})=\frac{1-\cos(\theta)+\cos(n\theta)-\cos((n+1)\theta)}{2-2\cos(\theta)}=\frac{1}{2}+\frac{\cos(n\theta)-\cos((n+1)\theta)}{2-2\cos(\theta)}$  but I am unsure how to proceed from here. If possible, I would like to avoid using to many identities as this is an exercise in my complex analysis book.


linux eats all memory, seems like it is not for specific application

The system is not overloaded and there is no huge process that eats memory (RAM) but still it has only 20-40 MB free.  Who is taking RAM and should I avoid it? (how?)


I want to theme the language switcher. How would I do this in Drupal 8?  Where would I find the correct twig template?


Calling a method does not work on integer

Why does the following code print out 6 and not 20?  public class ClassA {     public static void main (String [] args ) {         int k = 5;         doub ( k );         doub ( k );         if ( k <= 19) {             k ++;         }         System. out . println ( k );     }     public static void doub (int x ) {         x *= 2;     } }   Thanks in advance.


How to make Ubuntu ask for password when mounting partitions?

I have been through this kind of feature in older versions of Ubuntu. When I'd like to mount a partition it will ask me a password. Now I want to enable that kind of feature in Ubuntu 12.04.  How can I achieve this?


Why doesn't Doctor Strange remove the Infinity Gauntlet from Thanos?

Doctor Strange seemingly has the ability to open portals wherever he wants. We see at the beginning of Infinity War what happens when he closes a portal and someone isn't fully through it.  Is there any reason why he can't open a portal around the left-elbow of Thanos, and then close it?  I realize that Thanos probably wouldn't allow this to happen normally,      but when he is mostly asleep, and Tony and Spider-Man are pulling on the gauntlet, Doctor Strange has ample opportunity, and plenty of space to just sever Thanos' arm.   Why doesn't he?


Is there such a thing as a $0^\circ$ angle?

I am curious if there is such a thing as a zero degree angle, and if so, what does it look like? I am also wondering if a zero degree angle equals a $360^\circ$ degree angle? I understand that a $360^\circ$ angle is essentially a circle, or the amount of "turn" that equals a circle. I am pondering how you would draw a $360^\circ$ angle. Would it be drawn like ___________ (or just a straight line)?


why the Exceptions was introduced in the java

There are a lot of explanations how the Exceptions works in the Java, that is the root class of the Exception, their ineritance. But few days ago I was asked new question for me: What is exactly reason for Exceptions in the Java? What is the target it in Java. WHY (not what is it or how it works there)? What is you understanding this question and explanation?


I'd like to know if it is possible to create a equation like the one shown in the figure below. And if it is possible, how can I do it?  Desired characteristics:   Side comments aligned between equations Curved arrows pointing from one equation to another   Can someone help me?


What is the live session user password in Kubuntu 15.04? Furthermore, why is there a password for the live user at all?


Why Is a Function Defined As Having Only One Y-Value Output?

I know that it is defined such that there is no more than one y-value output for any given x-value input, but I"m wondering WHY it is defined that way? Why can't we apply everything we know about functions to equations that have more than one y-value output for any given x-value input?   In short, what is the benefit or reason to define a function this way?  At the same time, a little historical context would also be appreciated (i.e., when the concept originated and why).  Thanks,  Moshe


A table spread past the edges of the page

Why is the following table wider than the page?!  After comments from two members from this site, I included more code from the original file.  It seems that the tabular environment in the first problem is prompting TeX to artificially stretch the table in the last problem.  \documentclass{amsart}   \usepackage{tikz} \usetikzlibrary{calc,intersections}   \usepackage{makecell}   \begin{document}   \noindent \textbf{1.) }Compute the following differences. Express each difference as a fraction for which the only common divisor of the numerator and denominator is 1. \\ \\ \noindent \hspace*{2em} \setlength{\tabcolsep}{0.75in} \setlength{\extrarowheight}{3ex} \begin{tabular}{@{}r@{}lr@{}lr@{}l} \textbf{i.) }   &   $\displaystyle{\frac{1}{2} - \frac{1}{3}}$ & \textbf{ii.) }  &   $\displaystyle{1 - \frac{1}{3}}$ & \textbf{iii.) } &   $\displaystyle{\frac{11}{18} - \frac{22}{45}}$ \\[1.2\normalbaselineskip] \textbf{iv.) }  &   $\displaystyle{\frac{27}{14} - \frac{12}{35}}$ & \textbf{v.) }   &   $\displaystyle{\frac{16}{27} - \frac{32}{81}}$ & \textbf{vi.) }  &   $\displaystyle{\frac{21}{10} - \frac{21}{100}}$ \end{tabular} \vskip0.25in  \vfill \pagebreak   \noindent \textbf{14.) }What is the perimeter of the following triangle? \vskip0.2in  \noindent \hspace*{\fill} \begin{tikzpicture}   %Triangle ABC is drawn. The lengths of AB, AC, and BC are to be 8, 10, and 12, respectively. %(The measure of the angle between AB and AC is arc cos(1/8).) \coordinate (A) at (0,0); \coordinate (B) at (5,0); \coordinate (C) at ({acos(1/8)}:4); \draw (A) -- (B) -- (C) -- cycle;    %The lengths of the sides of the triangle are typeset. \node[anchor=north, inner sep=0, font=\footnotesize] at ($($(A)!0.5!(B)$) +(0,-0.15)$){$10$}; \node[anchor={acos(1/8)-90}, inner sep=0, font=\footnotesize] at ($($(A)!0.5!(C)$) +({acos(1/8)+90}:0.15)$){$8$}; \draw let \p1=($(B)-(C)$), \n1={atan(\y1/\x1)} in node[anchor={\n1-90}, inner sep=0, font=\footnotesize] at ($($(B)!0.5!(C)$) +({\n1+90}:0.15)$){$12$};   \end{tikzpicture} \hspace{\fill} \vskip0.25in  \noindent The following table, describing the Preston City workforce, is missing some data entries. Based on the information in the table, how many women in the Preston City workforce are unemployed? \begin{tabbing} \hspace*{3em} \= \hspace{2.5in} \= \kill \> \textbf{a.) }500     \> \textbf{b.) }1000 \\ \> \textbf{c.) }1500    \> \textbf{d.) }2000 \\ \> \textbf{e.) }2500 \end{tabbing} \vskip0.2in  \noindent \hspace*{\fill} \setlength\extrarowheight{2pt} \begin{tabular}{|| c | c | c !{\vrule width0.8pt}c ||} \hline \multicolumn{4}{|| c ||}{{\bf Residents of Preston City}} \\ \Xhline{0.8pt}             &   Employed    &   Unemployed  &   Total \\ \hline     Men     &   27,000      &               &   \\ \hline     Women   &               &               &   21,500 \\ \Xhline{0.8pt}     Total   &   48,000      &               &   50,500 \\ \hline \end{tabular} \hspace{\fill}  \end{document}


My SF sandbox environment was upgraded to Winter 14 release a few days ago.  I've been doing VisualForce and Apex development for the past few days without any problems but then today, I ran into an odd - but quite debilitating - problem.  I go to the Debug Logs page and attempt to add a user to monitor.  I select the desired user in the "Add Users to Debug Logs" page and click the Save button.  But when I am returned to the Debug Logs page, the user I just selected does not appear!  To make matters worse, this only occurs with a few users - namely the users I need for my development and testing.  I am able to add my own user and several others - just not the ones that I need.  I have never seen this problem before so that led me to think it might be related to the Winter 14 release.  Any ideas?  Thanks in advance!  CORRECTION - confirmed as bug - please see  for workaround instructions.


PHP un-nest all element in multidimensional array

I have a multidimensional array in PHP and I want to un-nest all elements to bring them to the top level. Here is the array:   Array (     [0] => Array         (             [id] => 1             [color] => red          )      [1] => Array         (             [0] => Array                 (                     [id] => 2                     [color] => blue                 )              [1] => Array                 (                     [0] => Array                         (                             [id] => 3                             [color] => green                         )                  )              [2] => Array                 (                     [id] => 4                     [color] => blue                 )          )      [2] => Array         (             [id] => 5             [color] => purple         )  )   What I want end the end is this... so basically it loops over the array and any group it just unnests it. Sorry, I don't know the proper terminology. Is there PHP function for this? I've tried several solutions on stack but it moves all key values pairs up to the top and not just the array groups --- it just creates a mess.   (     [0] => Array         (             [id] => 1             [id] => red                         )     [1] => Array         (             [id] => 2             [color] => blue         )      [2] => Array         (             [id] => 3             [color] => green         )      [3] => Array         (             [id] => 4             [color] => blue         )       [4] => Array         (             [id] => 5             [color] => purple         )  )   Thanks!


I need to prove the next numbers are irrational:  $$ \sqrt{2}+\sqrt{5} $$ $$\sqrt{3}$$ $$ \log_{2}3  $$  Of course, I tried to prove it with negative evidence...


What is the meaning of "<<" in javascript?

A user named ZPiDER answered a question about generating random colour strings in JS.    This is the code:  "#"+((1<<24)*Math.random()|0).toString(16)   I am trying to parse it to understand how it works but I really don't get it. Could someone please Explain what the << means?  I tried google but I suspect that the search engines interpret the characters as special somehow.


Removing unnecessary whitespace in a J2EE/Struts Application in WebSphere

Is anyone familiar with a technique for removal of whitespace that results from the use of tag libraries such as JSTL?  I know that you can do this , but does anyone have similar experience doing this type of thing within WebSphere App Server?


I want to check if a string that has been written to a variable in bash via the read command is a tuple of two numbers. To my knowledge, this should be possible with  if [[ "$input" =~ "$regex" ]]; then ...   for a tuple of two numbers, separated by at least one whitespace and any number of whitespaces before and after, I tried  $regex="^ *[0-9]+ +[0-9]+ *$"   which should match  12 123   23 3246543 123     345           34      23 1 234   but not  123 123 123 1235124 123w123 123 etc.   however, this doesn't work...


If $H\leq G$ and $[G:H]=2$, then $H$ is normal in $G$.

Could someone please explain something about the following proof? It is based on the proof ().     If $H\leq G$ and $[G:H]=2$, prove that $H$ is normal in $G$.   Proof:  If $[G:H]=2$, then there are two distinct left cosets $H$ and $G\setminus H$. This is because left (right) cosets partition $G$. Let $x\in G$.  Case 1: $x\in H$. Then $xH=H=Hx$.     I don't understand where $H=Hx$ comes from. Is it similar to the proof for "if $x\in H$, then $xH=H$"?   For Case 2: $x\notin H$, the proof for $xH=G\setminus H$ is similar to that of "if $x\in H$, then $xH=H$" as well?   The proof I am basing this on is using "if right and left cosets are equal, then $H$ is normal", but can the same proof be applied for when index is only known and equal to $2$?


Convert surveyor's calls in excel table to polygon shapefile

Do you know of a way to take surveyor's calls from an excel file (for example: N35-45-15W 60.0 ft, etc) and have them generate polygon shapefiles point by point in GIS? I know you can easily do this with point features that have coordinates, but I am trying to figure out how to build full polygons (without XY coordinate information, just surveyor's calls).


How to increase home Partion in Ubuntu 15.10

I have Ubuntu 15.10 with Windows in different partitions. While installing Ubuntu the following were declared:   swap space: 65 GB ext4 - /home: 2 Gb ext4 - /: 200 GB   The Root Partition or My Computer in Ubuntu Shows 187 GB of Free Space. I am unable to create Folder.  The Home partition has only 1.4 GB of Free space. How would I be able to use the 200 GB partition for storing files( Create Folder Etc. ) I wish to increase the space in the Home Directory?


What are the semantics of downvote on the network after all?

Something has been bothering me for a long time.  Voting is a central concept of Stack Exchange, it is the mechanism through which the community maintains the sites. Voting affects the fate of individual questions/answers as well as the lives of their authors on the network. Therefore the consistent and responsible use of this right is critical for the network to function.  At the same time, I feel that its function is not communicated and its misuse is not prevented well enough.  The relevant help page says:     …voting down a post signals … that the post contains wrong information, is poorly researched, or fails to communicate information.   The tooltip of the down button says:     This question does not show any research effort; it is unclear or not useful   Based on these, a downvote signals content that does not comply with the guidelines of the network for content, and is, therefore, detrimental, so may necessitate an action.  All too often, however, one sees questions that are clear, well-written and researched as far as it can be expected, downvoted, seemingly based on the voters unapproval of the subject matter.  I have two examples of my own questions:       I have yet to receive a justification for the downvotes pointing out how do these questions not live up to the expectations laid out above. The controversy around the subject matter, however, is clear from the discussion, which is telling.  I don’t think that Stack Exchange should penalize members of the community based on their opinions. I do think that – like any good democracy – it should be value-neutral, and only protect the system from misuse. Penalizing those whose opinion differ is the characteristic of dictatorships.  I have already decided never to contribute to Server Fault again, because of this intellectual nazism which seems to be especially prevalent there. I’m sure I’m not the only one who has already been driven away because of this.  So, I would like to know if my understanding of the concept of downvotes is correct, is the network, as I hope, respect their member’s experience and judgement, and I would like to see these ideas, i. e.:   upvoting a question – this question brought up something that I was interested in, it is well-written, it is researched; upvoting an answer – this post answers the question or provides additional useful information, it is well-written and to the point; downvoting a question – this question is unclear, poorly written or does not provide sufficient context downvoting an answer – this post does not answer the question, it provides the wrong solution, it is unclear, poorly written, or does not provide sufficient context   better communicated to and acting in accordance with expected from individual community members.


Is verifying ISOs downloaded from the official website worthwhile?

I downloaded the ISO from , selecting the default "Ubuntu Desktop" option.  The website links the page  which gives instructions how to verify ubuntu.  This seems pretty tedious, and I am wondering how realistic it is that there is a problem with ISO downloaded from the official website. I note that the process of verification itself requires me to download software that is new to me, thus introducing another attack vector on me even as I am closing another one.  For what it's worth, I am planning to use Live USB only and not to fully install Ubuntu. Does that make a difference?


after searching my update button will not working anymore PHP

I created this php for administrators to search for users and allow administrators to edit their details when they click the button. When the user is not using the search function, the "Update" button will work. After the user types the search function, it will display all relevant fields according to the user input, but after the user uses the search function, the "Update" button will no longer work. Thank you.  <?php include '_base.php'; $p->title = 'List of Users';   $nameorid = $p->get('nameorid');  $stm = $db->prepare('SELECT * FROM user WHERE id LIKE ? OR `name` LIKE ? OR email LIKE ?'); $stm->execute(["%$nameorid%","%$nameorid%","%$nameorid%"]); $arr = $stm->fetchAll();  // output ----------------------------------------------------------------------------------------- include '_head.php'; ?>
List Of Users
  <?= $h->label('User ID / Name / Email ') ?> <?= $h->text('nameorid', null, 50, 'autofocus') ?>

<?= count($arr) ?> record(s)

             Id	             Name	             Gender	             Group

         <?php             foreach ($arr as $s) {                 echo "
                         $s->id	                         $s->name	                         $s->email	                         $s->role	                                                  <button id='normalBtn' data-get='/updateUser.php?id=$s->id&role=$s->role'>Update</button>
                 ";             }         ?>

     <?php include '_footer.php';


Where is the bash feature to open a command in $EDITOR documented?

I have recently discovered that if we press Ctrl+X Ctrl+E, bash opens the current command in an editor (set in $VISUAL or $EDITOR) and executes it when the editor is closed. But it doesen't seem to be documented in the man pages.


Redirection using file descriptors - specific example

I am reading  which gives the following examples about redirection and file descriptors.   ls > dirlist 2>&1       will direct both standard output and standard error to the file   dirlist, while the command  ls 2>&1 > dirlist       will only direct standard output to dirlist. This can be a useful   option for programmers.   Are these examples the wrong way round? It seems to me the second example "will direct both standard output and standard error to the file dirlist" while the first example "will only direct standard output to dirlist".   If I'm wrong about this (...probably...) can someone explain the logic of these 2 examples clearly?


Reinstall ubuntu from factory enabling whole disk encription

I am so excited that I got a new personal laptop, and for the first time in my life it didn't bring Windows preinstalled (it's the new Dell XPS 13, with Ubuntu 16.04 preconfigured).  As I turned it on, I could just set the basic settings (language, locales, etc.) and I was able to encrypt my home folder, but I remember from past installations (and that's how I currently have it in my old computer) that there was a chance of encrypting the whole disk (I think in the partitioning step).  I've been reading here at SO and in Internet and I think it is not possible to do something like "reinstalling the whole Ubuntu" from factory without having to boot it from a USB, so here is my question:  Is there a way to encrypt the whole disk once Ubuntu has been installed? Is there a workaround? Or do I have to get an image, boot it from a USB and perform as usual.  Thank you very much in advance!


Calculate number of days between 2 dates without weekends

I have this very simple piece of code that calculates the number of days between to given timestamps:  $timestamp1 = strtotime("2017-01-01"); $timestamp2 = strtotime("2017-01-05");  $timeDiff = abs($timestamp1 - $timestamp2); $numberDays = $timeDiff/86400; $numberDays = intval($numberDays);   It is working perfectly, but I am wondering if there is a way to exclude weekends in the calculation.  I have looked around online and found some alternative options but there is alot more code than what I have above so I am asking if there is an option with minimal code like my above example?


I have installed the Windows 10 Preview Enterprise on a pc with a Windows 8.1 Prof.  After install I'm unable to get the new snap assist to work correctly, or at least as I assumed it would work.  Right now the only snap I see is to snap the app to a maximized view.  Is there something I have to do to enable this functionality?


How to get Text to follow semicircular path, read left to right and oriented counterclockwise

I'm using adobe illustrator, and I'm trying to get the text to orient from left to right(counterclockwise) and not upside down but I cannot get it to do that on the path I've created. Im pretty beginner with illustrator, any help would be greatly appreciated. thank you


Which one is better "iterator" or "for-each loop"

Ierator and for-each loop both we use for traverse no of items, I have used for-each many times but I am not clear about iterator, means when we should use ierator. I am studying salesforce workbook example..  global class CustomIterable implements iterator<Account>{    public List<Account> accs {get; set;}   public Integer i {get; set;}    public CustomIterable(){      accs =[SELECT Name fROM Account limit 5];      i = 0;              }   global boolean hasNext(){          if(i >= accs.size()) {          return false;         } else {          return true;         }    }    global Account next(){          if(i == 8){return null;}          i++;          return accs[i-1];     } }   //------------  @isTest(seealldata=true) global class IteratorClass{     public static testmethod void main(){          IteratorClass obj = new IteratorClass();         Iterator<Account> acs =  obj.Iterator();         system.debug(acs);      }     global Iterator<Account> Iterator(){             return new CustomIterable();          }  }


show that $x$ is in $\ell^1$ if $\sum x_ny_n$ is convergent for all $y=(y_n)\in{c_0}$

If $x=(x_n)$ is a sequence of complex numbers such that the series $\sum  x_ny_n$ is convergent for all $y=(y_n)\in{c_0}$. Then prove that $x\in{\ell^1}$. Can anyone tell me what is the meaning of $c_0$  in this question and how to proceed on proving it.


A book with two twins and a difficult relation, a room where time flows slower than the outside and a mysterious monster coming from a sink

There was this pocket book, back when I was a teenager (20 years ago), with these two twins discovering a room (it was something like a tool shed) where time flowed slower (1 hour inside was equal to 1 minute outside if i remember correctly).   Inside the shed there was a sink and a strange snake-ish metallic monster was slowly coming out from it.  One of the twins, the one with the "less marked" personality, decides to spend one year (during a whole night) inside the room in order to get out older than his twin.  I don't remember what happens with the monster, I think they destroyed the whole shed in the very end.


I'm trying to create a button so that when clicked, a specific element stored in an associative array will get deleted. But what I've done doesn't seem to work. Any help will be appreciated.    // Creates the button   bodyText = bodyText + '<input type="button" id="btnDeleteQuestion"    value="Delete a question">';    document.getElementById("btnDeleteQuestion")     .addEventListener("click", function() {       // Deletes the third question stored in the questionBank       delete questionBank[2]['questionText'];       console.log(questionBank);       }); }


If $f: R \to R$ is a non constant, thrice differentiable function such that $f(1+ \frac{1}{n}) = 1$ for all integers, then find $f''(1)$  Since function is continuous so, $f(1) = 1$  I have this formula for $f''$   $f''(c) =\lim_{h \to 0} \frac{f(c+h) + f(c-h) - 2f(c)}{h^{2}}$ So $ f''(1) =\lim_{n \to \infty}\frac{f(1 + 1/n) + f(1- 1/n) - 2f(1)}{1/n^{2}}$ Then I used L' hospital, but ended up getting $f''(1+1/n)$ which is just $f''(1)$   Any suggestion or hint would be helpful.


How to write strings in Unicode to a text file in Python?

I was trying to write a translate function that could automatically convert some text file in English into Chinese. There is a dictionary saved and the key values are in Chinese characters. However, an error occurred when Python was trying to write to a new text file because it couldn't write in unicode. Here is my function: def translateDesc(fileName):     # Opens the file that we're trying to translate     textFile = open(fileName, "r")     print(textFile)     fileLines = textFile.readlines()     textFile.close()      # Creates an output list and translate line by line     outputList = []     for line in fileLines:         outputList.append(translateLines(line)) #outputList now contains some string in Chinese      # Creates an output file and writes in it     outputFile = open("output.txt", "w+")     outputFile.writelines(outputList)        # THE ERROR OCCURRED HERE     outputFile.close()  Here is the error message: UnicodeEncodeError: 'charmap' codec can't encode characters in position 0-6: character maps to <undefined>  How could I allow Python to write Unicode in a text file?


As an Australian, I like to follow British forms of words such as license/licence and practise/practice. I have no problem with licence the noun and license the verb, but I find it hard to keep practise and practice straight.  To get better, I practise my juggling. When I see a doctor, I visit their practice. But what about preparing a set of practice problems? Are they a set of problems that are used for practising, being instead practise problems? Is there a use of the word practice besides referring to, say, a doctor's establishment?


I am facing Null Pointer during batch job

I have a batch job which processes data from source to destination. Once in a while I see NPE immediately after the job triggers and it runs fine until it finishes. Looks like line 96 is throwing the error but I am not sure why when the job triggers? This is the line which I think is the source f the error.  Node node = nodeList.item( 0 ).getAttributes().getNamedItem(DCDirectProcessorConstants.Tag_Response_Status);   Java Code  InputSource source = new InputSource();             source.setCharacterStream(new StringReader(response));             Document document = builder.parse(source);              XPath xpath = XPathFactory.newInstance().newXPath();             NodeList nodeList = document.getElementsByTagName(DCDirectProcessorConstants.Tag_Response_getValue);             Node node = nodeList.item( 0 ).getAttributes().getNamedItem(DCDirectProcessorConstants.Tag_Response_Status);              RatingSessionTO responseTO = XMLProcessingUtil.processResponseData(                     ratingSessionTO, response, migrationConfig, data.toString());              /*DataMigrationDao dao  = null;                 if( migrationConfig.isOneTimeMigration() ){                      dao = (DataMigrationDao) appContext.getBean("oneTimeMigrationDao");                 }else{                     dao = (DataMigrationDao) appContext.getBean("dailyMigrationDao");                 }              */              //This flow is explicitly for Catchup             if("1".equals(catchUp)){                  if(kafkaFailure){                     postMessageToKafka(responseTO,catchUp,dao);                  }                 else if(raterFailure){                     //Handle rater failure                     int ID = dao.getExternalID(responseTO);                     if(ID != 0){                         responseTO.setExternalID(ID);                     }                     migrateMessageToRaterInfo(responseTO,dao,catchUp);                  }                 else{       //Handle XML_Sessions failure                      try{                         if(dao.verifySessionID(responseTO) == 0){                                // Defect 76093                              if (node == null || DCDirectProcessorConstants.Status_Failure.equalsIgnoreCase(node.getTextContent())) {                                 logger.error("Retry failure.Source id already present in catchup "+ ratingSessionTO.getSrcId());                             } else {                                 dao.migrateData(responseTO);                                 postMessageToKafka(responseTO, catchUp, dao);                                 migrateMessageToRaterInfo(responseTO, dao, catchUp);                             }                         } else{                             logger.error("Source id already present in archive "+ratingSessionTO.getSrcId()+" Updating status to 'C'");                             dao.updateCatchupCompletion(ratingSessionTO.getSrcId());                         }                     }                     catch(Exception e){                         logger.error("Catchup failed for "+ratingSessionTO.getSrcId()+" Status remains 'P'");                     }                 }             }   Stack Trace  java.lang.NullPointerException   at com.mercuryinsurance.r3.util.MigrationExecutorThread.run(MigrationExecutorThread.java:96) [migration.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_66] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_66] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_66]


Sometimes I wonder if he is actually/really  as lavish as he   pretends to be.   I know that this sentence can work without either actually or really, but if we were to use one of them to make an impact on the listener, which one should it be?


Number of weakly increasing functions $g: \{1,2,3,....m\} \rightarrow \{1,2,3,....m\}$

How to find the number of weakly increasing functions of $g: \{1,2,3,....m\} \rightarrow \{1,2,3,....m\}$? Here weakly increasing means that $x < y$ implies $g(x) \le g(y)$.    Attempt: The first element $1$ has $m$ choices(including $1$), second element has $m-1$ choices ..... So I get $m!$ , is this right?


Declined invitation in future, how can I still see when it was originally scheduled?

Secretary sends out months of meetings, always at a time I already have a re-occurring meeting, so I decline them all. However, what if my meeting changes/ends and now I could attend if I wanted- how can I still see that I was invited to a meeting at that time- without replying "tentative" to them all? Is there a way?


I decided to write my own Vector class for my library but when I try to compile it using g++ -Wall -std=c++11 -O a.cpp -c -o a.o and read the symbols from the output file using nm a.o I don't see any member functions that I wrote for that class and when I try to link it with a program that uses them I get undefined reference to errors. Here is the a.h file:  template<typename T> class Vector {     private:         int vsize;         const int maxsize=2147483647;         T* array;     public:         Vector();         ~Vector();         bool push_back(T t);         bool pop_back(T* t);         bool replace(int element, T t);         bool resize(int newsize);         bool getP(int element, T* t);         bool clear();         T* getArray();         int size();         T operator[](int n); };   And the a.cpp file:  #include <stdlib.h> #include "a.h"  template<typename T> Vector<T>::Vector() {     vsize=0;     array=(T*)malloc(sizeof(T)*vsize); } template<typename T> Vector<T>::~Vector() {     free(array); } template<typename T> bool Vector<T>::push_back(T t) {     if(resize(vsize+1))         return 1;     array[vsize-1] = t;     return 0; } template<typename T> bool Vector<T>::pop_back(T* t) {     *t = array[vsize-1];     return resize(vsize-1); } /*     Other member function definitons... */   I'm using g++ 5.4.0 and nm 2.26.1


Getting factors of Mersenne numbers. Why does $2^p-1|2^b-1$ where $p|b$ and $p$ is prime and $b\in Z$?

Why does $2^p-1|2^b-1$ where $p|b$ and $p$ is prime and $b\in Z$?  I'm working with Mersenne numbers and factorization of numbers to a large power minus 1 and the solution to the problems are to find a prime that divides $b$ then $2^p-1$ will divide $2^b-1$


How to obtain a set of separate objects from an Array Modifier (or other method) and keep their rotation and scale?

I have been looking for methods to create a set of objects from an Array Modifier. Normally one creates an Array, sets an Array Offset and manipulates it so that the transformation propagates to all the copies and most of the times the goal is to have a geometry as you don't care about the sub-parts own transforms but I do this time since my goal is to export these (empty in my case) transforms to a game engine. To expand a bit, I already know that I can Apply the modifier and then separate the meshes By Loose Parts but it's not what I want and the reason for that is that with that method, such loose parts will inherit all the same rotation and scale from the original object; in fact the matrix of the single copy of the array is lost when applying the array. My question is slightly different from this one:  in that I need the individual rotations and scales to be kept. What I need ideally is a workflow to go from an Array Modifier (but potentially parting ways from the Array Modifier) to create a big set (big enough to discourage manual duplication) of empty objects that keep their individual position, rotation and scale. How can I achieve that?


plotting side by side two subfigures in a one figure in an llncs class file

I want to plot two figures in the same line. I'm also using the llncs Springer class file  for my document.  I have these two figures:  \begin{figure}   \begin{tikzpicture} \begin{axis}[ ybar,   symbolic x coords={x1, x2, x3},   xtick={x1, x2, x3}, ytick={5, 4, 10},   xticklabel style={rotate=-90}, nodes near coords,   ylabel={Accuracy (\%)}, width = 6.9cm,   legend pos= north east] \addplot [black] coordinates{(x1, 5) (x2, 4) (x3, 10)}; \end{axis} \end{tikzpicture} {\footnotesize $\bf Fig. 10.$  The results using gh algo} \end{figure}    \begin{figure}       \begin{tikzpicture}     \begin{axis}[     ybar,       symbolic x coords={x1, x2, x3},       xtick={x1, x2, x3},     ytick={4, 7, 23},       xticklabel style={rotate=-90},     nodes near coords,       ylabel={Accuracy (\%)},     width = 6.9cm,       legend pos= north east]     \addplot [black] coordinates{(x1, 4) (x2, 7) (x3, 23)};     \end{axis}     \end{tikzpicture}     {\footnotesize $\bf Fig. 10.$  The results using er algo}     \end{figure}   When I am plotting these two figures like, I always get the second figure below the first figure. What I want is to plot side by side the two figures. How can I modify my code?  Any help will be very appreciated!


What does a binomial coefficient with commas mean?

I'm reading through  paper (on Dyck Paths). Near the middle of the second page, the author states the following:     Remark For the set $h_n$ there are ${k\choose t_1, t_2, ... , t_m }$ $n + k \choose{k}$ $=$ $ n + k\choose {n, t_1, t_2, ..., t_m}$ different Dyck paths.   What does ${k\choose t_1, t_2, ... , t_m }$ mean? I know what the binomial coefficient is, but I'm not sure how to interpret it when one of the parameters is a set.


Injectivity of Homomorphism in Localization

Let $\alpha:A\to B$ be a ring homomorphism, $Q\subset B$ a prime ideal, $P=\alpha^{-1}(Q)\subset A$ a prime ideal. Consider the natural map $\alpha_Q:A_P\to B_Q$ defined by $\alpha_Q(a/b)=\alpha(a)/\alpha(b)$. Suppose that $\alpha$ is injective. Then is $\alpha_Q$ always injective?    I think so, but I'm clearly being too dense to prove it! My argument goes as follows.  Let $\alpha(a)/\alpha(b)=0$. Then $\exists c \in B\setminus Q$ s.t. $c\alpha(a)=0$. If $B$ is a domain we are done. If not we must exhibit some $d\in A\setminus P$ s.t. $da=0$. Obviously this is true if $c =\alpha(d)$. But I don't see how I have any information to prove this!  Am I wrong and this is actually false? If so could someone show me the trivial counterexample I must be missing?   Many thanks!


How to plot Circle of radius 1km on Google Maps

I have circle of radius 1km in QGIS (centered at: -122.69690,58.80688 WGS84, North America), when I export it to Google map it isn't 1km in radius (I checked using the measure tool on Google maps) and the shape isn't a perfect circle as seen below.  On Google maps, North and South direction from the center are more that 1km radius while in East and West direction it is less than 1km.  How can this be fixed?   In QGIS     In Google Maps


Evaluation of $\lim_{n\rightarrow \infty}\frac{n!\cdot e^n}{\sqrt{n}n^n}$ without stirling approximation

Evaluation of $\displaystyle \lim_{n\rightarrow \infty}\frac{n!\cdot e^n}{\sqrt{n}\cdot n^n}$   $\bf{My\; Try::}$we can write it as $$l=\lim_{n\rightarrow \infty}\frac{e^n}{\sqrt{n}}\cdot \left(\frac{1}{n}\cdot \frac{2}{n}\cdot \frac{3}{n}\cdots \cdots \frac{n}{n}\right)$$  $$\ln (l) = \lim_{n\rightarrow \infty}\bigg[n-\frac{1}{2}n+\sum^{n}_{r=1}\ln\left(\frac{r}{n}\right)\bigg]$$  Now how can i solve it, Help required, Thanks


There are currently 47.5k questions with close votes. This seems to be quite a problem in my opinion and I think the close vote policy needs to be reviewed. A few suggestions:  Higher reputation users get more votes (apparently already happens)  Votes of higher reputation users are more significant (e.g. 2x or 3x)  Higher reputation users are allowed multiple votes per question   Very similar to more significant votes, except that casting additional votes has a cost. Related to  (+48).  suggests a safer option - 50k = 2 votes, 100k = 3 votes and no question can have more than 2 additional votes (i.e. max 2 users each 2 votes ((2-1)*2=2) or 1 user 3 votes (3-1=2)) (thus absolutely no question can be closed with less than 3 users (except maybe with mods))  Any of the above 3 suggestions, but rather than using high rep as judging factor, using reviewing ability (how to judge this?)  Increase reputation required to vote to close own questions (not sure how many of the questions this is or how much reputation is required)  Voting affects reputation (for motivation) (sounds like a good idea for all types of review - it would stop reviewers that approve inappropriate posts)   Increase if people agree, smaller decrease if they don't, though this isn't currently applicable to close votes, though maybe it should be. A negative voting reputation doesn't decrease your overall reputation, but significantly reduces the number of votes you're allowed (or simply disallows voting)  Once-off flush. The number of questions appears to be pretty stable (from checking over the past few days / weeks), so a once-off flush may fix the problem.  The reasoning is that it being that high looks bad (does it matter? I don't know) and may be demotivating to potential reviewers.  Remove all the questions with closed votes from the queue and trickle-feed them back into the system, preventing the queue from building.  Similar to the once-off flush, but doesn't into-the-void-ify votes. The reason to do this is probably more psychological than anything else, and possibly that tending to newer (presumably more significant) requests could get delayed (this doesn't seem to be such a big problem).  Decrease the number of views required for votes to start expiring. Presumably most of these are those with less than 100 views (otherwise they would expire), so just decreasing this limit may work.  Have the Community user poke questions with close votes more often than other questions   This will get the question more attention to get up to 100 views (so votes start expiring) or for it to get more close votes to be closed.  Lower reputation required for close vote privilege (this is a terrible idea, just included for completeness)  Order by date / number of votes already cast on question   Not so much a suggestion as a consideration. I don't know how questions are currently sorted, but one of the above or a combination of the 2 might be a good idea.  Better interface for the review queue  I find the current way of reviewing close votes unworkable for various reasons. I'm thinking a nice interface very similar to how you can currently browse questions.  Decrease number of votes required to close a question  An irritating little note popping up somewhere occasionally for 3k+ (4k+? 5k+?) rep users reminding them to use close votes if they don't already   UPDATE - 2013/04/04: Rather significant edit. I've seen a steady increase over the past 2 months. Sitting at 51k now. I think it's safe to say something needs to be done. Data explorer queries:  - useful for reviewing if you find the review queue unworkable (, unfortunately).  (maybe a little off).


Regarding the kingdom Animalia, which phylogenic tree is more common: Molecular Comparisons or Body-Plan Grades

In the picture below, which I obviously do not own:     it depicts two different phylogenic trees, one which is based on molecular comparisons and another one which is based on body-plan grades. My question is which is more common or accepted in the current Biology world?  Image reference:


Test environment:  $ mkdir testdir $ cd testdir $ echo | tee "file  name"   Now, ls will print file?name (under Ubuntu GNU bash, at least), while ls | cat will print file and name in separate lines.  What I'd like to achieve is, print file?name with the  piped version, so something like  $ something ls | cat` or `ls | something | cat` or `ls | something cat   In other words, how to fool a command like ls here into thinking, it has a TTY, when it does not, in the shell?  Note: ls is just an example program here, I'm looking for generic solution, not program specific like ls -q | cat would be.


I am having some trouble getting a modular document to work.  This is what my files look like at the moment     ./rootdoc.tex      ./tex/childdoc.tex      ./bib/bibliography.bib   the files look like...     ./rootdoc   \documentclass{book}     %some packages     \usepackage{subfiles}     \usepackage[colorlinks=true]{hyperref}     \usepackage[backend=biber,style=numeric]{biblatex}         \addbibresource{bib/bibliography.bib}  \begin{document}         \subfile{tex/childdoc.tex}         \printbibliography[heading=bibintoc]     \end{document}      ./tex/childdoc   \documentclass[../rootdoc.tex]{subfiles} \begin{document} \chapter{Sample Chapter} some text that i have to cite\cite{ross} \printbibliography \end{document}   When compiling the root document everything works fine and I get the following    But when I compile .\tex.childdoc I get    Any help will be greatly appreciated.


In the process of backing up my audiobooks, I "permanently" removed a folder (with subfolders) that I had already exclusively moved to that drive. It's path is /media/gratis/Seagate Expansion Drive/Audiobooks/Jason Dark . The sole folder in that should be called John Sinclair; but I'm not sure about that.  Which tool offers the best chances to recover those files. I hadn't written plenty on that drive afterwards; so I hope for the best.  It's not that other methods failed; I just cant get my head around what to do and I want to be cautious. It's a NTFS Drive.  According to testdisk it has an "EFI GPT" Partition table.  Disk /dev/sdb - 5000 GB / 4657 GiB - CHS 608001 255 63, sector size=512 - Seagate Expansion Desk, FW:9401   Information According to "Disks" (Ubuntu Standard Software):  NTFS; GUID Partition Table; [...] Partition Type: Microsoft Reserved


Test for anything but a specific item in a chest

I'm trying to test for anything but a specific item in a chest. I've heard that this would be possible by removing the brackets.  The normal to test for an item is;  /testforblock X Y Z minecraft:chest -1 {Items:[{id:"minecraft:diamond"}]}  And the syntax to test for anything but the item would be;  /testforblock X Y Z minecraft:chest -1 {Items:[id:"minecraft:diamond"]}  However, this doesn't work, probably because removing the brackets doesn't actually invert the command. Does anyone know how I can test for any item except a diamond in my chest?  The chest is emptied each time it is tested, so I'm testing for the following situations;   There's a diamond in the chest, there is an item that isn't a diamond in the chest, or there's nothing in the chest.


I'm building a Visualforce page with some JavaScript to build a content DataTable based off the following example:   This page works well and looks great in Salesforce, but when I try to open it in the community it looks like the JavaScript is not working. The page references the same public static resource file, so I'm not sure why this would work in Salesforce and not the community.  Any help would be greatly appreciated.   Edit: This question is NOT a duplicate of the one listed. As I said, I set the static resource to public.   Thanks!


How to remove first segment or segments from PATH in shell script

I wanted to remove a CUDA directory from PATH by a sh script. The directories are showed by doing echo $PATH  /usr/local/cuda-9.0/bin:/usr/sbin:/usr/bin:   I want only:  /usr/sbin:/usr/bin:   My script changes nothing but it DOES in terminal(this script will be automatically executed when I do conda deactivate):  export PATH=$(echo ${PATH} | sed -r 's|/usr/local/cuda-9.0/bin||')   Could somebody tell me why and correct it into an elegant way?


Installing/Using a new class in Ubuntu 12.04 LTS

This question will probably have great intersection with other questions, but I would be grateful for any help or references to relevant answers.  I am quite a novice at Ubuntu, I use 12.04.1 LTS. I want to install/use a class available online (called "asl.cls", available here: ).  I made a new folder named "asl" (at the path: /usr/share/texmf-texlive/tex/latex/asl) and then copied the class asl.cls inside that folder (was this right?). I then ran (sudo) texhash to update, but it did not work.  As an alternative solution, I also tried to keep the class asl.cls inside the same folder with the working .tex file which I am currently trying to write. Still not working.  In fact, upon compilation of the working .tex file (with documentclass "asl"), Kile opens a new tab with a file called "amsopn.sty", the cursor stops at some point in the middle of that file, and the compilation window is full of errors. Apparently, looking at the list of errors, there seem to be conflicts between operators or other commands already defined in the file "amsopn.sty" (and also in the file "amsmath.sty", indeed, much more conflicts with "amsmath", which nevertheless does not open in another tab). I have never seen such a thing happen before, and I have been using tex for some time now.  Let me mention that my working .tex file is error free otherwise. I.e., if I just replace "asl" by regular "amsart" in the documentclass, everything compiles smoothly.  Any ideas, suggestions?


I'm receiveing the warning  Strict warning: Only variables should be passed by reference in eval() (line 2 of D:\wwwroot\tixers\modules\php\php.module(80) : eval()'d code).  Everywhere I've looked tells me its a render error but I can't find anything wrong.  The form works and submits all my info to the database, but there warning still shows up.  If you need the code for the module let me know and I will reply to it.    THANKS!  I use  <?php print drupal_render(drupal_get_form('sellTickets_form')); ?>   then in the form 'sellTickets_form  function sellTickets_form($form, &$form_state) {  $form['team'] = array(     '#type' => 'textfield',     '#title' => t('Team Name:'),     '#size' => 30,     '#required' => TRUE, );   ......break for forms.....  $form['total_points'] = array(     '#type' => 'textfield',     '#title' => t('Total Points Awareded'),     '#size' => 30,     '#required' => TRUE, ); $form['submit'] = array(     '#type' => 'submit',      '#value' => t('Submit'), ); return $form;   }  function sellTickets_form_validate($form, &$form_state){  }  function sellTickets_form_submit($form, &$form_state) {     global $user;     $uid = $user->uid;     $team = $form_state['values']['team'];     $price = $form_state['values']['price'];     $section = $form_state['values']['section'];     $row = $form_state['values']['row'];     $seat = $form_state['values']['seat'];     $quantity = $form_state['values']['quantity'];     $opponent = $form_state['values']['opponent'];     $date = $form_state['values']['date'];     $location = $form_state['values']['location'];     $description = $form_state['values']['description'];     $total_points = $form_state['values']['total_points'];     $organization = $form_state['values']['organization'];      db_query("INSERT INTO ticket (     `TEID`, `price`, `location`, `date`, `organization`, `section`, `row`, `seat`, `quantity`, `opponent`, `description`, `points`)       VALUES ('".$team."', '".$price."', '".$location."', '".$date."', '".$organization."','".$section."', '".$row."', '".$seat."', '".$quantity."', '".$opponent."', '".$description."', '".$total_points."');" ); }


I am trying to fit some data that looks like a bell-curve: we reach a maximum at some value close to the mean, then the graph falls towards zero as we get further away from it. I am not the "owner" of the data so I cannot share it with you here, but I think the idea is clear with the "fake data" below  I would like to find a non-linear model that can fit that type of data, but my search did not give me much information. What are your suggestions?


Does the war have an ending in Planetside 2?

As enemy bases are captured, they just seem to respawn right in the middle of friendly captured territory. This is looking like a perpetual cycle, and none of the three teams ever gets closer than to the very edge of winning the whole continent, only to lose lots of territory again.  So is this by design? Is Planetside 2 eternally to be at war, with no winner ever? I was hoping it would be more like a 'match'. I admit that both are almost the same thing, but there is at least the closure of winning/losing sides this way.


Remove polygon line after shapefile reprojection

I have a shapefile of the Bering Sea in the Pacific Ocean I've been working with in R. It was originally split down the middle, so I reprojected it to Mollweide to connect them (image example attached). The only problem is that there's still the boundary line down the middle. How would I get rid of it? They aren't two polygons that can be combined with Dissolve for some reason. Any advice would be greatly appreciatined. Here is my code so far:  library(rgdal) Bering_Sea<- readOGR("Bering_Sea.shp")  Bering_Transform<- spTransform(Bering_Sea, CRS("+proj=moll +lon_0=150 +ellps=WGS84"))  plot(Bering) plot(Bering_Transform)


Is there such thing as a version of SE that I can use only through my personal website?

If you've ever used Google's Custom Search engine that provides search results specific to your website, you'll know what I mean.   I'm interested in an API that I can use from Stack Exchange to host a forum specifically for my website.   So for example, if I visit forum.example.com, the page would be generated / hosted by Stack Exchange and use Stack Exchange's network but on my website only.   That would mean I don't have to write a forum page myself and take advantage of Stack Exchange's huge userbase.   Is there an API or something similar like this?


My laptop is dual booted with Windows and Ubuntu. I have updated my Ubuntu grub by the sudo update-grub. Now, when I rebooted my laptop, it is not showing the grub screen where I can access my windows OS.


Is there a version of Ubuntu 12.04 without UNITY? I prefer GNOME

I'm still running 10.04, and have been putting off upgrading because I don't want to have to have UNITY. I prefer GNOME, and want to keep using it.  I do want to upgrade to another LTS release, and 12.04 is the next one.  Is there a non-UNITY version of 12.04?  A 12.04 version that still uses GNOME?


I'm setting up an email server, and I'm a bit confused by SPF.  Following some examples, I set my SPF record as follows...  v=spf1 mx ip4:1.2.3.4 mx:mail.mydomain.com ptr:1.2.3.4 -all  I follow what most of that means, but why is MX in there twice?  I assume the second MX means, "This is a mail server for this domain."  Am I right on that?  And either way, what does the first MX mean?  Does it just indicate anyone checking should look at the MX records stored apart from the SPF TXT record?  And, if so, is the MX:mail.mydomain.com redundant with the actual MX records?


From questions about peanut butter to “Why are we alive?”, my sporadic and random questions always makes my friends laugh. Can I put a comma after the quoted question (as seen in the example above)? Or is that illegal.


I've seen varying questions relating to this question. Except mine revolves around C#.  I'm trying to validate that the projection I'm expecting matches what is in all the .shp files I'm reading.  GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]   For example I have this prj file, is there anyway to verify that is the SRID that I'm looking for (In the .Net library)?  I'm looking for an answer relating to the .Net Framework: I don't have ArcObjects or any Esri Libraries. Any chance there is something baked in to the .Net Framework?


Are all paradoxes reducible to one "fundamental" paradox?

I may need to refine this question, since I am mostly grappling with a murky intuition and haven't yet done the real work.  When I encounter many of the well-known paradoxes, such as Zeno's dichotomy, Russell's set containing itself, problems of "zero" and "one," the concept of the infinitesimal in calculus or a "point" in time, Hegel's "identity of identity and difference," even aspects of quantum indeterminacy, they all seem tantalizingly similar. They all seem to arrive at a point-position, like the "origin" in Cartesian coordinates, that must be defined as both "inside" and "outside" the totality under consideration. Or something like that.   Is there some reduction of these and other paradoxes that is "more fundamental" or best clarifies what they have in common, some sort of meta-paradox? As I say, this may be either too wooly or something everyone with a background in logic already knows, but I thought I'd toss it out there.


Let $n$ be a positive integer. Is $\cos (2\pi/n)$ irrational if $n$ is not $1$, $2$, $3$, $4$ or $6$?


Prove that if $a<c<b$,and $f'(x)$ is differentiable on $ (a,b)$,then $$\frac{f(b)-f(a)-(b-a)f'(a)}{g(b)-g(a)-(b-a)g'(a)}=\frac{f''(c)}{g''(c)}$$   I tried to construct an auxiliary function $h(x)=(f(b)-f(a)-(b-a)f'(a))g'(x)-f'(x)(g(b)-g(a)-(b-a)g'(a))$ I tried to use Rolle's theorem but I am not getting $h(a)=h(b)$


Book about a man abducted by aliens - from a boat in mid-ocean

I read this book around 10 years ago. It is about a man who is abducted by aliens while on a boat in the middle of the ocean. He becomes a slave and then a  mercenary for the said aliens.  Another thing I remember is that the other character was a human-like looking alien woman that the main character falls in love with   Another scene I remember from the first chapter or so is when he wakes up he is shocked as he is in a cell with group of different aliens and he can understand them as had an operation and speech translator inserted in his throat.


Convert endnote superscripts to parenthetical numbers

I have a manuscript that I want to submit to a journal that requires that the numbers referencing endnotes be in-line numbers in parentheses, rather than superscripts:    Is there a simple way to redefine \endnote (or \footnote) to do this?


How to fix: no surface button in the materials tab

I had a problem with my blender. In materials tab I dont have "surface" button, to make  something like Glass BSDF material and etc. Please help me, how I can figure out this problem.  Thanks.


Do the roots of $1+x/1!+x^2/2!+\cdots+x^{2n+1}/{(2n+1)!}$ decrease to $-\infty$?


Do monks add their ability modifier to their additional attacks?

Starting at first level monks can use their Martial Arts ability to make an unarmed strike as a bonus action (and later they get more than one attack with Flurry of Blows).     When you use the Attack action with an unarmed strike or monk weapon, you can make one unarmed strike as a bonus action. (PHB page 78)   In the section of the PHB detailing the rules of attacking (page 195 for this quote), there is a paragraph about unarmed strikes that says     Instead of using a weapon to make a melee weapon attack, you can use an unarmed strike [...] On a hit, an unarmed strike deals bludgeoning damage equal to 1  + your strength modifier.   Later on the same page, the PHB goes over the rules for two-weapon fighting (emphasis mine):     When you take the Attack action and attack with a light melee weapon that you're holding in one hand, you can use a bonus action to attack with a different light melee weapon that you're holding in the other hand.  You don't add your ability modifier to the damage of the bonus attack, unless that modifier is negative.   Certain classes, such as fighters and rangers, get access to the fighting style Two-Weapon Fighting to get around this:     When you engage in two-weapon fighting, you can add your ability modifier to the damage of the second attack. (PHB page 91)   However, monks do not get this fighting style. So assuming that a monk would not have a negative modifier to their unarmed strikes, do monks not add their ability modifier to unarmed strikes used during their bonus action?  Does an unarmed strike count as an attack with a light melee weapon?


Add number, then tuple to list as a tuple, but it drops outer tuple

I am trying to add a tuple of a (number, (tuple)), but it drops the outer tuple.  How do I change the code so that l1 comes out looking like L2? It appears to drop the outer tuple and convert it to list elements?  How do I stop that?  Better yet, why is it happening?     l1 = [] t1 = (1.0 , (2.0,3.0)) l1.extend((t1)) t2 = (4.0 , (5.0,6.0)) l1.extend(t2) print(l1)  l2 = [(1.0, (2.0,3.0)),       (4.0, (5.0,6.0))] print(l2)   l1 comes out as [1.0, (2.0, 3.0), 4.0, (5.0, 6.0)]  l2 comes out as  [(1.0, (2.0, 3.0)), (4.0, (5.0, 6.0))]


Author and department column wise other details row wise

I want following output while using IEEEtran class.                                          Title         Author 1                        Author 2              Author 3         Department 1                    Department 2          Department 3                                 Institution/university                                 mail1,mail2,mail3,mail4


How do I solve $\lim\limits_{x\to\infty} \ \frac{\ln \ x}{x} = 0$?

$$\lim\limits_{x\to\infty} \ \frac{\ln \ x}{x}  = 0$$  How can I know this without looking at the graph? What's the easiest way to equate that expression to 0?  I understand that an integer over x approaches 0 as x approaches 0, but since ln x is an increasing function as x approaches infinity, how do we know which effect outweighs the other?


What is the significance of Saruman's Ring?

At the council of Elrond, Gandalf tells of his encounter with Saruman.     But I rode to the foot of Orthanc, and came to the stair of Saruman; and there he met me and led me up to his high chamber.  He wore a ring on his finger.   Gandalf seems draw particular attention to Saruman's ring.  Yet, to my knowledge, nothing more is ever said of his ring.  We know that Saruman had a great deal of knowledge regarding the rings of power.  Is there anything in Middle-earth lore that indicates if there was anything extraordinary about this ring?  Was Saruman emulating Sauron?  Or could the ring have been given to him by Sauron?


Maximum Likelyhood Estimator (MLE) vs. Bias

If we use the MLE methhod to find the estimator of the variance we get:  $\hat\sigma ^2 = \frac{\sum(x_i - \mu)^2}{n}$  Where we can plug the MLE estimator for $\mu$ and get:   $\hat\sigma ^2 = \frac{\sum(x_i - \bar x)^2}{n}$  But we know that this estimator is biased, and in order to correct for the bias, we need to use $n-1$ instead of $n$:  $S ^2 = \frac{\sum(x_i - \bar x)^2}{n - 1}$  My question is why do we care more for bias than for the likelyhood? Subquestion - how much is the unbiased estimator less likely to appear given an (arbitrary) sample ?  Update:  I don't see how this is a duplicate. I understand that this estimator is biased. I completely agree with the answer given in the linked "duplicate". I'm asking something completely different. I'm asking why do we care more about correcting the bias, than we care about maximizing the likelihood.   In the normal example, the MLE estimators are what maximizes the likelihood function of our sample. So say we got $(\hat\mu, \hat\sigma^2) = (100, 25) $ for n of 100. Then correcting the bias will give us $(100, 25*\frac{100}{99} = 25.25)$ which will not maximize the likelihood. i.e. it is not the maximum anymore.   So why do we care about fixing the bias more than maximizing the likelihood? I guess the answer is that the likelihood is less important than the bias, though I wonder - why?


Previous related .  After I negated the definition of a convergent sequence, I ended up with the following mathematical statement:   $$\exists\ \epsilon > 0,\ \forall\ N \in \mathbb R\ \exists\ \mathbb N \ni n > N : |x_n - l| \ge \epsilon$$  Is this correct? I'd like clarification...  Anyway, I'm now asked to use my negation of the definition of convergence to prove that $(a_n)=((-1)^nn)$ is divergent...  Am I right in assuming it's enough to prove that there exists at least one $\varepsilon$ such that $|(-1)^nn -\mathscr l|\ge\varepsilon$? Can I set $\mathscr l$ to be any real number I please?


Is a downvote legitimate if the voter's lack of knowledge is what makes the question unclear?

If a question is unclear to a person on this site, but is actually a well formed, concise question to someone with the correct background knowledge - would the person who doesn't understand still be in the right to downvote the question based on SE's policies/rules for voting on questions?  I am getting too much extended discussion in the comments (on me) - but where this is leading me is whether or not the goal of SE is to have purely objective moderation or if the real trust lies in the reputation system which allows any and all votes under the assumption that more 'good voters' than 'bad voters'* will be participating and an objectively good moderation will be reached through that process despite the inevitable 'bad voters'*.  *Good voters and bad voters are not up/down votes, but voting cognizantly and carefully to improve the site (good) versus carelessly and ignorantly for whatever reason possesses such people (bad).


Find the following limit: $$\lim_{x\to 0}\frac{(1+x)^{1/x}-e}{x} \tag{1}$$  The following is my approach, although is full of incorrect assumptions (statements etc).  $$f(x)= \lim_{h\to 0}(1+x+h)^{1/(x+h)}\\$$  From here we can say $f(0) = e$.  $$\ln(f(x)) = \lim_{h\to 0}\frac{1}{x+h}\ln(1+x+h)$$  Near $x=0$, we can use the series of logarithm: $$\ln(f(x)) = \lim_{h\to 0}\frac{1}{x+h}\left(x+h-\frac{(x+h)^2}{2}...\right)$$  Differentiating we get:  $$\frac{f'(x)}{f(x)} = \lim_{h\to 0}-\frac{1}{2} +\frac{x+h}{3}  ... \tag{2}$$  Now we note that $(1)$ is actually $f'(0)$ (?) and so from $(2)$ we get:  $$f'(0) =\frac{-1}{2} f(0) = \frac{-e}{2}$$  While the answer is seemingly correct, the method is absolutely not. It looks like this is fluke than anything else.  I also tried computing taylor series of $(1+x)^{1/x}$ near $x=0$ but couldn't do it.


Let $T \in L(V,V)$. If $ST=TS$ $\forall S \in L(V,V)$. Show that $T= \lambda I$, for some $\lambda \in F$, where $I$ is the identity map.  Clearly $<T>$ is in the centre of $L(V,V)$ but how to prove my desired result without using any characteristic polynomial (Although I can't see anything using characteristic polynomial also). I am getting any clue also.