Smaller size of CIFS mounted Directory than the file

I got a curious problem. I've copied some data from an external storage to a CIFS mounted directory over scp.   When I enter ls -lah in the CIFS mounted directory, I see that the file has 10 GB.   When I enter du -mh to see the size of the whole directory it says 1.5 GB.  What thing can cause this problem ?  Many thanks in advance


Today this happened to me.  I was trying to answer a question and provided a link that can help the OP in solving the question. Why did the system converted it to a comment? How come it identifies one of my answers providing a link as a trivial answer?  Any Guide? That would be very much appreciated.


Two errors "Type is not known on line" when I run `sudo apt-get update`

When I run sudo apt-get update I get these errors:  E: Type 'See' is not known on line 2 in source list /etc/apt/sources.list E: Type 'dep' is not known on line 1 in source list /etc/apt/sources.list.d/upubuntu-com-tor64-saucy.list E: The list of sources could not be read.


Two company names joined with & - singular or plural

AFMA & PFI invites you to attend the joint closing meeting... (or invite?)


Prove that $\{r^n\}_{n\in\mathbb{N}^+}$ converges to $0$ if $0 < r < 1$ using the $\epsilon-N$ definition.

How would I prove that $\{r^n\}_{n\in\mathbb{N}^+}$ converges to $0$ if $0 < r < 1$? I've tried using $\epsilon-N$ but the only way I can isolate $n$ is by getting $n > \frac{ln|\epsilon|}{ln|r|} = log_{r}|\epsilon|$. Is there something I'm not getting here? Am I allowed to choose $N > log_{r}|\epsilon|$?


Best VNC / remote desktop software for assistance

Poll on best VNC / remote desktop software for assisting others on Windows/Mac machines from Ubuntu?    I've heard good things about TeamViewer and Fog Creek Copilot, but I'm wondering if the included GNOME Vinaigre VNC client is good enough for this.  To specify, I'm looking for best option based on:   SIMPLEST ease-of-use for client to download/use on their end. See #1. Works cross-platform I am able to control client's mouse and/or keyboard from remote machine.


Get string between two string with regex

this regex give string between two string "(?<='v')(.*)(?='d')",  but i have some problem sometime with regex,  like this ex "   'v'string1d'd'string2'd'  ",  if use this regex he give me this result : string1d'd'string2  i want only get the string1  there any way to fix it


Is right to say "when he was come down from the mountain"?

When he was come down from the mountain, great multitudes followed   him.   This is the quote from KJV Bible. I am doubted why to say "he was come down". I felt "he came down" is more proper grammatically.  Be + Verb in pp form is usually a passive voice which seems irrelevant in this context. However, I did hear a lot native English speakers say 'he was come down', 'are you agree with me?', etc. Is this usage correct?


Union of increasing $\sigma$-algebras which is no $\sigma$-Algebra

Give an example for an increasing series of $\sigma$ algebras $$ \mathcal{A}_1\subset\mathcal{A}_2\subset\ldots $$      so that     $$\bigcup_{i=1}^{\infty}\mathcal{A}_i $$ is no $\sigma$-algebra.      Could you pls give me a hint how to find such an example?


Based on the below link as an example:  ...if a link tag contains the class "add-selected", I want jquery to add an href called "#scrollTo" to all corresponding 's.       Add Selected    Final result after page loads should be:       Add Selected


How can i normalize the input data to neural network

I've got a question. I thought about it so much, but cant get an idea how can I do that.  I want to create neural network in Encog framework. The neural network is about shopping. I have a database with shopping lists with products. All users have their private lists. I need to create a neural network that will generate new list based on lists in db. For example based on lists from 2 months.  But in Encog to input i have to send array of dobules. I read about normalization in documentation and was trying to search some ideas in internet but found nothing.  How can i "convert" the products to double? I mean to use it in neural network.  Many ppl just uses the Equation that will calculate the value between 0 to 1 or -1 to 0. But in my example, it's hard.  Thanks for help!


What's the purpose of each of the different UIDs a process can have?

Real UID, effective UID, and some systems even have a "saved UID". What's the purpose of all these, especially the last one?


I'm trying to change a value user enters to a true number (ex. 15 or 144.38). If it has unapproved characters (ex. $,) then they should be stripped. Also if user enters value with multiple periods (ex. 43.14.14) then I want to clear entire value. I was able to do step 1 but can't figure step 2, please advise. Here's my code so far   function myFunction() {   var str = document.getElementById("number_field").value;   var res = str.replace(/[^0-9.}]/g,"");   document.getElementById("approved_number").innerHTML=res; }


I thought we need "the" before the word most.  Such as in:      She is the most beautiful girl.   But, I came across this sentence:     Most incredible is how many Islamic scholars have popped up over the past few years.   Why isn't there "the" before the word "most" ? I know "the" is not needed if the word afterward is an adverb as in:  I like it most.  However, "incredible" isn't being used as an adverb here.


Basic DNSSEC configuration under BIND 9.7?

Could anybody provide a step-by-step procedure to set up DNSSEC under BIND 9.7? I think the version is relevant because it is supposed to make life easier. In fact, there is a document published by ISC called , which I used as a starting point, though it's not quite a tutorial.  The main reason I'm using 9.7 (say, instead of the brand new 9.9) is that it is the stable version under Debian 6. I should mention that I have a basic BIND configuration up and running.  What I tried:   Included inside the appropriate curly brackets in /etc/bind/named.conf.options the line  dnssec-enable yes;   and restarted BIND. Ran dnssec-keygen example.com Ran dnssec-keygen -fk example.com Tried dnssec-signzone –S example.com   However, the last step gives me the error  dnssec-signzone: fatal: No signing keys specified or found.   I can see this is a likely error, as there seem to be missing options indicating where my keys are, but on the hand the referred guide by ISC cites specifically this last example. Indeed, the flag -S stands in fact for "smart signing", so I was hoping having the keys in the same directory from where I execute the last command (/etc/bind) could suffice.  Since this is a toy, non-production project, I don't mind repeating these steps, say, every 30 days, but I'd like to keep them as simple as possible and... get them right!  Any ideas/pointers? Thanks in advance.


In my Ubuntu after login by my user account, I want to create another user I intered bellow commands  :  adduser alex_2 -m   I created new user, but when I want to login, Ubuntu needs passwords and I did not gave that any password, as I mentioned I just typed adduser alex_2 -m. Am I should set a password? Also I can not login even when I set password blank .


The integral is as:     $$\int_0^\infty\sin\left(x\right)\times x^{n}\;\mathbb{d}x$$   Where $n\in\mathfrak{R}$.   I was able to find the convergence of this integral using Dirichlet's test, which implied $-2<n<0$.  But the hard part is to find the value of this integral for me. Wolfram alpha gives the answer as:   Which is very close to gamma function. So i tried to assume integral of form $$\int_0^\infty e^{-ix}\times x^n\;\mathbb{d}x$$  So that i would take the $-\mathfrak{Im}$ part of this integral. But I still have no idea how to evaluate this.


@RestResource(urlMapping='/v/restAPIKeyGeneration/*')  global with sharing class APIforKeyGeneration{       global class Account{     public String sname;     public String bp;  }      @HttpPost     global static String CallTo(Account[] account){     system.debug('rtrtr');     String Name;     String BillingCity;     for (Account i : account) {            Name = i.sname;            BillingCity = i.bp;     }     //String key = SourceMDMRestAPI.GenerateKey(account[0].Name);     return 'key' ;     }   }   public class SourceMDMRestAPI{     public static string GenerateKey(Account acc){//how can i cal this method in my webservice Account m=new Account(Name=acc.name);     return m.id; }


Updating String title() for field in attribute table using ArcPy?

When using the title method, can it only be used on a string or can it run through an entire field and update Names to proper case in a table?   str.title()   I have tried the following and it did not work;  arcpy.title(table,'Field')


Is there a way to determine how many digits a power of 2 will contain?

Is there a direct way to determine how many digits a power of 2 will contain without actually performing the multiplication?  An estimation would help as well if there is no absolute solution.  EDIT: In both decimal and binary bases.


I found that  \center \begin{tabular}{...} ... \end{tabular}   and  \centering \begin{tabular}{...} ... \end{tabular}   both make the following table centered.  My questions are:   Are \center and \centering the same? What is the difference between them? Are they both commands? What are the scopes that they apply to? (note that in the examples, there are no table environment.)   Thanks!


I'm getting this error   Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4194304 bytes)   How come he tried to allocate 4194304 (which is smaller than the limit he specifies 134217728) and is exhausted?


How does StackOverflow/StackExchange handle cross-domain sessions?

The multi-domain approach to a membership implemented at StackOverflow, through Stack Exchange's network seems well beyond just an Open ID.  How are the individual participant's sessions at multiple domains handled as one single session across many, enough to support such a solid inbox and achievements WebSocket?  Is this through many individual sessions which each store a centralized session ID, or is there one session sustained with a concurrent actor or some such means which keeps session(s) so current?


How to fix java.lang.OutOfMemoryError: PermGen space in solr?

We face this error from time to time in our production servers. This gets solved when we restart solr. But occurs again after few days. Version information: We are using both centos6 and centos7 machines, Centos6 is with java7 and centos7 is with java8. solr: 5.5.5         at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:607)         at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:475)         at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:257)         at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:208)         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)         at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)         at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)         at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)         at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)         at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)         at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)         at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)         at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)         at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)         at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)         at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)         at org.eclipse.jetty.server.Server.handle(Server.java:499)         at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)         at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)         at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)         at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)         at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)         at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.OutOfMemoryError: PermGen space```


I am currently trying to create a freehand style as seen in technical drawings:  (see the thin line to the right of the shaded part) This is what I have so far: \documentclass{article} % https://tex.stackexchange.com/questions/586063/reusing-decorated-path  \usepackage{tikz} \usetikzlibrary{decorations, decorations.pathmorphing}  \tikzstyle{freehand}=[decoration = {random steps, amplitude = 10}]  \begin{document} \begin{tikzpicture}     \draw[thick] (0, 0) rectangle (6, 3);     \draw[thin, freehand, decorate] (3, 0) -- (3, 3);     \fill[red, opacity = .5] (0, 0) -- (3, 0) decorate [freehand] { -- (3, 3)} -- (0, 3); \end{tikzpicture} \end{document}  This somewhat does what I want:  However, the line and the background don't match. I think I can fix this through either  setting a random seed to the same value for both parts use filldraw from the beginning name the random path & reuse it for the fill command  I couldn't find any way to do 1. 2 I don't like because there could be situations where I want to fill both sides of the lines. So my question is, how do I save a morphed path to reuse it later? Thanks in advance.


Existence of $k$ such that for $\lim\limits_{n \rightarrow \infty} a_n=0$, $\sum\limits_{n=0}^{\infty}a_n^k < \infty$

Is it always possible to find a $k \in \mathbb{N}$ such that for a sequence $a_n$, where $\lim\limits_{n \rightarrow \infty} a_n=0$, the sum $$\sum\limits_{n=0}^{\infty}a_n^k < \infty $$ I suspect there is some pathological counterexample, but I have not yet found it. Any ideas?


Java counting string occurrences in ArrayList

I have written a program where I have N strings and Q queries that are also strings. The goal is to determine how many times each query appears in the N strings.   This is my code:   import java.util.Scanner; import java.util.ArrayList;  public class SparseArrays{   // count the number of occurances of a string in an array int countStringOccurance(ArrayList<String> arr, String str){     int count = 0;     for (int i=0; i<arr.size(); i++) {         if (str==arr.get(i)) {             count += 1;         }     }     return count; }   void start(){     // scanner object     Scanner input = new Scanner(System.in);      // ask for user to input num strings     System.out.println("How many string would you like to enter?");     // store the number of strings     int numStrings = input.nextInt();     // to get rid of extra space     input.nextLine();      // ask user to enter strings     System.out.println("Enter the "+numStrings+" strings.");     ArrayList<String> stringInputArray = new ArrayList<String>();     for (int i=0; i<numStrings; i++) {         stringInputArray.add(input.nextLine());     } // all strings are in the stringInputArray      // ask user to input num queries     System.out.println("Enter number of queries.");     int numQueries = input.nextInt();     // to get rid of extra space     input.nextLine();      // ask user to enter string queries     System.out.println("Enter the "+numQueries+" queries.");     ArrayList<String> stringQueriesArray = new ArrayList<String>();     for (int i=0; i<numQueries; i++) {         stringQueriesArray.add(input.nextLine());     } // all string queries are in the stringQueriesArray      for (int i=0; i<stringQueriesArray.size(); i++) {         int result =        countStringOccurance(stringInputArray,stringQueriesArray.get(i));         System.out.println(result);     } }  void printArr(ArrayList<String> arr){     for (int i=0; i<arr.size(); i++) {         System.out.println(arr.get(i));     }     System.out.println(" "); }  public static void main(String[] args) {     SparseArrays obj = new SparseArrays();     obj.start(); } }   When I run my code and enter 4 strings such as {abc,abc,abc,def} and 3 queries such as {abc,def,ghi} I expect to get 3, 1 and 0 for my output since there are 3 "abc", 1 "def" and 0 "ghi". However, the output is zero for all the queries.  I am pretty sure the problem is from the method  int countStringOccurance(ArrayList arr, String str) which is supposed to give me the number of times a string is repeated in an ArrayList of Strings.  Am I missing anything here?


Does the notification get deleted when comment is editted?

When a user writes a comment to reply to another user using @username then this user gets a notification. However, what happen if after few seconds the commenter edits his comment and deletes @username or changes the reply to another user. Does the notification sent to the user get deleted if he hasn't read it yet?


Prove that if $\sum_1^\infty a_n$ converges provided $a_n>0$ for all $n$, then $\sum_1^\infty \sqrt{a_na_{n+1}}$ converges too

I wrote $b_n:=\sqrt{a_na_{n+1}}$ and tried to apply a few tests on the series. Here are the tests that didn't work:  $$b_n<=a_n$$  $$\lim_{n\to\infty} \frac{b_n}{a_n}$$  $$\lim_{n\to\infty} {b_{n+1}}{b_n}$$  $$\frac{b_{n+1}}{b_n}<=\frac{a_{n+1}}{a_n}$$


Is an institution or a supervisor necessary to make a submission?

I am a motivated student and I had a well running project with a nice exposé presentation at a conference. I could do some more work on this and publish further papers, but eventually I would like to do this on my own after my studies as side project in my free time. Is it generally possible to make submissions to scientific conferences without a scientific supervisor or/and without a scientific institution?  If you know please tell if it depends on the conference or the research area.  Thoughts about if doing this makes sense to you can be placed here, too.  The research field is related to computer science, human computer interaction and music.  Thanks in advance!


Can a function be continuous at only one point in its domain and discontinuous everywhere else

Can you please explain if this is possible or not?  Does there exist a function that is continuous at only one point in its domain?


Show that $x^3+3y^3+9z^3-9xyz=1$ has infinitely many integer solutions.   I have found that (1,0,0) and (1,-18,12) are two solutions and tried (1,-18+n,12-n).  There is a hint saying that I should try to decompose the left hand side into complex polynomials. Any idea how I can do this?


HQs : plural of the abbreviation of "headquarters"

According to the CambridgeGEL, headquarters has the same singular and plural form, but HQs is the plural of the abbreviation of "headquarters". Aren't both statements contradictory? Apparently people use it as fallows: A company with one headquarters has an HQ. A company with two headquarters has two HQs. According to Wiktionary, hdqrs (plural hdqrs). Yet, does h.q. or H.Q. have a similar plural?


How do I know if my Australian ETA was approved?

I would like to know is my visa application being approved or not   I receive an email saying I need to check on eta.immi.gov.au after 12 hours but after I check in I just received this only :      Reference number   expire date 5 April 2017   period stay 3 months   entries multiple visa   condition NO WORK- business visitor activity only   that's all so how do I know if this application is approved or not?  Can someone assist me?


I tried to install ubuntu-tweak. I followed these steps:  sudo add-apt-repository ppa:tualatrix/ppa  sudo apt-get update  sudo apt-get install ubuntu-tweak   But I got Unable to locate package ubuntu-tweak.  what else should I do to install ubuntu-tweak?  thanks much, bfz


My high school chemistry textbook contained the following passage (the emphasis is mine):-     The correlation between the structure and properties helps in   discovering new materials such as high temperature superconductors,   biocompliant polymers for packaging, ...   I wanted to know what biocomplaint meant. So I googled it and Google displayed a 'did you mean bio-complaint' suggestion. Is there any difference between the biocompliant or bio-compliant?


Is there a reason to avoid the Nikon 80-200 f/2.8 on a Nikon D7000?

I just got my Nikon D7000 and I was not satisfied with the kit lens that came with it (18-105mm VR), so I have now set my eyes on an 80-200mm available for $1000 on a local store.  However, I have heard photography sites that say never to pair up the 80-200mm f/2.8 with a DX camera an instead to go for the 70-200mm f/2.8 VR2, which is more than twice the price of the 80-200.  For budget reasons, I am not able to go 70-200mm, but I would not want to waste money on an 80-200 if it will not work as I expect it.   I do mainly sports photography and candid shots of people from events, so I need the zoom and the f/2.8. I also plan to do small music videos, so I need the zoom and the f/2.8 aperture, again.   So why, exactly, do some people say not to pair up the f/2.8 80-200mm with DX cameras? Or in general, why would I not want to pair up a lens designed for FX cams with DX cams?


$\left\langle A,\leq_{A}\right\rangle $ is a totally ordered set with the property that $\{b\in A\mid b\leq_{A}a\}$ is finite for each $a \in A$

Also, $\left\langle A,\leq_{A}\right\rangle $ doesn't have a maximal element.  Is it true that $\left\langle A,\leq_{A}\right\rangle $ has a minimum? (strictly because of the proprerty that  $\{b\in A\mid b\leq_{A}a\}$ is finite for each $a \in A$)?


Why doesn't every integral from 0 to $2\pi$ equal zero?

Quick question, might end up having a simple answer, but I have here a "proof" that any integral from 0 to $2\pi$ is zero, as follows:  $$\int^{2\pi}_0f(x)dx$$  Now using u-substitution, let $u = \sin x$, so $dx = \frac{du}{\cos x}$, so:  $$\int^{0}_{0}\frac{f(x)du}{\cos x}$$  (The bounds were evaluated to zero due to the u-substituion).  However, this is zero, since the integral goes from zero to zero.  Any help as to why this is wrong would be appreciated.


biblatex: remove commas between last and first names in bibliography

I am new to biblatex, and I need to create a bibliography with the authors' names with last names followed by pure initials. Using the style=numeric, firstinits and terseinits options along with:  \DeclareNameAlias{author}{last-first}   I come up with a list of names that looks like:     Doe, J, Smith, K, and Doe, W"   How can I remove the commas between the last name and the initial of the first name?


What's the term for denying something so as to raise doubt?

Topical example:  'There was a scuffle outside the local pub. There appears to be no connection with religious extremists.'  ...but now you're wondering if there was. It's a nasty tactic used to raise fear and doubt - deliberately calling attention to something by explicitly denying it.  What's the term for this?


Vote locked, new insight (different commenter) makes me rethink the vote

I got this:     You last voted on this answer Feb 8 '11 at 16:40 Your vote is now   locked in unless this answer is edited (click on this box to dismiss)   So this was shown to me on stackoverflow. I tried to remove an upvote to an already downvoted answer, I did not see that that the answer was really flawed. Another commenter saw this and responded. I wanted to take of my +1 (the tally was -1) so it would be a -2 which would mean more to visitors in my opinion.  I guess what I'm trying to say here is that a comment from somebody else other than the author (who clearly didn't take the downvotes as a hint) might influence my opinion.  This question is slightly different because the assumption is that your comment is picked up by the editor of the question.


>>> import arcpy Traceback (most recent call last):   File "<interactive input>", line 1, in <module>   File "C:\Python27\lib\arcpy\__init__.py", line 21, in <module>     from arcpy.geoprocessing import gp   File "C:\Python27\lib\arcpy\geoprocessing\__init__.py", line 14, in <module>     from _base import *   File "C:\Python27\lib\arcpy\geoprocessing\_base.py", line 14, in <module>     import arcgisscripting ImportError: DLL load failed: The specified module could not be found.   This is the error I get when i try to import arcpy. Any suggestions?


Delay alerting of non-local mods/10k-ers for chat flags

While I haven't read through the entirety of , I've read enough to (IMHO) reasonably conclude that there's two large issues at work there.   People who are having their activities moderated need to be more civil about it, lest they be even further moderated. Chat moderation on StackExchange could use a bit of tweaking, to reduce the likelihood of outside users performing moderation that may not fit the current context or culture of the room.   The first isn't really something we can do much about - people who don't want to be civil (whether it be in general, or simply in certain situations) just won't. That's one of the reasons moderation exists in the first place.  However, I think there are some appropriate changes that can be made to address the second part.  Outside users may not be able (or simply may not be willing) to perform enough depth of review to put flagged content into its proper context before acting upon it. However, the room's current (or recent) participants are probably very familiar with the context and therefore logically the most appropriate people to pass judgment.  Given this, the most logical move (at first glance) may be to entirely restrict chat moderation to only the participants of the room. However, this could become a problem where there are not enough moderators or high-rep users (I'll collectively refer to these as "flag handlers") present to deal with flags within a reasonable amount of time.  However, if there are enough flag handlers around, why not give them a chance to handle the issue internally before getting all of the StackExchange flag handlers involved? This reduces flag noise for non-local flag handlers, increases the likelihood that context and local culture will be taken into account before a flag is handled, and still leaves the entire SE flag handling community available to handle flags that the local users can't deal with on their own.  Proposed modification:  Immediately when a flag is posted to chat.    Notify local flag handlers only. "Local" includes any flag handlers currently showing as present in the room. May also want to include any who are currently active elsewhere in chat, and have visited the room within X days. (I'd say X probably shouldn't be more than a couple weeks.)  After a delay, only if the flag has not already been handled.    Notify non-local flag handlers. I'm thinking somewhere within 1-2 minutes would be an appropriate delay. Certainly no longer than 5 minutes, and no shorter than 30 seconds. Maybe consider throttling the delay according to recent flag volume. (i.e.: More flags per minute across the past X amount of time - say, 15 minutes to an hour - means a shorter delay.) Also may want to consider eliminating this delay when the room has a low number of "local" (or recently-local) flag handlers available.


I understand it's grammatically correct to use apostrophe s for the plural of letters.     Dot your i's and cross your t's.   But not for proper nouns that end with s.     Here come the Jones's Joneses.   What would the plural of the name Jess be?  Jesses?  Which is also the plural of Jesse. So...     Both Jesses are dating both Jesses. Wait what?   English is just silly indeed peculiar.  I understand Jess can stand for Jessica and to reduce confusion we could use Jessicas. However not all Jess..es (lol) are birthnamed Jessica.  And if that wasn't bad enough, we can give the plurals possession...     Both Jesses's cats are playing with the Jesses's dogs.   Now answer this, do the Jesses own cats or dogs? Oh English, you.  If Jesses is the correct plural for Jess, how can English avoid confusion with the plural for Jesse?


Is panda "a kind of a bear" or "a kind of bear"?

Or, perhaps, it's not a kind at all? A type maybe?


Find the number of subsets? (There is no proper solution for the duplicate question, please provide proper proof )

The number of subsets {1,2,…,n} with odd cardinality is ?  (Is it asking about number of subsets, we have to take power set then?)


documentclass{dissertation} incompatible with biblatex

I am writing my thesis in overleaf and want to add a bibliography sinced with Mendeley.  However, i'm having issues using biblatex package... Can i overwrite these issues or should I change my entire document type?  This is my code and the errors im facing:  \documentclass{dissertation}  \usepackage[style=authoryear]{biblatex}  \addbibresource{references.bib}  \begin{document}  \include{Introduction/Introduction}  \include{Methods/Methods}  \include{Results/Results}  \printbibliography  \end{document}   Errors   /usr/local/texlive/2017/texmf-dist/tex/latex/biblatex/biblatex.sty, line 462 LaTeX Error: Command \bibhang already defined.  /usr/local/texlive/2017/texmf-dist/tex/latex/biblatex/biblatex.sty, line 9791 LaTeX Error: Command \citename already defined.   /usr/local/texlive/2017/texmf-dist/tex/latex/biblatex/biblatex.def, line 270 LaTeX Error: Command \bibfont already defined.  usr/local/texlive/2017/texmf-dist/tex/latex/biblatex/biblatex.def, line 2067 LaTeX Error: Command \Citeauthor already defined.   Package biblatex Error: Incompatible package 'chapterbib'.  Package biblatex Error: Incompatible package 'natbib'.


References for Chern-Simons action $ \int d^3 x ~\epsilon^{\mu \nu \rho} A_{\mu} \partial_{\nu} A_{\rho}$

Can you recommend to me good references on this action? From basics to more advanced stuff.


The class is/are all working on a project together.   I am curious to know whether I can use both is and are in this sentence - with a small difference in meaning.


Is there any way you can find out which devices were previously logged in to your iCloud account even if they are no longer active? If they were removed directly in macOS’ iCloud app, would there be a way to find that information in syslog? Or does Apple provide that information?


How can I model this, . I've only started to try, but im a newbie and feel like I'mma fail at making it look like a dome with the curvature. Any advice or comment would be much appreciated! :)  The "progress"


Why isn't $\int \frac{1}{x}~dx = \frac{x^0}{0}$?

I know that $\int \frac{1}{x}~dx = \ln|x| + C$ and I know the antiderivative method works for all powers of $x$ except $-1$. But why is that the case? I am still in high school and teachers aren't really helpful with these questions.   Edit: I do realize dividing by zero is meaningless. That's not the question. Just because dividing by zero is meaningless doesn't mean mathematicians just choose to ignore it and work just make up a new answer. There has to be an explanation, and that's what I am asking for. The explanation.


BibLaTeX uses multiple authors in citation although the references have different years

I use BibLaTeX for managing citations. However, inline citations with three or more authors sometimes use more than one author, although these references have different years, and thus, can be distinguished.  I give you an MWE to make my issue clear:  \documentclass{report} \usepackage{filecontents} \usepackage[backend=biber,style=authoryear,mincitenames=1,maxcitenames=2,giveninits=true,uniquename=mininit]{biblatex}  \begin{filecontents}{mybib.bib} @article{Test2018,     author = {Human, B and Person, P and Somebody, B},     journal = {Journal of Journals},     number = {1},     pages = {1--8},     title = {qwerty},     volume = {1},     year = {2018} } @article{Test2019,     author = {Human, B and Random, R and Person, P},     journal = {Journal of Papers},     number = {1},     pages = {1--8},     title = {asdasd},     volume = {1},     year = {2019} } @article{Two2019,     author  = {First, Stephan and Second, Robert},     journal = {Journal of Research},     number = {1},     pages = {3--5},     title = {A Title},     volume = {1},     year = {2019} }  @article{Three2019,     author  = {Uno, Alpha and Second, Beta and Third, Gamma},     journal = {Journal of Stuff},     number = {1},     pages = {3--5},     title = {Another Title},     volume = {1},     year = {2019} } \end{filecontents}   \addbibresource{mybib.bib}  \begin{document}  This is a text with \autocite{Test2018} and \autocite{Test2019}.   This is a two authors citation \autocite{Two2019}.  This is an unrelated citation with three authors \autocite{Three2019}.  \printbibliography \end{document}   Expected output:  This is a text with (Human et al. 2018) and (Human et al. 2019). This is a two authors citation (First and Second 2019). This is an unrelated citation with three authors (Uno et al. 2019).   Actual output:  This is a text with (Human, Person, et al. 2018) and (Human, Random, et al. 2019). This is a two authors citation (First and Second 2019). This is an unrelated citation with three authors (Uno et al. 2019).   How can I configure BibLaTeX to give me the expected output? I tried several variants of uniquename etc. but with no success.  Many thanks in advance!


Is it always true that product of eigenvalues is determinant of a matrix ? what if one of the eigenvalues are same and matrix is not diagonalizable ? Is this statement is still true ?


How to get rid of iCloud music on iPhone

I have an iPhone 4s with iOS7 and somehow I see iCloud music which I haven't downloaded yet on my iOS device. How can I get rid of these, I do not need to see them.


Why is $0.5$ rounded up to $1.0$? It's not closer to $1$ than $0$?

Why is 0.5 rounded up? It is exactly halfway between 0 and 1, so it is not closer to 1...nor is it closer to 0. It is exactly halfway between them.  The same principle applies to other things like 11.5 or 23.5. The value is exactly halfway between integers. I don't see any objective round-direction in these cases.  You can say the same thing for something like 6.45 if rounding to the nearest 10th. 0.45 is no closer to 0.50 than it is to 0.40. It's exactly halfway between them.  Why are they rounded up? Is it just because we need an arbitrary rule for all cases?  Edit: I read everything on the duplicate question, but still feel left hanging. If the answer is, it's arbitrary, it just seems so unsatisfying. Is there a way to prove if something in math is arbitrary or not?


Obviously we can use the completeness of the real numbers (least upper bound axiom, or one of the equivalent principles) to prove the IVT. Can we go in the opposite direction?   This isn't a homework problem or something. I'm just wondering. If the answer is "yes", then I'm not really asking for much explanation. A reference, or a place to look if I'm stuck, will do.


Custom column for changing post status via ajax

I'm currently trying to implent a new custom column at the page manage screen that will let me change the status (published/pending) of the different pages via an easy toggle link.  From what I've gathered I need to use $post->post_status, 'status'in someway, probably toggle with jQuery or something. But I can't figure out how I tie it together with ajax. Thought I'd get some help looking at the default post status modifier in the edit post screen, but I realized that it's not ajax based, I the status updates when you press "update" (obviously, duh).  Here's my lousy try for an attempt so far:  function wp_change_page_status_link() {     $status = get_post_status($ID);     if($status == 'publish'){         $status = 'On';         //$post->post_status, 'pending'     }     elseif($status == 'pending'){         $status = 'Off';     }     return $status; }   Would be really grateful if someone could point me in the right direction..


Failure of newcommand for align/split environment

I use the following commands for equations that extend over several lines, but  only have a single label:  \begin{align} \begin{split} \label{mylabel} ... \end{split} \end{align}   This works fine, but is a lot of typing to have to do over and over.  I try to define a command:  \newcommand{\bas}[1] {\begin{align}\begin{split}\label{#1}} \newcommand{\ea}{\end{split}\end{align}}   but it does not work.  Here is the complete input:    \documentclass{article} \usepackage{amsmath}  \newcommand{\bas}{\begin{align}\begin{split}} \newcommand{\eas}{\end{split}\end{align}}  \begin{document} I try  \begin{align}\begin{split} ... \end{split}\end{align}  and it works, but   \bas ... \eas  does not work \end{document}  -----------   Here is the output:  Runaway argument? \begin {split}... \eas ! Paragraph ended before \align was complete. <to be read again>                    \par   l.19  Does anyone know why, of can suggest an alternative.


Are orcs and goblins really the same thing?

Are orcs and goblins really the same in The Hobbit and LotR, and where does it say that? Are they variant sub-races or something, explaining the different physical attributes? Or is my assumption they were different from the different terminology in the Hobbit and LotR novels, and then reinforced by a non-canon interpretation by Jackson in his films?    I recently re-read and then watched the movie of The Hobbit.  It made me do some research on Azog the Defiler, as he was in the movie but wasn't in the book itself but in various other Tolkien-bits.  I saw that his son Bolg then led the goblins of Moria, which seemed odd, and then I stumbled across something that really confused me, which is the much-wiki'ed claim that orcs and goblins are the same thing.  I had never heard that before, and I read The Hobbit originally some 30 years ago and then again a couple times over the years, and Lord of the Rings at least twice since. It never really crossed my mind that they weren't separate kinds of humanoids (and in fact I was a little griped at them inserting orcs rather than goblins as the foes in the Hobbit movie). It seems odd, especially since there's the whole 'the goblins won't go out during the day' thing, but in both LotR and at least the film Hobbit, the orcs seem all large and in charge during the day and certainly seem physically different from goblins in all the representations I've seen.   I know there are the Uruk-hai which are even more buff and light-tolerant orcs, but the goblins, both in my book recollections and in their depictions in the movies, seem different even from rank and file orcs.  In the films they spider climb all over the walls and ceilings (both in Moria and in the Great Goblin's place - if orcs could do that the siege of Helm's Deep would have been over in ~30 seconds) and unwillingness to, even enraged, go out during the day when even the non-Uruk orcs in the Hobbit film are tooling around on wolfback at noontime. I know hobbits are referred to both as "hobbits" and "halflings" by different races, but the references to orcs and goblins don't seem to be split in a logical way where one could claim they're just different words for the same thing...


Can audio go to both the speakers and a bluetooth headset simultaneously

I have a hearing impaired person in the house and want to equip her with a bluetooth headset while the rest of us listen over the speakers. I am able to connect the headset and get it to play by setting it as the default speaker. Problem is that the speakers are then turned off.  Working with windows 7 and Samsung bluetooth headphones.


C++ how to get length of bits of a variable?

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


Fibonacci Numbers Proof: $ f_n = \binom n0 + \binom{n-1}1 +\dots+ \binom{n-k}k$

Prove the following fibonacci sequence, which appear in Pascal's Triangle. I am not sure where to start on this, any pointers? $$ f_n = {n\choose0} + {n-1\choose1} + ... + {n-k\choose k}$$  where $\displaystyle k=\left\lfloor\frac{n}{2}\right\rfloor$


Posterior and Likelihood probabilities meaning

I am a computer scientist, so I have a background at maths (however limited). I am reading about posterior distribution from here  .   It says there:  The posterior probability is the probability of the parameters θ given the evidence X: p(θ|x).  It contrasts with the likelihood function, which is the probability of the evidence given the parameters: p(x|θ).  My question is firstly can you provide me with a very simple example to understand better these concepts? And in addition in machine learning, what we want isn't the probability p(Class|x)?   Thanks a lot


Find the number of integer pairs 0 ≤ a, b ≤ 100 such that a^20 ≡ b^50 (mod 101). Need help with understanding solution

Find the number of integer pairs 0 ≤ a, b ≤ 100 such that $a^{20}$ ≡ $b^{50} \pmod {101}$.  Here is the solution: "Since is prime, there exists a primitive root g in modulo 101. For some integers x and y, with 1 ≤ x, y ≤ 100, let a ≡ $g^x$ and b ≡ $g^y$. Hence, $g^{20x}$ ≡ $g^{50y}$ (mod 101). Therefore, $g^{20x−50y}$ ≡ 1 (mod 101), and 100|20x − 50y, or alternatively, 10|2x − 5y. Since 2|2x − 5y, we have 2|y. Also, 5|2x − 5y, so 5|x. Hence, the congruence holds for all x and y such that x is a multiple of 5 and y is a multiple of 2. There are 20 choices for x and 50 choices for y, so our answer is 20 · 50 = 1000."  In general, I'm very confused on the logical reasoning behind these steps. I'm a beginner in learning primitve roots and perhaps don't have enough background yet.  I'm confused why you can let a ≡ $g^x$ and b ≡ $g^y$.  Wouldn't that mean both $g^{x}$ and $g^{y}$ are both one Modulo 101? Finally, why does 100 have to divide 20x-50y. In fact, shouldn't it be 20x-50y dividing 100? I thought ord(a) of x always has to divide totient of x, and therefore 20x-50y|totient 101 which is 100.


Permanently remove/disable Touch Keyboard in Windows 8 taskbar?

I have Windows 8 (final, MSDN) on my Macbook Pro Retina.  Windows 8's ongoing, continuous tantrum of insisting that it's on a tablet device is causing it to always have a touch keyboard 'icon' on  the taskbar.  The 'icon' is actually a toolbar and I can temporarily disable it by right clicking the taskbar and DE-selecting it. However, upon rebooting the system, it always insists on coming back and activating itself.    How can I permanently disable the touch keyboard toolbar in the taskbar?


Runaan's Hurricane effects for these champions

How exactly does Runaan's Hurricane work for:   Draven, spinning axe Jayce, transform mercury cannon Jayce, hyper charge Jinx, fishbones Kayle, righteous fury Kennen, electric surge Lulu, pix Orianna, clockwork windup Vayne, silver bolts


Why do the trolls turn to stone in daylight?

I've been watching The Hobbit Extended Edition, and saw the scene where the dawn light inundated the three trolls, who promptly turned to stone. What I have to wonder is, why do the trolls turn to stone when exposed to sunlight? I'm aware that not all do so, but why these ones? Is it something to do with their origins or nature?


What determines SPECIAL inheritance in children?

In Fallout Shelter you're able to make babies when you assign a male and female dweller to a residential area. When the babies are born, what determines the SPECIAL stats? It seems to be somewhat influenced by their parents, but there seem to be other variables. I want to breed children with high SPECIAL scores.


Hide section number but keep in table of contents

I want to hide a section number in the headings of section like this:  \section*{Abstract}   Turns out if I put an asterisk in the section command like this, the number is not present in the heading and also there is no entry  in the table of contents, but I want the heading to remain in the table of contents. How to do this.  Thanks


"Leave a comment" link even when you can't

On  I disabled  comments for "USDCAD options vs CADUSD options arbitrage?", but it  still has a "Leave a Comment" link.   Clicking the link takes you to    where it, of course, shows that you can't leave a comment.   The timeline page correctly does not show the 'comment' link:    How to fix?


Irreducibility of $p(x)=x^4-4x^2+8x+2$ over $\mathbb{Q}(\sqrt{-2})$- Dummit Foote Abstract algebra $9.4.10$

Question is :     Prove that the polynomial $p(x)=x^4-4x^2+8x+2$ is irreducible over the quadratic field $F=\mathbb{Q}(\sqrt{-2})$. [Hint : first use the method of proposition $11$ for the U.F.D $\mathbb{Z}[\sqrt{-2}]$(cf.Exercise $8$, Section $8.1$) to show that if $\alpha \in \mathbb{Z}[\sqrt{-2}]$ is a root of $p(x)$ then $\alpha$ is a divisor of $2$ in $\mathbb{Z}[\sqrt{-2}]$ . Conclude that $\alpha$ must be $\pm 1,\pm \sqrt{-2}$ or $\pm 2$ and hence show that $p(x)$ has no linear factor over $F$. Show similarly that $p(x)$ is not the product of quadratics with coefficients in $F$.]   What I have done so far is :  Suppose $\alpha \in\mathbb{Z}[\sqrt{-2}]$ is a root of $p(x)=x^4-4x^2+8x+2$ we would then have :  $p(\alpha)=\alpha^4-4\alpha^2+8\alpha+2=0\Rightarrow 2=\alpha(-\alpha^3+4\alpha-8)$  i.e., $\alpha$ is a divisor of $2$ in $\mathbb{Z}[\sqrt{-2}]$.  so, I have used the method of proposition $11$ for the U.F.D $\mathbb{Z}[\sqrt{-2}]$(cf.Exercise $8$, Section $8.1$) to show that if $\alpha \in \mathbb{Z}[\sqrt{-2}]$ is a root of $p(x)$ then $\alpha$ is a divisor of $2$ in $\mathbb{Z}[\sqrt{-2}]$  I do not understand why does he mentioned that $\mathbb{Z}[\sqrt{-2}]$ is U.F.D and all... I do not use that at all... It is unnecessarily confusing me or i am unnecessarily getting confused.. hint is actually misleading me :(  Now, I have to prove that $\alpha$ must be $\pm 1,\pm \sqrt{-2}$ or $\pm 2$  i.e., suppose I have $2=ab$ in $\mathbb{Z}[\sqrt{-2}]$ then, $N(2)=N(ab)\Rightarrow 4=N(a)N(b)$   i.e.,$N(a)=1\text{ or }2\text{ or } 4$ i.e., $p^2+2q^2=1\text{ or }2\text{ or } 4$ for $a=p+\sqrt{-2}q$   $p^2+2q^2=1\Rightarrow p=\pm 1 \Rightarrow a=\pm 1$ $p^2+2q^2=2\Rightarrow q=\pm 1\Rightarrow a=\pm\sqrt{-2}$  $p^2+2q^2=4\Rightarrow p=\pm 2\Rightarrow a=\pm 2$    Once I prove that those are the only divisors then I would consider :    $p(1)=(1)^4-4(1)^2+8(1)+2\neq 0$ $p(-1)=(-1)^4-4(-1)^2+8(-1)+2\neq 0$ $p(\sqrt{-2})=(\sqrt{-2})^4-4(\sqrt{-2})^2+8(\sqrt{-2})+2\neq 0$ $p(-\sqrt{-2})=(-\sqrt{-2})^4-4(-\sqrt{-2})^2+8(-\sqrt{-2})+2\neq 0$ $p(2)=(2)^4-4(2)^2+8(2)+2\neq 0$ $p(-2)=(-2)^4-4(-2)^2+8(-2)+2\neq 0$   So, no divisor of $2$ is a root..  Thus $p(x)$ do not have a root in $\mathbb{Z}[\sqrt{-2}]$  suppose I have something like :  $$x^4-4x^2+8x+2=(x^2+ax+b)(x^2+cx+d)=x^4+(a+c)x^3+(b+d+ac)x^2+(ad+bc)x+bd$$  But then, $bd=2\Rightarrow \text { b,d  are  a divisors of 2 in $\mathbb{Z}\sqrt{-2}$}$  But then we have seen that only divisors of $2$ in $\mathbb{Z}\sqrt{-2}$ are $\pm 1,\pm \sqrt{-2}$ or $\pm 2$  So, only possibilities are   $x^4-4x^2+8x+2=(x^2+ax\pm 1)(x^2+cx\mp 2)$ $x^4-4x^2+8x+2=(x^2+ax\pm \sqrt{-2})(x^2+cx\mp \sqrt{-2})$   But these are not possible...  This only tells that $p(x)$ is irreducible in $\mathbb{Z}[\sqrt{-2}]$ but then how do i show this is irreducible in $\mathbb{Q}(\sqrt{-2})$ I was expecting gauss lemma to help but it only works for integers and rationals...  So, please help me to clear this..  Thank you...   P.S : Proposition $11$ is Rational root theorem and Exercise $8$ is that ring of integers of $\mathbb{Q}(\sqrt{-2})$ is an Euclidean domain.


Are there finitely or infinitely many integers n for which $φ(n) = 1000$? I think that there are finite, but I don't know how to prove it.


Where can I find a place to upload m applets?

Good afternoon!  I am in a beginner java class and am currently learning about making applets. Chrome is not letting me run them locally (they do run in appletviewer no problem) and I would like to test them out in a proper browser.  Can anyone guide me to where I may be able to find free web hosting? It doesn't have to be anything fancy, it can have all the adds it wants, I am just looking for somewhere I can test stuff out.  p.s. It is my first time asking something in this forum, please excuse any ignorance I still have.


I am using Ubuntu 15.04. Where can I get the Miktex for this platform ?. I could not find in any Ubuntu software sources.


Proper way to create logins on Always on

What is the proper way to create logins on Always on? An application database  requires an active directory login and I created that on the primary node. The database is still not in the availability group  yet. I plan to move it there once the application is installed. Do I need to create the same login on the secondary node as well ? Or would the login sync across the secondary node once the database is moved into the AG? The only permission which was requested was db_owner . Are there any other permissions which I need to give to the login to properly work within the availability group ? Please let me know. Thanks !


What's the point of hard drives reporting their physical sector size?

I have an SSD that can be configured to report its physical sector size to an OS in two different ways:  Option 1: Logical = 512 Bytes, Physical = 512 Bytes  Option 2: Logical = 512 Bytes, Physical = 4096 Bytes (4K)  What benefit does an OS gain by being aware of the 4K physical sector size, considering:   The OS must talk to the drive in 512-byte sectors regardless All modern OSes align to 4K and utilize 4K or multiples of 4K I/O regardless   The setting seems pointless, because modern OSes are already optimized for 4K sector drives. Modern OSes don't need to "ask" a drive whether its sectors are 512b or 4K, because the OS does everything in a 4K-friendly way by default.  For example, Windows 7 aligns partitions to 1MB (a multiple of 4K), NTFS cluster size is 4K or multiple thereof, and all I/O is done in 4K or multiple thereof. Windows doesn't give a damn what hard drive you have, it will apply the above behavior in all cases.  Anyway... my SSD has this "physical sector size" setting and so it must be there for some good reason... it's the reason for this I'm looking for.  BTW, for what it's worth, the drive is an . The drive's  says this (page 27):     By using SCT command 0xD801 with State=0, Option=1, ID Word 106 can be changed from 0x6003 to 0x4000 (4KB physical sector size to 512B physical sector size support change).


UNO Stacking a Draw 4 Card instead of picking up 4 cards?

Need clarification on the Draw 4 rule. - Player 1 lays down a Draw 4 Card and says the color is Red. - Player 2 does not have a Red card but has a Draw 4 Card. Can Player 2 lay down his Draw 4 Card and have Player 3 draw 8 cards?


How to get url_for() to recognise the correct function in python flask?

I've written a decorator for flask:  def requires_permission(permission):     def decorator(function):         def decorated_function(*args, **kwargs):             if not current_user.is_authenticated:                 return redirect('/auth/login')             elif not getattr(current_user.permissions, permission):                 return "you need to be an admin", 401             else:                 return function(*args, **kwargs)         return decorated_function     return decorator   This is used to decorate routes i.e.  @bp.route('/') @requires_permission('admin') def dashboard(company=None):     return "Hello, World!"   This all works exactly as it should but now when I try to access the route via:   return redirect(url_for('main.dashboard', company = company))   it fails to find the route. I believe its because my decorator is hiding the underlying function, if accessed via the URL all works as expected.  Any help would be great in how to expose the underlying procedure correctly.  Thanks


Table of contents spacing with \addcontentslin{toc}

How do I increase the spacing between the numbering and the text in the table of contents? Note that I am using the article class and use \addcontentsline{toc}.    Code:  \documentclass[12pt]{article}  \newcounter{chapternum} \newcounter{examplenum}  \newcommand{\example}{\stepcounter{examplenum} \noindent{\large{\color{Red}{Example \theexamplenum: }}}\addcontentsline{toc}{subsubsection}{Example \theexamplenum}} \renewcommand\thesection{\thechapternum.\arabic{section}} \renewcommand\thesubsection{\thesection.\arabic{subsection}}  \begin{document} \stepcounter{chapternum}  \tableofcontents %Ignore the page numbers; the picture is a screenshot from my document and this code is a MWE.  \section{Sets}  \subsection{Introduction to Sets}  \subsection{Union and Intersection}  \example  \subsection{Special Sets}  \subsection{Interval Notation}  \example  \end{document}


Cancel sending a message to group in WhatsApp

I mistakenly pasted a message in a WhatsApp group. I noticed that immediately and turned off my internet. The message was still not sent (single tick did not appear), and I deleted that message and turned on the internet.  Will this stop the message from getting sent to the group?


Does a bounty get awarded to the oldest answer or most recently edited answer?

When a bounty is automatically awarded, it goes to the first answer. Is this still the case when an answer was older, but was edited more recently by the original answerer than a newer answer with the same score?


How do I insert a Select Max from another table

This is the code I have and I am not sure why it doesnt work  Insert INTO TEventGolfers (intGolferID, intEventID)      Values((Select MAX(intGolferID) From TGolfers),4)   I want to insert 4 as the EventID and the max golfer id from the table TGolfers as the foreign key golfer id in the EventGolfers Table


What is the best way to ensure only one instance of a Bash script is running?

What is the simplest/best way to ensure only one instance of a given script is running - assuming it's Bash on Linux?  At the moment I'm doing:  ps -C script.name.sh > /dev/null 2>&1 || ./script.name.sh   but it has several issues:   it puts the check outside of script it doesn't let me run the same script from separate accounts - which I would like sometimes. -C checks only first 14 characters of process name   Of course, I can write my own pidfile handling, but I sense that there should be a simple way to do it.


How to Middle Align a vertical oriented text in Tables

This picture is a part of a table i am using, the terms subcases are vertically written but i cant center them vertically also in the next columns terms like A, B, etc are also not vertically centered. I made this table using tabulary package a. My code is  \begin{table}[H]  \centering  \caption{Saturation Table}  \label{tab:5}%  \begin{tabulary}{1\linewidth}{J J J J J J J J J J J J J}  \toprule  & \textbf{Method} & \multicolumn{1}{c}{\textbf{Parameters}} & \textbf{Step 0} & \textbf{Step 1} & \textbf{Step 2} & \textbf{Step 3} & \textbf{Step 4} & \textbf{Step 5} & \textbf{Step 6} & \textbf{Step 7} & \textbf{Step 8} & \textbf{Step 9} \\  \midrule  \multirow{4}[4]{*}{\begin{sideways}\textbf{Subcase A}\end{sideways}} &  \multirow{2}[2]{*}{\textbf{A}} & \textbf{No} & 1 & 2 & 3 & 4 & 5 & \textbf{6} & & & & \\[1mm]  & & \textbf{Maximum Saturation {(\%)}} & 1 & 2 & 3 & 4 & 4 & \textbf{5} & & & & \\  \cmidrule{2-13} & \multirow{2}[2]{*}{\textbf{B}} & \textbf{No} & 1 & 2 & 3 & 4 & 5 & 6 & 7 & \textbf{8} & & \\[1mm]  & & \textbf{Maximum Saturation {(\%)}} & 6 & 6 & 7 & 8 & 9 & 9 & 19 & \textbf{8} & & \\  \bottomrule  \end{tabulary}%  \end{table}%


I want to color a terrain according to how steep the slope is at each point. I've read . If I could generate a new surface that is the gradient of my terrain (such that height of the new surface corresponds to slope in the original), then I could create that height-based material and apply it to the the original terrain. Is this feasible? Is there a better way to create a slope-based material?


Problem with supervised classification (using GRASS)

So I was playing with supervised classification with GRASS. The first issue that I ran into was right after the first two steps of classification (v.to.rast and i.gensig) which was:     unable to read signature file   Now that is an issue I've been searching the last 2 days. Is there a practical answer to that?


The nice Veritasium video about a wind-powered vehicle that can go downwind faster than the wind itself

Today Derek Muller posted a video about a  that can go downwind faster than that downwind itself. The vehicle is custom made for that case only: the case of going straight downwind. The vehicle has three wheels, I estimate about 5 meters from front wheel to back wheels, and and a two-bladed propellor is mounted about 5 meters up. The mechanical connection between the propellor and the wheels is such that when the vehicle is rolling forward the propellor is moving air from the front of the vehicle to the rear of the vehicle. The vehicle is as lightweight as possible for its size, so it's quite flimsy. This is definitely not a practical device, it is a proof-of-concept device.  In the video Derek himself indicated that he was not quite confident that he understood the physics of it. I anticipate that questions will start coming in on physics SE, so I present this case as a self-answer. How can this vehicle, when going straight downwind, go faster than the wind itself? Previous question about that vehicle:


I've got the following problem: I had a ssd (sda) with windows 8 installed. Now I added another ssd (sdb) and installed ubuntu 14.10 on it, but I didn't create a efi partition and installed to sda. So after the installation completed, I could only start ubuntu. After that I tried to reinstall ubuntu with the boot manager installed to an efi partition on sdb, but this failed and now i can't boot in any system. So my question is, how can I restore the windows installation/bootloader.  Thank you in advance


Are the epsilon numbers the ones greater than $\omega$ unreachable from below with exponentiation?

Let $\varepsilon$ be an epsilon number, i.e., an ordinal such that $\omega^{\varepsilon} = \varepsilon$. Is it true that then, for each pair $\alpha,\beta$ of ordinals, with $\alpha,\beta < \varepsilon$, we have $\alpha^\beta < \varepsilon$?  Does the converse also hold? If $\varepsilon$ is an infinite ordinal unreachable from below with exponentiation, is it an epsilon number?  I suspect this is the case (I haven't seen it written anywhere) but I'm having trouble to prove it. Ordinal exponentiation doesn't behave so nicely.  If there exist $\alpha, \beta < \varepsilon$ with $\alpha^\beta = \varepsilon$, we can show that the Cantor Normal Form of $\varepsilon$ has at least two terms, but I don't know what to do if we have $\alpha^\beta \geq \varepsilon$...


How do I make A* agents avoid other agents?

I'm implementing a multi agent A* algorithm on a tile map. Agents move only in the X and Y axes. I avoid collisions between them by checking where the others are when calculating paths.  It works fine except the situation where agents have to pass the same tile from different directions. In situations like this, an optimal solution would be for one agent to wait for the other to pass:    Also, if there's no northern corridor, then pathfinding fails.  How could I implement such an algorithm?


Is it necessary to call SDL_Quit() at the end of the game? Doesn't C/C++ handle all the variables destruction and memory freeing at the end of a program?


Why can't I get player heads in Minecraft on the Xbox One?

I play on Xbox One, and I do commands to give heads, like  /give @s skull 1 3{SkullOwner:MrCrainer}, but it doesn't work. (MrCrainer was a real player example.)  I don't use internet on Xbox, because it'll force an update that won't work. I have 1.14.


Grant sudo rights to binary without entering password

I've got some binary in /usr/bin. (brightlight, in my case). It changes screen brightness, but needs sudo rights to work. I want to bind it to shortkey, so I can't really enter my password every time I use it. How can I grant sudo to binary "by default", so next time I ran it it would be ran as root without entering the password?


Variable will not stay set after being modified inside of a PIPE while loop

I was writing a script, and ran into a problem where my variable will not stay set when I modify it from inside of a | while loop.  To illustrate, I wrote this example:  #!/bin/bash  thevar="Foo"  grep "somestring" testfile.txt | while IFS= read -r line; do     thevar+=" bar"     echo "The var is now: $thevar" done  echo+="But as soon as we get out of the while,the var goes back to $thevar"   Which outputs:  The var is now: Foo bar But as soon as we get out of the while,the var goes back to Foo   Why is this happening, and what can I do to keep my variable?


Space needed for expansion of the Universe

I realise that the universe is expanding, but doesn't it need more space to expand into? Is there some space outside our universe where the universe can expand? But if there is, doesn't it prove that the universe is not the whole thing? In fact, nothing can be because, according to our knowledge, everything is expanding.


I faced with this error || java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference

I write this UserAdapter class, I don't know really what is wrong. I faced with this error  java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference  public class UserAdapter extends RecyclerView.Adapter<UserAdapter.UserHolder> {     private Context mContext;     private List<User> mData;      public UserAdapter(Context mContext, List<User> mData) {         this.mContext = mContext;         this.mData = mData;     }      @NonNull     @Override     public UserHolder onCreateViewHolder(ViewGroup parent, int viewType) {         View view;         LayoutInflater inflater = LayoutInflater.from(mContext);         view = inflater.inflate(R.layout.item_user,parent,false);         return new UserHolder(view);     }      public void onBindViewHolder(@NonNull UserHolder holder, int position) {         holder.tv_email.setText(mData.get(position).email);     }      @Override     public int getItemCount() {         return mData.size();     }       public static  class UserHolder extends  RecyclerView.ViewHolder{         TextView tv_email;         public UserHolder(View itemView) {             super(itemView);             tv_email = itemView.findViewById(R.id.txtemail);         }     } }


The class of cardinal numbers is well ordered

I'm looking for a proof that the class of cardinal numbers is well ordered under the order relation $|A|\leq |B| \Leftrightarrow$ exists an injection $f:A \to B$.  In fact, I've found a very beautiful proof in an article, but I think it's not the standard one.


Common data-based variable selection procedures (for example, forward, backward, stepwise, all subsets) tend to yield models with undesirable properties, including:   Coefficients biased away from zero. Standard errors that are too small and confidence intervals that are too narrow. Test statistics and p-values that do not have the advertised meaning. Estimates of model fit which are overly optimistic. Included terms which can be meaningless (e.g., exclusion of lower-order terms).   Yet, variable selection procedures persist.  Given the problems with variable selection, why are these procedures necessary?  What motivates their use?  Some proposals to start the discussion....   The desire for interpretable regression coefficients? (Misguided in a model with many IVs?) Eliminate variance introduced by irrelevant variables? Eliminate unnecessary covariance/redundancies among the independent variables? Reduce the number of parameter estimates (issues of power, sample size)   Are there others?  Are the problems addressed by variable selection techniques more or less important than the problems variable selection procedures introduce?  When should they be used?  When should they not be used?


Ubuntu 13.04 doesn't automount razr d1 mtp

My Ubuntu 13.04 is not auto-mounting my Motorola Razr D1. I have installed mtpfs with no luck.  What else should I do to be able to mount and copy my awesome MP3 files in it?  Thanks!


When is $\Bbb{Z[\zeta_n]}$ a PID?  I was just wondering if $\Bbb{Z[\zeta_n]}$ is PID or not where $\zeta_n$ is $n$th primitive root of unity for arbitrary positive $n$


Will the command `script /dev/null` stop or affect the running applications and server?

I can login to the server terminal with username and password. But I can't run the screen command. It says Must be connected to a terminal while I ran this screen -R newNodeServer.   I found an answer at , but if I run the command script /dev/null according to that answer, will the running server, websites, and applications be affected?   I am going to run some artisan commands for Laravel in screens. Such as php artisan queue and php artisan websockets:serve


As I learnt freq. observed by a observer from a moving source is given by $$f=f_0(1+v_s/v)^{-1}$$ If $$v_s=-v$$ f is infinity.Whats going on? Will Doppler effect will be observed if the source say is a fighter plane moving at mach 1 towards observer? My intuition is that Doppler effect is not observed am I correct?


How can I find the surface area of a normal chicken egg?

This morning, I had eggs for breakfast, and I was looking at the pieces of broken shells and thought "What is the surface area of this egg?" The problem is that I have no real idea about how to find the surface area.    I have learned formulas for circles, and I know the equation for an ellipse; however, I don't know how to apply that.   The only idea I can think of is to put an egg on a sheet of paper and trace it, and then measure the outline drawn, and then try to find an equation for that ellipse and rotate that about the $x$-axis.  Now, my problem is how I can find the equation of the ellipse from the graph, and will my tracing method really be the edge of the egg?  Also, can I use the ? Will I have to use some techniques to solve the integral that are not covered in the ?  There has to be a better method for finding the surface area. Please, help me understand how to find the surface area of an egg; i.e., how to use my mathematical knowledge for something other than passing exams.


I'm currently stuck on an exercise where I need to show that if $(M,d)$ and $(N,\rho)$ are metric spaces, then $d_2((a,x),(b,y)) := \sqrt{d(a,b)^2 + \rho(x,y)^2}$ defines a metric on $M\times N$. I've already shown that the basic criteria of a metric are met, but I still need to show that the triangle ineqaulity holds.  I've tried using the triangle inequality on $d$ and $\rho$ and estimating the square root with $\sqrt{a^2+b^2}\leq a+b$, but regardless of which order I've used them in, I seem to overestimate my target. I thought maybe I somehow need to use Cauchy-Schwarz, but I don't know how.


Regex javascript result different than expected

I have this regex   var reg = new RegExp('["\\>]{1}\\$([^"\\<\\> ]*)["\\<]{1}', 'g');   That I run on this string  '$name'   If I test it on sites like  it works properly but if I test it in FireFox     var reg = new RegExp('["\\>]{1}\\$([^"\\<\\> ]*)["\\<]{1}', 'g'); var match = reg.exec('$name'); console.log(match);     It only matches ">$name<". How to have it catch all like on the site?  This is not a duplicate. i'm not working with query strings, beside it works online of the site.


Let $X,Y,Z$ Banach spaces and $A:X\rightarrow Y$ and $B:Y\rightarrow Z$ linear maps with $B$ bounded and injective and $BA$ bounded. Prove that $A$ is bounded as well.   If I knew that $B(Y)$ is closed I'd have a bounded linear map $B^{-1}:B(Y)\rightarrow Y$ by the bounded inverse theorem. Therefore $A=B^{-1}BA$ is bounded. How to prove the claim if $B(Y)$ is not closed.


Dual boot with Windows 7 & Ubuntu 16.04 LTS

I have a HP Elite book 840G3 laptop with Windows installed in the primary drive and Ubuntu installed in the second drive. What is to be done to get to pick the operating system option on starting up.   Right now I press Esc on startup and pick the needed drive from the BIOS Boot Menu screen.


What percentage of the population is magical in Pathfinder's world of Golarion?

This is kind of a variant of this  question. However, I'm looking for any specific rules regarding the basic math around spells and the availability of magic users.  Pathfinder's Golarion setting seems to be filled with inconsistencies centered around economy and magic. We're finding this very specifically in the Kingmaker campaigns, where a whole host of things just "don't add up".  The key problem seems to center around one very simple question.   How rare are spellcasters? Are they one in a million? one in a thousand? The obvious corollary, how much rarer are high level spell casters?   Are there any books investigating these ratios and their effect on a given world?


Do full frame sensors gather more light than crop sensors?

Lots of people say that full frame sensors receive more light than cropped sensors. I have never found a proof of this claim so I tried to do the computation by myself, and proved the contrary! Could you tell me if I am wrong ?  We want to compare the same frame with the same depth of field. I'm not concerned by the quantity of photons by photosite, which is unrelated to sensor size but to the density of pixels. I have neglected effects like vignetting or angle effect on the edge of the micro-lens array. Here is my simple reasoning :  If you want the same  α~2arctan(size/2f) with a full-frame sensor and a crop sensor with crop ratio c, you have to multiply the focal length by approximately c. Now, in order to maintain the , the f-number N have to be divided by c. If we measure the "amount of light" with the well defined  Ev provided by the same frame of the same scene (so the  is fixed), we have Ev ~ f/N.  Putting all together, Ev_crop = Ev_ff x c², so the cropped sensor receive more light than the full frame sensor !  For those who are interested in the price of two equivalent systems, one with a FF+50mm+135mm and the other with Crop+35mm+85mm, see this .


I am trying to create a website and up the SEO rating for rocket-media.co.uk. The company covers a lot of different design, print, exhibition and digital services. They currently have a one-page site but after some tips from a previous post I am thinking of making it into multi-page site and wanted to check that there is a benefit to having mutli-pages over one page/  I also had an idea of multi subdomains and wanted to know if subdomains are better or worse for SEO. So for example print.rocket-media.co.uk, design.rocket-media.co.uk rather than a print and design page within rocket-media.co.uk.  Thanks for any guidance.


Reputation has freezed for quite some time

It seems my reputation is not increasing even after I did some edits on some questions and answers recently.  I don't see any increase in my reputation even after the edits that were proposed and approved.  Here's my reputation tab:    Here's my latest activity (suggestions I made):    Is it likely to be solved recently? Or, is it just occurring with me?


I need to recover my SQL Server 2008 user/pwd.   The situation is: I don't know the SA password and Windows Authenticated user is no longer active user (disable user because the user has left job) so I can not log in using Windows authentication.  Is there anyway to reset the sa password, Windows authentication and to log in to the database?  Last option could be uninstall and install again. In this case data will be lost.  Thanks,


I have a bunch of images on one page and I am using the following to trigger an event:  $('.img').on('mouseover', function() {  //do something  });   Is there some way to add a delay such that if a user hovers for maybe 1 second, then it does "//do something" or actually triggers the "mouseover" event?


Show that a 2x2 matrix A is symmetric positive definite if and only if A is symmetric, trace(A) > 0 and det(A) > 0

I need to show two parts of the implication are true.  First: if $A$ is $2\times 2$ and is symmetric positive definite then $trace(A)>0$ and $\det(A)>0$.  Second: if $trace(A)>0$ and $\det(A)>0$ then $A$ is symmetric positive definite.  For the first part I was thinking: $A$ is symmetric and positive definite then $A$ has its eigenvalues positive. If $A$ is $2\times 2$  then characteristic polynomial of $A$ is  $x^2−x.trace(A)+\det(A)=0$  If we compute the discriminant we get $(tr(A))^2 ≥ 4.\det(A)$  Now $tr(A)$ is squared so it is positive. How do I know that $\det(A)$ is also positive?  After copper.hat's response we argue that the eigenvalues of A are all positive because $A$ is spsd and the $\det(A)$ is the product of its eigenvalues. Thus $\det(A)$ is strictly positive.  Now, how do I verify the second part?  Thanks.


Does an Antimagic Field spell block class features?

The Antimagic Field spell mentions the following:     Spells and other magical effects, except those created by an artifact   or a deity, are suppressed in the sphere...   Does this include magical class features?  Example: A Transmutation Wizard's 6th level feature is the Transmuter's Stone, which mentions:     Starting at 6th level, you can spend 8 hours creating a transmuter’s   stone that stores transmutation magic. You can benefit from the stone   yourself or give it to another creature. A creature gains a benefit of   your choice as long as the stone is in the creature’s possession.   The Antimagic Field spell has specific mentions about  Magic Items:      The properties and powers of magic items are suppressed in the sphere.   Object:      A creature or object summoned or created by magic temporarily winks   out of existance in the sphere.   So, if someone holding a Transmuter's Stone finds himself inside an Antimagic Field, does he retain the benefit granted by the stone? Does he temporarily lose it? Does the stone wink out of existance while inside the sphere?  Similarly if you are an Enchantment Wizard, can you use your Hypnotic Gaze?     Starting at 2nd level when you choose this school, your soft words and   enchanting gaze can magically enthrall another creature.   Does an Abjuration wizard's Arcane Ward remain functional within the sphere assuming it was created outside or does it stop working until the wizard leaves the range of the spell?  This question is not only about the above mentioned class features or just wizard features but generally whether or not an Antimagic Field spell affects class features and if yes, how to determine which ones are affected?


CSS margin getting 'ignored' when I set the padding of the parent element to zero?

I'm writing a Terms of Use page using , which is contained within a card-panel. I find that 'as-is', the spacing at the top is too much:    Here, the margin-top of the h4 element get added to the padding of the containing card-panel, which is 24px. I think the former is actually sufficient spacing by itself from the top of the shadowed box, so I tried setting padding-top of this card-panel to zero using the following SCSS rule:  .lucy-terms {   .card-panel.lucy-card-panel {     padding-top: 0;   } }   However, with this enabled, I find that the spacing becomes too small:    When I highlight it, it seems like the margin-top of the h4 element falls outside the box. Shouldn't the margin of the element fall within the containing element? How can I fix this?  I've included the relevant snippet below.    body {   background-color: #f3f3f3; }  .card-panel.lucy-card-panel {   padding-top: 0; }              <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/css/materialize.min.css">

Terms of Use

PLEASE NOTE THAT YOUR USE OF AND ACCESS TO OUR SERVICES (DEFINED BELOW) ARE SUBJECT TO THE FOLLOWING TERMS. IF YOU DO NOT AGREE TO ALL OF THE FOLLOWING, YOU MAY NOT USE OR ACCESS THE SERVICES IN ANY MANNER.

Effective date: April 2, 2018


How to convert 4-channel PNG files to grayscale geoTIFFs?

I suspect that there exists a gdal tool (gdal_translate?) that will convert a 4-channel PNG (+ world file) to a 1-channel (gray-scale) geoTIFF.  From the gdal_translate man page, it appears simple to go in the other direction, i.e. to expand a monochrome raster to a 3 or 4-channel image, but I can't figure out how to go from many channels to one.  If not gdal (hardly conceivable), then another *nix command-line tool?


Is complex conjugation needed for valid inner product?

What are the benefits of using a conjugate linear inner product in a complex vector space vs a simple linear inner product?  That is, why do we demand that $(y,x) = \overline{(x,y)}$ as opposed to $(y,x)=(x,y)$?  Of course, this ensures that $(x,x)$ is real and thus makes an easy definition of norm, but is that necessary?


Is there a solution to fetch data from 2 tables without left join?

I have this problem, which it's keeping me out of focus from the main project on Laravel. I have 2 tables without any fk on them TableA: id(INT) Name(VARCHAR) EventId(INT) PlayerChoiceId(INT)  and TableB: id(INT) PlayerChoice(VARCHAR) PlayerColor(VARCHAR)  I need to make a method on my controller to select all of the data from TableA with the PlayerChoice value, not the id from TableB, but without LEFT JOIN. Example: id(TableA)|Name|EventId|PlayerChoice


Serve a static page if the backend is down

Apache is acting as a frontend to another (Rails) server that is responsible for handling the requests. How can I make Apache return a static maintenance page when the backend is down (or unreachable in the past minutes)?  The current Apache configuration is basically  RewriteRule  ^/(.*)$   http://backend.example.net:9002/$1  [P,L] ProxyPassReverse /     http://backend.example.net:9002/


cannot run perl program: Can't locate Time/Piece.pm in @INC with perl5.8.4 and Can't locate DBI.pm in @INC with perl 5.12.3

I have Solaris 10,i am trying to run a Perl program.  I have two perl versions installed:  /usr/bin/perl of version 5.8.4  and   /usr/local/bin/perl of version 5.12.3  I have installed the DBI package (it got installed here, /usr/perl5/site_perl/5.8.4/sun4-solaris-64int/auto/DBI/.packlist),the problem I get by executing the Perl program with different perl version is (In ubuntu its working fine).  bash-3.00# perl temp.pl Can't locate Time/Piece.pm in @INC (@INC contains: /usr/perl5/5.8.4/lib/sun4-    solaris-64int /usr/perl5/5.8.4/lib /usr/perl5/site_perl/5.8.4/sun4-solaris-64int /usr/perl5/site_perl/5.8.4 /usr/perl5/site_perl /usr/perl5/vendor_perl/5.8.4/sun4-  solaris-64int /usr/perl5/vendor_perl/5.8.4 /usr/perl5/vendor_perl .) at     temp.pl line 4. BEGIN failed--compilation aborted at temp.pl line 4.  bash-3.00# /usr/local/bin/perl temp.pl Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib/perl5/site_perl/5.12.3  /sun4-solaris /usr/local/lib/perl5/site_perl/5.12.3 /usr/local/lib/perl5/5.12.3/sun4-  solaris /usr/local/lib/perl5/5.12.3 /usr/local/lib/perl5/site_perl .) at temp.pl line5. BEGIN failed--compilation aborted at temp.pl line 5.  I have tried hell lot of ways but not getting how to run my Perl program on solaris. Could anybody help please.  Below is my program. In fact it was redefined by @Borodin. Thanks a lot to him.  use strict; use warnings;  use Time::Piece; use DBI;  open my $log, '<', '/opt/testlogs/test.log' or die "Unable to open log file: $!";  my ( $count_start, $count_interim, $count_stop ) = ( 0, 0, 0 );  while (<$log>) {      if (/server start/) {         $count_start++;     }     elsif (/server interim-update/) {         $count_interim++;     }     elsif (/server stop/) {         $count_stop++;     } }  print <<END; Start:   $count_start Interim: $count_interim Stop:    $count_stop END  print localtime->strftime("%b %e %H:%M:%S"), "\n";  my $dbh = DBI->connect( "DBI:Pg:dbname=postgres;host=localhost", "postgres", "postgres", { 'RaiseError' => 1 } );  my $rows = $dbh->do(     "insert into radius (server_start, server_stop, server_interim)        Values ($count_start, $count_stop, $count_interim)" );  printf "%d %s affected\n", $rows, $rows == 1 ? 'row' : 'rows';


Scala Optional Non-Capture Group acting Lazy?

I am not looking for a regex to match phone numbers. This is simply my use case. I want to know why my regex isn't including an optional non-matching group within the capture.  To better illuminate my specific use case, a bit of an introduction. I  am trying to match phone numbers. I have a working regex with the exception of when an extension is used.  My regex (a bit long, but comprehensive):  ((?:\+{0,2}\d{1,3})?[-.()\/* ]*?\d{3}[-.()\/* ]*?\d{3}[-.()\/* ]*?\d{4}[-.()\/* ]*?(?:(?:x|ext)[:]?[ ]*\d+)?)   A shortened version to illustrate my issue:  (\d{4}[-.()\/* ]*?(?:(?:x|ext)[:]?[ ]*\d+)?)   Where:  (...) is my capture group  \d{4} four digits  [-.()\/* ]*? various separators 0-infinite times (non-greedy)  (?:...) non-capture group  x|ext extension identifier  [:]? ":" 0-1 time  [ ]* " " 0-infinite times  \d+ digit 1-infinite times  (?:...)? non-capture group 0-1 time  So 1234 ext 567 should match, but only 1234 does  Regex101 link:   If I remove the ?, to make the group not optional it works just fine:  (\d{4}[-.()\/* ]*?(?:(?:x|ext)[:]?[ ]*\d+))   It seems like the ? is making it lazy but then also won't match numbers that do not have an extension.  Any help or insights would be greatly appreciated


How to Calculate center of mass for 20 dimensions particles

I have a problem with calculation the center of mass of 20-dimension particles, some thing like this: A = [1 6 8 54 6 8 5 4 8 9 6 4 7 9 6 6 3 8 43 9] , Mass = 0.25 B = [2 6 3 4 6 8 4 4 8 5 6 4 2 2 6 6 3 8 1 1] , Mass = 0.6 C = [4 3 4 53 6 2 5 21 8 1 6 2 37 2 6 2 3 1 43 9] , Mass = 0.05 Could anyone guide me to find the solution for center of mass in each dimension (x1, x2, ... x20)? Thanks


$G$ is a Group of order $pq$, if $G$ has exactly one subgroup of order $p$ and another with order $q$, then $G$ is cyclic ($p,q$ are prime)  Here's what I have so far, I'm not sure if it is correct.  Let $H, K$ be subgroups of $G$ $|H| = p$  $|K| = q$   We know that by Lagrange's Theorem:  $\forall a \in H : |a|=p$ where $a \neq e$ $\Rightarrow H = <a>$  Similarly: $\forall a \in K : K = <a>$  We also know that: $\forall a \in G : |a| | pq \Rightarrow |a| = p$ or $|a| = q$   $|a| = p \Rightarrow a \in H$ since there is exactly one subgroup of order $p$  $|a| = q \Rightarrow a \in K$ for similar reasons  This means every element in $G$ is either in $H$ or $K$, which are both cyclic. That means $G$ is cyclic.  What am I missing here? Have I made any mistakes and/or is the proof incomplete?


Why are newly animated Transformers always evil?

In the , common household electronics like cellphones, radios and blenders are often turned into Transformers when they come in contact with the AllSpark energy. Why are these new Transformers always evil, trying to shoot everything around them? Is there an in-universe explanation for this behaviour?


When should you use a normal flash vs a second-curtain flash?

There have been many questions lately that focus on improving the quality of the image taken, where the answers circle around using a second-curtain flash to reduce blur and freeze motion.  Why not use second curtain-flash all the time? Are there down sides to second-curtain flash?


Null Pointer Exception when using getText() function with JTextField

I was working on creating a container class for a JTextField object, but I keep running into trouble whenever I try to get the text in the text field.  class myTextField{ String defaultText; String currentText = ""; JTextField field; int xPos; int yPos; int xSize; int ySize;  myTextField(JFrame frame, String newDefaultText, int newXPos, int newYPos, int newXSize, int newYSize){     defaultText = newDefaultText;     xPos = newXPos;     yPos = newYPos;     xSize = newXSize;     ySize = newYSize;      JTextField label = new JTextField(defaultText);     frame.add(label);     label.setBounds(xPos, yPos, xSize, ySize); }  public void setText(String text) {     this.currentText = field.getText();     if(text == "") {         this.currentText = this.defaultText;     }     this.currentText = text; }  public String getText() {     System.out.println(field.getText());     this.currentText = field.getText();     return this.currentText;      } }   Whenever I use the getText() function of this class, it gives me this error:  Exception in thread "main" java.lang.NullPointerException at Examples.myTextField.getText(Example_312.java:182) at Examples.Example_312.updateFrame(Example_312.java:81) at Examples.Example_312.main(Example_312.java:49)   Unfortunately, that error isn't very descriptive, and so I'm having trouble finding what's going wrong in my code. I know it's failing when I call "field.getText();", but I don't know why. If someone could explain it to me, or offer a solution, I'd really appreciate it!


Derivative of the Root of a Positive Matrix

Suppose that the map $t \mapsto A(t)$ from some open subset of $\mathbb{R}$ to the set of positive matrices is differentiable. It is known that the map  $t \mapsto \sqrt{A(t)}$ is differentiable, where $\sqrt{A(t)}$ is the unique positive root of $\sqrt{A(t)}$ (and not the componentwise root of the matrix). I am looking for a proof of this fact and the expression of the derivative.


Imported obj file to blender is fully pink when rendering

Got a pack of models online which gives an obj and mtl file for each. When I import an obj file onto blender, the model looks fine but when rendered it's fully pink. Been looking around the web but haven't found a solution yet. Also tried going file-external data- find missing files but when I go to the respective file, it says there aren't any png files found for the textures. Thanks!


Proper usage of otherkeywords option in listings

I'm trying to understand how listings' otherkeywords option really works. The documentation says about it:     Defines keywords that contain other characters, or start with digits. Each given 'keyword' is printed in keyword style, but without changing the 'letter', 'digit' and 'other' status of the characters. This key is designed to define keywords like =>, ->, -->, --, ::, and so on. If one keyword is a subsequence of another (like -- and -->), you must specify the shorter first.   Furthermore, keywords are defined as a 'letter' followed by a sequence of 'letter' or 'digit' characters.  So let's look at an example.  \documentclass{article} \usepackage{listings} \usepackage{xcolor}  \lstdefinelanguage{mylang}{ %    alsodigit={<,>,-,*},     otherkeywords={<,>,-,<-,->,<->,<--,-->,***},     morekeywords=[1]{-},     morekeywords=[2]{<,>,<-,->},     morekeywords=[3]{<->,<--,-->,***} }  \begin{document} \lstset{     language={mylang},     basicstyle=\ttfamily,     keywordstyle=[1]{\color{red}},     keywordstyle=[2]{\color{green}},     keywordstyle=[3]{\color{blue}} }  \begin{lstlisting}   -                 red   < > <- ->         green   <-> <-- --> ***   blue \end{lstlisting} \end{document}     The output of the first line looks good, - should be treated as a class 1 keyword and be printed in red.  On the second line the confusion begins. < and > are correctly printed in green, but <- and -> aren't. The documentation (as noted above) says that keywords being subsequences of other keywords should be defined first. This is exactly what is done in the example code, the ouput is still wrong.  Even if listings would erroneously break up <- into < and -, I would expect the first < in <- to be printed in green. It's also printed in red, though, which is really confusing, because < never occurs in class 1.  The third line is also wrong, except for the *** keyword, which is probably because neither * nor ** occur as separate keywords.  If we don't skip over the first line in the otherkeywords description, especially the "or start with digits" part, changing <, > and - to 'digit' characters should satisfy all the conditions required by the documentation. However, adding alsodigit={<,>,-,*} makes no difference in the output.  Could anyone give more insights about what's going on here? I'm tempted to say this is a bug, or at least some extra information is missing in the documentation. Unfortunately, debugging macro expansion is too verbose to follow the exact procedure.


Reference numbers out of order using BibTex

I'm using natbib, cleveref, bibtex and .bib files to generate my references, using \cite{reference}. At first, it does it very well, but when a re-compiling is done---with the same commands---, the appearing number of the references changes, instead of having , it has . The code:  \documentclass[10pt,letterpaper,hidelinks]{book} \usepackage{hyperref} \usepackage{graphicx} \graphicspath{{figures/}} \usepackage[numbers,sort&compress]{natbib} \usepackage{cleveref}  \begin{document} \frontmatter \tableofcontents \listoffigures \listoftables  \bibliographystyle{unsrtnat}  \mainmatter \include{fileWithReferences}  \appendix  \backmatter  \bibliography{articles,reports,books}  \end{document}   Since running latex -> bibtex -> latex -> latex is time consuming at first run, how can I fix the 're-ordering'? The fileWithReferences.tex looks like:  \chapter{Energy}  Some text \cite{Turcotte2002}, some other text \cite{Anderson1989}. In \cref{figure:AltEn} there's a reference to a book.  \begin{figure}[!ht]     \centering     \includegraphics[scale=.1]{Alternative_Energies.jpg}     \caption{Alternative energies \cite{Anderson1989}}     \label{figure:AltEn} \end{figure}  Here another reference \cite{Turcotte2002}.   And the books.bib file looks like:  @book{Turcotte2002, author = {D.L. Turcotte and G. Schubert}, title = {Geodynamics}, year = {2002}, OPTedition = {2nd.}, }  @book{Anderson1989, author = {Don. L. Anderson}, title = {Theory of the Earth}, year = {1989}, }   Output (first run):    Output (second run):


I want to remove the border of the top left table cell (top-border and left border of this cell). My table looks like this:  \begin{table}[!ht]       \centering     \begin{tabular}{|c|c|c|c|}    \hline              &  Item1 & Item2 & Item3 \\ \hline     Group1 & 0.8 & 0.1 & 0.1 \\ \hline     Group2 & 0.1 & 0.8 & 0.1 \\ \hline     Group3 & 0.1 & 0.1 & 0.8 \\ \hline     Group4 & 0.34& 0.33& 0.33 \\ \hline     \end{tabular} \end{table}   Does somebody have a hint how i can do this?


I have Ubuntu 11.04 installed on my computer alongside Windows 7.  Is it possible to also dual-boot 12.04?  If not, will I need to overwrite the previous version of Ubuntu?. If so how can I do it?


Borders are missing when using multicolumn

I want to span a cell across two rows using multicolumn. This works but the borders are missing then.  \begin{tabular}{|c|c|}     \hline     \multicolumn{2}{c}{Multi-column}\\     X&X\\     \hline \end{tabular}   Why does multicolumn omit the borders and how do I get the borders?


scaling images in Illustrator to a known dimension in the image

I would like to scale a raster image inside Illustrator to a precise dimension - for example, a mechanical drawing with dimensions.  I can draw a precise length line over the dimension, but can I then scale the line and the image precisely to the desired length.  I realize I can do the math and use a scale percent, but I was wondering if there's a faster way.


We have a 120GB database. There was table with 60GB of data which is useless and we have truncated it.   Now database size is 120GB with free space 60GB. The database will not grow up to 60GB in at least 3 months. So can we shrink the data file.  Am aware of fragmentation issue. I can rebuild my index since our's is not a 24*7 database.   Please advice on shrinking MDF file


How to preserve image quality with reduced size in Adobe Photoshop PDF output

i'm a newbie in photoshop and i want to create a PDF output from my PSD file , the problem is when i set best settings in save as PDF i get a very good quality but the file is a little big about 8MB for the pdf ==> i don't know if the printer can print this file because it's take a time to get loaded in a pdf reader (adobe & foxit)   the second solution i have done is by choosing to save as pdf in minimal size i get less than 1 mb for the pdf but the image quality is terrible  update : the document that i'm working in is a CV/RESUME so i need to post it on the web for jobs interviews that way i need less size for the outputted PDF. Any hints ?  thanks .


Placement of caption in \chemfig via \chemname command - how to reset spacing

I'm trying to put a number of different molecule structures into one document with the help of the chemfig package. The package also allows to add the name of the compound to the structure as a caption via the chemname command. As far as I understand the distance of the label from the structure is measured by the package and to avoid overlaps the largest spacing found is used for all subsequent labels. This leads to the effect of a large distance if the following molecule structure is small.   Is there a way to reset the distance measured between the \chemname commands?  Thank you very much for your help and please also see the example code below.  Thomas  \documentclass{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage{chemfig} \begin{document} \chemname{\chemfig{-[7]-[1]P(=[2]O)(-[6]-[7])-[7]-[1]}}{Triethylphosphine oxide}  \chemname{\chemfig{-[1](-[2]OH)-[7]}}{Isopropanol}  \chemname{\chemfig{H_2N-[1](=[2]O)-[7]NH_2}}{Urea} \end{document}


Is it true that if every continuous real-valued function on a metric space is bounded, then that metric space is compact


shared user accounts across workstations

I run a small academic research group and we have 4 workstations and one server, all running Ubuntu. I would like to have login credentials that are shared across all workstations and the server, so I can issue a userid once, and the user could sit down at any workstation and login. Nominally, the filesystem would be shared so that the user could have their files/desktop environment at any workstation. Is there any way to set up such a environment?


Do I need a separate capacitor bypass for 74xx14 Schmitt Trigger sharing power with Op Amp?

Do I need a separate capacitor bypass (network) for 74xx14 Schmitt Trigger sharing power with Op Amp? Power supply is 500mA but entire circuit is using around 70-80mA.  And sub-circuit with OP AMP + Schmitt Trigger is between 1-3mA max.   Random interval pulses going every few seconds from Op Amp (1kHz~65kHz and 0-3.3Vpp) to Schmitt trigger and out to MCU input capture pin (10kOhm). Also, when I turn on the power, during the first 3-5 seconds the Op Amp's output spikes HIGH before settling down to a baseline of near 0V.  Any way to prevent that?  The sensor that connects to the Op Amp draws 40mA, but the signal of the sensor is below 1mA. The sensor does not have any bypass capacitor (network). Thank you.  EDIT:  The answer I would accept is in CL's comment/link to TI's specs that were not listed in the datasheet I looked:  "The power supply can be any voltage between the minimum and maximum supply voltage rating located in the table. Each VCC pin should have a good bypass capacitor to prevent power disturbance. For devices with a single supply, TI recommends a 0.1-μF capacitor. If there are multiple VCC pins, then TI recommends a 0.01-μF or 0.022-μF capacitor for each power pin. It is ok to parallel multiple bypass capacitors to reject different frequencies of noise. 0.1-μF and 1-μF capacitors are commonly used in parallel. The bypass capacitor should be installed as close to the power pin as possible for best results."


PGFplots foreach equivalent to TikZ's with multiple variables separated by a slash

I like TikZ's capability to traverse multiple variables separated by a slash in the foreach (as in the example below). I am looking for something equivalent in PGFplots? I saw in the documentation that say you can't nest the foreach in PGFplots as you can in TikZ, but that only make this kind of feature more important.    Two other small issues:    I like the \x notation so that is why I am using \pgfplotsforeachungrouped. Is there a reason why I should be using pgfplotsinvokeforeach instead?  Also, what is the correct syntax to be able to use a variable to define the list instead of having the actual list in the code. In the following I'd like to be able to reference \ListWithLabels in the foreach.    \documentclass{minimal} \usepackage{pgfplots}  \newcommand*{\ListWithLabels}{-2/a, -1/b, 1/c, 2/d} \newcommand*{\ListWithoutLabels}{-2, -1, 1, 2}  \begin{document} \begin{tikzpicture} \draw [->][gray, thin](-3,0) -- (3,0) node[blue, right] {$x$};  \draw [->][gray, thin](0,-3) -- (0,3) node[blue, above] {$y$};  %\foreach \x/\l in \ListWithLabels {  % works \foreach \x/\l in {-2/a, -1/b, 1/c, 2/d} {     \draw [thick, red]         (\x,-2pt) -- (\x,2pt)         node [red, above] {\l}; } \end{tikzpicture}  \begin{tikzpicture} \begin{axis}[     minor tick num=0, axis y line=center, axis x line=middle,      xmin=-3, xmax=3, ymin=-3, ymax=3, xlabel=$x$, ylabel=$y$,     xtick={0},  xticklabels={}     ]  %\pgfplotsinvokeforeach{-2, -1, 1, 2}{             % works %   \addplot [mark=none,color=red, thin, samples=2] %       coordinates{(#1,-0.05) (#1,0.05) }; %}  %\pgfplotsforeachungrouped \x in {\ListWithoutLabels}{  % does not work \pgfplotsforeachungrouped \x in {-2, -1, 1, 2}{    % works     \addplot [mark=none,color=red, thick, samples=2]%         coordinates{ (\x,-0.08) (\x,0.08) }; }   %\pgfplotsforeachungrouped \x/\l in {-2/a, -1/b, 1/c, 2/d}{ % does not work %   \addplot [mark=none,color=red, thin, samples=2]% %       coordinates{ (\x,-0.05) (\x,0.05) } %        node [red, below] {\l}; %}  \end{axis} \end{tikzpicture} \end{document}   Update: I saw  post which explains that the macro in TikZ needs to be not be sourrouned by {}. But that does not work for the PGF commands.  Here is another related post on


How do we calculate this sum $\sum_{n=1}^{\infty} \frac{1}{n(n+1)\cdots(n+p)}$?

I know that this sum $$\sum_{n=1}^{\infty} \frac{1}{n(n+1)\cdots(n+p)}$$ ($p$ fixed) converges which can be easily proved using the ratio criterion, but I couldn't calculate it.  I need help in this part.  Thanks a lot.