Detect the direction of balls after collision

I'm building a simple Android Game. And I'm stuck on detecting the direction of a collision of two balls. I have a moving ball A, and a fixed ball B. Ball A is much smaller than B. I do not care about the mass of two balls. After the collision of two balls, the ball B is disappear, and the ball A changes the direction! I want something like this..  Here is my current code: private void collision(Ball a, Ball b){         if(b.isVisible){             double d = Math.sqrt((a.cx - b.cx)*(a.cx - b.cx) + (a.cy - b.cy)*(a.cy - b.cy));              if(d <= a.radius + b.radius) {                 b.isVisible = false;                 if(a.dx * b.dx < 0 && a.dy * b.dy < 0){                     a.dx = - a.dx;                     a.dy = - a.dy;                     b.dx = - b.dx;                     b.dy = - b.dy;                 } else if(a.dx * b.dx < 0){                     a.dx =- b.dx;                     a.dx = - b.dx;                 } else if(a.dy * b.dy < 0){                     a.dy = - a.dy;                     b.dy = - b.dy;                 } else{                     a.dx = - a.dx;                     a.dy = - a.dy;                     b.dx = - b.dx;                     b.dy = - b.dy;                 }             }          }      }  But it just reverses the direction of the ball B So, I'm finding the better solution. Anyone help? Thanks a lot!


Is there a general solution to the water-bucket logic problem?

Having an infinite supply of water and two containers, one for 3 liters and one for 5 liters, how would you measure 4 liters?  Each step in the solution can be one of three things: Fill up a container all of the way, empty a container completely, or use one container to fill up another as much as possible.  The solution to the original problem is: Fill the 5 litre bucket (completely). The buckets are now 5/5 and 0/3. Pour the 5 litre bucket into the 3 litre one. They are now 2/5 and 3/3. Empty the 3 litre bucket. They are now 2/5 and 0/3. Pour the 5 litre bucket into the 3 litre one. They are now 0/5 and ⅔. Fill the 5 litre bucket. They are now 5/5 and ⅔. Pour the 5 litre bucket into the 3 litre one. They are now 4/5 and 3/3. Now, you have one bucket with the required amount of 4 litres.  Is there a standard algoritm to determine a possible solution, or even the shortest solution?


I failed to find the background soundtracks for some Android games, so I thought I could just record their music when the game is active but I don't seem to have any solution to do so.   I first thought of using some Android apps but all I see in Play Store and forums are links to apps recording voice of the user or the external environment (using mic) while I'm interested in audio I hear from speaker or earphones.    I also came to know of screen recorders but my default screen recorder records sound using mic and using screen recorder is an overkill since it tends to use a lot of CPU which is needed for the game. But I'm open for any suggestion.  Then I thought to find a file or something under Android which may be redirecting output to earphones or speaker or may be grab that final end and save it using ADB, but I seem to have no idea how to do that.  I would like to draw attention specifically to the said ADB part i.e. anything related to Android that could solve the problem since the other parts or even the title might be considered off-topic for being Android Independent.  So, how exactly do I record my favorite game's music?   Note that the question can be extended to any app, be it a media streaming or lecture app, or anything that plays sound and user wants to record it.  I'm using OnePlus One running CM12 and is rooted.


My Makefile looks like this:  %.foo: %.bar     cp $< $@  test: *.foo     echo *.foo   I have 2 files in the directory: a.bar and b.bar. When I run make test it outputs:  cp b.bar *.foo echo *.foo *.foo   It also creates a file *.foo in the current directory.  I am actually expecting to see this:  cp a.bar a.foo cp b.bar b.foo echo *.foo a.foo b.foo   And also creating a.foo and b.foo. How to achieve that?


In Fiverr there is a complete subcategory to "". Some of the descriptions in the category claim that "these traffic will boost your ranking or your biz". Is it true? How new traffic could improve a website rankings?


Under Terminal.app and iTerm2, the key combination ^O is not received by many terminal programs. For example, /bin/bash does not receive ^O. Indeed, if /bin/bash could receive ^O, then ^V^O would output ^O (see quoted-insert in bash(1)). However, ^V^O produces no output, and bash remains in quoted-insert mode: it outputs the next character it receives verbatim. Similarly, neomutt does not receive ^O when compiled with ncurses (but it receives ^O when compiled with s-lang). In contrast, /bin/zsh and vim correctly outputs ^O after ^V^O. What is going on? I thought it could be due to an ncurses bug, but I can reproduce the behaviour in both programs compiled using the built-in ncurses library, and an updated copy of ncurses: bash-3.2$ otool -L /bin/bash /bin/zsh /opt/local/bin/neomutt /opt/local/bin/vim | egrep '(:|curse)' /bin/bash:         /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0) /bin/zsh:         /usr/lib/libncurses.5.4.dylib (compatibility version 5.4.0, current version 5.4.0) /opt/local/bin/neomutt:         /opt/local/lib/libncurses.6.dylib (compatibility version 6.0.0, current version 6.0.0) /opt/local/bin/vim:         /opt/local/lib/libncurses.6.dylib (compatibility version 6.0.0, current version 6.0.0)


Definition of the " leave" :to make or allow sb/sth to remain in a particular condition, place, etc.  Leave the window open.    (verb + object+ adjective) I Left the headlights on.  ( verb + object + preposition) Don't leave the water running. (verb + object + verb-ing) He left the children to sleep in class. ( verb + object + to-infinitive) The hurricane left hundreds of tourists stranded at the airport.  (verb + object +?)  Example 1 to 4 can be found in Oxford English Dictionary, Cambridge Dictionary or Collins Dictionary, yet Example 5 doesn't appear in these dictionary. Is "stranded" a past participle or an adjective?


Editing shortcut (.lnk) properties with Powershell

I've found a nasty VBS way to do this, but I'm looking for a native PoSh procedure to edit the properties of a .LNK file.  The goal is to reach out to remote machines, duplicate an existing shortcut with most of the correct properties, and edit a couple of them.  If it would just be easier to write a new shortcut file, that would work too.


Under what conditions is the exponential map on a Lie algebra injective?

Let $G$ be a Lie group with Lie algebra $\mathfrak{g}$ and let $\exp :\mathfrak{g}\rightarrow G$ be the exponential map.  In his blog,  that if a Lie group is not simply-connected, then $\exp$ will not be injective.  Conversely, is it true that if a Lie group is simply-connected, then $\exp$ is injective?  If not, what is a counter-example?


I was trying to add missions to my museum in Minecraft, and i tried adding an extra text part to my /tellraw message. The command is below, copy/pasted from a command block:     tellraw @p {"text":"(Mission #1)","color":"blue","extra":[{"text":"There are FungusKing_III heads hidden around the museum. See if you can find them all!","color":"dark_blue""}}   Why isn't this working, and how can I fix it?


As in title: How can I turn off an Android phone in the same Ethernet remotely using a Windows computer? They are in the same Local Area Network and connected to the same router, the Android phone is connected to the router via WiFi and the Windows computer is connected to the router via a cable. I have tried numerous times to get a solution using Google search with different keywords, and objectively Google isn't very competent in understanding complex sentences and I can't get what I am looking for, see for yourself what the results Google gave: , most of the results are exactly the opposite of what I intended to achieve. I want to connect to the phone wirelessly and send commands through WiFi. I figure I need to use either Telnet or SSH to do this, log into the Android device remotely and use Android terminal commands to shutdown the phone. Unfortunately I have tried telnet and here is the result: C:\Windows\System32>telnet 192.168.1.3 Connecting To 192.168.1.3...Could not open connection to the host, on port 23: Connect failed  I know what this means, this is because telnet port is not open and the telnet server isn't online on the Android phone by default. So naturally I need to install some application on the Android phone that runs the telnet/SSH server and opens the telnet/SSH port, and setup a login and password, so I can connect to the phone remotely and it has to somehow execute the commands. The phone isn't rooted, but I have Android Studio and the phone does have USB Debugging, what tweaks do I need to make in order to enable remote logging? And I don't know how to use Android terminal, is there even a command line interface shell on Android? I don't have any experience with this, however from what I have learned Android is based on Linux and I have some experience in Ubuntu 20.04 LTS WSL, I know I can use these commands: sudo power off shutdown -h now  Android must use something similar. How can I achieve this?  The suggested duplicate:  doesn't answer my question because it shuts down the phone through USB while I have explicitly stated in my question that I want to shutdown the phone wirelessly through WiFi connection.


Getting "apt-get update does not have a Release file" and "Failed to fetch "during `apt-get update`

I have a local Ubuntu repository:    It clearly shows the release file. So, when I do apt-get update from another computer configured to get its updates from the local repo, why does it say, "apt-get update does not have a Release file"?  Below is a screenshot of the errors and warnings I get. I do notice that "apt-get update does not have a Release file" shows up as a warning in the output, but I thought maybe it has something to do with the error which is "Failed to fetch ".    I must inform that the machine where I want to do the apt-get update is behind a proxy. (The other machine is also behind the same proxy.) So, I tried the following:   sudo nano /etc/apt/apt.conf.d/01proxy   Acquire::http::Proxy “http://username:password@proxy_ip:port“;  2.  sudo apt-get clean  cd /var/lib/apt  sudo mv lists lists.old  sudo mkdir -p lists/partial  sudo apt-get clean  sudo apt-get update   3. sudo nano /etc/apt/apt.conf  Acquire::http::Timeout "1";  (I did this only because it was taking a long time to display the errors)  4. sudo nano /etc/apt/apt.conf.d/piplining-off.conf  Acquire::http::Pipeline-Depth "0";  None of these are helping. What I do notice is that when I switch off the proxy, I can wget the files from the local repository.   wget http://160.88.114.18/ubuntu/dists/xenial/main/binary-amd64/Packages --2017-12-22 15:19:19--  http://160.88.114.18/ubuntu/dists/xenial/main/binary-amd64/Packages Connecting to 160.88.114.18:80... connected. HTTP request sent, awaiting response... 200 OK Length: 7228243 (6.9M) Saving to: ‘Packages’  Packages                                                   100%[========================================================================================================================================>]   6.89M  --.-KB/s    in 0.06s   Also, I should mention that the local mirror has only stuff downloaded from www.archive.ubuntu.com, and no other PPAs have been added to the sources.list of the target machine. So, it couldn't be a case of extinct PPAs. Any help is appreciated.


How to addmessage from a trigger to a visualforce page

I have a visualforce page with a controller extention. This page has some inputfields where     I want to send a waring on the page before insert if the fielsd are filled in incorrectly.   I am using a trigger but this redirects my to the standar errorpage of SF.     How can I addmessage to the VFP from the trigger instead of an error message so the message is shown on the VFP page with input fields   Here is my trigger:  trigger accountSearchTrg on Contact (before insert,before update) {     List<Account> CheckAcc =[SELECT id, (SELECT Splits__c FROM Contacts) FROM Account WHERE id IN (SELECT AccountId     FROM Contact  WHERE Splits__c=true)];      for (Contact c : Trigger.New) {         if(CheckAcc.size()>1) {                          c.AddError('Not Possible');         }     }      }


Unable to locate pipelight-multi package

sudo apt-get install --install-recommends pipelight-multi Reading package lists... Done Building dependency tree Reading state information... Done   E: Unable to locate package pipelight-multi  I got that error, how do I fix this?


How to view the Property Editor in Blender

I am a beginner to blender and have somehow managed to hide the property editor in blender. Is there any way I can bring it back? Thanks


Suppose I book a flight ticket from place A to place B. This flight has a stop at place C.  Is it possible/allowed for me to board the flight at place C instead of place A?  If it is necessary, place A is Edinburgh, place C is London, place B is Bengaluru.


Since when are URLs parsed inside an inline code block?

I just ran across  which had been flagged for a broken link to example.com...  I'd like to see the `[Foobar](http://www.example.com)` URL markdown in comments.   That's all it is. For some reason, the URL in that inline code block is being parsed into an actual URL. The extra closing parentheses on the end is causing it to get flagged as an invalid link. Why on Earth is it getting parsed at all?     I'd like to see the [Foobar](http://www.example.com) URL markdown in comments.   It doesn't get parsed in the post preview as you're typing... and it's not getting parsed in this question's body either...


Can an attacker exploit the nonuniform distribution of letters in a diceware password to improve a brute force search?

I use some diceware pass phrases in some places but I have one question that I can't find the answer to.  Let's say I roll the dice and get $N$ words with a total of $M$ letters and that I don't put spaces in between the words.  An attacker wishing to brute force my secret could have to try $7776^N$ times to break it as a diceware pass phrase OR $26^M$ to break it as a "normal" password (assuming I get only words with letters).  But the attacker trying to break it as a normal password could assume that it is made up of English words and then they'd know that some letters and combinations of letters are more common.  So my $M$ letters will not have the entropy of letters selected at random but some lower entropy.  My question is, what $M$ do I need to make up the same entropy as the $N$ words?


What is the practical Length of photons, in vacuum for example

From practical point of view we know the width of photons is proportional to wavelengths (experiments for light going through tiny holes: it starts with a specific size of the holes, etc). And nobody talks in high-math language for this, though yes, like rings of smoke we understand that when hole size is small enough "effects" depend of materials, objects, etc, because of field density, probability, etc.  What about the photon length, what is it from the similar experiments (were there such experiments)? You are the only person I saw who mentioned that length of photon might be constant.  Any Ideas on what it is? Thank you! P.S. As to comments in quant-equations, packets, etc. - I see it as lack of our math, not as an explanation.


Can I fill the 'about me' section from the Android app?

I think the question is quite clear. I cannot find where can I can fill the 'about me' section from Android app.


How can you configure Chrome to open new browser instances in new windows rather than in a tab?

I want to create new Chrome windows (no tabs) from outside of Chrome, e.g. by running Chrome.exe multiple times.  How can I do this so as to get a single Chrome window?  The default result is to create new tabs in the existing window which requires me to drag and drop the tag to create a new window.


Is there a preprocessor trick that allows me to "include" a file as a string in a header?  Something like this:  a.txt  lorem ipsum dolorem sit amet   and the "magic" include call similar to this:  header.h  MAGICINCLUDE(a.txt, atxt)   As a result, the preprocessor does tricks and the above line is equivalent to this:  const char* atxt = "lorem ipsum dolorem\n\ sit amet";   No external tool shall be used, just the preprocessor: I am trying to get rid of my python scripts that do this.


Suppose that the elements of an n- order determinant are either $0$ or $1$,  I wonder the maximum and the minimum of the determinant.  Furthermore,  I wonder all  possible values of it.  What if I change the question that the elements are either $1$ or $-1$?


What is the relationship between the common concept of "model" and "model" as used in Model Theory?

To my understanding, a model in Model Theory is an interpretation (in a form of a set or other algebraic structures) for a certain sentence S which makes S true.  In everyday language, and also in other branches of science (physics, computer science, biology, ...), model means a formal language used to give an abstract description of phenomena, highlighting only the details we care about for the current analysis.  So, how do these two concepts relate to each other? Since we use the same word, I figured that there may be a connection which could make my understanding of these concepts deeper. In particular, I wonder why we use the world "model" in the "common sense" instead of language, abstract language, formalism, etc.


What problems will I face if I dual boot Windows in UEFI mode and Ubuntu in Legacy mode?

I have Windows 10 installed in UEFI mode. I tried dual booting Ubuntu 14.04 with Windows by using bootable flash drive (I used Rufus for this). But the flash drive doesn't get detected in UEFI mode; it only gets detected in Legacy mode.  I followed both the answers to . I even tried placing the bootx64.efi file inside the boot folder but it was no use. So I thought of installing Ubuntu in legacy mode temporarily. What problems might I face?


Create equivalent to maketitle for beamer template

I would like to predefine a closing slide containing the title of the presentation as well as the name of the author.  For this I would like to define some kind of equivalent to maketitle (e.g. makeendcard) in my beamer class file which creates the slide.  How can I do this?


How do I add mods to Minecraft on Xbox360?

I play Minecraft on my Xbox360. I want to add mods on my Xbox360 but how do I do that? I would like to play the Pixelmon mod on my Xbox360 because I like Pokemon, but I don't know how.


Exercise in Atiyah's book: Prove that an ideal is prime.

Atiyah's Introduction to Commutative Algebra, chapter 1 exercise 14: In a commutative ring $A$ with identity, let ∑ be the set of all ideals in which every element is a zero-divisor. Show that the set ∑ has maximal elements and that every maximal element of ∑ is a prime ideal. Hence the set of zero-divisors in A is a union of prime ideals.  The existence of maximal elements is guaranteed by Zorn's lemma. To prove that every maximal element of ∑ is prime: Given $\mathfrak m$ a maximal element of ∑ and $xy \in \mathfrak m$. There exists a nonzero $z$ such that $xyz=0$. If $xz=0$, then $(x)\in$ ∑. If $xz\neq0$, then $(y)\in$ ∑. So we suppose $(x)\in$ ∑. HERE IS THE PROBLEM：Intuitively I want to prove $(x,\mathfrak m)\in$ ∑ and by maximality of $\mathfrak m$, $x\in\mathfrak m$. But how to prove that every element in $(x,\mathfrak m)$ is a zero-divisor? For example, if given $ax+bz$ where $a,b\in A, z\in \mathfrak m$ and $xs=zt=st=xz=0, xt\neq0,zs\neq0 $, how to prove that $ax+bz$ is a zero-divisor?


Conditional Distribution of Poisson Variables, given $\sum X_i$

An exercise asks me to show that if $X_1,X_2,\ldots,X_n$ is a random sample from a Poisson distribution with parameter $\theta$, the conditional distribution of $X_1,X_2,\ldots, X_{n-1}$, given $Y=\sum_{i=1}^n X_i$, is multinomial. Normally, this would have been an easy one but unfortunately the joint distribution here throws me off a bit. This is where I would appreciate some help.


I create a about-us with Basic Page content type, and with path alias aliased it to \about-us( nid = 2),Now in template file I want to get path alias
{{ 'About Us'|t }}
   in Drupal 7 I got it with  url("node/2") but what is equivalent in Drupal 8?  what snippet  I have to use to get path alias of nid 2 in template  file ?


Remove maximize/minimize window buttons from GNOME 3.18

I have Ubuntu 16.04 on my computer and I recently installed GNOME 3.18, alongside Unity.   Being used to having the window buttons on the left side, I changed their position with  some command lines I found on the web. The only problem is that by doing so I also added minimize and maximize buttons which I didn't want.  I tried to remove them and although I did it the buttons remained on core apps such as files and maps. I tried out everything I could think of, but the GNOME Tweak Tool doesn't do much and neither do the commands I found on the net.   Does anyone have any idea?


Why isn't my mesh properly textured in Blender.

Okay, so I just started getting good at Blender, and here's what happened: I was just texturing a weird mesh, right. It originally looked like:   But I added textures and everything. I would give y'all the start file, if I knew how. Please help. It mostly had to do with separation in the mesh, UV texturing, material texturing, and idk, but some weird lighting. Please reply and please help me if you can. Thanks.


How to create a meta-package that automatically installs other packages?

I'd like to be able to create a package that doesnt contain any code or programs itself, but instead installs other packages that exist in the repositories onto a computer, sort of how the ubuntu-restricted-extras package does?


I thought the GC would call Dispose eventually if your program did not but that you should call Dispose() in your program just to make the cleanup deterministic.  However, from my little test program, I don't see Dispose getting called at all....  public class Test : IDisposable {     static void Main(string[] args)     {         Test s = new Test();         s = null;         GC.Collect();         Console.ReadLine();     }      public Test()     {         Console.WriteLine("Constructor");     }      public void Dispose()     {         Console.WriteLine("Dispose");     } }   // Output is just "Constructor", I don't get "Dispose" as I would expect.  What's up?  EDIT: Yes, I know I should call Dispose() - I do follow the standard pattern when using disposable objects.  My question arises because I'm trying to track down a leak in somebody elses code, which is managed C++ (another layer of complexity that would be the good subject of another thread).


I'm sure that this is TeX basics and I'm just being a fool, but I can't figure out for what/how the @ symbol is used. All I can tell is that to make sure it works you have to put it between \makeatletter...\makeatother. But I have no idea what it actually does. Thanks!


Proof that a coordinate-wise convex function is convex?

I feel like this should be straightforward, but does anyone have a proof of the following?  Let $f: \mathbb{R}^n \to \mathbb{R}$ satisfy the following. For each coordinate $i$, for an arbitrary vector $x_{i}$, define $ f_i(y)$ to be $f$ restricted to the $i^{th}$ parameter, fixing the others $ x_{i}$; then $ f_i(y)$ is convex. Then $f$ is a convex function.  Also, if there is a more standard math notation I should use to describe this problem, what would that be?  (Edit: or a counterexample...)  Thanks!    I should add what I've tried.  $g(\lambda \vec{x} + (1-\lambda)\vec{y}) = g(\lambda x_1 + (1-\lambda)y_1,\dots,\lambda x_n + (1-\lambda)y_n)$  $\leq \lambda g(x_1,\lambda x_2 + (1-\lambda)y_2,\dots) + (1-\lambda) g(y_1,\lambda x_2 + (1-\lambda)y_2,\dots)$  I don't see this going anywhere good, we end up with something nasty like  $\lambda^n g(\vec{x}) + \lambda^{n-1}(1-\lambda) \sum_i g(y_i,\vec{x}_{i}) + \dots + (1-\lambda)^n g(\vec{y})$  I think. Maybe we can get it from there?


Does the short time in the EU on a Residence Permit count towards the Schengen 90 days?

I arrived to Europe from Canada July 3rd. Got a residence permit and working visa the 4th for two months and now I've been traveling. Since July 3rd my 90 days of a Schengen visa are up next week.  But do those two months of work with the residence permit count from the 90 days? Or are they exempt? Websites are giving me mixed answers.


A question from Kunen's book: chapter VII (H9), about diamond principle

Assume $(\mathbb{P}$ is c.c.c.$)^M$ and $\Diamond$ holds in $M[G]$. Show that $\Diamond$ holds in $M$. Hint: It is sufficient to verify $\Diamond^-$ in $M$.  Should I try to create a $\Diamond$ sequence or $\Diamond^{-}$ sequence? Should I work with nice names?


I hope you can help me. I have recently found this sentence "improving safety should not be considered merely a law obligation, but also a concrete economic opportunity". I was wondering if the position of merely is correct. Thank you.


Prove a set is still linearly independent when transformed using an injective linear map

Given a transformation T:V-W that is injective, if {v1,v2,...,vn} is a linearly independent subset of V, I need to prove that the set {T(v1), T(v2),...,T(vn)} will be a linearly independent set of W. To my understanding no values in {v1,v2,...,vn} are equal since they are independent and because there is a one to one mapping from V to W the set {T(v1), T(v2),...,T(vn)} should also have no equal values. This somewhat proves that {T(v1), T(v2),...,T(vn)} is independent. I am struggling to understand how to prove that the set {T(v1), T(v2),...,T(vn)} doesn't contain values that are linear combinations of other values in the set.


Allow linking to duplicates on other Stack Exchange sites for popular closed questions

I've come across a few popular, useful questions on Stack Overflow that have been closed as off-topic, which have duplicates on other sites. For examples, Stack  Overflow question  is closed, with a banner that suggests seeking help on Server Fault:     "Questions on professional server, networking, or related infrastructure administration are off-topic for Stack Overflow unless they directly involve programming or programming tools. You may be able to get help on Server Fault." – Duncan, Brian Clozel, Trinimon, Bhavik Ambani, AlSki   But there's already an open duplicate on another Stack Exchange site where the question is on-topic, .  It would be nice if, rather than just closing the Stack Overflow question, somebody - even if the power was only available to moderators - could also mark it as a duplicate of the question on . (The text of the duplicate banner might need to be slightly different from normal.)


My external IP address appears to change automatically

I am trying to use the no-IP service to get a domain name for my dynamic ip address. I use some tools on line to detect my IP, and they tell me that my IP address is 88.207.251.1. So I bind this IP with a domain name .  But to my surprise, it changes automatically!  I mean, when I try to ping my domain name, it becomes this ip:   10.244.149.239   And I go to   to check my domain name and i find that that IP changes into 10.244.149.239.  I really dont know why.  Besides, I enter into my router and the router tells me that its IP address is 10.244.149.239.  I don’t understand. The inner IP of the router—an —should be something like 192.168.1.1? Because to enter into the router, I type 192.168.1.1 at the Internet Explorer.   If the 10.244.149.239 is outer ip, what is 88.207.251.1? If the 10.244.149.239 is inner ip, what is 192.168.1.1?


The difference between long and int in C++

Im a beginner. Could someone tell me what's the difference between long and int they both uses 4bytes of space and have the same range.


Why is the 'GPU compute' render option blurred out for me?

I think it would be faster to render with my gpu, but I can't seem to select it.  My GPU is an MSI gtx 1050 ti


How to generate all possible pairs with permutations from list in Python?

How do I generate all possible pairs permutations from a list in Python?  Example:  input = [3, 8, 2] output = ['3-8', '3-2', '8-3', '8-2', '2-3', '2-8']


I hope this is the correct place for my question. I didn't post in English learner site because it seems a more specific question. As everyone knows the plural of person is people, but I saw in a menu     Starter for 4 persons   I was sure about the error, but a friend told me that sometimes in menus and lists it can be used if there is a fixed number.  What is your opinion?


Every page, the text is not aligned.  EXPLICATION  First page   Text  Text  Text  Text   Next page    Text    Text    Text    Text  Next page   Text  Text  Text  Text


Trying to show that $\sup \{b^p:p\in Q,\;0<p<x\} = \inf\{b^q:q\in Q,\;x<q\}$

I'm trying to show that for $b>1$, $x>0$ and $x$ irrational, that $$\sup \{b^p:p\in Q,\;0<p<x\} = \inf\{b^q:q\in Q,\;x<q\}$$ I know this follows immediately if we define $b^x=\exp(x\log(b))$ and use the fact that the exponential function is strictly increasing and continuous over $\mathbb R$, but I'm not allowed to do that. In fact, I only have that $b^{m/n}=(b^{1/n})^m$, where $b^{1/n}$ means the positive $n^{th}$ root of $b$; $b^x$ is not yet defined for irrational $x$.  I know that the supremum and infimum both exist because if $b>1$ and $p<q$, then $b^p<b^q$. Also, by assuming that the inf $<$ sup, I got a contradiction. The part I'm stuck on is deriving a contradiction from assuming that sup $<$ inf. Does anybody have any ideas?  Thank you.


How to get my Intel Wireless 3165 to connect on 15.04?

I have installed Ubuntu 15.04 on my new Intel NUC   However the wifi does not work.  It complains (in dmesg) that the iwlwifi module was unable to load the firmware code because iwlwifi-3165-10.ucode could not be found.  I've tried installing newer versions of iwlwifi (from backports), but that seemed very complicated and didn't seem to help.


Using inline variable substitution output and input name problem to join two Python script tools together in ModelBuilder?

I have a script I have exported from ModelBuilder and am trying to incorporate at the beginning a script kindly written by @BERA.  The process is to first convert a polygon shapefile to a raster and do a cost distance analysis, set null values in the resultant accumulated cost distance and then summarise the accumulated cost distance inside a polygon of interest. At the beginning, I need to iterate through the fields in an attribute table to provide the values for the cells in the cost surface raster that goes into the cost distance analysis, and the whole process to repeat for each raster. I am having difficulty with providing inline variables to give names for the input and output names for the cost analysis and the set null values and summarize zones. @BERA provided the means for the raster outputs to be named after the field names – which is perfect, but being completely new to python I can’t get the two scripts to flow together because of the input and output names.  I have provided the two scripts without my attempts!(sorry about the long paths).  This is written by @BERA:`  Import arcpy,os polygons=r'C:\folder\polygons.shp' sources=r'C:\folder\sources.shp'  fieldlist=['fodyexp1','fodyexp2','fodyexp3','fodyexp4'] #extend/edit to include all your fields  for item in fieldlist: #For each field specified in fieldlist perform all below: FeatureToRaster_conversion(in_features=polygons, field=item, out_raster=r'in_memory\tempraster') #Dont know what you want to do next, cost distance?: outCostDist = CostDistance(sources, r'in_memory\tempraster') outCostDist.save(os.path.join(r'C:\outputfolder','Raster_'+item)) #The outputs will be named after field, for example Raster_fodyexp1 #and so on...`   This is my cost distance script:      # Import arcpy module import arcpy  # Check out any necessary licenses arcpy.CheckOutExtension("spatial")  # Set Geoprocessing environments arcpy.env.scratchWorkspace = "C:\\rod.gdb" arcpy.env.snapRaster = "scores_fody_m" arcpy.env.extent = "534630.586094391 7813776.96082858 552599.503136767 7825252.24043838" arcpy.env.workspace = "C:\\rod.gdb"   # Local variables: habitat = "habitat" fodyrange_current = "fodyrange_current" AQ = "AQ" hab_sn_1 =  "D:\\gis_data\\rodrigues\\Rod_analysis\\iterate_model\\hab_ras\\hab_sn1" dist_sn_1 =  "D:\\gis_data\\rodrigues\\Rod_analysis\\iterate_model\\dis_raster\\dist_sn_1" backlink_fmaq = ""    nullcost_sn_1 =    "D:\\gis_data\\rodrigues\\Rod_analysis\\iterate_model\\setnull_cost_r\\nullcost_sn_1"  zone_sn_1 = "D:\\gis_data\\rodrigues\\Rod_analysis\\iterate_model\\zonal_tables\\zone_sn_1"  # Process: Polygon to Raster arcpy.PolygonToRaster_conversion(habitat, "warb_mean", hab_sn_1, "CELL_CENTER", "NONE", "20")  # Process: Cost Distance arcpy.gp.CostDistance_sa(fodyrange_current, hab_sn_1, dist_sn_1, "",  backlink_fmaq)  # Process: Set Null arcpy.gp.SetNull_sa(dist_sn_1, dist_sn_1, nullcost_sn_1, "\"value\" = 0")  # Process: Zonal Statistics as Table arcpy.gp.ZonalStatisticsAsTable_sa(AQ, "id", nullcost_sn_1, zone_sn_1, "DATA", "ALL")


Is it considered normal to publish job offers inviting candidates to apply based on their gender and/or race in academia?

I was browsing PhD position offers in Europe on different websites and I was quite surprised to find that several offers contained sentences such as     University of X value equality and diversity. We strongly encourage women and BAME applicants for this position.    where BAME stands for Black, Asian and Minority Ethnicities; or     The research group aims to increase the number of women in scientific positions. Female candidates are therefore encouraged to apply.   Is it considered normal in the academic environment to discriminate between  candidates according to their race and/or gender for "egalitarian" reasons?   How is the choice of a candidate based on their gender and/or race considered "egalitarian"?


ROC curve and optimal probability threshold (cut off)

When we draw a ROC curve, how can we determine the optimal threshold? I think, the point that is closest to (0,1) vector is the best threshold. However, if we cannot calculate the distance, how can we determine the best threshold? Is there any other way to know that? Also, I think eyeballing is a pretty good way. How do you guys think about the eyeballing method?


Why leave the MAV at Schiaparelli Crater?

Assuming NASA is aware of the capability of Martian winds to push heavy objects then why would they leave the MAV at Schiaparelli crater for years, knowing it could potentially be affected by the environment while there?  If it broke, or toppled, then the crew of Ares 4 could arrive and find that their journey was wasted because they can't risk landing if they have no means of escape.


public void addNewLamp (Lamp newLamp) {     for(Lamp lampName: lamps)     {         if(lampName.equals(newLamp.getLampName()))         {             System.out.println("no");             Break;         }         else         {             System.out.println("New Lamp!");             lamps.add(newLamp);         }     } }   lamps being an array of type Lamp.  When looking at the debugger it seems like the for loop just skips everything, the entire IF statement, howcome?  EDIT: Code has been edited to fit comments, still same problem.  This is not the same question as the one that was linked to me since its more than just comparing strings, I've now changed != to "if(!lampName.getLampName().equals(newLamp.getLampName()))" and still getting the same result. Thanks for the link though


How do digital watches use so little power (and how do I do that?)

The title of the question is pretty self-explanatory.  I did a quick back-of-the-envelope calculation for my own digital calculator watch (the Casio CA-53W for those who are interested). The battery is supposed to last around 5 years on the 90 mAh coin cell inside. This means that the watch must be using $$0.090\ \mathrm{Ah}\  /\  (5\ \mathrm{years} * 365\mathrm{\frac{days}{year}} * 24\mathrm{\frac{hours}{day}}) = 2.055\times10^{-6} $$ or just over 2 µA!!!   Now, I know that with enough tweaking, the ubiquitous ATMega328p can use as little as 1 µA, and there are specialized microcontrollers out there that use even less, say in the tens of nanoamps...  ...but what about the display? My watch shows the time on a 7-segment lcd, and the display is never off. Where on Earth can I find a display that only uses something on the order of 1 or 2 µA??  (Incidentally, I'm just trying to make own simple Reverse Polish calculator watch, kind of like the µwatch project at calcwatch.com, but with a focus on long battery life.)  Would I need to buy an fpga, fuse my own logic circuit onto it, and somehow hack the display out of an old watch to get these kinds of results? Is there an easier way?


Translating British faculty titles into American equivalents

A recent job posting at a British university has specified available openings at multiple levels: lecturer, senior lecturer, reader, and professor. However, it's not clear how to map these titles to American equivalents. For instance, where would someone who has finished up several years of an assistant professorship and is interested in moving into such a position be classified? Would it be as a senior lecturer or reader?


Where is the safest place in an airplane?

Is there such a thing at all? I feel the front is dangerous because it may hit the ground first. I also feel that near the wings is not safe because they are fuel tanks.


How does being in academia help researchers

I have read about many great researchers in various fields who were not involved in academia throughout their lives. Some were involved in academia only part of their life, but almost invariably, their greatest work came after a period of solitude and isolation from others. In fact, most great mathematicians, for example, were rather isolated figures. Bernhard Riemann and Isaac Newton come to mind, but others like James Clerk Maxwell were also isolated during their periods of research. More recently, Andrew Wiles isolated himself for around 7 years and didn't speak about his work to anyone while he was busy solving Fermat's Last Theorem. (I have mentioned only mathematicians because those are the ones I have read about the most.)  Hence, I am failing to see how being in academia/a university position aids one as a researcher, practically speaking. It seems as though the greatest research must come from within the individual due to an intense and personal love and desire for the subject, rather than due to collaborating with others or being given a better position or whatever. In fact, such things seem to be the opposite: detrimental. They would make the person focus not on the subject but on paltry things like gaining more and more money or a better reputation.  My question is simply: How does being in university position (e.g. professor) aid the researchers who are at the highest level in their field? I do not mean being involved in academia, because one can be involved (eg attending seminars and lectures) without having a position (please correct me if I am wrong, as I myself am not actually in academia).


What if a new question, that is a duplicate of an older one, gets an answer but not older one?

This may look similar to . But it isn't as in that question; the problem was that both were similar questions and one (the new one) was better than the other (older one). So which one should marked for closing? But here both the questions are same.  I recently answered a question, which was a duplicate of already-asked one, but it did not have any accepted (or good) answer. And somehow I didn't notice the older one and my answer on newly asked question got upvotes. Now I saw the same older question, but didn't have an answer, so I posted the answer of the newly-asked question there, and it became active.  I can't close the older one as the newly one isn't a better than the older one; both are probably the same as I read   What should I do in that case? Should I mark the older question as a duplicate in favor of the new one or what?


How to install Gnome 3 without breaking Unity?

I tried installing gnome 3 , but it broke Unity and I had to reinstall Natty from scratch.  Does anyone know if there is a way to install Gnome 3 without breaking Unity?


How do I show that the sample median minimizes the sum of absolute deviations?

I want to show that the sample median $\tilde{x}$ minimizes the sum of absolute deviations,   i.e., $\tilde{x} = \underset{a}{argmin}\sum_{i=1}^{n}\begin{vmatrix} x_i-a\end{vmatrix}$  To show this, so far I have:  Sum of absolute deviation about a is  $=\sum_{i=1}^{n}\begin{vmatrix} x_i-a\end{vmatrix}$  Assume that $x_1\leq x_2\leq  ...\leq x_n$  CASE 1: When n is ODD (n = 2m + 1)  We get,   $x_1\leq x_2\leq  ... \leq x_m\leq x_{m+1}\leq  ... \leq x_{2m} \leq x_{2m+1}$  From this we can see that  $\begin{vmatrix} x_1-a\end{vmatrix} + \begin{vmatrix} x_{2m+1}-a\end{vmatrix}$ is least when $x_1\leq a \leq x_{2m+1}$  $\begin{vmatrix} x_2-a\end{vmatrix} + \begin{vmatrix} x_{2m}-a\end{vmatrix}$ is least when $x_2\leq a \leq x_{2m}$  ...  Thus,   $\begin{vmatrix} x_{m+1}-a\end{vmatrix}$ is least when $a=x_{m+1}=median$  CASE 2: When n is EVEN (n = 2m) We get,   $x_1\leq x_2\leq  ... \leq x_m\leq x_{m+1}\leq  ... \leq x_{2m-1} \leq x_{2m}$  From this we can see that  $\begin{vmatrix} x_1-a\end{vmatrix} + \begin{vmatrix} x_{2m}-a\end{vmatrix}$ is least when $x_1\leq a \leq x_{2m}$  ...  Thus,   $\begin{vmatrix} x_{m}-a\end{vmatrix} + \begin{vmatrix} x_{m+1}-a\end{vmatrix}$ is least when $x_m\leq a \leq x_{m+1}$    Is this enough to show that sample median minimizes the sum of absolute deviations?


(a) Show that any two-dimensional vector can be expressed in the form $s \begin{pmatrix} 3 \\ -1 \end{pmatrix} + t \begin{pmatrix} 2 \\ 7 \end{pmatrix},$ where $s$ and $t$ are real numbers.  (b) Let $\vec{u}$ and $\vec{v}$ be non-zero vectors. Show that any two-dimensional vector can be expressed in the form $s \vec{u} + t \vec{v},$ where $s$ and $t$ are real numbers, if and only if of the vectors $\vec{u}$ and $\vec{v}$, one vector is not a scalar multiple of the other vector.  I've already gotten part (a) but (b) is a challenge. I have solved part a hough:  Let's say that $ \begin{pmatrix} 3 \\ -1 \end{pmatrix} + t \begin{pmatrix} 2 \\ 7 \end{pmatrix}$ is equal to $\binom{a}{b}$. \begin{align*}  \begin{pmatrix} 3 \\ -1 \end{pmatrix} + t \begin{pmatrix} 2 \\ 7 \end{pmatrix} &= \binom{a}{b}\\ \binom{3s}{-s}+\binom{2t}{7t}&=\binom{a}{b}\\ \binom{3s+2t}{-s+7t}&=\binom{a}{b}\\ \Rightarrow 3s+2t&=a\\ -s+7t&=b \end{align*}


Browsing cached pages with no internet connection

Back in the early days of the Internet, when 56K modems were considered state-of-the-art, when the modem was disconnected I could still freely browse the pages that I recently visited because they were kept in the browser's cache.  Now, I cannot find this option, at least not in Firefox.  The Internet was disconnected due to a storm, and I tried to open a Wikipedia page I visited just yesterday, but Firefox could not open it.  I tried "File -> Offline mode", but this didn't help: I got a page showing the message "Firefox is currently in offline mode and can't browse the Web."  Is there a way to make Firefox automatically cache pages I visit, so that I can visit them again without Internet connection?


conduction current vs displacement current across capacitor

Kindly help me understand the difference between conduction current and displacement current. Quick searches explain that displacement current is associated with changing electric field, frankly speaking, it is too technical for me to understand.   Also, please relate it to why Capacitor allows AC and blocks DC. They say time varying voltage(AC) produces displacement current which can flow through the insulator while fixed voltage(DC) produces conduction current which cannot flow through the insulator. This is what made me put this question to you.  Thanks in advance.


Zooming images out to specific locations in beamer

I want to:   Show an image full width On click, make a small sized image placed at a particular location starting from top left and show another image full width Repeat the process till all four images are shown End with a grid of four images vertically and horizontally centered   The problems I am facing is:   The location of the grid images changes as the third image (bottom-left) in the grid is displayed   Possible improvements I am looking at are:   When I go from full width image to the 'overview' slide, the transition should be like zooming the image to that location Better code than the one I have used?   Below is the MWE.  \documentclass[xcolor=dvipsnames,english,professionalfonts,smaller]{beamer}  \usetheme{Madrid}  \usepackage{graphicx} \usepackage{parskip} \usepackage{mwe} \graphicspath{{.}{./image}}  \begin{document}  \setlength{\parskip}{\bigskipamount}  \begin{frame}{Title Text}      \only <+ | handout:0> {\hfil \fbox{\includegraphics[width={\textwidth}]{example-image-16x9}}}     \only <+ | handout:0> {\fbox{\includegraphics[width={.470\textwidth}]{example-image-16x9}} \hfill}     \only <. | handout:0> {\phantom{\fbox{\includegraphics[width={.470\textwidth}]{example-image-16x9}}} \\ \vspace{.09in}}     \only <. | handout:0> {\phantom{\fbox{\includegraphics[width={.470\textwidth}]{example-image-16x9}}} \hfill}     \only <. | handout:0> {\phantom{\fbox{\includegraphics[width={.470\textwidth}]{example-image-16x9}}}}     \transduration<.>{.01}     \only <+ | handout:0> {\fbox{\includegraphics[width={\textwidth}]{example-image-16x9}}}     \only <+ | handout:0> {\fbox{\includegraphics[width={.470\textwidth}]{example-image-16x9}} \hfill}     \only <. | handout:0> {\fbox{\includegraphics[width={.470\textwidth}]{example-image-16x9}} \\ \vspace{.09in}}     \only <. | handout:0> {\phantom{\fbox{\includegraphics[width={.470\textwidth}]{example-image-16x9}}} \hfill}     \only <. | handout:0> {\phantom{\fbox{\includegraphics[width={.470\textwidth}]{example-image-16x9}}}}     \transduration<.>{.01}     \only <+ | handout:0> {\fbox{\includegraphics[width={\textwidth}]{example-image-16x9}}}     \only <+ | handout:0> {\fbox{\includegraphics[width={.470\textwidth}]{example-image-16x9}} \hfill}     \only <. | handout:0> {\fbox{\includegraphics[width={.470\textwidth}]{example-image-16x9}} \\ \vspace{.09in}}     \only <. | handout:0> {\fbox{\includegraphics[width={.470\textwidth}]{example-image-16x9}} \hfill}     \only <. | handout:0> {\phantom{\fbox{\includegraphics[width={.470\textwidth}]{example-image-16x9}}}}     \transduration<.>{.01}     \only <+ | handout:0> {\fbox{\includegraphics[width={\textwidth}]{example-image-16x9}}}     \only <+ | handout:0> {\fbox{\includegraphics[width={.470\textwidth}]{example-image-16x9}} \hfill}     \only <. | handout:0> {\fbox{\includegraphics[width={.470\textwidth}]{example-image-16x9}} \\ \vspace{.09in}}     \only <. | handout:0> {\fbox{\includegraphics[width={.470\textwidth}]{example-image-16x9}} \hfill}     \only <. | handout:0> {\fbox{\includegraphics[width={.470\textwidth}]{example-image-16x9}}}  \end{frame}  \end{document}


I am new to the Latex environment. I am simply compiling the IEEE trans Latex format in Tex-maker but I am getting this problem. I have copied the ieeetran.cls file to the directory   tex>latex>ieeetran>ieeetran.cls   but still when I try to compile the project the error displays that ieeetran.cls not found.   ! LaTeX Error: File `IEEEtran.cls' not found.Type X to quit or <RETURN> to proceed,or enter new name. (Default extension: cls)Enter file name:! Emergency stop.<read > \usepackage   I have tried to install the package but it didn't installs.  Before voting down this question please keep in mind that I am new to the whole Latex and Tex-maker thing so please be polite while answering my question. Thanks a lot in advance.


What is the most elegant Ruby statement to split a string in its characters taking two by two?

I have the string "abigword" and I want to take the array ["ab", "ig", "wo", "rd"]. To generalize, given a string, I want to take the array of its constituent characters paired two-by-two.  What is the most elegant Ruby way to do that?


Exact values of $\cos(2\pi/7)$ and $\sin(2\pi/7)$

What are the exact values of $\cos(2\pi/7)$ and $\sin(2\pi/7)$ and how do I work it out?  I know that $\cos(2\pi/7)$ and $\sin(2\pi/7)$ are the real and imaginary parts of $e^{2\pi i/7}$ but I am not sure if that helps me...


reCaptcha v1 is shutting down on March 31, but SEDE still uses it

According to this , I thought the new recaptcha API was used network-wide. Though today, when going to  (which for whatever reasons never recognized me automatically), I got this message instead of a usable captcha image.   V1 Unsupported Please direct siteowner to   (Doing a second try doesn't show this message anymore, and the recaptcha v1 works as intended.)  According to , the reCAPTCHA v1 API will stop working on March 31, 2018:  What happens to reCAPTCHA v1? Any calls to the v1 API will not work after March 31, 2018. Starting in November 2017, a percentage of reCAPTCHA v1 traffic will begin to show a notice informing users that the old API will soon be retired. Most websites around the world have already switched to reCAPTCHA v2, where humans pass effortlessly. With our advanced risk analysis engine, reCAPTCHA v2 can effectively separate humans from bots and always stay ahead of the attackers. If your site still uses reCAPTCHA v1, please upgrade to reCAPTCHA v2 immediately. We no longer support reCAPTCHA v1. Any calls to the v1 API will not work after March 31, 2018. Please register a new key and upgrade to v2.  I'm really hoping this will not take  to fix, because we've only got three and a half weeks left!


I'm trying to display data from mysql database with recycler-view ans card-view, but i'm facing this error message:     java.lang.NullPointerException: Attempt to invoke interface method   'int java.util.List.size()' on a null object reference   Everything seems to work properly because I'm able to display data retrieved on (Log) in my loop, and when I'm trying to add data on my List data_list, every thing is OK, because I'm able to know the number of lines returned by my data_list  Log.e("number of lines return", String.valueOf(data_list.size()));   But when i'm trying to reach the data_list on my Custom Adapter:  @Override public int getItemCount() {     return my_data.size(); }   It warns me i can't access my_data because it's null.  The part of my code which retrieves data from my database:  private void load_data_from_server(final int id) {     //Log.e("iddddsss", String.valueOf(id));     AsyncTask<Integer,Void,Void> task =new AsyncTask<Integer, Void, Void>(){          @Override         protected Void doInBackground(Integer... integers) {              OkHttpClient client = new OkHttpClient();             Request request = new Request.Builder()                      .url("http://www.unhabitatrdcongo.org/Recycler-android-mySQL/index2.php?id="+id)                     .build();             try {                 Response response = client.newCall(request).execute();                 JSONArray array = new JSONArray(response.body().string());                    for (int i=0; i<array.length(); i++){                     JSONObject object = array.getJSONObject(i);                      Integer idd = object.getInt("id");                     String des = object.getString("description").toString();                     String im =object.getString("image").toString();                      MyData data = new MyData(idd, des, im);                      Log.e("errr", data.getDescription().toString());                     data_list.add(data);                   }          Log.e("number of lines read", String.valueOf(data_list.size()));              } catch (IOException e) {                 e.printStackTrace();                 Log.e("erreur IO EXCEPTION", e.toString());             } catch (JSONException e) {                 System.out.print("End of content");                 Log.e("erreur JSON",e.toString());             }             return null;         }


What has happened to the quality of answers on Stack Overflow?

Apologies of this has come up recently / been done to death, I've only just discovered Meta Stack Overflow.  I signed up for Stack Overflow just after its launch nearly a year ago, and the quality of answers was so high it was a genuinely fantastic resource.   However, my recent experiences have been anything but positive. It appears to me now:   Users are only interested in spraying quick answers in the hope of gaining some reputation points Users have no real interest in following up and engaging in dialogue or answer improvement Any question that is 'deep' or difficult or cannot be answered with a quick, fired-off, answer, either doesn't attract any response at all or attracts facile / low grade / sarcastic answers A lot of the high quality users have lost interest People seem more interested in having a rep than actually answering, helping, guiding, teaching and sharing knowledge   I am finding myself returning to some of the older specialist forums after being frustrated here, and actually getting better answers and discussions than I can here.  Has anyone else experienced this? Is anything in the works to try and tackle it?   Edit: Why the down vote? Is anything even slightly critical of Stack Overflow deserving of instant opprobrium?   Some points:   I am in no way criticising Jon Skeet and the other 'power' users who have given a huge amount of their time and knowledge, they are fantastic guys but they can't be expected to answer everything I know it's a question and answer site. Providing a response and following up with edits in response to questions or requests for clarification about an answer is what made Stack Overflow so good originally and should be a fundamental part of what happens here. I don't have a problem with quick answers - if they're useful then all the better if they're also quick, who needs an answer six months later? I don't expect people to code solutions for me - I'm a self-starter, self-finisher and happy to figure things out from suggestions from experienced guys. I don't need or want to be force fed.   , asked today, clearly explained and not too deep, technical, or obscure. All I was looking for was a response from someone technically competent and with a bit of experience solving the problem I had posted about. Instead I got one facile answer, one completely sarcastic answer and one that made a vaguely interesting point about associative databases but still fairly useless given the question. You be the judge..


Show that a group $G$ is abelian if $(gh)^3 = g^3h^3$, $(gh)^4 = g^4h^4$, and $(gh)^5 = g^5h^5$ for all $g$ and $h$ in $G$.   I have tried many manipulations but I keep getting stuck as I am not even able to see why it is true. Every other exercise I tried seemed routine or manageable, but this one in particular I need a hint.


Can a PC Sleep in Medium/Heavy Armor in D&D5e?

I've been assuming since I started DM-ing a D&D 5e campaign that a PC can sleep in light armor, but not medium or heavy armor without gaining levels of fatigue. However, I am now playing a Fighter in a different campaign and I'm not seeing those rules anywhere. Does 5th ed. allow PCs to sleep in medium or heavy armor with no penalty? I'm thinking at this point that my memory of 3.5e flavored the rules that I was DM-ing by.


my supervisor asked us to create the report with a given template which follows the  problem. The template has list of figures and list of tables organized inside a table, as this.   and my lof and lot comes in like this.


Blast output - program to count the number of hits

I have to use the old version of Blast (not Blast+) to compare DNA sequences and I have to know the number of all hits. They are not given in the header and I have to know them for many many of blast outputs and its nearly impossible to count them (or to export them in excel). I think I probably have to write a 'Perl Script' and I did my best but I am not familiar with programming and it is not working. Furthermore I had a look on the internet and they are always comparing it to BIO Search. I have e code, which for me looks pretty good,but it also done a comparison with BIO Search, what I don't need/want.   use strict; use warnings; use Bio::SearchIO;   Usage information  die "Usage: $0 <BLAST-report-file> <number-of-top-hits> <output-file>\n", if (@ARGV != 3);  my ($infile,$numHits,$outfile) = @ARGV;     print "Parsing the BLAST result ...";     my $in = Bio::SearchIO->new(-format => 'blast', -file => $infile);     open (OUT,">$outfile") or die "Cannot open $outfile: $!";  # print the header info for tab-deliminated columns print OUT "query_name\tquery_length\taccession_number\tlength\tdescription\tE value\tbit score\tframe\tquery_start\t"; print OUT "query_end\thit_start\thit_end\tpositives\tidentical\n";  # extraction of information for each result recursively while ( my $result = $in->next_result ) {     # the name of the query sequence     print OUT $result->query_name . "\t";          # the length of the query sequence         print OUT $result->query_length;          # output "no hits found" if there is no hits         if ( $result->num_hits == 0 ) {       print OUT "\tNo hits found\n";          } else {       my $count = 0;                  # process each hit recursively         while (my $hit = $result->next_hit) {             print OUT "\t" if ($count > 0);                             # get the accession numbers of the hits        print OUT "\t" . $hit->accession . "\t";                         # get the lengths of the hit sequences                         print OUT $hit->length . "\t";                             # get the description of the hit sequences        print OUT $hit->description . "\t";                         # get the E value of the hit             print OUT $hit->significance . "\t";                             #get the bit score of the hit        print OUT $hit->bits . "\t";                          my $hspcount = 0;                          # process the top HSP for the top hit             while (my $hsp = $hit->next_hsp) {                             print OUT "\t\t\t\t\t\t\t", if ($hspcount > 0);                              # get the frame of the query sequence         print OUT $hsp->query->frame . "\t";                                 # get the start and the end of the query sequence in the alignment                 print OUT $hsp->start('query') . "\t" . $hsp->end('query'). "\t";                                 # get the start and the end of the hit sequence in the alignment                 print OUT $hsp->start('hit') . "\t" . $hsp->end('hit') . "\t";                                 # get the similarity value                 printf OUT "%.1f" , ($hsp->frac_conserved * 100);         print OUT "%\t";                                     # get the identity value         printf OUT "%.1f" , ($hsp->frac_identical * 100);                     print OUT "%\n";                                 $hspcount++;                             }        $count++;                          # flow control for the number of hits needed             last if ($count == $numHits);         }         } } close OUT; print " DONE!!!\n";   May someone help me, please. I need a program, which first tells me the header and then the number of hits. I am a little bit desperate and would be so happy if someone can help me. That would be so nice. Greetings Tina


SceneBuilder cannot create instance of custom component with given set of properties

I created this custom component: public class IconButton extends Button {      @FXML private ImageView imageView;      private IconButtonState state;     private String fullIconUrl;     private String outlineIconUrl;      public IconButton(@NamedArg("fullIconUrl") String fullIconUrl,                       @NamedArg("outlineIconUrl") String outlineIconUrl) {         URL url = getClass().getResource(View.ICON_BUTTON.getFileName());         FXMLLoader loader = new FXMLLoader(url);          loader.setRoot(this);         loader.setController(this);          state = IconButtonState.NOT_INITIALIZED;          this.fullIconUrl = fullIconUrl;         this.outlineIconUrl = outlineIconUrl;          try {             loader.load();         } catch (IOException exception) {             exception.printStackTrace();             throw new RuntimeException(exception);         }     }      @FXML     public void initialize() {         this.state = IconButtonState.ACTIVE;          String url = buildUrl(fullIconUrl);         Image image = new Image(url);         imageView.setImage(image);     } }  <!-- icon-button.fxml --> <?xml version="1.0" encoding="UTF-8"?>  <?import javafx.scene.control.*?> <?import javafx.scene.image.*?>  <fx:root mnemonicParsing="false" prefHeight="65.0" prefWidth="98.0" style="-fx-background-color: transparent;" type="Button" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1">    <graphic>       <ImageView fx:id="imageView" fitHeight="64.0" fitWidth="48.0" pickOnBounds="true" preserveRatio="true">       </ImageView>    </graphic> </fx:root>   Then, I instantiated my IconButton component in another fxml file like this: <!-- home.fxml --> <?xml version="1.0" encoding="UTF-8"?>  <?import javafx.geometry.*?> <?import javafx.scene.layout.*?> <?import agill.deshopp.components.*?>  <BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="768.0" prefWidth="1024.0" xmlns="http://javafx.com/javafx/10.0.2-internal" xmlns:fx="http://javafx.com/fxml/1">     <top>         <HBox styleClass="app-bar" stylesheets="@../css/home.css">          <padding>             <Insets bottom="15.0" top="15.0" />          </padding>          <children>              <IconButton fullIconUrl="form-full" outlineIconUrl="form-outline"></IconButton>              <IconButton fullIconUrl="message-full" outlineIconUrl="message-outline"></IconButton>              <IconButton fullIconUrl="chart-full" outlineIconUrl="chart-outline"></IconButton>              <Region HBox.hgrow="ALWAYS"></Region>              <IconButton fullIconUrl="settings-full" outlineIconUrl="settings-outline"></IconButton>          </children>         </HBox>     </top>    <center>       <Pane BorderPane.alignment="CENTER" />    </center> </BorderPane>  The code runs fine and the screen renders as expected. However, I can't open the file in SceneBuilder. It prompts me with this exception: java.lang.RuntimeException: Cannot create instance of agill.deshopp.components.IconButton with given set of properties: [fullIconUrl, outlineIconUrl]  javafx.fxml.LoadException:  /home/allan/IdeaProjects/california/src/main/resources/agill/deshopp/fxml/home.fxml:14  How do I fix this?


To whom do I report a font bug in Windows?

Windows 8.1 x64  In apps like the Windows Notepad and Notepad++, when using the font Courier New, Bold Italic, size 9, the lowercase letter "L" is displayed in uppercase.  I don't know if the problem is the font or some Windows engine.  Where should I report this?


Prove that: $ m_a + m_b + m_c \le 4R + r $

Let $m_a, m_b, m_c - $ are median of triangle $ABC$.   Prove that:   $$ m_a + m_b + m_c \le 4R + r $$   I used   $$m_a^2=\frac{2b^2+2c^2-a^2}{4}$$ $$R=\frac{abc}{4R}$$ $$r=\frac{2S}{a+b+c}$$ and $R \ge 2r$


I have used a table to insert images using the . The problem is that I have several images to be placed and hence the images start getting hide behind the bottom of the page as shown  (one of my previous question).   PROBLEM: Though I can use \ContinuedFloat as suggested in the comments of that question but then the next part of the image comes in the middle of the next page (if there is only 1-2 rows in the continued part of the table) which looks weird. So, how can I bring the continued part of the table to the top of the next page so that they really look in continuation.      \documentclass{article}     \usepackage[caption=false]{subfig}     \usepackage{graphicx}     \usepackage{tabularx}      \newcolumntype{Y}{>{\centering\arraybackslash}X}      \begin{document}      \begin{figure}     \subfloat[First layer]{%     \begin{minipage}{\linewidth}       \centering       \begin{tabularx}{\linewidth}{YYY}       \includegraphics[width=\linewidth,height=1cm]{example-image-a}         & \includegraphics[width=\linewidth,height=1cm]{example-image-b}         & \includegraphics[width=\linewidth,height=1cm]{example-image-c} \\       First image & Second image & Third image \\         \includegraphics[width=\linewidth,height=1cm]{example-image-a}         & \includegraphics[width=\linewidth,height=1cm]{example-image-b} \\       Fourth image & Fifth image &       \end{tabularx}       \end{minipage}}\par\medskip      \subfloat[Second layer]{%     \begin{minipage}{\linewidth}       \centering       \begin{tabularx}{\linewidth}{YYY}       \includegraphics[width=\linewidth,height=1cm]{example-image-a}         & \includegraphics[width=\linewidth,height=1cm]{example-image-b}         & \includegraphics[width=\linewidth,height=1cm]{example-image-c} \\       First image & Second image & Third image \\         \includegraphics[width=\linewidth,height=1cm]{example-image-a}         & \includegraphics[width=\linewidth,height=1cm]{example-image-b} \\       Fourth image & Fifth image &       \end{tabularx}       \end{minipage}}\par\medskip          \subfloat[Third layer]{%     \begin{minipage}{\linewidth}       \centering       \begin{tabularx}{\linewidth}{YYY}       \includegraphics[width=\linewidth,height=1cm]{example-image-a}         & \includegraphics[width=\linewidth,height=1cm]{example-image-b}         & \includegraphics[width=\linewidth,height=1cm]{example-image-c} \\       First image & Second image & Third image \\         \includegraphics[width=\linewidth,height=1cm]{example-image-a}         & \includegraphics[width=\linewidth,height=1cm]{example-image-b} \\       Fourth image & Fifth image &       \end{tabularx}       \end{minipage}}\par\medskip       \subfloat[Forth layer]{%       \begin{minipage}{\linewidth}       \centering       \begin{tabularx}{\linewidth}{YYY}       \includegraphics[width=\linewidth,height=1cm]{example-image-a}         & \includegraphics[width=\linewidth,height=1cm]{example-image-b}         & \includegraphics[width=\linewidth,height=1cm]{example-image-c} \\       First image & Second image & Third image \\         \end{tabularx}       \end{minipage}}     \caption{a figure with some layers of subfigures each with its own name and each layer with a subcaption}     \end{figure}      \end{document}


Take a screen shot of a scrolling window that includes off-screen parts

On the Mac, how can I take a screen shot of a window that includes the parts that are off-screen and need scrolling to become visible?  The built-in Grab application can capture individual windows, but it only includes the parts that are on-screen at the moment.  Clarification: By "off-screen" I mean parts that are in the window, but are not visible, because the window has scrollbars. I do not mean parts of the window that are simply off-screen because of how the window is positioned (of course, I want those, too).


Getting custom attributes using reflection

I am building a utility to run the unit test cases, where the user will be provided with the option to select the test they want to run. I am using reflection to get the methods. But it is not working  var assembly = Assembly.Load("TestingAssembly"); var classes = assembly.GetTypes().Where(m => m.GetCustomAttributes(typeof(TestClassAttribute), false).Length > 0);  foreach (var type in classes)  {    var methods= type.GetTypes().Where(m1 => m1.GetCustomAttributes(typeof(TestMethodAttribute), false).Length > 0);  }   The classes object is always empty. If I iterate through the assembly.GetTypes and get the custom attributes it is returning the count. But still, I am not able to match it. In the below code the attributes contains an item with is TestClassAttribute. But when am matching the attribute's type to TestClassAttribute it fails.  foreach (Type type in assembly.GetTypes()) {   if (type.GetCustomAttributes().Count() > 0)    {      var attributes = type.GetCustomAttributes();        foreach (var item in attributes)        {          if (item.GetType() == Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute)          {             //Do something          }        }    } }


Galois Group of $(x^2-p_1)\cdots(x^2-p_n)$

For distinct prime numbers $p_1,...,p_n$, what is the Galois group of $(x^2-p_1)\cdots(x^2-p_n)$ over $\mathbb{Q}$?     This problem appears to be quite common, however my understanding of Galois theory is quite poor, and I have no idea how to do this problem.


Should I disable google maps scroll wheel zoom?

In most applications of google maps the scroll wheel will zoom the map instead of scrolling it.  Personally I find this confusing, and after years of using google maps, both on the google maps web site and embedded google maps, I still often make the mistake of trying to scroll the map with scroll wheel and end up zooming it instead.  The google maps API allows me to disable scrollwheel zoom when I embed a map in my page.  The question is should I disable it?  On the one hand scroll wheel zoom is unconventional in the context of the web as a whole - in the vast majority of cases the scroll wheel scrolls things.  On the other hand scroll wheel zoom is established convention for maps.  It definitely would be a better experience for me if scroll wheel zooming was disabled, but what about the web browsing population in general?  I did some searching on whether I should disable scroll zoom and couldn't find any guidelines. So, to scroll zoom or not to scroll zoom?


Using an iPad for doing web development and programming

The iPad is my preferred computing device when I'm on the go, be it commuting or traveling. Sometimes I've got a Bluetooth keyboard with me, and sometimes I don't. So this may be crazy, but I would like to use my iPad for full-fledged web development and programming, and want I to know what my options are.   seems to be nearly perfect for this in concept except for a fatal flaw: the web interface does not fully work with iPad browsers Safari or Chrome. You cannot, for example, double click to open files.  What other options do I have? Ideally I would like to have command line access to my editor of choice (Vim), and be able to use web debugging tools like the developer tools in Chrome.


I am looking for a software that will search text in files from a folder similar to .  Is there something similar?


Get md5 hash of a file in ftp server using java

I have wrote a java programme to download a file from FTP server. I need to check are there any corruptions after download the file. so i decided to check md5 of the file before and after download.  I need to know how can i generate the md5 hash of this file, before it downloading ?


Summation of an infinite series $\frac{x}{4^x}$

I've found by the ratio test that the following series is convergent, however I am struggling to find the value of the sum. Could anyone suggest where to go from here to find the sum?  $\sum_{i=0}^\infty \frac{i}{4^i} = $  Thanks in advance.  PS - This is the answer via


Applied for ESTA and was denied. Subsequently, secured a visa and travelled to US. Can I try ESTA again?

I was rejected for a visitor visa for the USA when I was an Indian citizen. Now I am an Australian Citizen.  I applied for ESTA, which got denied, maybe due to my previous rejection. Since then I have travelled to the USA 4 times with valid visa. My visa will expire in 2020.  Should I renew my Visa again, or should I try applying for ESTA?  My visa has been renewed 2 times already.


Remove duplicate values from an array using PHP

I want to show data in array all but except the ones that are duplicates.  My array looks like this:  array (size=4)        0 => string 'Eclairage Public' (length=16)        1 => string 'Fonte de Voirie' (length=15)        2 => string 'Aire de jeux' (length=12)        3 => string 'Aire de jeux' (length=12)        4 => string 'Fonte de Voirie' (length=15)   I want it to show only:  array (size=4)        0 => string 'Eclairage Public' (length=16)        1 => string 'Fonte de Voirie' (length=15)        2 => string 'Aire de jeux' (length=12)   As you can see, the duplicate elements were removed. How can I accomplish this using PHP?


E: Sub-process /usr/bin/dpkg returned an error code (100) could not exec dpkg

I have an error on Ubuntu 16.04 when I use   sudo apt-get upgrade


Can someone please confirm the following? I have a C1/D visa. I worked as a flight attendant (currently unemployed) and entered the US numerous times, and also visited Mexico in December 2017.  I am planning on visiting Mexico again for 3 weeks in due course. Will the C1/D allow for me to transit in the US and visit Mexico or do I need a B1/B2 visa? I had issues with CBP before as it seems to be a very grey area.  According to the Mexican Consulate in South Africa, the type of visa is irrelevant. As long as it is multiple-entry, I am good to go.  Can someone please confirm, as I cannot get a solid answer from anyone?  Thank you!


What's the best option to display Unicode text (hebrew, etc.) in VB6

I have some customers who want to use our speech therapy software in Hebrew.  The programs are in VB6. The best option I'm aware of are:   use the Forms 2.0 controls from MS Office, but you can't distribute them.    $899   $499   Any other options?


Using Ajax to submit form is not working

I have a button that once it is clicked I load an HTML form from a different file using ajax, the code is this,  $( "#newDeck" ).click(function() {     $( "#right-panel" ).load( "../HTML_files/new_deck.html" ); });   This is the HTML form that is loaded in,  <form class="form-inline" id="new_deck_form" action="" method="post">

       Name the new Deck:

             <input id="deck_name" name="deck_name" type="text" class="form-control"                     placeholder="Spanish 101" class="input-medium" required="">

       <button id="name_deck_button" class="btn btn-primary" type="submit">Name Deck</button>
 </form>   I am trying to submit it using jQuery with ajax, this is my code  $(document).ready(function(){  // process the form $('#new_deck_form').submit(function(event) {     // stop the form from submitting the normal way and refreshing the page     event.preventDefault();      // get the form data     // there are many ways to get this data using jQuery (you can use the class or id also)     var formData = {         'deckName' : $('input[name=deck_name]').val()     };      // process the form     $.ajax({         type        : 'POST', // define the type of HTTP verb we want to use (POST for our form)         url         : '../API/deck_api.php', // the url where we want to POST         data        : formData, // our data object         dataType    : 'json', // what type of data do we expect back from the server                     encode          : true     })         // using the done promise callback         .done(function(data) {              // log data to the console so we can see             console.log(data);               // here we will handle errors and validation messages         });  });   });   I know the PHP code works because I originally used it with javascript but when I changed my code to jQuery it stopped working.  What happens when I push the button to submit the HTML form the page removes all of the modifications that java code has done to alter the page. It is as if it is submitting the page through PHP. Why isn't my jQuery working?


Ways to handle features that are not applicable for all records

I have a data set that contains records of distinct groups identified by a 'type' variable. Depending on value of this 'type' variable certain other variables are either applicable or not. Effectively these variables will be null when they not applicable...however I didn't think the usual methods to handle null values such as imputation make sense in this scenario. One thought I had was to train separate models for each 'type' effectively getting rid of the variables that would not be applicable for each type. I am fairly new to the world of data science and machine learning and would appreciate hearing what other methods I can consider to handle this type of data set.


What is the cause of this speed-dependent distortion?

I took this shot using a Sony Xperia SP with OpenCamera, here are some details:   Exposure: 1/800 ISO: 50 Aperture: f/2.4 focal length: 3.0   The photo was taken out of a train, at around 160km/h, the truck was moving in the opposite direction with approx. 90km/h.  The distance that the truck moved withing the 1/800th of a second should be somewhere around 10cm (~1/3 foot), but the distortion is clearly higher. It also does not look like it's related to the lens distortion as the it's speed dependent (look at the car and guardrail as a reference).    looks similar and is caused by line-wise image creation of a crt-tube. Could it be that the sensor is reading the pixels line-wise as well?  Almost forgot the most relevant detail: the shot was taken on the Storebæltsbroen. ;-)


How does an electron spin through 720 degrees for it's marked side to come back to view?

I have read that it can be proven experimentally and it occurs to all fermions.


could i connect my laptop with dish TV setup box through HDMI port

i tried my setup box to play over laptop(lenovo G560) with HDMI port, but it did'nt work at all, please suggest is there any third party tool to use setup box(dish TV) with my laptop (lenovo G560). if anyone have solution please help us.


How exactly was the long S used and why did people stop using it?

I have seen examples of the long S being used in old documents,for example in a picture of a medieval document about Muskets in which the word Musket was written as Muſket.


This picture shows my actual chapter design. It contains the Norwegian text "Kapittel" for chapter, and I want to get rid of it. How can I do this?


What does the anitpodal map do to the homology groups of a sphere?

Let $A: S^n \to S^n$ denote the map sending a point on a sphere to the exact opposite point. Let $A_*: H_n(S^n) \to H_n(S^n)$ denote the action of $A$ on the homology group. Then $A_*$ is an isomorphism from $\mathbb{Z}$ to $\mathbb{Z}$, but the generator might change.  For instance, on $S^1$, if $x_0$ is the base point on a clockwise loop and $x_1$ is a point a little clockwise of $x_0$, then their image under $A$ will have the same orientation, so $1$ will map to $1$ by $A_*$. On $S^2$, however, a clockwise loop on the top of the sphere will map to a counterclockwise loop on the bottom, so here $1$ maps to $-1$.  What can I say about higher dimensional spheres?


When the number of slides of my beamer is more than 10, the date is not displayed correctly in the inferior right corner of my slides.  \documentclass{beamer} \mode<presentation> {   \usetheme{Madrid}       % or try default, Darmstadt, Warsaw, ...   \usecolortheme{default} % or try albatross, beaver, crane, ...   \usefonttheme{serif}    % or try default, structurebold, ...   \setbeamertemplate{navigation symbols}{}   \setbeamertemplate{caption}[numbered] }  \usepackage[utf8]{inputenc} \usepackage[spanish]{babel} \usepackage{chemfig} \usepackage[version=3]{mhchem} \usepackage{caption} \usepackage{epstopdf} \usepackage{comment} \usepackage{graphicx} \usepackage{subfig} \definecolor{ao(english)}{rgb}{0.0, 0.5, 0.0} \usepackage{pgfpages} \pgfpagesuselayout{resize to}[%   physical paper width=8in, physical paper height=6in] \title[Unal%iversidad Nacional de Colombia ]{} \author{Juan Muñoz }  \date{\today}  \begin{document}  \begin{frame}   \titlepage \end{frame}  % These three lines create an automatically generated table of contents. \begin{frame} \end{frame} \begin{frame} \end{frame} \begin{frame} \end{frame} \begin{frame} \end{frame} \begin{frame} \end{frame} \begin{frame} \end{frame} \begin{frame} \end{frame} \begin{frame} \end{frame} \begin{frame} \end{frame} \begin{frame} \end{frame} \begin{frame} \end{frame} \begin{frame} \end{frame}  \end{document}   ¿How could I fix it?


Null pointer exception with linked hashmap

Crashlytics is showing a few crashes on the following line:  if(appObj.getStationsList().get(tag)!=null){   getStationsList() returns a LinkedHashMap<String, StationInfo>. How can I avoid getting this error? It's ironic that my very check to avoid this error actually resulted in it.


HtmlAgilityPack Drops Paragraph End Tags

I just wrote a simple console application to see if I was crazy         var html = "
<x></x>
";          HtmlDocument doc2 = new HtmlDocument();         doc2.LoadHtml(html);         var pageNodes2 = doc2.DocumentNode.SelectNodes("//div[contains(@class,'page')]");          foreach (var pageNode in pageNodes2)         {             Console.WriteLine(pageNode.InnerHtml);         }   and the output is      <x></x>   but if the x is replaced by
 the output becomes
   how can I solve it ?


What is the difference between public void and void methods?

I am working on a TicTacToe game and have to create several methods to handle various parts of the game.  One of the methods is to clear the board for a new game.  This is what I have for the method:   void resetBoard()  {     button_square_one = " ";     button_square_two = " ";     button_square_three = " ";     button_square_four = " ";     button_square_five = " ";     button_square_six = " ";     button_square_seven = " ";     button_square_eight = " ";     button_square_nine = " "; }  In the onCreate() method:       // Assign button objects to ids     Button button_square_one = (Button)findViewById(R.id.r1c1_button);     Button button_square_two = (Button)findViewById(R.id.r1c2_button);     Button button_square_three = (Button)findViewById(R.id.r1c3_button);     Button button_square_four = (Button)findViewById(R.id.r2c1_button);     Button button_square_five = (Button)findViewById(R.id.r2c2_button);     Button button_square_six = (Button)findViewById(R.id.r2c3_button);     Button button_square_seven = (Button)findViewById(R.id.r3c1_button);     Button button_square_eight = (Button)findViewById(R.id.r3c2_button);     Button button_square_nine = (Button)findViewById(R.id.r3c3_button);   I have created the button objects in the xml file.  I was going to create the methods with a return type of void instead of public void.


Why shouldn't we use words such as 'here' and 'this' in textlinks?

Over the years of surfing on the web I have found numerous examples of people saying that you shouldn't use the word "here" in a textlink etc. Personally I like the idea of using the word, because it is so straightforward for your visitors to know where to click.  The only reason that I can truly think of is for SEO purposes. The word here doesn't have much value as a keyword as such.  I would like to know some other opinions on why we should/shouldn't use word like "this" and "here" in a textlink.


fancyhdr clearing first page of a chapter

Hi have already a working fancyheader, but it is also showing on the chapter beginning which I want to avoid (see attachment).   \pagestyle{plain} % reset page numbering to 1,2,3,..  \pagenumbering{arabic}  \setcounter{page}{1}     \fancypagestyle{plain}  \fancyhf{}  \pagestyle{fancy}  \fancyhead{}  \fancyhead[L]{\textit{\sffamily\ifthenelse{\isodd{\value{page}}}{\leftmark}{\rightmark}}}  \fancyhead[R]{\textit{\sffamily\thepage}}  \fancyfoot[C]{}  \renewcommand{\headrulewidth}{0.1pt}     Basically the cfoot ist not applying for the first page of a chapter.


I have got ArrayIndexOutOfBounds exception..What is the reason?I diid'nt understand

This is the java code   String arr[]=new String[3]; String opdate=null;  list=new ArrayList<String>(); ResultSet rs=ps.executeQuery();  while(rs.next()) {        opdate=rs.getString(1);     arr=opdate.split("-");     if(arr[1]==month)     {         list.add(rs.getString(1));         list.add(rs.getString(2));         list.add(rs.getString(3));         list.add(rs.getString(4));         list.add(rs.getString(5));         list.add(rs.getString(6));         list.add(rs.getString(7));     } }   this returns nothing..where am i wrong?? plz help me out


Should I report "Thank you" comments as obsolete?

Should I do something about these types of comments? I saw like 3 "Thank you" comments in a single post today.  Should I report it? Ignore it? Or what?


Document title pulling in dynamic keywords will not change casing on first letter of words

I've been looking around for answer to this but haven't found solution that works for my situation. I'm pulling in keywords dynamically from the URL and populating the page title with them. They are lower case and I need to find a way to make the first letter of each keyword Uppercase. This is the script I have so far:    var keywords = window.location.href.match(/kw=(.+)/)[1];  var array = keywords.split('+');  document.title = array.join("" + " ");     I thought this would be so simple but have struggled with it.  Any help would be greatly appreciated.  Thanks!  Update: this works     <script type="text/javascript">  var metas = document.getElementsByTagName('meta');      for (var i=0; i<metas.length; i++) {    if (metas[i].getAttribute("property") == "keywords") {      document.title = metas[i].getAttribute("content") + " ";    }     }       var mystr = document.title;  var subs =  mystr.replace(",", " ");  var newtitle = toTitleCase(subs);  document.title = newtitle;    function toTitleCase(str) {    return str.replace(/\w\S*/g, function(txt) {      return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();    });  }     </script>


Making SharePoint lookup field auto complete

Can we make a SharePoint field which is a lookup drop down box on the editform.aspx. have the functionality so that user can type in and select from the options based on the values of the types?


How should money sitting idle in a bank account be invested?

I've been working for a couple of years still living in my parents home with no outgoings, meaning all my money goes straight to the bank. I've saved around £30'000+ but I'm unhappy with money sitting there as I feel there would be a better way to make use of it such as private equity or investments after some research - could it be used to kickstart some sort of business? I guess my question is: How could this money best be invested for me to improve my revenue / increase revenue streams?


I used AMS LaTeX template with gsm-l package to write my teacher's book.   The table of content that produced has the following form:    in which 1, 2, 3.... are sections and 3.1, 3.2, 4.1, 4.2,.... are the subsection.   I want to indent the subsection with respect to the section, like this (it's ok without dots, though):


I have waited for my favorite time period of in the evening.   Can this sentence make sense in meaning?


Apparent Violation of Newton's $3^{\text{rd}}$ Law and the Conservation of Momentum (and Angular Momentum) For a Pair of Charged Particles

Consider a system of the two identical positive point charges situated in free space (isolated from the influence of any other external fields) as shown in the attached diagram. Particle $1$ is at $(a,a,0)$ and particle $2$ is at $(0,a,0)$. Their velocities, at the considered instant of time, are as shown in the diagram ($\mathbf{v}_1$ along the $+x$ axis, $\mathbf{v}_2$ along the $+z$ axis).    Now, by applying the Biot-Savart law, we find that the magnetic field due to particle $2$ at the position of particle $1$ is along $+y$ axis, which means that the force acting on particle $1$ is along $+z$ axis according to Fleming’s left-hand rule. A similar analysis shows that there is no magnetic force on particle $2$ as the magnetic field of particle $1$ should vanish at positions (relative to particle $1$) located along its velocity vector.  Now, if we observe the net torque on the system of two particles about the $y$ axis then it is non-zero and is directed along the $-y$ axis. Here, there are no external forces or torques acting on the isolated two-particle system, and yet the net torque, as well as the net force on the particles, are nonzero. Why? Also, Newton's third law of motion seems to be broken in this scenario. Why?    Edit $1$  I have come to know from the responses that the electromagnetic field itself takes away some momentum and angular momentum about the considered axis. However, I think that if I consider only two charged particles as my system then the Abraham-Lorentz force can be assumed to be acting upon the system, and that is sufficient to make sure that we have considered the momentum being carried away by the electromagnetic field itself.   Even after considering the action of the Abraham-Lorentz force for the two-particle system, the scenario breaks both Newton's third law and the conservation of linear and angular momentum. This is because the Abraham Lorentz forces do not exactly counterbalance the force and the torques, on the two-particle system under consideration, due to the magnetic field.    Edit $2$  The previous edit was a result of confusion and misunderstanding on my part. The force associated with the momentum carried away by the electromagnetic field as a result of the electromagnetic interaction described in the question is the Lorentz force itself which simply doesn't obey the third law of motion. The Abraham-Lorentz force is a different story. It is associated with the momentum carried away by the radiation emitted by the accelerated charged particles. This is an additional force apart from the Lorentz force and corresponds to an additional carriage of momentum by the electromagnetic field. The momentum carried away by the electromagnetic field in correspondence with the Lorentz force doesn't correspond to radiation.


How can I get the source code of a command?

In this particular case the reset command. I want to read the code of this command.  TY


What command can i use to create a directory such as desktop, documents, downloads etc. For a new user's in ubuntu server

In ubuntu server when i ls a newly created user i cannot find directories such as desktop, documents, downloads etc.


Why $d(x) + d(y) \le n$ when proving Mantel's theorem

I was going through the Bollobás book on Modern Graph Theory.  When proving the Mantel's theorem, that states $n^2/4$ is the lower-bound for having triangles, the proof start from the assumption that:  $$d(x) + d(y) \le n$$  Can someone explain what leads to that?


Is time just an axiom? Or can it be proven to exist?  Correct me if I'm wrong, but our whole understanding of the universe is based on directly observing the world and building out axioms that are consistent with our observations.  Unfortunately, axioms cannot be proven to be true (I believe Godel's incompleteness theorem proved that). So if time is an axiom, then it is not provable.  Time also cannot be directly observed either, unlike perceiving an object (seeing a moon, feeling the pressure of the water, etc.)  Time is also irrelevant for some physical concepts such as Work.  With all of that said, my question is can time be proven to be/exist? And a secondary question of are there physical/mathematical theories being developed that take it as their axioms that time does not exist?


I am not a very experienced Ubuntu user, so I have to look up some information on the internet. Most of the links lead to . But each time I try to open a page on this site, it says "Sorry. The administrator has banned your IP address. To contact the administrator click here". That seems strange, because it is the first time I have ever been on ubuntuforums.org.   The worst thing is: when I click on the word "here" to contact the administrator, it says "The administrator may have required you to register before you can view this page." I tried logging in with SSO as it says, but when I open the login page, the message about my ban appears again.   I tried to contact the ForumCouncil from their page, but it gives me the same error => I can't open it  Is there any way to find out the reason why my IP was banned? Thank you.


Clash of Clans Difficult village transfer

I first started playing clash of clans on my iPod 4th generation.  I soon realized I wanted to start over because I upgraded too quickly and wasted gems.  I started over and my new village (lvl 65) is much better than the old village (lvl 50).  I recently got an iPhone 5c and want to transfer my lvl 65 village over.  I have tried but only my lvl 50 village will transfer.  What should I do?


Why does acro add the plural ending in front of the short version in addition to the end?

See this minimum working example:  % compile with LuaLaTex and Biber  % !TeX encoding = UTF-8 % !TeX spellcheck = de_DE \documentclass[12pt,a4paper,titlepage,numbers=noenddot]{scrartcl} \KOMAoption{listof}{totocnumbered,leveldown} % unicode \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[utf8]{luainputenc}  \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage{booktabs}  % acronyms \usepackage{acro}  % https://tex.stackexchange.com/questions/192930/acro-package-handling-possessive-case-apostrophe-s#268225 \ExplSyntaxOn \ProvideAcroEnding{genetiv}{s}{s} \NewAcroCommand \acg {     \acro_genetiv:     \acro_use:n {#1} } \ExplSyntaxOff  \acsetup{     hyperref = true,     page-style = comma,     pages = all, %/first     % list-style = tabular     tooltip=true,     activate-trailing-tokens = {dash,babel-hyphen}, % German quotation for hyphen, see official doc     cite-connect = {} % no space before citation }  \DeclareAcronym{qrCode}{     short = {QR-\-Code},     long = \enquote{\foreignlanguage{english}{Quick Response}}-\-Code,     % short-genetiv = , }  % deutsch \usepackage[ngerman]{babel} \usepackage[ngerman]{isodate} \usepackage{lmodern} % font \usepackage[german=quotes]{csquotes}  \begin{document}      custom: \acg{qrCode}        plural: \acfp{qrCode}        for comparison, singular: \acf{qrCode}  \end{document}   The problem is the QR code acronym, defined via the package acro.  It looks like this:   Now in both the plural and the custom ("genetiv") defined word ending, the short version gets an s before the word (sQR-Codes) in addition to after the word ending.  This issue does not happen:   when you only request the single version standalone (without first appearance) via \acsp e.g. or, as demonstrated, when you request the singular version.


I have been playing with the series which I had been calling the 'Double Basel problem' for the past couple of hours $$ \sum_{n=1}^{\infty} \sum_{m=1}^\infty \frac{1}{{n^2 +m^2}}. $$ After wrestling with this for awhile, I managed to generalize a result demonstrated . This identity is: $$ \sum_{m=1}^{\infty}\frac{1}{x^2+m^2} = \frac{1}{2x}\left[ \pi \coth{\pi x} - \frac{1}{x}\right]. $$ Hence the original series becomes: $$ \sum_{n=1}^{\infty} \frac{1}{2n}\left[\pi \coth{\pi n} - \frac{1}{n} \right]. $$ I have no idea where to go next with this problem.  I seriously doubt that this series is convergent; however, I have been unable to prove it.  Can you prove that this series is divergent? If it converges what is its value?  Thanks so much!


Multiple planes with transparent PNG textures render black

I am trying to create a forest effect, however, the alpha from the trees in the background is not working properly in front views. Any idea about how to solve this? Thanks!


Conversion of fixed-width file to Excel and back

I have a fixed-width file which is used by the interface as it is. Now, I have some 500 records for which one of the fields is blank. I have the information separately with me.   I was wondering if there is a way to convert the fixed width file into Excel, put the missing field in using Excel, and convert the file back to fixed-width without altering the layout. Is it possible? If yes, how? If no, is there an alternative method to do so?


$$\lim_{x\to 0^{+}}x^{x^x-1}$$  Note:- I have solved this problem and below is the solution but I am searching for the better approach  My attempt is as follows:-  $x^x$ is indeterminate form $(0^0)$ as $x$ tends to $0^{+}$  $$\lim_{x\to 0^{+}}x^{x^x-1}=e^{\lim_{x\to 0^{+}}\left(x^x-1\right)ln(x)}\tag{1}$$  Let's assume $\lim_{x\to 0^{+}}\left(x^x-1\right)ln(x)=y$  $$y=\lim_{x\to 0^{+}}\left(e^{x\ln x}-1\right)\ln x\tag{2}$$  As $x$ tends to $0^{+}$, $x\ln x$ is the indeterminate form $(0\cdot\infty)$  So first let's see what this indeterminate form actually tends to  $$z=\lim_{x\to 0^{+}}x\ln x$$  Assume $t=\ln x$  $$z=\lim_{t\to -\infty}e^tt$$ $$z=\lim_{t\to -\infty}\dfrac{t}{e^{-t}}$$  So we are getting $\dfrac{-\infty}{\infty}$ and we can apply L's Hospital rule here  $$z=\lim_{t\to -\infty}\dfrac{1}{-e^{-t}}$$  $$z=0$$  So going back to equation $(1)$, now we can say as $x$ tends to $0^{+}$, $x\ln x$ tends to $0$  $$y=\lim_{x\to 0^{+}}\left(e^{x\ln x}-1\right)\ln x\tag{3}$$  $$y=\lim_{x\to 0^{+}}\dfrac{\left(e^{x\ln x}-1\right)}{x\ln x}\cdot x\ln^2 x$$  $$y=\lim_{x\to 0^{+}}\dfrac{\left(e^{x\ln x}-1\right)}{x\ln x}\cdot x\ln^2x$$  $$y=\lim_{x\to 0^{+}}x\ln^2x$$  $$y=\lim_{x\to 0^{+}}\dfrac{ln^2x}{\dfrac{1}{x}}$$  So we have $\dfrac{\infty}{\infty}$ form here and so we can apply L's hospital rule here  $$y=\lim_{x\to 0^{+}}\dfrac{2\ln x\cdot\dfrac{1}{x}}{\dfrac{-1}{x^2}}$$  $$y=\lim_{x\to 0^{+}}\dfrac{2\ln x}{\dfrac{-1}{x}}$$  Again applying L's hospital rule here as we have $\dfrac{\infty}{\infty}$ form  $$y=\lim_{x\to 0^{+}}\dfrac{\dfrac{2}{x}}{\dfrac{1}{x^2}}$$ $$y=\lim_{x\to 0^{+}}2x$$ $$y=0$$  Putting value of $y$ back in equation $(1)$  $$\lim_{x\to 0^{+}}x^{x^x-1}=1$$  So lots of ups and down in this problem, can it solved by any simpler means?


What is the role of the speed of light in mass-energy equivalency?

Where does $c$ squared come into play in the equation  $E=mc^2$. Multiplication obviously but how does energy equal mass times the speed of light?


Windows 10 PCs start in the middle of the night

I have recently upgraded two PCs to Windows 10. Both computers do use "hibernate" extensively. Both are set up in a way so that keyboard, mouse and ethernet commands are not waking the PC.  Unfortunately, both PCs have startet to wake up in the night and stay awake for hours on end. This is totally annoying and costs a lot in terms of energy, so I'm investigating why this happens.  Powerconfig often fails to show any reason, but most often updates seem to be the culprit. Is there any way to force the PCs to stay shut down in the night? Unplugging is not really an option, since one of them is a laptop.