Note: This post is discussing a specific example, which is different to the posts that just give some general rules which might not applicable here, such as some posts that just talk about event but don't even mention a word about building.  Is the Statue of Liberty a historic building, a historical building or both? I've gone through , which gives a general answer, that is, a historical building. I also went through , which is informative though doesn't answer the question directly.  Historic means ‘important or likely to be important in history’ ... Historical means ‘related to the study of things from the past’    The monument was expanded to also include Ellis Island in 1965. The following year, the Statue of Liberty and Ellis Island were jointly added to the National Register of Historic Places  Which seems to indicate that the Statue of Liberty is a historic building. Which one should I go with?

In the description of a guided tour across a city, what adjective should one pick:     During your tour, you will see historic buildings   or     During your tour, you will see historical buildings   Judging by , one should opt for historic if the building is important in history, and for historical if the building is merely part of the city's history:     The adjective historic means having importance in history or having influence on history.  The adjective historical means having taken place in history, from the past or pertaining to history.   Judging by Google, both adjectives are used, although historic seems to predominate.  Which of them is more appropriate in my case?


In the following sentence, how do I set apart the suggested statement?  Tell your students, "You are close, but that only works if the equation uses addition. Since the equation uses multiplication, what do you think the answer is?"  I usually use a comma and quotation marks, but I'm not sure that's correct.

From :      Mr. Trump’s critics reach for words like treason and traitor because they, like others, are searching for an explanation for actions that are so different from those of his predecessors. Other presidents, including Mr. Obama and Mr. Bush, sought to build good relations with Mr. Putin’s Russia, but none seemed so willing for so long to overlook hostile Russian actions or side with Moscow over the agencies of their own government.   Shouldn't "treason" and "traitor" be in quotation marks (or otherwise set off)? In the quoted sentence, those words don't have their normal meanings. For example, "traitor" doesn't mean "a person who betrays their country", it means "the word spelled t-r-a-i-t-o-r". Or is this just a NYT style thing?   And I'm also curious: is there a relevant term for this usage? I'm thinking of an expression that could be defined as: "a word treated as a word rather than as a referrer to something else"?  PS: I know I've assumed an answer to my first question by the way I've punctuated it it, but couldn't think of any other way to make my meaning clear. I guess I'm asking whether punctuation is required, rather than optional as the NYT seems to assume.


Prove or Disprove: There are infinitely many integers $n$ such that the three integers $n$, $n+2$,$n+4$ are all prime. (Suggestion: Try some sample values of $n$ and look for a pattern.)

Intuitively it's true, but I just can't think of how to say it "properly".  Take for example, my answer to the following question:     Let $p$ denote an odd prime. It is conjectured that there are infinitely many twin primes $p$, $p+2$. Prove that the only prime triple $p$, $p+2$, $p+4$ is the triple $3,\ 5,\ 7$.   And my solution:     Given an odd integer $n$, between the three integers $n$, $n+2$ and $n+4$, one of them must be divisible by $3$... Three possible cases are $n=3k$, $n+2=3k$, and $n+4=3k$. The only such possible $k$ that makes $n$ prime is $k=1$. In this case, given an odd prime $p$, either $p=3$, $p+2=3$, or $p+4=3$. This would imply that $p=3$, $p=1$, or $p=-1$. The only of these three that is prime is $p=3$, therefore the only three evenly distributed primes are $3$, $5$, and $7$.   Is there a "better" way that I can assert that one of the integers is divisible by 3? This feels too weak.


I was wondering how shaving is carried out in the world of HP.  I remember someone getting a razor (from Bill and Fleur?) but can't remember the book. However, a razor is a very broad term. As the magical world seems to shun the muggle world; candles and lanterns rather than electric lights and torches for example, do the wizards use a straight edge blade, or a DE safety razor?  I do recall something about using just a wand to cut someone's hair (by Mrs Weasly?), is there any record/note/head-canon of shaving carried out via a cartridge razor, or anything of the like?  I would have thought it would be included in some format at the school, after all they're all of the age where they'll have to start shaving (or getting a beard).  This is not about how Harry got his hair cut, or about hair cutting. It is about shaving and the tools that are used for that task. For hair cutting, it is suggested that a wand is an accurate enough tool, but shaving (which is a more precise task) may want a better, more refined tool.

In the first book, it's mentioned several times that Harry's hair grows quickly. I don't remember he exact quote, but I remember something like 'he must have gotten more haircuts than all the other boys in his class combined,' and Uncle Vernon mentioning that he needs a haircut every couple weeks.  Where does he get it cut at Hogwarts? For that matter, where do any of the student at Hogwarts get their haircuts?  Here's the quote from The Deathly Hallows that shows that Harry's hair grows long when it's not cut:     His face was huge, shiny, and pink, every feature distorted by Hermione's jinx. His black hair reached his shoulders and there was a dark shadow around his jaw.-Harry Potter and The Deathly Hallows, chapter 23: Malfoy Manor


I'm trying to come up with a word that describes when one person or group is actively trying to prevent the progress of another person or group but more specifically when the actions they are  preventing would be beneficial to both parties. Thanks.

I need to find a word (noun) for a person who acts as a "work-stopper" and creates hurdles for others so that the work cannot be completed. For example, some government officials force people to follow long bureaucratic procedures to create delays or put-off the worker (use of delay-tactics).  Example sentence: David is a ...


When the number of iterations is the same, I wonder if the smaller iterations of the outer 'for loop' are faster.   This is my java code.  total loops iterations is 100 billion.  public class Test {      public static long run1() {         final long start = System.nanoTime();         long cnt = 0;         for(int i = 0; i<1000000000; i++) {             for(int j = 0 ; j<100 ; j++) {                 cnt++;             }         }         final long end = System.nanoTime();          System.out.println("run1 : "+(end-start)*1e-9+" sec");         return start - end;     }        public static long run2() {         final long start = System.nanoTime();         long cnt = 0;         for(int i = 0; i<100; i++) {             for(int j = 0 ; j<1000000000 ; j++) {                 cnt++;             }         }         final long end = System.nanoTime();          System.out.println("run2 : "+(end-start)*1e-9+" sec");         return start - end;     }       public static void main(String[] args) {          for(int i = 0 ; i < 10 ; i++) {             long test1 = run1();             long test2 = run2();             System.out.println("Time diff : "+(test1-test2)*1e-9+" sec\n");         }     } }      and this is result   run1 : 4.5772473950000006 sec run2 : 1.7155700900000002 sec Time diff : -2.861677305 sec  run1 : 4.4107229420000005 sec run2 : 1.6532413140000002 sec Time diff : -2.7574816280000003 sec  run1 : 3.815836296 sec run2 : 1.761153921 sec Time diff : -2.054682375 sec  run1 : 3.913543021 sec run2 : 1.752971717 sec Time diff : -2.1605713040000003 sec  run1 : 3.851766485 sec run2 : 1.7262416440000001 sec Time diff : -2.1255248410000003 sec  run1 : 3.95305219 sec run2 : 1.7323067330000002 sec Time diff : -2.220745457 sec  run1 : 3.924869236 sec run2 : 1.6953032440000002 sec Time diff : -2.229565992 sec  run1 : 3.839871705 sec run2 : 1.692300162 sec Time diff : -2.147571543 sec  run1 : 3.93864626 sec run2 : 1.704322469 sec Time diff : -2.234323791 sec  run1 : 3.863758493 sec run2 : 1.700392962 sec Time diff : -2.163365531 sec   like this,   I wonder why these results are coming.  and, edited by Triple nested loops, Similar results are obtained.

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


Suppose there are 200 files in /tmp  e.g.:  {abc1xyz,abc2xyz,abc3xyz..abc200xyz}  I want to write "hello" in the files from abc38xyz to abc53xyz

How to redirect standard output to multiple log files? The following does not work:  some_command 1> output_log_1 output_log_2 2>&1


What is the formal definition of fraction?  Everyone says something different.  Thank you for your answers.

Is $\frac{1}{\sqrt{2}}$ a fraction or not?   I just came across a Grade 8 student's class work where the teacher has given the above as an example to differentiate fractions from rational numbers. I think this is wrong fundamentally, as $\sqrt2$ is irrational while all fractions would be rational. Please advise. Thanks!


This may be a bit of beginner type of question; however, hypothetically, if there is method that takes a pointer of class type A, how would you free to allocation from a call such as this...  void method123(A *ptr) {<stores the A pointer in a data structure>} method123(new A());   Is there a way to free the allocation made by that 'new' without deleting the pointer itself that was stored into the data structure?

What is a smart pointer and when should I use one?


The question is as follow:     $G$ is a group. $N$ is the smallest subgroup of G the contains {$ g^2 | g \in G$}. Prove that $N \triangleleft G$ and $G/N$ is abelian.   So my plan is to use the theorem that states that:     $G'\leq N \iff N\triangleleft G , G/N  $ is abelian   so I have problems to show now that $G'\leq N$ any help is appreciated!.

While reading Cours d'algèbre by D. Perrin, I found the following claim:     Proposition. If $G$ is a group, then $D(G)\subseteq G^2$, where $G^2$ is the subgroup generated by the squares of $G$.   I understand that it suffices to prove that for all $x,y\in G$, $[x,y]:=xyx^{-1}y^{-1}$ is a product of squares.  Equivalently, since $G^2$ is characteristic, hence normal, it suffices to establish that $G/G^2$ is abelian.  For now, none of my attempts have been fruitful. Any enlightenment will be greatly appreciated!


In general the size given for the answers it is just right, but some times there are answers with lots of code that is rather hard to see.  I was wondering if maybe i am missing some functionality to deal with that, I have seen in some sites sometimes you can popup the code in a separate window or see it in full screen.  I am using IE 8 (not my choice) and sometimes some of the javascript doesn't work well. That is why I ask here. Sorry if is a foolish question.  Thanks!  PS: I am not sure what is the appropiate tag for this question either.

When a code snippet is long enough to prompt scrolling (especially horizontal scrolling), it would be helpful to offer a link to view the code snippet in a new window.  I'm thinking that the link should be positioned below the snippet, since most people will decide to use it after scanning the part of the snippet that is visible without scrolling.


Then wouldn't be logical that all the energy in the big-bang-created-universe will equal to the energy that was released by the Big Bang?  The sum is zero?  Edit The cited dup is asking "Did the law of conservation of energy apply to the earliest moments of the Big Bang? If so, what theoretical physics supports this?"  I want to know whether the source of all energy is the big bang or not.  thanks!

Did the law of conservation of energy apply to the earliest moments of the Big Bang? If so, what theoretical physics supports this?   I hear that Einstein's theory of relativity disputes the law of conservation of energy- so does that mean the law is false, or only some aspect of it?


what is the life span of a permanent magnet? if it is reduces, how is it reduced ? how much time to cause when the continuous pressure is applied to the permanent  magnets ?which type of permanent magnets have high life span when compared to other permanent magnets ?

I have a bunch of magnets (one of those game-board thingies) given to me when I was a school-going lad over 20 years ago, and the magnets feel just as strong as it was the day it was given.   As a corollary to this question , is there a way to determine how long a permanent magnet will remain a magnet?   Addendum: Would two magnets remain a magnet for a shorter duration if they were glued in close proximity with like poles facing each other?


I've just upgraded from Ubuntu 16.04 LTS to Ubuntu 17.10. I was a fan of Unity desktop environment but after upgrading, I saw that GNOME is also a nice one ('cause it is also very similar to Unity). But there is one thing that makes me uneasy is that Application Launcher is in the bottom. Can't I move it to top-left corner (as it was in Unity)?

Ubuntu 17.10 introduces the GNOME Shell with the  (based on  GNOME Shell extension) and it allows you to put the Dock on the bottom of the desktop:    However, there is no easy way to move the Show Applications icon (shown on the right) to the left of the Dock. There is no such setting in GNOME Control Center. There is already a  filed, but does anybody know any workaround until it gets fixed by Ubuntu Dock developers?


I have tried many ways to align the table and figure on the same row but nothing worked for me. Here is my current code: \documentclass[a4paper, 12pt]{article} \usepackage[a4paper, margin=2cm]{geometry} \usepackage{booktabs} \usepackage{pgfplots}  \begin{document}  \begin{table}[ht] \renewcommand\arraystretch{1.5} \caption{values of theoretical and measured capacitor voltages for different frequency values.} \center \begin{tabular}{p{0.10\textwidth} p{0.10\textwidth}} \toprule Resistance R ($\Omega$) & Capacitor Voltage $V_{c}$ (V)  \\  \midrule 1000 & 10.0 \\ 2000 & 9.92 \\ 3000 & 9.28 \\ 4000 & 8.40 \\ 5000 & 7.52 \\ 10000 & 4.56 \\ 20000 & 2.48 \\ \bottomrule \end{tabular} \end{table}  \begin{figure}[h!] \centering \begin{tikzpicture} \begin{minipage}[b]{0.45\linewidth}\centering  \end{minipage} \begin{axis}[     xlabel={R (Hz)},     ylabel= $V_c (V)$,     legend pos=south east,     legend entries={R,V},     ]   \addplot table [x=R,y=V] {Resistance_vs_Voltage.txt}; \end{axis} \end{tikzpicture} \end{figure}  \end{document}  The output looks like this:  The output that I want is:  I am also sorry if my code is hard to read as it's my first time using LaTeX.

A continuation of .  I'm fighting a page-limit in a single-column layout and I need to put a Figure and a Table side-by-side and provide them with independent captions. However, the style guide for the publishers (LNCS) wants Figure captions below and Table captions above (probably something to do with ).   =======================================================  If I adapt @lockstep's floatrow example from  accordingly to have a Table caption above ...  \documentclass{article}  \usepackage{floatrow} % Table float box with bottom caption, box width adjusted to content  %% ********************************** %% just adding \captop to original example %% ********************************** \newfloatcommand{capbtabbox}{table}[\captop][\FBwidth]  \usepackage{blindtext}   \begin{document}  \blindtext  \begin{figure} \begin{floatrow} \ffigbox{%   \rule{3cm}{3cm}% }{%   \caption{A figure}% } \capbtabbox{%   \begin{tabular}{cc} \hline   Author & Title \\ \hline   Knuth & The \TeX book \\   Lamport & \LaTeX \\ \hline   Knuth & The \TeX book \\   Lamport & \LaTeX \\ \hline   Knuth & The \TeX book \\   Lamport & \LaTeX \\ \hline   \end{tabular} }{%   \caption{A table}% } \end{floatrow} \end{figure}  \end{document}   =======================================================  The problem becomes clear ...    =======================================================  The floatrow doesn't correctly line up the Table and Caption. I reluctantly tried to use vspace to solve the problem, but it didn't work out.  Any suggestions on how to get these two to align? I'm happy to accept any alignment that ensures that the Table and Figure fit within the same "box".  (A similar-ish question was , but specific for subfig and with a very localised problem it seems.)


Consider the formula for the area of a circle and the formula for its circumference. If one differentiates the formula of the area with respect to $r$ (the radius), the formula for the circle's circumference pops out.   The same applies to a sphere with it's volume and surface area: differentiate the formula for volume with respect to $r$, and you obtain the formula for surface area.  I have two questions about this phenomenon:   Is this an unique property of the circle and sphere? Is there mathematical reason for this?

When differentiated with respect to $r$, the derivative of $\pi r^2$ is $2 \pi r$, which is the circumference of a circle.  Similarly, when the formula for a sphere's volume $\frac{4}{3} \pi r^3$ is differentiated with respect to $r$, we get $4 \pi r^2$.  Is this just a coincidence, or is there some deep explanation for why we should expect this?


I have brought a TP-Link adapter TP-WN823N which works fine on Windows & Mac but they didn't provide drivers for Linux. I found drivers for Linux but it is compatible only with Linux kernel 2.6.18 ~ 3.10.10.   The problem is I am using latest version of Ubuntu (with kernel 4.4*) so to compile that driver I need a kernel version between 2.6.18 and 3.10.10.   I don't have internet access because of the driver issue, so is there any solution to this offline? I can boot my Windows (this is a dual boot system) to download files needed. How can I configure the adapter without downgrading the kernel if possible? Or how can I downgrade the kernel to compile the driver?

I have purchased a TP-LINK TL-WN823N (EU) V2.0 device, which is a USB device that should work as a Network Interface Card, allowing me to connect my computer to wireless networks. Unfortunately, I am unable to find any wireless networks using this device using either wicd or network-manager (no networks appear in the list of networks supplied by either application).  A CD came with the device claiming "Linux support". The CD contained a URL to a corrupted archive file for downloading installation resources. I try to mask my immense frustration.  Here is the additional dmesg output I receive when I connect the device to my computer (similar content is present when I boot the computer with the device connected):  [17096.009912] usb 2-1.2: new high-speed USB device number 4 using ehci-pci [17096.103501] usb 2-1.2: New USB device found, idVendor=2357, idProduct=0109 [17096.103513] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [17096.103527] usb 2-1.2: Product: 802.11n NIC [17096.103529] usb 2-1.2: Manufacturer: Realtek [17096.103530] usb 2-1.2: SerialNumber: 00e04c000001   This is my lsusb, where the offending device corresponds to Bus 002 Device 004:  Bus 002 Device 003: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor Bus 002 Device 004: ID 2357:0109   Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 004: ID 0c45:6433 Microdia  Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   As lsusb -v:   It seems the device is working to me, but no new interface is found in 'ifconfig':  docker0   Link encap:Ethernet  HWaddr 02:42:6e:bf:92:16             inet addr:172.17.0.1  Bcast:0.0.0.0  Mask:255.255.0.0           UP BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:0 errors:0 dropped:0 overruns:0 frame:0           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)  enp0s31f6 Link encap:Ethernet  HWaddr 30:5a:3a:e1:96:b1             UP BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:0 errors:0 dropped:0 overruns:0 frame:0           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)           Interrupt:16 Memory:df200000-df220000   lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:412 errors:0 dropped:0 overruns:0 frame:0           TX packets:412 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1           RX bytes:31876 (31.8 KB)  TX bytes:31876 (31.8 KB)   Running 'lshw -class network' as root contains only information about the 'enp0s31f6' interface.  Additionally for sanity, my 'uname -a':  Linux home-z170a-ubuntu 4.4.0-22-generic #39=Ubuntu SMP Thu May 5 16:53:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux   I am using Ubuntu 16.04.  My questions are:   Why are no networks present in the list for wicd or network-manager? Why is there no additional network interface created when I plug in the USB device? Is it possible to create this network interface?   Thanks for reading.


I can not speak English well. But I will try my best. A NullPointerException occurred while writing the code. I want to create a dialog when the imageButton is pressed, and a Toast when the button in the dialog is pressed. But my code throws NullPointerException. I don't know why a NullpointerException occurs even though dialogFragment is passed as a parameter. Below is the code I wrote. Any help would be appreciated. MainActivity.java public class MainActivity extends AppCompatActivity {  ImageButton Button_MainActivity_Borrow; FragmentManager fm; CustomAlertWindowPenalty   cawp;   @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);      Button_MainActivity_Borrow = findViewById(R.id.Button_MainActivity_Borrow);     fm = getSupportFragmentManager();     cawp = new CustomAlertWindowPenalty(borrowListener);     BorrowORreturnListener listener = new BorrowORreturnListener(cawp);      Button_MainActivity_Borrow.setOnClickListener(listener);   }  View.OnClickListener borrowListener = new View.OnClickListener() {     @Override     public void onClick(View view) {         Toast.makeText(MainActivity.this, "Toast", Toast.LENGTH_SHORT).show();     } };  public class CustomAlertWindowPenalty extends DialogFragment {     private View.OnClickListener buttonClickListener;      @Override     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);     }      public CustomAlertWindowPenalty(View.OnClickListener clickListener) {         buttonClickListener = clickListener;     }      @NonNull     @Override     public Dialog onCreateDialog(Bundle savedInstanceState) {         Dialog dialog = new Dialog(getActivity());         LayoutInflater inflater = getActivity().getLayoutInflater();         View view = inflater.inflate(R.layout.custom_alert_window_penalty, null);          Button button_cawp_Yes = view.findViewById(R.id.button_cawp_Yes);         button_cawp_Yes.setOnClickListener(buttonClickListener);          dialog.setContentView(view);         dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));         dialog.setCanceledOnTouchOutside(false);          return dialog;     }      @Override     public void onResume() {         super.onResume();          getDialog().getWindow().setLayout(ActionBar.LayoutParams.WRAP_CONTENT, ActionBar.LayoutParams.WRAP_CONTENT);     } }  private class BorrowORreturnListener implements View.OnClickListener{      CustomAlertWindowPenalty cawp;      public BorrowORreturnListener(CustomAlertWindowPenalty cawp) {         this.cawp = cawp;     }      @Override     public void onClick(View view) {         cawp.show(fm,"");*this is error*     } }  } This is Logcat error java.lang.NullPointerException: Attempt to invoke virtual method 'void com.example.myapplication2.MainActivity$CustomAlertWindowPenalty.show(androidx.fragment.app.FragmentManager, java.lang.String)' on a null object reference     at com.example.myapplication2.MainActivity$BorrowORreturnListener.onClick(MainActivity.java:101)     at android.view.View.performClick(View.java:6274)     at android.view.View$PerformClick.run(View.java:24859)     at android.os.Handler.handleCallback(Handler.java:789)     at android.os.Handler.dispatchMessage(Handler.java:98)     at android.os.Looper.loop(Looper.java:164)     at android.app.ActivityThread.main(ActivityThread.java:6710)     at java.lang.reflect.Method.invoke(Native Method)     at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)

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


Variables: lprice = log(price of house) ldist = log(distance from incinerator) lintst = log(distance from interstate)   1st regression    2nd regression:    In the 2nd regression I included lintstsq, which is the squared lintst from the 1st regression, and suddenly ldist and lintst become significant and their coefficients change. This doesnt make sense, how come the statistical package couldnt pick up that lintst was significant until I included its squared form, lintstsq? Can someone provide insight into this?  My lecturer's comment on this was:     This makes sense. Being close to the interstate is useful, especially   for commuters who use the interstate to get to work. But being too   close is not good owing to the noise and pollution. If distance from   the incinerator site and distance to the interstate are correlated, we   need to get the model specification with respect to the latter right   in order to identify the effect of the former.   which doesnt help explain much(or does it?)

I have what is probably a simple question, but it is baffling me right now, so I am hoping you can help me out.  I have a least squares regression model, with one independent variable and one dependent variable. The relationship is not significant. Now I add a second independent variable. Now the relationship between the first independent variable and the dependent variable becomes significant.  How does this work? This is probably demonstrating some issue with my understanding, but to me, but I do not see how adding this second independent variable can make the first significant.


In my series of questions on modular arithmetic, I stumbled upon cases where normal textbooks don't explain much. Now my problem is to find $c$ when the expression to be solved (right-hand side) includes multiplication and resolves to floating point numbers: $c ≡ a^{5} ∗ b^{−3} \mod 43$ given that $0 \leq c < 43$ and, $a ≡ 27 \mod 43$ and $b ≡ 19 \mod 43$. ($a$ and $b$ are integers). By solving the right-hand side, by replacing the values for of a and b: $c ≡ 27^{5} ∗ 19^{−3} \mod 43 = 1423.768 mod 43$ If I compute this on a calculator, gives: $4.7680$ $c$ must be an integer, should this be approximated to $5$? How should I approach such cases when right-hand side resolves to float numbers and thus the resulting value of the variable of interest? All inputs are valuable. As mentioned, it's new to me and I am trying hard to understand it. Thank you.

What is the meaning of $$ \\\frac{m}{n}\equiv k\pmod l $$ and $$ \\\frac{m}{n} \mod l $$ $m, n, k, l \in\mathbb N$ and $\gcd(m, n)=1$.


Prove that if $f,g$ are coprime polynomials then there exist $a,b$ polynomials such that $af+bg=1$  I think it has something to do with Euclid's algorithm, would like to see a proof.

Let $F$ be a field and $F[x]$ a polynomial ring. Let $p(x)$ be an irreducible polynomial.  Show that $\gcd(p(x),q(x)) = 1\Longrightarrow \exists r(x),s(x)$ such that $r(x)p(x)+s(x)q(x) = 1$.  I know the proof for Bezout's identity for , but this proof uses the notion of absolute value, which cannot be applied to a polynomial ring.   I am thinking about a way to prove the statement: Use the Euclidean algorithm to compute $\gcd(p(x),q(x))$ and show that the result is $1$, and somehow go backwards to obtain $r(x)p(x)+s(x)q(x) = 1$, but it is a bit messy, and I'm not yet able to see it completely.  Please offer some help. If you have some other methods, that would be great, too.


is this correct?  Which are the different methods by which you can search...  or  What are the different methods by which you can search...

Most of the time one or the other feels better, but every so often, "which" vs. "what" trips me up.   So, what's the exact difference and when should you use one or the other?


Quite simply; how often do the Team Rocket Balloons spawn, and what, if any, is the limit to how many can spawn per day?

A Team Rocket hot air balloon is sometimes hovering over my, triggering a Team Rocket grunt battle. I also had a Sierra encounter. When do these balloons spawn, and what encounters can I expect?


Let $I:= [0,1]$.   Does there exist a partition $\{I_1,I_2\}$ of $I$ such that for all Borel subsets $A$ of $[0,1]$ we have:  $$ \mu (I_1 \cap A) = \frac{1}{2} \mu(A) = \mu (I_2 \cap A)$$  where $\mu$ is the Lebesgue measure?  Many thanks for your help.

Ran across this problem and need some help.   Let $E$ be a measurable subset of the real numbers and suppose that for any open interval $I$ one has $m(E\cap I)\le \frac{1}{2}m(I)$, where $m$ is the Lebesgue measure. Prove that $m(E)=0$.


Does anybody know why my camera is not showing anything and the Rendering is grey blank?  Rendering:  Camera View:

A scene I made is not rendering, at all. This grey screen stays the same and nothing changes.  Here are my settings:  [


Is there a way I can get information about my current WiFi connection on my android? Information like the name of the WiFi network, connection start time, connection duration etc.?  I looked inside the proc/net directory, but there too many other sub-directories and files, and I don't know where to start.

is there a way I can find information about my wifi connections? Which networks I was connected to and when? I had tried to look for this information under proc/net but found nothing. (To be more specific I want to find this information on my android device.)


I'm on a Mac, but this seems like a UNIX/Linux question. I just installed Postgres.app, and the  says to add the /bin directory that ships with Postgres.app to your PATH by adding the following line to .bashrc, it'll get set for every terminal session:  PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"   Should I be exporting that, or just keep it as is?

I'm wondering where a new path has to be added to the PATH environment variable. I know this can be accomplished by editing .bashrc (for example), but it's not clear how to do this.  This way:  export PATH=~/opt/bin:$PATH   or this?    export PATH=$PATH:~/opt/bin


Is it true that: $A\triangle (B\triangle C) =(A\triangle B) \triangle C$?  The $\triangle$ stands for symmetric difference.

By $A\oplus B$ we denote the symmectric difference of two sets. The definition is $A\oplus B =(A\setminus B) \cup (B\setminus A)$. Now I hope to show that $A\oplus (B\oplus C) = (A\oplus B)\oplus C$. I remember that there's an elegant proof, but I forget its detail. (The first step is to show $A\oplus (A\oplus B) = B$, and maybe applying this formula, we can obtain associativity.)


We heard this sentence in the movie Northmen.     These weapons are all that are left of men, whom, like you, confronted me.   Which is correct?  I think it should be who and not whom because in the affirmative the sentence becomes     These men confronted me   which should be replaced by who. My friend says the replacing pronoun should be whom because it refers to people.

This is the boy who was asked by the teacher to stay back after school. This is the boy whom the teacher asked to stay back after school. This is the boy the teacher asked to stay back after school.   Are the sentences above correct ?


I am trying to describe how irrational numbers, which are all modeled as a series of fractions, can themselves not be fractions, and are instead part of a unique group of "decimal numbers" outside of fractions, called the irrational numbers. I am confused atm.    From , some example irrational numbers include:   $\sqrt 2$ the golden ratio The sqrt of all natural numbers which are not perfect squares Logarithms   Then they say:     Almost all irrational numbers are transcendental and all real transcendental numbers are irrational. Examples include $e^\pi$.   Rational numbers are fractions, which are included in the set of irrational numbers. Irrational numbers, however, are decimals and include things that "can't be represented as fractions" it seems.  But where I'm confused is, sqrt 2 can be represented by a series of fractions:  $${\displaystyle {\sqrt {2}}=\prod _{k=0}^{\infty }{\frac {(4k+2)^{2}}{(4k+1)(4k+3)}}=\left({\frac {2\cdot 2}{1\cdot 3}}\right)\left({\frac {6\cdot 6}{5\cdot 7}}\right)\left({\frac {10\cdot 10}{9\cdot 11}}\right)\left({\frac {14\cdot 14}{13\cdot 15}}\right)\cdots }$$  Similarly, $\pi$ can be represented by a series of fractions:  $${\displaystyle 1\,-\,{\frac {1}{3}}\,+\,{\frac {1}{5}}\,-\,{\frac {1}{7}}\,+\,{\frac {1}{9}}\,-\,\cdots \,=\,{\frac {\pi }{4}}.}$$  Finally, the natural logarithm can be written as a series of fractions:  $${\displaystyle \ln(1+x)=\sum _{k=1}^{\infty }{\frac {(-1)^{k-1}}{k}}x^{k}=x-{\frac {x^{2}}{2}}+{\frac {x^{3}}{3}}-\cdots }$$  It has been a while since I have added/divided/subtracted/multiplied fractions, but from what I remember doing any of those operations results in a new fraction. So I'm wondering what I'm missing when it comes to understanding irrational numbers. If irrational numbers can represent non-fraction numbers, yet they are themselves represented by a series of fractions, it seems the result of the series would itself be a fraction, and so the irrational numbers are all rational numbers. Looking for an understanding of how to explain the difference between rational and irrational numbers. I tried saying "irrational are decimal numbers you can't represent with a fraction", but then when getting into the definition of a rational numbers (fraction numbers), I was unable to explain how , how they themselves aren't representable as fractions. Thank you for your help.

For example how come $\zeta(2)=\sum_{n=1}^{\infty}n^{-2}=\frac{\pi^2}{6}$. It seems counter intuitive that you can add numbers in $\mathbb{Q}$ and get an irrational number.


Question is to verify that $Z[i]/(3)$ is a field. If it is identify it's elements. I verify it follows. Since Z[i] is PID, and 3 is irreducible , so 3 becomes prime hence (3) is prime ideal ,so it is maximal ideal hence given quotient ring is field. I know number of elements in it by formula which will give 9. But how can identify elements?

Let $q$ be a prime congruent to 3 mod 4, prove the quotient ring $\mathbb{Z}[i]/(q)$ is a field with $q^2$ elements  The field portion I understand. $\mathbb{Z}[i]$ is a PID and because $q$ is congruent to 3 mod 4 it is irreducible thus prime. and hence the ideal $(q)$ is prime and therefore is maximal because $\mathbb{Z}[i]$ is a pid. Thus $\mathbb{Z}[i]/(q)$ is a field  I am not totally clear on the number of elements being $q^2$. I think perhaps the division algorithm would help but I am still not totally clear on how to use it in a case like this.


I have been using the following definite integral of exponential function for ages  without knowing how to show it.     $$ \int_{-\infty}^{\infty}e^{-ax^2}e^{-2bx}dx=\sqrt{\frac{\pi}{a}}e^{\frac{b^2}{a}}. $$   Can anybody give some hints?

How to prove  $$\int_{0}^{\infty} \mathrm{e}^{-x^2}\, dx = \frac{\sqrt \pi}{2}$$


Can someone tell me what software I would use to create personalised prints where the words form a shape like a heart, or a babies pram or a rocket ship?    I've tried looking for myself but I don't know where to start. Thanks

I want to create a T-shirt to commemorate the tenth edition of a gaming convention and I had the idea to have the names of all the games that were played during the convention form a big roman numeral X.  I'm looking for a free program, app or plugin that allows me to insert chunks of text (the names of the games) and automatically sorts them to fit the shape as nicely as possible, without mixing the words in the same chunk (but if they continue on the same or on the following line it's ok).  Multi-directional words forming the shape is ok too but those usually make some words too small for the t-shirt printer.  Do you know a program that can create such a thing?  I can easily work with the image of an X or even a raster image.


According to Cambridge Dictionary,  they should worry! (humorous)  said about or to someone who clearly has no need to worry: She should worry! She hasn't a problem in the world.  How come? Is it ironic? Could you please give another example?

: So how many named special cases of each modal verb are there, in toto? There's   1. subjunctive should, and   2. mandative should, and   3. , at least;   and I s[up]pose 4. Should we? is suggestive should, and   5. Shouldn't we? is tag **should**, and I can think of a lot more.    I ask about only operative uses of this modal verb including literary and formal usage,  but please omit anything obsolete. I'm trying to classify them and learn the formal terms describing each. Are there any apt others in addition to the ones above? (I added the enumeration below)  1. What's 'subjunctive should'?  Whenever should is conjugated in the subjunctive mood? 5. What's a tag **should** ? 6. Where does  should/would  feature? What's it called? This should is detailed in   or  or .


I'm starting a grad school and I'm used to start my emails to all my professors with "Dear Professor Smith", even though they respond with their first name at the end of their emails ("Best, John"). I noticed that the guys I'm starting the studies with are using "Hi John" in their emails. I don't think they know professors better than I do. I don't want to be too familiar, but neither be the only who keeps this distance. Should I switch to "Hi John"?

If a professor in a North American country presents his- or herself by his/her first name in email messages, does this mean that students can refer to him/her by his/her first name? Or is this generally not a good idea, unless the professor has explicitly mentioned that he/she can be referred to by first name? I've noticed that most professors, who prefer to be referred to more formally, do not sign their emails with just their first names, but usually initials or first and last name.


I have no clue about linux, i've used Windows all my life. I recently installed Lubuntu to a really old laptop i had no use of. I need to install a lightweigh IDE for C coding to use for my university needs. I've only worked with Dev C++ and Visual Studio in my main computer that is able to handle these software. But i need to get a working IDE on my laptop that just works for me to code on the way.  Some info about my laptop: Laptop : Acer extensa 5230 CPU : Intel Celeron 2Ghz Single Core 32bit RAM : 1GB ddr2 Storage : 160GB  Thanks for the help in advance.  PS : Any advice for starting on linux would be very helpful.

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. See  for more information.   This is a community wiki for IDEs available on Ubuntu. Please post one IDE per answer (including more than just a screenshot or a link, please at least put a short description).  In your answer, tell us what the IDE is for (which language(s) or if it is RAD capable).


If we switch between Blender Render and Cycles Render, do we "obscure" our project?  Or can we freely switch back and forth?

How does Cycles work and how is it different from Blender Internal?  Which is better?


The main rule is saying that words with digraphs 'gy' 'gi' 'ge' should be pronounced as soft 'g', but there are a few exceptions I've met:  linger, get, begin, bigger, longer, dagger, gear, unplugged

Most words with 'g' read as 'g'   Geek Goose Goods Goal   But sometimes 'g' reads as 'j'   Gymnastics Genesis Genius Genetic   And in the middle of a sentence, compare:   Log Logistics   Or   Frag Fragile


So, I downvoted someone on SO and commented WHY I did it. His answer was not what the question asked. In my opinion this is how the system works, right? So, directly after that I got 3 downvotes on other answers I posted in other questions. I thought, ok what a stupid.. But, now, the day after, I again got 6-8 downvotes..  What to do about this? It's not that I care loosing rep, it's more like it shouldn't be right to downvote good answers. Here's some examples:   (+9 | -1)   (+9 | -1)   (+7 | -1)    This won't be turned around by the system as it's not seen as serial downvoting.. So my question is: What can you actually do to prevent people like this from downvoting others they don't like? Do you need to flag it for a moderator?

Example: Three days ago I was serial downvoted        After these weren't automatically reversed, 24 hours later, I flagged one of the posts. It was eventually marked as helpful, but the downvotes are still there.  It could be that it was 2 users, but it looks like too much of a coincidence.  What should you do in these circumstances?


I've created an Active Directory Domain Controller on a Windows Server 2012 hosted on AWS and gave it a domain name dev.insidetest.com  Now I am trying to undestand how to join my local computer to this domain.   I'm pretty new to Active Directory and just trying to set up a test environment, and trying to understand how to expose my AWS AD to the world (I understand all of the risks of completely exposing something to the world, this is just testing, no production).  I did open all of the TCP ports on my AWS instance, but can't figure out what are other steps involved and even if this is actually possible.   I've had some experience with setting up something similar, but all of the machines were on my local network, so it was a bit of a different story.  Any suggestions/help is greatly appriciated.   Update:   I did see  but I don't think it's a duplicate, I undestand all the security risks but I am just creating a test environment to play around with LDAP. All I need to know is how to actually do it.   I'd expect that I need to specify the ip of where my AD is hosted as well as open specific TCP posts required for this type of connection.

I have a client whose workforce is comprised entirely of remote employees using a mix of Apple and Windows 7 PCs/laptops.   The users don't authenticate against a domain at the moment, but the organization would like to move in that direction for several reasons. These are company-owned machines, and the firm seeks to have some control over account deactivation, group policy and some light data-loss prevention (disable remote media, USB, etc.) They are concerned that requiring VPN authentication in order to access AD would be cumbersome, especially at the intersection of a terminated employee and cached credentials on a remote machine.  Most services in the organization are Google-based (mail, file, chat, etc.) so the only domain services are DNS and the auth for their Cisco ASA VPN.  The customer would like to understand why it is not acceptable to expose their domain controllers to the public. In addition, what is a more acceptable domain structure for a distributed remote workforce?  Edit:   is in use for a handful of Mac clients.


I know that the interaction terms of the Lagrangian of electromagnetism are given by  $$L_{int}=-q\phi (\mathbf{x},t)+q\mathbf{v}(t)\cdot \mathbf{A}(\mathbf{x},t).$$  The above equation is replaced by terms involving a continuous charge density $\rho$ and current density $\mathbf{j}$. The resulting Lagrangian density for the electromagnetic field is: $$\mathcal{L}=-\rho \phi +\mathbf{j}\cdot \mathbf{A}＋\frac{\epsilon _{0}}{2}E^{2}-\frac{1}{2\mu _{0}}B^{2} .$$  The first problem is that I know where the first two terms $-\rho \phi +\mathbf{j}\cdot \mathbf{A}$ come from but I don't know where the last two terms $\frac{\epsilon _{0}}{2}E^{2}-\frac{1}{2\mu _{0}}B^{2}$ come from.  Next varying the Lagrangian density with respect to $\phi$ and $\mathbf{A}$, we get Gauss' law $$0=-\rho +\epsilon _{0}\triangledown \cdot \mathbf{E}$$ and Ampère's law $$0=\mathbf{j}+\epsilon _{0}\frac{\partial \mathbf{E}}{\partial t}-\frac{1}{\mu _{0}}\triangledown \times \mathbf{B},$$ respectively. The second problem is that I don't know how to calculate these variations clearly.

I'm currently working at the start of Alexei Tsvelik's book Quantum Field Theory in Condensed Matter Physics. I'm kinda stumped on a few essential steps.  Starting with the action:  $$S = \int dt \int d^3 x \mathcal{L}_{\mathrm{EM}} = \int dt \int d^3 x \left( -\frac{1}{4} F_{\mu \nu} F^{\mu \nu} + j_\mu A^{\mu}\right).$$  In the absence of any sources $j_\mu = 0$ and $c=1$, which after pulling in the negative sign implies  $$S = \frac{1}{2}\int dt \int d^3 x  \,\,\left(E^2 - B^2\right)$$ The next step is to take $\vec{E} = -\vec{\nabla} \phi + \partial_t \vec{A}$ and $\vec{B} = \vec{\nabla} \times \vec{A}$. Letting $\phi = 0$ and directly inserting these into the above yields:  $$S = \frac{1}{2} \int dt \int d^3 x  \,\left( (\partial_t \vec{A})^2 - (\vec{\nabla} \times \vec{A})^2 \right) $$  Now considering $\vec{A} = \vec{A}_0 + \delta \vec{A}$ as some minimal change in our vector potential, with $\vec{A}_0$ gives a minimum for the action and putting this into the above expression we have: $$\delta S = \int dt \int d^3 x \left(\partial_0 \vec{A}_0 \partial_0 \delta \vec{A} + \left(\vec{\nabla} \times \vec{A}_0\right)\cdot\left(\vec{\nabla} \times \delta \vec{A} \right) \right)+ \mathcal{O}(A^2)\,\,\,\,\,\,\, (1)$$ where I have the term  $$\mathcal{O}(A^2) = \int dt \int d^3 x \left( (\partial_0 \vec{A}_0)^2 + (\partial_0 \delta \vec{A})^2 - (\vec{\nabla}\times\vec{A}_0)^2-(\vec{\nabla}\times \delta\vec{A})^2\right)$$  The next step is where I lose our author and go from "Oh ok I get this" to "completely clueless". He rewrites $\delta S$ as:  $$\delta S =  \int dt \int d^3 (\delta x) \vec{A} \mathcal{F(\vec{A}_0)}+ \mathcal{O}(A^2)$$  where $\mathcal{F} = \frac{\delta S}{\delta A}$. What is the purpose of $x\to \delta x$ in the above expression? Is the functional derivative $\mathcal{F}$ a vector quantity? He has it bolded with a bolded $\vec{A}$ in the above expression. One last question takes the above expression further. We assume $\delta \vec{A}$ vanishes at infinity, as it should, and integration by parts yields:  $$\delta S =  -\int dt \int d^3 x \left( \partial^2_0 \vec{A}_0 - (\vec{\nabla} \times \vec{\nabla})\times \vec{A}_0  \right)\delta \vec{A}\,\,\,\,\,\,\,\, (2)$$ How exactly did we go from (1) to (2)? Thanks I appreciate your time!


I am a Chinese citizen (US permanent resident) planning on going to Hong Kong for 7 days, flying to and from Chicago, and originally had found this stipulation:      Chinese passport holders who are in transit through Hong Kong from   another country, region or territory may be granted a stay of 7 days   without the prior need to obtain an entry permit, with the condition   of possession of valid Chinese passport and confirmed onward air   tickets for the overseas journey. If Chinese passport holders will go   for mainland China or Macau via Hong Kong, onward air tickets are not   compulsory.   Seeing this, I assumed I would need a visa because I am not going to a third country, and hence would not be considered transit. However, after sending in my visa application to a travel agency, they sent it back saying it was returned by the Chinese consulate who claimed I do not need it if staying for 7 days or less. I am a little skeptical because of previous questions here that indicated I would need it for entry, and that I don't have anything in writing for the actual consulate.  Does anyone here have this experience and can confirm or deny that I do NOT need a visa? And what documents do I need to bring? Just my flight back home to the US?

I and my girlfriend (a mainland Chinese citizen) are planning to visit Hong Kong from Malaysia (where we both have MSC working visas), and will also be returning to Malaysia. I have been surprised at all of the restrictions placed on mainland Chinese citizens; it seems that there is a lot of bureaucracy required before a mainland Chinese citizen can enter Hong Kong. I am trying to find out if there is some way that she can enter Hong Kong for 3-4 days with me (a British citizen) without having to go through the hassle of trying to get a visa. After a little while reading, I found :  Chinese passport holders who are in transit through Hong Kong from another country, region or territory may be granted a stay of 7 days without the prior need to obtain an entry permit, with the condition of possession of valid Chinese passport and confirmed onward air tickets for the overseas journey. If Chinese passport holders will go for mainland China or Macau via Hong Kong, onward air tickets are not compulsory.  It seems that this could be used to allow her visaless entry to Hong Kong, as we only plan to go for 3-4 days. So here are my questions based on that 7-day exemption clause:  Does the "onward air tickets" stipulation apply when flying from and returning to Malaysia, or would it only apply if we were flying on to another country entirely? If "onwards air tickets" may not apply in that situation, does flying back to Malaysia via Macao or mainland China permit her to enter without a visa? Does simply entering mainland China without flying (for example, using the Hong Kong–Shenzhen Western Corridor to drive there) also entitle her to this entry?  I have contacted the Chinese embassy in Malaysia about these questions, but they advised me that they do not know the answer to them (which I find a little surprising).


I am using SQL Server 2008 R2 E2 x64. on production machine having 8 core processor, 32 GB RAM.  My database is being used commonly for OLAP & OLTP both.  There are some constraints from Infra, "we can not change disk, RAID configuration and can't move database to another server.  tempdb, T-Logs & .mdf are located on seperate partition.  Then I thought to do, what may be possible at database end.  I retrived some information about indexes using below query.  Now the question is;-   Does proper FILLFACTOR value of Index helps to reduce disk IO? If Yes, then how can we decide FILLFACTOR value based on the data I get using this query or Experts query (will be appreciated)?  Select             a.[Table Name],a.[Index Name],a.[Index Type],a.[Index Columns],a.[Row Count]             ,ips.avg_fragmentation_in_percent,a.[Fill Factor],a.user_seeks,a.user_scans             ,a.user_lookups,a.[Index Read],a.[Index Writes],a.[Last Used (Read)],a.[Last Used (Write)]             ,[Last Index Re-Built/Re-Organize] from (select Top 10  t.name [Table Name]             ,i.name [Index Name]             ,i.type_desc [Index Type]             ,c.name [Index Columns]             ,p.rows [Row Count]             ,i.fill_factor [Fill Factor]             ,ius.user_seeks             ,ius.user_scans             ,ius.user_lookups             ,(ius.user_seeks+ius.user_scans+ius.user_lookups) [Index Read]             ,ius.user_updates [Index Writes]             ,COALESCE(ius.last_user_seek,ius.last_user_scan,ius.last_user_lookup) [Last Used (Read)]             ,ius.last_user_update [Last Used (Write)]             ,STATS_DATE(s.object_id, s.stats_id) [Last Index Re-Built/Re-Organize]             ,i.index_id             ,t.object_id  from        sys.tables t inner join  sys.columns c on          t.object_id=c.object_id inner join  sys.indexes i on          t.object_id=i.object_id inner join  sys.index_columns ic on          t.object_id=ic.object_id and i.index_id=ic.index_id and c.column_id=ic.column_id inner join  sys.dm_db_index_usage_stats ius on          t.object_id=ius.object_id and i.index_id=ius.index_id inner join  sys.stats s on          t.object_id=s.object_id and i.index_id=s.stats_id inner join  sys.partitions p on          p.object_id=i.object_id and p.index_id=i.index_id Order by ius.user_lookups desc  -- Use to see by CPU, Resd, Writes, No. of Records. ) a cross apply             sys.dm_db_index_physical_stats(db_id(),a.object_id,a.index_id,0,DEFAULT) ips

I use SQL Server 2008 R2 and want to set value for fill factor property in each index. I look for recipe to calculate best value for this property (have better performance when insert record) . Also how I can meter query performance by set deference value to this property.  Thanks a lot in advance.


I played once and then the game crashed I didnt win anything and played again for whole time I played how to play again tell me please

I am yet to see the Yeti Zombie in Plants vs Zombies (PC/iPhone) and I've been playing for 50hrs+.   Is there a specific condition that needs to be filled for him to show, a way to trigger his arrival or is it completely random?


When trigger my mail function , that mail goes to 'spam' folder not to 'inbox'. Can u please figure out whats the problem?  function send_user_email($mail, $to_email,$password, $first_name) { $html = "Hi $first_name,

"; $html = $html . "
 You have been registered with the system. Please find your login details below.
"; $html = $html . "User Name - $to_email
"; $html = $html . "Password - $password

"; $html = $html . "Regards,
"; $html = $html . "Team";  $mail->IsSMTP(); // telling the class to use SMTP $mail->Host = "smtpout.XXX.XXX.XXX"; // sets GMAIL as the SMTP server //  $mail->Host= "stmp.gmail.com"; // SMTP server $mail->SMTPAuth = true; // enable SMTP authentication $mail->SMTPSecure = "ssl"; // sets the prefix to the servier $mail->Port = XXX; // set the SMTP port for the GMAIL server $mail->Username  = "mailid"; // GMAIL username $mail->Password  = 'password';// GMAIL password $mail->From = "mailid"; $mail->FromName = "name"; $mail->Subject = "User invitation email";  $mail->AltBody = ""; // optional, comment out and test  $mail->IsHTML(true); $mail->Body = nl2br($html);  $mail->AddAddress($to_email);  $mail->Send(); // send message }

This is a tricky one and I've always relied on techniques, such as permission-based emails (i.e. only sending to people you have permission to send to) and not using blatantly spamish terminology.  Of late, some of the emails I send out programmatically have started being shuffled into people's spam folder automatically and I'm wondering what I can do about it.  This is despite the fact that these particular emails are not ones that humans would mark as spam, specifically, they are emails that contain license keys that people have paid good money for, so I don't think they're going to consider them spam  I figure this is a big topic in which I am essentially an ignorant simpleton.


I have just discovered the ideas of Lagrangian and Hamiltonian formulation of mechanics. I wish to self-study further. I (believe I) grasp the very basic idea that both approaches are based on the energy of the system; Lagrangian the difference between kinetic and potential energy, Hamiltonian the total energy of the system. I understand a Newtonian force-based approached to kinematics and mechanics of single particles or simple regular laminas. I understand simple energy analysis of systems where a force approach would be too complex. I have basic calculus skills - up to college / university entrance e.g. integration of a single variable by parts and solving simple, single variable, first-order differential equations. When I look at the mathematical formulation for a very simple system it seems to me the approach needs to be :  Define the Lagrangian for the system Solve the resulting integral  I am having difficulty with both those steps. I think the greatest barrier is understanding the integral expression with partial derivatives. For example, what on earth does the time derivative of the partial derivative of $L$ with respect to velocity, $\frac{d}{dt}(\frac{\partial L}{\partial \dot{x} })$, mean (mathematically)? So apart from (I guess) partial differentiation, what other mathematical knowledge and skills do I need to make a start on Lagrangian and Hamiltonian mechanics?

So I am an undergraduate in Electrical Engineering. We had a course on Physics in our freshman year which is equivalent to Classical Mechanics I as taught in MIT. I am interested in studying advanced classical mechanics (which includes Lagrangian formulation and other stuff) as equivalent to Classical Mechanics lecture by Susskind. I wanted to know are they any prerequisites which I should know about before taking this course.   In general what are the prereqs for this course?


vMy question is that I issued a b1/b2 visa in 2015 to attend exhibition in USA sponsored by my employer, but I couldn't attend this exhibition due to work load in the company and couldn't go to USA to attend that exhibition.   The primary  objective of this visa was "attending an exhibition", now I wanted to go to USA for tourism purposes on this visa, my questions are:  1-If unused b1/b2 visa not used in first place for the primary purpose(to attend exhibition) it was issued, can be use for tourism purposes?  2- Any issue(s) at POE?   3- By immigration laws is it ok to travel for tourism on this visa  3- which documents to present at POE in case I am going for tourism?  3- In the past I have travel to USA two times first on b1 and then on b2  This b1/b2 visa has no Annotation (Annotation field is blank)  This visa was issued in Pakistan.;  Can I use this b1/b2 visa for tourism purposes?  Is that the myth or rumor that the b1/b2 can be used only for the primary purpose   it was issued? or if b1/b2 not used for primary purpose then can not be use for   further visit?  Hope you will give advice.  Regards,   Noman

Note: This is NOT a duplicate of  Difference: In both other questions, the posters traveled once to the US for the original purpose for which the B1 visa was obtained. Their question is about visiting again using the same visa. However, I've not traveled to the US yet, and I'm planning my visit. What I want to understand whether I can use this visa for a visit whose purpose is not the same as what was submitted along with the application.  Can I use a B1/B2 visa for tourism that was originally obtained for business purposes BEFORE I actually visit the US even once? I had applied for a business visitor visa for a valid business reason but by the time I got it stamped, my plan changed. So I've not visited the US even once. Can I now use this visa to visit as a tourist without having used that visa for its original intended purpose? PS: I live in India.


When handling automatically-raised flags for "possible vandalism edits", the links to the edited posts go to the post itself, instead of the edit. Linking directly to the post isn't useful; in every case I need to click the "edited  minutes ago" link to see what the edit introduced/removed.  Can these links go directly to /<post_id>/revisions/<revision_id> and show me the edit the contributed towards the flag being raised?    While there is a , @bluefeet asked me to leave this intact for future reconsideration.

When we get the following flag:     possible vandalism: edits (auto)   We see a set of links to the posts that have been edited.  This means that to check that edit is valid we have to click the link to the post then click the link to the revisions on that post and then go back twice to get back to the flag to check the other posts.  It would be far more efficient if the links were to the revisions page rather than the post itself. It would make checking these flag much quicker.


I am learning the dpkg's usage. So, I am trying to install the wps-office package as example.  sudo dpkg -i wps-office_10.1.05672~a21.deb   which returns an error: Can not access the archive: No such file or folder What's wrong did I do?

I have download the QQ2012's deb in downlaod files, but when I install the deb, system tell me:  $ sudo dpkg -i wineqq2012-20120719-longene.deb [sudo] password for collins:  dpkg: error processing wineqq2012-20120719-longene.deb (--install):  cannot access archive: No such file or directory Errors were encountered while processing:  wineqq2012-20120719-longene.deb


When I call up a method from the other class, it returns null. I'll just show you my code below  class One{     Two two;     oneMethod(){       String str = "";        two.twoMethod(str);       S.o.p("Str in One class is " + str);       }   }   class Two{    String twoMethod(String str){       str = "From Two class";        S.o.p("Str in Two class is " + str);        return str;     }  }   The output looks like: Str in One class is ___ // meaning null  Str in Two class is From Two class  My understanding about this is, after calling twoMethod(), the str with which is initially null will now be overriden with the new str value "From Two class". Now when we print str in One class, it should be the same with what is printed in the Two class. That's how I understand the flow.   Did I miss any concept / rule about passing Strings? Any feedback is appreciated. Thanks!

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


In the original Back to the Future when Marty is trying to get back to 1985, Doc puts an alarm clock on the dashboard of the DeLorean and tells Marty:     "I've calculated the distance and wind resistance retroactive from the moment the lightning strikes. When this alarm goes off you hit the gas."     Moments before the alarm goes off, the DeLorean's engine stops and Marty struggles to get it to start again. While he struggles with it the alarm clock rings. When the engine eventually starts Marty then starts to drive the car and he is successful to travelling back to 1985. Because he started a few seconds late due to the engine trouble, were the Doc's calculations incorrect by a few seconds?

So, in the first movie, presumably the Doc and Marty know exactly when the lightning will strike the clock tower. This is because Marty has the flyer with the picture of the stopped clock on it. In order to power the DeLorean, the Doc cooks up this contraption to conduct the lightning through a hook into the DeLorean. All Marty has to do is be driving at 88 mph and hit the wire at the exact right moment.  Here's the question though - if you recall, the Doc sets a timer and tells Marty to drive back to a pre-designated starting point. When the timer goes off, Marty is supposed to accelerate to 88 mph. My assumption is that the Doc has calculated the maximum acceleration of the DeLorean, and using this value has determined the exact starting point that the car needs to be at in order to hit the lightning at the right time.  Unfortunately, the car stalls. It takes Marty a while, but he's finally able to start it up. Being that he started late though...shouldn't he have missed the lighting?


Let's say that I have two exponential distributions with a mean of 10.  Now consider the mixture distribution where there is 50-50 chances of getting either one of the two exponential.  What would be the variance of this mixture distribution?

Say I have two normal distributions A and B with means $\mu_A$ and $\mu_B$ and variances $\sigma_A$ and $\sigma_B$. I want to take a weighted mixture of these two distributions using weights $p$ and $q$ where $0\le p \le 1$ and $q = 1-p$. I know that the mean of this mixture would be $\mu_{AB} = (p\times\mu_A) + (q\times\mu_B)$.  What would the variance be?    A concrete example would be if I knew the parameters for the distribution of male and female height. If I had a room of people that was 60% male, I could produce the expected mean height for the whole room, but what about the variance?


The only vivid memory I have of this book is that the citizens of the story's world are all associated with a certain element, such as air or water, etc. This association brings them powers that can control that particular element. The powers, though, can only be enhanced/ used if 'special stones' are implanted in their spine after birth.   The stones themselves are plain, but once implanted in a baby's back, they turn a certain color. The stones are implanted in a special ritual performed by alien-like creatures, who are very powerful.   I have a feeling it was a part of a series, but I am unsure.  I just remembered something else. The stones are very expensive and the parents have to save up in order to afford them. Multiple stones can be implanted in one person and the number of stones implanted in a person indicates the amount of power they have.

I've been trying to find this darn series of books for ages, I read them back in early 2001-02 and can't really remember much of them. I think there were 10-ish books, it was an easy read but a long series. On early publications, the covers, were mainly yellow, with small pictures of whatever happens in that book.  The book began with two siblings, a brother and a sister, running in a forest. She conjures up what can only be remembered as a golem type creature. He then uses a high magic 'blast' and wipes out the golem, knackering himself. His sister laughs at him for being 'powerful' but expending himself too much on one big magic blast. The beginning I remember vividly, the rest, not so much.  The story continues as a conflict happens, I believe two worlds are involved? The brother and sister are split up, but this is where my memory becomes vague.  The mechanics of the world seems that there are gems, or stones, set in the backbone, which in turn give access to magic. When the person uses them, they can draw too much, which ends up exhausting them. The 'big bad evil king' kills their father, and destroys their farm early on in the story.


So I'm making a dungeon based off Legend of Zelda, and I want to make a door that opens when you have a key in your inventory. Say the key is called "Small Key". How can I get it to open when you're 5 blocks away from the door?

I'm building a CTF map of sorts, using command blocks in vanilla 1.8. I've discovered two commands for detecting if an item is in a players inventory:  /clear @a[team=Red] banner 4 0  /testfor @a[team=Red] {Inventory:[{id:"minecraft:banner"}]}  Those work fine, unless you want to perform a command ON the player carrying that item. For example: I want to cause the player who picks up a banner of the opposite team, to automatically equip that banner in their head slot with a command similar to this:  /replaceitem entity @a[???????] slot.armor.head banner 1 4  Can this be done? If not, is there a way to mark a specific player carrying an item using scoreboards?


public class Worker<T> {   public void Work(T expected)   {      // Get a list of all the properties that the incoming object owns      PropertyInfo[] objectProperties = typeof(T).GetProperties();       // Grab the first property      PropertyInfo property = objectProperties [0];       // Get the property's type      string propertyType = property.PropertyType.Name;       // If this item is a list, then lets recreate the list      if(propertyType.StartsWith("List"))      {        Type listType= a[0].GetType();        List<listType> myList = new List<listType>();      }   } }  In the code above, the following line is wrong: List<listType> myList = new List<listType>();  How do I dynamically create a list using reflection? I am getting the error message,  " 'listType' is a variable but is used like a type "

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


So I'm trying to make a standard a1 poster using the a0 document class.  This is my code so far:  \documentclass[poster, a1]{a0poster} %%%Load packages \usepackage{multicol}            \usepackage[left=2cm,right=2cm,bottom=0cm,top=0cm]{geometry} \usepackage{mathpazo}            \usepackage{color}                \definecolor{headingcol}{rgb}{1,1,1}         \definecolor{boxcol}{rgb}{0.408,0.157,0.376} \fboxsep=1cm                             \setlength{\columnsep}{2cm}               \makeatletter                            \renewcommand\@maketitle{% \null                                    {     \color{headingcol}\sffamily\veryHuge        %Set title font and colour     \@title \par}% \vskip 0.6em% {     \color{white}\sffamily\large                %Set author font and colour     \lineskip .5em%     \begin{tabular}[t]{l}%         \@author     \end{tabular}\par}% \vskip 1cm \par } \makeatother  \title{TEXT HERE}  \author{NAME \\ Supervisor: NAME}  \begin{document}  \hspace{-3cm}                               %Align with edge of page, not margin \colorbox{boxcol}{                          %Coloured banner across top     \begin{minipage}{1189mm}                    %Minipage for title contents         \maketitle     \end{minipage}} \vspace{1cm}  \begin{multicols}{4}         \section*{Hello}     jkboub\\kglhvkjb\\liugiub;ub\\lylyvjhb\\ktftuyvuyvyuvluf\\lubaub     \columnbreak     \section*{Hello}     \columnbreak     hello     \columnbreak     hello \end{multicols}  \end{document}   and yet the outcome is this:    Why is there some text in the second column, which should be continuing in the first?

How do I force TeX to completely use the 1st column before writing to the second column?  Right now I dont have enough content to fill one whole page. So the left and right columns are equally filled, leaving 25% symmetrical empty page at bottom. How do I fill the left column first, and then the right?  \documentclass{article}  \usepackage{multicol} \usepackage[scale=0.9]{geometry} \usepackage{amssymb} \renewcommand{\labelitemi}{\tiny$\blacksquare$} \begin{document} \begin{multicols}{2}      %lots of text goes here  \end{multicols} \end{document}


The screen shows inverted colors, noise in some parts. Can someone please tell me what to do?

I dropped my macbook air and the screen is like this since.    Does anyone know what exactly happened to it? Is it hardware or software?


Many insects like bees, dragonflies, wasps and other small insects are attracted towards light. Sometimes they are in groups, sometimes they are in solitude. When the light source source is switched off, they do not fly, rather stay still. What causes them to be so attracted towards light?

Do bugs love light bulbs because they resemble the stars or is it the sun? How do they sense the bulb? What is the purpose of this "brightophilia" that has evolved in insects?


Setup   MBP, 13", 2017, with touch bar; MacOS 10.15.4 (Catalina); LG 27UD88-W external display; Display is connected over USB-C -- USB-C cable. Signal and charging over the same cable.   Problem  Every time I lock the screen, the external display loses signal a few seconds later. This is a problem to me because reconnecting the display on wake up causes numerous annoyances. Corporate apps like Citrix will even regularly crash when the external monitor gets disconnected.  I'd like to make my mac to keep signal with the display when locked.  I can't find any useful options neither in power not display settings. I can't find anything useful in the internets either.  More details  The MBP keeps getting charged through the monitor, so at least power is still on.  Even though I'm on MacOS 10.15.4, it's been a problem since at least 10.13.

Whenever I lock my screen (using command+control+Q), the display goes to sleep within about 5 seconds. How can I prevent this?  This happens while plugged in, and my screen is set to never go to sleep while on power:    Even if I wasn't plugged in, on battery life, the screen should go to sleep within 2 minutes, not 5 seconds:    I'm on High Sierra 10.13.2.  edit: I gave up on locking with cmd+ctrl+q and just went with enabling my screen saver and setting the system to require a password on screen saver wake.


In the Hobbit Part 3 Movie, Legolas calls Bolg "the spawn of Azog." My understanding is that Azog is his father (from the wikia), but how exactly does an Orc reproduce? The term spawn is what really make me wonder because it typically means that the being was made with unconventional reproductive mean, as in not coitus. So how does an Orc like Azog produce spawn? Is Bolg technically a part of Azog?

I've not seen/read any female Orcs mentioned in the movies or in the books. In one of the movies, an Uruk-hai is momentarily shown emerging from a giant, grown-Orc sized flesh packet. So are they created with spells, or do they follow the Standard Reproductive Model.


My teacher told me that speed of light is constant in the universe. But in optics it is clearly shown that speed of light slows down in some objects. Please help.

Photons in vacuum have no proper time, and they are not considered as observers and not as reference frame. But what about photons travelling through matter? Their velocity is lower than light speed, thus the proper time formula (multiplication with reciprocal gamma) would yield a proper time, but do we consider that they have a proper time/ that they are observers/ that they may be reference frames?


I am learning object-oriented programming on my own. I am trying to implement a templated class. I am getting some linking error which I don't understand. My implementation is given below. The Point.h contains a declaration of a Point class. //Point.h #pragma once template <typename T> class Point {         public:                 T x,y;                 Point();                 Point(T , T);                 Point(const Point<T>& P); };  template <typename T> Point<T> operator+ (const Point<T> & P1, const Point<T> & P2);  The member functions of Point class is implemented in Point.cpp //Point.cpp #include "Point.h" template <typename T> Point<T>::Point() {}  template <typename T> Point<T>::Point(T _x, T _y) {         x = _x;         y = _y; }  template <typename T> Point<T>::Point(const Point<T> & P) {         x = P.x;         y = P.y; }  template <typename T> Point<T> operator+ (const Point<T> & P1, const Point<T> & P2) {         Point<T> P3;         P3.x = P1.x + P2.x;         P3.y = P1.y + P2.y;         return P3; }  Now, I am testing the file in test-1.cpp. //test-1.cpp #include <iostream> #include "Point.h" using namespace std;  int main(int argc, char *argv[]) {         Point<double> A(0,0), B(1,1), C;         C = A+B;         cout << C.x << endl;          return 0; }  When I try to compile the test-1.cpp as g++ Point.cpp test-1.cpp  It gives some linking error, /usr/sbin/ld: /tmp/cccV74gb.o: in function `main': test-1.cpp:(.text+0x2e): undefined reference to `Point<double>::Point(double, double)' /usr/sbin/ld: test-1.cpp:(.text+0x52): undefined reference to `Point<double>::Point(double, double)' /usr/sbin/ld: test-1.cpp:(.text+0x5e): undefined reference to `Point<double>::Point()' /usr/sbin/ld: test-1.cpp:(.text+0x75): undefined reference to `Point<double> operator+<double>(Point<double> const&, Point<double> const&)' collect2: error: ld returned 1 exit status  What disturbs me most is the last error, where the compiler looks for + < double > operator which I never defined. I have only overloaded + operator. How to properly implement member and non-member functions with templates?

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I'd like to install java runtime but it just does Reading package lists...   Error! E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/repo.steampowered.com_steam_dists_precise_steam_i18n_Translation-en E: The package lists or status file could not be parsed or opened.

The computer gave me this output in a window:  E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages E: The package lists or status file could not be parsed or opened.   How can I fix this?


According to Oxford Learner's Dictonaries, the -'s suffix can have these two meanings: (added to nouns) 1 belonging to  the woman's hat Peter's desk children's clothes  2 used to refer to somebody's home or, in British English, a particular shop  Shall we go to David's (= David's house) tonight? (British English) I'll call in at the chemist's on my way home  So except for the last example, it looks like it's always used for people but not for things. Is it really like that? Song lyrics or Song's lyrics?

I know that to mark possession of an item you can use 's like in the following example:     The user's password shall not be blank.   However, is it correct to use the following:     The car's antenna is embedded in the windshield.   I seem to remember that possession must only be used for people but I'm not certain really.


Why in evee does the emission shader not actually emit light? I turn it up to extreme levels and it does not work.

The closest I can get to making mesh lights affect their environment in Blender Eevee is giving them an Emission material and turning on "Bloom". But this isn't emitting proper light, it just looks like it is, but it doesn't light the surroundings whatsoever.     I would like to be able to light a scene with meshes without having to put point lamps everywhere just to make them emit light.


According to , the Schwarzschild radius of the universe is about 3 times the radius of the universe. According to the Newtonian theory of gravity, inside any sphere of a given density, the 3 partial derivatives of the gravitational acceleration with respect to position is always the same. I think that once you get to the scale of the cosmic web, the matter doesn't cluster or get more disperse at a larger scale the contribution of gravity to an overall attraction to the center of the universe should be bigger than the contribution of the Cosmological constant to the opposite. Could that mean the cosmological constant is bigger than was previously thought. I don't think so. I think that instead gravitational attraction has no contribution to the acceleration of the expansion of the universe because the universe doesn't follow Newtonian physics. Matter doesn't have a tendency to accelerate towards the center of the universe because its gravitational attraction to all the other galaxies is balanced because the galaxies near the edge of the universe are moving closer to the speed of light so they have a stronger gravitational field.

I was surprised to only recently notice that      An object of any density can be large enough to fall within its own   Schwarzschild radius.   Of course! It turns out that supermassive black holes at galactic centers can have an average density of less than water's.  Somehow I always operated under the assumption that black holes of any size had to be superdense objects by everyday standards.  Compare the Earth to collapsing into a mere 9mm marble retaining the same mass, in order for the escape velocity at the surface to finally reach that of light.  Or Mt. Everest packed into one nanometer.  Reading on about this , it increases proportionally with total mass.  Assuming matter is accumulated at a steady density into a spherical volume, the volume's radius will only "grow" at a cube root of the total volume and be quickly outpaced by its own gravitational radius.  Question: For an object the , what would have to be its diameter for it to qualify as a black hole (from an external point of view)?  Would this not imply by definition that:   The Earth, Solar system and Milky Way are conceivably inside this black hole? Black holes can be nested/be contained within larger ones? Whether something is a black hole or not is actually a matter of perspective/where the observer is, inside or outside?


I'm new to Java/programming and I'm trying to write a simple program that gets an element from a list IF that element is equal to some user input. I'm using a for-loop and if-statement to achieve this but even though the user input and element matches up the programming won't print the element to screen. If someone could explain why this is not working it would be very appreciated. Cheers   public static void main(String[] args){      ArrayList<String> names = new ArrayList<String>();     String tempObject;      String findName;      names.add("John");     names.add("Ronny");     names.add("Gona");     names.add("Gina");      Scanner Input = new Scanner(System.in);     System.out.print("Search list for: ");     findName = Input.nextLine();      for (int i = 0; i < names.size(); i++){         tempObject =  names.get(i);          if (tempObject == findName){             System.out.print("\n" + tempObject);         }     } }

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


I'm designing a current meter, which should retain the Ampere-hour count during power loss (e.g. power cable is disconnected without regard for first saving the data). The Ampere-hour value could be written every 60 seconds, e.g. +500k writes per year.  I was considering EEPROM, but commonly only support up to 100k writes. But perhaps by using a 32k memory space, each byte could be cycled 100k times? And using a few seperate bytes for keeping track of the current address, as well as counting every 1k writes or similar, to essentially achieve a small storage with high number of writes?  Another way could be to use volatile memory with a battery, to sustain for at least a few days.  Or, a power-loss detection circuit, and just enough backup power, to allow the MCU to write the current state before shutting down.  Is there a better way?

I am designing a device that automatically adjusts it's physical position as temperature changes. If the device it shut off or power is disconnected the device needs to remember it's last temperature and position. I have the ability to store these values in EEPROM but the problem is the position and temperature could be changing very rapidly. If I were to write the temp and pos to EEPROM after every time they changed that would (1) slow down the firmware a bit, and (2) likely kill the EEPROM after a year or two. So as I see it my options are as follows...  1) use a capacitor/battery to keep the device powered for a short time after power is lost so that I can write the values to EEPROM at that time only. I don't like this because the board is kinda power hungry and this would require a big cap. And I don't have a ton of free space. And I don't want the added cost of a battery and battery holder / or a big cap.  2) use F-RAM instead of EEPROM so that I can write to it trillions of times without wearing it out. I don't like this option because FRAM is quite a bit more expensive than EEPROM and this is for a production product (not just one).  3) Only write the position and temperature every 5 minutes or so. That way I always have a fairly recent position/temp recorded but I am not writing every second so my program is not slowed down and the EEPROM won't die as fast. This seems like my best option.  Does anyone else have any suggestions that I'm not thinking of?


How can I install the sudo package?   $ apt-get install sudo E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

This seems to be a chicken-egg problem. The most common task using sudo is installing and removing software.  sudo apt-get purge <appname>   But sudo itself can be removed.  sudo apt-get purge sudo # Do not run this command on production computers!   This is where the fun comes  ubuntu@ubuntu:~$ sudo bash: /usr/bin/sudo: No such file or directory   Although it's obvious that no person in his right mind will purge sudo (other than me), someone can be fooled to run this command (not directly, in its hex mode, or whatever it's called) or a person could SSH in disguised as tech guru and do the mess.  So is there a way of reinstalling sudo?


I need a SQL script that will remove all non numeric character for each record in a SQL table column. The column is used to hold phone numbers and there are many different formats in the database which is why i just want it to update the table remove all the non-numeric character and change it a number. Does anyone have a good one-time script that can update all of the records in the table?  Edit:  It looks like the only character i really need to replace is "-", "(" and ")"

I'm writing an import utility that is using phone numbers as a unique key within the import.  I need to check that the phone number does not already exist in my DB. The problem is that   phone numbers in the DB could have things like dashes and parenthesis and possibly other things. I wrote a function to remove these things, the problem is that it is slow and with thousands of records in my DB and thousands of records to import at once, this process can be unacceptably slow. I've already made the phone number column an index.  I tried using the script from this post:   But that didn't speed it up any.  Is there a faster way to remove non-numeric characters? Something that can perform well when 10,000 to 100,000 records have to be compared.  Whatever is done needs to perform fast.  Update Given what people responded with, I think I'm going to have to clean the fields before I run the import utility.   To answer the question of what I'm writing the import utility in, it is a C# app. I'm comparing BIGINT to BIGINT now, with no need to alter DB data and I'm still taking a performance hit with a very small set of data (about 2000 records).   Could comparing BIGINT to BIGINT be slowing things down?  I've optimized the code side of my app as much as I can (removed regexes, removed unneccessary DB calls). Although I can't isolate SQL as the source of the problem anymore, I still feel like it is.


When using the command > skt file.skt, I get the following error message: 'skt' is not recognized as an internal or external command, operable program or batch file.  Here is a minimal example:  \documentclass[12pt]{article} \usepackage{skt} \begin{document} {\skt o. nama.h "sivAya} \end{document}   I use MikTeX 2.9.

After updating ubuntu to 16.04 it seems that the "skt" package has completely stopped working.   The work of the skt preprocessor is the following. Suppose I give the command  \documentclass{article} \usepackage{skt} \begin{document} {\skt rama.h "siva.h brahma} \end{document}   and save this file as example.skt and then run the command skt example.skt then I would get the output file as example.tex and then I have to run example.tex file to get the desired devanagari output.   But whenever I type the command, skt in terminal it gives error message as skt command not found. There is a similar preprocessor, devnag which works well and is recognized by the ubuntu terminal, but I prefer the skt package as it has lot of advantages (like Vedic Accents etc, etc).  Can someone help.


I try to call Fragment method from Activity. Need to set text t1..t6 (which are in fragment.xml) from activity. So there is an error     FATAL EXCEPTION: java.lang.NullPointerException: Attempt to invoke   virtual method 'void PageFragment.setTime(java.lang.String)' on a null   object reference.   PageFragment.java  public class PageFragment extends Fragment {          static final String ARGUMENT_PAGE_NUMBER = "arg_page_number";         TextView t1,t2,t3,t4,t5,t6;         int pageNumber;          static PageFragment newInstance(int page) {             PageFragment pageFragment = new PageFragment();             Bundle arguments = new Bundle();             arguments.putInt(ARGUMENT_PAGE_NUMBER, page);              pageFragment.setArguments(arguments);             return pageFragment;         }          @Override         public void onAttach(Activity activity) {             super.onAttach(activity);            }          @Override         public void onCreate(Bundle savedInstanceState) {             super.onCreate(savedInstanceState);             pageNumber = getArguments().getInt(ARGUMENT_PAGE_NUMBER);         }          @Override         public View onCreateView(LayoutInflater inflater, ViewGroup container,                                  Bundle savedInstanceState) {             View view = inflater.inflate(R.layout.fragment, null);             t1=(TextView)view.findViewById(R.id.t1);             t2=(TextView)view.findViewById(R.id.t2);             t3=(TextView)view.findViewById(R.id.t3);             t4=(TextView)view.findViewById(R.id.t4);             t5=(TextView)view.findViewById(R.id.t5);             t6=(TextView)view.findViewById(R.id.t6);             return view;         }          public void setTime(String a){             t1.setText(a);         }     }   Schedule.java  FragmentManager fm = getSupportFragmentManager(); PageFragment fragment =(PageFragment)fm.findFragmentById(R.id.RelativeLayout1); fragment.setTime((input1.getText().toString()));

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


My teacher asked me the following question:   If $a \equiv 8 \mod{16}$   then $2a \equiv 16 \mod{32}$.  I solved this problem by plugging in a bunch of numbers but I wonder if I can prove it in a more abstract way?  Thanks in advance.

I'm having some trouble figuring out how to give a direct proof using the definitions of mod m and congruence modulo m, without using any theorem involving mod or congruence.  if $a, b, c$ & $m$ are integers such that $m \geq 2$, $c > 0$ and $a \equiv b \pmod{m}$, then $ac \equiv bc\pmod{mc}$


I asked  question on Aviation.Meta, but it has not gotten much attention so I am posting here a modified version of it.  Scenario: A person joins a SE Community, and puts up or uploads a photo for, say his, profile picture on that community. However, the photo that person uses is under copyright.  How should we deal with such a situation?

What happens if a user uses a copyright image as a profile image on SO or any other site?  Is it ok to use such images because according to law it is illegal to use anything which has a copyright?  My question is just related with User Profiles on SO not other social media sites.  If a copyright issue is occurred then who is responsible for it?


I am a standard user of a Mac Mini. There are certain applications I would like to download from the web, but they require the Apple installer, which then requires the admin password. Is there any way I could circumvent this?

Using osx 10.9 and packages for making package installer.  While installing a package made using Packages in /Applications location on a osx 10.9 machine, installer is asking for Admin password. Even though I had unchecked 'Require admin password for installation' while package making.  So, how to avoid this i.e a non-admin user should install this package. Package should install in /Applications location, so that non-admin user can use the app.  I check  and


You are missing the following 32-bit libraries, and Steam may not run: libc.so.6  please help me

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I already done game template for classic platformer. I use matter.js for physics and my own override draw functions. Everything works fine. Next stage is to make it multiplayer.  I interest is it good to send user input (force vector) only when play act with keyboard/mouse (apply force on remote gameplay) or to send on every change (for example) absolute x,y and then use set position method.    GamePLay is fully scaleable (In any resolution same diametric transformation). webRTC look like best solution for communication in fly.   I worry about collisions moments.  Any suggest for this question ?

I want to make a 2D game that is basically a physics driven sandbox / activity game. There is something I really do not understand though. From research, it seems like updates from the server should only be about every 100ms. I can see how this works for a player since they can just concurrently simulate physics and do lag compensation through interpolation.  What I do not understand is how this works for updates from other players. If clients only get notified of player positions every 100ms, I do not see how that works because a lot can happen in 100ms. The player could have changed direction twice or so in that time. I was wondering if anyone would have some insight on this issue.  Basically how does this work for shooting and stuff like that?  Thanks


It's my first time DM'ing and we're running Lost Mines of Phandelver.    The players have finished chapter 2 but this is where I'm winging it a bit as I'm not too sure on how it goes from here.  The players didn't      save Sildar in Chapter 1. They went through the wolf cages and skipped it entirely so they don't even know he was in there. They don't know anything about Cragmaw Castle nor have they handed in their caravan quest.   Is this going to cause any issues later on?   Also, the 2nd chapter ends with      them inside Glasstaff's quarters, and the 3rd chapter seems to begin almost immediately in the Spider's Lair.    Is there anything that needs to be done in between?

So my party wanted to try a campaign book so we got the Lost Mine of Phandelver.   Problem is they are blood thirsty idiots and all they care about is killing goblins for xp. This lead to them letting Sildar die so they could make sure no goblins escaped.  At this point they have just had the redbrand encounter in town.   At first I though "oh well they screwed themselves". Sildar is dead, they don't get the reward for rescuing him but the more I read the more he seems to appear in the story. It appears that he is a big part of the campaign and a lot of material is left out without him present.   Seems silly to me that so much of the book is skipped because of an early decision.   Basically I don't know if I should just accept I'm only getting 2/3 of a campaign or if everything he would have done should be shifted to other NPC. If I do this though it makes his death meaningless.


this is my code snnippet  // test.cpp #include <iostream> #include "test.h" int main(){   Test<int> test = Test<int>();    test.add(1);   test.print(); }  // test.h #ifndef TEST #define TEST template <typename T> class Test{ public:   T info;   void print();   void add(T i);  }; #endif // testT.cpp #include <iostream> #include "test.h"  template<typename T> void Test<T>::print() {    std::cout << info << std::endl; } template<typename T> void Test<T>::add(T i) {   info = i; }   and i run this exec  g++ -c testT.cpp && g++ test.cpp -o a.out testT.o   i get this error  Undefined symbols for architecture x86_64:   "Test<int>::add(int)", referenced from:       _main in test-e89092.o   "Test<int>::print()", referenced from:       _main in test-e89092.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)  // in my macOS   i want to declare template class in head file and define method in other file,so i only compile the define method file not head file if i change the definition of method in template class. what should i do?

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I've heard all kinds of different ways to solve this problem, yet haven't been able to apply them specifically to the number 8 (Worked fine for 6 for example). I'd love to see a well-explained solution, is possible. Thank you.

Let $\phi(n) $ is the numbers of number that are relatively prime to n.   Then, how could we solve the equation $\phi(n) = k, k > 0?$   For example:    $\phi(n) = 8 $  I can use computer program to check all numbers that are relatively prime to $n$, but I think there must be an easier way to approach this problem.    Base on this formula: $$\prod_{i=0}^{k} p_{i}a^{a_i} $$ The only thing I can see is n must not have a prime factor > 9, otherwise $\phi(n) > 8 $. I really don't know where to start :( ? A hint would be greatly appreciated.