\documentclass{article} \usepackage{hyperref}  \begin{document}    \url{http://mirror.ctan.org/info/latex2e-help-texinfo/latex2e.html#toc-Overview-of-LaTeX-1} \end{document}   This code produces a clickable link which does not open correctly in the latest version of Firefox (and Safari). It produces a %23 instead of a # in the url. Manually replacing the %23 with # makes the url work.  How can I make LaTeX create the correct clickable link?


Can I port user permissions across computers for an ext4 external hard drive?

I have an external USB 3 disk drive (2TB capacity) that is most likely going to be moved from machine to machine. The disk has a GUID partition table and an ext4 partition. I am unable to write to the disk unless I elevate the process (sudo).  As of now I am thinking of trying one or both of the following and would like to know the cons of each -   chmod 777 /mnt/externalDrive chown nobody:nogroup /mnt/externalDrive   If I give 777 permission and user1 (UID:1005) writes to it and I later move the disk to another computer where user7 is UID:1005, what happens? Does user7 become the owner of the file on that computer? It seems to me that I will periodically have to run chown -R nobody:nogroup /mnt/externalDrive on the disk.  Is any of what I am considering an obvious bad practice? The disk will most likely contain videos, music and pictures none of it need to be protected like some financial data.


I get an error A "NullPointerException" could be thrown; "entity" is nullable here. below is a sample of my code.  NewResponse newResponse = new NewResponse(); if(entity.getName() != null){         GetDetails response = crossService             .getDetails(entity.getName());          response.setHumanName(response.getFullName());         }   Is there a way that I can fix null pointer dereference?


Reserve windows 10 app not appearing in notification bar

I am running Windows 7 and I want the get Windows 10 app thing.  I have tried the Reservewin10.cmd, with an error message that says access denied even if I elevated to admin.  I have also tried the Win10fix_full file, and I used all 3 methods and waited and it still doesn't work. My computer cant check for updates so I downloaded B3035583 and KB2952664 standalone and installed them.  Then I reran both scripts. The reservewin10 shows the following     and the win10fix_full file still thinks it fixed it but it actually didn't do anything.  I have the 2 prerequisite updates installed, but as @David mentioned below, it may rely on some OTHER updates for it to work.  Error code given by windows update when I try to check for updates is 80072F76


The following packages will be upgraded:            texstudio 1 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade. 45 not fully installed or removed. Need to get 15.2 MB of archives. After this operation, 50.7 MB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://download.opensuse.org/repositories/home:/jsundermeyer/xUbuntu_14.04  texstudio 2.11.2-7.1 [15.2 MB] Fetched 15.2 MB in 1min 37s (156 kB/s)                                          (Reading database ... 315110 files and directories currently installed.) Preparing to unpack .../texstudio_2.11.2-7.1_amd64.deb ... Unpacking texstudio (2.11.2-7.1) over (2.10.8+debian-1) ... dpkg: error processing archive /var/cache/apt/archives/texstudio_2.11.2-7.1_amd64.deb (--unpack): trying to overwrite '/usr/share/texstudio/template_Letter.tex', which is also in package texstudio-doc 2.10.8+debian-1 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ... Errors were encountered while processing: /var/cache/apt/archives/texstudio_2.11.2-7.1_amd64.deb W: Target Sources (non-free/source/Sources) is configured multiple times in /etc/apt/sources.list:53 and /etc/apt/sources.list:54 W: Target Sources (non-free/source/Sources) is configured multiple times in /etc/apt/sources.list:53 and /etc/apt/sources.list:55 E: Sub-process /usr/bin/dpkg returned an error code (1)   when I tried to update texstudio on my ubuntu, it gave this error, can anyone kindly help me how to fix the error. Many thanks


Does reusing the same $R$ in Elliptic Curve ElGamal breach its security?

In Elliptic Curve ElGamal if I reuse the same randomness to get the same point $R$ for different messages, how can it breach its security ? Can you please illustrate with an example?    Thankyou everyone in advance!


What is the music on S3E16 when Todoroki was fighting group of ninjas?

What is the music on season 3 episode 16 of My Hero Academia around 20:07 when Todoroki was fighting a group of ninjas?


Where can I download the latest Apache, MySQL and PHP offline installers (maybe .deb)? (both x64 and x86, if available)  I'm currently on Windows, and can't switch to Ubuntu and use apt-get download (or something like this).  Thanks.


Location of packages installed by apt-get and more

A very basic question.   Whether all packages installed by apt-get install reside in the same folder? If yes, where?  If no, how to find the location?  I am in the case of installing matplotlib Basemap and it requires me to know where libgeos_c or geos_c.h file are located. I installed libgeos-3.4.2 using apt-get install and had no idea to find those files. Further question, what is whichcommand doing? I did which libgeos and it didn't output, while doing which python gave /usr/bin/python


Since I have osxfuse installed it would be nice if I could use it. There are a  (heavily) outdated  here, saying that it is not . Is this still the case?


Don't fail audit right away when improving a suggested edit

I was testing something out with suggested edits so I went into the review queue and picked the first edit. After reading it, I planned on rejecting it because it seemed to drastically change the post. But in my experiment I wanted to click on "Improve"...so I did. Of course it turned out to be an audit! So I failed for clicking "Improve" instead of "Reject", which I ultimately planned on doing after cancelling out of it because I really didn't plan on improving it.  This isn't a huge deal because I don't think I fail too many audits. So my question is, should you not actually fail when clicking "Improve" until you click to save the edit. That way, there is still the chance to cancel out of it and skip or reject? This might be minor and not worth the trouble but I thought it was interesting that I came across it. I don't expect this happens too often but it seems like an easy change.  Edit  Now I just experienced an audit where I rejected the edit but still had to say why before it said I passed. This still seems minor but inconsistent with my last audit experience. If it is going to fail for clicking "Improve" but not allowing the action to be finished (by cancelling which should result in a pass or by submitting the improvement) then shouldn't it also pass as soon as the reject button is clicked?


Hey how can I do sth like this in Lyx? I think about these big brackets which are in different lines


If $y =\sqrt{5+\sqrt{5-\sqrt{5+ \cdots}}}$, what is the value of $y^2-y$?

If $$y =\sqrt{5+\sqrt{5-\sqrt{5 + \cdots}}},$$  what is the value of $y^2-y$ ?  I am unable to get the clue due to these alternative signs of plus and minus please help on this thanks...


In the annual rep league, why isn't the difference between rep earned this year and total rep always the same?

In the  here on Meta Stack Exchange, it shows that I've earned 9,876 rep this year, and 10,359 rep overall. (It's updated every day at 0:00 UTC, and I so far have earned 1 rep today, since an answer I downvoted a while ago was deleted.)  The difference between my total rep and the rep I earned this year is 483, which means 483 of the rep I've earned is rep I earned in 2017 or earlier. This amount normally never changes, though I can see some reasons why it might change, such as if rep is recalculated and something affects a rep event occurring in a previous year (e.g. a vote from last year was invalidated due to user deletion, a post I made at that time was deleted or undeleted, etc.)  This amount, 483, was a recent change; it used to be 461. Ordinarily, I'd chalk this up to a rep event from last year being recalculated, but I've gone through my full rep history and I can see nothing of the sort happening. On the other hand, on the same day that this number changed from 461 to 483,  was undeleted, recalculating my rep and giving me back 22 (which happens to equal 483-461). It therefore makes sense if that post was from a previous year. However, the post is from this year, so it doesn't make very much sense.  Is there a bug in the way yearly rep in the rep league is calculated, in that rep regained from an undeleted post made the same year is not re-added to the rep earned this year (while it is subtracted properly upon deletion)? Or is there some other event that occurred in the three weeks before 2018 that I had my account that caused this difference to change, that I'm not seeing, and the change being equal to that is just a coincidence?


It's a chip with an H on it next to a little guy in a circle.


How to install Ubuntu on a laptop that has fedora

I simply want to get rid of the latest version of Fedora that is currently on my laptop and install Ubuntu instead. Can someone please tell me how? I followed the "get ubuntu" links on the site but it doesn't seem to work.


is there a way to write everything, even math symbols, in normal font? I know you can write text in \text{Normal font}, but I dont know how to do the same with math symbols.  \documentclass{article} \usepackage{amsmath}         \usepackage{amssymb}  \begin{document} $\text{Give me normal font}\, and \,not \,this\, one\, please\,  x \in \mathbb{Z}$ \end{document}


Catch invalid email address in a text file

My requirement:  I have a 20GB txt file which is tab-delimited.I want to use PERL/AWK(or grep) to see if the email address in the 'nth column' is valid one or not.(Regex --->/^(\w|-|_|.)+\@((\w|-|_)+.)+[a-zA-Z]{2,}$/  should be ok, but no consecutuve '..' OR'underscores'  eg: abc..cd@xyz.com should be invalid, also abc__cd@xyz.com should be invalid as well).If the email address is valid redirect it to valid_email.txt if invalid redirect it to invalid_email.txt.The emphasis is to catch all invalid email address - with better performance- as the file size will grow further at a future date.  Edit/Update:  Does the below piece of code do - which can catch atleast 99% of invalid email address formats?OR does it need any further modification? Kindly feel free to post your opinons and suggestions.  To pull out Valid Email ID  grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+.[A-Za-z]{2,6}\b" Raw_file.txt >Valid_Email_List.txt   (where Rawfile.txt contains only email addresses)


How to power a button's LED within a guitar?

I'm working on a guitar, and the plan is to use three latching push buttons so that each pickup can be turned on and off individually. I'm fairly confident that the following diagram should work for that (Feel free to correct me)   The buttons I want to use are , which have a built-in LED when turns on when the button is pressed.   Which brings me to my question: Is there a way to power the LED? If I introduce a 9volt into the wiring, wouldn't that cause problems with the guitar's standard electronics?


How do I work with GUI tools over a remote server?

I have an Ubuntu server running on EC2 (which I didn't install myself, just picked up an AMI). So far I'm using putty to work with it, but I am wondering how to work on it with GUI tools (I'm not familiar with Linux UI tools, but I want to learn). Silly me, I'm missing the convenience of Windows Explorer.  I currently have only Windows at home. How do I set up GUI tools to work with a remote server? Should I even do this, or should I stick to the command line? Do the answers change if I have a local linux machine to play with?


Does the Ancestral Guardian barbarian's Ancestral Protectors feature grant resistance against spells such as fireball and toll the dead?

The 's Ancestral Protectors feature (XGtE, p. 10) says:     While you’re raging, the first creature you hit with an attack on your turn becomes the target of the warriors, which hinder its attacks. Until the start of your next turn, [...] when the target hits a creature other than you with an attack, that creature has resistance to the damage dealt by the attack.   Let's say the barbarian hits a wizard, and after the wizard casts a  into the party (or even a  on an individual besides the barbarian).   Do the party members get resistance to the damage? Or because it specifies "attack", and a fireball (and toll the dead) is not described as an attack, do they take full damage?


Combinatorics Inclusion - Exclusion Principle

Find the number of integer solutions to $x_1 + x_2 + x_3 + x_4 = 25$ with $ 1 \leq x_1 \leq  6, 2 \leq x_2 \leq 8, 0 \leq x_3 \leq 8, 5 \leq x_4 \leq 9.$  Firstly, I defined $y_i = x_i - lower bound$ so for example $y_1 = x_1 - 1$ This gives $y_1 + y_2 + y_3 + y_4 = 17$ with $$0 \leq y_1 \leq 5, 0 \leq y_2 \leq 6, 0 \leq y_3 \leq 8, 0 \leq y_4 \leq 4$$ Next I applied Inclusion-Exclusion Principle;  Total number of ways = $17+3 \choose 3$  Number of ways with just $y_i$ breaking upper bound;  $y_1;$$11+3 \choose 3$  $y_2;$ $10+3 \choose 3$  $y_3;$ $8+3 \choose 3$  $y_4;$ $12+3 \choose 3$  Similarly I calculated the number of ways with $y_i$ and $y_j$ breaking upper bound at the same time. And since there is no way in which 3 of them break their upper bounds simultaneously I was left with ;  $${20 \choose 3} - {14 \choose 3} - {13 \choose 3} - {11 \choose 3} - {15 \choose 3} + {7\choose 3} + {5 \choose 3} + { 9 \choose 3} + {4 \choose 3} + {8 \choose 3} + {6 \choose 3} $$  as my final answer.  Is this solution correct and is there a nicer way of solving it/ any insights about this type of problem?  Note, this problem is from 'An Introduction to Combinatorics and Graph Theory'


I am running Ubuntu 13.10 32bit. Since a couple of days Skype doesn't work anymore: "Skype can't connect". It is Skype version 4.2. I know there have been other posts regarding this problem.  it is suggested to update to Skype 4.3 using the software center. I tried this but as far as I can see it the Skype version on the software center is still 4.2. I tried ot anyway, that is, I first uninstalled then reinstalled Skype via the siftware center. But as expected it is still version 4.2. And there it still does not work. Also I checked  site ... but they do not have a version for Ubuntu 13.10. For some reasons I would not like to update Ubuntu to V 14.04 at this point so I would be happy if someone came up with a solution how to fix this problem on Ubuntu 13.10.


For protected questions, require local reputation to comment

Questions are occasionally protected when they start attracting unwanted input -- because the question was on the Hot Network Questions list, because it hit Reddit, because it's about a hot-button topic that everybody wants to weigh in on... Protection allows a community to prevent some stuff that they would otherwise have to clean up later on a small number of volatile questions.  Currently you need 10 reputation earned on the local site to answer a protected question.  This proposal is to broaden the restriction to include comments.  Currently, anybody with 50 reputation can comment, so people with the association bonus but no local reputation can't answer but can comment.  That's kind of backwards; answers are first-class citizens, the stuff we want, and comments are meant to be disposable.  So if people in this group can't even answer, it's counter-intuitive that they should be able to comment.  This restriction should apply to comments on the question itself and on answers.  Further, questions that have gotten the kind of attention that leads to protection tend to attract more comments, sometimes .  For all practical purposes only moderators can remove comments or relocate them to chat; the community doesn't have the tools to do this effectively.  Note that this dovetails nicely with the general encouragement to take comment discussions to chat -- users with an association bonus can use chat, so this is a little more incentive to go there to discuss the question.  Perhaps the protection notice could even include a link to the site's main chat room.  Participants aren't turned away but redirected.  Most questions are not protected; people can participate normally on the vast majority of the questions on a site.  Protection is an exception, but when it's needed, there's usually a lot of action -- and in my experience on several sites, comments tend to be part of the problem.  The number of valuable comments that would be lost -- that is, requests for clarification or suggested improvements that nobody in the local community can offer -- seems small.  The number of...other...types of comments is much higher.


Geometric interpretation of $\det(A^T) = \det(A)$

$$\det(A^T) = \det(A)$$ Using the geometric definition of the determinant as the area spanned by the columns, could someone give a geometric interpretation of the property?


I am aware that we alway treat the police as singular when we refer to it as social instutution. But what about if are refering to police as a group of people who are policemen? For example:     There is/are a lot of police around the crime.


Overriding page and browser title for a view in my module

I've tried to set $variable['title'] in MYMODULE_preprocess_page_title and it works only for the page title but not the browser title (in the title bar).


How to add modifiers using python script and set parameters?

I've found some code that could add a modifier but none can set parameters like Octree.


I want to make a bash script which add language in System after re-install  I don't want to use GUI (I know how to do it)  May be anybody now how to do it by command-line ?  P.S. Might I didn't say clearly  I don't want to change locale, I want to add language in keyboard. So after that I can change print language. In the end I need to have opportunity to switch between languages (for example Eng, Rus...)


Why is my g++ Makefile resulting in a Undefined Reference error?

In the example code below, I've written a program that uses two different header files which contain class templates: main.cpp #include <string> #include "data.h" #include "struct.h" using namespace std;  int main() {     Data<string> x;     x.setValue("****");     Thing<Data<string>> f;     f.i = x;     f.print();     return 0; }  data.h #pragma once  template <typename T> class Data { private:     T passwd;  public:     void setValue(T d);     T getValue(); };  data.cpp #include "data.h"  template <typename T> void Data<T>::setValue(T d) { passwd = d; }  template <typename T> T Data<T>::getValue() { return passwd; }  struct.h #pragma once  template <typename D> struct Thing {     D i;     void print(); };  struct.cpp #include <iostream> #include "struct.h"  template <typename D> void Thing<D>::print() {     std::cout << i.getValue() << std::endl; }  When I use Makefile below to compile my program, I end up with a "undefined reference to ..." error when the linking task is called: CXX = g++ CXXFLAGS = --std=c++11 -pedantic -g  build: main.o struct.o data.o     $(CXX) $(CXXFLAGS) main.o struct.o data.o -o program  main.o: main.cpp     $(CXX) $(CXXFLAGS) -c main.cpp  struct.o: struct.cpp     $(CXX) $(CXXFLAGS) -c struct.cpp  data.o: data.cpp     $(CXX) $(CXXFLAGS) -c data.cpp   Error text: g++ --std=c++11 -pedantic -g main.o struct.o data.o -o program  /usr/bin/ld: main.o: in function `main':  /mnt/c/Users/denni/Downloads/coursework/cps272/stackoverflow/main.cpp:8:  undefined reference to `Data<std::__cxx11::basic_string<char,  std::char_traits<char>, std::allocator<char> >  >::setValue(std::__cxx11::basic_string<char, std::char_traits<char>,  std::allocator<char> >)'  /usr/bin/ld: /mnt/c/Users/denni/Downloads/coursework/cps272/stackoverflow /main.cpp:12: undefined reference to  `Thing<Data<std::__cxx11::basic_string<char, std::char_traits<char>,  std::allocator<char> > > >::print()'  collect2: error: ld returned 1 exit status  make: *** [Makefile:5: build] Error 1    on makefiles references using colons in the g++ -c lines, but I can't make much sense out of it. Any help would be appreciated!


A story (novel?) about a planet where life evolves to be specifically harmful to humans

This is another story that I remember from long ago - probably 30 years, or at more than 20. I only remember a few details:  Humans are trying to colonise a planet They live in a strongly fortified compund The local wildlife is very dangerous, and seems to actively evolve to become more dangerous to humans In the end one person discovers that the animals are telepathic; they sense the humans' fear as hostility and evolve in response to become more hostile.  I would love to find it again. Any guesses?


So what I'm looking for is a javascript framework I can use that has several UI controls. I have taken a look at  but those controls are very basic compared to ExtJS. Are there any other competitive alternatives?     This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. More info: .


I am looking for a very fast way to filter down a collection in C#.  I am currently using generic List<object> collections, but am open to using other structures if they perform better.  Currently, I am just creating a new List<object> and looping thru the original list.  If the filtering criteria matches, I put a copy into the new list.  Is there a better way to do this?  Is there a way to filter in place so there is no temporary list required?


Simple Hadamard Circuit gives incorrect results?

I am running the simplest Hadamard circuit possible - one qubit, initialised to 0, apply H gate, measure in Z basis. When I run the circuit on the simulator I obtain the expected result (50% in 0, 50% in 1) but the "measurement probability" and "state vector" from the IBM Circuit Composer indicate I am in the state $|0\rangle$, with 100% probability to measure 0. Am I understanding this visualisation wrong? Why don't I see the 50%/50% measurement probabilities and the state vector to be $(\frac{1}{\sqrt{2}})(|0\rangle + |1\rangle)$?


#Java Help. Creating a simple chatbot that enables user to create their own questions and answers

I am tasked to create a simple chatbot that enables a user to create questions and answers, which will then be stored into two arrays. Hence, whenever the user input the same question, the chatbot will be able to print out the answer.  For example, My intended run is:  Bot: 1st question that you want to create. User: What is my name? Bot: and the response is? user: Tom Bot: 2nd question that you want to create. user: How tall am I? Bot: and the response is? You: 179cm You: How tall am I? Bot: 179cm You: What is my name? Bot: Tom  Below is my source code:  public static void main(String[] args) {         String reply = "";        String[] storeQuestions = new String [100];        String[] storeAnswers = new String [100];         do {              /* first question*/             System.out.println("Bot: 1st question that you want to create.");             Scanner input = new Scanner (System.in);             System.out.print("You: ");             String createQuestion = input.nextLine(); // change to string             System.out.println("Bot: and the response is?");             System.out.print("You: ");             String answer = input.nextLine();              /* storing question and answer into the two arrays */             storeQuestions[0] = createQuestion;             storeAnswers[0] = answer;              /* second question */             System.out.println("Bot: 2nd question that you want to create.");             System.out.print("You: ");             createQuestion = input.nextLine();             System.out.println("Bot: and the response is?");             System.out.print("You: ");             answer = input.nextLine();              storeQuestions[1]= createQuestion;             storeAnswers[1] = answer;             System.out.print("You: ");             reply = input.nextLine();              if(storeQuestions[0]==createQuestion) {                 System.out.println("Bot: "+storeAnswers[0]);             }             else if ( storeQuestions[1]==createQuestion) {                 System.out.println("Bot: "+storeAnswers[1]);             }         }while(reply!="bye");                }       }


Apache: Scammers point dozens of domain names at my dedicated IP. How to prevent this?

For the sake of discussion, pretend that I have an Apache webserver which serves a website at www.example.org. This domain name resolves to the public IP address at 192.168.1.100 (pretend this is a public IP).  The discussion at  demonstrates that anyone can point their domain at my IP. Apache won't prevent this by default, but an administrator can deal with these one at a time through use of a blacklist.  However, it's becoming more common for scammers to register dozens of domains (or more) for use in a scam. I'm concerned about the following possible attack:   A scammer registers hundreds of domain names, and points them at my dedicated IP address. The scammer directs search engines at their scam domains, thus using my content to increase their standing in the search engines. Later, the scammer moves their domain names to point to their own servers which host a scam/porn, or a competing business, etc. thereby reaping the benefits of their standing in the search engines. Some of these domains might be used to in  as well. Profit!!   I believe I have seen scammers using this trick in the past, involving dozens of domains. We didn't realize the scam implications at the time, and assumed these were misconfigured domains.  Is there a term for this nefarious SEO trick? SEO masquerading? DNS Diversion?  How could I prevent this using Apache? I'm considering a "whitelist" fix based on using a default VirtualHosts, ServerNames & ServerAliases so that Apache only responds to requests where these white-listed ServerNames appear in the "Host: " header. Everything else would be rejected (or redirected to a particular page). However, I am unsure if this is the best approach.  For example, I've configured the domain  to point at the IP for Serverfault.com. You can see the results here:  .


Let $f:\mathbb{R}^m\rightarrow\mathbb{R}^n$ be a continuous map. Show that if $A$ is a Borel subset of $\mathbb{R}^n$, then $f^{-1}(A)$ is a Borel subset of $\mathbb{R}^m$.   I know that for $A$ open subset of $\mathbb{R}^n$, then $f^{-1}(A)$ is open. Likewise for closed. A Borel subset is a countable unions/intersections of these sets, done repeatedly. From those facts, combined with $f^{-1}(A\cup B)=f^{-1}(A)\cup f^{-1}(B)$ and $f^{-1}(A\cap B)=f^{-1}(A)\cap f^{-1}(B)$, the statement should be intuitively true.  But to do it rigorously, I want to write $A$ as open and closed sets. But since the countable union/intersection can be done repeatedly, I don't know how I can write it that way.


Let's view flags by type and how they were handled

On my flagging history page, I'm told that I have X moderator attention flags, of which Y were marked helpful, Z were disputed, and W were declined, and the same for spam, offensive, and comment flags.  My  is to allow viewing of flags by type and how they were handled, similar to how the activity or votes tab of the user profile page can be broken down into sections.  I think this is a good idea, because if people can review their flags easily, users whose flags are declined often will find it easier to figure out why they were declined, so that they can learn from the experience.


Maximum formula: $\max\{x,y\}=\frac{1}{2} \left(x+y+|x-y|\right)$

Show that: $$ \max\{x,y\}=\frac{1}{2} \left(x+y+|x-y|\right)  $$  I have no idea how to prove this; most likely it is trivial.


How to design the attack class in an RPG game?

I am in the planning phase of a small RPG style game.   The character will have have a set of attributes, like strength, agility, etc which are represented as integers. The character also will have a set of attacks represented as an attack class.  On each attack I want it to do damage based on the characters attributes, eg: the attack "sword slash" will do 10 dmg + the value of the characters strength.   The way I was thinking to do this is to have an abstract attack class, which has an abstract Attack method, and for each attack I create one class that implements the Attack method.  public class SwordSlash:Attack {     public void Attack(Character attacker, Character defender)     {         defender.DoDamage(10 + attacker.Strength);     } }   I see that this will make it a nightmare to maintain.   Does anyone have an idea of how I can accomplish this in a nicer way?  What I think is the main problem is how to input the correct attribute, based on the attack.


I have an array of 50 chars:  char arr[50];   I'm told that in arr[1] till arr[4], there is an int I need to get.  I did :  int *p = (int *)(arr+1);  return *p;   I was told it's a mistake. Why?


I am trying to make a 1km square grid using QGIS 2.18.26.   I am using EPSG:4326. I need it to be exactly 1km square because that's how the variable data has been collected.   I am struggling to get the grid to be exactly 1km square, I have attempted using Vector Create Grid, and MMQGIS create grid layer, but I am unsure how to set the grid units to 1km square.


Is it a bad idea to always standardize all features by default?

Is there a reason not to standardize all features by default? I realize it may not be necessary for e.g., decision trees but for certain algorithms such as KNN, SVM and K-Means. Would there be any harm just routinely to do this for all of my features? Also, it seems the consensus that standardization is preferable to normalization? When would this not be a good idea?


What do negative times and negative displacements represent in parametric projectile equations?

There are negative times and negative $x$ and $y$ displacement in parametric equations; what do they represent? And is it possible to tell the object's velocity, direction and acceleration from just a parametric equation?


Is there a way to change where I beam down to?

On Starbound, when ever you beam down to a planet, it drops you in the same spot each time. Is there a way to edit where it drops you (no mods preferably)?   I am exploring planets to find a good place to live, and it would be nice to be able to pick a place to build, instead of having to build relativly close to the spawn/teleport of the planet.


Why does the curl of a function provide this particular amount of information?

In a classical electrodynamics textbook (Griffiths), it is mentioned that even though the electric field function, $E:\mathbb{R}^{3}\rightarrow \mathbb{R}^{3}$, is a (3D) vector valued function, the amount of information needed to fully describe it is equivalent to the amount needed to describe a scalar valued function, and this is because it is the gradient of an electric potential function, $U:\mathbb{R}^{3}\rightarrow \mathbb{R}$ and so is completely determined by it. The author goes on to explains that this is so because $E$ has the property that its curl is zero evevrywhere, and this is what restricts the freedom in determining $E$ (and what enables it to be the gradient of a scalar function in the first place).     This is all fine (and fun), but I find myself unable to answer this question: why does the imposition of zero curl provide an amount of information exactly equivalent to two scalar-valued functions (no more, no less)?   An example of the sort of reasoning that leads me to other conclusions: since zero curl is equivalent to equating three pairs of partial derivatives ($\partial E_{x}/\partial y = \partial E_{y}/\partial x$ and so on), leaving 6 out of 9 partial derivatives "free", it seems that "one third of the amount of information" required to describe $E$ has been taken up, as opposed "two thirds"... I am of course assuming here that the first order partial derivatives determine the behavior of the function (perhaps up to a constant as in the 1D case?), and that these partial derivatives are independent of each other and thus provide equal amounts of information. Is either of these assumptions wrong? Is my whole reasoning off?  Any insight into this question and a possible answer would be appreciated.  *The question is, of course, a general one about vector-valued functions, with $E$ just being a particular case.  **I have not mentioned all the obvious assumption of smoothness necessary for everything to be defined..  ***I realise that I'm playing fast-and-loose with the word "information", and that my whole question is very un-formal. Any reference to an area of mathematics which may perhaps put such intuitions on rigorous footing are more then welcome.   Edit: I am not asking why (or when) a vector field having zero curl is equivalent to it being a gradient of some scalar field. I am asking about the amount of information we get about a vector field when we determine its curl.


If $I$ is not finitely generated and every ideal properly containing $I$ is finitely generated, then $I$ is prime?

If $I$ is an ideal in a ring $R$ such that $I$ is not finitely generated and every ideal properly containing $I$ is finitely generated, then $I$ is prime.   Let $I$ be a non-finitely generated ideal and let $a,b\in{R}$ such that $a,b\notin{I}$. Then $a\in{I'}$ such that $I'$ is finitely generated and $I'$ properly contains $I$; $b\in{I''}$ such that $I''$ is finitely generated and $I''$ properly contains $I$. I am having difficulties in showing that $ab\notin{I}$.   Would you help me, please? Thank you in advance.


After booting into Ubuntu this shows up     /dev/sda1 contains a file system with errors, check forced. Inodes that were part of a corrupted orphan linked list found.  /dev/sda1: UNEXPECTED INCONSISTENCY: RUN fsck MANUALLY.          (i.e., without -a or -p options) fsck exited with status code 4 The root filesystem on /dev/sda1 requires a manual fsck  BusyBox v1.22.1 (Ubuntu 1:1.22.0-19ubuntuu2) built-in shell (ash) Enter 'help' for a list of built-in commands.  (initramfs)_   What should I do?


Conditional using a string in Java after using Scanner

It always give the second conditional regardless of the input. Is (userName == "Charles") the correct way of doing this conditional? or do i need something else.  import java.util.Scanner; public class Name_input {        public static void main(String[] args) {            Scanner input = new Scanner(System.in);              String userName = input.next();             System.out.println(userName);              if (userName == "Charles")             {                 System.out.println("Correct Name");             }                    else if (userName != "Charles")             {                 System.out.println("Incorrect Name");             }              }  }


Many times I have come across javascript script includes some of them are placed in the head portion and some are placed at the end of the body. And in some cases of jQuery I have seen the same. Can anyone tell me what is the difference and significant between putting scripts in the head or at the end of the body?


JS Regex split string with recurring pattern

I have a module that uploads a PDF file then extracts the data(table format) from the file. I'm following this article  After extracting the data I'm left with this  1 296*** Theory ABSENT 2020-12-16 2 294*** Theory ABSENT 2020-12-16 3 286*** Theory ABSENT 2020-12-16  I'm trying to split this so that I can get 3 items. I'm using this regex pattern  /((?=[0-9]{1})(.*)(?<=[0-9]{4}-[0-9]{2}-[0-9]{2}))/g  But it doesn't work properly. It gives back the whole text.   const TEXT = "1 296*** Theory ABSENT 2020-12-16 2 294*** Theory ABSENT 2020-12-16 3 286*** Theory ABSENT 2020-12-16";  const REGEX = /((?=[0-9]{1})(.*)(?<=[0-9]{4}-[0-9]{2}-[0-9]{2}))/g;  console.log(TEXT.split(REGEX));    The result I was expecting is this ["1 296*** Theory ABSENT 2020-12-16", "2 294*** Theory ABSENT 2020-12-16", "3 286*** Theory ABSENT 2020-12-16"]


Making mirrored object a real object with mesh

This is something I've been looking for for a very long time and found no answers to: how do I make the mirrored side of an object a "real" object with selectable mesh?  If I apply the mirror modifier to an object how can I separate the two halves so that they become two separate objects that can be edited independently?


How do I install openlierox on Ubuntu 16.04?

I downloaded the deb package from  , and tried to install it using this command:  sudo dpkg -i openlierox_0.58.rc3_amd64.deb    but it didn't meet all requirements:  dpkg: dependency problems prevent configuration of openlierox:  openlierox depends on libgd2-xpm (>= 2.0.33); however:   Package libgd2-xpm is not installed.  openlierox depends on libgd2-xpm (>= 2.0.33) | libgd2-noxpm (>= 2.0.33);  however:   Package libgd2-xpm is not installed.   Package libgd2-noxpm is not installed.   I installed package libgd-dev as I thought it would solve the problem, which it didn't, so I tried ignoring it and install it by using this command:  sudo dpkg --ignore-depends=libgd2-xpm -i openlierox_0.58.rc3_amd64.deb    But there is problem when I try to run it, as I get this error:  openlierox: error while loading shared libraries: libgd.so.2: cannot open shared object file: No such file or directory   I think it should be easy to fix by installing the libgd2-xpm package, but I didn't find it in a repository. What should I do, how do I properly install it?


Do companies have IT "spyware" on corporate iPhones?

I have an iPhone through my company. From my understanding, Apple does not allow any software onto their i* devices that does not come from the app store. I got into a discussion with a coworker about how IT can track the phone. Is there any keyboard loggers, or other spyware that could be installed which would allow a company to track employees actions outside of the traditional email client?  I know text messages show up on a monthly bill through the carrier. If texting through Google voice, I'm assuming that would be unreadable, since it is a third party app and uses a data connection?


Creating cloud feature after applying Landsat8 Cloud Masking

There is a script in GEE to mask cloud:  // This example demonstrates the use of the pixel QA band to mask // clouds in surface reflectance (SR) data.  It is suitable // for use with any of the Landsat SR datasets.  // Load Landsat 8 surface reflectance data var l8sr = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR');  // Function to cloud mask from the Fmask band of Landsat 8 SR data. function maskL8sr(image) {   // Bits 3 and 5 are cloud shadow and cloud, respectively.   var cloudShadowBitMask = ee.Number(2).pow(3).int();   var cloudsBitMask = ee.Number(2).pow(5).int();    // Get the pixel QA band.   var qa = image.select('pixel_qa');    // Both flags should be set to zero, indicating clear conditions.   var mask = qa.bitwiseAnd(cloudShadowBitMask).eq(0)       .and(qa.bitwiseAnd(cloudsBitMask).eq(0));    // Return the masked image, scaled to [0, 1].   return image.updateMask(mask).divide(10000); }  // Map the function over one year of data and take the median. var composite = l8sr.filterDate('2016-01-01', '2016-12-31')                     .map(maskL8sr)                     .median();  // Display the results. Map.addLayer(composite, {bands: ['B4', 'B3', 'B2'], min: 0, max: 0.2});   After applying it, the cloud and shadow cloud pixels are labeled as "masked". I want to create a feature class from the result of the script. In fact, I need to extract the masked pixels and make them as features.


I keep hearing that universe expands. Since all is relative, the expansion must be relative to something. And since universe is all there is ... You got my point.  The only points of reference are inside the universe itself. Bonds forming, their length measured in wavelengths, etc. Red shifting of light tells us things fly away. So our point of reference is only light. (am I missing something?)  Here is my question. In a thought experiment, would it be valid to say that properties of light are somehow changing around us if we keep the size of the universe constant? If yes, what are the consequences of this line of thought? Would it give us any additional insight into what's going on?


Reduce vertical padding of itemize inside tabular

I am using this code to create itemize within a tabular environment. \documentclass[12pt]{extarticle}  \usepackage{geometry} \usepackage{array}  \begin{document}  \begin{table}     \centering     \setlength{\leftmargini}{0.4cm}     \begin{tabular}{| m{2cm} | m{4cm} | m{4cm} | m{4cm} |}         \hline         Verticals & Drivers & Enablers & 5G requirement \\         \hline         Education &          \begin{itemize}              \item Remote delivery              \item Immersive experiences          \end{itemize} &          \begin{itemize}              \item Video streaming              \item Augmented reality              \item Virtual reality          \end{itemize} &          \begin{itemize}              \item Large bandwidth              \item Low latency          \end{itemize} \\         \hline     \end{tabular} \end{table}  \end{document}  Which results in this  As you can see, it has a large amount of vertical space just before the list starts and after it ends. How can I get a tighter vertical layout?


Statement: For every integer n, if n is greater than or equal to m, then n^5 - 1 is composite. What is the smallest possible integer m > 1 to satisfy this statement?


is something wrong with my stringtokenizer generated array?

I'm trying to make a simple Piano sheet compiler/player, where the user feeds the program a string of piano code ex "G E F D D G...etc", which is then broken by the stringtokenizer method and stored individually in a String array called code. I've built a sheetPlayer method, which reads the array and based on multiple if statements would generate different sounds. everything seems ok but when I run the program no sound is played? and I accidentally found that if I was to directly initialize the code array ie code={"G","F"} the sound plays just find and im wondering if it's the stringtokenizer that is causing the problem?   public class PianoCompiler {  //public static Scanner reader=new Scanner(System.in); //using input user should be able to feed the program sheet code ex"G G D E" with space in between //and it should be store into sheetCode String public static String sheetCode="G E G G E G A G F E D E F "; //code Array should be able to read sheetCode String and break and store it into single letter components public static String[] code=sheetCode.split(" ");  public static void sheetPlayer() {     for(String key:code)     {         if(key=="G"){             try             {                 String gongFile = "/Users/Raed/Music/PianoSounds/g.wav";                 InputStream in = new FileInputStream(gongFile);                 AudioStream audioStream = new AudioStream(in);                 AudioPlayer.player.start(audioStream);             } catch(Exception e ){              }          }         if(key=="F"){             try             {                 String gongFile = "/Users/Raed/Music/PianoSounds/f.wav";                 InputStream in = new FileInputStream(gongFile);                 AudioStream audioStream = new AudioStream(in);                 AudioPlayer.player.start(audioStream);             } catch(Exception e ){              }          }          if(key=="E"){             try             {                 String gongFile = "/Users/Raed/Music/PianoSounds/e.wav";                 InputStream in = new FileInputStream(gongFile);                 AudioStream audioStream = new AudioStream(in);                 AudioPlayer.player.start(audioStream);             } catch(Exception e ){              }          }          if(key=="D"){             try             {                 String gongFile = "/Users/Raed/Music/PianoSounds/d.wav";                 InputStream in = new FileInputStream(gongFile);                 AudioStream audioStream = new AudioStream(in);                 AudioPlayer.player.start(audioStream);             } catch(Exception e ){              }          }           if(key=="C"){             try             {                 String gongFile = "/Users/Raed/Music/PianoSounds/c.wav";                 InputStream in = new FileInputStream(gongFile);                 AudioStream audioStream = new AudioStream(in);                 AudioPlayer.player.start(audioStream);             } catch(Exception e ){              }          }         if(key=="B"){             try             {                 String gongFile = "/Users/Raed/Music/PianoSounds/b.wav";                 InputStream in = new FileInputStream(gongFile);                 AudioStream audioStream = new AudioStream(in);                 AudioPlayer.player.start(audioStream);             } catch(Exception e ){              }          }          if(key=="A"){             try             {                 String gongFile = "/Users/Raed/Music/PianoSounds/a.wav";                 InputStream in = new FileInputStream(gongFile);                 AudioStream audioStream = new AudioStream(in);                 AudioPlayer.player.start(audioStream);             } catch(Exception e ){              }          }          try {             Thread.sleep(3000);                 //1000 milliseconds is one second.         } catch (InterruptedException ex) {             Thread.currentThread().interrupt();         }      } }


how do i make partitions in ubuntu for data storing?

I am a beginner and I want to install only Ubuntu 17.04 on my Laptop and I want to partition my 1 TB hard drive for different data storage.


Why is length contracted but time is dilated?

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?


Recently while using my laptop (Dell XPZ15z) all of a sudden the CPU usage is spiking to 80-100% then will drop in say 5-7 sec. I am not running any application or process that requires such CPU usage.  I am doing a lot of online gaming, while playing the same thing happens but the additional things happening are that the ping becomes 1500+ all of a sudden from 90-130 and then its showing network connection problem. Then I regain connection again in 5-7 sec. But now i noticed its the same time while my CPU usage is going above 80%.  Another incident that occurred is that while I was watching an YouTube video, all of sudden the video began to hang even though it was buffered earlier. Then the video stopped further playing and I saw that the CPU usage was way beyond 80 nearly 100%.  I increased the virtual page memory to almost 10 GB in all the drives. But it seems to have no effect as the problem continues. I have up to date anti-virus (Avast) and I scanned the whole system but no virus also have been found.  My system configuration is as follows:    Intel Core i7-2640M 2.80GHz  8Gb DDR2(4*2)  750Gb HDD  Nvidia 525M graphics card


Fade colour as function of angle in tikz

I'm trying to create a tikz picture along the lines of    only with the blue colour fading out as it gets to the edge of the blue strip. Ideally, the blue bar should be fully blue in the middle (at the point (-1,0) to be precise), and white at the outer edges (the points (0,1) and (0,-1)).  The picture above was created as follows.  \documentclass{article} \usepackage{tikz,xcolor}  \begin{document} \begin{tikzpicture}     \draw[line width=0.25cm, blue]  (90:1)  arc [start angle=90, end angle=270, radius=1];     \draw[thick]                    (0,0)   circle [radius=1]; \end{tikzpicture} \end{document}


Understanding relation between Quotient Space and $S^1$

There is this example at the Wikipedia article on Quotient spaces (QS):     Consider the set $X = \mathbb{R}$ of all real numbers with the ordinary topology, and write $x \sim y$ if and only if $x−y$ is an integer. Then the quotient space $X/\sim$ is homeomorphic to the unit circle $S^1$ via the homeomorphism which sends the equivalence class of $x$ to $\exp(2πix)$.   I understand relations, equivalence relation and equivalence class but quotient space is still too abstract for me. This seems like a simple enough example to begin with.  I understand (sort of) the definition but I can't visualize. And by this example and others, there is a lot of visualizing going on here! torus, circles etc.


How google check the apps submitted for publication in playstore?

I knew playstore authority ( None other than google)  take some time to analyze the app and then gives permission.Am I right? What do they do to analyze the app? and how they check all assets( image or audio or video) are used without infringing copyright ?


How to do GIF animations for instructions and learning purposes over GUI?

I am trying to categorize many similar threads here.  For example, I find this GIF animation freaking cool in this answer . How can I do this kind of animations? How can I make sure it does not consume too much CPU with less CPU-intensive computers? How can I do professional screencast?


I am using R and i need to do an Anderson-Darling test on my data. I am using the adk package (  ). How do I calculate the critical value for a given significance level? Let's say I want a significance of 0.01, what should I do? In the package, there is a method called adk.pval which has to be used and the following is taken from the help:    Usage  adk.pval(tx,m) Arguments  tx threshold for which the right tail probability of the standardized Anderson-Darling statistics T_m is to be calculated  m index of the standardized T_m statistic (see reference)  Details  This function first interpolates the upper T_m quantiles as given in Table 1 (see reference below) to the given value of m by fitting a quadratic in 1/sqrt(m) to the quantiles as tabulated for the upper quantile levels .25, .10, .05, .025, .01.  Next a quadratic in the interpolated quantiles (for m) is fitted to the log-odds of the upper probability levels defining these quantiles and the fitted log-odds value at tx is converted back to the calculated upper probability value, i.e., the p-value. p-values outside the tabulated range [.01,.25] are obtained by linear extrapolation of the fitted quadratic.    I have to use this package, so help is appreciated, thank you!


Let $f(x)$ be differentiable over $[0,+\infty)$ and satisfy $f(0)=0$.   If there exists a constant $c>0$ such that $|f'(x)|\leq c|f(x)|$ holds   for every $x \in [0,+\infty)$, prove $f(x)\equiv 0.$   This is a version of Bellman-Gronwall inequality.


I am so fresh to Ubuntu and Linux , during my installation of Joomla, I found the following error

rida@rPC:/var/www/html$ wget https://github.com/joomla/joomla-cms/releases/download/3.4.3/Joomla_3.4.3-Stable-Full_Package.zip   Output is :   Joomla_3.4.3-Stable-Full_Package.zip: Permission denied  Cannot write to ‘Joomla_3.4.3-Stable-Full_Package.zip’ (Success).


What is the word prototype used for in Javascript?

Does the prototype in Javascript signify a method that is added to the object? I have been working on object Javascript for a little while and sometimes I see the world prototype.  Maybe a better question would be when is the prototype used in the function. By default I think that all functions have a default prototype property that is what is used in the object. A function is created just like a class in C++ or Java. And then the NEW keyword is used to create the class which is made out of the function.   Code Here:  function Sprite(url, pos, size, speed, frames, dir, once) {         this.pos  = pos;         this.size = size;         this.speed  = typeof speed === 'number' ? speed : 0;         this.frames = frames;         this._index = 0;         this.url = url;         this.dir = dir || 'horizontal';         this.once = once;     };      Sprite.prototype = {         update: function(dt) {             this._index += this.speed*dt;         },   Code here:       var pressedKeys = {};    This is a simple declaration of an object, correct? I think there are several ways to declare an object in Javascript but this seems to be the most common way.  More Code: In the following code were would the prototype property come to use. I am just not certain why and where the prototype property should be used.  <script> function MyObject1() {     this.a = 1;     this.b = 2;     this.myMeth = function Fart() {         alert("hello");     } }   var a = new MyObject1(); var b = new MyObject1();  document.writeln(a.a); document.writeln(b.a); a.myMeth();  </script>


Find upper and lower limit of $\cos(x^2)-\cos((x+1)^2)$.  In previous topic was shown that 2 cannot be attain. but how to find upper bound?


Make ArrayList with words that start with specific letter?

I am trying to make a method that takes in an ArrayList and a letter. If the words in the arraylist start with that letter, than it will be put into a new array of words that start with that letter. For example, an arraylist with ("Apple", "Anny", "Bob") and a letter of "A" would create a new arraylist ("Apple", "Anny"). I am not allowed to use .startsWith(char ch)  public ArrayList<String> wordsThatStartWith(ArrayList<String> words, String letter) {     ArrayList<String> newWords = new ArrayList<String>();     for(int i = 0; i < words.size(); i++){         if((words.get(i)).substring(i, i + 1) == letter){         newWords.add(words.get(i));     } } return newWords; }   I am not sure why it will not add into a new ArrayList.


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


Can I travel to Spain using a Greek Schengen visa even if I don't want to stay in Greece at all?

I want to travel to Spain however the requirements state that my UK residence permit be valid for 3 months after intended date of departure from the Schengen area. I'll only have 1 month left when I return. The Greek rules just states I need to have a valid Uk residence permit. Could I apply through the Greek consulate but then use the visa to travel to Spain or do I at least need to touch down in Greece?


Incompatibility of some macro arguments in package `tkz-base` with package `pgfplots'

I am a happy user of Alan Matthes' packages, most of the time. Just noted that certain arguments in his tkz-base package raise a !Package PGF Math Error: Sorry, the operation 'gcd' has not been implemented in the floating point unit. if package pgfplots is loaded, which I can't do without. In the MWE below 1. works fine, 2., 3. and 4. raise the error. Any thoughts there, anyone?  \documentclass{article} % RN. 2 October 2107 %======================= \usepackage{comment} \usepackage{tkz-base} \usepackage{pgfplots} %----------------------- \begin{document} 1.\\     \begin{tikzpicture} \tkzInit[xmax=8,ymax=6] \tkzGrid \tkzAxeXY \draw(-1,0)--(6,7); \end{tikzpicture} %\begin{comment} 2.\\ \begin{tikzpicture} \tkzInit[xmax=3,xstep=0.33333] \tkzDrawX[label=$t$,text=blue,color=red] \tkzLabelX[frac=3,text=blue,below = 9pt] \end{tikzpicture} 3.\\ \begin{tikzpicture} \tkzInit[xmin=0,xmax=7,ymin=-1,ymax=1] \tkzDrawX[trig=2] \tkzLabelX[trig=2] \end{tikzpicture} 4.\\ \begin{tikzpicture} \tkzInit[xmin=0,xmax=7,ymin=-1,ymax=1] \tkzDrawX[trig=2] \tkzLabelX[trig=2,below=8pt] \end{tikzpicture} %\end{comment} \end{document}


$\displaystyle{\lim_{\ p \to \infty}} l^p = l^{\infty}\ ?$

The norm of an element $(\gamma_k)=x \in l^{\infty}$ is defined to be $\sup_k \gamma_k <\infty$. The norm of an element $(\gamma_k)=x \in l^p$ is defined to be $(\sum_k \gamma_k^p)^{1/p} < \infty$, even for $p=1$!   I can't see how $\displaystyle{\lim_{p \to \infty}} (\sum_k \gamma_k^p)^{1/p} = \sup_k \gamma_k$ holds?    And, if they just are separate definitions, then why the case '$p=\infty$' is in the 'category' of $L^p$ spaces?   Added - Understanding answers to  requires a knowledge more than an undergraduate Analysis, i.e. my current level. Simple detailed answers would be much appreciated.


Let $K$ be a field, and let $K\subset E\subset K(a)$ be an extension, where $a$ is transcendental element over $K$. How can I show that $K(a)/E$ is finite ?


I've notice that the business to business site AliBaba and it's more consumer friendly AliExpress website have a number of bike components for sale. They tend to be complete component groupsets and the like but are some quite reasonable deals, especially if you are building a bike from scratch.  I've used AliExpress before to purchase electronic components, which have been good quality and are what they say on the tin.   Has anyone used AliExpress to buy bike components and have they had any trouble? (quality, counterfeit etc.)  One benefit is that your money is held in escrow until you receive the item and aprove the payment so some safety.


Is there a CLI command to show if packages need to be updated

When you login, you are shown "X packages can be updated, Y are security updates," Is there a terminal command that will give this message on demand?


Is there a simple way to reduce the amount of white space around the TikZ in the MWE pasted below (in particular in the x direction)?  \documentclass{article} \usepackage{xcolor} \usepackage{tikz}  \begin{document} VRCRCRCRCC \tikz[baseline] \node[fill=yellow!30, anchor=base,inner sep=0.7pt, outer xsep=-2pt] {ABCDE}; VBZBZBBBBG \end{document}     PS: This question may be a duplicate of . I posted it nevertheless since 1) my example is much simpler (and hence may have a much simpler solution) and 2) I don't see how the answers given there could help in my case. If you disagree feel free to mark my question as "exact (!) duplicate of ...".


Only half of my drawing using drawPolygon is showing up

This is the bit of code that does all of the drawing, but it's only drawing half of the arrow. When it's a vertical arrow (North or South), it cuts off the left side, and when it's horizontal (East or West) it cuts of the top, both centered right at the tip; becoming a perfect half an arrow.  public void paint(Graphics g) {         setSize(100, steps * 50);         for (int i = 1; i < steps + 1; i++) {             y = i * 20;              if (directions.peek() == "North") {                 int[] xNPoints = {x, x + 6, x + 2, x + 2, x + 2, x + 2, x + 6};                 int[] yNPoints = {y - 5,  y, y, y, y + 10, y, y};                 g.drawPolygon(xNPoints, yNPoints, 7);             }             else if (directions.peek() == "East") {                 int[] xEPoints = {x + 10, x + 5, x + 5, x - 5, x - 5, x + 5, x + 5};                 int[] yEPoints = {y, y + 6, y + 2, y + 2, y + 2, y + 2, y + 6};                 g.drawPolygon(xEPoints, yEPoints, 7);             }             else if (directions.peek() == "South") {                 int[] xSPoints = {x, x + 6, x + 2, x + 2, x + 2, x + 2, x + 6};                 int[] ySPoints = {y + 5, y, y, y - 10, y - 10, y, y};                 g.drawPolygon(xSPoints, ySPoints, 7);             }             else if (directions.peek() == "West") {                 int[] xWPoints = {x - 5, x, x, x + 10, x + 10, x, x};                 int[] yWPoints = {y, y + 6, y + 2, y + 2, y + 2, y + 2, y + 6};                 g.drawPolygon(xWPoints, yWPoints, 7);             }             g.drawString((String)directions.pop(), 5, y + 5);   The goal of the program is to return a set of user provided directions in reverse order, and I have a lot to clean up (add exceptions, clean up the GUI), but all of the code aside from what I just provided is used for prompting and storing the user's input for how many steps there are and what they are.


Why 17 digits double data type does not work properly in c?

It's a very simple code. I compiled and run this code in code blocks and the output was 11111111111111112.000000. I run this code also in . This time the output was same. But why it doesn't work properly? How can I solve this problem? Here's my code. #include <stdio.h> int main() {  double a = 11111111111111111;  printf("%lf\n", a);  return 0; }


i want my phone to use the sd card i put instead of the phone memory

Im using a Samsung galaxy s3 mini and my problem is that my phone uses the memory when I have got a sd card which still has got space


Recently, I was doing my homework and I found out that Torque can be calculated using $\tau = rF$. This means the units of torque are Newton meters. Work & Energy are also measured in Newton meters which are Joules.  However, torque isn't a measure of energy. I am really confused as why it isn't measured in Joules.


ExpressJS + MongoDB: Better to make one API call with 10,000 objects, or 10,000 individual API calls?

I'm building an app that relies on a web scraper built in Node/Express, which operating on the same localhost as my front-facing Node/Express app.  I'm trying to optimise as much as possible and I'm completely new to all of this so please forgive if it's a basic question. Let's use this flow as an example:   The front-facing app generates a list of about 10,000 domain names The front-facing app sends this data to my scraping app's api The scraper app does its magic then saves a whole lotta data to MongoDB   In terms of optimisation and best practice, is it better if my front-facing app sends one request to the scraper API per domain name? Or is it better to send an array of 10,000 strings to the scraper in one POST and parse through it within the app itself?


Why does paint mix to produce black, but light mix to produce white?

Mixing of different wavelengths of light results in white,  but why is that when paint with different colors are mix results in black?


I'am using Ubuntu 13.04 on Lenovo G500 -E  when i turn my laptop computer on the brightness of screen is 0 and i need to increase the brightness to see the screen  is this problem related to Ubuntu 13.04?  please help me to solve this problem  thanks in advance,


I have a file with hounded of thousands lines. I need to grep from a line to another line and include everything between these lines   i.e lines from Wed Nov 25 23:08:01 GMT 2015 to Wed Nov 25 23:59:24 GMT 2015  [...] abc abc abc Wed Nov 25 23:08:01 GMT 2015 def def def def ... (1000 lines with def) Wed Nov 25 23:59:24 GMT 2015 xyz xyz xyz [...]   Can you suggest what is the right grep expression?


Any idea about this inequality:  $$\large \pi^4+\pi^5<e^6$$  Any hints would be appreciated.


Why does Linux use SCSI drivers for non-SCSI devices?

Looking at what block device commands like lsblk or blkid return it seems that linux HDD support SCSI drivers regardless of the type of the devices, like a USB flash driver that is presented as follows in lsblk command:  ...     sdb               8:16   1    30G  0 disk      └─sdb1            8:17   1    30G  0 part /run/media/user/HP v224w ...   Why sdb and sda drivers are called SCSI drivers? What does this terminology have to do with Small Computer System Interface?


Prove the following identity (Fibonacci) using induction

I have to prove the following identity, where $F_n$ are Fibonacci numbers and $F_{0}=F_{1}=1$ $$\sum_{k=0}^{n}F_{k}F_{n-k}=\sum_{k=0}^{n}(k+1)F_{k+1}(-2)^{n-k}.$$ I am trying to do it by induction, but i am stuck at the induction step. I have $$\sum_{k=0}^{n+1}F_{k}F_{n+1-k}=\sum_{k=0}^{n}F_{k}F_{n+1-k}+F_{n+1}=\sum_{k=0}^{n}F_{k}(F_{n-k}+F_{n-k-1})+F_{n+1}\\=\sum_{k=0}^{n}F_{k}F_{n-k}+\sum_{k=0}^{n}F_{k}F_{n-k-1}+F_{n+1}.$$ Okay, in the last part I can use for the part $\sum_{k=0}^{n}F_{k}F_{n-k}$ the assumption that it works for $n$, but what do I do with the rest? I guess I have to come at $-2\sum_{k=0}^{n}(k+1)F_{k+1}(-2)^{n-k}$. Thanks in advance for the help EDIT: I would need to do it using induction if that would be possible, so i edited the question


Adding an image in Latex - but image not in right place

I've put in an image in my Overleaf latex file but it's positioned in the wrong place. How can I move it around?


What's the eccentricity of our sun's orbit around the center of the galaxy?

Just thinking about "galactic habitability zones." Is this even a valid question?


How can I disable integrations (viewers, etc.) with Windows Explorer?

Windows Explorer (win7) keeps crashing when I select some files. It's several different file extensions (.png, .pdf).  This does not happen when I use XY explorer (a thirdparty explorer) So I suspect it's some third party app integrated with WE.  How can i disable such?


Real domain and range function to find all functions with nonzero x.

Find all functions $f:\mathbb R \to \mathbb R$ that satisfy $$ f(x)  + 3 f\left( \frac {x-1}{x} \right) = 7x $$ for all nonzero $x$.  My thoughts so far are to plug in $(x - 1)/x$ for $x,$ but it always comes out so complicated, so I don't really know where to go from there.


Will corruption/hallows destroy mud-based life?

Once a world enters hardmode, corruption and hallows being spreading at an alarming rate, including the underground. Grass, which grows on dirt, succumbs easily to both. Jungles and glowing mushrooms grow on mud and provide unique and valuable items. Will corruption/hallows destroy these if left unchecked? If they do destroy mud-based life, how can I preserve these fragile ecosystems?


How to programmatically remove a field from a node?

How does one remove a field from a node programmatically? I have a migration in hook_update_N that moves the contents from a a field into a custom table. After that migration, I want to remove the field in that same function.  Are there any field API's that cater removing fields?  Edit, Solution: Because the answers lack actual code, here is what I did to move fields from the $users into my own records and subsequently remove the field from the database;  function my_module_update_7005(&$sandbox) {   $slice = 100;   //Fetch users from database;   if (!isset($sandbox['progress'])) {     $sandbox['progress'] = 0;     $sandbox['current_uid'] = 0;     // We'll -1 to disregard the uid 0...     $sandbox['max'] = db_query('SELECT COUNT(DISTINCT uid) FROM {users}')->fetchField() - 1;   }   if (empty($users)) {     $sandbox["current_uid"] += $slice;   }   $users = db_select('users', 'u')     ->fields('u', array('uid', 'name'))     ->condition('uid', $sandbox['current_uid'], '>')     ->range(0, $slice)     ->orderBy('uid', 'ASC')     ->execute();   //Loop trough users;   foreach ($users as $user) {     $foo = new Foo();     // Warning: drupal's fields return mixed values; e.g. NULL versus an int.     $foo->debits = (int) $user->user()->field_credits["und"][0]["value"];     $foo->save();      $sandbox['progress']++;     $sandbox['current_uid'] = $user->uid;   }    $sandbox['#finished'] = empty($sandbox['max']) ? 1 : ($sandbox['progress'] / $sandbox['max']);    // Remove the field.   field_delete_field("field_credits"); //note that the name for Foo is field_foo   field_purge_batch($sandbox['max']+1);//Drupal seems to have an offbyone problem. }


Cheapest way from Belgium(Europe) to Egypt? (flight or ferry)

I need to go to Egypt from, I will going back from another country, so a single ticket would be enough. I don't mind flying from another European country since Brussels is well connected by budget airlines, preferably from Cyprus, my question is, are there now any ferry still running to Egypt and how they expensive?


Let $A= a(i,j)$ and $B= b(i,j)$ be ($n\times n$) matrices that are positive definite such that $a(i,j) < b(i,j)$ .Let $C= c(i,j)= a(i,j) - b(i,j)$, then $C$ is also positive definite. Why or why not?  what i know is $x^T(C)x= x^T (A-B) x = x^T(A)x - x^T(B)x$. Now both terms on right-hand side are greater than $0$ as $A$ and $B$ are positive definite. Also  $a(i,j) < b(i,j)$. But in such case the sign of $x^T(C)x$ being positive or negative will also depend on the value of elements of vector $x$. So, we can't assure that $x^T(C)x < 0$ always or that $C$ is not positive definite.  Am i right about this?


How do I go about removing texture from a scanned photo?

This photo is going to be used for a departed family members funeral service. What would be the best way to remove the texture?


Trojan:PHP/Obfuse.AR!MSR Detection by Windows Defender

I have an AWS server running Windows 2016 Datacenter. From the past few days, Windows Defender has been reporting Trojan:PHP/Obfuse.AR!MSR pointing to random phpXXXX.tmp files inside C:\Windows\Temp folder. I checked there are many files of that type in the temp folder but only 2-3 are reported by Windows Defender as infected. I tried opening these files (after downloading to local PC) in notepad and found they have some HTML & PHP code, primarily a form with file input. I tried searching for this on Google and some articles suggested that these are hack attempts. The only reason I have PHP enabled on Windows Server is because we need to run a WordPress site. The CPU and RAM usage on server has also increased over the last 10-15 days. It used to stay below 10% but now it varies between 30-40% with Windows Defender being the highest contributor. Is this bad? What steps should I take to investigate further and secure the server? Any directions would be helpful. Unfortunately, we cannot afford to engage a professional to look into this matter.


using shortcuts to move in bash command line

When I use Ctrl+Left_arrow or Ctrl+Right_arrow in bash, I move backward a "word" and forward a "word" respectively. I belive, this is defined in /etc/inputrc  # mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving "\e[1;5C": forward-word "\e[1;5D": backward-word "\e[5C": forward-word "\e[5D": backward-word "\e\e[C": forward-word "\e\e[D": backward-word   Unfortunately, the definition of "word" here is misleading. It considers /foo/bar as two words.  Is it possible to modify this so that the only word delimiter is space character ? (one or more spaces, or one or more tabs)   i.e. /foo/bar/ should be treated as one word  I am using Debian Wheezy


How to compare two javascript objects from one specific property

I have two objects from the same constructor, they differ the first and second properties, but all the rest match. I want to confirm that in the code.  The JSON.stringify is good to compare whole objects, but not so good with starting from a certain property. I tried creating two variables one for each object, strigifying the first and second properties and adding them together in one string, for each variable.  And THEN I compare the two objects stringifying them by using substring starting from the variables LENGTH like this:   function Car(carname, price, performance, efficiency, offroad, size, twoseat, legroom, trunkspace, electric) {     this.carname = carname; this.price = price; this.performance = performance;   this.efficiency = efficiency; this.offroad = offroad; this.size = size;   this.twoseat = twoseat; this.legroom = legroom; this.trunkspace = trunkspace; this.electric = electric;}         var userParameters = new Car("!", 1,  null, true, false, true, false, false, false, false);     var fiat500 = new Car("Fiat 500", 19000, null, true, false, true, false, false, false, false);          var n = JSON.stringify(userParameters.carname) + JSON.stringify(userParameters.price);         var m = JSON.stringify(fiat500.carname) + JSON.stringify(fiat500.price);         var stringCar = JSON.stringify(fiat500);         var stringUser = JSON.stringify(userParameters);         if ((stringCar.substring(n.length)) === (stringUser.substring(m.length))) {             //Do stuff in case equal         }   It looks like it would be the solution, but it doesn't work. Halp


LaTeX changing the order of problems on a test

The following code is that for the first two problems enumerated as 11.) and 12.) on a page of a test. Why is LaTeX changing the order of them? (I guess the table environment is doing this.) How do I prevent it?  \documentclass[10pt]{amsart}  \usepackage{mathtools,array} \usepackage{adjustbox} \usepackage[skip=3pt]{caption} \usepackage{makecell}   \begin{document}    \noindent \textbf{11.) }A student was given a piece of rope and told to cut it into two equal pieces, keep one piece, and pass the other piece to the next student. Each student was to repeat this process until every student in the class had exactly one piece of rope. Which of the following could be the fraction of the original rope that one of the students had? \begin{tabbing} \hspace*{3em} \= \hspace{3in} \= \kill \> \textbf{a.) }$1/14$  \> \textbf{b.) }$1/15$ \\ \> \textbf{c.) }$1/16$  \> \textbf{d.) }$1/17$ \\ \> \textbf{e.) }$1/18$ \end{tabbing} \vskip0.25in   \begin{table} \centering \caption*{Number of Premium\\Members} \begin{tabular}{|| c !{\vrule width0.8pt} c | c | c||} \hline     Year                &   1985    &   1986    &   1987 \\ \Xhline{0.8pt}     Store \textit{A}    &   250     &   400     &   750 \\ \hline     Store \textit{B}    &   500     &   1,000   &   1,250 \\ \hline \end{tabular} \end{table} \vskip1.25mm  \begin{table} \centering \caption*{Average Number of Video\\Rentals Per Premium Member\\at Store \textit{B}} \begin{tabular}{|| c !{\vrule width0.8pt} c | c | c||} \hline     Year                &   1985    &   1986    &   1987 \\ \Xhline{0.8pt}     Rentals             &   12      &   15      &   20 \\ \hline \end{tabular} \end{table} \vskip1.25mm  \noindent \textbf{12.) }The first table shows the number of premium members at two video rental stores, Store \textit{A} and Store \textit{B}, for three consecutive years. The second table shows the average number of video rentals per premium member at Store \textit{B} during each of those years. Which of the following numbers best approximates the total number of video rentals by premium members at Store \textit{B} during the three years. \begin{tabbing} \hspace*{3em} \= \hspace{3in} \= \kill \> \textbf{a.) }24,000    \> \textbf{b.) }46,000 \\ \> \textbf{c.) }58,000    \> \textbf{d.) }70,000 \\ \> \textbf{e.) }130,000 \end{tabbing}  \vfill   \end{document}


Evaluating:  $$S = \sum_{n=1}^{\infty} n$$  Apparently, $S = \zeta(-1) = -\frac{1}{12}$  Which is crazy. How can $1 + 2 < 1$ ?  Anyway,   How do you evaluate $S = \zeta(-1)$  Hint please? Thanks


I have this syntax:  double (*(f(double (*)(int))))(int);   Do I understand correctly syntax above that f is function that gets pointer to function that receive int and return a double?


I need to get MODIS NDVI (MOD13A3), but output from EarthExplorer or Daac2Disk HDF format is a numerical range is -2000 to 9996.   But I need for futher work basic range -1 to 1.   Is there any conversion method?


jquery new object via prepend -> onclick doesn't work

I want to create a new div tag via  $(this).prepend("

");   and onclick it should close  $(function() {     $(".test_close").click(function() {         console.log("clicked");         $(this).remove();     }); });   but it doesn't work for me...  do you have an idea how i can do this?  thanks in advance and sorry for my bad english


I am working on a lab and it is asking me to create a method and test it. The method I created uses an object as one of the arguments. When testing the method what would I put in the argument that asks for an object. I apologize if this is confusing I will try to post enough so someone can help. Let me know if you need more information. Here is the method I was told to create. The object I am talking about is the first argument in buildRow(). I am trying to test that method but do not know what to put as the first argument. The HtmlFormat is just another class I made and used but shouldn't really matter for my question.  Here is how I am trying to test it. The WhoDataItem is also another class that I am using to grab other method from.  Here is the WhoDataItem class if you need to look at it. I am just using the getCountry() method.


What will be the complexity of this code? Should we sum complexities?

I have an algorithm which ,at first, sorts the vector and then iterate through its elements and XOR them. Should I sum the complexities of sort and for loop to calculate the overall algorithm complexity? So, I have next code:  std::sort(array.begin(), array.end()); for (int i =1; i < array.size(); ++i) {   result = array[i-1]^array[i]; }   We have a for loop which has O(N) complexity and std::sort which has O(N log N) comparisons on the average. So the complexity of the next code will be O(N + N log N)? Or in this case we just have to choose the highest time complexity class which is linearithmic time O(N log N) and don't sum them?


I have installed several snaps programs on my Ubuntu 18.10 and it's taking almost 4 minutes to the computer to startup. I noticed those /loop/dev... that appears at startup and found out that those are the snaps programs loading. I never knew that, if I knew it I would never installed them as snaps. I think there are a lot of people who also do not know about it. Is there any way I could fix this? several of those programs are already set up and running just right and I did not want to have to reinstall them. Does the only way is to reinstall them as flatpak or through repository? Any suggestion of what kind of package to use so i don't have anymore unpleasant surprises like that?


Can a character use the Misty Step spell to escape from the Iron Bands of Bilarro?

Can a character escape the  (DMG p. 177, listed in the SRD as the ) with the  spell? To clarify, I am not asking if the bands prevent teleportation. I am asking whether the bands are teleported with the character as he teleports using misty step.


How to use grep output as a path for cd?

How can I pipe grep output as an argument to the cd command?  For example:  [root@xxx xxx]# pip install django | grep '/usr.*'   Requirement already satisfied (use --upgrade to upgrade): django in   /usr/lib64/python2.7/site-packages   Here /usr/lib64/python2.7/site-packages is highlighted and I want to pass this string to cd.


Within 300 km of Tokyo: Where for flora, landscape, nature?

I plan to visit Japan for 10 days and apportion 5 days to Tokyo. For the remainder, I want to escape the megalopolis and enjoy picturesque backwoods or countryside. Please recommend? Criteria:   No dangerous animals or untamed boondocks. No  or snakes. I won't drive, and must rely on public transport and walking less than 5 km in total.  No shrines, temples or any religious edifice. OPTIONAL: I fancy  , the more  the better.   This instantiates, doesn't duplicate, .


When should I use "amount" as opposed to "number"?  When media are referring to number rather than volume, they often use the word "amount" rather than number, as in "a large amount of people" Is this correct? Is this Preferred? Is this acceptable?


How to hide the notifications of the Teamviewer (silent use) in Computer and Android phones

Is it possible to hide a quick panel of the TeamViewer in the right corner and other notifications and pop-ups to enable a "silent" remote session?  While using team viewer Host application in android phone(remote phone) and connected to that device , the host application is showing a permanent notification in remote phone as long as connection ends. How to disable that notification? (Not able to disable in settings>apps. Turn off notification is not found for teamviewer host app)


Derive a polynomials formula by setting $n = 1$, $n = 2$, $n = 3$ to determine the coefficients.

Derive a formula for the sum of squares $1^2 + 2^2 + 3^2 + … + n^2$.   Hint: assume the formula is a polynomial of degree 3, i.e. $an^3 + bn^2 + cn + d$, and use the cases of $n=0, n=1, n=2$, and $n=3$ to determine its coefficients.


Are USB unplug events logged in Windows 7? (When was my mouse stolen?)

I know this sounds kind of ridiculous, but someone stole my mouse from my cubicle.. I came to work in the morning and was about to give my mouse a little shove to wake up the monitor, but it wasn't there!  I'm trying to figure out when this happened. I'm running Windows 7 and it's a USB mouse. I checked the event logs, but there doesn't seem to be any logs that might tell me what I'm looking for.  Is there any place where USB unplug events are logged?


How can I recover my tables in sql server database

I deleted 3 tables from my database with data and I have no backup. How can I restore tables with data in my database ?  How can I restore tables and data with database log file?(Database recovery model is full)


Search elements from ArrayList with custom class and change color for it

ItemClass for ArrayList  public class ItemClass { ...     private String mNomenclatureBrand; ...     public ItemClass(... String NomenclatureBrand ...) {         ...         mNomenclatureBrand = NomenclatureBrand;         ...     }     ...     public String getNomeclatureBrand() {         return mNomenclatureBrand;     }     ... }   ArrayList nomenclatureList   nomenclatureList.add(new ItemClass(                 ...                 "Alex",                 ...  nomenclatureList.add(new ItemClass(                 ...                 "Gustiyar",                 ...   For search "Alex" (getNomeclatureBrand) in this ArrayList I use  for (ItemClass d : nomenclatureList) {     if (d.getNomeclatureBrand() != null && d.getNomeclatureBrand().equals("Alex")) {         int size = nomenclatureList.size();         Toast.makeText(this, "OK", Toast.LENGTH_SHORT).show();         TextView nomenclarureBrand = findViewById(R.id.nomenclatureBrand);         nomenclarureBrand.setBackgroundColor(Color.GREEN);     } }   But app crash in  nomenclarureBrand.setBackgroundColor(Color.GREEN);   How can I fix it?


How to disable curved line ending in Windows API?

When I draw to a TCanvas using LineTo(), the lines end with a half circle bulge on them, not by a cut.  How can I disable this ending using the Windows API or Delphi's graphic system?


Measurability of sets which satisfy the additivity of measure

E is measurable, and E is a disjoint union of E1, E2. I want to show that  if m(E)= m*(E1)+m*(E2) then E1 and E2 are measurable.  How can I do this?


Are static magnetic and electric fields distorted by gravity? How?

Suppose we have a pointed electric charge or a bipolar magnet. If we put a massive gravity source nearby, will the magnetic and electric fields be distorted? In what way?


Two players placing coins on a round table with the goal of making the last move

I came across this riddle during a job interview and thought it was worth sharing with the community as I thought it was clever:     Suppose you are sitting at a perfectly round table with an adversary about to play a game. Next to each of you is an infinitely large bag of pennies. The goal of the game is to be the player who is able to put the last penny on the table. Pennies cannot be moved once placed and cannot be stacked on top of each other; also, players place 1 penny per turn. There is a strategy to win this game every time. Do you move first or second, and what is your strategy?   JMoravitz has provided the answer (hidden in spoilers) below in case you are frustrated!


How to attack a classical cipher using known partial plaintext?

I have a ciphertext generated by a  I do not know what was cipher used to generate it. I do however have the beginning of the plaintext.    What are the cryptanalysis approaches for classical ciphers?  How do you suggest trying to recover the plaintext in this instance? How can I leverage the known plaintext to attack the cipher?   I have this ciphertext:     NUVRRIEZWBRVRFFAPUUKFVRYNQBCINHZKNETUVDVUMRTEANPAFIELBPOANIXLCMEZQETKDKVWBMNCTRVUMRFNTFDGWRUMCSCTHSGKDULRFCNABNCGSNMMGRFNTLOWQRBETZRMUBQYURFRFASANGPEQRFFAFCZACAZCTUBTHKUNEZHPPWSGPNABHZKZQNREANLCHUCZDLMLPUNTMNETDAUINQADUNSUMGETETHFBNMNNONTFBBPOQEMZPETEQUIDTHKNABKDZWBDBRZUSRASUMNIRARETETHFBZKRHPNQFAKRICMGETMULCTCULSLGBIVWBDBIEMUFCUVNUGPINFBQTMPNUMSRNNANTNANCMNNTFUMUKRILRFFAPUUKFVRYNTCMETNUVFWDABBRFNRIEFRFNTHGPUHPNKCILEGBUTWUSCPQSLMNIBWQINFBQTFAVRLCKRHKLZNFAZLSNTBDBEASTD   It begins with the partial plaintext:      it turns out that


Surrogate foreign keys allow inconsistent data - which normal form does this violate?

We have inherited a system which has surrogate keys on every table (that is, an auto-increment primary key, id). All of the foreign key constraints are on individual surrogate keys, and this seems to allow inconsistent data to exist in the database. Consider the following tables:  // Global list of available IO io (id, type, name, etc...)  // Configuration of devices attached to the system devices (id, name, etc...)  // Sensors connected to a particular device device_io (     id PRIMARY KEY,     device_id FOREIGN KEY TO devices(id),     io_id FOREIGN KEY TO io(id),     [io parameters]... )  // Control loop parameters connecting input sensors to output sensors device_control_loops(     id PRIMARY KEY,     device_id FOREIGN KEY TO devices(id),     input_id FOREIGN KEY TO device_io(id),     output_id FOREIGN KEY TO device_io(id),     [control loop parameters]... )   Because the input_id and output_id refer only to device_io(id), I can insert invalid data like this:  INSERT INTO io (1, 'input', 'Temperature'), (2, 'output', 'Heater'); INSERT INTO devices (1, 'Device 1'), (2, 'Device 2'); INSERT INTO device_io (1, 1, 1), (2, 2, 2); INSERT INTO device_control_loops (1, 1, 1, 2);   The control loop entry is invalid. It's for device_id 1, but it refers to IO from device 2. In this system you are not supposed to be able to do this.  I am sure this must be a violation of normal form, but I'm not sure which.  Perhaps the violation is with what the foreign key should be? To prevent this inconsistency in the current design the foreign key would have to be:  (device_id, input_id) FOREIGN KEY TO device_io(device_id, id)   This seems very wrong to me. Is this where we would violate a normal form?  The way I would do this is have input_id and output_id refer to io(id) rather than device_io(id). Then the foreign keys would be:  (device_id, input_id) FOREIGN KEY TO device_io(device_id, io_id), (device_id, output_id) FOREIGN KEY TO device_io(device_id, io_id)   Which seems much more sensible.  In summary, I would like to understand exactly what the issue is with the current design so I can provide justification for changing it.


Stuck with this problem from Zgymund's book.   Suppose that $f_{n} \rightarrow f$ almost everywhere and that $f_{n}, f \in L^{p}$ where $1<p<\infty$. Assume that $\|f_{n}\|_{p} \leq M < \infty$. Prove that:  $\int f_{n}g \rightarrow \int fg$ as $n \rightarrow \infty$ for all $g \in L^{q}$ such that $\dfrac{1}{p} + \dfrac{1}{q} = 1$.  Right, so I estimate the difference of the integrals and using Hölder end up with:  $$\left|\int f_{n} g - \int fg\right| \leq \|g\|_{q} \|f_{n} - f\|_{p}$$  From here I'm stuck because we are not assuming convergence in the seminorm but just pointwise convergence almost everywhere. How to proceed?


How to Deal with Large Number of Dummy Variables in Machine Learning?

I have a cross-sectional real estate dataset with information on roughly 100000 properties, including rental price, square meter size, number of bedrooms etc. In addition, the dataset contains information about the region for each property. The total number of regions in the dataset is 400.  I would like to play around with different machine learning methods in the caret package to predict rental prices using the relevant features in the dataset. I obviously need to incorporate regional information to capture region-specific price effects.      Update: To be more formal, I have the following two model specifications in mind:  $y_i=\beta_0+\beta_1x_{i,1}+\beta_2x_{i,2}+\beta_3D_{i,1}+\beta_4D_{i,2} + \epsilon_i$  where $y_i$ refers to the rental price of property $i$, $x_{i,1}$ denotes square meter size, $x_{i,2}$ denotes the number of rooms, $D_1$ is a matrix of dummy variables capturing different characteristics like balcony, kitchen, cellar and so on, and $D_2$ is a matrix containing the 399 regional dummies.  Alternatively, the model could be specified as follows:  $y_i=\beta_0+\beta_1x_{i,1}+\beta_2x_{i,2}+\beta_3D_{i,1}+\gamma d_{j} + \epsilon_i$  where $d$ is a vector containing the median or average square meter price in each region $j$. I guess inclusion of interaction effects could also make sense (see comment below by seanv507), but I am not sure about them right now.  The obvious advantage of the last equation is that I only need one variable in my model to proxy for a regional effect. However, I also do not see too much of a problem for the first equation given the relatively large number of observations in the dataset.   I have two questions:   Which of the two specifications would be preferable or are there better alternative ways to deal with this issue? Which machine learning methods could be promising for this type of model?


Setting up shared drive through virtualbox

I have Ubuntu 14.04  running as a virtual machine through Virtualbox and I'm trying to set up a directory to share with the Host (windows 8.1). Under settings I have specified a windows directory that I want to be shared:    However, when I boot up the virtual machine I can't see any reference to it under devices - just VBOXADDITIONS and Computer. Does anyone know what I could be doing wrong?


Review link is missing on beta sites at certain reputation thresholds

The reputation thresholds to access review queues on beta sites constantly change - not an issue in itself, but there appears to be a bug around the displaying of the "review" link on these sites.   For example, on Software Recommendations, at 255 reputation I can currently access the Close and Reopen queues. However, I do not have a "review" link in the top bar:    If I browse to /review manually, I'm allowed to work through the queues, however since the review link is missing some people may not notice they're actually able to review anything.  Since during beta, this kind of activity is important in defining and fine tuning the scope of the site, in addition to bringing attention to potential problems, I feel that this is an important issue.


Tense change: previous actions on something that's currently true

I'm describing a situation that happened in the past. To explain it, I want to use a description that is both true now and true when the situation happened.  Specifically, I want something like:     She touched me where my neck met my collarbone.   Since my neck is still attached to my collarbone (thankfully), I'm wondering if I shouldn't use the present tense here instead:     She touched me where my neck meets my collarbone.   Which is preferable, and why?


i want to know why Web Application Projects have designer.cs files  and web site not in asp.net   like this  //------------------------------------------------------------------------------ // <auto-generated> //     This code was generated by a tool. // //     Changes to this file may cause incorrect behavior and will be lost if //     the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------  namespace JavaScript {       public partial class WebForm1     {          /// <summary>         /// form1 control.         /// </summary>         /// <remarks>         /// Auto-generated field.         /// To modify move field declaration from designer file to code-behind file.         /// </remarks>         protected global::System.Web.UI.HtmlControls.HtmlForm form1;     } }


We know that if $A$ is $2\times 2$ square matrix\begin{bmatrix}a&b\\c&d\end{bmatrix}, such that $A$ is commutative over multiplication with any $2\times 2$ matrix, then $A$ is a scalar matrix. To prove that I tried to rely on the matrix multiplication and then I got $4$ equations to solve. I calculated the dot product of $A$ and $B$:\begin{bmatrix}e&f\\g&h\end{bmatrix} two times in both directions.  So $$ce + dg = ga + hc \ \ \text and \ \ af + bh = eb + fd.$$ And for the diagonal elements we get $$gb = cf = ea.$$ So the result of the multiplication give us a matrix such that its diagonal elements are the same. That's all I could get.  I just needed to prove that the diagonal elements of $A$ are scalars and the rest are zeros, but I faced a dead end, because I got stuck in a circle.  Can you help?!


hello guys I am facing a problem that my Windows partition is not mounting in Ubuntu I kind of get the error that Windows maybe hibernated or has not been properly shutdown. But the thing is I have completely shutdown Windows but I'm still facing this error. Can somebody tell me why am I facing this error. I am using Windows 10


Wordpress ajax error 400 bad request for sending data to remote site

I am using Sender.net for email subscription lists. This site give me some information to add user's emails to subscription list. I want to use WordPress ajax to for this. but it return error 400 bad request. My codes is:  File ajax-news-script.js:      jQuery(document).ready(function($){      // Perform AJAX send news on form submit     $('form#fnews').on('submit', function(e){          $('form#fnews #fsubmit').text(ajax_news_object.loadingmessage);         $.ajax({             type: 'POST',             dataType: 'json',             url: ajax_news_object.ajaxurl,             data: {                  'action': 'ajaxnews', //calls wp_ajax_nopriv_ajaxnews                 'email': $('form#fnews #femail').val(),                   'security': $('form#fnews #security').val() },              success: function(data){                 $('form#fnews #fsubmit').text(data.message);               }             });             e.preventDefault();         });     });   And in ajax-news.php file:      <?php  add_action( 'init', 'ajax_news_init' );  function ajax_news_init() {         global $rf_data;         wp_register_script( 'ajax-news-script', get_stylesheet_directory_uri() . '/js/ajax-news-script.js', array('jquery'), '1.0', true );         wp_enqueue_script( 'ajax-news-script' );          wp_localize_script( 'ajax-news-script', 'ajax_news_object', array(             'ajaxurl' => admin_url( 'admin-ajax.php' ),             'loadingmessage' => __( 'لطفا صبر کنید ...' )         ));          add_action( 'wp_ajax_nopriv_ajax_news', 'ajax_news' );         add_action( 'wp_ajax_ajax_news', 'ajax_news' );     }  // Check if users input information is valid     function ajax_news() {          global $rf_data;          // First check the nonce, if it fails the function will break         check_ajax_referer( 'ajax-news-nonce', 'security' );      $info = array();     $info['email'] = $_POST['email'];      $api_key = "my api key";     $list_id = my list id;     $url = 'https://app.sender.net/api';       $data = array(         "method" => "listSubscribe",         "params" => array(             "api_key" => $api_key,             "list_id" => $list_id,             "emails" => array($info['email'])          )     );  $options = array(     'http' => array(          'method' => 'POST',         'content' => http_build_query(array('data' => json_encode($data)))      ) );   $context = stream_context_create($options); $result = file_get_contents($url, false, $context); $response = json_decode($result);      if (!empty($response['success'])  ){             echo json_encode( array( 'send'=>true, 'message'=>__( 'Yes!' )));         } else {             echo json_encode( array( 'send'=>false, 'message'=>__( 'No!' ) ));         }         die();     }      ?>


I'm trying to understand how  $$\limsup_{n\to \infty}(n^n/n!)^{1/n} = e$$  i.e., the fact that the power series $$\sum_{n=1}^\infty (n^n/n!)z^n$$ has a radius of convergence of $\frac1e$  I haven't the slightest clue how to prove this, and am looking for any sort of nudge in the right direction, thanks.


How to test for a monotonic relationship between two variables, without assuming a specific functional model?

I'd like to test the hypothesis that there is a monotonic relationship between two variables, without assuming a specific model. What is the most robust (i.e. lowest probability of type-II error) way to do this?  I can think of a few options:   use a linear model of untransformed data. It'll be robust enough, even if I don't think the true relationship is linear. look at rank-transformed data, e.g. with Spearman's rank correlation coefficient use some kind of resampling approach, in which the order of the dependent variable is randomly shuffled. I'm not sure what statistic to compare in this approach.   Is there a fairly standard approach to this problem?


What constitutes a "visit/day" on Area 51, and is it broken?

I am an active user of the . Just now, out of curiosity, I visited  to see how well the site was meeting the requirements needed for full graduation from beta. I was surprised, however, to see the visits/day metric sitting at 0. Screenshot:    Initially, I thought that it was a simple error (cache fetching error, etc.), so I refreshed the page, but to no avail. The visits/day remained squarely at zero.  Upon further investigation, I discovered that there are many beta Stack Exchange site pages on Area 51, all with their visits/day metric at zero:                                     And these are just from the first page alone (50 per page). Almost every single Beta page on the second page exhibited the same property, visits/day at 0. Interestingly though, there are a few pages with visits/day of 1 or 2, but neither of those seem any more correct than 0.  What's going on here? What exactly constitutes a visit/day on Area 51? Is the metric broken?


What's the equivalent of the Redhat rpm -e command in Ubuntu?

What is the equivalent of the Redhat command rpm -e in Ubuntu? I know it's probably dpkg something because the equivalent of rpm -qa is dpkg -l, but I can't tell what the equivalent command of rpm -e is in Ubuntu. However, I think it's dpkg -r aka --remove <package-name> or --remove-architecture, but I'm not sure.  This is different from the question about how to remove an application in Ubuntu because I want know the most exact equivalent in terms of actions performed of the rpm -e command and not just generally how to remove an application, even if apt or apt-get remove packagename is the recommended or preferred way and not dpkg -r packagename or dpkg --remove packagename.