The following theorem is Theorem 2.4.6 of Marker’s model theory book.  Theorem. Let $\mathscr{L}$ be a finite a finite language without function symbols and let $\mathcal{M}$ and $\mathcal{N}$ be $\mathscr{L}$-structures. Then $\mathcal{M}\equiv \mathcal{N}$ off and only if the second player has a winning strategy in $G_n(\mathcal{M},\mathcal{N})$ for all $n$.  Question. Can we extend this theorem for arbitrary finite language?

Let $\mathcal{M}$ and $\mathcal{N}$ be two structures in a language $\mathcal{L}$. We define the finite determined game $G_n(\mathcal{M},\mathcal{N})$ as a game with $n$ rounds where in each round player I selects an element from $M \cup N$ (lets say $a\in M$) and player II responds with another element in the other structure (lets say $b\in N$). Player II wins a game if the partial map that takes elements in $M$ selected by some player to the element in $N$ either responded by player II (if it was player I who chose the element in $M$) or selected by player I (if it was player two who responded with said element in $M$) is a partial embedding. This is called an Ehrenfeucht-Fraïssé (EF) game.     A remarkable theorem states that if $\mathcal{L}$ is finite and has no constant symbols then $\mathcal{M}\equiv\mathcal{N}$ iff player II has a winning strategy in $G_n(\mathcal{M},\mathcal{N})$ for all $n$.   Now the way I know of proving this is by showing that player II has a winning strategy for $G_n(\mathcal{M},\mathcal{N})$ is equivalent to $\mathcal{M}$ and $\mathcal{N}$ being elementarily equivalent up to quantifier rank $n$. In such proof the neccesity of having a finite language without function symbols is stated.   Still, any finite language $\mathcal{L}$ can be changed to another finite language $\mathcal{L}^*$ where every function symbols or arity $n$ is changed for a relation symbol of arity $n+1$. For every strcutre $\mathcal{M}$ in $\mathcal{L}$ there is an analogous one $\mathcal{M}^*$ in $\mathcal{L}^*$ where the relations substitute the functions. They are analogous in the sense that for every sentence $\varphi$ in $\mathcal{L}$ there is another sentence $\psi$ in $\mathcal{L}^*$ such that $\varphi$ holds in $\mathcal{M}$ iff $\psi$ holds in $\mathcal{M}^*$ (and vice versa). Now under this alteration a partial partial map between structures in $\mathcal{L}$ is a $\mathcal{L}$-partial embedding iff it is a $\mathcal{L}^*$-partial embedding between the analogue structures in $\mathcal{L}^*$. In $\mathcal{L}^*$ the above theorem can be applied, which leads to my question:     Does not the above theorem still apply to the case of a finite language with function symbols?   EDIT: To make things clear, I define partial embedding considering a function simply as another relation. Namely, given $\mathcal{M}$ and $\mathcal{N}$ two $\mathcal{L}$-structures, $j:\text{dom}(j)\rightarrow N$, where $\text{dom}(j)\subset M$ is a partial embedding from $\mathcal{M}$ to $\mathcal{N}$ if the graph of $j$ union $\{(c^\mathcal{M}, c^\mathcal{M})\}$ such that $c$ is a constant symbol in $\mathcal{L}$ gives the graph of an injective function (which we also call $j$) that satisfies  $(1)$ For any $n$-ary relation symbol $R$ in $\mathcal{L}$ and $n$-ary vector $\bar{x}$ in $\text{dom}(j)$, $\bar{x}\in R^\mathcal{M}$ if and only if $j(\bar{x})\in R^\mathcal{N}$.  $(2.)$ For any $n$-ary function symbol $f$ in $\mathcal{L}$ and $n$-ary vector $\bar{x}$ in $\text{dom}(j)$ and any $y\in\text{dom}(j)$, $y= f^\mathcal{M}(\bar{x})$ if and only if $j(y)= f^\mathcal{N}(j(\bar{x}))$.


Please note: Whilst the older question (4 years ago)  has answers that show a hibernate option exists for Macs, it doesn't detail how to make your Mac hibernate. Perhaps this is because that answer was sufficient for older machines (Pre-2015 MacBookPro Retina or pre-Yosemite).  I've been a longtime Windows user and was told Apple's Macs were better. I recently bought a MacBookPro Retina 2015 15" OS X 10.10 Yosemite (SSD). I have not been able to make it hibernate.  I have already enabled the hibernate mode number 25 (as can be seen in the settings below).  I was told that the grey screen with the progress bar upon wakeup indicates the machine was hibernating. I managed to get this grey screen to show up after disabling standby.   sudo pmset -a standby 0   I was also told I could check what state the machine woke from via the following command:  pmset -g log | grep -i "wake from"   I ran the command but it still shows that I have always been waking from Standby. This is the case when waking from both AC and Battery. E.g.     Wake from Standby [CDNVA] due to EC.PME/User: Using BATT (Charge:92%) 303 secs   I am assuming that if my machine did indeed hibernate then the grep command should show Wake from 'Hibernate' as opposed to 'Standby'.  This makes me wonder if the OS X man pmset command, which brings up the pmset commands manual which is dated 2012 is still valid today. Or perhaps I'm just too new to this.  I have also tried 2 deep sleep apps/widgets. Both end up putting the MBP to Standby instead of Hibernate.  pmset -g shows the following:  Active Profiles: Battery Power          -1* AC Power               -1 Currently in use:    standbydelay         3    standby              0    halfdim              1    hibernatefile        /var/vm/sleepimage    darkwakes            0    gpuswitch            2     disksleep            10    sleep                1    autopoweroffdelay    1    hibernatemode        25    autopoweroff         1    ttyskeepawake        1    displaysleep         2    acwake               0    lidwake              1     PS. Next to sleep it sometimes shows "(sleep prevented by AddressBookSour)"

I've recently switched from Windows to a MacBook pro. In Windows, there are the following shutdown options:   Standby - the machine goes into a "light sleep" from which it can awaken very quickly (like, in a few seconds), but plenty of energy is consumed. Hibernate - the OS dumps the current system state (including the contents of the RAM) to a file, then turns the machine off. Wakeup takes longer than from standby, but there is no latent energy consumption.  Shut down - the OS shuts down, and the machine is turned off.    In OS X, what I can see is   Sleep - seems equivalent to standby, or an even lighter form of sleep as Mail seems to even continue to poll for new email?  Shutdown and restore all apps on next start - turns off machine, seems to start the OS from scratch and restart alls apps - from what I can tell, it's not hibernation Shutdown and don't restore apps - shut down   is this correct, and does OS X not have a true "hibernate" mode that can write its state to disk? Because that's what I'm looking for really. There's talk of a "Safe Sleep" mode on the Internets, but I can't see it in my OS X menu. Is it hidden in 10.7?


How do you manage (workflow) writing the literature review for a paper or a dissertation? Unfortunately my current method of going on binge reading stretches while scribbling notes on random bits of paper inevitably lead to a situation where I dread trying to write a coherent literature review because everything is disorganized. The one time I did try to be more organized by using a template to capture and summarize info for each paper such as sampling, methodology, results, papers I want to read, etc., I ended up with so much information I became overwhelmed trying to synthesize it all. I also developed this nasty habit of trawling through the citations of every paper I read and downloading like 80% of them. I then soon end up in a situation where I have hundreds upon hundreds of pdf's, most of which I literally don't have time to read. I'm basically a paper hoarder. Any tips on how I can streamline my search, processing and writing up of literature?

I noticed that, for each research project, there comes a point where I have to consult the literature, and find all the previous research related to the current project.  Unfortunately, I seem to be very inefficient in my approach. I spend a lot of time digging through papers that are really interesting, but only of tangential importance to my current work, just to find the few papers that actually do similar things. (The pile of "cool paper, read when time" just keeps growing.)  Hence, I'm wondering: What is the most time efficient way to get a thorough overview of the literature in a specific niche of a field?    While searching for an answer I came across these questions:   - This question is quite similar and I liked the approach. I debated with myself if this is a duplicate, but I think it is focused more on how to be sure the search was exhaustive, whereas I'm worried about time efficiency. (Also, I'm a bit curious if things have changed since 2012.)   - The answer provides tips on how to identify what literature generally is important in a field, but I am looking for the most cost effective (least time consuming) way to do it in an area, where I know the broad literature, but not the specifics.


When adding two float values, I will get something like:  0.3+0.6 = 0.89999999999    I know what's going on. In C# we can use decimal instead, but in Javascript, how to fix it?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


While learning , I notice that there is no delete adj for the new list<int> array:   adj = new list<int>[V];   Will it cause a memory leak? For this question, I made a  to using delete to release the memory explicitly.   #include <iostream> #include <list> #include <algorithm>  using namespace std;  int main() {     list<int> *adj = new list<int>[3];     cout << adj->size() << endl;      delete adj; }   delete operation will cause coredump. So why does deleting pointer to list cause core dump?  How to release the memory by new operation?

This is a question that's been nagging me for some time. I always thought that C++ should have been designed so that the delete operator (without brackets) works even with the new[] operator.  In my opinion, writing this:  int* p = new int;   should be equivalent to allocating an array of 1 element:  int* p = new int[1];   If this was true, the delete operator could always be deleting arrays, and we wouldn't need the delete[] operator.  Is there any reason why the delete[] operator was introduced in C++?  The only reason I can think of is that allocating arrays has a small memory footprint (you have to store the array size somewhere), so that distinguishing delete vs delete[] was a small memory optimization.


I have a win 7 laptop. Today I installed ubuntu 12.04 on it.. after installation, it asked for restarting the PC. I clicked on "restart". after that there should have been a dual boot option or option to choose between win7 and ubuntu.. But there was no dual boot menu. win 7 start up took place. what to do now? how can I access ubuntu?  I had installed ubuntu from a USB drive. I had temporarily booted from USB. now how to run ubuntu?  replies are appriciated. :)

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


Can I use Likert scale data to do parametric statistical procedures such as linear regression and ANOVA? I've read that you can use Likert data in parametric analysis but in certain circumstances. Which are those? My independent variables are Likert items and my dependent variable is the mean score of a Likert scale. Also, I have 90 samples.

I have some  gained from survey questions.  In my case they are  responses (Strongly Disagree-Disagree-Neutral-Agree-Strongly Agree).  In my data they are coded as 1-5.  I  don't think means would mean much here, so what basic summary statistics are considered usefull?


When I tried to install a current version of a software, someone  for where the binaries are located so that it can be used with the command below.  curl -silent -location https://blabla | sudo --preserve-env bash -   I've been informed that under Linux, it's unusual to download the binaries and install those, like it's common in Windows. Now, I'd like to install Chrome but the command below didn't give me anything useful.  sudo apt install chrome   I only get the message saying that Unable to locate package chrome. So I figure that I probably need to use the syntax with curl and bash. However, I don't know where I should obtain the URL that's supposed to be used.  At the Chrome's page, there's only a button to download the binaries but that's the Window way, I understand. I prefer to do it properly, as supposed to.  Where do I get the URL to curl for installing the binaries?

How do you install Google Chrome on Ubuntu?


I am desperately looking for the name of a story I've read quite a few years back. I can't remember all the details, but maybe provide enough for someone to identify it.  In this story there is a very large factory and every morning a huge number of workers is brought into this factory to do some kind of useless work ... in my memory they screw in lightbulbs, but I might be wrong there. All day, they do this useless stupid task and then the night shift comes and just undoes all the work from the previous shift, so that the morning shift can do it all over...  Help is dearly appreciated ;-)

I'm trying to remember a (short) story I read in school some time ago. I don't have much, but here it is:   Numbers of workers are assigned to trivial task, like changing broken lightbulbs (or something similar). Once they finished their daily work, another group of workers are putting the broken lightbulbs in again, allowing for an endless, trivlal working circle.   I know that isn't much, but maybe someone has an idea, thanks.


Today when one choose to make a tag a favorite, it seems that all the tags in here are prioritized in the same way. While I may want to include many tags, because they are of interest, I would prefer that some tags was weighted more than others e.g. while I can have both A and B as favorites, I would prefer to get more A questions than B questions, even though I also like B. So my feature request is, please add a way to prefer some tags to others. Mockup of interface                         Explanation of mockup The idea is that favorite tags that are already prioritized have a number descriping their prioritity (can be but not necessary weighted i.e. 4 means dobble as many as two). If they are not prioritized they have an up arrow, which can be used to change their priority. I have them sorted in the image for better overview, and may be an idea. Ignore tags does not have any weight (you cannot ignore anything more?). To edit a weight, one clicks the number or uparrow and either a dialog popsup or the arrow/number becomes an inline number textbox, and one can write the new weight.

I have many tags marked as "interesting" and others as "ignored". (I use Java at work, I'm a Cocoa guy by night, any anything dealing with Windows/.NET/C# simply doesn't apply to me.) When tags are added to the list in the right navbar, they appear in the order in which they were added. There are several problems with this:   It can be difficult to visually locate a tag quickly, unless you have memorized its location. The tags appear as the same gray boxes like everywhere on SO, but with a small "x" afterward, and they wrap based on size. This tends to leave a ragged right margin and wasted space. Ordering based on when the tag was added is not always the most intuitive default. Various users might prefer to view them alphabetically, by popularity, recent activity, etc.   It would be nice to introduce a tabbed interface to switch between various orderings, and remember the value in the cookie, profile, etc. Coupled with this, perhaps users could specify a custom ordering that works best for them? (Currently the workaround is to copy all the tag names, remove them all, and re-add them in the desired order, but this is obviously annoying.)  Thoughts?


I had the following doubt:     Show that the element $2\otimes 1$ is $0$ in $\mathbb Z\otimes_{\mathbb Z} \mathbb Z/2\mathbb Z$ but not a zero in $2\mathbb Z\otimes_{\mathbb Z} \mathbb Z/2\mathbb Z$.   I was able to prove $2\otimes 1$ is $0$ in $\mathbb Z\otimes_{\mathbb Z}\mathbb Z/2\mathbb Z$ by shifting $2$ using tensor property . now I can't see how to prove it's non-zero in $2\mathbb Z\otimes_{\mathbb Z} \mathbb Z/2\mathbb Z$.  kindly help out.

I was studying the following example from Atiyah & MacDonald's Introduction to Commutative Algebra:   Let $x$ be the non-zero element in $N := \mathbf{Z}/ 2\mathbf{Z}$, $M := \mathbf{Z}$, and $M' := 2 \mathbf{Z}$. The element $2 \otimes x$ is zero in $M \otimes N$, but non-zero in $M' \otimes N$. I suppose this can be seen by the fact that $2 \otimes x$ generates $M' \otimes N$, and the tensor-product $M' \otimes N$ is non-zero.   However, I was wondering, what one would do if that element weren't a generator of $M' \otimes N$. So my question is:   What are the methods to prove that an element is non-zero in a tensor-product of modules?   Thanks a lot!


If one had been to Iran after March 2011 but one's passport was replaced in the meantime, how risky would it be to visit the USA without mentioning said trip to Iran? Let me clarify there's no sketchy motives here. The reasons for the question are: 1) Avoiding a $160 visa fee; 2) Decreasing the risk of being rejected on entry, despite having a visa just because visiting Iran could raise flags.  To put it differently: is there any way of telling you've been to Iran other than having a stamp on your passport?

Now that  is in effect, people who have visited Iraq, Syria, Iran, or Sudan since 2011 are banned from entering the US under the Visa Waiver Program. However it's unclear to me how could the US officials prove one has set foot in those countries, unless:   There's a stamp in one's passport indicating so, which can be side-stepped by getting a fresh passport One mentions the fact on the ESTA application form, which is obviously easy to avoid   Is there any other way the US might be able to identify such individuals?  NB: I'm not eligible for the VWP myself and don't plan to travel to the four countries above, so it's a purely theorethical question


I bought a laptop last year, it had Window 7 Home Basic installed on it, and I've decided to upgrade it to Windows 8.1. I did a clean install, but when I search for drivers that are compatible with Windows 8.1, there are none. All I see is for Win XP or Win 7. So I tried to install driver pack solution, and yes, some driver are installed, but I think it's not like when it was on Windows 7.  I think there are some drivers that are not installed.  So here is my question: do I have to install Windows 7 again to bring back all drivers or can I just leave it? Is it okay for my laptop?  The model of the laptop was Toshiba Satellite L300-256, Pentium Dual-Core 2GHz, 3GB RAM.

I've just installed Windows 7 on my PC.  I went online to look for drivers. For , Foxconn offers LAN drivers, on-board audio drivers, and chipset drivers. And for , Nvidia offers a graphics card driver, obviously.  But then I stopped and wondered... what benefit would I gain from installing them?   The LAN cable is plugged in and I'm online; no problems there.  The on-board audio is working fine.  A quick Google tells me that a chipset is responsible for moving data around my motherboard – which seems to be happening OK!  And my graphics look perfect.    So why should I install the drivers? What would they give me, other than badly designed "management" interfaces, and pointless "notifications" whenever I plug in an audio jack?  If there are different considerations for each of the components – chipset, audio, LAN, and graphics (and any others you think I should be aware of) – please break it down in your answer.     Update: I've had a couple of answers already, saying that I'll get better stability, bugfixes, etc.   Can I slightly expand my question... Can I get all these same benefits if I install the drivers via Windows Update? And if I do this, would I avoid having to install the vendor-specific UIs, which I find so annoying?


I know what the above is: when your chain bunches when you change gears & the bunch runs through the front derailleur and wrenches it. This damage is pretty much irreparable, and has cost me far too much money. How can I stop this?

Specifically when changing gears from middle chain ring to smallest, the chain will sometimes get 'sucked' up between the inner chainring and chain stay. It seems to happen more often in muddy conditions. I keep my drive train clean and lube my chain often.  I bought the bike new and maybe 1200-1500 miles on the original chain/derailers. I have swapped out the original (aluminum) inner chainring with a new steel chainring and still get chain suck.


So I capture a screenshot with my handy "[HOME]-[POWER]" combo, and draw freehand arrows on it in Adobe Ideas (because I like their line smoothing) to highlight my problem, but:  How do I upload this picture to Ask Different from the iPad?

On macOS, there are music  integrated into the OS via standard file open API. , iOS  and third party apps. Web sites and Safari had use third party apps or custom JavaScript code to allow this. Which version of iOS enabled this natively?


The 10.12.4 upgrade to Apple's Sierra apparently breaks LaTeX: see  here () and here ()  Does anyone know if Apple has fixed this issue?  EDIT: On April 17th, two weeks after Richard Koch (author of Texshop) stated that "Apple is aware of this bug" I asked in the "duplicate" question if Apple had fixed the bug. There was no response, and we're now one month down the road from Apple's learning of the problem.   The initial upgrade from El Capitan to Sierra did not create this issue; it was only reported in the two questions I cited and the thread I posted in as a consequence of the recent .4 upgrade.   There's no point in upgrading to Sierra .4 if it breaks LaTeX, so it's strange to say that it would be more helpful if I created a problem that I'm not interested in encountering.  There is no further news on tex.stackexchange as to whether the problem has been fixed. Who would want to experiment under these conditions?

After updating to Sierra 10.12.4 last week, TeXShop crashes:   when opening an existing .tex document that has a pdf associated to it immediately after compiling a new document, i.e. as soon as a pdf is created.   Furthermore, preview crashes opening almost any pdf that has been created with TeXShop. There is virtually nothing on the internet about it, and the only solution seems to be a complete reinstall of MacOSX (so as to reinstall the supposedly broken preview), which I'd like to avoid if at all possible.  Someone else has described a similar issue, but has not received any responses ().  I would be very grateful for some help, as I can neither produce work, nor look at any at the moment. Many thanks!


In bash, the usual way to check if file exists is [ -f xxxx ] or [ -e xxxx ]. I see a script doing this if [ -a xxxx ], and I verified that this works to check the existence of a file. How is "logical and" operation being used to do this?

Both about -a and -e options in  is said:  -a file     True if file exists. -e file     True if file exists.    Trying to get what the difference is I ran the following script:  resin_dir=/Test/Resin_wheleph/Results  if [ -e ${resin_dir} ] ; then     echo "-e "; fi  if [ ! -e ${resin_dir} ] ; then     echo "! -e"; fi  if [ -a ${resin_dir} ] ; then     echo "-a"; fi  if [ ! -a ${resin_dir} ] ; then     echo "! -a"; fi   /Test/Resin_wheleph/Results exists and is a directory. And this is what I get:  -e -a ! -a   which seems to be a little strange (notice -a and  ! -a). But when I use double brackets (e. g. if [[ -e ${resin_dir} ]]) in the similar script it gives reasonable output:  -e -a   So:    What is a difference between -a and -e options? Why -a produces a strange result when used inside single brackets?


I want to install ubuntu into my new laptop (I want to remove my windows completely) , which partition mode  i should use when I create bootable usb(MBR or GPT) , what all thing do i need to be cautious when installing ubuntu to a new laptop .

I would like to see a full how-to guide on how to install Ubuntu.


I did some research and found it could be hard to style a input type=file. However, I realized youtube has a beautiful button displayed when you want to upload your video to the site. (may need login: ). so basically it allows user to click the button, pick a file, and do the upload. I am not sure how this is implemented instead of using the ugly <input> tag? Or anyone knows any alter good way to make a beautiful file upload interface?

How do you style an input type="file" button?


Find the square roots of: $8-15i.$  Could I get some working out to solve it?  Also what are different methods of doing it?

If I'm given a complex number (say $9 + 4i$), how do I calculate its square root?


I'am making a multimodule maven project with Swing. I need to load and upload some properties but when I try to load the inputStream it gives me null. So if i try to use that data the console gives me a NullPointerException.  My console:  java.lang.NullPointerException     at java.util.Properties$LineReader.readLine(Properties.java:434)     at java.util.Properties.load0(Properties.java:353)     at java.util.Properties.load(Properties.java:341)     at Configuration.PropertiesMenager.getPropertiyByValue(PropertiesMenager.java:18)     at GraphicInterface.GInterface$3.actionPerformed(GInterface.java:176)     at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)     at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)     at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)     at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)     at java.awt.Component.processMouseEvent(Component.java:6539)     at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)     at java.awt.Component.processEvent(Component.java:6304)     at java.awt.Container.processEvent(Container.java:2239)     at java.awt.Component.dispatchEventImpl(Component.java:4889)     at java.awt.Container.dispatchEventImpl(Container.java:2297)     at java.awt.Component.dispatchEvent(Component.java:4711)     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)     at java.awt.Container.dispatchEventImpl(Container.java:2283)     at java.awt.Window.dispatchEventImpl(Window.java:2746)     at java.awt.Component.dispatchEvent(Component.java:4711)     at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)     at java.awt.EventQueue.access$500(EventQueue.java:97)     at java.awt.EventQueue$3.run(EventQueue.java:709)     at java.awt.EventQueue$3.run(EventQueue.java:703)     at java.security.AccessController.doPrivileged(Native Method)     at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)     at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)     at java.awt.EventQueue$4.run(EventQueue.java:733)     at java.awt.EventQueue$4.run(EventQueue.java:731)     at java.security.AccessController.doPrivileged(Native Method)     at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)     at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)     at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)     at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)     at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)   My method. The param String value is hardcoded for now and it belongs to my "keyset" in my properties file:  public String getPropertiyByValue(String value) throws IOException {         Properties prop = new Properties();         String propFileName = "AutoDeploymentModel\\configuration.properties";         String result = "";         InputStream stream = getClass().getClassLoader().getResourceAsStream(propFileName);         try {             prop.load(stream);             result = prop.getProperty(value);         } catch (Exception e) {             e.printStackTrace();         }         return result;     }   SOLVED  Call easy way the file without any kind of path, and resolved the body intructions with:  InputStream i = null; try { i = new FileInputStream("configuration.properties"); prop.load(i); ..... }

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


How can I group a set of figures like in the image? I found some example with vertical labels (Type 1, Type 2, Type 3), but I also need to include head (horizontal) labels (Type A, ...). How do I refer to any of the sub-figures in the text?

I want to do something similar to what is done in  paper:    In particular I'm interested in:   Same amount of images per row Using a vertical label to categorize each row Adding a caption Wrapping the image (so there can be text on one side)   I've read some questions ( and ) but they are very different from what I want, can you help me?  I've tried this, but I'm getting errors:  \usepackage{subcaption} % for subfigures  \begin{table}[ht] \begin{tabular}{ccc} \begin{subfigure}{0.4\textwidth}\includegraphics[width=0.3\columnwidth]{Figures/all_souls_000021.jpg}& \begin{subfigure}{0.4\textwidth}\includegraphics[width=0.3\columnwidth]{Figures/all_souls_000091.jpg}& \begin{subfigure}{0.4\textwidth}\includegraphics[width=0.3\columnwidth]{Figures/oxford_000177.jpg}\\ \end{tabular} \caption{A table with figures} \label{tab:mytable} \end{table}   Error:  ! Missing } inserted.<inserted text>} ...olumnwidth]{Figures/all_souls_000021.jpg}&


I have looked at a few posts such as this one but it doesn't answer my question.  Basically I have use LINQKIT to build an expression which looks like this:  public Expression<Func<uv_Manifest, bool>> CreateManifestFilters(ManifestFilterItem filterItem) {     var predicate = PredicateBuilder.New<uv_Manifest>;          if(!string.IsNullorWhiteSpace(filterItem.CID)){         predicate = predicate.And(x => x.CID == filterItem.CID && x.CID != null);         }      return predicate; }   And I have a unit tests which looks like this:  [TestMethod()] public void CreateManifestFilters_FunctionHitWithCIDPopulated_ExpressionWillContainWhereOnCID() {     var filterItem = new ManifestFilterItem("002");     var predicate = PredicateBuilder.New<uv_Manifest>.And(x => x.CID == filterItem.CID && x.CID != null);      var result = _iManifestManager.CreateManifestFilters(filterItem);      var manifest = new uv_Manifest();      Assert.AreEqual(predicate, result);  }   What I am trying to do is check that the expression is doing a where on the property CID. However I get this error when the test fails:     Assert.AreEqual failed. Expected: ((CompareString(x.CID, value(FSVendor_Refactored.Tests.ManifestFixture+_Closure$__11-0).$VB$Local_filterItem.CID, False) == 0) AndAlso (Convert(x.CID) != null))>. Actual: ((CompareString(x.CID, value(FSVendor_RefactoredRepository.ManifestManager+_Closure$__2-0).$VB$Local_filterItem.CID, False) == 0) AndAlso (Convert(x.CID) != null))>.   I think I understand why it's failing, both the unit tests and CreateManifestFilters function are in different projects. So I believe that this is causing the test to fail.  Anyone know how to check the expression to check if it's doing a where on the CID property?  EDIT: This is NOT a duplicate as the other answer does not use PredicateBuilder therefore the linked answer doesn't suit my requirements.

Given a method signature:  public bool AreTheSame<T>(Expression<Func<T, object>> exp1, Expression<Func<T, object>> exp2)   What would be the most efficient way to say if the two expressions are the same? This only needs to work for simple expressions, by this I mean all that would be "supported" would be simple MemberExpressions, eg c => c.ID.  An example call might be:  AreTheSame<User>(u1 => u1.ID, u2 => u2.ID); --> would return true


I've come across the following problem in my textbook    I tried solving this by figuring out how many choices there are for each position within a round and came up with the following.  $${8 \choose 2} \cdot {6 \choose 2} \cdot {4 \choose 2} \cdot {2 \choose 2}$$   My idea was that that are ${8 \choose 2}$ ways to pick the first pair, ${6 \choose 2}$ ways to pick the second pair, etc. so multiplying them would yield all possible first round pairs, but this is not correct and I don't understand why.   Question: Can someone please explain why the above reasoning is not correct

I have this simple looking question: "In tennis tournament, there are $2n$ participants. So, there must be $n$ pairs for the first round. In how many ways can such a pairing be arranged??". Now, shouldn't the answer be $^{2n}C_2$? But the book says it is $1 \cdot 3 \cdot 5 \cdots (2n - 1)$. Where am I going wrong?


I'm building an app that uses json data from a server that changes everyday. Yesterday it worked perfectly. Today, however, i get the following error:     java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference   at this line(s) of code:  if(!endDate.equals("") && !endDate.equals(null) && !endDate.equals("null")) {       dates.append(" t/m ").append(endDate); }   To me it seems that the if statement should avoid the nullpointer exception... Do i miss something?


citations inside a caption of a figure don't follow the order of appearance in the document. I used this in the preamble      \usepackage[square,numbers]{natbib}     \bibliographystyle{unsrtnat}   and this when I included the figure       \begin{figure}[h]       \centering       \includegraphics[width=0.8\textwidth]         {images/Fluid_distrubution_and_wettability}      \caption{Wettability and fluid distribution at pore level      \protect\cite{Crain68:online}}.      \label{fig:wett.fluid.dist}     \end{figure}   But then I get for example Figure 2.2, caption here [1] even though I have already many citations before the figure. But if I put this code in other areas of the document, citations are exactly according to the order they appeared in the document.

When using the \cite command in figure captions and the ieeetr bibliography style, then  BibTeX numbers the citations as appearing earlier than they do in reality (i.e. the first citation in the document ends up being [42]).  Is there any way to get BibTeX to ignore the \listoffigures section when numbering?


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?

is described as a new edition of Through the Ages: A Story of Civilization. What are the major changes between the two versions?


I would like to create a command that ends a beamer frame. However, this leads to the error message quoted below - probably due to the same problem that prevents indentation of frame commands, cf. .  The error message is: ! File ended while scanning use of \next.  Below is a failing MWE that can be made working by commenting out \end{frame} in the definition of \pfooter plus uncommenting it at the bottom.  \documentclass[english,10pt]{beamer}  \usepackage{listings}  \newcommand{\pheader}[1]{%     \section{bla: blabla}     \begin{frame}[fragile]{blabla} }  \newcommand{\pfooter}{\end{frame}     % some other commands }  \begin{document} \pheader{}   \begin{lstlisting}[gobble=4]     1234567890   \end{lstlisting}    bla \pfooter{} % \end{frame} \end{document}

I would like to create a Latex macro for my beamer presentations. I use beamer frequently, and want to make macros for the \begin{frame} and \end{frame} to require fewer keystrokes. At the beginning of the document I have:  \newcommand{\bfrm}{\begin{frame}}%start new frame \newcommand{\efrm}{\end{frame}}%end new frame   Which compiles fine. I then test the first of the two macros for the beginning of the frame:  \bfrm{New frame testing}     blah blah \end{frame}   Which produces the result I am looking for. I then test the second of the macros:  \bfrm{New frame testing}     blah blah \efrm   Fails to compile, saying that there is a runaway argument. What is the reason for the failure?


I bought some old bike from netherlands, I wanted to restore it. Rear wheel is broken and I wanted to exchange it but there is this strange freewheel which I cannot identify, do you have any idea what it is?

I am in the process of overhauling my old Motobécane racing bike and I'd like to replace the freewheel, if reasonable. However, there is no indication of who made it (the bike shop couldn't help) and I've never seen a hub like this online.  The Freewheel has a lock ring with splines on the outside and I'm wondering which tool to use to screw it tight on the hub.


I need to change the color of the row in the table to red instated of gray color. i have used the playground but i cannot change it,     If you open this above link(Playground)the table ll be row with gray color but my requirement is it should be red color.there is any resolved solution to be red color row?   in this table row with gray color but i need lite red color . if i apply t1 to slds-theme_error , red colr came but hover on row color  if you open that link it ll show like this picture  There is anyway to avoid hover in slds table

Is it possible to change the lightning-accordion-section label font size, I tried by adding   class="slds-text-heading_medium" It print like below      Expecting to increase the Font Size and bold the text.  <lightning-accordion class="example-accordion"                          onsectiontoggle={handleToggleSection}                          active-section-name="B">         <lightning-accordion-section name="A"  class="slds-text-heading_medium" label="Accordion Title A">             <lightning-button-menu slot="actions"                                   alternative-text="Show menu"                                   icon-size="x-small"                                   menu-alignment="right">                 <lightning-menu-item value="New" label="Menu Item One"></lightning-menu-item>                 <lightning-menu-item value="Edit" label="Menu Item Two"></lightning-menu-item>             </lightning-button-menu>
This is the content area for section A.

.

.

.

The section height expands to fit your content.
         </lightning-accordion-section>          <lightning-accordion-section name="B" label="Accordion Title B">
This is the content area for section B.

.

.

.

The section height expands to fit your content.
         </lightning-accordion-section>          <lightning-accordion-section name="C" label="Accordion Title C">
This is the content area for section C.

.

.

.

The section height expands to fit your content.
         </lightning-accordion-section>     </lightning-accordion>


Find the inverse of $[f(z)=3z^2+z+3]$ in $\mathbb{Q}/(z^3-2z-2)$ already prove that polynomial $z^3-2z-2$ is irreducible about $\mathbb{Q}$, now how can I find the inverse of that given polynomial? someone to please explain to me

I'm having trouble with the procedure to find an inverse of a polynomial in a field. For example, take:     In $\frac{\mathbb{Z}_3[x]}{m(x)}$, where $m(x) = x^3 + 2x +1$, find the inverse of $x^2 + 1$.   My understanding is that one needs to use the (Extended?) Euclidean Algorithm and Bezout's Identity. Here's what I currently have:  Proceeding with Euclid's algorithm:  $$ x^3 + 2x + 1  =(x^2 + 1)(x) + (x + 1) \\\\   x^2 + 1 = (x + 1)(2 + x) + 2$$  We stop here because 2 is invertible in $\mathbb{Z}_3[x]$. We rewrite it using a congruence:  $$(x+1)(2+x) \equiv 2 \mod{(x^2+1)}$$  I don't understand the high level concepts sufficiently well and I'm lost from here. Thoughts?  Wikipedia has a page on this we a , but it's still not clear in my mind.  Note that  has almost the same title, but it's a level of abstraction higher. It doesn't help me, as I don't understand the basic concepts.  Thanks.


EDIT: my question is different from the one you're linking to. Specifically, it doesn't say whether objects can be reused by the JS virtual machine.  In Javascript, is it guaranteed that two objects created successively (and of course not by assigning one to another) have a different reference?  Consider the following snippet:  let a = {}; let b = {}; // b can be created at any time after a is created let areEqual = a === b; // comparison can be done at any time after b is created   Is it guaranteed that areEqual is false? That some processor optimization won't make b re-use a's reference?

I'm using  to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.length == 0 inside of an if statement.  Is there a performance benefit to replacing == with ===?   Any performance improvement would be welcomed as many comparison operators exist.  If no type conversion takes place, would there be a performance gain over ==?


I am encountering an issue where having a ending script tag inside a quoted string in JavaScript, and it is killing the script.  I assume this is not expected behaviour.  An example of this can be seen here:   My test case browser for the interested: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4) Gecko/20091028 Ubuntu/9.10 (karmic) Firefox/3.5.4.

Why do some sites (or advertisers that give clients javascript code) employ a technique of splitting the <script> and/or </script> tags up within document.write() calls?  I noticed that Amazon does this as well, for example:  <script type='text/javascript'>   if (typeof window['jQuery'] == 'undefined') document.write('<scr'+'ipt type="text/javascript" src="http://z-ecx.images-amazon.com/images/G/01/javascripts/lib/jquery/jquery-1.2.6.pack._V265113567_.js"></sc'+'ript>'); </script>


I would like to do generate an excel file from the database query results(which are shown in an html), and display those in an downloadable excel sheet on the same page.All this needs to be done using jsf and javabeans(no jsp). The basically i would like to do the java ee equivalent of the following:  header("Content-type: application/vnd-ms-excel");  header("Content-Disposition: attachment; filename=Export_data.xls");   $db_link = db_connect(); $result = odbc_exec($db_link, $query); ?>

     column1	     column2
  <?php   while(odbc_fetch_row($result)){          $col1 = odbc_result($result, 'column1');        $col2 = substr(odbc_result($result, 'column2'),0,30);       echo ('
');       echo ('' . $col1 . '	');       echo ('' . $col2 . '	');  echo ('
');                          }                                  ?>

 <?php   edit: i want to both generate an excel from an html markup on the page, and display a downloadable version on the same page, without using any external plugin/apis.just like shown in the php. So it is not a duplicate of the other post, which doesnt generate excel from the the markup, and doesnt display it on the same page either.

I have this application I'm developing in JSP and I wish to export some data from the database in XLS (MS Excel format).  Is it possible under tomcat to just write a file as if it was a normal Java application, and then generate a link to this file? Or do I need to use a specific API for it?   Will I have permission problems when doing this?


Let $T_1, T_2$ be two linear transformations from $\mathbb{R}^n$ to  $\mathbb{R}^n$. Let $\{ x_1, x_2,....x_n\}$ be a basis of  $\mathbb{R}^n$. Suppose that $T_1  x_i \neq 0$ for every $i= 1,2,...,n$ and that $x_i \perp $Ker $ T_2 $ for every $i= 1,2,...,n.$ Which of the following is/ are necessarily true?   $T_1$ is invertible.   $ T_2$ is invertible.  Both $T_1, T_2$ are invertible.  Neither $ T_1$ nor $ T_2$ is invertible.

Let $T_1$ and $T_2$ be two Linear transformations from $\mathbb{R}^n$ to $\mathbb{R}^n$.  Let $\{x_1,x_2,\cdots,x_n\}$ be a basis of $\mathbb{R}^n$. Suppose that $T_1(x_i)\neq 0$ for every $1\leq i\leq n$ and that $x_i\perp Ker (T_2)$ for every $1\leq i\leq n$.   Which of the following is true?   $T_1$ is invertible $T_2$ is invertible Both $T_1$ and $T_2$ are invertible Neither $T_1$ nor $T_2$ is invertible.   As $T_1(x_i)\neq 0$ for each $1\leq i\leq n$ we do not have $T_1(a_1x_1+a_2x_2+\dots+a_nx_n)=0 $ unless each $a_i=0$ i.e.,$a_1x_1+a_2x_2+\dots+a_nx_n=0$ i.e., $T_1$ is one one thus invertible.  I am not sure if $T_2$ is invertible or not.  we have $x_i\perp Ker (T_2)$ for all $x_i$. Would that be a good idea say something like  $\langle x_i :1\leq i\leq n\rangle \perp Ker(T_2)$ and as they span whole space we would have   $\mathbb{R}^n\perp Ker(T_2)$ and thus $Ker(T_2)=0$ so it is injective so it is invertible...  Thus both $T_1$ and $T_2$ are invertible?  I would be so thankful if someone can assure what it has been done here is sufficient/clear.  THank you


I have seen similar questions on s.e. but I really can't seem to understand the proofs given.  So the question is the following:  Let $V$ be a finite-dimensional vector space. show that there is an isomorphism between $V$ and $V^{**}$ where $V^{*}$ is the dual space of $V$.

I am trying to understand more about the Bidualspace (or double dual space). The whole idea is that $V$ and $V^{**}$ are canonically isomorphic to one another, which means that they are isomorphic without the choice of a basis, which means there exists an isomorphism between them which does not depend on choosing some basis (on either of the spaces). (suggestion by @DonAntonio)    Let $V$ be a finite dimensional Vectorspace with Basis $\beta = \lbrace v_1, \dots , v_n \rbrace $ (the infinite dimensional case is discussed at ). I do understand that although we make a choice of Basis here, it will later on somehow be obsolete (which I don't see why)  Define: \begin{align} \begin{matrix} V & \overset{\Phi}{\longrightarrow}& V^* & \overset{\Phi^*}{\longrightarrow}&V^{**} \\  \sum_{i=1}^n \lambda_i v_i & \longmapsto & \sum_{i=1}^n \lambda_i v_i^* & \longmapsto & \sum_{i=1}^n \lambda_i v_i^{**} \end{matrix} \end{align} Discussion: I know and have already shown that $V$ and $V^*$ are isomorphic (not canonically isomorphic!) to one another, meaning that $\lbrace v_1^*, \dots , v_n^* \rbrace$ defines a Basis for $V^*$. Although I did not show it I am at peace with the statement that the mapping $\Phi^*$ introduces another isomorphism between $V^*$ and $V^{**}$. It is the canonical isomorphism between $V$ and $V^{**}$ that bothers me.  My tutors reasoning: In the following I will use $\checkmark$ to highlight whether or not I understand something.   $v_i^{**} \in V^{**}=\hom(V^{*},k)  \checkmark$, sure nothing to add here $v_i^{**} (\sum_{j=1}^n \lambda_j v_j^{*})=\lambda_i \checkmark$, should be completely analogous to $v_i^*(v_j)=\lambda_i$ $\Phi^* \circ \Phi (v) =: \iota_v$ $$ \iota: \begin{cases} V & \longrightarrow V^{**} \\ v & \longmapsto \iota_v \end{cases}$$ where $\iota_v( \varphi)= \varphi(v)$ and $\varphi \in V^*$ is a linear functional. My tutor said that $\iota$ is 'suddenly' a canonical isomorphism, independent of the choice of the Basis $\beta$ because $\Phi$ and $\Phi^*$ are isomorphisms. This is the step where I understand nothing about.   What happened next (two more equations): I told my tutor that I don't see why $\iota$ is independent of a basis choice, because at $\Phi^* \circ \Phi= \iota$ we still make a choice for a basis at $\Phi$ namely $\beta$. My tutor said that this seems to be the case at first sight and made two more calculations which I in fact "understand": $$ \Phi^* \circ \Phi \left( \sum_{i=1}^n \lambda_i v_i \right) ( \varphi) = \Phi^* \left( \sum_{i=1}^n \lambda_i v_i^* \right) ( \varphi) = \left( \sum_{i=1}^n \lambda_i v_i^{**} \right)(\varphi) \\ = \sum_{i=1}^n \sum_{j=1}^n \lambda_i \mu_i \underbrace{v_i^{**}(v_j^*)}_{= \delta_{ij}} = \sum_{i=1}^n \lambda_i \mu_i $$ I understand this calculation, it's mainly an application of the above introduced definitions and the Kronecker-Delta. Apparently I am supposed to have an "aha" moment here, which unfortunately didn't occur yet.  The next calculation he did was $$ \varphi (v) = \left(\sum_{j=1}^n \mu_j v_j^{*} \right) \left( \sum_{i=1}^n \lambda_i v_i \right)= \sum_{j=1}^n \sum_{i=1}^n \mu_j \lambda_i \underbrace{v_j^*( v_i)}_{\delta_{ij}} = \sum_{i=1}^n \lambda_i \mu_i $$ which evidently gives the same result as above. I would appreciate some wording on how those two equations (which calculations I understand) help me to see why there appears to be a canonical isomorphism between $V$ and $V^{**}$


Is there some application for selecting a file in Windows Explorer, and copy its file path to the clipboard, with one shortcut?   Does Windows have some built-in tool for it?

Is there a way to copy the currently selected filename, including the path, to the clipboard? Ideally this would be through the right-click menu.  Some degree of flexibility would be useful, like the ability to copy just the filename, path+filename, filename minus extension, etc. This isn't essential, though, as long as it can copy the path+filename.  The solution must be compatible with Windows XP, Windows Vista and Windows 7.


At first I made a simple array just inside the .js file and wrote the function to make list items from it. Then clicking on freshly created li elements should do something.  //This code works  dic[0] = "decir"; dic[1] = "querer"; dic[2] = "poder";   $(document).ready(     function verbsarray() {          for (var i = 0; i < dic.length; i++) {                       var verbo = dic[i];                                          verbos += "
" + verbo + "
\n";         };                   $('ul.h_list').html(verbos);                        });      $(".h_li").click(function() {     alert("it works!");     //Dollar finds .h_li here }   Since that was a prototype, then I developed that function to take items not from the static array, but from loaded JSON. Function parses the needed items and again makes list items from them.  But the other function (that looks for clicked
) now doesn't work...  //this doesnt work :-(   function verbos_from_json () {      $.getJSON('verbos.json', function verbsarray(vjson) {         for (var i = 0; i < vjson.data.length; i++) {                    verbo = vjson.data[i].verb;                                      verbos += "
" + verbo + "
\n";         };                $('ul.h_list').html(verbos);         });          };  $(".h_li").click(function() {     alert("it works?.. no"); }

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Let $G$ be a group and $a,b\in G$. Prove that $|a|=|a^{-1}|$ and that $|ab|=|ba|$.   I said that $|a|=n$ where $n$ is the smallest integer such that $a^n=e$ and $|a^{-1}|=m$ where $m$ is the smallest integer such that $(a^{-1})^{m}=a^{-m}=e$ but I don't know how to continue. Any suggest are appreciated.

Isn't it obvious for $|a|=|a^{-1}|$, since $\langle a\rangle = \langle a^{-1} \rangle$?  For $|ab|=|ba|$, I think we should go like this: $e=(ab)^n\Rightarrow e=(ab)(ab)^{n-1}\Rightarrow (ab)^{-1}=(ab)^{n-1}\Rightarrow b^{-1}a^{-1}=(ab)^{n-1}\Rightarrow a^{-1}=b(ab)^{n-1}$ But I get stuck here, since I don't know whether to get from here to $e=(ba)^n$.  For $|a|=|cac^{-1}|$, do I have to show that $\langle a\rangle = \langle cac^{-1}\rangle$?


Palpatine trained Darth Maul from a young age in the dark of the force and he was called Darth but Darth Plagueis was still alive while he was being trained and during episode 1 so there were 3 Sith, Plagueis, Maul and Palpatine?

I read on Wookieepedia that  was still plotting with Darth Sidious during "The Phantom Menace".   If Plagueis is Sidious' Master and Maul is Sidious' Sith Apprentice doesn't that violate the Sith's ?


Currently, it seems that suspended accounts are unable to request account deletion.  This should be changed to make it possible.  If someone wants to leave, there's no point prolonging the drama by making them wait.  If necessary, increase the  period for account deletion from 24 hours to 48 hours, because people may be in an especially bad mood if they're being suspended.   is a similar proposal, but it seemed to be a , and was downvoted.

According to the , users are required to put the text "please delete me" in their profile's "about me" text. But a suspended user can not edit their profile, so they are unable to follow the required process.  Often enough, a suspended user feels so vengeful that they have a burning desire to  by deleting their account, but alas they can not while suspended.  It would be good to support such users to fulfil their desires by providing a rage quit link that appears only for suspended users:    By the way, there is some basis for this question. I had a request for "how to delete my account" from a recently-suspended user.


I am attempting to create a templated vector class, but upon compilation I am receiving an error of def.hpp:3:1: error: 'TempVector' does not name a type  I keep referring to reference material and my syntax and handling of the header file declaration and definition (.h and .hpp) seem right to me, but I can not figure out what I am overlooking. Below is the three files I am working with, thank you. driver.cpp: #include <iostream> #include <string> #include "dec.h"  using namespace std;  int main() {   TempVector <int> v1;   cout<<"ran successfully"<<endl; }   dec.h: #ifndef DEC_H #define DEC_H #include <iostream> #include <utility>  // Declaration of class Vector  template <typename T> class TempVector {  public:    TempVector ();  private:    T* array;    static const unsigned int spare = 10; };  #include "def.hpp" #endif   def.hpp: template <typename T>   TempVector<T>::TempVector () {   std::cout<<"ran successfully"; }

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


Every time I compile my document and produce a PDF, it does not print my citations or references section. The preamble is copied below. I have a .bib file and all of the packages installed, the .bib file is in the same folder as the manuscript .tex file. All the required packages are installed, and I have tried to fix this any number of ways, but with no luck. Does anyone have a suggestion? Note that I have tried to post a minimal working example in the code block. I am trying to get this to work on my own computer with the bibliography file I created from Zotero, rather than creating a new file contents on LaTeX, unless that is what you are supposed to do... I read the entire manual for biblatex but it does not explain clearly. \documentclass[man]{apa7}    \usepackage[english]{babel}    \usepackage{kvoptions}    \usepackage{url}    \usepackage{csquotes}    \usepackage{setspace}    \usepackage{textcomp}    \usepackage{amsmath}    \usepackage{amssymb}    \usepackage{amsthm}    \usepackage{etoolbox}    \usepackage{logreq}    \usepackage[sortcites=true,sorting=nyt,backend=biber]{biblatex}    \DeclareLanguageMapping{american}{american-apa}  %%\addbibresource{C:/Users/meese/Box/Research/SeekingButDefensive/NewSelfZoo/NewSelfZooBibliography.bib}     \begin{filecontents}{bibliography.bib}  @article{karlsson_ostrich_2009,     title = {The ostrich effect: Selective attention to information},     volume = {38},     doi = {https://doi.org/10.1007/s11166-009-9060-6},     pages = {95--115},     number = {2},     journaltitle = {Journal of Risk and uncertainty},     author = {Karlsson, Niklas and Loewenstein, George and Seppi, Duane},     date = {2009},     note = {Publisher: Springer}, }    \end{filecontents}    \addbibresource{bibliography.bib}     \begin{document}     cite{karlsson_ostrich_2009}     \printbibliography     \end{document}

Running the minimal example  \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @ARTICLE{example,   author  = {Other, Anthony Norman},   title   = {Some things I did},   year    = {2014},   journal = {J.~Irrep. Res.},   volume  = {1},   number  = {1},   pages   = {1-10} } \end{filecontents*} \usepackage[backend=biber]{biblatex} \addbibresource{\jobname.bib} \begin{document} Hello\cite{example}. \printbibliography \end{document}   I get the warning There were undefined references.  I have read  and know that I need to run:   LaTeX Biber LaTeX   However, my editor is only set up to run BibTeX. How do I go about setting up my editor/IDE to be able to run Biber, and how do I run the LaTeX/Biber/LaTeX cycle?  Answers (sorted alphabetically by editor name)                    Answer guidelines   Each answer should be for one editor. If the editor is cross-platform, if possible give a single answer with notes covering the minor platform variations. Please edit the question to include new answers in the 'link list' Each answer should be 'stand alone', i.e. don't say 'It's almost the same as editor Y but ...' for the editor part Instructions for 'build tools' such as arara or latexmk are welcome but should explain how to set up the editor in question as not all editors allow simple addition of arbitrary tools


I'm using template part for showing portfolio items. It's not page template just portfolio.php file and I'm included it with get_template_part('portfolio'); to homepage.  Now everything is working good. But I want to use pagination for this section. Here is my code block;  <?php global $wp_query; $paged = get_query_var('paged') ? get_query_var('paged') : 1; $port_args = array(         'post_type'     => 'portfolio',         'posts_per_page'  => 3,         'post_status'     => 'publish',         'paged'       => $paged ); $wp_port_query = new WP_Query($port_args);  if( have_posts() ) :     while ( $wp_port_query->have_posts() ) : $wp_port_query->the_post();         ?>         <li class="col-lg-4 col-sm-4 view item <?php $terms = get_the_terms( get_the_ID(), 'portfolio_filter' ); ?><?php if($terms) : foreach ($terms as $term) { echo $term->slug.' '; } endif; ?>">              <?php the_post_thumbnail("portfolio-image"); ?>
         <?php     endwhile; endif;  echo ''; echo  '
'.get_next_posts_link('Older', $wp_port_query->max_num_pages).'
'; //Older Link using max_num_pages echo  '
'.get_previous_posts_link('Newer', $wp_port_query->max_num_pages).'
'; //Newer Link using max_num_pages echo "";  wp_reset_query(); ?>   When I click the Older pagination button it's going to ?paged=2, but it's not working it shows same posts again. If I use the page template and open the themename/page_id=82 directly it's working. And url looking like this ?page_id=82&paged=2 now I'm thinking I missing page id on section. How can I fix this and work it in homepage template section. If it's not working how can I add the page_id in get_next_posts_link . It's looking like this now ?paged=2 and I want to change it like this ?page_id=82&paged=2. Page id is coming automaticly from page. How can I do this?

I have added a custom/secondary query to a template file/custom page template; how can I make WordPress use my custom query for pagination, instead of using the main query loop's pagination?  Addendum  I have modified the main loop query via . Why isn't pagination working, and how do I fix it?


hi i just installed ubuntu 18.04 and i am new to all this. And canot acces the wifi, becose the wifi adapter is not found. I tried some solutions but nothing works for me. I have Acer aspir 5750G thank you for any help.    i am sorry, but i don't understand this   petr@petr-Aspire-5750G:~$ lspci -nn -d 14e4: 02:00.0 Ethernet controller [0200]: Broadcom Inc. and subsidiaries NetLink BCM57785 Gigabit Ethernet PCIe [14e4:16b5] (rev 10) 02:00.1 SD Host controller [0805]: Broadcom Inc. and subsidiaries BCM57765/57785 SDXC/MMC Card Reader [14e4:16bc] (rev 10) 02:00.2 System peripheral [0880]: Broadcom Inc. and subsidiaries BCM57765/57785 MS Card Reader [14e4:16be] (rev 10) 02:00.3 System peripheral [0880]: Broadcom Inc. and subsidiaries BCM57765/57785 xD-Picture Card Reader [14e4:16bf] (rev 10) 03:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM43227 802.11b/g/n [14e4:4358]

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


Hello i have an asus s550cm and i have a 24gb Kingston ssd, i installed Windows 8 and i have a problema with junction links.  The only junction link i can make it´s users folder but when i try to remove  -ProgrData -Program files -Program files (x86)  I can´t even when i enter Command line after and before configuring Windows I use:  robocopy "c:/program files" "d:/program files" /E /COPYALL /XJ rmdir "C:/program files" mklink /J "c:/program files" "d:/program files"

I have an SSD as my main Windows drive, with a 640GB 2.5" HDD, partitioned to store programs and user settings, and also to act as backup (it's the only thing I had lying around at the time of building my PC).  The problem is that whenever I install a program, it installs to C:\Program Files [(x86 for the 32 bit programs]\, although I have changed the environment variables. This wouldn't normally be an issue, however every installation program points its shortcut to my 640GB HDD.  The root layout of both drives:   To clarify:   Program files get installed to C:\ Program shortcuts are always pointed to Z:\, my 640GB HDD   Modifying the relevant environment variables doesn't do anything, I looked at , but however it only talks about modifying the registry and environment variables, which I have already done so.  I install to the Z:\ drive if the installation program lets me change the installation path, but however the installation programs sometimes don't let me change this.  Is there a way that I can force every program to install to the relevant location on Z:\, but at the same time move any programs currently installed to the new location? Perhaps I'm missing something here?  My target is to have every program installed on Z:/, with only the core Windows operating system on C:/.  Found ; would it be appropriate to use in my case? I would be able to move the entire Program Files (and its x86 version) to Z:\, without impacting on the performance.*


this is my first question on Stackflow. I want to create a pascal triangle with height of 'n'. Here is my code:  nb = input('input lines: ') nb = int(nb) array = [([1]+[0]*(nb-1))]*nb for i in range(1, nb):     for j in range(1 ,nb):         array[i][j] = array[i-1][j-1] + array[i-1][j]   I want to get:  [1, 0, 0, 0, 0] [1, 1, 0, 0, 0] [1, 2, 1, 0, 0] [1, 3, 3, 1, 0] [1, 4, 6, 4, 1]   But the result is like this:  input lines: 5 [1, 4, 10, 20, 35] [1, 4, 10, 20, 35] [1, 4, 10, 20, 35] [1, 4, 10, 20, 35] [1, 4, 10, 20, 35]   I don't understand why every single line changed to the same. Especially I started the recursion from the second element in the second line.  Could someone explain the issue with my code. Thanks a lot

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I was going through some posts in Ask Ubuntu and found a post which was reviewed by the community user.  Does the community user review first posts once in a blue moon or often? Why is it reviewing posts when a normal user (having access to the review queue) can do it?

I was reviewing an old post I flagged and saw that the Community user reviewed this post as "Looks OK."  I know the Community user can , but in what scenario can the Community user review Low Quality posts?


I've got an iMac set up to share it's wired network connection via WiFi. My MacBook connects to this fine, and is assigned an IP address via DHCP.  However, I'd like to use the MacBook as if it was directly connected to the same network as the iMac. Some addresses on the network do not resolve, and this appears to be because the MacBook is on a different subnet. I'm guessing this is because it's using the iMac as a DHCP server.  Is there a way to have the MacBook share the iMac's network connection, BUT with the MacBook using the same DHCP server as the iMac?  I'd like to avoid manually specifying an IP and subnet.

I'm trying to setup my iMac running 10.6 to be a wireless bridge. I have it working, but I need to disable DHCP and let my network's DHCP server provide an IP for the connected device(s). I can't seem to find a way to disable DHCP in Internet Connection Sharing. Does anyone know if this is possible? I'm guessing there's a key one could set in /Library/Preferences/SystemConfiguration/com.apple.nat.plist, but I can't find it. I checked the man page for InternetSharing and it doesn't mention anything useful, except changing the subnet that the DHCP server uses.


This is a problem from the book of Terence Tao, Analysis I and it looks like-     Let $a<b$ be two real numbers, and let $f:[a,b]\to\Bbb{R}$ be a   monotone increasing function. Let $F:[a,b]\to\Bbb{R}$ be the function   $F(x)=\int_{[a,x]} f$. Let $x_0\in[a,b]$. Show that $F$ is   differentiable at $x_0$ if and only if $f$ is continuous at $x_0$.   Observe that, the "if" part can be easily proved by using Fundamental Theorem of Calculus. Just to recall ...Statement of Fundamental Theorem of Calculus:      Let $a<b$ be two real numbers, and let $f:[a,b]\to\Bbb{R}$ be a   Riemann Integrable function. Let $F:[a,b]\to\Bbb{R}$ be the function   $F(x)=\int_{[a,x]} f$. Then $F$ is continuous on $[a,b]$. Furthermore,   if $x_0\in[a,b]$ and $f$ is continuous at $x_0$, then $F$ is   differentiable at $x_0$, and $F'(x_0)=f(x_0)$.   Here, $f$ is monotone increasing on $[a,b]$, hence $f$ is Riemann Integrable on $[a,b]$ and $f$ is continuous at $x_0\implies F$ is differentiable at $x_0$ I can't understand how to tackle the "only if" part. There is a hint given in the book: Consider left and right limits of $f$ and argue by contradiction.  Can anybody solve the part in a rigorous and analytical way? Thanks for your help in advance!

Let $a,b\in \mathbb{R}: a<b$. Let $f:[a,b]\to \mathbb{R}$, $f$ is monotone increasing. Let $F:[a,b]\to \mathbb{R}, x \mapsto \int_{[a,x]} f$.  Show that if $F$ is differentiable at $x_0 \in [a,b]$, then $f$ is continuous at $x_0$.  If f was not continuous, then the right and left limits would not match. Because the function jumps, its measure has to jump too, therefore integral would be discontinuous and therefore non differentiable. However I do not know how to formalize this intiuition.


is it smaller because large variance observations get smaller weights in the estimation and so contribute less than the small variance observations, which reduces the variability of the estimator.

I'd like to show that $$V[\hat\beta_{OLS}]-V[\hat\beta_{GLS}]=\sigma^2(X'X)^{-1}(X'\Omega X)(X'X)^{-1}-\sigma^2(X'\Omega X)^{-1}\geq 0$$ is positive (semi-) definite. $\Omega$ and $X$ are square-matrices. I know how to check for positive (semi-) definiteness with eigenvalues if the matrices contain numbers, but I wonder if there is a quick way to check if the above expression is positive (semi-) definite when we only have matrix notation without numbers?


I am trying to install Ubuntu Mate on my Acer Aspire 3, with AMD Ryzen 3 2200U and AMD Radeon Vega 3 Graphics, currently running Windows 10.  When I boot from a USB and select Install Ubuntu MATE I am getting the following error:     After that I disabled AMD-SVM and AMD-IOMMU in the BIOS menu, which cleared the first several lines of errors, but I still get some errors and cannot install Ubuntu    Can anyone help me out with this annoying issue?  I contacted Acer support as well, but they said they cannot help since this is regarding an OS other than Windows.

I get this error message   NMI watchdog: BUG: soft lockup - CPU#2 stuck for 23s! [plymouthd:305]    on the startup of my system (even with live-cd).  My PC is a dell inspiron 7559 with intel graphic and nvidia.  UPDATE - this issue also happens when attempting to install ubuntu 18.10 using LiveUSB


I want create an expression structure, to calculate value (by calling operator().   expr - base expression class, it should work like result = expression(100500). const_value - struct returns constant value. argument - returns it's argument (== function id). e_add, prod, sub, ... - different functions.  Why code calls base class operator(), but ignore derived structires?  output:  EXPR::operator() called EXPR::operator() called  201000 const_value 1 called arg = 100 1   Full source code:  #include <iostream> #include <cmath>  using namespace std;  struct expr {     virtual double operator()(double) {         cerr << "EXPR::operator() called\n";         return 100500;     }; };  struct const_value : public expr {     double _value;     const_value (double value = 0): _value(value) {};     double operator()(double arg = 0) override {         cout << "const_value " << _value << " called arg = " << arg << '\n';         return _value;     }; };  #define make_bin_op(_op_name, _op) struct e_##_op_name : public expr {     \     expr _left;                                                            \     expr _right;                                                           \     e_##_op_name(expr left, expr right): _left(left), _right(right) {};    \     double operator()(double arg) override {                               \         return _left(arg) _op _right(arg);                                 \     };                                                                     \ }  make_bin_op(add,  +);  #undef make_bin_op  int main() {     const_value c1{1};     e_add e{c1, c1};      cout << e(100) << endl;     cout << c1(100) << endl;      return 0; }

Someone mentioned it in the IRC as the slicing problem.


I have $\displaystyle\sum_{n=0}^{\infty}\frac{n}{n+1}x^n$, for x$\in$R. Then I have to find the sum function. I know there is many ways to find the sumfunction. But can I  differentiate with respect to x and then find the sum of it? Then I have the differentiabel version of the sum function? Then I can take the integral from 0 to $\infty$?

I have to find the radius of convergence for $\displaystyle\sum_{n=0}^{\infty}\frac{n}{n+1}x^n$, for x$\in$R. I think it is $r^{-1}=\lim_{n\to\infty}\frac{a_{n+1}}{a_n}=\lim_{n\to\infty}\frac{ \frac{n+1}{n+2} }{ \frac{n}{n+1}}=1$ so r=1. Then I have to find out if $\displaystyle\sum_{n=0}^{\infty}\frac{n}{n+1}x^n$ is convergent in  the end points of the convergence interval. I think I have to check for $|r|$. But we can't use ratio test (L=1) or integral test(not decreasing) for $\displaystyle\sum_{n=0}^{\infty}\frac{n}{n+1}$. How can I then check if it's convergent in the end points of the convergence interval?


I need to add the svjour3.cls to TexStudio. For running the \documentclass[smallextended]{svjour3}. I tried to find a location to copy it. I put it in several directories as well as my local .TEX file. and it didn't run. I get the following error: "Filesvjour3.cls' not found. \usepackage.' Here is my TexStudio directories:

I know how to define a package or a class, but how do I make it available (to myself) at all times?  Say I have the package file commonstuff.sty (or myprettyclass.cls), that I want to be able to include in any .tex file I create on my computer. Where do I put it? Do I need to run some installer on it, or is it enough to keep it in a certain folder?  Note: I know I can just place it in the same folder as the .tex file, but that's not what I'm after here. I'm looking for a way to "install" the package centrally on my computer.


What becomes the final score if 5 players gets sent off from one team?  In the video game FIFA the opposing team wins with 3-0. However, if one team leads by more, say 6-0, will this be the final score? Would be unfair otherwise

This question may apply to other leagues in other places, but recently I saw an article about  and . Both players are over 21 and make semi-regular starts for the Manchester United senior squad. How are they also allowed to play for the U-21 reserve team when they're obviously over-age?


I'm hoping to learn the proper grammar for a question I just asked a colleague.        The first of two calipers shipped to us is here.   The first of two calipers shipped to us are here.

In this sentence, which is the right word?     The only thing that I want you to hit right now is/are the books.


I've just started special relativity and have a quick question on the terminology. From a stationary frame, lorentz transformation gives both length and time of moving frame scaled by the same factor: $$\Delta x = \gamma \Delta x'\\\Delta t = \gamma \Delta t'$$  Then why does my textbook say length is contracted but time is dilated? From the equations, both the length and time are contracted. What am I missing?

Can you resolve this paradox: Time and space are supposed to be treated symmetrically in SR, yet time dilates while length contracts. I've been working on this for weeks, and I can't resolve it.  The mirror experiment shows that time and space both expand for the moving observer, in contradiction to the results one derives from the LT, yet a well-known text, Eisberg's Fundamentals of Modern Physics (pp. 20-21) incorrectly concludes the usual asymmetrical results from that, by changing the definition of time dilation! He defines it as meaning that time measured in the moving frame is longer, when tau is actually well-known to be shorter. Time dilation refers to the mover's time UNITS LOOKING longer to the stationary observer because the total number of time units is FEWER, the opposite situation from the mirror experiment.


I'd like to make a bunch of 3D ribbon plots in TikZ or PGF, I've taken a look around and I've found no hints on how this might be accomplished, is there a simple way to do this? I'd settle for a 3D waterfall plot which may be easier to achieve.  My data is formatted thus:    theta -5 -4 -3 -2 -1 0 1 2 3 4 5

I am trying to reproduce a similar figure to the following one. My first guess was to use pgfplots but I didn't find any example that I could use as a starting point. At the moment I am unsure if pgfplots is actually the right package or I should rely on something else e.g. TikZ.   Since I don't really know where to start, I would appreciate any piece of code that points me in the right direction.    EDIT  Here is some dummy data for the plots.  plot1   plot2   plot3   plot4 0       0       0       0 3.466   2.058   0       0 4.262   2.976   0.001   0 3.822   3.168   0.006   0.008 2.953   2.936   0.019   0.063 2.065   2.492   0.046   0.265 1.332   1.977   0.092   0.734 0.797   1.478   0.164   1.508 0.443   1.045   0.268   2.44 0.228   0.698   0.412   3.219 0.107   0.438   0.598   3.524 0.046   0.256   0.831   3.219 0.017   0.138   1.109   2.44 0.006   0.067   1.429   1.508 0.002   0.029   1.78    0.734 0       0.01    2.141   0.265 0       0.003   2.479   0.063 0       0.001   2.736   0.008 0       0       2.808   0 0       0       2.465   0 0       0       0       0


On the Careers site when you receive a message and reply with no interested option can "not willing to re-locate" be added as an option.  I ask as 90% of message I have to enter this response. I understand this is currently covered by this position is not quite what I am looking for however I feel it would give more feedback to employers.

The preference for being open to relocation is a checkbox, and if you don't check it, nothing about relocation shows up in your profile.  Evidently recruiters can't understand that a lack of "I am open to relocation" is the same thing as "I am not open to relocation", and so every single contact I've gotten through Careers is for a job that I would have to relocate for.  Can we make it more obvious to the recruiters (especially ones from Amazon) that we have not checked that box on purpose?


for example, if someone was using a medicine that on the outside was helping them but was actually causing long-term harm. I seem to think it begins with the letter V?

I'm looking for metaphors (non-jocular) with the same meaning as "Trojan Horse" - "A person or thing intended to undermine or destroy from within."


What is the likelihood of any side of a die appearing more than 200 times after 1000 dice rolls? It seems like I need to figure out the standard deviation for this but not sure how to do this. I know the expected amount of times a number pops up is 1000/6, but how do I calculate the standard deviation and variance?

Suppose, we roll a fair die $n$ times. The expected value of how many times each side of the die will appear is $\frac{n}{6}$. The question is, what is the probability that any side of the die will come up more than $k$ times, where $n>k>\frac{n}{6}$? Or you could put it this way: what is the probability that no side will come up more than $k$ times? Clearly these two probabilities add up to 1.


I'm curious about some of the hearthstone rules, specifically about when the game is considered a tie.  So, for example, what happens in the following scenarios?   If a warlock plays hellfire when both heroes are at 3hp or less. If your opponent has 5hp, and you have 3hp. You play a leper gnome, and then hellfire.   So, what happens in such occasions? A tie? Both opponents lose? or what else?

If both players are very low health and someone plays this card:    Both players could die simultaneously. What happens in Arena when this event occurs? Does it count as a loss for both players? Does it count at all for your Arena record?  Side note: Holy Nova + Auchenai Soulpriest could cause the same scenario.


For the currency values, I am doing all the calculations in the business layer of ASP.net website so is there even a need to store in sql server as a money column ?

I'm curious as to whether or not there is a real difference between the money datatype and something like decimal(19,4) (which is what money uses internally, I believe).  I'm aware that money is specific to SQL Server. I want to know if there is a compelling reason to choose one over the other; most SQL Server samples (e.g. the AdventureWorks database) use money and not decimal for things like price information.    Should I just continue to use the money datatype, or is there a benefit to using decimal instead? Money is fewer characters to type, but that's not a valid reason :)


To begin where I did with this question, I was originally wondering about why the neutron-proton ratio is close to 1 for stable nuclei. The answer to my original question (as far as I understand it) is that, due to the exclusion principle, not all of the protons or neutrons can be in the ground energy state inside the nucleus, therefore when the neutron-proton ratio is already low it would take more energy to bind an additional proton than it would for a proton to decay into a neutron, or vice versa when the ratio is high, so the ratio tends towards 1.  But in reality, the nuclear ratio does not tend towards 1. After some research, what I've found is that, via the Bethe-Weizsäcker formula from the liquid drop model of the nucleus, nucleon binding energy is minimized when the nuclear ratio is near $1+\frac{a_C}{2a_A}A^\frac{2}{3}$. However, it was my understanding that the liquid drop model is mostly considered outdated, as it cannot account for various observations, such as the magic numbers, which are readily accounted for by other models like the nuclear shell model. So, to get back to my question, is there any way to account for the increase in neutron-proton ratio with the nuclear shell model?

In basic chemistry, we are taught that an atom has roughly the same number of neutrons and number of protons, this doesn't seems to hold for larger atoms, but it is always roughly proportional (i.e. you seldom find an atom with 100 protons but 1 neutron, that just does not happen). Why is that?


According to   [S]entence adverbs convey the mood, attitude or sentiments of the speaker.  Yet,  Sentence adverbs form a completely standard aspect of English grammar, but there are a few, for example, hopefully, that give rise to widespread criticism as they express the user's attitude to the sentence content rather than modify the sentence as a whole. Others that may incur criticism in the same way are mercifully, thankfully, and truthfully.   Both excerpts are contradictory, which one is correct?

I am studying for the SAT, and I learned just now that the following sentence is grammatically incorrect:     Hopefully, we will be able to complete the building before the rainy season sets in.    The reason why it's incorrect is given in my study book: hopefully is an adverb, and yet it is not modifying a verb in this sentence.  I don't see how this is the case, because hopefully is modifying the verb complete. And why is that according to Google Dictionary, the following sentence is correct:     Hopefully, it should be finished by next year.


I've watched DBZ, and ready most of the manga but for the last 3 years I've forgotten about Dragon Ball as I haven't had time to watch DBS or the movies. Well I really want to catch up. But I don't know how. And yes I'm aware how ridiculous this is considering the series is nearing its 100th episode. Please what's the fastest or most reliable way to catch up on it?

I have watched most of Dragon Ball and Dragon Ball Z up to the culmination of the Frieza arc and bits of other DBZ episodes. I'm passively familiar with the overarching story line/details for some reason, but have not watched much Dragon Ball GT.  Do I need to catch up before jumping into Dragon Ball Super, or does the new show sufficiently explain things if you're not fully up to speed on the franchise?  I skimmed this stack exchange and did not see related questions.


When you forgot to sudo a command you may want to write,  sudo !!   That would execute the last command applying the sudo command to it.  However sometimes seems I can't do that, for example inside /etc folders. What am I missing?  EDIT:  dione@saturno:/etc$ echo testing > testfile bash: testfile: Permiso denegado dione@saturno:/etc$ sudo !! sudo echo testing > testfile bash: testfile: Permiso denegado dione@saturno:/etc$    Now I guess that's because it's doing sudo echo, and the problem is that redirection is not affected.

When using sudo to allow edits to files, I regularly get 'permission denied'.  For example, my mouse is jittery and sluggish, so I want to disable polling:  sudo echo "options drm_kms_helper poll=N">/etc/modprobe.d/local.conf   I'm prompted for a password, and then get:  bash: /etc/modprobe.d/local.conf: Permission denied   So I tried to do a temporary change to disable polling by using:  sudo echo N> /sys/module/drm_kms_helper/parameters/poll   Yet again the system responded with:  bash: /sys/module/drm_kms_helper/parameters/poll: Permission denied   Any ideas?


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

I have a model that passes a variable to a python script. The script uses that variable to query some directories and return a list of paths. What I want to know is:    How can I then use each of those paths as the parameter in a subsequent operation? Is the bridge between python and ModelBuilder a one-way street?


I am new to Ubuntu,how can I install last.fm scrobbler?  I have already downloaded via the website() but I don't know what to do now. Any help, especially newbie-friendly,would be appreciated.

it has the guide for 12.10 but not newer ones plz someone help


Im a newbie here.I need help how to decode a html string "&#128081" to char in c#? it should be show crown character or if its not supported it should show a rectangle.Im working for iOS.  Thank you for all your help.

I have email addresses encoded with HTML character entities. Is there anything in .NET that can convert them to plain strings?


I have two tables: datess, deletess, sample  I wrote a query like this:  DELETE FROM sample WHERE sample_date_key IN (SELECT date_key FROM datess WHERE s_date BETWEEN '2015-02-18' and DATE'2015-02-25');   But I have 2 rows and two columns in deletess:  start_date  |  end_date ------------+---------- 2015-02-18  | 2015-02-18 2015-01-18  | 2015-01-18   I want to delete all the rows in sample with dates between start_date and end_date in deletess.  I tried the below code but got error:      ERROR:  more than one row returned by a subquery used as an expression   (SELECT date_key FROM datess WHERE s_date BETWEEN (SELECT start_date FROM deletess) AND (SELECT end_date FROM deletess);   I appreciate any help. Thanks!

Scenario:  Let's say I have two tables, TableA and TableB.  TableB's primary key is a single column (BId), and is a foreign key column in TableA.  In my situation, I want to remove all rows in TableA that are linked with specific rows in TableB: Can I do that through joins? Delete all rows that are pulled in from the joins?  DELETE FROM TableA  FROM    TableA a    INNER JOIN TableB b       ON b.BId = a.BId       AND [my filter condition]   Or am I forced to do this:  DELETE FROM TableA WHERE    BId IN (SELECT BId FROM TableB WHERE [my filter condition])   The reason I ask is it seems to me that the first option would be much more effecient when dealing with larger tables.  Thanks!


Can some body help me, I'm new to c#, I know this question has been asked several times before. The code below is supposed to be looking for specific directories but it doesn't seem to match the regex. I have tested the expression on regex101.com and it worked fine.  matching string should return True: \TestData\FXLH_TestData  matching string should return False: \TestData\FXLH_TestData_manifest  string dirReg = "([A-Z]+_TestData)[^_manifest]";  foreach (string subDir in Directory.GetDirectories(target)) {    if (Regex.IsMatch(subDir, dirReg)         Console.WriteLine("success");    else         Console.WriteLine("fail");                        }

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


I was wondering how to create a custom command that works something like this:   \mycommand{1} = blue \mycommand{2} = red \mycommand{3} = yellow   where any other argument causes an error. Basically, I want to "switch" on the argument, so that each argument has one predefined outcome. I tried doing something like Haskell's pattern-matching, and I have looked at various key-value packages but haven't been able to get a solution from them.  Im sorry if this doesn't make sense, I'm not entirely sure how to put this problem into words.

I saw these command when i searching sth. I wonder if we can increase numbers if conditions.  it's like if{0} = a, if{1}=b, if{2}=c, if{3}=d etc.  \newcommand{mycommand}[1]{ \if{#1 != 0} Some text, because it's nonzero \else Some other text, because it's zero \fi }  \mycommand{0} \mycommand{1}


I’m rewatching TNG, and twice have noticed that objects from the holodeck are able to exit the holodeck. Wesley gets wet and stays wet when leaving; and also has a snowball fight, throwing a snowball which exits the holodeck and hits Captain Picard. How?

Related to   I was watching  last night and I noticed that when Data realizes that something has gone terribly wrong, he leaves the holodeck with the holodeck generated paper with a drawing of the Enterprise. The paper does not disintegrate as he leaves the holodeck. If this can leave the holodeck, why can't Professor Moriarity? Indeed, the original ending to this episode according to Memory Alpha:     The original ending filmed was cut from the episode. (Star Trek: The Next Generation Companion 2nd ed., pp. 68-69) Hurley recalled, "In that ending, Picard knew how to defeat Moriarty. He tricked him. He knew all along that Moriarty could leave the holodeck whenever he wanted to, and he knew because when Data came out and showed him a drawing of the Enterprise, if that piece of paper could leave the holodeck, that means that the fail-safe had broken down. In turn, this means that the matter-energy converter which creates the holodeck, now allowed the matter to leave the holodeck, which was, up to that point, impossible. When he knew that paper had left the holodeck, he knew that Moriarty could as well, so he lied to him."   This is interesting because the whole premise of this episode and Ship in a Bottle is that Moriarity can't leave the holodeck. Moreover, the Doctor from Voyager always needs some kind of  to go places.  Given this and the water/other matter that leaves the holodeck in the , why can some matter exist outside the holodeck while other matter cannot?   Is it tied somehow to the replicator - i.e. replicating a piece of paper into real matter is trivial, but replicating a human being or anything more sophisticated would be non-trivial?


I know this question has been asked in other languages including Java itself.     I just want to clarify that I know how to reverse an array but I would rather appreciate help if any for this particular solution of mine.   So please don't mark it as a duplicate.   import java.util.Scanner; class TestClass { public static void main(String args[] ) throws Exception {     /*          Code for User input     */      /* The problem was with the Swapping Code below */     for(int i=0; i<=n/2; i++)         swap(i,n-i-1,a);    /* Output Code. */      } /*Swap function*/ public static void swap(int x, int y, int[] arr){     int temp = arr[x];     arr[x] = arr[y];     arr[y] = temp; }  }   I have changed my solution according to the links provided in the comments .I am getting alright in some of the test cases but in some, the code fails.I think I have done it correctly.So any help will be appreciated.Thanks

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


Suppose a boy is standing on a platform which is free to rotate about an axis passing through its center. The Kinetic energy of the boy and the platform is K. If the boy stretches his hands so that the moment of inertia of the sytem(boy + platform) gets doubled. Then I have to find the new Kinetic energy of the system.  As there is no torque so angular momentum remains conserved. Since M.O.I gets doubled so angular velocity gets halved. Therefore the new kinetic energy is:-  $ K'= \frac{1}{2}I'×(w')^2 $  $ K'= \frac{1}{2}×2I×(\frac{w}{2})^2 $  $ K'= \frac{1}{2}×\frac{1}{2}×I×w^2 $  $ K'= K/2 $  Thus the kinetic energy gets halved. So is the law of conservation of energy being violated here? Is the total energy not conserved?

Today in physics class we were talking about angular momentum and rotational kinetic energy. My teacher used the classic example of a figure skater spinning on ice - when she pulls her arms in, her angular momentum is conserved and her angular velocity increases, meaning that her rotational kinetic energy also increases. Of course, this increase in energy must come from somewhere - in this case, it comes from the figure skater doing work on her arms and pulling them in toward her body. Then I started wondering - if the figure skater slows her rotation by extending her arms, she decreases her rotational KE. Where is her energy going? Or to put it another way, what force is doing work on the figure skater in order to decrease her energy?


Consider the following limit for $x \in [-1,1]$ and $n \in \mathbb N$:  $$\lim_{n \to \infty} x^{1+\frac{1}{2n-1}}=|x|$$  I can't see where does the absolute value come from. Why isn't the answer simply $x$?     This limit is available on page 156 of Abbott's Understanding Analysis.   EDIT: Sorry i found a dublicate .

$\lim_{n\to\infty}h_n(x) = x\lim_{n\to\infty}x^{\frac{1}{2n-1}}$ where $h_n(x)=x^{1+\frac{1}{2n-1}}$. I understand that $\lim_{n\to\infty}x^{\frac{1}{2n-1}}$ goes to one but what I don't understand is how did our limit become $h_n(x)=|x|$? I'm just having hard time wrapping my head around the appearance of absolute value.  Note. This is an example (Chapter 6, Section 2) from Understanding Analysis by Abbott.