Combinatorics problem: $n$ people line up to $m$ clubs

Assume that there are $n$ people line up to get into $m$ different clubs. How many ways to do it if each people is different and order of people in the line matters.  Sol. Clearly, each people has $m$ different choices for clubs. So there are $m^n$ ways of choosing clubs. Now we count number of different lines. Let $x_i$ be the number of people lining to get to the club $i$, $1 \leq i \leq m$, $x_i \geq 0$.  Then $$x_1 + x_2 + ... + x_m = n$$ with $x_i$ non-negative integers. So there are ${m+n-1}\choose{n-1}$ ways, ignore order in each line. So there are ${m+n-1}\choose{n-1}$$ x_1!x_2!...x_n!$ possible lines.  The answer is weird since it is in $x_1, ...,x_n$ terms, and I think it is wrong. However, I am not sure how to fix it.  Any help please ?


How can I turn the model items into a one string in C#?   IEnumerable<MyModel> test = _table.entity.ToMyModel();   Now my model is like  return new myModel {     Item1 = "This is ",     Item2 = " a test ",     Item3 = " to make one sentence" }   Now I want to do something like this to turn the first row of the IEnumerable into a sentence.   string xyz = test.First().toString();    I would like xyz to = "This is  a test  to make one sentence"


2 exact copies of autorun.inf, one works one doesnt

I have two Autorun.inf files, the code inside them are exact same. But only 1 works, other one doesn't work.  The one that work is copied from DVD, and i edited it. The one that doesn't work created on my desktop by renaming text file ( i correctly renamed it ).  This one works    This one doesn't work    If you want the files :   Working one :   Not working one :   Does anyone know why doesn't the one i created on my desktop wont work? and how can i get it working? and whats the difference between those 2 file?  Thanks.


Does a non-US resident need a visa for an international connection through USA?

I have purchased a ticket a friend to come and visit me in Australia.  She is a Venezuelan passport holder, but lives in Panama. We already sorted her Australian tourist visa.  However, there are concerns raised that she needs a DS160 to make that connecting flight through the USA.  The flight:   Panama -> IAH (George Bush Intercontinental Airport)  IAH -> Sydney   I called United, and they said their system doesn't show any requirements are needed.  I also tried calling immigration numbers, airport numbers, just automated voice message hell.  However, the internet says any flight that goes THROUGH the USA, is counted as a visit there, and therefore you need a visa.  Does she need some visa for this or not?


Screenshot Tools to Capture Scrolling Windows

As the title of the Question states, I want to know what are the tools available for Ubuntu which would allow me to take screenshots of "Scrolling Windows" ie; tall webpages, tall nautilus window which contains lots of files and folders etc. as a single image file.  For the sake of clarity, I have already seen . However, I am specifically looking for tools to capture Scrolling Windows.  As an example, my personal favorite for Microsoft Windows is . It's light on resources and helps me take beautiful screenshots. Is there anything close to it available for Ubuntu?


I want the first column of a table in PLSQL to be auto-increment.That column will be the primary key for that table. I heard something called serialize but i didn't get proper description about that. i was working in SQL Server. I am new to Oracle(PLSQL). Please help me to find out a proper solution.


Recently a exam called PRMO 2017 was conducted. Question 28 went as follows,     Let $p$, $q$ be prime numbers such that $n^{3pq} – n$ is a multiple of $3pq$ for all positive integers $n$. Find the least possible value of $p + q$.   This question was considered to be quite tough. Many people are saying it was too tough to be put in a exam which is open for 14 year olds.   How can it be solved?  I have not studied number theory, so I really couldn't attempt this.  Thanks.


Prove that $\binom{n}{0}+\binom{n}{2}+\binom{n}{4}+...=\binom{n}{1}+\binom{n}{3}+\binom{n}{5}+...$ using a combinatorial approach, NOT an algebraic approach.  Fot values of $n$ which are odd this is simple, using Pascal's identity and/or Pascal's triangle, but I am not sure how to approach this for even values of $n$. Thank you for your help.


I'm wondering why pull up resistors in text books are told such that they pull up the voltage to \$V_{CC}\$. Here is a diagram:    When the button is open what will be the input voltage to the micro controller? \$V_{CC}\$? No voltage drop at \$R_1\$?


SMART Disk Failure 05 - Reallocated Sector Count: Creating a Partition Ubuntu 12.04

I apologize if this question has been answered previously.  I've checked through the "similar titles" but haven't exactly had any luck.  I'm aware of the problem and I know the solution, I simply don't know how to implement the solution properly.  Any help would be greatly appreciated.  What I'm experiencing is a SMART failure 05 and I'm being warned that a disk failure is imminent.  My old partitions is what is causing the problem and the solution is to skip over the bad sectors via a new partition.  I have a 100gb hard drive, and I think it's safe to say that the first 20gb are borked in this regard.  How do I set up a partition outside of these first 20gb?  Would I designate this as "free space"?  Or something else?  Please be detailed (e.g. screen shots), I'm fairly computer literate but I'm a beginner when it comes to Ubuntu 12.04.  Thank you for your help!


Why does the material tab has a different layout?

I downloaded a Blend from Blend Swap and the materials are behaving much differently than I am used to - I think it has something to do with Cycles maybe? Here is what I see:    On the left is my "normal" materials tab, and the right is from Blend Swap. What is going on here? Why are they different? Also, with the screen on the right I cannot assign a different material to different parts of the mesh:    Any ideas what I'm into here?


We have a rectangle that is rotating by its center from $0$ to $360$ degrees. This rectangle rotation starts in $0$ degrees when we know all four rectangle points. We also know the angle we want to rotate the rectangle.  What I need is a formula for these points when rectangle is rotated.


I'm pretty new to blender and followed a few tutorials to learn the basics. Now i'm trying to create a beer bottle scene for one of my customers. The Neck and backside label were no problem since i could copy parts of the bottle. But the oval front label drives me crazy. I didnt get it to bend around the cylinder I've tried to follow to some bend-tutorials but im keep messing it up. I've tried the warp feature as well as the simple deform modifyer. Does anyone know how i can achieve this:     Thanks!!!


How do we know that human eye reacts on frequency of visible light rather than on some other parameter?

This is a very basic question in optics: why the mathematical language we use corresponds to what we actually see. There are (at least) two ways to think of a decomposition of a visible light. One way is experimental: when a beam of light passes through a glass prism it decomposes to many beams according to their color. These colors are perceived by human eyes. The second way is theoretical: the light is thought of as electromagnetic wave satisfying the Maxwell equaitons in vacuum. Then one uses the Fourier transform with respect to the time variable to decompose a given solution as a combintaion of solutions of the form $\vec E(\vec x)e^{i\omega t}$.  If I understand correctly it is claimed in all stadard textbooks in optics that the above two decompositions correspond to each other in the sense that the frequancy $\omega$ determines the color of the light. Why? How do we know that the color is determined by the frequency of light and not by some other parameter? I could not find any clear explanation of this  correspondence so far. A reference would be helpful.  Remark. There is a similarly sounding question  It is different from my question, and the answers there do not answer my question.


Interfaces with static fields in java for sharing 'constants'

I'm looking at some open source Java projects to get into Java and notice a lot of them have some sort of 'constants' interface.  For instance,  has an interface called , and most other core classes implement this interface. The interface is riddled with static members. Is there a reason for this approach, or is this considered bad practice? Why not use enums where it makes sense, or a static class?  I find it strange to use an interface to allow for some sort of pseudo 'global variables'.  public interface PConstants {    // LOTS OF static fields...    static public final int SHINE = 31;    // emissive (by default kept black)   static public final int ER = 32;   static public final int EG = 33;   static public final int EB = 34;    // has this vertex been lit yet   static public final int BEEN_LIT = 35;    static public final int VERTEX_FIELD_COUNT = 36;     // renderers known to processing.core    static final String P2D    = "processing.core.PGraphics2D";   static final String P3D    = "processing.core.PGraphics3D";   static final String JAVA2D = "processing.core.PGraphicsJava2D";   static final String OPENGL = "processing.opengl.PGraphicsOpenGL";   static final String PDF    = "processing.pdf.PGraphicsPDF";   static final String DXF    = "processing.dxf.RawDXF";     // platform IDs for PApplet.platform    static final int OTHER   = 0;   static final int WINDOWS = 1;   static final int MACOSX  = 2;   static final int LINUX   = 3;    static final String[] platformNames = {     "other", "windows", "macosx", "linux"   };    // and on and on  }


Would like to withdraw my flag for closure in favor of vote to close

About a month ago, when I had less than 3k rep (on stackoverflow) I flagged  as a duplicate, a copy and paste of a previous one by the same author. The flag hasn't been deal with (no problem there, stackoverflow is v busy), and I now have more than 3k rep and I'd like to be able to vote to close, so that it goes into the close queue and gets dealt with by the community.  But when I choose the close option I get "You flagged this question for closure Mar 31 at 19:39". It doesn't seem unreasonable that my flag should be withdrawn and replaced with a vote to close. This isn't just for the situation where a sub 3k user becomes a 3k user: I understand something similar might occur if I'd used up my close votes for the day.


Is there any way to play AOE2 without a CD legally?

I can't seem to find anything online that would suggest I can play this game legally without a CD. Not to mention, the CD I own has a chunk of it missing (it still plays fine and installs fine), and having it on multiple computers is a hassle because of the CD always needed requirement.    Is there any way to do this? Whenever I try playing without a CD, I get this:


Virtual pair of particle-antiparticles trajectory

Is it possible to do heuristic calculations on virtual pair of particle-antiparticle trajectories that appear in a vacuum? For example, what is the maximum distance between them during virtual process? Is uncertainty principle useful in that case?  EDIT: I am interested in vacuum fluctuantions. I made following assumption: virtual particles = vacuum fluctuations (maybe I am wrong because it is rather heuristic view on the topic) for example I assume that quantum fluctuations can be realised by virtual pairs (like electron-positron). Then, let's say that (heuristically) virtual pair appear in one point of spacetime, each particle moves away from each other and then they meet together and annihilate. This heuristic view is used by Hawking in his popular book to explain black hole evaporation (yes, I know it is popscience book and it should not be treated literally).  So first qeustion: do vaccuum fluctuations can be connected with virtual pairs?  Second question: Lets say that vaccuum fluctuations can be realised by pairs of particle-antiparticle. What is the maximum distance (heuristically) beetween particle and antiparticle during that process?  EDIT 2: For example: Aitchison, I. J. R. (1985). Nothing’s plenty the vacuum in modern quantum field theory. Contemporary Physics, 26(4), 333–391. :  These large energy fluctuations can of course also be regarded as matter fluctuations via Einstein’s relation $E = mc^{2}$  Another example: Black Hole Physics: Basic Concepts and New Developments Book by Igor Dmitriyevich Novikov and V. Frolov:  For particles of virtual pair the probability to find one particle a the distance l from another is proportional to $exp(-l/\lambda_{m})$ where $ \lambda_{m}$ is Compton lentgh of particle of mass $m$.


Strange javascript error when iterating over array

Consider the following code: const testArray = ['string1', 'string2', 'string3'];  for (let iterator in testArray) {     console.log(iterator == 0); }  My IDE (Visual Studio Code), complains about the console.log, that it will always return false (error: ts(2367)) But if I input this code directly either here, or in a JSBin, or in my current browser, I always get the true result on the first iteration. Anyone can explain me, if my IDE is to blame for this, or maybe there is some legacy javascript, where that condition indeed always returns false? Based on this table  it also seems that the above code is valid, and will run as expected.   const testArray = ['string1', 'string2', 'string3'];  for (let iterator in testArray) {     console.log(iterator == 0); }


Workflow to get particle animation into 3rd party renderer

I've built a particle animation I like in blender... basically like dust falling through the air. I want to import this to KeyShot for rendering.   I think I need to convert the particles to mesh, but I want them to still be animated as they are. I think I'm missing a step. I want to be able to export via .abc which KeyShot can import as a Keyframed animation.   I'm pretty new to Blender. If someone can offer me the steps, I'd be very grateful. I assume it'll be something like:   Create Particle Animation > Convert Particles to Mesh > Apply Baked Particle Animation to Mesh (not sure how to do this) > Keyframe animation > Export as Alembic  I haven't been able to get it to work. Thanks in advance.


One day I was playing and I thought if I could play more. So I thought of a scenerio in which I would play for 15 minutes but 5 minutes time would be passed in the whole universe. So anyone except me won't know about my extra time.  So how can I do that? By using relativity, if I go faster, then my time will go faster which I don't want. I want my time go slower than the whole universe.  Now suppose  if the universe is speeding from me in a certain , than universe's time will go faster which means my time going slower. But if this happens, then it is same that I am also going from the universe in the certain velocity too. So my time will go faster too.  So how can I solve this problem and play more?


Intermitted line & pictured not in the box

I wanna make an intermitted line to illustrate the long length of a line. something like this:    I'm using circuitikz this is the code so far there is a problem here that it is not inside the box.  \documentclass[10pt, a4paper, twoside, titlepage, openbib]{article}      \usepackage{tikz}         %Tikz is een library die toestaat om tekeningen te maken         \usetikzlibrary{shapes}             %Shapes         \usetikzlibrary{arrows}             %Arrows         \usetikzlibrary{calc}             %Calculation         \usetikzlibrary{decorations}             %Decorations         \usetikzlibrary{backgrounds}             %Backgrounds         \usetikzlibrary{fit}             %         \usetikzlibrary{positioning}             %         \usetikzlibrary{chains}             %     \usepackage[europeanresistors,americaninductors]{circuitikz}     \usepackage{tcolorbox}         %http://mirror.unl.edu/ctan/macros/latex/contrib/tcolorbox/tcolorbox.pdf         \tcbuselibrary{listings}         \tcbuselibrary{theorems}  \begin{document}  %---Image--------------------------------------------------------------------------------------------    \begin{figure*}[ht!] %het blokschema     \centering     \begin{tcolorbox}[colback=white]     \centering     \begin{tikzpicture}[node distance = 0.2cm, auto]         \begin{circuitikz}             \draw                 (1,3) node[spdt,xscale=1, yscale=1,anchor=in] (myspdt1) {}                 (4,3) node[spdt,xscale=-1,yscale=1,anchor=in] (myspdt2) {}                 (8,0)   node[ground, yscale=1]{}                         to[full led]        (8,3)                         to(myspdt2.in)                 (0,0)   node[ground]{}                         to[vsourcesin]      (0,3)                         to(myspdt1.in)                 (0,2) node[right]{$V_{s}(t)$}                 (myspdt1.out 1) -- (myspdt2.out 1)                 (myspdt1.out 2) -- (myspdt2.out 2);         \end{circuitikz}     \end{tikzpicture}     \end{tcolorbox}            \caption{Het eerste probleem}          \label{fig:Het eerste probleem}  \end{figure*} %---Image--------------------------------------------------------------------------------------------  \end{document}


Network Manager refusing to manage wired interfaces

After a new install of Kubuntu 16.10, I'm unable to convince Network Manager to manage my wired network interfaces. I've already confirmed that I can use the wired interfaces by configuing them manually in /etc/network/interfaces and using ifup/ifdown. In preparation for Network Manager, I have removed any mention of the wired interfaces from /etc/network/interfaces:  # cat /etc/network/interfaces auto lo iface lo inet loopback   After messing around with it (e.g. setting managed=true), I've restored NetworkManager.conf to its original state:  # cat /etc/NetworkManager/NetworkManager.conf [main] plugins=ifupdown,keyfile,ofono dns=dnsmasq  [ifupdown] managed=false   After each change, I always restart Network Manager using systemctl restart network-manager, but there is never any change. Nothing I do will convince Network Manager to touch those two wired interfaces. For example, using nmcli to explicitly instruct NM to manage one of them has no effect:   # nmcli d DEVICE           TYPE      STATE      CONNECTION wlx0002723c09df  wifi      connected  JRT-AIR enp0s31f6        ethernet  unmanaged  -- enp11s0          ethernet  unmanaged  -- lo               loopback  unmanaged  -- # nmcli d set enp11s0 managed yes # nmcli d DEVICE           TYPE      STATE      CONNECTION wlx0002723c09df  wifi      connected  JRT-AIR enp0s31f6        ethernet  unmanaged  -- enp11s0          ethernet  unmanaged  -- lo               loopback  unmanaged  -- # nmcli d show enp11s0 | grep STATE GENERAL.STATE:                          10 (unmanaged)   All the documentation and help information I've found says that I need to edit either /etc/network/interfaces or /etc/NetworkManager/NetworkManager.conf (e.g. setting managed=true in NM.conf), but none of these edits has had any effect. Both ethernet interfaces are always listed as "unmanaged" in nmcli, and NM refuses to create any connections using them. Can anyone suggest what I might be missing here?  As an additional note, when booting a live USB on this machine, Network Manager happily manages these wired interfaces as expected. Comparing the config files between the live USB system and the installed one, I see no differences relating to network configuration.  Edit: On further investigation, this only happens when the root filesystem is ZFS. I installed to an EXT4 partition, and everything worked correctly. Then, I copied the files from that working installation into a ZFS filesystem and made that copy bootable, and the ZFS copy showed the error, despite having all identical files to the working EXT4 copy.


Evaluating $\int_{0}^{1}\int_{0}^{1}\sqrt{x^{2}+y^{2}}dxdy$ using polar coordinates.

I want to evaluate the integral $\int_{0}^{1}\int_{0}^{1}\sqrt{x^{2}+y^{2}}dxdy$ using the substitution $x=r\cos\theta$ and $y=r\sin\theta$ where the Jacobian is given as $|J(r, \theta)|=r$ and thus $dxdy=rdrd\theta$.  I need to set the range for $r$ and $\theta$. For $\theta$, it seems obvious that it ranges from $0$ to $\frac{\pi}{2}$ to cover all parts of the rectangle. But I am confused with the range for $r$. Would it be OK to set minimum $r$ as $0$ and maximum $r$ as $\sqrt{2}$, which is the diagonal of the square domain? I think I am confused with the fundamentals of integration.


Looking for a 1000 most frequent english words

Is there a free list of 1000 most frequent words used in everyday English? If there is a list with usage examples (as each of those words has multiple meanings for sure, not to cound phrasal verbs), it would be even greater.  Is there something alike, but with phrases? (E.g. 1000 most frequent phrases)


Why are continuum fluid mechanics accurate when constituents are discrete objects of finite size?

Suppose we view fluids classically, i.e., as a collection of molecules (with some finite size) interacting via e&m and gravitational forces. Presumably we model fluids as continuous objects that satisfy some differential equation. What mathematical result says that modeling fluids as continuous objects can accurately predict the discrete behavior of the particles? I don't know anything about fluid mechanics, so my initial assumption may in itself be wrong.


I gave a scammer my name and address; what can they do with that information?

I accidentally gave my name and address to a scammer. What can I do? Is that bad? What can they do with that information?


How do I edit the VRAM in VMWare Workstation 12?

I have a Windows 98 Virtual Machine that I want to increase the amount of VRAM in it.  The problem is, whenever I edit the .vmx file it never notices the changes and will never let me go above 4MB VRAM. How do I do this?


Should plot-recurring characters always be Wild Cards?

The PCs are demigods and have allies (also demigods) who travel with them constantly. They've become quite important to the PCs' lives though they're not "necessary," plot-wise.  Since the allied Extras are demigods and are also showing up every game session, should I turn them into Wild Cards or leave them as they are?


Chat on beta sites has an unreadable "log in" button

If you visit a chat room attached to a beta site while logged out, the log in message is all but unreadable, being dark grey on a dark blue background. For example, visit  while logged out or in private browsing mode.


does resbmit paper go to the same reviewer?

We sent paper to a reputed journal. After 4 months we get: Reviewers have now commented on your paper. You will see that they are advising that you revise your manuscript. If you are prepared to undertake the work required, I would be pleased to reconsider my decision.    Im confusing about revise? what it does means? The reviews was easy and we already resbmit them. Does the paper will be reviewed by the same reviewers? What is our change for our paper to be accepted? how long in average will take to get the decision?


Why is the battery usage graph so useless?

Is it just my phone (Nexus 5, 5.1) or did the battery usage graph become useless in Lollipop?  I've attached a graph from today that, at first (and second) glance, makes no sense at all. This is after about an hour of sitting idle with the screen off.    If someone could please explain what's going on I'd really appreciate it.


Do 401k contributions need to be invested? Can it be left as cash in the account?

As title. Since the market is a bit volatile now, wondering if I can keep the 401k contributions as cash and invest them later. Or does it necessarily need to be invested in one of the options that the brokerage provides? Thanks!


Why Diffusion and Confusion prevent statistical analysis?

I've studied the concepts of Diffusion and Confusion of cryptographic algorithms, however, I don't understand why they help in preventing a statistical analysis. Are you able to explain to me?


A better way of left padding a string with zeroes

This is how I left pad a string with zeroes:  String.format("%16s", cardTypeString.trim()).replace(' ', '0');   Is there a better way to do this? I don't like the .replace(' ', '0') part.


How to ensure that content within a column vector do not touch?

I have some variables defined in a column vector written in mathmode in the usual way  $\begin{bmatrix} \dfrac{1}{i} \\ \dfrac{1}{j} \end{bmatrix}$   However, the result shows that they are almost touching each other like this:   Is there a way to somehow expand the vector brackets so that there is some space between the i and the 1? Like a vertical \thinspace


Can a default implementation of a generic interface method be warning free?

Let's say I have a set of sources that supply an array of tagged items where the type of the item varies from source to source. I want to create a default implementation of the source method, but I haven't been able to find a way to do so without getting a compiler warning about unchecked conversions.  To begin with, here's my generic tagged item:  public class TaggedItem<T> {     private final String tag;     private final T item;     public TaggedItem(String tag, T item) {         this.tag = tag;         this.item = item;     }     public String getTag() { return tag; }     public T getItem() { return item; } }   and a sample concrete implementation where the item type is String:  public class TaggedString extends TaggedItem<String> {     public TaggedString(String tag, String item) {         super(tag, item);     } }   Now here's my generic source interface:  public interface ITaggedItemSource<T> {     default TaggedItem<T>[] getTaggedItems() {         return new TaggedItem[0]; // (1)     }     default TaggedItem<T>[] getTaggedItems(Class<TaggedItem<T>> clazz) {         return (TaggedItem<T>[])Array.newInstance(clazz, 0); // (2)     }     default List<TaggedItem<T>> getTaggedItemList() {         return new ArrayList<TaggedItem<T>>();     } }   I began with the first method. However this causes the following compiler warning at (1):  Type safety: The expression of type TaggedItem[] needs unchecked conversion to conform to TaggedItem<T>[]   So I added the second method. However this causes the following compiler warning at (2)  Type safety: Unchecked cast from Object to TaggedItem<T>[]   Finally, for the third method, I converted my array to a List and I was warning free.  For the record, here's an example of a concrete source.  public class TaggedStringSource implements ITaggedItemSource<String> {     @Override     public TaggedItem<String>[] getTaggedItems() {         TaggedString[] items = new TaggedString[1];         items[0] = new TaggedString("t1", "data");         return items;     }     @Override     public TaggedItem<String>[] getTaggedItems(Class<TaggedItem<String>> clazz) {         TaggedString[] items = new TaggedString[1];         items[0] = new TaggedString("t1", "data");         return items;     }     @Override     public List<TaggedItem<String>> getItemList() {         List<TaggedItem<String>> items = new ArrayList<>();         items.add(new TaggedString("t1", "data"));         return items;     }    I should note that both the default array and List implementations work just fine despite the compiler warnings. (As you'd expect I suppose, after all, they're just warnings.)  My questions are:   Is it possible to have a method that uses arrays that does not cause a warning? If so, how? Why is it possible to avoid a warning when using Lists?


Setting color for numbers in code listing

I am trying to mimic the behavior of Gedit's code highlighting in listing. For example, Gedit makes all numbers (int, float) in Python pink, but I have trouble implementing this. I tried numberstyle in \lstset, but it does not work. (In the example below, the "10" and "2" are not colored correctly)  \documentclass[11pt]{article} \usepackage{listings} \usepackage{courier} \usepackage{xcolor}  \lstset{     basicstyle=\ttfamily,     tabsize=4,         columns=fixed,     extendedchars=false,     breaklines=true,     keywordstyle=\bfseries\color[HTML]{a52a2a},      keywordstyle=[2]\color[HTML]{008a8c},     commentstyle=\color[HTML]{0000ff},     stringstyle=\color[HTML]{ff0bff},     numberstyle=\color[HTML]{ff0bff}, }  \begin{document} \begin{lstlisting}[language=Python, gobble=4, basicstyle=\ttfamily]     for i in range(10) :         print('%d' % i**2) \end{lstlisting} \end{document}


I wrote a command like this:  ${\cal F}_n=^{\text df}$   but at \text it gives an error. I wish to write df above = with \text but it doesn't go through. How should I fix it?  However $\textbf$ works fine, but I do not wish boldface, just text.


I'm on Ubuntu 16.04  Trying: grep '.*' file1  Output: file nu-mber o-ne second string  Trying: grep '.+' file1  Output is absent  Why plus is not working?


Monitor emits a faint noise when certain patterns are displayed

Under normal circumstances, the Dell E2310Hc LCD Monitor seems to work fine.  However, when I display an large array of hash characters ("#") a faint buzz can be heard from the monitor.  It appears to be correlated to the periodic pattern somehow:   Increasing the size of the pattern (i.e. changing the font size) changes the frequency of the noise. Adding more pattern enhances the sound. Increasing the contrast increases the intensity of the sound. Color does not seem to affect the sound. Increasing the contrast of the pattern w.r.t. the background increases the sound. Edit: Horizontally tiled patterns make little contribution, but vertically tiled patterns cause the majority of the noise.   What could be causing this?  I also noticed the same issue with another LCD monitor but it's a lot less perceptible.


My exception:  java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference   Can someone explain to me what this error really relates to? It's been over 5 hours thinking and googling this this out.


Transfering Castle treasure to overburdened storage

I wanted to know, if my gold storages are almost full, then if I transfer my Castle treasury i.e. war loots to my storage. So at this point when I am transferring the gold and elixir, I have more gold than the storage can hold. So will the extra loot stay in the castle or will it be wasted?


NO pubkey in xubuntu 11.10 when i use apt-get update

W: GPG error: http://download.opensuse.org  Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 85753AA5EEFEFDE9 W: GPG error: http://download.opensuse.org  Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51AFC9B27331E9C4 thx


Working my way through the following problem: Problem  Suppose that $E$ and $F$ are mutually exclusive events of an experiment.  Show that if independent trials of this experiment are performed,  then $E$ will occur before $F$ with probability $\frac{ P( E)}{P( E) + P( F)}.$  I have the following come up with the following solution: Solution  Since $P( E^c) = P( F)$ Therefore $\frac{ P( E)}{ P( E) + P( F)} = \frac{ P( E)}{ 1 - P( F) + P( F)} = \frac{ P( E)}{ 1} = P( E)$  But I am unsure if I am able to assume $P( E^c) = P( F)$ as a given? As well, I am particularly confused by the answer in the solution manual which makes it's argument as follows: Solution Manual  If $E$ and $F$ are mutually exclusive events in an experiment,  then $P( E \cup F) = P( E) + P( F)$. We desire to compute the probability that $E$ occurs before $F$ , which we will denote by $p$. To compute $p$ we condition on the three mutually exclusive events $E$, $F$ , or $(E \cup F )^c$. This last event are all the outcomes not in $E$ or $F$. Letting the event $A$ be the event that $E$ occurs before $F$, we have that $p = P( A|E) P( E) + P( A|F) P(F ) + P( A|(E \cup F )^c) P( (E \cup F )^c)$ $P( A|E) = 1$ $P( A|F) = 0$ $P( A|(E \cup F)^c) = p$ since if neither $E$ or $F$ happen the next experiment will have $E$ before $F$ (and thus event $A$ with probability $p$). Thus we have that $p = P( E) + p P( (E \cup F)^c)$ $= P( E) + p (1 − P( E \cup F))$ $= P( E) + p (1 − P( E) − P( F))$ Solving for $p$ gives $p = \frac{ P( E)}{ P( E) + P( F)}$ as we were to show.  Specifically his statement  since if neither $E$ or $F$ happen the next experiment will have $E$ before $F$ (and thus event $A$ with probability $p$)


Civilization - Through the Ages with old game

I own the 'old' version of Through the Ages: A Story of Civilization from 2006.  There is also a new version (Through the Ages: A New Story of Civilization) from 2015.   Some rules have been added and cards have been changed (among others).  I'm wondering if I can play the new rules, or some adapted rules with the old game.  It's too much work creating/altering the cards, but if there are not many changes it might be worthwhile. Or can some or all rules of the new game be played with the old game as well?


diffrence between property and attribute in c# uml

i am trying to make a UML for a c# project. all the references for the UML shows that you need to define attribute and operations for a class in class diagram. but i have written c# codes a lot and i know for a class you need to know the operations and properties. we have attribute in C# but it is not that important for creating a class. is it right that attributes is actually the properties in UML for c#? thank you.


Send a POST request to a OAuth Org app with a constant url. Possible?

I have a non-salesforce application that needs to send POST requests to my org. From a  by Salesforce, there is much talk of having to do back and forth redirects on the webpage till you get the access token and I presume a refresh token.  My problem, the non-salesforce app is only asking for a POST url to send the requests to. There is no way to code in the authorization steps that I'm aware of. In addition, there is no way to store a token or refresh token in my non-salesforce app. All there is is a field to save a POST url.  Is it possible to create a HTTP POST url to a salesforce org that uses OAuth that never needs to change?


Can a developer adopt a plugin marked as "not updated in over 2 years"?

I have come across a few WordPress plugins on  with this warning:     This plugin hasn't been updated in over 2 years. It may no longer be   maintained or supported and may have compatibility issues when used   with more recent versions of WordPress.   Is there a way to "adopt" or "verify" a plugin like this? I do have one plugin on wordpress.org so I understand the process. What is the correct process to bring an old or possibly abandoned plugin current?


Simulate file download over long distance

I have the following function block that complete fine when the client is accessing the server somewhere close like within the US. However, when the client is farther away, like Eastern Europe, the download of large files fails. Any ideas on how I can simulate traffic from a distant IP address? Or any other ideas to make this download and occur faster.  The files are moderatley large, i.e. 100 MB. They are on the same server as the web site is served from. I'm using C# .NET Framework 4.5 IIS 8  System.IO.Stream stream = null; int bytesToRead = 262144; byte[] buffer = new Byte[bytesToRead];  try {     var response = HttpContext.Current.Response;     response.ClearContent();     response.Clear();      //get file from file system     string path = Properties.Settings.Default.DownloadDirectory + fileId;     var fileInfo = new FileInfo(path);     if (fileInfo.Exists)     {         using (stream = new FileStream(path, FileMode.Open))         {             response.ContentType = mimeType;              response.AddHeader("Content-Disposition", "attachment; filename=\"" + name + "\"");             response.AddHeader("Content-Length", fileInfo.Length.ToString());              int length;             do             {                 if (response.IsClientConnected)                 {                     length = stream.Read(buffer, 0, bytesToRead);                     response.OutputStream.Write(buffer, 0, length);                     response.Flush();                     buffer = new Byte[bytesToRead];                 }                 else                 {                     length = -1;                 }             } while (length > 0);              stream.Close();             response.End();         }     } }


Ubuntu 32-bit or 64-bit for AMD E1-1200 processor

I have my laptop AMD E1-1200 with 1.4GHz but 4GB RAM with a AMD Radeon 7310 HD graphics card. I was trying to move to using Linux and someone advised me to install Ubuntu, but what should I do? Should I download Ubuntu 14.04 32-bit or 64-bit for this laptop? And what's the difference?


Can I make a sentence like ' He has discovered America in 1492.'?

Can I make a sentence like 'He has discovered America in 1492.'?  Then, what is the difference in meaning between 'He has discovered America in 1492.' and 'He discovered America in 1492.'?  When the action of 'discovered' has influenced us, can we use ' He has discovered America'?


Stripping spatial reference from raster using ArcGIS Desktop?

I am creating an exercise for remote sensing students and would like to take an existing raster and remove the spatial reference from the file so that the students can practice using another image to orthorectify the first. I am using ArcGIS 10.   Any hints?


Change main partition size to install another distribution

I have CentOS 5.5 installed, I have no un-partitioned space and the only ext3 partition I have is huge with lots of free space.  Can I change that partition size in order to allocate another one? I want to create new partitions in order to install another distribution there (Ubuntu).  I tried to do it through the volume administration tool in CentOS, but when I edit the partition size and confirm, it says that it is mounted in / and it needs to be un-mounted before re-sizing, which of course fails.  Any suggestion?


why same regex expression gives two different results?

Hi I have two typescript snippet . both wants to achieve the same . however console.log prints different value. any idea what is wrong? why the code 2 prints false .  var regex1 = new RegExp(/^FEDEX /) var messagePrefix = "FEDEX " console.log(regex1.test(messagePrefix)); // this prints true   let messageControlValue:string = "FEDEX " let regex2:RegExp = new RegExp(/^messageControlValue/); console.log(regex2.test(messagePrefix)); // this prints false   really appreciatiate any help thanks


Interpreting logistic regression results?

I ran a logistic glm using the following code: model10<-glm(Info_Choice~A*Group+C*Group+D*Group,data=database,family=binomial(link="logit")) summary(model10)  Info Choice is binary (0 or 1) and Group is binary (C or S). Reference group for Info Choice was 0. Reference group for Group was C.  A, B, and D are continuous variables. My output was: Coefficients:                  Estimate Std. Error z value Pr(>|z|)     (Intercept)      -0.33179    0.05155  -6.437 1.22e-10 *** A                 0.22279    0.05434   4.100 4.13e-05 *** GroupS            0.33019    0.06961   4.744 2.10e-06 *** C                 0.12254    0.05716   2.144    0.032 *   D                 0.28853    0.05645   5.111 3.21e-07 *** A:GroupS         -0.07168    0.07308  -0.981    0.327     GroupS:C         -0.04923    0.07588  -0.649    0.517     GroupS:D          0.03666    0.07606   0.482    0.630     How do I interpret the interaction results? I am confused by the negative coefficients.


I'd like to know if there is a general formula or technique for this type of problems, which I describe generally as follows :  Say you have $n$ different colors and that you have $r_1$ balls of the first color, $r_2$ balls of the second color,..., $r_n$ balls of the $n$-th color. How many different sequences of $p$ balls, with $p < \sum_{k=1}^n r_k$ , are there?  It seems to me that it is not easy to calculate the number of different sequences. In the case $p = \sum_{k=1}^n r_k$ it becomes a permutation with repetition problem because the total number is  $\frac{p!}{r_1!r_2! \dots r_n!} $. However,  with $p < \sum_{k=1}^n r_k$ is trickier . How can it be done?


Will a Canon 200D's STM lens make the same sound on a Canon 3000D/1500D?

What I understand is that STM is a part of lens, not camera. Canon 3000D or 1500D makes noise while focusing. So if we buy a Canon EF-S STM lens, which is used on 200D, will it be compatible and produce same amount (not precisely, just a general idea about it) of noise?   i.e., if Canon EF-S STM lens is used on 200D, it produces a noise (not irritating noise as compared to other old lenses) that can be heard at upto distance of 200 meters, will this produce same noise and would be heard at around same distance?


Unable to suggest edits on meta sites with mobile app

When using the Stack Exchange iOS app, the edit button for suggesting edits appears to be missing when viewing posts from a per-site meta.     App Version: 1.6.4 Device: iPad mini 2G (Wi-Fi) OS Version: Version 10.3 (Build 14E277)


What is the difference betwwen "the '80s" and "the 80's"?

"The 80's" is a song made by Robbie Williams - Rudebox.  My question is what is the difference betwwen "the '80s" and "the 80's"? (what does it mean for the different positions of apostrophe?)


Can I just use unsigned int instead of size_t?

I've got an impression that size_t is unsigned int. But can I just write unsigned int instead of size_t in my code?


I have lost functionality in the tool shelf. When I click on a selector or something in the bottom part of the tool self that you can hide and unhide, nothing happens. I can see the options but when I click it doesn't work. See screenshot where it says "Add Cylinder".


"Communicate over" vs. "communicate through"

Also schemas can communicate over database links to schemas in other remote databases.    Could one replace the preposition over with through? Will it change the meaning, and if so, when should we use over instead of through?


Installing USB Wifi w/ RealTek RTL8812AU

I have a TP-Link Archer T2U Nano Wifi USB Stick and am trying to get it to work on Ubuntu 20.04.  lsusb shows it as:  Bus 001 Device 003: ID 2357:011e TP-Link 802.11ac WLAN Adapter   Found , but without the stick I don't have internet. The  has quite a few dependencies, and I assume these dependencies will have there own dependencies as well. So I can't just download the package and copy it over to my Ubuntu machine with a USB stick. And then maybe these require updating other packages...  What are my options here? Or do I really have to download and install dmks and all its dependencies by hand?


I have some big O()'s in an integral. How can i compute or estimate such an integral?


Am planning to travel in Syktyvkar, Russia to meet the girl I met on a dating site. What document should I need to apply for a tourist visa? I'm currently residing here in Barcelona, Spain.


Operator which is symmetric but not associative?

Addition and multiplication are symmetric and associative. But I have no idea about operators which are symmetric but not associative. Please help me listing any such 2-arity operators.


Is there absolute proof for gravitational waves?

As you probably know gravitational waves seem to have been proven unless you've been living under a rock for the past day. The experiment involves the reflecting off mirrors and waves of light and it is best you look because it is a little bit complicated but not too difficult. The effects are very subtle, and I am wondering if they could be a result of any Earth movements or activity above the Earth's surface. However, it seems most likely that if it is not gravitational waves, it is Earth movements because the experiment took place deep underground. Is there any proof that this is not a result of Earth movements and the only possible explanation is gravitational waves?  I don't want to be the stick in the mud here and spoil the party. However, I do like to know that what we are seeing is the truth as the effects require highly advanced equipment to be observed.     After reading all the great responses, the proof that gravitational waves do exist appears rock solid, and it seems Einstein was right again.


Does Taylor series always converge somewhere to some function

Suppose $f$ is $C^\infty$ on an open set $U$, and $x \in U$. Does $Tf$, the Taylor series centered at $x$, converge in a neighborhood of $x$ to some function(not necessarily the original function $f$)? To be more precise, if $B$ is an open ball centered at $x$ contained in $U$, do we have $Tf$ converges in $B$? I’m not asking about Taylor series not equal to the original function. It’s a totally different question.


$f(x)$ is differentiable in $[a,b]$, $f'(a) = f'(b) = 0$, Prove $\exists c \in (a,b)$ such that $f(c)-f(a) = (c-a)f'(c)$  What i have tried: $f(x)$ is differentiable in $[a,b]$ imply $f(x)$ is continuous in $[a,b]$    so we can use MVT, we get  $f(b)-f(a) = (b-a)f'(\zeta_1) $ for some $\zeta_1$ in  $(a,b)$  $f(c)-f(a) = (c-a)f'(\zeta_2) $ for some $\zeta_2$ in  $(a,c)$    I can't figure out how to use the condition $f'(a) = f'(b) = 0$


I posted this question earlier, and was wondering if somebody could help me answer it:    Thanks in advance!


Yet another question about p-value interpretation

I'm almost positive I'm going to be marked for duplicate, but I really really just need this sorted out once and for all with a simple example.  I don't understand how a small p-value is evidence against the null hypothesis.  Take a simple example: testing if a coin is fair. This is modeled with a binomial distribution with $n$ fixed (the number of times we flip the coin) and parameter $p$. The null hypothesis $H_0$ is $p = 0.5$.  Now, let our test statistic be $D = |X - np|$, where $X$ is the number of heads in the sample (binomially distributed). The p-value is defined as $p = P(D \ge d\ |\ H_0)$, where $d$ is our observed value of the statistic.  Lets say we find, initially, for $100$ tosses that $60$ heads occurred. So $d = 10$. Then $p = P(D\ge 10\ |\ H_0)$.  Here begins my interpretation:  Then a small p-value means its unlikely for D to be greater than 10, assuming our hypothesis is true.  This means, its more likely for $D \le 10$, which is "near" $0$. That means that the sample $X$ is very likely close to a binomial distribution with p=.5.  That's my innterpretation of it, for which I can't find anything wrong. Why, then, does a small p-value indicate strong evidence against the hypothesis?  That makes zero sense to me. If $p$ is small, then our test statistic is close to zero, meaning our model is mostly likely correct! Why on Earth is that evidence against $H_0$, that's completely in support of it! Please, what is wrong with this? I can't for the life of me tell.


How does rads.stackoverflow clicking work?

This Electronics SE  includes a link to an example solution. The link entered in the text of the answer is   https://www.amazon.com/gp/product/B01G5SUZEG/   and is displayed like that as well.  But the link given to my browser is   https://rads.stackoverflow.com/amzn/click/B01G5SUZEG   I'm just curious what this is called, and if SO is able to generate revenue or other side benefits from clicks on this.


How to get the image sizes, in a function, as per the sizes mentioned in the media settings?

I'm making a custom function for my WordPress site.  function mediumFeaturedImage() {     if ( has_post_thumbnail() ) { ?>     <a href="<?php the_permalink(); ?>">         <?php the_post_thumbnail( 'medium' ); ?>          <?php } else { ?>                                     <img src="<?php echo get_template_directory_uri(); ?>/images/no-image.jpg" alt="No Image Given" width="220" height="145"/>     <?php } }   I set the medium size images to 220 x 145 in Settings > Media.  But if you look at the default 'no-image' code block here, I used hard-coded numerals as width="220" height="145". But I want to use this function into some other projects of mine. And I won't use the same settings for medium sized images always. It'll be different from site to site. And always I want my code to be dynamic. Therefore I want a code like this:  <img src="<?php echo get_template_directory_uri(); ?>/images/no-image.jpg" width="<?php $getimagesize('medium','width); ?>" height="<?php $getimagesize('medium','height); ?>"/>   It's not mandatory using a function like me. Is there a built-in code like this, that will grab the sizes I assigned in Media settings in WP-Admin, always?  Or, by using the  how can I grab the width and height of medium size image only, that assigned for medium sized images in Admin panel?  Possible?


Warning Noob PS question - Photo collage

I can do most things in Photoshop and creating the collage is not a problem, however canvas size and resolution are a complete mystery to me.  I am wanting to create a picture collage to be used on wall paper. The area it will eventually cover is roughly 3m x 3m (that's meters for you US people ;))  I am told I need an eventual dpi of 300. Is there a standard workflow for this? Surely I don't create a 3mx 3m canvas?  help please?


How to append a missing value to a python list?

Could anyone here tell me how to properly append series of missing values onto a python list?  for example,   > ls=[1,2,3]  > ls += []*2  > ls   [1,2,3]   but this is not the outcome I want. I want:     [1,2,3, , ]   where the blanks denotes for the missing values.  (note: also what I DON'T want is:     > ls    [1,2,3,'','']   )  Thanks,


Root filling up although it should have some space

This has been perplexing me for some time. I'm on Ubuntu 11.04. My root partition is filling up and I can't figure out what's causing it. Even stranger, when I run df -h, this is the output:  Filesystem            Size  Used Avail Use% Mounted on /dev/sda2             9.2G  8.8G     0 100% /   As you see, there should be about 400 MB free, but Avail shows 0. What could be causing this? I've even uninstalled some programs to free the space and it fills up again. Suggestions on how to find out which, if any, files are filling up the space are also welcome.


After level 20 I can still take new feats?

For the Rogue, the description of the Ability Score Improvement (PHB, p.96) says:     When you reach 4th level, and again at 8th, 10th, 12th, 16th, and 19th   level, you can increase one ability score of your choice by 2...   and the Feats description says (PHB, p165):     At certain level, your class gives you Ability ScoreImprovement   feature. Using the optional feats rule, you can forgo taking that   feature to take a feat of your choice instead.   Using logic you have the oportunity to receive a feat each 4 levels. So if I up my character to level 24, 28, 32... I can still take new feats?


Can I take passport photo by myself? What should I pay attention to when I trim the photo?

I want to take a passport photo by myself but I do not know what I should pay attention to. Where can I find the formal requirements for a passport photo?


Intrinsic vs. extrinsic properties of surfaces

I'm reading about the differential geometry of surfaces in $\mathbb{R}^3$. I keep seeing statements about certain surface properties being either "intrinsic" or "extrinsic".   Sometimes people say that the intrinsic properties are those that depend only on the coefficients of the first fundamental form. I don't see why you would ever make a definition like this. Why does it matter?  People say that the "intrinsic" properties are related only to the surface itself, whereas extrinsic ones depend on how the surface is "embedded in $\mathbb{R}^3$". I don't understand this at all. What does "embedded in $\mathbb{R}^3$" mean?  If the surface isn't "embedded in $\mathbb{R}^3$", then where is it? Is there more than one way to embed a given surface in $\mathbb{R}^3$?  I see that Gauss was very happy when he managed to prove that Gaussian curvature is an intrinsic property. Gauss was a fairly practical fellow, so I assume that this result has some practical significance. In other words, being "intrinsic" must be a helpful property, somehow. But how?  I work with surfaces in engineering (ship hulls, turbine blades, airfoils, car bodies, etc.) so I like concrete physical explanations better than abstractions. I have read numerous texts on basic differential geometry, so repetition of the standard material probably won't help me much, unless you can throw some new light on it.


Indent second line of a bibliography and remove brackets

I am writing a bibliography : \begin{thebibliography}{9} \item Ahmad, S. \& Tresp, V . (1993), Some solutions to the missing feature   problem in \\ \hspace{2cm}  vision, in S. J. Hanson, J. D. Cowan \& C. L.  Giles, eds, 'Advances in Neural Information Processing Systems', Vol. 5,  Morgan Kaufmann, pp. 393–400. \bibitem{}  Berthold, M. R. (1994), A time delay radial  basisfunctionnetworkfor phonemerecognition, in 'Proceedings of International  Conference on Neural Networks', Vol. 7, Orlando, pp. 4470–4473. \end{thebibliography}  The result :  And what I would like to obtain : I want to indent the second and the third line and remove brackets. Thank you for your help.


tex4ht not converting .eps images in converted_graphics folder to .png or .svg

Inside the latex file (.tex) the typical picture command is used:  \includegraphics[bb=0 0 2100 1528,width=3.83in,height=2.79in,keepaspectratio]{summbetadiethist.eps}   However, when running htlatex with the command:  htlatex foo.tex "myfile.cfg,charset=utf-8,pic-m" " -utf8 -cunihft"   there are error messages thrown like:    The preamble (myfile.cfg contents) are as follows:  \Preamble{xhtml} \DeclareGraphicsExtensions{.eps,.pdf,.svg,.png,.jpg} \Configure{Picture}{.svg} \ifdefined\HCode\else .... \fi \DeclareMathSizes{12}{14}{10}{8} \ConfigureEnv{tabular}     {\HCode{}}{\HCode{}}{}{} \ConfigureEnv{figure}      {\HCode{}}{\HCode{}}{}{}     \Configure{float}    {\ifOption{refcaption}{}{\csname par\endcsname\ShowPar \leavevmode}}    {\HCode{}} {\ifvmode \IgnorePar \fi\EndP \HCode{}\csname par\endcsname\ShowPar} \Css {body {margin-top: 100px;                  margin-right: 400px;                  margin-bottom: 10px;                  margin-left: 400px;                 }          } \begin{document} \EndPreamble   If the .svg line in the preamble is commented out to enforce creation of .png files, the errors are still thrown for each input .eps image.  So does the image engine(s) wrapped into tex4ht not like .eps images?


Help proving $\partial (A \cup B) = \partial A\cup\partial B$?

I know this is a duplicate but the other two haven't helped me much.    Fist attempt: Tried proving through double inclusion, but wasn't sure of how to convey being an element of one implied being an element of the other in either direction, although I suspect from left to right would be the easier of the two.  Second attempt: Tried proving equality directly, using the fact that the boundary of a set is equal to the set difference of its closure and interior, but struggled proving closure of union is a union of closures, or the interior of a union is a union of interiors.   I'm getting pretty frustrated and any help would be greatly appreciated!


This question is boggling me for some time. We know that heat can be transferred from matter to matter and heat is nothing more than tiny atoms vibration intensity (correct me if I'm wrong). But space is a vacuum, and so arises the question: Can you heat vacuum? :)) How can it be that earth loses it's heat to space itself?  Thanks


i m currently working in Generating dynamic invoice on monthly basis but i m stuck in getting month name in python from user input date  Example: Given Date is :15/03/2020 is date and month is March  Any help would be appreciated


I have a Java program that I'd like to daemonize on a linux system. In other words, I want to start running it in a shell and have it continue running after I've logged out. I also want to be able to stop the program cleanly.  I found  which uses a combination of shell scripting and Java code to do the trick. It looks good, but I'd like something simpler, if possible.  What's your preferred method to daemonize a Java program on a Linux system?


I am having a hard time simplifying this product notation: $$\prod_{x=1}^{(n+1)/2} (2x-1)$$ I would appreciate any help. Thank you!


I am trying to remove entries from a Hashmap, if i have already used them. Sadly, I'm not familier with Java 8 lambda expressions, so I'm not sure how to remove the entries correctly. Could somebody help me or explain what I have to do?  Here is the way I've tried doing it:  ArrayList<Integer> range10 = new ArrayList<Integer>();     ArrayList<Integer> range15 = new ArrayList<Integer>();     ArrayList<Integer> rangeMax = new ArrayList<Integer>();  for (int age = 16; age <= 100; age++){         for (Entry<Integer, Partner> entry : dbMap.entrySet()){             int key = entry.getKey();             Partner person = entry.getValue();             if (person.getAge() == alter && person.getAgeRange() == 10){                 range10.add(key);                 entry.setValue(null);             }             else if (person.getAge() == alter && person.getAgeRange() == 15){                 range15.add(key);                 entry.setValue(null);                 }             else if (person.getAge() == age){                 rangeMax.add(key);                 entry.setValue(null);                 }             dbMap.entrySet().removeIf(entries->entries.getValue().equals(null));          }   And I get a java.lang.NullPointerException for it. I don't think this is a duplicate to asking what a NullPointerexception is, since I'm primarily asking how to use the removeif-function.


I wanted to calculate $i^i$ ($i$ is an imaginary unit), and I calculated in this way:  $i^i = (i^4)^{i/4} = 1^{i/4} = 1$ (because $1^x = 1$ for any number $x$)  So, I thought that $i^i$ 's one solution is $1$.  Though, in Wolfram Alpha, it says the solution was $e^{2n\pi - \pi/2}$. It doesn't include $1$. What's wrong with my proof?


Would it be better to hide the upvote and downvote buttons unless you can use them?

I just joined the programmers stack exchange site in order to upvote an answer that I thought was particularly worthy but when I clicked on the button I was told that I needed 15 reputation.  This is not a problem, I now understand how reputation works.  However would it not be better to hide the upvote and downvote buttons on all questions and answers until you can use them? There are many other features of Stack Overflow that are hidden until they become revealed by reputation increases such as deleted questions, reviewing tools, etc.   The upvote a comment button and all the other elements above are hidden until useable so why not the main voting buttons? As it stands the interface seems to be inconsistent and frustrating for new and low rep users.


Javascript return unexpected value when calculating numbers

Please see code snippet, javascript return unexpected value when calculating numbers. I'm using newest firefox. Is there a way I could always get correct value ?    console.log(100+59.59, "expected 159.59");  console.log(200+59.59, "expected 259.59"); console.log(300+59.59, "expected 359.59"); console.log(400+59.59, "expected 459.59"); console.log(500+59.59, "expected 559.59"); console.log(600+286.59, "expected 886.59"); console.log(700+286.59, "expected 986.59");


ORA-01031: insufficient privileges when selecting view

When I try to execute a view that includes tables from different schemas an ORA-001031 Insufficient privileges is thrown.  These tables have execute permission for the schema where the view was created.  If I execute the view's SQL Statement it works.  What am I missing?


I have an integral with $\frac{1}{\tan^2x}$ needed to be evaluated. But instead of searching online for the antiderivative of $\cot^2x$, how would i find it from first principles?


How to pipe the result of 'date' command to 'mv' command

I want to rename my file to the current timestamp.I know how to get the current timestamp("date +%s") but how can I pipe it to 'mv' command?


How can I open a new Stack exchange section to talk about art. In general.  About questioning, history, philosophy, infringement with technology.


Is it possible to preload the spell check dictionary in Internet Explorer (10 & 11)?

I'm working with a client that would like to use the built-in Internet Explorer spell check to help their staff with some complex legal and medical terms. We have a list of words, and what we'd like to do is preload the user's browser dictionary so that we can skip each user having to add each word, and avoid the likely errors that may have.  I'd also consider a browser add-in or adding a custom language, but I haven't be able to find anything for the first or much detail for the latter.


Command lines : use returning value as argument for another command

I've got two commands, the first one is rhythmbox-client --print-playing, which prints (returns) a string into the terminal, and another one, notify-send text, which sends a system notification. Now I'm trying to write something like notify-send | rhythmbox-client --print-playing or notify-send ${rhythmbox-client --print-playing}, but I must admit that I'm not really comfortable with bash scripting...  How do I write this ?


Android: seekbar.setProgress() gives Nullpointer exception

I have used seekbar like quite a few times but never faced problem. Yesterday I was dealing with Fragments which I am not too familiar with but implemented successfully. But at the end of the day when I included seekbar to the fragment and problems started. Not sure this is coz of fragments or what. Here is my code.   fragment_main.xml  <LinearLayout> <SeekBar     android:id="@+id/seek"     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:max="100"/> </LinearLayout>   FragmentMain.java  public class FragmentMain extends Fragment {  final static String TAG = "FragmentMain"; TextView mainTextView;  @Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {     View view = inflater.inflate(R.layout.fragment_main, container, false);      SeekBar seekBar = (SeekBar) getActivity().findViewById(R.id.seek);     seekBar.setProgress(40);      return view; } }   This FragmenMain is the center page of my viewPager.   I dont know why my code is crashing giving NullPointerException at setProgress.  Feel free to suggest edits.


Shell scripting to print multiples of 5 including 1 and 100

#!/bin/bash x=1 while [ "$x" -lt 20 ] do     echo "$x"     x=("$x" * 5); done   Getting error as syntax error near unexpected token `done' and getting output as 11111111111....


How to switch of the drum sound (at login) for ubuntu 16.04?

I installed ubuntu tweaks but this seems not to have a possibility to switch off the drum sound. What else can I try?


Prove that a continuous function on a closed interval attains a maximum

As the title indicates, I'd like to prove the following:     If $f:\mathbb R\to\mathbb R$ is a continuous function on $[a,b]$, then $f$ attains its maximum.   Now, I do have a working proof: $[a,b]$ is a connected, compact space, which means that because $f$ is continuous, $f([a,b])$ is compact and connected as well.  Therefore, $f([a,b])$ is a closed interval, which means it has both a minimum and, as desired, a maximum.  What I would like, however, is a proof that doesn't require such general or sophisticated framework.  In particular, I'd like to know if there's a proof that is understandable to somebody beginning calculus, one that (at the very least) doesn't invoke compactness.  Any comments, hints, or solutions are welcome and apreciated.


Create Case thread Id using Apex (SOQL limit-proof)

There are many posts about creating Case threadIds with Apex, notably   As the posters have noted, the SFDC rules of the threadId are subject to change over time and the only reliable way that I've seen is to do   // To be replaced with a real case Id. Id caseId = '500c0000008kJL5';   List<Messaging.RenderEmailTemplateBodyResult> renderResults =   Messaging.renderEmailTemplate(null, caseId, new List<String>{'{!Case.Thread_Id}'});  System.debug('this is the Case Thread Id: ' + renderResults[0].getMergedBody());   HOWEVER ... The method call Messaging.renderEmailTemplate burns a SOQL ()  So you can't prepopulate your Cases in an afterInsert or beforeUpdate Trigger because a transaction can be up to 2,000 (Platform Events), up to 10,000 (direct Apex DML) or more, typically, 200 rows.  All of these are > 100 SOQL limit.     So, before I go to the trouble of doing this in a chained set of async   tasks; is there more recent thinking on this subject of creating ThreadIds?


Using object instance from another method

I've only started coding in java recently for a summer course at my uni so my code knowledge and code are subpar.  This assignment  requires me take make a User class with a login method and accessors and mutators. A EmailSystem class that has a dynamic-sized collection of users, a registerUser method that will create a User object and add it to the list of users, and a listUser method that will iterate through the list of users.  Code for EmailSystem class:  public class EmailSystem {    public static ArrayList<User> userList = new ArrayList<>();     public static void registerUser(String firstname, String lastname, String username, String password) {       User myUser = new User(firstname, lastname, username, password);       userList.add(myUser);       }     public static void listUsers () {       for (int i=0; i<userList.size(); i++)       {          System.out.println(userList.get(i));       }    }     public static void main(String[] args) {       registerUser("John", "Doe", "Username", "Password");    } }   Code for User class  import javax.swing.JOptionPane; import java.util.*;  public class EmailSystem {    public static ArrayList<User> userList = new ArrayList<>();     public static void registerUser(String firstname, String lastname, String username, String password) {       User myUser = new User(firstname, lastname, username, password);       userList.add(myUser);       }      public static void listUsers () {       for (int i=0; i<userList.size(); i++)       {          System.out.println(userList.get(i));       }    }     public static void main(String[] args) {       registerUser("John", "Doe", "Username", "Password");       boolean hasExit = false;       while (hasExit == false)       {          String options = "";          options = JOptionPane.showInputDialog("The following actions are supported. Enter the code: \nA: Login\nB: Print Users\nC: Exit");          if (options.equalsIgnoreCase ("A"))          {             String username = JOptionPane.showInputDialog("Username");             String password = JOptionPane.showInputDialog("Password");             // I would like to check whether the username and password submitted here are the same as the one used to register               // Use userLogin method here to compare the username and password that is inputted here and the username and password that was created when registering.          }          else if (options.equalsIgnoreCase ("B"))            {             listUsers();          }                else if (options.equalsIgnoreCase ("C"))          {             hasExit = true;          }       }       } }   When registering a user how would I be able to run the the userLogin method on the created object? Or should I be doing something else entirely?


How to change Show Applications Icon in dock Ubuntu 17.10

As the title says, I want to change the "Show Applications" Grid Icon in ubuntu dock (17.10) with Ubuntu Icon like in Unity 8.I have found a similar question but the answer has no result. Thanks in advance.


How to make some commands run as root on startup?

Might have been asked previously, but I can't find a link.  How do I make a bunch of commands run as root on startup without having to open the terminal or entering the password?


Different ways of Initializing list in Python

Might be a naive question but this troubled me a lot. I want to initialize a list with some default values. I consider the following 2 approaches to do so:  1.cache1 = [[-1 for _ in range(5)] for _ in range(5)] 2. cache2 = [[-1]*5]*]    I was under the assumption that their behavior is exactly the same. However, when I execute the following commands:  cache1[0][0] = 100 cache2[0][0] = 100   The lists are updated to:    cache1 = [[100, -1, -1, -1, -1], [100, -1, -1, -1, -1], [100, -1, -1, -1, -1], [100, -1, -1, -1, -1], [100, -1, -1, -1, -1]] cache2 = [[100, -1, -1, -1, -1], [100, -1, -1, -1, -1], [100, -1, -1, -1, -1], [100, -1, -1, -1, -1], [100, -1, -1, -1, -1]]   Can someone please point out what is the difference between the two initializations? Thank you


Redirect output to file returns permission denied

I'm trying to add some files from a file to another but at time to redirecting output the terminal returns me a message of "Denied permission" and I don't know where I should put sudo.  I tried with this:  sudo cat named.conf.default-zones >>named.conf.local


What do Cohle's hallucinations represent?

Cohle has had a couple of hallucinations in True Detective, especially during the final showdown. I am wondering if those hallucinations mean anything in particular.


Server got hacked by some Crypto Lockers

My server (CentOS) recently got hacked by some Crypto Hackers. They encrypted all of my files and asking for ransom to decrypt the files. They kept a message in all folders, which start like this     Your personal files are encrypted! Encryption was produced using a unique public key RSA-2048 generated for this computer.   To decrypt files you need to obtain the private key.   The single copy of the private key, which will allow to decrypt the files, located on a secret server on the Internet. After that, nobody and never will be able to restore files...   To obtain the private key for this computer, which will automatically decrypt files, you need to pay 1 bitcoins (~240 USD).   Without key, you will never be able to get your original files back...   Now they have sent me the decrypt keys and I'm still Could someone please help me how I can recover my files? What are the possible vulnerabilities that they took advantage of? Any other tips/pointers to avoid future threats? Thanks in advance.  Edit: They send me a PHP script with the private key, which I should upload to the server and run through a URL.  is the decrypt file they sent me.


Kosher alternative for butter as emulsifier

Jewish Law prohibits the  However, butter, a milk product, is a kitchen staple for most cooked emulsions (eg. pan-sauces, sauces béchamels, or roux-based sauces). While I use appropriate cooking fats for making non-dairy versions for meat dishes, this frequently doesn't work.  What is a non-dairy fat which may be used to as an emulsifier or roux ingredient?


Steam not installing - unmet dependencies

I can't seem to install steam. Everything in the Software Center seems to run smoothly, but then this happens. (Excuse my possibly obvious question, I installed Ubuntu about 30 minutes ago with not much prior knowledge :/) Terminal opens up asking for my password (below)  Steam needs to install these additional packages:  libgl1-mesa-dri:i386, libgl1-mesa-glx:i386, libc6:i386 [sudo] password for pixelspark:   When I put in my password, this happens:  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libgl1-mesa-glx:i386 : Depends: libglapi-mesa:i386 (= 10.1.3-    0ubuntu0.6) unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is  not going to be installed                     Depends: libcheese7 (>= 3.0.1) but it is not going  to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be    caused by held packages. Press return to continue:   Then I press enter, which makes an error message pop up saying that I don't have libc.so.6 and Steam may not run. When I click OK, the message goes away and nothing else happens. Any help?  (again, excuse my foolishness and possibly obvious question)


Many elements in the Inheritance Cycle, by Christopher Paolini, seem to recall elements of other fantasy works. For example, the four major humanoid species (Urgals, humans, elves, and dwarves) are very Tolkienesque. Galbatorix is something of an Emperor Palpatine. Angela the Herbalist may owe something to Doctor Who. And so forth.  What inspiration has Christopher Paolini admitted to drawing from other fantasy or sci-fi works, whether for specific characters or general concepts?


I am a graduate student and I need a suggestion for a good book in Lebesgue Measure Theory with good exercises and if its possibly with hints or solutions. Thank you.


Is it possible to perform a database list refresh in T-SQL in the same way as in the SSMS right context menu Refresh option? I've a 2014 Express instance with 197 databases inside. In my C# app I have a method used to get all databases names. Some times it only returns 34 results and in the next call 197. I'm using the following script to get the database names : SELECT name, create_date FROM sys.databases  WHERE name NOT IN ('master','model','msdb','tempdb') AND name NOT LIKE 'ReportServer$%' AND HAS_DBACCESS(name) = 1  OPEN db_cursor   FETCH NEXT FROM db_cursor INTO @db_name, @create_date  WHILE @@FETCH_STATUS = 0   BEGIN        EXEC(' USE [' + @db_name + '];             INSERT INTO #temp_App                 SELECT ''' +  @db_name + ''',                 ''' + @create_date + '''                 FROM sys.extended_properties                 WHERE name = ''Application''                 AND value = ''app01''             ')      FETCH NEXT FROM db_cursor INTO @db_name, @create_date      END   CLOSE db_cursor DEALLOCATE db_cursor  SELECT * FROM #temp_App DROP TABLE #temp_App  And the c# code to execute the script List<DatabaseInfo> list = new List<DatabaseInfo>();                          using (SqlConnection connection = new SqlConnection(connectionString))             {                 try                 {                     connection.Open();                     using (SqlCommand command = connection.CreateCommand())                     {                                                  command.CommandText = query;                                               using (SqlDataReader resultReader = command.ExecuteReader())                         {                             while (resultReader.Read())                             {                                 string name = resultReader[0].ToString();                                 DateTime createDateTime = DateTime.Parse(resultReader[1].ToString());                                  list.Add(new DatabaseInfo(name, createDateTime));                             }                         }                     }                     connection.Close();                 }                 catch (Exception myException)                 {                     log.Error("Error occured  " + myException.Message);                 }                 finally                 {                     connection.Close();                 }             }             return list;         }


Why can't a "const static double variable" be declared in a class?

For my assignment, I was required to make a const static double variable in a class but my compiler gives an error.       const static double long_tarif = 1500.0;//error const static int long_tarif = 1500;//no error  IntelliSense: a member of type "const double" cannot have an in-class  initializer   I'm working on visual studio 2013.


How do I make my camera follow the curve smoothly, without bumps?

The camera follows a path inside the tunnel, but after each turn, kind of snaps back or bumps, like a recoil of sorts. I reduced the size of the turns, but it still happens. I put on a damped track which seems to help, but the only reason it looks kind of decent is because the camera is set to 15mm. The other issue is that when it's rendered, the tunnel lights keep on shifting hues, even though I have the same point light duplicated within. Here's the file. Any ideas?


Suppose every subsequence of X converges to 0. Show that lim(X)=0

Question: Suppose that every subsequences of $X = (x_n)$ has a subsequence that converges to $0$. Show that $\lim(X) = 0$   My attempt:   Suppose that $\lim(X) =L \neq 0$  Let $\epsilon > 0$, and let $K(\epsilon)$ be s.t. $n \ge K(\epsilon)$   then $|x_n-L| < \epsilon$  let $n_k \ge k$, and then $k \ge K(\epsilon)$ and $n_k \ge k \ge K(\epsilon)$ s.t. $|x_{n_{k}}-L| < \epsilon$, which is a contradiction. therefore $\lim(x) =0$


Blank screen after comment on mobile app

Something funky has been happening since the Stack Exchange app was updated on my iPhone: every time I write a comment, I get a success message, but the question goes blank and can’t interact with it.  Screenshots of the problem:        The solution/workaround to the problem is simple: exit the question (the top bar is still there) and get back in, and everything will load fine (including the comment I wrote).  Is that something happening to more people, or is it only my iPhone? (6S for more detail.)


How do you wash fruit and veggies effectively?

When eating or preparing fruit and vegetables, you should wash them beforehand to get rid of pesticides, bacterias, fertilizers, etc. However, I notice that I (and others I know), just put the thing for a few seconds under cold running water while rubbing it softly.  Is this quick rinse enough to remove those unwanted things or at least some of them? What big of a proportion are washed away by this?  I've found  question, but I'm not satisfied with it.


How to compare input text with string array in android studio?

I am new to app development and I have a problem with coding in android studio. I want to compare an input text with a string in the string array. For some reason it won't work. When i try the java code in eclipse it works.  I already run the debugger and the inputmessage is "Banana". The debugger also shows that message = "Banana" when it is in CheckAnswer(message). But for some reason the function isn't returning "Right". It returns "wrong"  I hope somebody can help me.  Here is my code:  public void sendMessage(View view) {     // Do something in response to button     Intent intent = new Intent(this, DisplayMessageActivity.class);     EditText editText = (EditText) findViewById(R.id.edit_message);     String message = editText.getText().toString();     intent.putExtra(EXTRA_MESSAGE, message);     String message2 = CheckAnswer(message);     intent.putExtra(CORRECT_MESSAGE, message2);     startActivity(intent);  }  public static String CheckAnswer(String string) {     String rightanswer[] = {"Apple", "Banana", "Coconut"};     String answer = null;     for (int i = 0; i <= rightanswer.length-1; i++) {         if (string == rightanswer[i]) {             answer =  "Right!!";             break;         }         else answer = "Wrong.";     }     return answer; }


How to activate quota for users on folders?

There is any way to limit usage on folders with quota on Windows 2003 Server?  I know it's possible for volumes, but it's possible for folders?


Why is the inverse of a matrix with entries $\frac {1}{i+j}$ an integer matrix?

When I studied Linear Algebra over 55 years ago, we used a book by Hoffman and Kunze. I still cannot solve the last problem of Chapter $1$. I don't have the book any more but I remember the problem. It is: Show that for all $n$ the following matrix has an inverse with integer entries. \begin{bmatrix} \frac {1}{2} & \frac {1}{3} ...\frac {1}{n+1}\\ \frac {1}{3} & \frac {1}{4} ...\frac {1}{n+2}\\ ...\\ \frac {1}{n+1} & \frac {1}{n+2} ...\frac {1}{2n}\\ \end{bmatrix} The proof should only use the material that would be reasonably covered in Chapter $1$ of a reasonable Linear Algebra text. That means without determinants. I was able to confirm it for some small $n$; I think up to $6$.    After posing this question, it was alleged that it was a  and it certainly looks that way, superficially. However,     This question asks for an elementary solution. The solution(s) proposed to the alleged duplicate are not elementary. This is the primary difference. (To be elementary the solution should not involve determinants. For example, it could show that the linear transformation represented by the matrix is $1-1$ or onto and that the inverse is an integer matrix, or that the form of the inverses  as $n$ grows follows a well-defined pattern, or that there is a well defined sequence of elementary row operations which row-reduces the matrix to the identity matrix and the product of which is a n integer matrix.) The entries in this matrix are $\frac {1}{i+j}$ but in the alleged duplicate they are $\frac {1}{i+j-1}$. Since I am working with an old memory, I am probably mistaken about the exact statement as originally posed in Hoffman and Kunze. But, in any case, the problems are different. It is not clear if this difference is significant or just a quibble.  The title of this question is different than the alleged duplicate. People looking for the solution to this problem may not be aware that the matrix in question is called a Hilbert matrix.


How to get multiple solutions for a given input using neural network?

Let a Neural network is trained. Let multiple number of inputs result same output. We can determine any one input for a particular output using neural network. But, how can we determine all the inputs for a given output. To be precise, Let, x+y=10. So for 10 the inputs are (1,9),(2,8),(3,7) and so on.


Can you wear magical boots/gloves/gauntlets while wearing plate armor?

In Adventurers League, can you wear magical boots/gloves/gauntlets while wearing plate armor?


As shown in the MWE below, \sum (esp. when the index and lower/upper bounds are defined) is causing the slanty part of the sqrt sign to be not slanty. Is there a way to preserve it?  \documentclass{article}  \begin{document}  \[ \sqrt{{x^i}} \] \[ \sqrt{\sum_{i = 1}{x^i}} \] \[ \sqrt{\sum^{n}{x^i}} \] \[ \sqrt{\sum_{i = 1}^{n}{x^i}} \]  \end{document}


I accidentally opened too many menus (or windows) and I want to reset them to default.  It is really annoying, and effecting my animation.  Thanks


How to adjust the breaking in the bibliography?

This question continues my .  I have to use weird margins and line spacing for my academic wirting. MWE:  \documentclass[                pagesize,                usegeometry = on,                DIV = calc,% for the line spacing, KOMA-Script manual, page 40                ngerman               ]{scrartcl}  \usepackage[             left = 25mm,             bottom = 20mm,             right = 45mm,             top = 20mm            ]{geometry} \usepackage[onehalfspacing]{setspace}% for the line spacing, KOMA-Script manual, page 40 \usepackage{             babel,             csquotes            } \usepackage[             backend = biber,             sortlocale = auto,             sorting = nyt,             style = ext-authoryear-comp            ]{biblatex}  % for the line spacing, KOMA-Script manual, page 40: \AfterTOCHead{\singlespacing} \KOMAoptions{DIV = last} % adjusting the bibliography \AtBeginBibliography{\renewcommand*{\mkbibnamegiven}{\textsc}}% small caps for the author name \AtBeginBibliography{\renewcommand*{\mkbibnamefamily}{\textsc}}% small caps for the author surname \DeclareFieldFormat{biblabeldate}{#1}% year without the surrounding brackets \DeclareDelimFormat[bib]{nameyeardelim}{\addcomma\space}% comma before the year % changes the type @online \DefineBibliographyStrings{german}{                                    urlfrom = {verfügbar unter},                                    urlseen = {zuletzt geprüft am}                                   } % changes the format of the fields url and urldate \DeclareFieldFormat{url}{\bibstring{urlfrom}\addcolon\space\url{#1}} \DeclareFieldFormat{urldate}{\mkbibbrackets{\bibstring{urlseen}\addcolon\space#1}} \renewbibmacro*{url+urldate}{% changes the default order of the fields url and urldate                              \usebibmacro{urldate}%                              \newunit                              \usebibmacro{url}%                             }  \begin{filecontents}{\jobname.bib}    @ONLINE{Chemie,           EDITOR   = {LUMITOS GmbH},           LOCATION = {Berlin},           URL      = {http://www.chemie.de/lexikon/Kerosin.html},           TITLE    = {Kerosin},           URLDATE  = {2018-06-22},          }  \end{filecontents} \addbibresource{\jobname.bib}  \begin{document}    Text. Text. Text. Text. Text. Text. Text. Text. Text. Text. Text. Text. Text \autocite{Chemie}.   \printbibliography  \end{document}   The result:    How can I improve the breaking?  Thank you for your help and effort in advance!


I want to get it to loop at each method/section, but I'm getting errors. When I comment out each do while, they work perfectly, however as a whole I get:     Exception in thread "main" java.lang.StringIndexOutOfBoundsException:   String index out of range: 0 at java.lang.String.charAt(Unknown   Source) at RecursionTester.main(RecursionTester.java:25)   My code:  import java.util.Scanner;  public class RecursionTester {      public static void main(String[] args) {          int power;         int base;         String sentence;         int digit;         int num;         char answer;          Scanner sc = new Scanner(System.in);         do {             System.out.print("What base would you like? ");             base = sc.nextInt();              System.out.print("What power would you like? ");             power = sc.nextInt();              System.out.println(base + " to the " + power + " power is " + raiseToPower(base, power));              System.out.print("\nWould you like raise another number to a power (y or n)? ");             answer = sc.nextLine().charAt(0);         } while (answer == 'Y' || answer == 'y');          do {             System.out.print("Type a sentence and check if it's a palindrome: ");             sentence = sc.nextLine().trim();              if (palindrome(sentence))                 System.out.println(sentence + " is a palindrome");             else                 System.out.println(sentence + " is not a palindrome");              System.out.print("\nWould you like to reverse another text string (y or n)? ");             answer = sc.nextLine().charAt(0);         } while (answer == 'Y' || answer == 'y');         sc.close();     }      //private methods here }


Child DIV doesn't vertically align center inside the Parent Div

I have created a div with a height: 300px and inside this div, are two other divs that are display: inline-block. What I wanted to do is that I want my div to be vertically aligned center.  I already tried vertically aligning the divs, used flex box (but it doesn't really work if I have my wrapper with margin: 0 auto), also used line-height (problem is it doesn't work out that way since I have texts in my 2nd div.)   Here is my SCSS code:      .p-{     &footer-class{         height: 47px;         background: transparent linear-gradient(270deg, #96A3B2 0%, #E9EDF4 100%) 0% 0% no-repeat padding-box;         @include mq('sm'){             padding: 0 25px 0 23px;         }         @include mq('xs') {             padding: 0 25px 0 23px;         }         @include mq('xl') {             // justify-content: left;             // display: flex;             // align-items: center;             height: 267px;            }       }    }     .c-{         &footer-social {         float: left;      }    }      .c-{     &footer-about {         float: right;         @include mq('xs'){             display: inline-block;             margin-top: 4px;         }         @include mq('sm'){             display: inline-block;             margin-top: 4px;         }         @include mq('md'){             display: inline-block;         }         @include mq('xl'){             display: inline-block;         }     }     &footer-text {         display: block;         color: #ffffff;         font: bold 10px/20px "Consolas";         opacity: 1;         &1 {             @include mq('xs'){                 display: inline-block;                 margin-top: 4px;             }             @include mq('sm'){                 display: inline-block;                 margin-top: 4px;             }             @include mq('md'){                 display: inline-block;             }             @include mq('xl'){                 display: none;             }          }     }   }   the mq in @include are the media queries being defined in another file.


I wanted to fully uninstall QGIS (previously installed by  osgeo4w). The problem is that it does not appear on the list of programs to uninstall neither in the control panel>programs and features or in settings>apps & features. What I'm I missing?


$ sudo apt-get update #Don't get any errors $ sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.  $ sudo update-manager -d   Ubuntu checks for updates, tells me my computer is up to date. But there are only two options now "Ok" and "Settings". According to  and several other websites, there should be an option to upgrade it to 14.04, but I'm seeing none. How can I upgrade to 14.04?


Is there any race that can make let me play as a fox? Either an anthropomorphic fox, or (preferably) a human looking race with fox ears and tail, like an inumimi if you know what that is.


Why is Merkle-Damgård construction insecure?

I've been reading about SHA-1. I read that SHA-1 is insecure as it uses the Merkle-Damgård construction and the Merkle-Damgård construction is —  — susceptible to a variety of attacks. However, I have not been able to come up with a single example of how these work.   Can someone give me an example of a length extension attack?


I started the quest where Vilkas asks me to accompany him to the flame to cure himself.   But it won't let activate the flame and says the quest is complete even though I haven't done anything, and Vilkas is nowhere to be seen.  Is it because I fast traveled to the location?


Router 1 device and Router 2 device is not in the same network, although router 1 connect to router 2

My ISP provide me a moderm hg863  the modem model:   So I have attempt like this before  ---> modem --> router---> notebook             --> pc   both pc and notebook can connect to internet, it is not in the same network  therefore, I found another router  -->modem -> router 1 -> router 2 -> notebook                      -> pc   but notebook and pc are not in the same network as well. although both of them can connect to internet.  the reason why use router 2 instead of lan connect is the notebook does not have rj45 port so it need to be connect through wireless network  how to fix this? Thanks


Access rights for directory, when you are a part of owner group

Right to the business, here is what I am trying to do  foverzar@subsystem /home> ls -aln total 16 drwxr-xr-x  4    0    0 4096 Dec 12 23:07 ./ drwxr-xr-x 17    0    0 4096 Dec  4 13:51 ../ drwx------  9 1000 1000 4096 Dec 13 22:05 foverzar/ drwxrwx---  2 1001 1001 4096 Dec 12 23:11 tor/ foverzar@subsystem /home> cd tor cd: Permission denied: “./tor” foverzar@subsystem /home> id foverzar uid=1000(foverzar) gid=1000(foverzar) groups=1000(foverzar),10(wheel),1001(tor)   Basicaly my question is: why can't I access the dir, even if my user is the part of "tor" group and permissions are set to 770?


I am trying to run JDA Discord Bot, but getting this error:  [JDA MainWS-ReadThread] INFO net.dv8tion.jda.core.requests.WebSocketClient - Connected to WebSocket [JDA MainWS-ReadThread] ERROR net.dv8tion.jda.core.requests.WebSocketClient - There was an error in the WebSocket connection java.lang.NoSuchMethodError: org.json.JSONArray.iterator()Ljava/util/Iterator;     at net.dv8tion.jda.core.requests.WebSocketClient.updateTraces(WebSocketClient.java:165)     at net.dv8tion.jda.core.requests.WebSocketClient.onEvent(WebSocketClient.java:797)     at net.dv8tion.jda.core.requests.WebSocketClient.handleEvent(WebSocketClient.java:745)     at net.dv8tion.jda.core.requests.WebSocketClient.onBinaryMessage(WebSocketClient.java:903)     at com.neovisionaries.ws.client.ListenerManager.callOnBinaryMessage(ListenerManager.java:368)     at com.neovisionaries.ws.client.ReadingThread.callOnBinaryMessage(ReadingThread.java:270)     at com.neovisionaries.ws.client.ReadingThread.handleBinaryFrame(ReadingThread.java:990)     at com.neovisionaries.ws.client.ReadingThread.handleFrame(ReadingThread.java:749)     at com.neovisionaries.ws.client.ReadingThread.main(ReadingThread.java:108)     at com.neovisionaries.ws.client.ReadingThread.runMain(ReadingThread.java:64)     at com.neovisionaries.ws.client.WebSocketThread.run(WebSocketThread.java:45)   I can't find what's wrong,   this is my pom.xml:  also I have these libraries in my Referenced Libraries:    I have asked at the JDA GitHub but they say I have to get the latest org.json which I already have. So I am confused.  Hope someone can help me there.


How do I convert poles and zeros of a transfer function into a circuit / required circuit components?

I have been given a Bode plot of a low pass filter, and tasked with essentially reversing the effects by using a high pass filter. I have solved for the transfer function which is the first equation, and I am assuming the inverse transfer function will give me the information I need to construct the high pass filter. I know the values for \$z\$ and \$p\$. Is there a method given any transfer function to realise the circuit elements required? $$H(s) = 0.17\frac{s-z}{s-p}$$ $$H(s)^{-1} = 5.88\frac{s-p}{s-z}$$


How to use Whatsapp mobile application on Ubuntu Touch?

In my Android I have "Whatsapp" application running. But mobile freak I am not, and specially the mobile keyboards.  So how can I run my same application, same account from my Ubuntu desktop PC?   Follow up:  Just to do keyboard routing, i have used . Which allows me to takeover the Android input fields access via web link to type in my PC keyboard, and then it re-route the keys to Mobile.  Features:   Allows me to copy and paste large texts to Android input fields without using the keyboard of Android but simply using my Desktop PC, via web link http://android.ip.address.goes.here:port/ Allows me to have key submit which is similar to key press of mobile set itself   At-least works without having mobile in rooted. Hope it helps you!!


So I started my computer and realized that I can no longer Fn+F2 or Fn+F3 to change my volume, after closer inspection I realized that the option to change my volume is somewhat corrupted.  I then went to the sound settings, and the menu is completely broken.  Last time I did something, I installed PulseAudio, but I just tried reinstalling it and its still not working. Update 1: Booted from the Unity Control Center and the problem still persists there, so its probably not an issue with gnome.


My 17 year old son wants to travel with his 2 adult sisters to Canada for a 2 day trip but his passport has expired, and the trip is scheduled for April 24,2018, what does he need?


How do I change the appearance of the Unity greeter?

Is there any way to change the appearance of the Lock Screen on Ubuntu 13.10 (unity)? At current its simply a black screen with a tiny clock on the upper right corner. I would like to change this to another image or maybe even change the position and size of the clock if possible. Note: I would like to change the look of the screen when its in the "locked" state as I already have my login screen set how I want, but now I want to adjust the look and feel of the screens while they are locked (pre-password prompt). Im looking for a "locked" screen more akin to what is seen in Gnome3 and Mint with a large clock and other things displayed. Also, that answer only applies to GDM, not LightDM, which handles the lock screen now.


I need to test my application when there is a change in the IP address. What should I do to change my machines IP address?  Note: The IP address for my machine is obtained automatically. It's not a static IP.


How to get mount point of filesystem containing given file

I am looking for a quick way to find the mount point of the file system containing a given FILE.  Is there anything simpler or more direct than my solution below?  df -h FILE |tail -1 | awk -F% '{print $NF}' | tr -d ' '   A similar question "" uses the current disk's device node as input, and not an arbitrary file from the disk ...


Word for someone who puts on too much perfume

Is there a word for someone who puts on too much perfume ? cologne ?


I was wondering if anyone had a simple way of finding the solutions to   $$n^2\equiv1 \mod a.$$  I think I read somewhere that the solutions are always  $$n\equiv\pm1 \mod a,$$  but the proof seemed inaccessible to me. Thanks!


Can Seeming disguise a mummy as a specific human? (D&D 5E)

Background for the question: in my campaign, I have a Mummy being controlled by a group that includes an Illusionist.  I need to make the Mummy appear as if he is a certain human NPC.  I know I could use True Polymorph, but I don't want to have to have to make the controlling Illusionist that high of a level. My question:  Would the 5th level spell Seeming accomplish what I am trying to do?  I do not need the Mummy to speak or really do anything other than sit there and look like a human.  The text for the spell says that it changes the targets appearance; would this be adequate or would I need to use True Polymorph?


How to run installed Windows 8 along Ubuntu, after installing Ubuntu in Legacy mode?

I have a Lenovo Ideapad with pre-installed Windows 8.1 In order to install Ubuntu I disabled secure boot and changed boot mode from UEFI to Legacy. This allowed me to install Ubuntu and the grub loader is also showing an option to either boot into Windows or Ubuntu, but whenever I try booting to Windows it says Cannot load.  This happens because the boot order is set to Legacy mode and Windows 8 will boot only with UEFI. I am unable to access my BIOS from where I can change the boot order. I press F1/F2 on booting but it doesn't load the BIOS, and directly goes to the grub loader screen.  How can I make my Windows 8 run along with Ubuntu?