Say I have a spaceship, and I'm flying it through space at a constant high velocity V. The spaceship is pretty large (big surface area). In space however, there is cosmic dust scattered throughout (density of 10-6 × dust grain/m3 and mass 10-17 kg according to ). So therefore with high enough surface area and velocity, I would be hitting quite a few at really high speeds. Would this hitting impart heat energy on my spaceship? (my intuition says yes, but I'm really not sure why, I'd guess because of friction, or change in kinetic energy?) If so, how would you calculate how hot you would get?

Some (generous) assumptions:   We have a spaceship that can reach a reasonable fraction of light speed. The ship is able to withstand the high energies of matter impacting at that speed.   Given the amount of matter in inter-stellar space, at high speed, would it encounter enough of it and frequently enough that an aerodynamic shape would significantly reduce its drag (and thus save fuel)?


I have been following the solution given in the answer here:  However when I reboot the old swap is still in place.  $ free -h               total        used        free      shared  buff/cache   available     Mem:            31G        1.9G         27G        1.3G        2.3G         27G     Swap:          979M          0B        979M   I have a recommendation from VMWare Workstation to increase it to 4 GB.  $ cat /etc/fstab # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point>   <type>  <options>       <dump>  <pass> /dev/mapper/ubuntu--vg-root /               ext4    errors=remount-ro 0       1 # /boot was on /dev/nvme0n1p2 during installation UUID=daf8150f-9039-42e9-972b-873a1cc274d0 /boot           ext4    defaults        0       2 # /boot/efi was on /dev/nvme0n1p1 during installation UUID=5181-A887  /boot/efi       vfat    umask=0077      0       1 /dev/mapper/ubuntu--vg-swap_1 none            swap    sw              0       0   How do I do this?

I'm trying to add/modify a swap partition on my LVM-formatted hard disk by using GParted from a LiveCD.  I only see one big partition taking up the whole disk.    Is there a hidden swap?    Does an LVM-formatted system even need a swap?  I'm using Ubuntu 12.10.


I want to select Cube.001,Cube.002,Cube.003,Cube.004 at the same time. trying this script  bpy.data.objects["Cube.001","Cube.002","Cube.003","Cube.004"].select_set(state=True)   But is not working. What should i do to select this four objects ?

The following:  bpy.data.objects['Cube'].select = True  bpy.context.scene.objects.active = bpy.data.objects['Sphere.017']   don't work in Blender 2.8, they did in 2.79 though. How should I select (multiple) objects with Python in Blender 2.8?


Here is what I have got so far:   var module = 'Tiles'; var data = "/*-Tiles-*/ hello world /*-End-Tiles-*/ jhjhhdhdhshd shgsjs"; var pattern = '/\/\*(-'+ module +'-)\*\/([\s\S]*)\/\*(-End-'+ module +'-)\*\//g';  console.log(pattern); var cssGet = pattern.exec(data); console.log(cssGet[0]);     However when I try to add a variable inside the expression. I Receive an error saying that Uncaught TypeError: undefined is not a function on (var cssGet = pattern.exec(data);).  Any help would be great  Thanks

I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it.  However, I can't figure out how to pass a variable in to a regex.  I can do this already which will replace all the instances of "B" with "A".  "ABABAB".replace(/B/g, "A");   But I want to do something like this:  String.prototype.replaceAll = function(replaceThis, withThis) {     this.replace(/replaceThis/g, withThis); };   But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?


I am a fresh user of Ubuntu. I enjoy with 18.04 version and there are many things to learn. As for example to launch a program called "Holy Bible." The distributor is the "Institute for Bible Translation" - .   The installation of the package comes along with the file that provides the script to launch the program; but I couldn't as a result of my incompetence.  Here it is the script:   #!/bin/bash cd "$( dirname "${BASH_SOURCE[0]}" )" "./MK/xulrunner/xulrunner" --app "./MK/xulsword/application.ini" -profile "./MK/profile"    Would you please explain how to run the program with this script from "Terminal"   Thank you very much.

Whenever I open a .sh file, it opens it in gedit instead of the terminal. I can't find any option similar to Right Click → Open With → Other Application... → Terminal.  How do I open this file in the terminal?


I have some functions created in a C++ project in VC++ such as:  // Basically the power is an array int read_power( int * power, int iByteNumToRead);   Now I need to create C# equivalent/wrappers for these functions to be used in a C# project by compiling the C++ code in DLL Library and using to link against the C# functions declared. It ends up being something like this:   [DllImport("my_lib_dll.dll",CallingConvention = CallingConvention.Cdecl)]  unsafe public static extern int read_power( int * power, int iByteNumToRead);  public static int read_power_cs( int[] power, int iByteNumToRead )  {          if (power.Length < iByteNumToRead)          {              Console.WriteLine("Error: iByteNumToRead should be <= size of array[]");              return -1;          }            //Pinning the array           unsafe           {               fixed (int* ptr = power)               {                   return read_power_cs( ptr, iByteNumToRead);               }           }   }   The question here is: Do I need to pin the array before going into C++ function? IS there a need to do that? I understand we do that so that garbage compiler doesn't decide to delete the array but is it needed here? Or can I just get away with declaring the C# function without a wrapper as such:  [DllImport("my_lib_dll.dll",CallingConvention = CallingConvention.Cdecl)] public static extern int read_power( int[] power, int iByteNumToRead);   Note this has been tested and works. I just can't seem to understand if pinning the array is needed or not? Can someone please clarify as I'm new to the world of C#.  Thanks

Example C API signature:  void Func(unsigned char* bytes);  In C, when I want to pass a pointer to an array, I can do:  unsigned char* bytes = new unsigned char[1000]; Func(bytes); // call   How do I translate the above API to P/Invoke such that I can pass a pointer to C# byte array?


I am newbie in Java. Was looking at the below condition. The Type always return String but the condition always returns false. If I do direct "Test" == "Test" then it matches. And output for both the words are Test. Can some one please let me know why it is false? Thanks.  public static void main(String []args){          String word = "Test";          System.out.println((word.substring(0,1).toUpperCase() + word.substring(1)).getClass().getName());     System.out.println(word.substring(0,1).toUpperCase() + word.substring(1));     System.out.println(word.getClass().getName());     System.out.println(word);     if(word.substring(0,1).toUpperCase() + word.substring(1) == word)     {         System.out.println("t");     }     else     {         System.out.println("f");     }       }

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


I've a new modem and now my network connection is public and not private, on Win10.  I've read a lot of solutions, like this:   Go to homegroup, the is a link 'change network connection'. But there is no such link (in my case) Go to the ethernet properties, there is a switch which let you set sharing on and off. But there is no such switch (in my case)   I'm running win10 pro.

Trying to maintain good security settings on my laptop, I want my home network to be interpreted as private and the university network at school to be interpreted as public. However, my home network is currently showing as public.  Here is what my Network and Sharing Center looks like:    How do I change my home network from public to private on Windows 8 Consumer Preview?


Let $W_1, W_2, \dots $ be i.i.d. exponential $(\lambda )$ variables.   For each $n$, find the distribution of $T_n = W_1 + W_2 + \cdots + W_n$   I know how to deal with two i.i.d random exponential variables. Namely, I know that for two independent exponential random variables $X$ and $Y$ and $S$ = $X+Y$, I can use the discrete convolution formula to write:    $P(S=s) = \sum_{all x} P(X=x, Y=s-x)$. My problem is I do not know how to expand this to $n$ variables to answer my problem  Edit: I think this could be an induction problem:    For $T_1$ the distribution is just $W_1$, or the exponential distribution function.    For $T_2$ the distribution is $T_1 + W_2$, which would be the addition of two exponential distribution functions.    For $T_n$ then, the distribution is $T_{n-1} + W_n$ or the sume of $n$ exponential distribution functions.     Does this make sense and is this correct? How would I correctly set up the induction?

I have a sequence $T_1,T_2,\ldots$ of independent exponential random variables with paramter $\lambda$. I take the sum $S=\sum_{i=1}^n T_i$ and now I would like to calculate the probability density function.  Well, I know that $P(T_i>t)=e^{-\lambda t}$ and therefore $f_{T_i}(t)=\lambda e^{-\lambda t}$ so I need to find $P(T_1+\cdots+T_n>t)$ and take the derivative. But I cannot expand the probability term, you have any ideas?


I've unpackaged a zip into the current location which we'll call /httpdocs, everything inside the zip resides in a directory which we'll call myfiles.  In /httpdocs are thousands of directories and files that also exist at exactly the same paths as in the myfiles directory.  I need to move the contents of the myfiles directory into /httpdocs whilst replacing any directories/files that already exist... recursively.  If I try from the myfiles directory:  mv * ../   I am asked if I want to overwrite if exists... y/n for every single file!  If I try from /httpdocs:  mv myfiles/* .   I am asked if I want to overwrite if exists... y/n for every single file!  If I try to apply the -f force operator, it returns that it cannot move because the Directory not empty.    Now from what I have read, it doesn't seem like what I am trying to do is achievable with the mv command which is probably why I am seem to be getting absolutely nowhere with this.  I am aware of cp and rsync and many others but I am not sure which command is the best to use to actually just move the contents of the directory to another location and overwrite if exists recursively.    I know I could do this easily by just uploading to /httpdocs via FTP in any local client and just 'Yes to all' on the overwrite dialogue but it would just take ages so not always practical - I'm just after a like-for-like over the command line really.

I have a ton of files and dirs in a subdirectory I want to move to the parent directory. There are already some files and dirs in the target directory which need to be overwritten. Files that are only present in the target should be left untouched. Can I force mvto do that? It (mv * ..) complains  mv: cannot move `xyz' to `../xyz': Directory not empty   What am I missing?


I just got into Arena 7, and unlocked my crown chest after the same battle, will my crown chest have the chance of giving Arena 6- Cards only or will it count as an Arena 7 crown chest?

If I am in arena X when I collect my tenth crown for the crown chest, or a free chest becomes unlocked, then proceed to climb to arena X+1 before opening the chests, which arena will be used to determine the cards I get? Will it use the arena I was in when I unlocked the chests in, or the arena I opened them in?


I did a factory reset on my Toshiba laptop. I didn't realize it would wipe out all my existing files. Is there any way to recover the files that were on there before I reset it?

What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:


Considering the follow code can someone explain to me why and why not to use 'using'? I've read about the rule of thumb with IDisposable but why is IDisposable the determining factor?  private string GetWMIProperty(string property) { string value = string.Empty; SelectQuery selectQuery = new SelectQuery("Win32_OperatingSystem"); using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(selectQuery)) {    foreach (ManagementObject mo in searcher.Get())    {      value = mo[property].ToString();   } } return value; }

User  answered the wonderful  question by mentioning the using keyword. Can you elaborate on that? What are the uses of using?


The Player's Handbook says that Action Surge grants one additional action on your turn, once per short or long rest.     The Extra Attack section of the PHB says that at level 11 (for example) when you use the "Attack action", you can attack three time per turn.   If Action Surge grants one additional action, and I choose the "Attack action", does that mean I would get three more attacks with Action Surge?    In other words, if I use the "Attack action" for my normal action (3 attacks) and use "Attack" again for my Action Surge action (3 attacks), would I get 6 attacks on that turn?

Context  A player in my game will play a fighter with a greatsword. At 5th level he has Extra Attack and the option to use Action Surge. PHB p.72 states:     Action Surge. Starting at 2nd level, you can push yourself beyond your normal limits for a moment. On your turn, you can take one   additional action on top of your regular action and a possible bonus   action.      Once you use this feature, you must finish a short or long rest before   you can use it again. Starting at 17th level, you can use it twice   before a rest, but only once on the same turn.        Extra Attack. Beginning at 5th level, you can attack twice, instead of once,   whenever you take the Attack action on your turn.       The number of attacks increases to three when you reach 11th level in   this class and to four when you reach 20th level in this class.   Confusion  The questions and answers that I find on here deal with multi-classing or Two Weapon fighting specifically, which don't really give a clear yes or no on my question.  The way I read these two features is that when a fighter takes an Attack action, he gets the Extra Attack. After using Action Surge he gets the opportunity to take another Attack action, and with that another Extra Attack. This results in four attacks with the greatsword in one turn, which sounds amazing but also rather powerful. Is this correct, or am I missing something?


I have a <div> containing multiple <article>-tags. Now I want to add a button, which shows more entries by each click. Lets say I display 5 as default, then I click the show more button, then I get 10 entries, then I click again and I get 15 entries.  The HTML structure is pretty simple:  <div>   <article> data here </article>   <article> data here </article>   <article> data here </article> </div> <button>show more</button>   Thanks in advance...

I have a funciton that I am currently using to show a hidden div.a_type  How can I modify this code so that instead of fading in the hidden div, I can add the new div to the DOM   jQuery(function(){   // Add Answer      jQuery(".add_answer").click(function(){       if(count >= "4"){         alert('Only 4 Answers Allowed');         }else{       var count = $(this).attr("alt");       count++;       $(this).parents('div:first').find('.a_type_'+count+'').fadeIn();       $(this).attr("alt", count);     }      });   });     Ok, now that i have this sorted out, i have one more question,  I have another function that removes the inserted div's if a button is clicked. It's not working now that the additional divs are not loaded into the dom on pageload. How can i trigger the function to remove these now?  jQuery(function(){   // Hide Answer  jQuery(".destroy_answer").click(function(){   $(this).parents("div:first").fadeOut(function (){ $(this).remove() });    var count = $(this).parents('div:first').parents('div:first').find('.add_answer').attr("alt");    count--;    $(this).parents('div:first').parents('div:first').find('.add_answer').attr("alt", count);  });    });


I found a solution to this problem but I am not sure of one of the steps. First let $a,b,c \in A$ then $a+b=2c$ thus $a/2+b/2=c$. We can continue this process to show that $\frac{1}{2^n}a+(1-\frac{1}{2^n})b \in A$ However, I am not sure how to conclude that $\frac{k}{2^n}a+(1-\frac{k}{2^n})b \in A$ for $k \in \mathbb{N}$ $0\leq k\leq 2^n$. I was thinking induction but i am not sure how. It is easy to show it is true for $n=1,2$ then assume it is true for $n$. I can show that $0\leq k\leq2^n$ works for $n+1$ but I do not know how to extend $k$ to $2^{n+1}$

Midpoint convexity. A set C is midpoint convex if whenever two points a,b are in C, the average or midpoint (a + b)/2 is in C.Prove that if C is closed and midpoint convex, then C is convex.   Convex set means that $\forall x_1, x_2 \in C, \theta x_1+(1-\theta)x_2 \in C \forall \theta \in[0,1]$  I know  $$ \left(x_1+x_2\right)/2 \in C \implies \dfrac{x_1+\dfrac{x_1+x_2}{2}}{2}= \dfrac{x_1}{2}+\dfrac{x_1}{4}+\dfrac{x_2}{4} = \dfrac{3}{4}{x_1} +  \dfrac{1}{4}{x_2} \in C $$ Applying this k times I get the following: $$ (1-2^{-k})x_1+2^{-k}x_2=(1-\theta_k)x_1+\theta_k x_2 \in C $$  but I have showed it only for $\theta$ values that takes the form of $2^{-k}$ where $k \in N$  What should I do next?


I tried to let $$2\sqrt{5} + \sqrt{11} = \frac{a}{b}$$ and find contradictions   (I set $b \ne 0$, $a$ and $b$ are in their simplest form) but I cannot find any

how would you prove that $2\sqrt5 +\sqrt{11}$ is irrational? I started with a proof by contradiction that assumes that $2\sqrt5 +\sqrt{11}$ is rational and therefore there exist integers $a$ and $b$ such that $\frac{a}{b}=2\sqrt5 +\sqrt{11}$ and squaring both sides yields $\frac{a^2}{b^2}=31 +4\sqrt5\sqrt{11}$ and from this point im stuck as i dont know how to continue to arrive at a contradiction.


How to calculate the closed form of the integral $$\int\limits_0^1 {\frac{{\int\limits_0^x {{{\left( {\arctan t} \right)}^2}dt} }}{{x\left( {1 + {x^2}} \right)}}} dx$$

Evaluate   $$ \int_{0}^{1} \arctan^{2}\left(\, x\,\right) \ln\left(\, 1 + x^{2} \over 2x^{2}\,\right)\,{\rm d}x $$     I substituted $x \equiv \tan\left(\,\theta\,\right)$ and got    $$ -\int^{\pi/4}_{0}\theta^{2}\,{\ln\left(\, 2\sin^{2}\left(\,\theta\,\right)\,\right) \over \cos^{2}\left(\,\theta\,\right)}\,{\rm d}\theta $$    After this, I thought of using the Taylor Expansion of $\ln\left(\, 2\sin^{2}\left(\,\theta\,\right)\,\right)$ near zero but that didn't do any good.    Please Help!


Do you feel these are correct with the hyphens and absence of commas?  a 2-hour 15-minute traffic delay (Instead of: a 2-hour, 15-minute traffic delay)  a 7-pound 11-ounce newborn (Instead of: a 7-pound, 11-ounce newborn)  a 6-foot 8-inch basketball player (Instead of: a 6-foot, 8-inch basketball player)  a 2-year 5-month 17-day project (Look OK without commas?)  The project lasted 2 years 5 months 17 days. (Good without commas?)  If "and" is used, is it OK to forgo the commas as well?  The project lasted 2 years 5 months and 17 days.  Do all examples above look to be correctly punctuated without the commas? I don't think the commas aid readability in the slightest. Do you agree?  Thank you.

Height and Weight — How to write them when abbreviations are not used.  He was a 6-foot 5-inch man.   (Not: 6-foot-5-inch man, with three hyphens.)  She gave birth to a 7-pound 11-ounce baby.  (Not: 7-pound-11-ounce baby, with three hyphens.)  And, it should be, I believe:  He is 6 feet 5 inches tall. (Not: 6 feet, 5 inches tall.)  The baby weighed 7 pounds 11 ounces. (Not: 7 pounds, 11 ounces.)  Despite variations in punctuation, I believe that we do not separate singular units of measurements like these with commas.  Good to all?


I was wondering What is the different between Method and Function in JAVA?

Can someone provide a simple explanation of methods vs. functions in OOP context?


I am trying to visualize a neural network with multiple hidden layers. I found an example of how to create a diagram using TikZ that has one layer:    This is done by using the following code:  \documentclass{article}  \usepackage{tikz} \begin{document} \pagestyle{empty}  \def\layersep{2.5cm}  \begin{tikzpicture}[shorten >=1pt,->,draw=black!50, node distance=\layersep]     \tikzstyle{every pin edge}=[<-,shorten <=1pt]     \tikzstyle{neuron}=[circle,fill=black!25,minimum size=17pt,inner sep=0pt]     \tikzstyle{input neuron}=[neuron, fill=green!50];     \tikzstyle{output neuron}=[neuron, fill=red!50];     \tikzstyle{hidden neuron}=[neuron, fill=blue!50];     \tikzstyle{annot} = [text width=4em, text centered]      % Draw the input layer nodes     \foreach \name / \y in {1,...,4}     % This is the same as writing \foreach \name / \y in {1/1,2/2,3/3,4/4}         \node[input neuron, pin=left:Input \#\y] (I-\name) at (0,-\y) {};      % Draw the hidden layer nodes     \foreach \name / \y in {1,...,5}         \path[yshift=0.5cm]             node[hidden neuron] (H-\name) at (\layersep,-\y cm) {};      % Draw the output layer node     \node[output neuron,pin={[pin edge={->}]right:Output}, right of=H-3] (O) {};      % Connect every node in the input layer with every node in the     % hidden layer.     \foreach \source in {1,...,4}         \foreach \dest in {1,...,5}             \path (I-\source) edge (H-\dest);      % Connect every node in the hidden layer with the output layer     \foreach \source in {1,...,5}         \path (H-\source) edge (O);      % Annotate the layers     \node[annot,above of=H-1, node distance=1cm] (hl) {Hidden layer};     \node[annot,left of=hl] {Input layer};     \node[annot,right of=hl] {Output layer}; \end{tikzpicture} % End of code \end{document}   Now I am trying to create a similar diagram to represent two or more layers but I can't figure out how to change the latex code to do so.  Is it possible with this specific example to keep the same style (colors, and network being layed out from left to right instead of from bottom to top)?

I have created some TikZ code to produce the diagram below (slightly simplified). This is my first real shot at TikZ and its taken me about 8 hours now to get this far. But I don't really begrudge the time, time spent learning is time well spent.  It is loosely based on .  I would like to have a different (variable) number of nodes in each layer, and would like to maintain the connection.  My current idea was to have a list of lists like {{1..3},{1..5},{1..7},{1..4},{1..3}} then I guesss i could use a nested for-each off the index. But that has 2 problems: I would lose my layer number, which I could get around by using count. Secondly, more majorly, I don't seen a good way of knowing how big the next layer is (to make the connections).     \documentclass{article} \usepackage{mathptmx} \usepackage{tikz} \usetikzlibrary{arrows} \usetikzlibrary{calc} \begin{document}   \def\layersep{3.5cm} \def\topnum{5} %\font\nullfont=cmr10 \begin{tikzpicture}[shorten >=1pt,->,draw=black!50, node distance=\layersep]     \tikzstyle{neuron}=[circle,draw,fill=white!25,minimum size=25pt,inner sep=0pt]     \tikzstyle{bias neuron}=[neuron,dashed]       \foreach \y in {2,...,4}                 \foreach \x in {1,...,5}             \path   node[neuron] (L_\y_\x) at (\x cm,\y*\layersep) {$\sigma(\cdot)$};   %      \foreach  \x in {1,...,5}             \path  node[neuron] (L_1_\x) at (\x cm,1*\layersep) {$x_\x$};      \foreach  \x in {1,...,5}             \path  node[neuron] (L_5_\x) at (\x cm,5*\layersep) {$s_{m}(\cdot)$};       %Add Biases     \foreach \y in {1,...,4}     {         \path node[bias neuron] (B_\y) at (6 cm, 0.55*\layersep+\y*\layersep) {1};         \pgfmathtruncatemacro\nextlayer{\y+1}         \foreach \dest in {1,...,5}             \path (B_\y) edge[dashed] (L_\nextlayer_\dest.south);     }       % Connect every node in the input layer with every node in the     % hidden layer.     \foreach \layer in {1,...,4}         \pgfmathtruncatemacro\nextlayer{\layer+1}         \foreach \source in {1,...,5}             \foreach \dest in {1,...,5}                 \path (L_\layer_\source) edge (L_\nextlayer_\dest);   \end{tikzpicture} \end{document}


Can this integral be solved with contour integral or by some application of residue theorem? $$\int_0^\infty \frac{\log (1+x)}{1+x^2}dx = \frac{\pi}{4}\log 2 + \text{Catalan constant}$$  It has two poles at $\pm i$ and  branch point of $-1$ while the integral is to be evaluated from $0\to \infty$. How to get $\text{Catalan Constant}$? Please give some hints.


The documentation on this is fairly bad. Followed guides, still encountering problems.   Relates to OAuth on the Twitter API via the Twitter4J library.   ConfigurationBuilder builder = new ConfigurationBuilder();             builder.setOAuthConsumerKey("");             builder.setOAuthConsumerSecret("");             builder.setOAuthAccessToken(null);             builder.setOAuthAccessTokenSecret(null);             Configuration configuration = builder.build();             TwitterFactory factory = new TwitterFactory(configuration);             Twitter twitter = factory.getInstance();      RequestToken requestToken;             try {                 String callbackURL = "/callback";                  requestToken = twitter.getOAuthRequestToken(callbackURL);                 AccessToken accessToken = null;                 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));                 while (null == accessToken) {                     System.out.println("Open the following URL and grant access to your account:");                     String requestTokenAuthorisationURL = requestToken.getAuthorizationURL();                     System.out.println(requestTokenAuthorisationURL);                      System.out.print("Enter the PIN(if aviailable) or just hit enter.[PIN]:");                     String pin = br.readLine();                     try {                         if (pin.length() > 0) {                             accessToken = twitter.getOAuthAccessToken(requestToken, pin);                         } else {                             accessToken = twitter.getOAuthAccessToken();                         }                     } catch (TwitterException te) {                         if (401 == te.getStatusCode()) {                             System.out.println("Unable to get the access token.");                         } else {                             te.printStackTrace();                         }                     }                 }             } catch (TwitterException ex) {                 Logger.getLogger(EmployerAdvertisingTwitter.class.getName()).log(Level.SEVERE, null, ex);             }   The null pointer exception is being thrown on this line;  if (pin.length() > 0) {   And I cannot see why this is happening or what this section of code actually does. I've tried commenting out that whole try/catch section of code surrounding the pin.length() piece of code and this ends up in an endless loop generating new authorisation URLs.   Any ideas or pointers?

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


I want to illuminate my scene with an HDRI, and to use another one as a background image.

My question is, how would I make the visible HDRI/Enviroment Map be image 1 and then have reflections as Image 2? If someone can post a node setup, or a .py file that would be great <3 I was thinking maybe using the Is Camera Ray node but I'm not confident it would work, and have no idea where to start.


In the below sample code,  let a: number = 1; // Global(G) function f(){     // let a: number = 1; // Enclosing(E)     return function g(){         // let a: number = 1;  // Local(L)         return a;     } }  console.log(f()());     Does let keyword follow LEGB rule for variable lookup, similar to python?

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


I tend to answer my own questions if they remain unanswered for some time, and I wondered this:  If I edit my question within 12 hours before or after answering it, like I do with others' questions, will that count as progress toward the , , and  answer ?

The difference between a poor or meh question and a stellar question can often simply be someone understanding it and providing it a great answer. I can't begin to count the number of times I've justified re-opening a question as a moderator by saying:     Look at the answer it got, though. This isn't something we want deleted, this is something we want fixed, because it's obviously valuable. Someone with domain knowledge can easily edit that question based on the answer it received.   This doesn't only apply to borderline-poor or poor questions – sometimes a good edit means the difference between 100 and 10,000 people finding something through typing things into Google. Good titles are hard.   We think we've come up with a way to provide incentive for good, opportunistic edits to happen more often, ideally without questions needing to go through closure or collecting a centimeter of dust before they do. What if we simply rewarded folks that answered and edited questions with a special, relatively difficult to earn badge?  Let's say that you answer something, and:   You edit the question 12 hours before or after answering it. This allows you to edit now, answer later — or answer now and edit later, when you have the time. Your edit isn't rolled back, or outright rejected if it was a suggested edit The question is not closed for any reason, even simply being a duplicate Your answer has a score of 1 or higher   … then you've done something that we probably want to recognize. You understood something, you provided the knowledge that you have, and then you provided an edit to make sure that more people in need of this knowledge can find it, while raising the overall quality of the site.  Here's the proposed tiers for the badge (within the above stated criteria):   Explainer (Bronze): Answered & edited 10  questions Refiner (Silver): Answered & edited 50 questions Illuminator (Gold): Answered & edited 500 questions   We think this is going to be pretty hard to game. You can't go leaving streaks of terse snark all over the place on questions you know are going to be closed anyway, and junk edits aren't going to fly.  We're talking about rewarding folks that take a tiny bit more time out of their day just to write a more descriptive title so that folks can find the awesome answer that they wrote. Just doing that alone can make a big difference. Sure, it's a tad hard to get at the gold level, but it's supposed to be. If you routinely edit questions that you answer and have done so for some time, you'd probably get it the day we roll it out.  While this is technically something that we came up with on the quality initiative ( | ) — this badge could be earned on all of our sites.  What do you think? What did we miss? What could be better about the idea?


I found the relation below while studying the measure of dependence. How we can prove this relation about Kendall's tau? $$ \tau = 4\int\int H(x, y)\, h(x,y)\, dx\, dy - 1 $$

When $\theta =-\frac{1}{2}$ the Clayton copula is given by $C(x,y)=(\sqrt{x}+\sqrt{y}-1)^2$. I've been asked to show in this case that Kendall's tau is $-\frac{1}{3}$. Using $$\rho_{\tau}=4 \int_0^1 \int_0^1 C(x,y)dC(x,y)-1=4 \int_0^1 \int_0^1(\sqrt{x}+\sqrt{y}-1)^2\frac{1}{2 \sqrt{xy}}dxdy-1$$ I find that $\rho_{\tau}=\frac{1}{3}$. I've done the integration twice by hand and once using Mathematica and always get $\frac{1}{3}$. Am I making some kind of mistake or is the question stated wrong?


Is it possible to find an $\alpha\in\mathbb R$, $\alpha>0$ so that for all $n\in\mathbb N$, $n^\alpha\in\mathbb N$?  A  stronger(restricted) problem: Can $2^\alpha$ and $3^\alpha$ be simultaneously integers?? Here $\alpha >0$.  For the second one, I can only reduce to $\cfrac{\log 3}{\log 2} = \cfrac{\log s}{\log q}$ for integer solution $(s,q)$, and then no idea..... For the first one, we have excluded all $\alpha\in\mathbb Q$(which is easy). I tried to use large enough $n^\alpha\in\mathbb N$ and to show $(n+1)^\alpha$ fails to be an integer but I failed.    I think there is more advanced number theoretic technique to be used.

Let $a>0$ be a real number, such that for all integers $n\geq 1$: $n^a \in \mathbb N$ Show that $a$ must be an integer.    It's not difficult to show this when $a$ is a rational number: $2^\frac{p}{q}$ is irrational when the fraction is in lowest terms and $q \neq 1$.  When $a$ is irrational, then for all $n\geq 1$, there exists $m_n\in \mathbb N^*$, such that: $$a = \frac{\log m_n}{\log n}; \quad \text{$m_n$ is not a power of $n$}$$  I think considering $n=2,3$ is enough to show a contradiction, but I can't seem to find it. This is what I get: $$a = \frac{\log p}{\log 2} = \frac{\log q}{\log 3}$$ $$p = 2^{\log q/\log 3} $$  I think the RHS is irrational when $q$ is not a power of $3$, but I can't prove it. The closest thing I have to a solution is . But it uses an unproven conjecture, and I was hoping for a more elementary proof.


Long time ago I heard someone say that it is space itself that falls into a black hole. Yesterday I saw a little animation that suggested the same (although I´m not sure, because the person who put the animation in the answer didn´t reply to my question). So I asked myself the question again. If that´s the case then this would also be true for the Earth. I´ve always learned that space is stationary around a massive object, and that the curvature of space-time causes objects to move to the mass. And not the picture that an object falls to a big piece of mass, because it´s riding along with the falling space. This suggests a completely different picture how gravity works. What´s playing here?

Greetings StackExchange!  We were having a conversation with a peer about stupid ways of interpreting theories. We would go to and fro with an interpretations, but we would always find a way to disprove them. There was one, however, that we couldn't refute:  Gravity on a plane in a bidimensional space can be interpreted as the acceleration of spacetime towards an object.   We tried to invalidate in saying that the inertial mass and gravitational mass would be different, thus violating GR, but after some thought this couldn't be. The gravitational mass would accelerate spacetime towards it. If that object we were to be pushed, the pulling of spacetime would make it difficult for it to move.   We know for a fact this can't be true, and we would greatly appreciate any refutation of this thought. I can clarify if needed, or do a sketch. I apologise in advance as I'm not a native speaker.


CONTEXT: John to Bob: "I was wondering if you could lend me some money, Bob." Bob to John: "I've been in a pretty good mood so far, so stop bringing me down with that nonsense." Chris to Bob: "What did you just say to John?" Then Bob says to Chris one of the sentences below. SENTENCES:  I told him that I have been in a pretty good mood so far, and asked him to stop bringing me down with that nonsense.  I told him that I had been in a pretty good mood so far, and asked him to stop bringing me down with that nonsense.   QUESTION: Are both sentences correct? I'm wondering about the bolded part.

Grammar rules say that when converting a sentence from direct speech to indirect, the reported speech is converted to past tense if the first part of the sentence (reporting verb) is in the past tense.  Direct speech: John said, “I will give you a pen”. Indirect Speech: John said that he would give me a pen. S1: I wanted to let you know that he has sent you an email S2: I wanted to let you know that he had sent you an email  I have seen people write S1 even though it doesn't follow the grammar rule regarding change of tense in the reported speech. Which of these ones correct and incorrect? Why correct and why wrong?


I installed a Debian-based Linux distro on a virtual machine with VirtualBox on an iMac. The private IP of the iMac is in the subnet range of 192.168, where as the Guest OS' IP is in the subnet range of 10.0. How do I make sure that the Guest OS gets the same IP range as the Host OS?

I don't fully understand the term bridged networking in conjunction with Virtualbox.   As far as I understand that by configuring bridged networking I can put the VMs in the hosts network, while NAT would mean that the way to reach the machines is done via port multiplexing.  My understanding of network bridges was always that they are basically an older version of what we know as network switches today.  Can someone shed some light on this? Which two networks are being bridged? And why does a "bridge adapter" have an IP address? At which network layer is a Virtualbox bridge operating?


How do you produce the unicode double right arrow variant of function types when typesetting Scala code with LaTeX? I can use math escape, like so  \lstset{mathescape=true} \begin{lstlisting} val x = (i: Int) $\Rightarrow$ i*i \end{lstlisting}   But that breaks the monospacing. Any ideas?

I want to use the double right arrow for some Scala code in listings. I thought I'd use the mathescape option and $\Rightarrow$. However, this "eats" whitespace around it, e.g. if I have   foo  $\Rightarrow$  bar   only one space character is used in front and after the arrow, as if it were  foo $\Rightarrow$ bar   How do I enforce the whitespace? Could I embed the unicode character \u21D2 for the arrow instead of using mathescape?    EDIT: So with the comments I managed to produce a math escaped command that has a width of exactly three space characters in the verbatim font:  \newcommand{\ScalaRA}{{}\hspace{-0.04ex}\Rightarrow\hspace{-0.08ex}{}}   However, the problem of eating the white space is still there:  \begin{lstlisting} abc d     g     j a   d  $\ScalaRA$g  $\ScalaRA$j a   def$\ScalaRA$ghi$\ScalaRA$j \end{lstlisting}   In the second line, after using $\ScalaRA$ for the first time, subsequent whitespace is contracted: After the g character there are two spaces but it is rendered only as one space:    So going in an out of the math mode leaves some "garbage" behind somehow. How to clean this up so that all three lines are perfectly aligned and the two space characters after g in the second line are respected?


Hi I recently installed Ubuntu 20.04 and noticed that date below the log in screen appears in a different language. Please let me know whether there is a way to fix it.

I've installed Ubuntu 19.10, language/locale/formats are set in US/en. And everything seems to work OK, except datetime language on login screen (when I turn on my laptop and see fields for user/password logging). It has local-language-style.  So, datetime language for user / lockscreen picks up correctly, but for login screen - nope. What's the reason and how can I fix this ?  Output of locale command:  LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE="en_US.UTF-8" LC_NUMERIC=en_US.UTF-8 LC_TIME=en_US.UTF-8 LC_COLLATE="en_US.UTF-8" LC_MONETARY=en_US.UTF-8 LC_MESSAGES="en_US.UTF-8" LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 LC_ALL=


Find all values of real numbers $a,b,c, d$ satisfying the following condition  $$(b+c+d)^{2010}=3a$$ $$(a+c+d)^{2010}=3b$$ $$(a+b+d)^{2010}=3c$$ $$(a+b+c)^{2010}=3d$$

Find all quadruples of real numbers $(a,b,c,d)$ satisfying the system of equations  $(b+c+d)^{2010}=3a$  $(a+c+d)^{2010}=3b$  $(a+b+d)^{2010}=3c$  $(a+b+c)^{2010}=3d$  I tried to find the solutions using hit and trial and by using some logic also I find two solutions which are $(0,0,0,0)$ and $(\frac{1}{3},\frac{1}{3},\frac{1}{3},\frac{1}{3})$  I think these are the only solutions that exist.


I was experimenting with some command blocks and tried to make it so that when you had different colours of wool in a specific order in your inventory it would give you certain special abilities. The command sequence I used was:  Command block 1, repeating       execute @e[type=minecraft:snowball] if entity @p[nbt={Inventory:[{Slot:6b,id:"minecraft:red_wool"}]},nbt={Inventory: [{Slot:7b,id:"minecraft:blue_wool"}]},nbt={Inventory:[{Slot:8b,id:"minecraft:yellow_wool"}]},distance=1] run tag @s add path   Command block 2, repeating    execute @e[tag=path,type=snowball] run setblock ~ ~-2 ~ white_wool keep   The snowball should leave behind a path of white wool wherever it is thrown, as long as the player throwing it has the specific wool sequence in their inventory. The problem is that it wont work and I'm not sure why. I got it to work where all snowballs thrown leave behind a path if one player has the sequence, but I want it to be only snowballs thrown by a specific player. I also tried by giving the player snowballs with tags but the tag disappears when you throw the snowball.

Have been searching a couple of hours now just so I can find out how I can testfor a nearby player... One thing I noticed is that testfor doesn't even work anymore so whats the deal with that? I have been using /testfor @a[r=5] but yeah, not anymore...


Let $A_n,A$ be random variables such that $A_n \rightarrow A$ in probability. Let us moreover have $B$ with $E|B| < \infty$ such that $|A_n| \leq |B|$ for all $n$. Does it hold that $A_n \rightarrow A$ in $L_1$? If we talk about almost sure convergence, then this is clearly the case by the dominated convergence theorem. Is it also the case for convergence in probability?

I want to prove that LDCT(Lebesgue Dominated Convergence Theorem) continues to hold if I replace the hypothesis $f_n \to f$ (convergence pointwise) with $f_n\to f$ (convergence in measure):     $$\int fd\lambda=\lim_{n\to\infty}\int f_nd\lambda.$$


Running Ubuntu 18.04 on a laptop.   I tried extracting a file(~700MB) using right click+extract here but got the following error message:    The file contains mainly pdfs, but also text files, some executables, but it does have alot of files which themselves have files.  I went through some of the pdfs in the file and found that some of them are open able as normal, yet others give the same error.

I have received an .rar which I wish to unpack as it contains something rather important to me that I need to really have now. However even though I can view the contents of the .rar archive in the Archive Manager, I am unable to extract it due to this error:    The archive should contain two folders within it, each though contain at least 10 audio files as well as a PDF file each (I don't know what the contents exactly should be except for there should be audio files in there, and the content I have described is what I can see from the Archive Manager's view). So the only thing I am left with except the error is one of the folders and one of the audio files, but it says it has 0 bytes in it.  So how exactly do I fix this problem? I am running Ubuntu GNOME 16.04.1 with GNOME 3.20.  Information Update:  In reply to a comment requesting the output from the dpkg -l unrar unrar-free command:  Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name           Version      Architecture Description +++-==============-============-============-================================= un  unrar          <none>       <none>       (no description available) dpkg-query: no packages found matching unrar-free


Added in  my child's theme JavaScript File: $(function(){     $(".copyright").prepend("Yo!"); });  What's wrong?

I know that jQuery is loaded, because I can switch out the $ for 'jQuery' and everything behaves as expected, but this will be a messy script if I can't fix this  This script:  jQuery(document).ready(function(){     $("ul.vimeo_desc_feed li a").click(function(){         alert($(this).attr('href'));         return false;     }) });   Produces the error $ is not a function  This script:  jQuery(document).ready(function(){     jQuery("ul.vimeo_desc_feed li a").click(function(){         alert(jQuery(this).attr('href'));         return false;     }) });   works fine.


I have access to some Debian Linux vps servers, however I cannot access their controls panel directly: only server administrator himself can do that.  Is there any way to find out what visualization technology is used on server from inside VPS? I need it only to know which kernel header package should I install (xen, openvz or any other).

I have command line access to a Linux machine which may or may not be virtualized. I want to determine what kind of virtualization technology it runs on, if any (VMWare, VirtualBox, KVM, OpenVZ, Xen, ). This isn't a hostile environment: I'm not trying to work against a VM that is trying to disguise itself, I'm diagnosing a flaky server that I know little about.  More precisely, I'm helping someone diagnose the issue, I'm not sitting at the helm. So I have to convey instructions like “copy-paste this command” and not “poke around /proc somewhere”. Ideally, it would be something like lshw: an easily-installable (if not preinstalled) command that does the poking around and prints out relevant information.  What's the easiest way of determining what virtualization technology this system may be a guest of? I'd appreciate if proposals mentioned which technologies (including bare hardware) can be conclusively detected and which can be conclusively eliminated. I'm mostly interested in Linux, but if it also works for other unices that's nice.


Is there any mathematical proof to show that the exposure in a camera is independent of the focal length used, if the f-number (ratio of focal length to lens diameter) remains constant?

I'm trying to wrap my head around the math/physics of how illuminance on the film/sensor plane remains equal for a given f-number regardless of the focal length of the lens.  Since a longer lens will have a larger entrance pupil at a given f-stop than a shorter lens at the same f-stop, how can the light falling on the film/sensor be equivalent?  Empirically, I know this to be true.  Say I take an incident meter reading (not reflected/TTL) off my subject, and get f/5.6 at 1/100s, I'll get proper exposure at the point at which i took the meter reading with that setting whether I use a 50mm lens or a 200mm lens (obviously composition will be different).    Wikipedia's  reads:     A 100 mm focal length f/4 lens has an entrance pupil diameter of 25   mm. A 200 mm focal length f/4 lens has an entrance pupil diameter of   50 mm. The 200 mm lens's entrance pupil has four times the area of the   100 mm lens's entrance pupil, and thus collects four times as much   light from each object in the lens's field of view. But compared to   the 100 mm lens, the 200 mm lens projects an image of each object   twice as high and twice as wide, covering four times the area, and so   both lenses produce the same illuminance at the focal plane when   imaging a scene of a given luminance.   I'm not sure I agree with the explanation on wikipedia.  The film/sensor doesn't care how big the image is that falls outside the bounds of the sensor; the film/sensor "sees" what it sees, and that's it.


Please assist? Original OS Windows 10. 2nd OS Ubuntu 18.04.1. Both installed on a separate SSD from storage/documents HDD.   Worked perfectly until a week ago, but upon waking I could no longer boot to Windows, only Ubuntu. So apparently something is wrong with GRUB2, but I've no idea what. Please speak as if I know nothing (mostly true re boot repair, OS problems)  Thank much!

I installed Windows on my computer, followed by an installation of Ubuntu. However, now I'm unable to boot into my Windows install.  What can I do to fix this?


I have a Samsung J7 prime with Android 8.1, the issue is that my applications can be moved normally to external storage, but then it appears again in the internal memory. (when google play store updates the apps). Is there any way to avoid that?

After upgrade of any app - apps move back from SD Card to phone memory.  After that, to save phone memory, I have to move upgraded app back to SD card.   Is any possibility to avoid this because it is very annoying?  I have Android 5.0.2 on Motorola E second gen phone.


Question : I’m sorry that I ______(not raise) the curtain,but I will do it now. --The answer is haven't raised . Can I say did't raise ? why? Thanks

Is haven't supposed to mean something I may still do and didn't not?  Can I use didn't for something I might still do?


I ran into the "mysterious"  \pdfendlink ended up in different nesting level than \pdfstartlink   error.  According to , "this happens when hyperref is used under pdftex and a citation splits across a page boundary".  The given solution is to manual fix the citation to not split across the page boundary.  However, this workaround isn't feasible for me, as the documents are automatically generated on a server with no user interaction.  Is there any solution to the problem known, perhaps an experimental hyperref action or a patch to pdftex?  (Probably, one could use luatex to solve the problem, but for other reasons, luatex is not an option in this project.)  MWE:  \documentclass[%draft               ]{article} \usepackage{hyperref} \setlength{\textwidth}{3cm} \setlength{\textheight}{3cm}  \begin{document} Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna \href{http://www.tug.org/errors}{aliquyam erat, sed diam voluptua.} \end{document}

I started using showkeys in one of my documents and see this error  \pdfendlink ended up in different nesting level than \pdfstartlink   A bit of google suggests that this "happens when hyperref is used under pdftex and a citation splits across a page boundary". (See: ).  But this package is only useful at drafting stage where the text is changing frequently i.e. the chance of the error is high. Is there a general way to smoothly use showkeys with hyperref? Thanks.


I am using Ubuntu 17.10 and have recently installed and run rkhunter 1.4.4. I got the following warnings about suspicious shared memory segments:  /usr/lib/nautilus-desktop PID 1867   Is this a problem? Could there be a problem with rkhunter not playing well with the newest Ubuntu? Can I safely ignore this, especially if I don't get a warning when I am not running Firefox at the same time, and I do get a warning if Firefox is running?

I installed Ubuntu 14.04 a few days ago. I've made a scan with a RkHunter and got a few warnings that I don't really know what to do with. I read about false positives a little bit but I didn't find the answer for myself really. I got those errors:  Checking /dev for suspicious file types         [ Warning ] [19:44:16] Warning: Suspicious file types found in /dev: [19:44:16]          /dev/.udev/rules.d/root.rules: ASCII text [19:44:16]   Checking for hidden files and directories       [ Warning ] [19:44:16] Warning: Hidden directory found: /etc/.java: directory [19:44:16] Warning: Hidden directory found: /dev/.udev: directory [19:44:16] Warning: Hidden file found: /dev/.initramfs: symbolic link to `/run/initramfs' Checking for group file changes                 [ Warning ] [19:44:16] Warning: Group 'winbindd_priv' has been added to the group file.   Should I be worried ?


There are two relations connect between copula distribution function and copula survival function I got confused between them   $¯C(u,v)= u + v -1 + C(1-u,1-v)$ $C(u,v)= 1 - ¯C(1-u) - ¯C(1-v) + ¯C(1-u,1-v)$  So if we have copula function we can find survival copula   If you provide some useful references or explanation through an example that illustrates the relation further

$$ \begin{align}F(x,y) &= P(X\leq x, Y\leq y) \\  &= C(F(x), F(y)) \end{align}$$ The copula of a bivariate distribution is equal to its CDF, $C(u,v) = F(x,y)$. The density of the data's CDF therefore can be expressed as $$f(x,y) = c(u,v) \times f_X(x) f_Y(y)$$ where $c(u,v)$ is the copula density and $f_X(x)$ is a marginal. If $\hat{C}(u,v)$ is the survival copula for determining $$ \begin{align}\bar{F}(x,y) &= P(X> x, Y > y) \\  &= \hat{C}(1-F(x), 1-F(y)) \end{align}$$ how is the first equation of the ordinary copula, $C(u,v)$, linked to the survival copula as $$\hat{C}(u,v) = u + v - 1 + C(1-u,1-v)$$ are $u$ and $v$ merely vectors containing the (ranked) observations of the uniform marginals? A derivation in integrals and probabilities (rather than $F$s) would be good.


I am quite confused about specific equality that is used when solving linear congruences. In the example provided, it is the jump from the second to last equation to the final equation. I cannot seem to find any theorem or even reasoning as to why this works. I am trying to use the method of solving for the inverse, then using this inverse to find the answer.   For example, to solve  $3x \equiv 4$  $($$\mod 7$$)$  first, we can find the inverse of $3$ modulus $7$. This inverse is equal to $-2$.   Therefore, we can multiply both sides by $-2$, getting $(-2) \cdot3x \equiv (-2)\cdot4$  $($$\mod 7$$)$, or  $-6x \equiv -8$  $($$\mod 7$$)$  This is where I am confused. I don't understand why this allows us to say that since   $-6x \equiv -8$  $($$\mod 7$$)$,   $x \equiv -8$  $($$\mod 7$$)$  I have been looking through every proof I could find and I cannot figure why this second to last step implies the final step.

I have seen other criteria for divisibility by 7. Criterion described below present in the book Handbook of Mathematics for IN Bronshtein (p. 323) is interesting, but could not prove it. Let $n = (a_ka_{k-1}\ldots a_2a_1a_0)_{10} = \displaystyle{\sum_{j=0}^{k}}a_{k-j}10^{k-j}$. The expression $$ Q_{3}^{\prime}(n) = (a_2a_1a_0)_{10} - (a_5a_4a_3)_{10} + (a_8a_7a_6)_{10} -\ldots  $$ are called alternating sum of the digits of third order of $n$. For example,  $$ Q_{3}^{\prime}(123456789) = 789-456+123=456 $$ Proposition: $7 | n \ \Leftrightarrow \ 7 | Q_{3}^{\prime}(n)$.  proof. ??  Thanks for any help.


I'm trying to understand this concept for a few days now to no avail. Consider some polarized ball with radius $R$:    The polarization is nonuniform, for the sake of example say $\vec{P} = (R-r) \hat{z}$ becuase I want it to vanish at the shell. I drew some of it on the ball.   I can't seem to figure out the electric field inside in such situations, as Gauss law doesn't help. I tried many things, but it seems I have a big misunderstanding and I can't seem to figure out what to do. Outside I can consider two non-uniformly charges balls distanced a small $d$ that act as a big dipole, but what about inside? How does one find the electric potential in such situations? Do the outer shells generally contribute to the potential inside some $r<R$ ball or not?   Just clarifying this is not a specific homework question I want a solution to but a general concept I can't seem to figure out.

When you are inside some non uniformly and non radially polarized sphere, why do the dipoles from outer shells don't affect you (the potential there is only due to inner dipoles from what I have seen)?


I've been trying to solve the exercise 7(a) of Velleman's "How To Prove It" and haven't succeeded. It asks the verification of the following equivalence:  $$ (P \to Q) \land (Q \to R) = (P \to R) \land ((P \leftrightarrow Q) \lor (R \leftrightarrow Q)) $$  While checking the website for help, I found a question posed by the user "yamad", who, despite his concern with a step futher on the resolution, came to this possible reduced form:  $$(\lnot P \lor Q) \land (\lnot Q \lor R) \land (\lnot P \lor R)$$  The problem is I couldn't even get to this step or any other simplfied form. I would appreciate if someone could provide me a hint.

I am self-studying out of Velleman's "How to Prove It", and am trying to solve exercise 7, part a from section 1.5. The problem is to show that  $$ (P \to Q) \land (Q \to R) = (P \to R) \land ((P \leftrightarrow Q) \lor (R \leftrightarrow Q)) $$  By converting the right-hand side to the equivalent AND/OR statements I was able to simplify the expression to  $$(\lnot P \lor Q) \land (\lnot Q \lor R) \land (\lnot P \lor R)$$  which is equivalent to the left-hand side (confirmed through truth tables, Venn diagrams, and Wolfram Alpha), but I am having trouble showing it analytically. Clearly, the first part of this statement is identical to the left-hand side. But I cannot figure out the analytical steps to show that $\lnot P \lor R$ cancels out of the statement. I've tried distributing the statements into each other completely, but I keeping ending up back at the above expression.  By converting back to conditional statements, the fact that $\lnot P \lor R$ is dispensable becomes intuitive to me. That is, it makes sense that $P \to Q$ and $Q \to R$ already implies that $P \to R$. However, I want to be able to show it analytically based on the Boolean laws and I've hit a wall there. I'm sure I'm missing something simple, but it's driving me crazy. Any hints?


I have an installation of Ubuntu 16.04 x64 on my MacBook Pro Retina 2013 15". Using Internet via the Apple Thunderbolt-to-Ethernet adapter is fine but using WIFI internet works the way different: it "sees" the network, it connects and it stay online for about 10 minutes. After it the WIFI interrupts and I have to switch OFF and then again ON the WIFI to recover the connection for the next 5-10 minutes and it repeats and repeats.. over and over..  I have installed driver Broadcom 802.11 (BCM4331 802.11a/b/g/n (AirPort Extreme)) but with this driver the WIFI does not work completely. If I switch to the default driver (via Software&Updates->Additional Drivers) the WIFI works as described above.  Here is a system report:   UPDATE: The output of the lspci -knn | grep Net -A2 command:  03:00.0 Ethernet controller [0200]: Broadcom Corporation NetXtreme BCM57786 Gigabit Ethernet PCIe [14e4:16a3] (rev 10)     Subsystem: Broadcom Corporation NetXtreme BCM57786 Gigabit Ethernet PCIe [14e4:16b4] 03:00.1 SD Host controller [0805]: Broadcom Corporation BCM57765/57785 SDXC/MMC Card Reader [14e4:16bc] (rev 10)     Subsystem: Broadcom Corporation BCM57765/57785 SDXC/MMC Card Reader [14e4:96bc] -- 04:00.0 Network controller [0280]: Broadcom Corporation BCM4331 802.11a/b/g/n [14e4:4331] (rev 02)     Subsystem: Apple Inc. AirPort Extreme [106b:00ef]     Kernel driver in use: bcma-pci-bridge   UPDATED:  The solution, kindly suggested by the user Pilot6, did not work for me as: once I have done it step by step and reboot the WIFI completely disappears from the menu and even system settings.  The only thing began working form that point was to enable the Broadcom driver from the Software&Updates->Additional Drivers menu. But the problem is still the problem: the internet interrupts every 10-15 minutes.  The WIFI module works perfectly on MacOs 10.9 so the problem does not relate to the module's condition at all.  Any help is appreciated!  Thank you!

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


Suppose $a_n\downarrow 0, \sum\limits_{n=1}^{\infty}a_n=+\infty,   b_n=\min\{a_n,1/n\}$. Prove that $\sum b_n $ diverges.  In fact, I have known that two positive divergent series $\sum a_n ~\sum b_n$,  $c_n=\min\{a_n,b_n\}, \sum c_n$ is not always divergent. But I do not know why this above series is surely divergent. Sincerely thanks.

If $\sum_na_n=\infty$ and $a_n\downarrow 0$ then $\sum\limits_n\min(a_{n},\frac{1}{n})=\infty$     My  idea:  $$b_{n}=\min(a_{n},\tfrac{1}{n})\Longrightarrow b_{n}\le a_{n},b_{n}\le\tfrac{1}{n}$$ then I don't know how to go on.


I am very new to latex so I don't really know how any of this works, but i got someone to help me with biber/biblatex (i do not know the difference?) and it has been working fine for weeks, but today when i tried to compile with biber (i use TeXworks) i got the message INFO - This is Biber 2.14 INFO - Logfile is 'BAMaiken20052021.blg' INFO - Reading 'BAMaiken20052021.bcf' INFO - Found 12 citekeys in bib section 0 INFO - Processing section 0 INFO - Globbing data source 'Maikenlitteratur.bib' INFO - Globbed data source 'Maikenlitteratur.bib' to Maikenlitteratur.bib INFO - Looking for bibtex format file 'Maikenlitteratur.bib' for section 0 INFO - LaTeX decoding ... INFO - Found BibTeX data source 'Maikenlitteratur.bib'  and none of my citations work. I looked at the .bib file but i think it looks fine. I dont know what else to do.

I am on a Mac with MacTex 2020 and ran into a strange problem with Biber. Working on a document all was fine, I did not change the bibliography (says my git) and only fixing typos (not even adding cites) and suddenly latexmk stopped working after a Biber run, while that looked like  INFO - This is Biber 2.14 INFO - Logfile is 'doc.blg' INFO - Reading 'doc.bcf' INFO - Found 31 citekeys in bib section 0 INFO - Processing section 0 INFO - Globbing data source 'literature.bib' INFO - Globbed data source 'literature.bib' to literature.bib INFO - Looking for bibtex format file 'literature.bib' for section 0 INFO - LaTeX decoding ... INFO - Found BibTeX data source 'literature.bib'   so harmless in my view. Then with --debug I additionally get in the end.  INFO - LaTeX decoding ... warning: overriding existing definition of macro "jun" warning: overriding existing definition of macro "jul" warning: overriding existing definition of macro "sep" warning: overriding existing definition of macro "jan" [...] warning: overriding existing definition of macro "nov" INFO - Found BibTeX data source 'literature.bib' Unicode::UCD: failed to find unicore/version in /var/folders/hm/gt63cn0j2r7bwbzw7c1hww1r0000gn/T/par-626572676d616e6e/cache-2f8a664c3c933a44d096bcc8d018a5e92bced897/inc/lib /var/folders/hm/gt63cn0j2r7bwbzw7c1hww1r0000gn/T/par-626572676d616e6e/cache-2f8a664c3c933a44d096bcc8d018a5e92bced897/inc CODE(0x7fd026aeb5a8) CODE(0x7fd026aebb90) at /var/folders/hm/gt63cn0j2r7bwbzw7c1hww1r0000gn/T/par-626572676d616e6e/cache-2f8a664c3c933a44d096bcc8d018a5e92bced897/inc/lib/Biber/Input/file/bibtex.pm line 1011.   It seems unrelated to the library itself since deleting a few entries (going through deleting one half, then the other), the problem persists. It does not happen for an empty literature, but as soon as a first entry is added (just author/journal/title/year/volume/pages - no utf8-only chars) this error message appears.  what does this last error message mean?  How can I solve this?


I'm thinking of an example like this one:  The request hits a page at an url (by whichever means), with a parameter. example.com/api/page?name=bob. It's my understanding that you should do a prepared statement to get the $_POST[name]parameter and make sure it's not anything funky, but it does so by evaluating the expression.   My first question is: How does it do so (evaluate the expression)?  My second question is:  What if a user inputs something along the lines of "SELECT * FROM users" or "DROP TABLE users" that gets passed to the $_POST['name'] parameter (the ?name=bob at the end), what would happen in that case?  Just as an example, the final query would be something like   SELECT name, continent FROM world WHERE continent IN (SELECT continent FROM world WHERE name='Brazil')   the second select acting as the user input parameter - so $_POST['name'] contains this query SELECT continent FROM world WHERE name='Brazil'  Lastly, the third question i have is how can i protect against something like that?   I'm guessing PDO is design specifically to prevent query within query(?), but after reading around a bit i'm still quite confused.  I'm still learning all of this so if i'm not clear or specific enough in my inquiry please let me know, and i'll try and address that.  EDIT: To clear any confusion, what i'm doing is this:  $pdo = new PDO('..'); $sql = 'SELECT id FROM users WHERE username = :username'; $statement = $pdo->prepare($sql); $statement->bindParam(':username', $_POST['username']);   Question is, what if $_POST['username'] contains 'SELECT * FROM users' (or any other query) ? How does prepare() work? Can what i described actually present a security hole? I need some help in understanding this.

Let's say I have code like this:  $dbh = new PDO("blahblah");  $stmt = $dbh->prepare('SELECT * FROM users where username = :username'); $stmt->execute( array(':username' => $_REQUEST['username']) );   The PDO documentation says:     The parameters to prepared statements don't need to be quoted; the driver handles it for you.   Is that truly all I need to do to avoid SQL injections?  Is it really that easy?  You can assume MySQL if it makes a difference.  Also, I'm really only curious about the use of prepared statements against SQL injection.  In this context, I don't care about XSS or other possible vulnerabilities.


I want to grab some lists of data from various pages on the web and I'm using IMPORTXML to do it.  Assume I have a list of URLs in column D.  Depending on the URL, the length of the results can be different and I want to have them all in a single contiguous column.  In A1, I've found that the formula  ={IMPORTXML(D1, xpath);IMPORTXML(D2, xpath)}   works for the two URLS in D1 and D2, but I want to be able to pull this off if I have many more URLs listed in the D column.   Going to start with about 10 URLs and add more later, and I will do this with more than one xpath for multiple columns to build out a sheet to do lookups on.  I'd like to just be able to refer to D:D, and I tried that with ARRAYFORMULA(), for example:  =ARRAYFORMULA(IMPORTXML(D:D, xpath))   Did not work. I thought that would perform the IMPORTXML for each element in the column. It only included the URL in D1.  I'm hoping for a sensible option that won't require that I expand the first formula to keep repeating the IMPORTXML for every row in D, and then as I add URLs later, to have to keep extending the array.

I’m using importdata to retrieve Yahoo stock information, which works fine on individual rows, but when combined with arrayformula to fill down the page when additional symbols are added does not initiate continue. The formula I'm using is:  =arrayformula(ImportData("http://finance.yahoo.com/d/quotes.csv?s="&CONCAT(A2:A,B2:B)&"&f=snk2l1jkm3m4"))    A2:A contains the stock codes B2:B contains the exchange code, e.g., .ax for Australia


Was reviewing some Bitcoin public-key hash literature and the use of RIPEMD-160 and the SHA-256 as below:   RIPEMD160(SHA256(ECDSA_publicKey))   The Proof-of-work on the other hand uses SHA256 two times (instead of RIPEMD-160).  There is some notes on why RIPEMD160 was chosen ().  Considering the 256-bit output space of SHA256, what would happen (theoritically) if one were to use SHA256 on a SHA256 output? For example:  SHA256(SHA256(x))   Would this be a ? or  mapping?  Can such mapping be used, in any way, to break the SHA-256?   Since SHA-256 is supposed to be a one-to-one function, there is no way the SHA256(SHA256(x)) could be injective function (since the input space and output space are both 256-bits). But if it is not injective, then SHA-256 cannot be one-to-one function for longer message (>256-bit input). How is this contradiction being worked out in the algorithm?

According to , "SHA-256d" was proposed in one of the Ferguson/Schneier books like so:  SHA-256d(x) = SHA-256(SHA-256(x))   Apparently, the motivation for this construction is to avoid length extension attacks.  Incidentally, SHA-256d is the hash function forming the core of Bitcoin.  According to the comment on the answer linked above, "some minor weaknesses" are known in SHA-256d. What are they?


Seems basic and straight forward right?  Import a picture from a domain where you intentionally made the backgound transparent to find it with a clear white background once opened up in Blender.  My question: How... in 2.8, do you import a picture namely of LinArt with a transparent background or with, and then remove that background the picture most likely has been stuck onto once its opened in blender 2.8 to originally be left with literally just the lineart?

I'm designing this animal-type creature, and want to add a transparent .png image to its face with the face features (object has a subsurf). On the left is the image with the features, on the right is the part of the object where I want it to be.    I tried to import the image as a plane, but matching the shape of the plane with the face didn't work, and the lines of the face left shadows on the head, and could be seen as a different object from some angles (although it's the closest I've gotten yet). It looked like this:    So , I tried selecting the faces of the head that the features should go over, and create a new material for it. Unfortunately, since the .png is transparent, the result produced was this:    (where it's impossible to tell the transparency from a black background default color, and where I wouldn't know where to start to adjust size and position).  I also tried UV mapping, but then the whole object became black with the features repeated all over.   Is it something I have to go into Nodes for? I'm kind of stuck here. Creating a new material and applying it is simple, but applying a material that is an image is a bit more complex it seems... Ideally, I would reproduce the same technique for the adhesive bandage on its arm (seen on the right of image 1).


I used locate <filename> in order to see where are all the files with <filename>. Is there a command to delete all the files with that <filename>? For example, I want to delete all the files with the name qownnotes as in image

At the moment his is what I do:  Step 1:  locate fooBar /home/abc/fooBar /home/abc/Music/fooBar   Step 2:  Manually perform a removal, by copy-pasting each line.  rm /home/abc/fooBar rm /home/abc/Music/fooBar  How do I do this in one step? Something like  locate fooBar > rm  Thanks.


I see these message. Which means that terminal uses some disk cache. How to disable it using disk caches? Thanks.  "Your disk space is critially low."  Older terminal scrollback contents may be automatically discarded to conserve VM backing store".

When using Terminal.app, you can clear the screen by using the shell builtin clear or by pressing ^+L (Control-L).   However, all this does is push the current screen content back one screen height and reset the cursor/input at the first line. Meaning you can still scroll back and see it.  What you are also able to do, is reset your entire scrollback by pressing ⌘+K (Command-K).   After you've done this, you cannot scroll back at all.  In certain situations (notably, before running screen or vim), I'd like to reset the scroll back before the command actually executes.  Is there a command (like clear) that is implemented in OS X that allows me to do this? Given the existence of pbcopy and pbpaste, I'm thinking something similar might exist that will allow me to do this.


I'm using the built-in equation tool in Keynote. Is there a way to change the font used by default in Keynote?  Also, I see that when I try to use text in the equation via \text{} the font is in bold mode. How can I change that?  Note that a relevant Keynote question has been asked .  As an example for the font change see this picture   As an example for the bold text see the picture which was generated by \Gamma \text{ is fixed}     Note that this question is not a duplicate of . All of the options mentioned in the linked question are such that simply add a characteristic to the font (italics, bold, roman etc.) but they do not change the font.

During a Pages update which was pushed out a few months ago, Pages obtained the ability to write equations using LaTeX or MathML commands. According to an Apple Support article, the size and color of the equation can be changed ():  The equation appears at the insertion point in your document (or before the selected text). The equation is an inline object, the same size and color as the surrounding text. If you change the size or color of the surrounding text, the size and color of the equation’s font also change.  This does not mention anything about the font used for the equation itself, which seems to be something similar to a Times New Roman font. Is there any way to change the font used, preferably to something like Latin Modern Math? I was considering the possibility of replacing the font file Pages uses with a downloaded Latin Modern Math font file, but I'm not sure what to replace. Could I replace Times New Roman in /System/Library/Fonts/ or something like that?


Visa type: Visit (family)   Timeline: Biometric: sept 17 Concluded: October 6 Passport ready for pick up: October 15. Outcome: Denied       I applied for a month's visit visa to visit my family - (my parents and brother). One of the reasons was to see them, while the other was for my moms graduation earlier this month.  My parents are citizens while my brother has a permanent residency. I just picked up my application yesterday and it was denied due to 2 ridiculous reasons. 1. My sponsor (mom) does not have enough money in her joint account with my dad to donate 800 pounds to my flight which was mentioned in my application. 2. I do not have up to the money I claimed I had in my savings.  Now, I say the reasons were ridiculous because, I submitted two accounts for my sponsor (mom) as supporting documents:   Joint account with my dad which had 63 pounds balance, which was the one they checked. But the purpose of this was only to show my parents were married and share a joint account. My mom's personal account which had enough money about 4000 pounds to cover the 800pounds flight cost.   So obviously, they only checked one account and did not check the main account and assumed she does not have any money of her own.  Secondly, in the form, I declared a savings of 7k pounds and I submitted my 3 bank accounts to support this. They miraculously checked and mentioned only one bank account which had just 4k pounds in it. And they claimed, the 4k was not up to the 7k savings I claimed. For Gods sake, I submitted 3 personal bank accounts and 1 company account. They claimed I submitted 2 accounts, 1 for company and 1 personal with the 4k savings.  Also, I did write a brief but comprehensive cover letter detailing everything and the supporting documents attached.  I registered my company in May, and prior to that all business transactions have been going through my personal account. All these was explained, with proof of earnings and the source, but they obviously did not check and of that and only cherry picked what they want and made a decision that does not add up. They claimed I was self-employed, I am not self-employed. I am employed by my company and payslip of monthly salary of 360k per month was attached.  Also, they mentioned they are not satisfied my sponsor will provide financial support to me during my stay. I never said she would. My mom is only contributing 800pounds to the budget of 2k pounds. The 800 was only for my flight (which isn't a cost I can't even handle myself, she only planned to do that as a gift). I also included in my cover letter than the rest of the travel expense (1.4k pounds) will be covered by me for accommodation and feeding as I planned to rent an hotel close to where they live.  Now, the thing is I am not desperate to go to the UK, I really don't care as it was just to visit my family, however, all the reasons they refused me for were incorrect.  Do you guys advise me to reapply immediately to contest the decision?  I am thinking if I leave it and apply at a later time, it may confirm their thinking that their decision was right and that I and mom really do not have the funds.  Secondly, if I reapply now, how can I ensure that they check all the documents I submitted especially since it is obvious that they do not check a lot of the supporting documents and cover letter? Where should I put the details they failed to check? If I put all this in another cover letter for the new application, what's to say they will check or not even refuse again?

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


Question presented: Is following a function from the indicated domain to the indicated co domain?     $f:\Bbb Z_{4} \rightarrow \Bbb Z_{6} \text{ given by }$   $ \bbox[white,1px,border:1px solid red]{f(\overline x) = {\left [ 2x+1\right]} } $   Q.S: So my main question for this problem is how does the co domain $f(\overline x) = [2x+1] $ affect the equivlanece class $\Bbb Z_{4}$?   QS: So according to my work here would it be correct to assume that $\Bbb Z_{4}$ would change because of the codomain.   Q.S: Lastly how does $x =y(mod)m$ affect the final result of the problem?  In this case we represent an element of the domain as an $\bar x$ and use the notation $[x]$ for equivalence classes in the co-domain.  The set of equivalence classes for the relation $\cong_{m}$ is denoted $\Bbb Z_{m}.$  $f(\overline0) = [1],f(\overline1) = [3],f(\overline2) = [5],f(\overline3) = [7],f(\overline4) = [9],f(\overline5) = [11],f(\overline6) = [13] $  $(4x+0)*2+1 \;\text{ This is what I am doing to get the result for the work bellow for  } \Bbb Z_{4} $ $x$ is an integer that is being multiplied to get the result it  is a visual representation for the function.  $\Bbb Z_{4},\; \overline 0 = \{ ...,-15,-7,1,9,17,... \} \; \Leftarrow \Rightarrow(4x+0)*2+1 $  $\overline 1 = \{ ...,-13,-5,3,11,19.., \} \Leftarrow \Rightarrow \; (4x+1)*2+1$  $\overline 2 = \{ ...,-11,-3,5,13,21,... \}$  $\overline 3 = \{ ...,-9,-1,7,15,23..., \}$  $\Bbb Z_{6}, \; \overline 0 = \{ ...,-12,-6,0,6,12,... \} \Leftarrow \Rightarrow \qquad (6x+0) $  $\overline 1 = \{ ...,-11,-5,1,7,13,... \} \Leftarrow \Rightarrow \qquad (6x+1)$  $ \overline 2 = \{ ...,-10,-4,2,8,14,... \} \Leftarrow \Rightarrow \qquad (6x+2)$  $ \overline 3 = \{ ...,-9,-3,3,9,15,... \} $  $ \overline 4 = \{ ...,-8,-2,4,10,16,... \}$  $ \overline 5 = \{ ...,-7,-1,5,11,17,... \}$  The reason for this not being a function is because $\Bbb Z_{6} \;  \overline 0 \neq \overline4 \; $ or $[1] \neq [9] $

By naming an equivalence class in the domain that is assigned at least two different values prove that the following is not a well defined function.     $$f : \Bbb Z_{3} \to \Bbb Z_{6} \;\;\;\text{ given by } f(\overline x) = [x]  $$      In this case we represent an element of the domain as an $\bar x$ and use the notation $[x]$ for equivalence classes in the co-domain.   $f(\overline0) =  [0] \;,$  $ \Bbb Z_{3}  \quad (3x+0)\;\; \overline 0 = \{ ...-6,-3,0,3,6...  \}, \; \Bbb Z_{6}\;  (6x+0)\; \overline0 =\{ ...-12,-6,0,6,12...\}$   $f(\overline1) = [1], $ $\qquad   \; (3x+1) \; \;\;\;\overline   1 = \{ ...-5,-2,1,4,7 ... \},\; \;  (6x+1)\;\overline1 =\{...-11,-5,1,7,13.. \}$  $f(\overline2) = [2], $ $\qquad  \qquad \qquad \;\overline 2 = \{ ...-4,-3,2,5,8 ... \},\;\;\overline 2 = \{ ...-10,-4,2,8,14  ...\},\;$  $f(\overline3) = [3] ,$  $\qquad \qquad \qquad \qquad \qquad \qquad,\; \quad \quad \quad \; \; \; \;\overline 3 = \{ ...-9,-3,3,9,15 ... \},$  $f(\overline4) =  [4],\qquad \qquad \qquad\qquad \qquad\qquad \; \quad \quad \quad \quad \; \;\overline 4 = \{ ...-8,-2,4,10,16...  \}, $   $f(\overline5) = [5], \qquad \qquad \qquad\qquad \qquad\qquad \; \quad \quad \quad \quad \;\;\overline 5 = \{ ...-7,-1,5,11,17...  \},  $  $f(\overline6) = [6] ,$  So my main question for this problem is how to find out if this question is not a function. From the information I have gathered here I still cannot see why this is not a function any help on showing how this is not function would be much appreciated.     The set of equivalence classes for the relation $\cong_{m}$ is denoted $\Bbb Z_{m}$   The $ 3x+0 \text{ and } 6x+0$ are just showing how I got $\overline 0 $


I have code like this:  $thi = $dinfoarray->totalItems;         var_dump($thi);         // $thi is NULL     if ($thi == 0) {        // execute code here if $thi = 0.     else {         print "We have issues. The query is: $queryl";         die();     }   the if part is meant to execute when $thi is integer 0. But when var_dump shows that $thi = NULL, the if part still executes. Why, and how do I make it work?

What is the difference between == and ===?  How exactly does the loosely == comparison work? How exactly does the strict === comparison work?  What would be some useful examples?


question: How many integers between 1 and $10^4$ contain exactly one 8 and one 9? I try do this, but i don't know if this is good, i ask my teacher and she says this:  IN A_3 more accounts look at lines 2 and 4 from bottom to top are the same numbers,    I advise you to ask yourself first about the ways to put 8, 9 and then the remaining numbers.

I have this problem: How many integers between $1$ and $10^4$ contain exactly one $8$ and one $9$?, but i dont know if $18, 19, 28, 29...$ serve, else it could be $8$ y $9 = 2$ numbers, help please.


Am getting below error when trying to install VLC:  You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: libvlc5 : Depends: libvlccore9 (>= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1~) but it is not going to be installed vlc : Depends: vlc-bin (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed       Depends: vlc-l10n (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed       Depends: vlc-plugin-base (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed       Depends: vlc-plugin-qt (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed       Depends: vlc-plugin-video-output (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed       Recommends: vlc-plugin-notify (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed       Recommends: vlc-plugin-samba (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed       Recommends: vlc-plugin-skins2 (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed       Recommends: vlc-plugin-video-splitter (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed       Recommends: vlc-plugin-visualization (= 3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   Output of apt-get -f install:  The following additional packages will be installed: libvlccore9 The following NEW packages will be installed: libvlccore9 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 2 not fully installed or removed. Need to get 0 B/472 kB of archives. After this operation, 1,247 kB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 359521 files and directories currently installed.) Preparing to unpack .../libvlccore9_3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1_amd64.deb ... Unpacking libvlccore9:amd64 (3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1) ... dpkg: error processing archive /var/cache/apt/archives/libvlccore9_3.0.0~rc1~~git20171214+r73255+108~ubuntu16.04.1_amd64.deb (--unpack): trying to overwrite '/usr/lib/x86_64-linux-gnu/libvlccore.so.9.0.0', which is also in package libvlccore8:amd64_3.0.0~~git20171210+r73147+99~ubuntu16.04.1 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Processing triggers for libc-bin (2.23-0ubuntu9) ... Errors were encountered while processing: /var/cache/apt/archives/libvlccore9_3.0.0~rc1~~git20171214+r73255+108~ubun tu16.04.1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   Can anyone please help me fix this error and install vlc

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


Sometime the distribution of a variable is not normal, either left or right skewed, and people tend to transform the distribution by doing x^2 or log(x), etc to make it look more normal.   Question is why this would help model accuracy?  Thanks,

Mboxcox in Stata suggests transforming my variables using a power of 0.1 for the independent variable, and 0.4 for the dependent variable.  I have run the model, and it fixes problems associated with the assumptions of OLS. But certainly, it complicates matters in terms of interpretations.  Please outline possible interpretations and solutions.  Dependent variable is in millions of dollars, and independent variables are number of years.  and a number of dummies which do not require transformation.


How can I prove this? $$\binom{2n}{n} \geq \frac{2^{2n}}{n+1}$$ I tried using AM-GM but it didn't help.

How can I prove this inequality for all natural numbers $n\geq 2$?  ${2n\choose n}>\frac{4^n}{n+1}$  I've tried induction but that was a dead end.


My daughter, who is a dual citizen (US and Spain), is returning from Spain after being there for 9 months studying. She entered Spain on her Spanish passport. She will check in for her flight back to the US with her US passport (proof to Iberia that she can enter the US) and enter the US with her US passport as required by US law. The trick is the exit from Spain as there is no entry stamp on her US passport, since she entered on her Spanish one. The suggestion seems to be that while she is flying on her US passport that she goes through EU passport control on her way home with her Spanish passport as there's no stamp in her US passport.  A potential issue could be that if the Spanish ask for her boarding pass at passport control when leaving Spain, her name on her US passport and thus her boarding pass is slightly different than on her Spanish passport. In the US, she has just my husband's last name and on the Spanish passport, she has his name and my name (the sedan family name). Thoughts?

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


Let $a,b,c$ be positive real numbers with $abc = 1$. Prove that $$\dfrac{1}{a^3(b+c)}+\dfrac{1}{b^3(a+c)}+\dfrac{1}{c^3(a+b)} \geq \dfrac{3}{2}.$$   Attempt  We can rewrite it as $\dfrac{bc}{a^2(b+c)}+\dfrac{ac}{b^2(a+c)}+\dfrac{ab}{c^2(a+b)}$. Then, using AM-GM we have $$\dfrac{bc}{2a^2\sqrt{bc}}+\dfrac{ac}{2b^2\sqrt{ac}} \dfrac{ab}{2c^2\sqrt{ab}} \geq  \dfrac{bc}{a^2(b+c)}+\dfrac{ac}{b^2(a+c)}+\dfrac{ab}{c^2(a+b)}.$$ I get stuck here.

$a,b,c$ are positive reals with $abc = 1$. Prove that    $$\frac{1}{a^3(b+c)}+\frac{1}{b^3(a+c)}+\frac{1}{c^3(a+b)}\ge \frac32$$   I try to use AM $\ge$ HM.  $$\frac{\dfrac{1}{a^3(b+c)}+\dfrac{1}{b^3(a+c)}+\dfrac{1}{c^3(a+b)}}3\ge \frac{3}{a^3(b+c)+b^3(a+c)+c^3(a+b)}$$ Then how I proceed.


If we have a given function,f(t),whose laplace transform can be calculated, then what does the transform mean. What is the physical meaning of the new function formed F(s) and what is the role of the new variable formed

I've been reading up a bit on control systems theory, and needed to brush up a bit on my Laplace transforms. I know how to transform and invert the transform for pretty much every reasonable function, I don't have any technical issue with that. My only problem is that some theoretical things are not entirely intuitive.  This is my current understanding of the Fourier transform: We have an function, member of an infinite dimensional space, and we want to decompose it in terms of basis functions $e^{j\omega t}$. To do so, we project (analogously to taking the dot product) our function onto the basis functions, using the following definition of an inner product for the function space: $\langle f, g\rangle = \int_{-\infty}^{+\infty}f(t)\cdot g^*(t)dt$, which gives rise to the Fourier transform: $F(j\omega) = \int_{-\infty}^{+\infty} f(t)\ e^{-j\omega t}\,dt$. Reconstructing the original function from the coefficients times the basis functions gives $f(t) = \frac{1}{2\pi}\int_{-\infty}^{+\infty} F(j\omega)\ e^{j\omega t}\,d\omega$  Now, looking at the definition of the Laplace transform, it looks like it's trying to do the same thing using underdamped/overdamped sinusoids of the form $e^{\sigma t}e^{j\omega t}$, instead of pure sinusoids like the FT. This enables representing functions which don't vanish at infinity, but rather can diverge exponentially. However, it doesn't quite fit in the framework I laid above. First of all, the inversion integral confuses me. $\mathcal{L}^{-1} \{F(s)\}(t) = f(t) = \frac{1}{2\pi j}\int_{\sigma-j\infty}^{\sigma+j\infty}F(s)e^{st}\,ds$. Why am I free to do the integration for any value of σ, as long as it's bigger than the real part of the rightmost pole? If I plug  in $s = \sigma + j \omega, ds = j d\omega$, I can pull $e^{\sigma t}$ out of the integral, to get $\mathcal{L}^{-1} \{F(s)\}(t) = f(t) = \frac{e^{\sigma t}}{2\pi}\int_{\infty}^{+\infty}F(\sigma+j\omega)e^{j\omega t}\,d\omega$. It appears strange to me that the $e^{\sigma t}$ term has to be exactly compensated by the fact that the transform is being evaluated more to the right or to the left. Also, when analyzing systems using the Laplace transform, the main thing we're interested in is the location of its zeros and poles. Intuitively, I would expect that, since the function "blows up" at the poles, there would be large contributions from those amplitudes in the inversion integral if it passed near the poles. However, if it can pass arbitrarily far away from the poles, it doesn't make as much sense...  I'm sorry if I'm not explaining myself as well as I wanted to, but this isn't really that easy to express...  Cheers


Can anyone tell me what the difference between installing a python module using pip3 install "something" and sudo apt install "something"? Eg: sudo apt install python3-sklearn and pip3 install scipy --user

What is the best way to install Python packages in Ubuntu 11? I am a recent convert to Ubuntu and want to learn best practices.  For context, I am looking to install the tweeststream package, but I did not see it in my Synaptic package manager. Also, I am very new to programming, but I usually can follow along with code samples.


I have a C# application running under a vendor provided application framework that has a bug in it. I can work around the bug by using reflection to redirect an event handler, but I need to get the instance of the class. I can see the bug from the logging.  I don't have source for the application framework and the application framework is no longer supported by the vendor.  I know that memory profilers like redgate can inventory everything in memory so there must be an approach that can get me started.  So how do I grab an instance of an object where I do not have a direct reference?

We need to get all the instances of objects that implement a given interface - can we do that, and if so how?


As the title says, is there a SE site which lets people ask about technical bugs / problems about video games? Made-up example, I found a bug where you can die randomly while flying in Minecraft.

On which Stack Exchange site can I ask questions like        When will [some new feature] for [some product] be released?   Where can I download an update for [some product]?   I'm getting errors when accessing the customer portal for [some company] – how can I fix this?   Why was I banned for doing [some action] on [some platform]?   Why is [some company] discontinuing [some product]?   Why is [some company] giving away [some product] for free?   What's the price for [some product]?      or any other product support/customer service questions?  It's not a product related to programming (or I've read  on Meta Stack Overflow) so I know Stack Overflow isn't the right place. Which other site in the network will take these kind of questions?


In the program I am writing for homework I have a FileInputStream which I am reading bytes from into an array using the read() method of the stream. I am not using the return value at all in my program, as I'm not interested in it.   However, I'm wondering how is it actually modifying my array? I read through many stackoverflow posts lasts night that indicated that Java is pass by value, not by reference, and I even proved it myself with a simple program.   How does this method modify my byte array?  try {     input = new FileInputStream(FileName);     bytes = new byte[input.available()];     input.read(bytes); // reads file in as bytes and stores into bytes     System.out.println(bytes[0]);   }catch(IOException e) {     e.printStackTrace(); }

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


I would think this question has been asked before, but was not immediately able to find an answer.  Say, somehow, a Pet reference is assigned a Dog object:  Pet pet = new Dog();   If I write  pet.attackInvader();   The child class (Dog)'s method is called by virtue that all functions in Java are virtual.   Is it possible to invoke Pet's attackInvader() instead?  (I know I can edit Dog's method to call super, but, in this case, assume I cannot change Dog's implementation.)

I have two Java classes: B, which extends another class A, as follows :  class A {     public void myMethod() { /* ... */ } }  class B extends A {     public void myMethod() { /* Another code */ } }   I would like to call the A.myMethod() from B.myMethod(). I am coming from the , and I don't know how to do this basic thing in Java.


Hi I'm working on a workflow product with a 'home' page for storing your files. I'm curious about whether there is a good reason for navigating to the file clicked vs. opening a new tab.   So far I haven't come across a solid reason for either. At a high level, opening a new tab feels more like working w/ the finder. The downside is that you might not have kept your home tab open or it could be hard to find. But the downside is also the same if you navigate to a new page on the same tab. I guess you'd want the user to know where they are whenever they are on the page.

There are links, buttons, images and much more that directs users to new pages.   In my opinion, it should always stay in the same tab unless it's a PDF or download item. But when is it acceptable to open things in a new tab?


What is the easiest way to set an incoming ntp server and then set the local tz so the ntp is syncing correctly?

I installed NTP server on Ubuntu Server 10.04 using:  sudo apt-get install ntp   The NTP daemon seems working and listening on the 123 port.  However, I was not able to get the time from another machine:  sudo ntpdate -u my_ntp_server 23 Nov 18:48:41 ntpdate[2990]: no server suitable for synchronization found   Is there any necessary configurations to do?