I know it is a simple question and I know the way to do it, only need of mine here is Performance and with less time as possible it should do.  I am getting input as   long l = 149;   I want to make this number of size 10 with additional numbers to be added at starting to make it of 10 digit. above number should get converted to,     0000000149.   Similarly,  1      -> 0000000001 13     -> 0000000013 888888 -> 0000888888   1. I tried with loop, like checking number length, subtracting number length by 10, then adding number of zero as the subtraction result i got.  2 Already created array like  arr[0, 00, 000, 0000, 00000, 000000, 0000000, 00000000, 000000000, 0000000000];   here I am doing same thing, subtracting my number length with 10 and getting arr[numberLenth -10] + number  I am getting desired result.  I want to make sure to check is there any better solution to this like using bitwise operator for such requirement?  Thanks

How do you left pad an int with zeros when converting to a String in java?  I'm basically looking to pad out integers up to 9999 with leading zeros (e.g. 1 = 0001).


I'm using location.reload in js but I wanna set the page a i wanna reload, this is my function   success: function (data) {                 alert("Andamento concluido nos seguinte processos: " + data.ids_processos);                 location.reload('/admin/carregamentop/index');                 return false;             }   How can i set the page?

How can I redirect the user from one page to another using jQuery or pure JavaScript?


EDIT: As pointed out by cpplearner, I had to add 'template' after T:: before Key. e.g. : T::template Key<i>::to_string  I'm writing an unroll template to create a compile-time 'for loop' to execute a specified callback for each iteration of the loop.   As for context; I'm writing a keycode helper structure in which I can simply define an enum (C++ sided) variable and its string 'name' value in one macro. This is used to easily setup a to_string method for each key to use later in the application. (Building a JavaScript-sided 'enumeration' object with the enum values at each object key)  The problem however is that my code compiles under MSVC, but doesn't compile under GCC.  I simplified the code to represent the problem   #include <string>  struct KeyCodes {     enum KeyCode { Key1, Key2 };      typedef void (*LoopCallback)(KeyCode keyCode, std::string str);      template <KeyCode> struct Key     {         std::string to_string(){ return "undefined"; }         static const bool is_valid = false;     }; };  template<> struct KeyCodes::Key<KeyCodes::KeyCode::Key1> {     std::string to_string() { return "Key1"; };     static const bool is_valid = true; };  template<> struct KeyCodes::Key<KeyCodes::KeyCode::Key2> {     std::string to_string() { return "Key2"; };     static const bool is_valid = true; };  template <typename T, KeyCodes::KeyCode i, bool is_valid, KeyCodes::KeyCode max> struct KeyCodeLoop {};  template <typename T, KeyCodes::KeyCode i, KeyCodes::KeyCode max> struct KeyCodeLoop<T, i, true, max> {   static void loop(KeyCodes::LoopCallback to_call)   {     to_call(i, T::Key<i>::to_string());     const KeyCodes::KeyCode next = i + 1;     KeyCodeLoop<T, next, T::Key<next>::is_valid, max>::loop(to_call);   } };   If I replace T with the actual "KeyCodes" structure, it does however compile.   #include <string>  struct KeyCodes {     enum KeyCode { Key1, Key2 };      typedef void (*LoopCallback)(KeyCode keyCode, std::string str);      template <KeyCode> struct Key     {         std::string to_string(){ return "undefined"; }         static const bool is_valid = false;     }; };  template<> struct KeyCodes::Key<KeyCodes::KeyCode::Key1> {     std::string to_string() { return "Key1"; };     static const bool is_valid = true; };  template<> struct KeyCodes::Key<KeyCodes::KeyCode::Key2> {     std::string to_string() { return "Key2"; };     static const bool is_valid = true; };  template <typename T, KeyCodes::KeyCode i, bool is_valid, KeyCodes::KeyCode max> struct KeyCodeLoop {};  template <typename T, KeyCodes::KeyCode i, KeyCodes::KeyCode max> struct KeyCodeLoop<T, i, true, max> {   static void loop(KeyCodes::LoopCallback to_call)   {     to_call(i, KeyCodes::Key<i>::to_string());     const KeyCodes::KeyCode next = i + 1;     KeyCodeLoop<T, next, KeyCodes::Key<next>::is_valid, max>::loop(to_call);   } };   What could be causing this behaviour, or am I doing something very wrong in general?

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


\mid within \left and \right delimiters is expected to be automatically scaled, but today I noticed such behavior:  L = \sup \left\{ \sum_{x \in F} a(x) \mid F \subset X,\, |F| < \infty \right\},     I suppose the optimal middle bar should be somewhat taller. (Or is this just an illusion?) Any ideas? Thanks.  BTW, this behavior was triggered in amsart. I didn't test it in other document classes (nevertheless, I believe that the behavior should be the same as long as \mid is defined).

I have a simple command which I use to write set comprehensions so that the braces automatically resize with respect to size of the enclosed arguments, e.g.  \usepackage{amsmath} \newcommand{\set}[1]{\left\lbrace #1\right\rbrace}  \begin{equation*} \set{x \in X \mid x > \frac{1}{2}}   \end{equation*} % Produces something like: { x : X | x > 1/2 }   However, the \mid vertical bar wont resize like the braces { .. } do. How can I get the \mid to resize as well?


I have to check whether the following expression converges; if yes I have to give the limit.  $$\lim_{x\rightarrow\infty} \sqrt{4x+x^2}- \sqrt{x^2+x}$$  Now I did the following:  $$\lim_{x\rightarrow\infty} \sqrt{4x+x^2}- \sqrt{x^2+x}$$ $$\lim_{x\rightarrow\infty} x\sqrt{\frac{4}{x}+1}- x\sqrt{1+\frac{1}{x}}$$ $$\lim_{x\rightarrow\infty} x \lim_{x\rightarrow\infty}(\sqrt{\frac{4}{x}+1}- \sqrt{1+\frac{1}{x}})$$  That confuses me. The left limit approaches $\infty$ while the right approaches $0$. What is wrong here or what can I conclude from that?  Thank you very muvh for your help in advance!  FunkyPeanut

Find the limit: $$ \lim_{x \rightarrow \ + \infty}(\sqrt{x^2 + 2x} - \sqrt{x^2 - 7x})$$  I did the following:  \begin{align} (\sqrt{x^2 + 2x} - \sqrt{x^2 - 7x}) = \frac{(\sqrt{x^2 + 2x} - \sqrt{x^2 - 7x})}{1} \cdot \frac{(\sqrt{x^2 + 2x} + \sqrt{x^2 - 7x})}{(\sqrt{x^2 + 2x} + \sqrt{x^2 - 7x})} \end{align}  I know the final answer is $\frac{9}{2}$. After multiplying by the conjugate, I see where the $9$ in the numerator comes from. I just can't remember how I solved the rest of the problem.


I have a question that i thought originally i would able to answer myself.  I have a site that show some pdf help files. The files is open to anyone so they can download freely.  The question is how i can still leave it open but when a user click on a file they will requested to enter an email ( like a pop up) after that the could continue as normal.  I don't want in this stage to force the user to create a account. I don't want the user to verified the email. I don't want to create a private file system.  I think a first approach will be a javascript. But i want the drupal check and validate the user input {With ajax approach}. The reason is that in a later state i would implement some web service with another Db and it will be nice to have ready the site part.  The validation for now is just to be a valid email format. {abc@abc.abc}  I have already seen

I have created a form which has only a submit button. In the submit function I am generating csv file and saving it to the files folder using fputcsv function.  But Now I need extra functionality of submit. After saving the file it should download the file also.  How to do this? Any one have some idea about this?


We can only speculate what is going on but does the black hole singularity make the light arrive faster than it would in space not affected by gravity?

How do I solve the speed of light in gravitational field?  Should I just add gravitational acceleration in speed of light?  $$c'=c_0+g(r)t~?$$


A few days ago my hard drive died and now I have a problem.  I installed Ubuntu 15.04 on my 16GB pendrive. When I use Ubuntu it acts very slowly.  I tried my best to solve this problem but can't. My PC has 3GB RAM and 2GB video RAM. The processor is an Intel dual-core @3GHz and the motherboard is an Intel dg41wv. Why is my computer so slow?

So I know I can make a persistent LiveUSB whereby there would be anywhere up to 4GB (I think that's the max) of persistent storage for downloads, etc.  I am asking the opposite, in a sense. I'd like to configure a USB install to have the platform adaptability that a Live OS offers while fully utilizing the 120GB of space I have.  In essence I'm hoping to have a boot up install that reconfigures most/all the hardware/drivers as necessary every boot as I'd like to be able to boot off of it on nearly any machine. (Within reason - they will all be 64-bit)  The biggest gripe with doing multi-platform booting is the video driver stuff. Sometimes the system I'm booting off of is AMD, sometimes Nvidia, sometimes Intel.  Alternatively, a usable answer may be a way to better configure the LiveUSB setup for more storage utilization and customization.


This is especially true for the IT-based stack exchanges, where the questions are all pertinent to an issue the searcher has. However, many times these popular questions have pages of answers, and the answers at the top aren't necessarily pertinent, even if the user has marked the question as answered.   Would it be possible to implement a feature to star an answer, and not the just the question? So that if we run into the problem again, we don't have to browse through pages of answers.

Often times I am not interested in the question so much as I am the answer. Unfortunately, the only site option for bookmarking an optimal answer is to bookmark the question. This leaves you having to remember that no the question wasn't that great, but there's an answer in here worth a million. It'd be nice to be able to favorite an answer allowing you to jump immediately to the answer that was much more valuable than the question. I understand that I can bookmark the answers link using my browser but it seems being able to favorite the answer within the site's ecosystem is useful.


I've got a question of some strange String pool behavior. I'm using == to compare equal Strings to find out whether they're in the pool or not.  public class StringPoolTest {   public static void main(String[] args) {     new StringPoolTest().run();   }    String giveLiteralString() {     return "555";   }    void run() {     String s1 = giveLiteralString() + "";     System.out.println("555" == "555" + "");     System.out.println(giveLiteralString() == giveLiteralString() + "");   } }   The output is:  true false   which is a big surprise for me. Could anyone explain this please? I think something about this is taking place at the compilation time. But why does adding "" to a String makes any difference at all?

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


From time to time, I like to give back to the SA community and answer some questions. However, I'm not knowledgeable in everything from my site (Stack Overflow) so I tend to just search for questions related to tags that I know some things about, like Java or Libgdx.  It's a small inconvenience, but when I want to look up Libgdx, which is a more uncommon tag, I have to type it into the search bar.  Therefore, I've come up with a solution to make it slightly easier to get to your desired tag. Instead of just displaying a list of tags in the "Tags" tab, there should also be a panel with your 3 - 10 (depending on how many fit in one line) top tags from that site at the top of the list. This will make getting to questions of only a certain tag, that you're interested, a little easier to reach.

What are watched tags and ignored tags? How do they work? What are tag subscriptions? What are interesting tags? On Stack Overflow, the content of the main page question list appears to be influenced by watched and ignored tags. How does that work?   For more information, see "" in the .


kithokit@09:39:03 ~ $ sudo apt-get install skype Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  skype : Depends: skype-bin E: Unable to correct problems, you have held broken packages. kithokit@09:39:13 ~ $ sudo apt-get install skype-bin Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  skype-bin:i386 : Depends: libasound2:i386 (>= 1.0.23) but it is not going to be installed                   Depends: libqt4-dbus:i386 (>= 4:4.5.3) but it is not going to be installed                   Depends: libqt4-network:i386 (>= 4:4.8.0) but it is not going to be installed                   Depends: libqtgui4:i386 (>= 4:4.8.0) but it is not going to be installed                   Depends: libqtwebkit4:i386 (>= 2.2~2011week36) but it is not going to be installed                   Depends: libx11-6:i386 but it is not going to be installed                   Depends: libxext6:i386 but it is not going to be installed                   Depends: libxss1:i386 but it is not going to be installed                   Depends: libxv1:i386 but it is not going to be installed                   Depends: libssl1.0.0:i386 but it is not going to be installed                   Depends: libgl1-mesa-glx:i386 but it is not going to be installed                   Recommends: sni-qt:i386 but it is not going to be installed                   Recommends: libasound2-plugins:i386 but it is not going to be installed E: Unable to correct problems, you have held broken packages. kithokit@09:39:18 ~ $

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


everyone want ask a question how to avoid [sudo] password for message by OS while i install Repository on terminal. sometimes it happen telling if  it's a superusers. it's to Programming, install App by Store Linux it's only for creators or development i think, why it happen ?¿ uploaded image of the terminal.   i will uploaded most images while i install new Repository. i want everyone see how Linux think that you are a superuser, without knowledge about it. it's ridiculous XD?¿ Questions yes, answers No why? What For?

Websites tell me to use sudo when I have no password, usually tell me one of two things.   It is bad security Or use 'sudo visudo' and the %admin ALL=(ALL) NOPASSWD: ALL line   I would like to not have a password on anything despite the security risks.  Going with option 2, I'm trying to avoid getting prompted to enter a password at all on my account.  So the problem with option 2, is that sudo is still prompting for a password that does not exist. So I can not use sudo visudo in order to remove the need to enter a password for sudo, because it prompts for a password.


I know there are many questions answered with this title but I have not found any that fit what I'm looking for...  I need to use regex like this "/^ user input $/i" The user input can put the * regex character in front of or behind the text.  If I use the "new RegExp(user input, "i")" does not accomplish the requirements of ^ and $ and the user regex character *.  I had something like this:  var foo = {User input};  var arr = ['Lorem Ipsum', 'simply dummy text', 'nothing'];  arr = arr.filter(function(item){      return /^{foo content here}$/i.test(item); });   Tests:  foo = "Lorem" -> array[] foo = "Lorem*" -> array['Lorem Ipsum'] foo = "Dummy" -> array[] foo = "*Dummy*" -> array['simply dummy text'] foo = "*" -> array['Lorem Ipsum', 'simply dummy text', 'nothing']   Many thanks.

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


So, after a biber update a few days back I get the following message:  ERROR - Error: Found biblatex control file version 3.4, expected version 3.5. This means that your biber (2.12) and biblatex (3.11) versions are incompatible. See compat matrix in biblatex or biber PDF documentation.  In itself this is nothing new and remedied by updating to the newest versions. However, according to Miktex, my currently installed version of biblatex is 3.12.  Looking into the .bcf gave me: version="3.4" bltxversion="3.11"  which confuses me even more. To add to that, a new, clean installation of Miktex 2.9 doesn't have any biblatex version installed (at least according to the package manager) but I still get the same message. To my best knowledge there are no secondary biblatex instances on my system. What am I missing here?

I'm trying to compile a document that only works with an up-to-date distribution, so I'd like to know: how do I update my distribution? Please provide screenshots where appropriate.  List of answers           To keep an eye on what’s going on at CTAN you may subscribe to the  or the RSS feed feed://www.mail-archive.com/ctan-ann@dante.de/maillist.xml


I want to apply some font property to some text inside a span element with a class  But in browsers the font properties are not applied. What to do?  I want to apply a font and some font property like size, weight to some text inside a span element which has a class named "2ndtype". But when i open it in chrome the font properties are not applied. What to do?  the html looks like this:

GOBIKES

AVAILABLE BIKES IN YOUR LOCATION
    and the CSS is:  .2ndtype {     font-family: Candara;     font-size: 27px;     font-weight: bold;  }   but in browsers i only get default html font and size applied to the text  "AVAILABLE BIKES IN YOUR LOCATION".

What characters/symbols are allowed within the CSS class selectors? I know that the following characters are invalid, but what characters are valid?  ~ ! @ $ % ^ & * ( ) + = , . / ' ; : " ? > < [ ] \ { } | ` #


Hope you all having a wonderful day and crunching some SEO. I am trying to get review schema appear for my client's website. The schema has been implemented correctly (tested using data structure tool) and as a result of this reviews/ratings (stars) are showing for every other pages but home page. What can I do to get the ratings show for the home page?  Have a blessed one.  Thanks in advance.

I have added  to my site and I can confirm that  has no issues with my code. After waiting some time Google has enabled review stars on all pages apart from the home page.  Using Google's Site Search Command: site:http://www.example.com reveals:    Question:   How do I enable rich snippets on the homepage so Google displays review stars using Schema Aggregate Rating?


Since a recent update, it is possible to hatch Pichu, Togepi, Cleffa, Igglybuff, Magby, Smoochum and Elekid from eggs. But since that update, I have never seen any Electabuzz, Jynx, Magmar and Pikachu hatch from my eggs, while it was the case before this update.  Is it still possible to hatch one of those four Pokémon nowadays?

Within a Pokémon evolution family, only the first Pokémon is available from an egg.  For example, in the Bulbasaur family - Bulbasaur, Ivysaur, and Venusaur - only Bulbasaur can be hatched from an egg.  But now as generation 2 Pokémon have been introduced, some of those evolve into the generation 1 Pokémon, which are also available from eggs.  For instance, Cleffa evolves into Clefairy. Clefairy was able to be hatched before the update, but I don't know now as Clefairy is generation 1 whilst Cleffa is generation 2.  So are those generation 1 species still able to hatch from eggs?


Suppose that $L:K$ is an algebraic and separable extension, and that for every $\alpha \in L$, the minimal polynomial of $\alpha$ over $K$ has degree at most $n$. Then $[L:K]\leq n$.  I'm having trouble proving this. The material that I am studying uses the following definition of separable:  Separable: an irreducible polynomial $f \in K[t]$ is separable over $K$ if is has no repeated roots in the algebraic closure of K. An algebraic extension $L:K$ is separable if every $\alpha \in L$ is algebraic over $K$ and the minimal polynomial of $\alpha$ over $K$ is separable over $K$.   I think this is to do with the primitive element theorem or perhaps the Tower Law, but I can't puzzle it out. Any help appreciated.

Let $E/K$ be an algebraic extension of fields and denote by $E_s$ the separable closure of $K$ in $E$, i.e. the set of all elements of $E$ that are separable over $K$ (which can be shown is a (separable) subfield of $E$).  I would like to show that the implication     $\left[E:K\right]_s < \infty \implies \left[E_s:K\right] < \infty$   holds, where $\left[E:K\right]_s$ denotes the separable degree of $E/K$ and $\left[E_s:K\right]$ the 'ordinary' degree of $E_s/K$.  In the textbook I am learning with, it is said that one could use the Primitive Element Theorem to do this, but I would also be fine with any other approach, as long as it's not getting too fancy and staying in the realm of 'common' textbook theorems known when dealing with separable extensions (and I didn't see how the Primitive Element Theorem would help).  This is not my focus (I want to write a Bachelor's thesis about polynomial factorizing elements of $\mathbb{Z}[X]$), but I'm in the process of reading into commutative algebra after about 1.5 years break from it.  My idea was something like assuming $\left[E_s:K\right] < \infty$ and $\left[E_s:K\right] = \infty$ to construct infinitely many $K$-homomorphisms $E_s/K \longrightarrow C/K$, where $C$ is some algebraic closure of $E_s$, which would then contradict $\left[E_s:K\right]_s = \left[E_s:K\right] < \infty$. Of course, an infinite basis would yield infinitely many $K$-vector space homomorphisms, but getting (infinitely many) ring morphisms seems to by an entirely different ting (unsurprisingly so...). Thought of using something like     Given two roots of the minimal polynomial of one of the infinitely many elements of a $K$-basis of $E_s/K$, there is a $K$-morphism $E_s/K \longrightarrow C/K$ that sends one to the other.   but this didn't seem very fruitful. I admit I haven't spent hours on this, I just didn't get very far and should focus on moving on, while still getting an answer on the 'howto' along the road would be really nice.


How to find the generating function for $a_n = \binom{2n}{n}$?  Using Mathematica, I get $A(z) = \frac{1}{\sqrt{1-4z}}$ and I am able to verify it.  However, how to derive it, e.g., from basic generating functions?

I need to find the values of $a$ and $n$ in the following  $$ (1 + ax)^n  = \sum_{i=0}^\infty \binom{2i}{i}x^i$$  How can I compare things and show that $a=-4$ and $n = -{1 \over 2}$. It's easy to expand $1 \over \sqrt{1 -4x}$ see that it's valid but I'm looking other way around.


Consider an undirected graph $g$ with some edges having negative weight - all weights in $[-1,1]$. We are seeking . Negative edge weight means repulsion and positive means attraction. Most of the methods I've seen work with positive edges or somehow ignore the negative sign, for example, by rescaling $[-1,1]$ to $[0,2]$ or simply considering absolute value $\|[-1,1]\|$, - etc.   But I cannot ignore the sign. Consider for example a graph with only negative edge weights. If we ignore the negative sign (rescaling, or $\|x\|$, etc.) and use regular methods, then clustering communities will still appear. But by the meaning of repulsion, each node should form its own community in a graph with only negative edge weights, because it cannot cluster with a node that linked to it by an edge with negative weight.  Does anyone know of any method or algorithm that does this?  P.S. This stems from some applied problems, for example, finding communities in groups of people where hate-love relationships are allowed. Note  was asked IMHO in a less precise formulation and got vague responses. I am still not sure if this is the same as mine, but in any case there are no useful (for me) answers there, and my repulsion seems absent their at all.

I have a  instance with weighted directed edges which values can be in range [-1,1]. I need to do clustering on this graph, in order to find out groups in which vertices are more correlated.  I searched for several clustering or community detection graph based algorithms, but most of them don't work because the negative weights. Up to now I have applied spinglass (it is so called in  library, it is an algorithm based on Potts model) algorithm which seems to work with both positive and negative weights.   Are there any other algorithms for doing clustering or community detection on graphs which have negative and positive edge weights?  Update: the edge weights represent correlations, 1 means that two vertices are strongly correlated, -1 that are inversely correlated and 0 means that are indipendent.


I dual booted my system with Windows 7 and Ubuntu 14.0.4. I deleted the Ubuntu partition and now on booting the system says error : no such partition and grub rescue>.  I searched for the solution online but all the answers required me to know the partition in which Ubuntu was installed, which I don't remember, and it doesn't exist anymore since I deleted it.  Furthermore, to make things worse, I do not have the Windows repair CD so I can reinstall the bootloader.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I was just wondering whether someone could give me an example of a topological manifold which is not a smooth manifold. In particular, I want an example of a topological manifold where no differentiable structure could be given.  I have thought a lot but in vain. If someone could put some light it would be of great help.

Could someone provide an example of a manifold that is not smooth? All manifolds that come to mind are smooth! By a manifold, I mean a hausdorff, second countable locally euclidean space.


I'm using a RouterOS device as a router on a stick. I'd like to isolate a certain VLAN from the outside world so that the VLAN cannot instantiate any connections to other VLANs or to the Internet (WAN). I've set up the following firewall rule: /ip firewall filter add chain=forward \     action=reject reject-with=icmp-admin-prohibited \     connection-state=!established,related,untracked \     in-interface=vlan120  It works for ping: ping www.google.com PING www.google.com (172.217.20.4) 56(84) bytes of data. From _gateway (192.168.120.1) icmp_seq=1 Packet filtered  It works for tcp: telnet www.google.com 80 Trying 172.217.20.4... Trying 2a00:1450:400d:805::2004... telnet: Unable to connect to remote host: Cannot assign requested address  But it does not work for udp: nc -z -v -u time1.google.com 123 Connection to time1.google.com 123 port [udp/ntp] succeeded!  Any help appreciated!

I'm trying to verify that a couple of our servers can communicate via certain ports before migrating some of our services to them, and that they're not blocked by our organizations firewall ACLs.  Makes Sense  [mrduki@mybox1~]$ nc -ul 40000 --- [mrduki@mybox2~]$ nc -zvuw2 mybox1.com 40000 Connection to mybox1.com 40000 port [udp/*] succeeded!   Doesn't Make Sense  [mrduki@mybox1~]$ nc -ul 40000 [mrduki@mybox1~]$ ^C --- [mrduki@mybox2~]$ nc -zvuw2 mybox1.com 40000 Connection to mybox1.com 40000 port [udp/*] succeeded!   In fact, if I do a port scan from 40000-40100, every single port succeeds.   If I do the same tests without -u (so that it tests TCP instead of UDP), I get 40000 (tcp) timed out: Operation now in progress errors, as I would expect (since I have no such TCP service listening on 40000).  Doing a sudo netstat -alnp | grep LISTEN on mybox1 though shows no such services listening on these ports. So what am I missing?


Does the expansion of space (that started from BigBang) limited to expansion of intersteller space only (as observed by Hubble) or does it happen even in the local observable universe?   Specifically, does the space between two stars in our own galaxy is also expanding? Does the molecular space in an ordinary everyday object expanding as well (even if it is very very tiny)?

I have looked at other questions on this site (e.g. "why does space expansion affect matter") but can't find the answer I am looking for.  So here is my question: One often hears talk of space expanding when we talk about the speed of galaxies relative to ours. Why, if space is expanding, does matter not also expand? If a circle is drawn on balloon (2d plane), and the balloon expands, then the circle also expands. If matter is an object with 3 spatial dimensions, then when those 3 dimensions expand, so should the object.  If that was the case, we wouldn't see the universe as expanding at all, because we would be expanding (spatially) with it.  I have a few potential answers for this, which raise their own problems:   Fundamental particles are 'point sized' objects. They cannot expand because they do not have spatial dimension to begin with. The problem with this is that while the particles would not expand, the space between them would, leading to a point where the 3 non-gravity forces would no longer hold matter together due to distance Fundamental particles are curled up in additional dimensions a la string theory. These dimensions are not expanding. Same problems as 1, with the added problem of being a bit unsatisfying. The answer seems to be (from Marek in the previous question) that the gravitational force is so much weaker than the other forces that large (macro) objects move apart, but small (micro) objects stay together. However, this simple explanation seems to imply that expansion of space is a 'force' that can be overcome by a greater one. That doesn't sound right to me.


Why can't you use Cantor's diagonalization argument to prove that the integers are countably infinite? i.e.  1: 12345....  2: 42345....  3: 56903...  4: 46234...  5: 23421...  etc.  Then we could create a new integer by adding 1 to each number in the diagonal, so the new integer would be 23042. Where did I go wrong in my reasoning?

In my understanding of Cantor's diagonal argument, we start by representing each of a set of real numbers as an infinite bit string.  My question is: why can't we begin by representing each natural number as an infinite bit string? So that 0 = 00000000000..., 9 = 1001000000..., 255 = 111111110000000...., and so on.  If we could, then the diagonal argument would imply that there is a natural number not in the natural numbers, which is a contradiction.


I used pre-up in /etc/network/interfaces. It's strange, I have two Ubuntu server, one a PC and another a VPS. This method works on my PC but not on my VPS.  This is the /etc/network/interfaces on my PC  # ifupdown has been replaced by netplan(5) on this system.  See # /etc/netplan for current configuration. # To re-enable ifupdown on this system, you can run: #    sudo apt install ifupdown  auto dsl-provider iface dsl-provider inet ppp pre-up /bin/ip link set eno1 up # line maintained by pppoeconf provider dsl-provider  #auto eno1 #iface eno1 inet manual  pre-up iptables-restore < /etc/iptables.rules   This is the /etc/network/interfaces on my VPS  # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5).  # The loopback network interface auto lo iface lo inet loopback  auto eth0 iface eth0 inet static pre-up iptables-restore < /etc/iptables.rules  source /etc/network/interfaces.d/*

I am setting up a new server with 18.04 based on instructions written for 14.04. I have got as far as these steps:  /sbin/iptables -A FORWARD -p tcp --destination-port 80 -j ACCEPT /sbin/iptables -t nat -A PREROUTING -j REDIRECT -p tcp --destination-port 80 --to-ports 8080 /sbin/iptables-save # To save permanently (reset-persistent): sudo sh -c "iptables-save > /etc/iptables.rules" # Modify in /etc/network/interfaces # Add this line:     pre-up iptables-restore < /etc/iptables.rules     # As below:  # The loopback network interface auto lo iface lo inet loopback     pre-up iptables-restore < /etc/iptables.rules  # The primary network interface auto eth0 eth1 iface eth0 inet static         address XXX.XXX.XX.XXX         netmask 255.255.255.0         gateway XXX.XXX.XX.1         dns-nameservers 8.8.4.4 8.8.8.8 XXX.XXX.0.3 iface eth1 inet static         address XX.XXX.67.47         netmask 255.255.0.0   But it turns out that 18.04 does things a different way, using something called netplan.   I have found questions and answers related to how to revert back to how things were done in 14.04, but I am wondering whether it is better to do the same thing the new way.   How can I do what is being done the old way using netplan?


I need a wireshark like - maybe firewall - application for Windows 7 which can log all the http network access a program and/or process does and doesn't eat up a helluva lot of resources. It has to run for weeks/months, so if it does this in the background that definetly helps. Does any kind of program like this exists for Windows? IPTABLES? :D

There are many answers here detailing programs that will monitor and log internet usage for a pc, but I need that usage to be logged and broken down, detailing which applications consumed that data.  I've noted there are several that give a real-time feed of each application's data usage (NetLimiter, Win7 Resource Monitor), but I can't find one that will log such data.  Anyone know of one?  Need to track down which program is using up a friend's bandwidth!


My very low quality flag to  (10k only now) was declined with the following reason     declined - a moderator reviewed your flag, but found no evidence to support it.   However, the question was later closed as off-topic which makes me wonder what is the difference between the two?

I recently flagged a question as "very low quality", just like I've flagged many questions in the past. However, my flag was found to be unhelpful this time. The same thing happened when I recently flagged a post as not an answer.  Are the moderators being more strict when it comes to handling quality related flags? If so, why?


I dual-boot Ubuntu and Windows 8. I know that if we try to use Ubuntu without disabling fast startup in Windows, the changes we made on the shared partition will get lost when we boot from Windows.  Will there still be problems if I leave fast startup enabled, but perform a complete shutdown on Windows whenever I am going to boot from Ubuntu?  It says Restart isn't affected in the option to enable/disable Fast Startup. This is what made me think that I won't have a problem if I perform a full shutdown before booting from Ubuntu

Why is everybody keep mentioning to disable Fast Boot on Windows 8 if you have installed alongside Ubuntu? Is it something that is recommended only for UEFI machines or is it a suggestion for Legacy BIOS machines as well? Is it because it makes the Windows partition inaccessible from Linux or there is another more serious reason to disable it?


I can browse the web fine, watch YouTube, listen to music, etc. But when I try to join ANY Minecraft server, as soon as I try to make a connection, I either:  Time out my connection  or:   Sit there waiting for it to load, then disconnect  On Minecraft, it says I have good ping to the server, but then I join it and I lag out as I stated above. I can connect to other servers on other games.. but not Minecraft. I have restarted my PC and my modem, still nothing.  What can I do to solve this issue ?

My friend had hosted a Minecraft server before and brought it back up today with my help. He and anyone in his LAN can connect. However we have had a few people try to connect, including me, and when we try to connect it gives the message:  Failed to connect to the server Connection timed out: connect  What does this exactly mean? How do we fix this?


I was just wondering: if the universe is really infinite, and there is a certain probability to find a life form just like me on another planet (for example $1.0 \cdot 10^{-150}$), is it therefore certain that a life form exists which exactly looks like me at this moment?  You could think: $\text{very-small-number} \cdot \infty >1$  Just interested on your thoughts on this.  Any help is appreciated.

I have often heard it said (by professional cosmologists) that if the universe is infinite, then there necessarily exist infinitely many copies of me repeated throughout.  The reasoning seems to be that any finite volume of space can contain at most finitely many fundamental particles existing in finitely many configurations.  From here it is implied that all possible (permissible) configurations must both exist and occur infinitely often.  This does not sound like a sound argument to me, so I have to believe that I have misunderstood the argument.    Is this unsettling implication true in an infinite universe, and if so how is it justified.


What methods exist (either inbuilt or via third party) to password protect (encrypt) folders within OS X ?

Is this possible? I know you can protect a .dmg file, but is there a more convenient solution, by using a third party application?


New to Java. I understand that strings are immutable, but I don't understand why the output here is the way it is.  The goal: I'm trying to ask a user a question "What class do you want to be?", the user answers. Their answer is stored in a string variable (classEntered), and passed into the setClass method which returns starting HP and starting gold based on what was input into classEntered.  The problem: When The user enters what kind of character they want to be (i.e. warlock or warrior), playerClass  gets updated properly. But the output (startingHP / startingGold) do not respond correctly.  Here is the code:      class Player {          String playerName;         String playerClass;         int startingGold;         int startingHP;          public void setName(String playerName){             this.playerName = playerName;         }          public void setClass(String newClass){             playerClass = newClass;             if(playerClass == "Warlock"){                 startingHP = 100;                 startingGold = 25;             }else if (playerClass == "Warrior"){                 startingHP = 150;                 startingGold = 30;              }         }     }      public class App {          public static void main(String[] args) {              // practice code: if playerClass defined this way the output is correct             Player player1 = new Player();             player1.setName("Jordan");             player1.setClass("Warlock");              System.out.println("Your name is: " + player1.playerName);             System.out.println("You're a " + player1.playerClass);             System.out.println("Your starting HP is " + player1.startingHP + " your starting gold is " + player1.startingGold);              Player player2 = new Player();             player2.setName("Jorel");             Scanner sc = new Scanner(System.in);                     System.out.println("What class do you choose? ");             String classEntered = sc.nextLine();             player2.setClass(classEntered);             System.out.println("testing " + player2.playerClass);             //output is incorrect when playerClass defined via scanner             System.out.println("Your name is: " + player2.playerName);             System.out.println("You're a " + player2.playerClass);             System.out.println("Your starting HP is " + player2.startingHP + " your starting gold is " + player2.startingGold);         }      }

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


I am trying to fill the top of this cylinder, but when I extrude in it isn't flat. Also, how can I make it so it extrudes evenly into the center? I hope I am not being too vague.

Is there any way of converting the triangle fan found on a cylinder cap into quads.


My mom's iMac is having issues (it's booting to the "prohibited" circle with a slash), and needs the OS reinstalled. She'd been running El Capitan, and I'd like to reinstall the same since she has some apps that could be incompatible with a newer OS.  Her rural internet is abysmal (think dial-up speeds) and there is no way she'll finish a full download of an OS from her home, so I am intending to create a bootable install disk for her. But when I try to download the El Capitan installer it does not allow me to even begin the download since my computers are all 2018 systems running High Sierra.  Is there any way to download a copy of El Capitan from a High Sierra Mac?

Sometimes it's hard to search for older versions of macOS & OS X  on the App Store.  This is an attempt to provide the canonical QA for this issue, as per the Meta QA -  I expect it to be modified over time to hopefully become a complete information resource.  How can I get any older version of a Mac OS to be able to run as a VM, or to reinstall on my Mac?


When I ask a question on Stack Overflow with the tag of regex, Stack Overflow greets me with this custom warning:    I'd love to create one of these for the pandas tag.  I'm assuming this is a feature that generalizes across all exchange sites.  Is there an API, or protocol to get this same behavior for another tag?  If not, can we get one?

On a particular site, RPG Stack Exchange, we've decided on our meta on a couple of tags that should have tag warnings, and on what those tag warnings should say. I am  on the site in question.  What should we do to get the tag warnings implemented? Do we do any/all of the following?:   start a [feature-request] on our meta for the tag warnings? raise a CM escalation? contact staff via the contact form? ping a staff member in the Teacher's Lounge? anything else?


i started installing ubuntu and took out windows 10 completely during the installation.. but after the installation, when i checked my disk partitions  927gb on linux filesystem 3 gb on linux swap 512 mb on efi  but my hard disk size is 1tb (1024gb so now rest 94 gb is missing  can anyone help me out. i tried if the windows 10 is still existing on the disk, but i didnt get any method  and while booting the system i get a message on the top left corner  /dev/sda2: clean,223062/60760064 files, 5079494/243030464 blocks ... so does this mean.

I read on  that Ubuntu will no longer use the familiar file size units we all know by now (kB, MB, GB, TB) and switch to a different IEC standard (KiB, MiB, GiB, TiB). If this is true, I would like to know what's the reasoning behind this change, and the impact (if any) this change has, especially with multiplatform applications or applications run with Wine.


I read quite a few SO links and the 1000-page "Programming WPF" and things are not so working.   I have this in MainWindow.xaml  <Window.Resources>     <Cursor x:Key="rightArrowCursor">Resources/im_pane</Cursor>     <Style TargetType="DataGridRowHeader">         <Setter Property="Cursor"  Value="{StaticResource rightArrowCursor}"/>     </Style>   and im_pane.cur is added as existing file to Resources.  When the mouse is over DataGridRowHeader, I get exception:     XamlParseException: Failed to create a 'Cursor' from the text   'Resources/im_pane' ... Requested value 'Resources/im_pane' was not   found.   I also tried Properties/Resource/im_pane, or im_pane.cur, still got the same error.  I just wonder how you use custom cursor in XAML?

I want to use an image or icon as a custom cursor in WPF app. What's the best way to do it?


How do i update to blender 2.91 on Mac i currently have version 2.83. How do I update to version 2.91 useing Homebrew? without overwriting

I constantly stay up to date with each new release of Blender, but this means my preferences are wiped clean each time. How do I export/import these preferences to avoid loosing my carefully crafted set up each time?


Couple of days back , I had a problem like  i have a page message and I want the text to be in red color.  after applying some css it worked out well.But if i am showing more than one error ,then only a heading "messages" comes in red and the messages are coming in normal color.I have added the image for your reference  CSS     and the page message is like  <apex:outputPanel id="errordisplayPanel" >         <apex:outputPanel Id="errorspanel">             <input id="isDiscountCheckPrfmd" type="hidden" name="isDiscountCheckPrfmd" value="{!isDiscountCheckPrfmd}" />             <c:Displayerror id="errordisplay" errorList="{!lstAllError}"  />
           </apex:outputPanel>

                             <apex:pageMessages id="msg2" />     </apex:outputPanel>

I have a page message and I have a requirement that I want the text to be in red color.  I have written some javascript like this:     and the page message is like   <apex:outputPanel id="errordisplayPanel" >     <apex:outputPanel Id="errorspanel">         <input id="isDiscountCheckPrfmd" type="hidden" name="isDiscountCheckPrfmd" value="{!isDiscountCheckPrfmd}" />         <c:Displayerror id="errordisplay" errorList="{!lstAllError}"  />
       </apex:outputPanel>

                         <apex:pageMessages id="msg2" /> </apex:outputPanel>    I don't know why its not working. But when I use the static id that I pick up using inspect element it's working.  It was like:   document.getElementById("createSOheaderpage:newheaderform:newheaderpb:msg2:j_id63:j_id64:0:j_id65:j_id66:j_id68").style.color = "#ff0000";   Can someone please help me with this  Thanks in Advance


Is it possible to make mailing address in contact object read ony ?.  Tried to do from the layout but still the mailing address is editable.

I have custom object called candidate. I have created field name called first name which is read-only in the page layout. Once a record is created with first name field populated I am able to edit that field. Why I am able to edit (I mean getting pencil icon). Can anyone suggest me for this issue?


This was always odd to me, if Voldemort wanted his Horcruxes safe, why didn't he just turn his Horcrux into a grain of rice and leave it in the middle of the safari? And I know that Voldemort is a trophy collector or whatever, but this was his soul we're talking about! Surely he could use something unsuspecting? I mean come on Voldemort, your mother's old house and the Room of Requirement, did he really think they were good places to hide his frickn' soul? I mean you may question the diary but no one really suspects it and it's used as more of a weapon than a safe guard. Also in the Chamber of Secrets 16 year old Tom Riddle said this:  'You're dead Harry Potter,' said Riddle's voice above him. 'Dead. Even Dumbledore's bird knows it. Do you see what he's doing, Potter? He's crying'.  And then when Fawkes heals him Voldy's just like, oh yeah... phoenix tears. How can he be so powerful and yet so dumb?

Nobody knew about his Horcruxes (even Slughorn wasn't 100% sure). But still, there was a small probability that someone could discover his secret. So, he hid his Horcruxes very well. But, there was always a way to get to those Horcruxes.  Why didn't he hide his Horcruxes in a place which was out reach of anyone? Some examples: His own stomach, Center of Sun/Earth/Black Hole etc. He could also had simply made Voyager-1 a Horcrux..


I am using PHPExcel library to read and write excel file excel2007 format. These are not big excel files, approximately 120rows and 20columns only.. When I run on my dedicated server its showing error as follows..  Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 40 bytes) in /home/ramdas/public_html/partnumber/inc/PHPExcel/Style/Supervisor.php on line 126   And here is my code.. i am using memory cacheing techniques..      include("inc/PHPExcel.php");     $cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_phpTemp;     $cacheSettings = array( 'memoryCacheSize' => '512MB');     PHPExcel_Settings::setCacheStorageMethod($cacheMethod,$cacheSettings);     $objPHPExcel = new PHPExcel();   I have checked the return value of PHPExcel_Settings.. its return true..  Please help me to solve this issue... I have tried all the answers available here... Nothing help me to solve..

This error message is being presented, any suggestions?     Allowed memory size of 33554432 bytes exhausted (tried to allocate   43148176 bytes) in php


I have some problem with card deck in Unity. I get card from directory using AssetBundle and put them in Array. Then using cycle I add card from array to CardList.  In the unity directory Cards order like this:     card_1, card_2, card_3, card_4......card_52   Here is part of this script:  public void InstanatiateDeck(string cardBundlePath) {     AssetBundle cardBundle = BundleSingleton.Instance.LoadBundle(DirectoryUtility.ExternalAssets() + cardBundlePath);     string[] nameArray = cardBundle.GetAllAssetNames();     for (int i = 0; i < nameArray.Length; ++i)     {         GameObject cardInstance = (GameObject)Instantiate(_cardPrefab);         Card card = cardInstance.GetComponent<Card>();          card.gameObject.name = Path.GetFileNameWithoutExtension(nameArray[i]);         card.TexturePath = nameArray[ i ];         card.SourceAssetBundlePath = cardBundlePath;         card.transform.position = new Vector3(0, 10, 0);         card.FaceValue = StringToFaceValue(card.gameObject.name);         CardList.Add(card);     } }   But using this script the cards in CardList order similarly directory order like this:     Element 0.card_1, Element 1.card_2, Element 2.card_3, Element 3.card_4...... Element 51.card_52   If I add Random.Range in this script, I get repeatable values in my CardList  public void InstanatiateDeck(string cardBundlePath) {     AssetBundle cardBundle = BundleSingleton.Instance.LoadBundle(DirectoryUtility.ExternalAssets() + cardBundlePath);     string[] nameArray = cardBundle.GetAllAssetNames();     for (int i = 0; i < nameArray.Length; ++i)     {         GameObject cardInstance = (GameObject)Instantiate(_cardPrefab);         Card card = cardInstance.GetComponent<Card>();         int random = Random.Range(0, nameArray.Length);         card.gameObject.name = Path.GetFileNameWithoutExtension(nameArray[random]);         card.TexturePath = nameArray[ random ];         card.SourceAssetBundlePath = cardBundlePath;         card.transform.position = new Vector3(0, 10, 0);         card.FaceValue = StringToFaceValue(card.gameObject.name);         CardList.Add(card);     } }   How can modify script to put cards in CardList by random order without repeatable values?  for example     Element 0.card_7, Element 1.card_50, Element 2.card_24, Element 3.card_12...... Element 51.card_9   Thanks guys and excuse my poor English

What is the best way to randomize the order of a generic list in C#? I've got a finite set of 75 numbers in a list I would like to assign a random order to, in order to draw them for a lottery type application.


Prove that for real numbers $a_1 ,a_2 ,...,a_n >0$ the following inequality holds $$\frac{1}{a_1 } +\frac{2}{a_1 +a_2 } +...+\frac{n}{a_1 +a_2 +...+a_n }\leq 4\cdot \left(\frac{1}{a_1} +\frac{1}{a_2 } +...+\frac{1}{a_n} \right).$$


Blender 2.81 screen upon loading  so, all of a sudden i'm having issues now with blender. i uninstalled and reinstalled blender 2.81 and 2.9, and they are both having the same issue upon initial loading. NONE of the preferances has been changed or anything. this is a picture of the stock cube that is given everytime. and as you can see in the screenshot, the viewport shading is set on wireframe, so i should be able to see it all, but i don't. i've checked all the settings and everything and nothing helps. i installed it on a seperate computer, on the off chance that it was my desktop going bad, but alas, on my laptop it is having the very same issue, new install and everything. if anyone else is having this problem and has fixed it, please let me know!!! i am in the middle of developing a video game and now i can't use blender to 3d model anything anymore.

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


Is it possible to change the colour of comments text or of the text while asking questions. I know that we can make the text bold, italics etc.   But don't know how to change the text colour from black(default)to red,green etc.

I just asked this question: .  The first answer I got totally missed the point of the question (that answer is now deleted).    I think my question would have been clearer if I could have changed the color of a (non-code) word to red, so I could show an example of what I wanted.  Is there a way to do this?


I have the mouse gestures such as four finger swipe up shows mission control, or four finger swipe down shows current application's windows.  Occasionally after the computer has been on for a while, the shortcuts just stop working. Is there a way I can fix it without having to restart my entire computer?

From time to time, my Magic Trackpad gestures will stop working. I can restart to bring them back, but this is pretty disruptive.  Is there a process I can kill to bring them back?  (I've tried turning off the Magic Trackpad; unfortunately, it doesn't fix the problem.)


My student said the first sentence below, which is a construction I hear fairly often from students. I've searched the data base for an answer, but couldn't find anything similar to what my student found when checking my correction. Student said: It's not high quality as compared with beef. I suggested: It's not high quality, compared with beef. [Honestly, this seems a little strange too.] He always checks my corrections. I asked him to let me know what he finds out when checking this particular correction. This is what he sent me.  "It's better/worse as compared with (something)" seems to be a typical construction.  This doesn't seem quite right to me. What do you all think?

I am not sure what is compared in this phrase but it seems that people believe it as the correct word.     She is nice, compared to you.      You're nicer, compared to him.   But why? What makes compared correct? Grammatically a past verb needs a subject right? She compared her car with the new one this one is grammatical correct, but this one is not The car is better, compared to her old car which one is the subject? As a beginner in english, I'd rather take comparing as it is not against what I've learned      She is nicer, comparing to you   Comparing is the act of to compare. A gerund doesn't need subjects:     swimming is nice.   It's not done there, the whole thing is getting worse after someone says that compared is not a preposition nor conjuction but a plain past participle, everytime I ask people they say that's correct BUT no one has been able to explain it.  I may be wrong as a very beginner English speaker but please help me to figure out regarding this problem, what is the state of compared here? Is that past participle, past tense, conjunction or preposition, and what is the rules that make it correct?, thanks in advance! It has driven my concentration recently.


You have a six-sided die. You keep a cumulative total of your dice rolls. (E.g. if you roll a 3, then a 5, then a 2, your cumulative total is 10.) If your cumulative total is ever equal to a perfect square, then you lose, and you go home with nothing. Otherwise, you can choose to go home with a payout of your cumulative total, or to roll the die again.  My question is about the optimal strategy for this game. In particular, this means that I am looking for an answer to this question: if my cumulative total is $n$, do I choose to roll or not to roll in order to maximize my cumulative total? Is there some integer $N$ after which the answer to this question is always to roll?  I think that there is such an integer, and I conjecture that this integer is $4$. My reasoning is that the square numbers become sufficiently sparse for the expected value to always be in increased by rolling the die again.  As an example, suppose your cumulative total is $35$. Rolling a $1$ and hitting 36 means we go home with nothing, so the expected value of rolling once is:  $$E(Roll|35) = \frac 0 6 + \frac {37} 6 + \frac {38} 6 + \frac{39} 6 + \frac {40} {6} + \frac{41}{6} = 32.5$$  i.e.  $$E(Roll|35) = \frac 1 6 \cdot (37 + 38 + 39 + 40 + 41) = 32.5$$  But the next square after $35$ is $49$. So in the event that we don't roll a $36$, we get to keep rolling the die at no risk as long as the cumulative total is less than $42$. For the sake of simplification, let's say that if we roll and don't hit $36$, then we will roll once more. That die-roll has an expected value of $3.5$. This means the expected value of rolling on $35$ is:  $$E(Roll|35) = \frac 1 6 \cdot (40.5 + 41.5 + 42.5 + 43.5 + 44.5) = 35.42$$  And since $35.42 > 35$, the profit-maximizing choice is to roll again. And this strategy can be applied for every total. I don't see when this would cease to be the reasonable move, though I haven't attempted to verify it computationally. I intuitively think about this in terms of diverging sequences.  I recently had this question in a job interview, and thought it was quite interesting. (And counter-intuitive, since this profit-maximizing strategy invariably results in going home with nothing.)

Suppose we keep tossing a fair dice until we want to stop, at which point the game ends and our score is the cumulative sum, or until the cumulative sum is a perfect square, in which case we lose and end up with a score of $0$.   We can set up a Markov-style recurrence. Define $f(k)$ to be the expected value of the game if the current cumulative sum is $k$. Clearly, $f(k)$ is $0$ if $k$ is a perfect square. In addition, $f(k)=\text{max}\{k,\sum_{i=1}^6 f(k+i)\}$.   How can we solve such a recurrence to find a good estimate/bounds of the expected score ($f(0)$) and the optimal strategy? Can these methods be extended to a game where we lose if the cumulative sum is an even number, or a perfect cube?


This file seems to be just an object with large border:  However the border is actually an object with its own border:  How can I convert it to a regular path? I've tried Object to Path but it doesn't work.  Here is the file:  My purpose is to fill the bubble with other objects (images, not texts).

I am trying to change the stroke width of an icon in Inkscape but, unlike other times I have done this, this time the stroke width appears to be 0 px and I am not allowed to make it thinner:    The stroke width is actually quite large already, is there another setting I should edit to make it thinner?  You can download the file I am working on .  BTW: sorry for the potato quality of the screenshot, this is what you get using Inkscape on a retina screen :/


How do one check with php if a file is 'genuinely' editable i.e. the file is editable in any file editor. Ex : php, text, html or even .htaccess file. All these file is editable in notepad or any text editor.  I am using php 'is_writable' function. But it is also returning image file as writable file.

Is there a quick, simple way to check if a file is ASCII or binary with PHP?


I am looking a solution to clear all items of any type but with a CustomModelData or Lore tag out of the players inventory. Example: I have a stick in my inventory with the CustomModelData or Lore test and a hoe also with the CustomModelData or Lore test, with the following commands: /clear @p stick{CustomModelData:<...>,display:{Lore:['{"text":"MyLore"}']}}  But how can I make it work with any item with the NBT, not just the stick and hoe?

Story A unique quirk about the /clear command is that it can clear items from the player's cursor, i.e. the one that is picked up and moving from slot to slot. Using this and conditional command blocks, I can detect when someone clicks on an item slot to pick it up. This is useful when I want to prevent a user from removing items from the chest. A method that I used to detect this is shown . Problem method doesn't work if the chest's contents are constantly changing. So I had this idea, to give each item a custom NBT tag like LockedInChest:1b and use my earlier method to detect if items with this tag were removed. Now I've run into a roadblock. It was all smooth sailing until I realized that you can't specify NBT in the /clear command without specifying an item. For example, I can match "stone with my NBT tag", or "stone with any NBT tag", but I can't mention "any item with my NBT tag". Core question How can I specify NBT only in the /clear command, and have it work for any item? Past trials (all failures) What if I could just remove the item name and keep the NBT? /clear @s minecraft:stone{NBT}  ↓ /clear @s {NBT}   Can I just specify the namespace? minecraft: /clear @s minecraft:stone{NBT}  ↓ /clear @s minecraft:{NBT}  and /clear @s minecraft{NBT}   Is there a keyword for any item? /clear @s minecraft:stone{NBT}  ↓ /clear @s minecraft:any{NBT}  and /clear @s minecraft:all{NBT}


We have Apex code that needs to interrogate the schema to dynamically handle configuration-based behaviour (e.g. for defining fields that should be loaded or saved) for specific types of object (such as "Account" or "MyCustomObject__c") and have seen that a lot of CPU time is spent just loading the schema. What's the best way to use the Salesforce APIs to minimize the overheads?

I was about to reconfigure some of my code to use the newer Schema.describeSObjects(types) method that I had heard was faster than using a globalDescribe.   I made some code to quickly check this and I was dismayed to find that the newer technique is not only not faster, it's about twice as slow as using a global describe. Here's the code I used :  New DescribeSObjects() method  //each block was run separately for timing purposes String obj = 'Account'; String[] types = new String[]{obj}; System.debug('START DESCRIBE SOBJECTS');  for (Integer i = 0; i < 50; i++) {   List<Schema.DescribeSobjectResult> results = Schema.describeSObjects(types);  } System.debug('FINISH DESCRIBE SOBJECTS');   Old getGlobalDescribe() method  String obj1 = 'Account'; System.debug('START DESCRIBE GLOBAL');  for (Integer i = 0; i < 50; i++) {    Map<String,Schema.SObjectType> gd = Schema.getGlobalDescribe();    Schema.SObjectType sobjType = gd.get(obj1);    Schema.DescribeSObjectResult describeResult = sobjType.getDescribe();  } System.debug('FINISH DESCRIBE GLOBAL');   Over 5 runs of each, the getGlobalDescribe() method took an average of 337ms for 50 describes and the describeSObjects() method took and average of 658ms. This is basically twice as long.  Does anyone have any insight as to why this would be? Any improvements that will significantly improve the accuracy of the resulting data?  As this data stands, I'm sticking with the old method.  One final note: the old technique uses 3 times a much heap (67kb vs 27kb)


I'm trying to compute  $$ \lim_{x\to 0^+} x^{\sin(x)}. $$  I've been trying to get it into a form where I can apply L'Hopital's rule, but I haven't had any success. Namely, I haven't been able to massage it into a fraction form. Any advice?

I tried writing $y=x^{\sin x}$, so $\ln y=\sin x\ln x$. I tried to rewrite the function as $\ln(x)/\csc x$ and apply l'Hopital to the last function, but it's a mess.   Is there a by hand way to do it?


To set the lowest bit in an unsigned char I can perform this operation:  my_unsigned_char = my_unsigned_char | 1;    But how can I turn off this flag?

How do you set, clear, and toggle a bit?


I was wondering which one of following sentences is the right way of asking:  "How much staff do you have?"   "How many staff do you have?"  Personally I would use "much", but depending on the translation of "staff" into my mother tongue it can be argued wether it is countable or not. The word staff could be understood as either a single employee or the collective of all employees.

Which one of these two statements is correct?     Our staff do ...      Our staff does ...   And is staffs ever correct?


I am very new to GIS development, and to be be frank I have no background about it at all. I searched the web but the tutorials I found seemed to assume the reader has some background information.  the thing is that I am confused about what to read or learn, there seems to be lots of technologies, and I feel lost since some speak about openlayers, geoserver, mapserver, google maps, and open street maps.  So here is what I am supposed to develop, and I hove you could give me an advice about which technology to use, and where should I start reading - given that I know almost nothing -.  Case 1: a closed system for about 20 users only, who can specify locations on the map, and the web application will store the latitude and longitude of the locations and show the markers. I wanted to use google maps api, but I cancelled that since there license requires you to purchase the service if the system is a closed one. so what technology should I use in such case? I need a free option, also I will be only using web server, so if the solution includes using my own geoserver, or something like that I won't be able to do it.  Case 2: I am supposed to display the roads and routes between two given points, and probably add some notes on the map. For this I case I can use my own map server/geo server, but again I want your suggestions.  The solution needs to be open source.  Finally, I hope you could tell me what to start reading first.

I want to start working on a web map at work to map some of our statistics by city.    I have an idea, but I'm not exactly sure where to start.   Are there any definitive resources that provide step by step guidance on how to do this?


How can I prove the following claim for any given continues function:  $$ \int_{0}^{\pi} xf(\sin(x))dx = \pi \int_{0}^{\frac{\pi}{2}}f(\sin(x))dx $$  Thanks!

Show that   $$\int_{0}^{\pi} xf(\sin(x))\text{d}x = \frac{\pi}{2}\int_{0}^{\pi}f(\sin(x))\text{d}x$$  this is so confusing. i have no idea how to even start. im thinking integration by parts but that doesnt seem right.  hope you guys can help!!


I'm a programmer and I'm combing through some code and entering comments to help other developers. I wrote the following sentence and got confused by the (possibly) dangling verb. I've spared you the the jargon by replacing with [tech fix].   I've put in this [tech fix] to make future modifications easier.   It didn't look right, so changed it to try to make it follow make:    I've put in this [tech fix] to make future modifications more easily.   or   I've put in this [tech fix] to make future modifications easy.   My reasoning is that if the sentence could be rewritten as the following, then case 2 above would be correct.   I've put in this [tech fix] to more easily make future modifications   In the above sentences, which is more correct, easier or more easily? Please help me understand the difference by decomposing the sentence.

For example:     The word rarely turns up outside of those contexts.      The word turns up rarely outside of those contexts.   Which one is correct and why?


I'm trying to write some SQL that queries two tables and brings back records that doesn't have a particular type of record in the other table.  If table 1 is an employee table that has EmpID, name, surname.  and the 2nd table is a bookings table that has Booking ID, EmpID, year  I want to find all records where there are no bookings for 2014.  so if the employee table is:  EMPID   Name   Surname  1        John   Doe 2        Bob    Smith   and the Booking table is  Booking ID   Emp ID   Year 1             1        2013 2             1        2014 3             2        2012 4             2        2013   I want the sql to only


In Directadmin (I used it before) when we create a reseller, a new user with a home directory was created and user could add domains in a home directory like /home/user/domains/example.com/public_html  How i can add /home/user/public_html as virtual host to apache web server? I want to config apache like direct admin to use home directory.  Im new on Centos 6.5 and i'm trying to config a web server. My OS is clear (no any configs, just DNS) and SElinux is disabled in /etc/sysconfig/selinux. I have one ip for my VPS.  Now my config for httpd is below.  <VirtualHost domain-1.com:80>     DocumentRoot /home/user/domains/domain-1.com/public_html     ServerName domain-1.com </VirtualHost>   When i add this config, i get forbbiden error in http://domain-1.com and http://server-ip  UPDATE I added the following code to apache conf.d but the error is alive.  <IfModule mod_userdir.c>     UserDir enabled user     UserDir public_html </IfModule> <Directory /home/*/public_html>         Options Indexes Includes FollowSymLinks         Require all granted         AllowOverride All         Allow from all         Order deny,allow </Directory>

Yesterday my supervisor mounted one of his directories onto my server. The problem is, I can't access them and I have no way of contacting him right now. When I type in the URL I get this error:  Forbidden You don't have permission to access /~<username>/core/ on this server.   I tried to cd into the "core" directory and do the following:  chmod -R 755 *.*   but, even with all the permissions changed, I still can't get access! The weird thing is, I can access and edit the files.


So as I know the Slice string looking the strings or the integers but here I don't know why exactly I've got that parameter [:-4]. What exactly the python looks, in order to execute the fireDamage Why I need that parameter while I have the path. import arcpy   arcpy.env.overwriteOutput = True   arcpy.env.workspace = 'C:/gispy/data/ch06'   outDir = 'C:/gispy/scratch/'   fireDamage = 'special_regions.shp'   fireBuffer = outDir + fireDamage[:-4] + 'Buffer.shp'   bufferDist = '1 mile'  park = 'park.shp'   clipOutput = outDir + park[:-4] + 'DamageBuffer.shp'   arcpy.Buffer_analysis(fireDamage, fireBuffer,bufferDist)   print '{0} created.'.format(fireBuffer)   arcpy.Clip_analysis(park, fireBuffer, clipOutput)   print '{0} created.'.format(clipOutput)

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


If $d_{1}(x,y)$ and $d_{2}(x,y)$ are distance metrics, is $\sqrt{d_{1}(x,y)^{2} + d_{2}(x,y)^{2}}$ also a metric? How do you prove this? Thank you.

$d_1(x_1,y_1)$ and  $d_2(x_2,y_2)$ are metric on $X$ and $d(x,y)$ is defined as: $$d(x,y)= \sqrt{d_1(x_1,y_1)^2+d_2(x_2,y_2)^2}.$$ I am trying to show this is a metric. Can you give me some clue about proving the triangle inequality for $d$ ? Thank you for your help.


I'm not able to understand how refreshApex works in LWC.  Here is what i'm trying to achieve:  On a web component show -    Show most recent 10 records of Account a form (I used a lightning record form for creating new records , this comes with a save button which creates a new Account record and also refreshes the most recent view   This is the HTML code:  <template>  <lightning-card title="Recent Accounts" icon-name="standard:account">     <lightning-datatable data={accounts} columns={columns} hide-checkbox-column="true" key-field="Id"></lightning-datatable> </lightning-card> <lightning-card title="Create New Account">     <lightning-record-form          object-api-name="Account"         fields={fields}         onsuccess={handleSuccess}>     </lightning-record-form> </lightning-card>  </template>   JS:  import { LightningElement , wire , track} from 'lwc'; import { ShowToastEvent } from 'lightning/platformShowToastEvent' import { refreshApex } from '@salesforce/apex' import getAccRecs from '@salesforce/apex/GetRecentAccounts.getRecentAccs' import NAME_FIELD from '@salesforce/schema/Account.Name' import INDUSTRY_FIELD from '@salesforce/schema/Account.Industry'  /* eslint-disable no-console */  export default class refreshApexComp extends LightningElement {      wiredRslt;     @track fields = [NAME_FIELD,INDUSTRY_FIELD];     @track accounts;     @track columns = [         {             label : 'Name',             fieldName : 'Name',             type : 'text',             sortable : false         },         {             label : 'Industry',             fieldName : 'Industry',             type : 'text',             sortable : false         }     ];      @wire(getAccRecs) wiredCallbackResult(result){         this.wiredRslt = result.data;         if(result.data){             this.accounts = result.data         }     }      handleSuccess(event){         const evt = new ShowToastEvent({             title : "Account created successfully",             message : "Record Id " + event.detail.id,             variant : "Success"         });         this.dispatchEvent(evt);          refreshApex(this.wiredRslt);       }   }   Can someone tell me what am i missing here / doing in a wrong manner?  EDIT: I tried wiring the apex method to a property instead of a function and then use refreshApex on the same and it worked fine. This is the HTML and JS code.  <template> <lightning-card title="Recent Accounts" icon-name="standard:account">     <lightning-datatable data={accounts.data} columns={columns} hide-checkbox-column="true" key-field="Id"></lightning-datatable> </lightning-card> <lightning-card title="Create New Account">     <lightning-record-form          object-api-name="Account"         fields={fields}         onsuccess={handleSuccess}>     </lightning-record-form> </lightning-card>  </template>  export default class refreshApexComp extends LightningElement {      wiredRslt;     @track fields = [NAME_FIELD,INDUSTRY_FIELD];     @track accounts;     @track columns = [         {             label : 'Name',             fieldName : 'Name',             type : 'text',             sortable : false         },         {             label : 'Industry',             fieldName : 'Industry',             type : 'text',             sortable : false         }     ];      @wire(getAccRecs) accounts;      handleSuccess(event){         const evt = new ShowToastEvent({             title : "Account created successfully",             message : "Record Id " + event.detail.id,             variant : "Success"         });         this.dispatchEvent(evt);          refreshApex(this.accounts);       }   }

I am trying to clear the cache of my wire method. But I have added refreshApex in my code but I am getting error      Error: Refresh failed because resolved configuration is not available.   My Code   import { refreshApex } from '@salesforce/apex';  export default class LwcCaseCritical extends LightningElement {  caseCriticalControllerApex  /** *   @description: Get case information On page load *                  */ @wire(caseCriticalControllerApex, {caseid: '$recordId'})     getcaseCriticalControllerApex({error, data}) {          if (data) {              console.log('inside case Critical ControllerApex ');              this.caseCriticalControllerApex = data;             __showComponentLoader(this, '.pageLoader');             console.log('recordId ', this.recordId);             this.cases = data;             console.log('CriticalFlag ', this.cases.CriticalFlag__c);             this.oldPriorityValue = this.cases.Priority;               this.caseObject.CriticalFlag__c = this.cases.CriticalFlag__c;             this.caseObject.Priority = this.cases.Priority;             __hideComponentLoader(this, '.pageLoader');          } else if (error){             console.log(error);         }     }   /** *   @description: On click of save button *                  */     save(){     __showComponentLoader(this, '.pageLoader');      //this.cases.Id = this.recordId;     this.caseObject.Id = this.recordId;      console.log('cases details ' , this.cases);     console.log('caseObject details ' , this.caseObject);      saveApex({newCase : this.cases, updatedCaseValuse :this.caseObject,               errorMessage : '', oldPriorityValue: this.oldPriorityValue})         .then(result => {             this.errorMesage = result;              if(this.errorMesage !== null && this.errorMesage !== ''){                 __showNotification(this, 'Case',this.errorMesage, 'Error', '');             }else if(this.errorMesage === null || this.errorMesage === ''){                 __showNotification(this, 'Case','Case Updated', 'Success', '');                 this.refreshConsolePage();                  if(this.isEsclation === true && this.is3rdLevelUser === false){                     const clickedevt = new CustomEvent('savecomplete', {                         detail: { close : true },                     });                             // Fire the custom event                     this.dispatchEvent(clickedevt);                 }else{                     const clickedevt = new CustomEvent('savecomplete', {                         detail: { close : false },                     });                             // Fire the custom event                     this.dispatchEvent(clickedevt);                 }             }              console.log('this.isEsclation  ' + this.isEsclation );             console.log('this.is3rdLevelUser  ' + this.is3rdLevelUser );             /*             refreshApex(this.overrideCaseIfNeededApex);              refreshApex(this.showPriorityApex);             refreshApex(this.caseCriticalControllerApex);              */              __hideComponentLoader(this, '.pageLoader');             return refreshApex(this.caseCriticalControllerApex);          })         .catch(error =>{             console.log('error data ::: ' , error);         }); }  }   Do any one have nay idea why I am getting this error on click of button.


I built a custom google map php file to implement into the front page of my drupal site that uses both javascript and php, and it is being called via drupal_add_js in the template.php file. I'm having a hard time figuring out how to properly run the PHP within the javascript, and then set the results to the JavaScript variable markers. I'm attempting to push each result to an array and echo the array via json_encode($item); however, in my console, i'm getting an error that is Cannot read property 'lat' of undefined.   Here is my entire map.php:  var map = null; var infowindow = new google.maps.InfoWindow(); var markers = [Drupal.settings.markers];  window.onload = function () {  var mapOptions = {     center: new google.maps.LatLng(         parseFloat(markers[0].lat),         parseFloat(markers[0].lng)),     zoom: 13,     mapTypeId: google.maps.MapTypeId.ROADMAP }; var path = new google.maps.MVCArray(); var service = new google.maps.DirectionsService(); var infoWindow = new google.maps.InfoWindow(); var map = new google.maps.Map(document.getElementById("map"), mapOptions); var poly = new google.maps.Polyline({map: map, strokeColor: '#F3443C'});  var lat_lng = new Array();            for (i = 0; i < markers.length; i++) {            var data = markers[i]            var myLatlng = new google.maps.LatLng(data.lat, data.lng);            lat_lng.push(myLatlng);            var marker = new google.maps.Marker({                position: myLatlng,                map: map,                title: data.title            });            (function (marker, data) {                google.maps.event.addListener(marker, "click", function (e) {                    infoWindow.setContent(data.description);                    infoWindow.open(map, marker);                });            })(marker, data);        } for (var i = 0; i < markers.length; i++) {     if ((i + 1) < markers.length) {         var src = new google.maps.LatLng(parseFloat(markers[i].lat),                                           parseFloat(markers[i].lng));         var des = new google.maps.LatLng(parseFloat(markers[i+1].lat),                                           parseFloat(markers[i+1].lng));         service.route({             origin: src,             destination: des,             travelMode: google.maps.DirectionsTravelMode.DRIVING         }, function (result, status) {             if (status == google.maps.DirectionsStatus.OK) {                 for (var i = 0, len = result.routes[0].overview_path.length; i < len; i++) {                     path.push(result.routes[0].overview_path[i]);                 }                 poly.setPath(path);             }         });     } } }    and here is my page--front.tpl.php with my attempt in creating the array that will be accessible to my js file:  <?php    if (isset($_GET['routeselected']))    {   $result = mysqli_query($db, "SELECT * FROM STOP INNER JOIN RouteStop ON Stop.Stop_ID = RouteStop.Stop_ID WHERE RouteStop.Route_ID = " . (int)$_GET['routeselected'] . " AND RouteStop.Company_ID = " . (int)$_GET['companyselected']);   $markers = array();   while (($row = mysqli_fetch_array($result))){       $markers[$row['title']] = array($row['Stop_ID']);       $markers[$row['lat']] = array($row['Latitude']);       $markers[$row['lng']] = array($row['Longitude']);       $markers[$row['description']] = array($row['StopName']);       }     drupal_json_encode($markers);     drupal_add_js(array('markers' => drupal_json_encode($markers)), 'setting');   }   ?>   Does anyone possibly know the solution to my issue? Thank you for all and any help!

What is the easiest way to encode a PHP string for output to a JavaScript variable?  I have a PHP string which includes quotes and newlines.  I need the contents of this string to be put into a JavaScript variable.  Normally, I would just construct my JavaScript in a PHP file, à la:  <script>   var myvar = "<?php echo $myVarValue;?>"; </script>   However, this doesn't work when $myVarValue contains quotes or newlines.


I'm not a native english speaker and I'm asking this question for me to finish my Computer Science Instrumental English homework.

I am getting the following error trying to read from a socket. I'm doing a readInt() on that InputStream, and I am getting this error. Perusing the documentation this suggests that the client part of the connection closed the connection. In this scenario, I am the server.  I have access to the client log files and it is not closing the connection, and in fact its log files suggest I am closing the connection. So does anybody have an idea why this is happening? What else to check for? Does this arise when there are local resources that are perhaps reaching thresholds?    I do note that I have the following line:  socket.setSoTimeout(10000);   just prior to the readInt(). There is a reason for this (long story), but just curious, are there circumstances under which this might lead to the indicated error? I have the server running in my IDE, and I happened to leave my IDE stuck on a breakpoint, and I then noticed the exact same errors begin appearing in my own logs in my IDE.  Anyway, just mentioning it, hopefully not a red herring. :-(


Let $x$ be algebraic over $F$ such that the field extension $F(x):F$ satisfies $[F(x):F]$ odd. Then prove $[F(x):F]=[F(x^2):F]$ hence $F(x)=F(x^2)$. How to prove?  I only obtained the proof for the case $x^{2m+1}=1$. How to prove for a general polynomial $p(x)$ of odd degree such that $p(x)=0$?

Prove that if $[F(\alpha):F]$ is odd then $F(\alpha)=F(\alpha^2)$.  My justification for this question is as follows;  Suppose $F(\alpha^2)\subsetneq F(\alpha)$, we have $F \subsetneq F(\alpha^2) \subsetneq F(\alpha)$.  As $[F(\alpha):F]=[F(\alpha):F(\alpha^2)][F(\alpha^2):F]$ and $[F(\alpha):F(\alpha^2)]=2$ we would be end up with the case that $[F(\alpha):F]$ is a multiple of 2 i.e., even which contradicts given condition of $[F(\alpha):F]$ being odd.   So, $F(\alpha^2) =F(\alpha)$.  After doing this, i have seen for a solution on some webpage where he/she used criterion of minimal polynomial.  Please let me know Is my justification clear or there are any gaps in between?


I've seen a lot of tutorials on how to build infinite runners and came up with a question about game optimization.   This types of games are built on two ways, according to my research; these are:   Set the player and camera static. Usually on the origin of the world space, and have all the environment assets created on the distance and move them towards the user.  The environment assets are created on a straight line to infinity and the player and the camera both move forward until the player loses. This means the environment's position will not be changed once they are created.     My question arises from here. Which of the two involves less calculations? Which one gives the player a better feel of movement? Is the difference actually significant (in terms of performance) or is it just a trivial question?

I'm about to start developing a sidescrolling game where the player's goal is to travel as far as he can in the horizontal axis before touching down. Note that I do not need to ever travel back on the horizontal axis.   I'm developing this with the AndEngine for Android which uses OpenGL and Box2d.  Before starting, I need to decide on something important: should I use the world around the player to simulate movement or actually move the player and follow him with the camera features of the game engine?  Both approaches seems to have different strengths and fallbacks, so I don't know which one is considered best. For example, what would make it easier to add power ups along the way and have a nice animated background?  Thanks!


We considered mutual inductance in my lectures and the definition $M=k\sqrt{L_1L_2}$ where the coupling constant $k$ can vary between 0 and 1. When covering transformers, my lecture notes "assume that all of the flux couples to both coils, such that the coupling coefficient is equal to unity". However I am not sure how this is the case, unless also the self inductance of each coil is the same (which certainly is not the case in the rest of my notes!).  In particular, the flux through each coil is  $$\phi_1 = L_1I_1 + MI_2 = L_1I_1 + k\sqrt{L_1L_2}I_2$$  and   $$\phi_2 = L_2I_2 + k\sqrt{L_1L_2}I_1$$  Equating these and rearranging, I find that   $$\sqrt{\frac{L_1}{L_2}}I_1 + \sqrt{\frac{L_2}{L_1}}I_2 = (I_1-I_2)k$$  so $$k=1 \iff L_1=L_2$$  Have I misunderstood what it means for 'all of the flux to couple to both coils'?

I've been stuck on this problem for about an hour.     In an ideal transformer, the same flux passes through all turns of the primary and of the secondary . Show that in this case $M^2=L_1L_2$, where $M$ is the mutual inductance of the coils, and $L_1$, $L_2$ are their individual self-inductances.   My first instinct was the following: If we isolate the response of each coil to the other one, we get the equations $N_1\Phi_1=MI_2$ and $N_2\Phi_2=MI_1$, where $\Phi$ is magnetic flux going through a single turn of the coil and $I$ is current. Likewise, if we isolate the response of each coil to itself, we get the equations $N_1\Phi_1=L_1I_1$ and $N_2\Phi_2=L_2I_2$. I would now naturally want to say "Now just multiply $N_1\Phi_1$ and $N_2\Phi_2$ both ways, and get the desired result!" i.e.,  $$(N_1\Phi_1)(N_2\Phi_2)=(MI_2)(MI_1)=(L_1I_1)(L_2I_2)\implies M^2=L_1L_2$$  But that's incorrect, because the response of the coils to themselves and to the other coil are different quantities (i.e. not necessarily equal).  Realizing this, I write down the more general equations.  $$N_1\Phi_1=MI_2+L_1I_1$$ $$N_2\Phi_2=MI_1+L_2I_2$$  Now even with the hypothesis that $\Phi_1=\Phi_2=\Phi$, I still can't see how the identity $M^2=L_1L_2$ follows. Could you help clear up my confusion?  *Taken from D. Griffiths Introduction to Electrodynamics (4th ed.), Problem 7.58.


I would like to install java to learn to program in java and develop web and android apps. I'm running on Ubuntu 18.04 LTS (which doesn't come with java pre-installed). I have seen that there a number of possibilities: OpenJDK, Apache JDK, and each with different versions of Java.  Which one would you recommend to install given my specifications, and which commands do I need to issue to the terminal?

Please tell me the full process of installing Android Studio and its necessary dependencies.


I tried to check for updates in mu ubuntu 14.04 and getting error  W: Failed to fetch   404  Not Found  W: Failed to fetch   404  Not Found  E: Some index files failed to download. They have been ignored, or old ones used instead.

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


How can I rotate them correctly? I want it with a patricle system so i can quickly add more spikes if needed

I know how to make it manually with cone rotation around the sphere. but maybe there's much simpler solution or addon that has that option, preferably not very high poly solution.  Also if possible I would like the spikes not to be very pointy if that makes any sense      Thanks


Let $(G, *)$ be a group and $a$, $b$ belongs to $G$. Suppose that $a^2 = e$ and $a*b^4*a = b^7$. Prove that $b^{33} = e$. I dont know how to proceed.

Let $G$ be a group and $a,b \in G$. Prove that if $a^{2}=e$ and $ab^{4}a=b^{7}$, then $b^{33}=e$, where $e$ is the identity of a group $G$.


When man <cmd> or <cmd> --help or <cmd> -h doesn't show you how to use the command, what should you do to get the information you need?  For example, the command enable has no manual page.   Type enable --invalid_option will only show you the usage enable: usage: enable [-a] [-dnps] [-f filename] [name ...] without any explanation. Since the term enable is too generic, searching online for ubuntu terminal command enable will only give you lots of unwanted results.   So is there a best way to get the manual of a command, when man <cmd> doesn't work?

I'm running Bash scripting, but sometimes I get confused which of these commands I use belong to who. Sometimes man xxx works, sometimes doesn't, so I use --help or info, mostly one of these works to show description of the command. Can anyone tell me how I would know what command belongs to what? Bash builtin, GNU utility, etc.


How do I show the GRUB menu in GRUB 2 during boot up?

My system is not dual-boot, I run a standard Ubuntu desktop system "on the metal" (I think running it in a VM is the same).  Pressing c while booting does not cause the GRUB menu to appear (which I believe it does for a dual-boot system).  How can I get the GRUB-menu to present itself on a single-boot system?


This is a follow-up question to .  I've tried \begin{appendices} ... \end{appendices} and, whilst it does not show any errors, the word Chapter appears for Appendix items in TOC.  Change to \appendix (and do nothing else) and the word Chapter changes to Appendix. I am just surprised because the former would appear to be a more precise control.

In several discussions about relatives merits of LaTeX v. xml, a xml supporter complained that in LaTeX sections, subsections etc are not properly closed, so it is hard to tell where a section ends.  Of course it is typically possible to recognize an end of a section, but there is actually a number of ways how a section can end: start of another section, start of the next chapter or part, start of \endmatter, bibliograpy, index, etc, or the end of document.  That makes it hard if you want to write a script that would in some way manipulate sections (change their order, write each of them into a separate file, ...).  The same is of course true for subsections, paragraphs etc.   One answer to that is that it is actually possible in LaTeX2e to use sectioning commands as environments, and write   \begin{section}{Blah blah}    ... \end{section}   and because of the way environments are handled in LaTeX2e, it will work.  I he recently seen several comments discouraging such use of regular commands as environments, and it seems that in LaTeX3 it will no longer be possible (on the other hand, it seems that you will be able to define a section environment without causing a conflict with the \section command).   I wanted to know what people think about using sectioning commands as environments.  Is it a good idea, is it OK, or should it not be done?


I've made a githook for my current project, it works for me locally, now I'm trying to share it with my team. We are using Windows. Our team is volatile and distributed, people work on many different projects at the same time and can't be expected to perform additional manual configuration of repositories, so, I need the hook to just start working for them with next pull. I've found several tutorials, but all of them suggest additional configuration on recipient side. I need to avoid that.  P.S. Ideally, I'd expect to just add .git/hooks folder to the repo, but that seems to not be possible in GIT.

We'd like to make a few basic hook scripts that we can all share -- for things like pre-formatting commit messages.  Git has hook scripts for that that are normally stored under <project>/.git/hooks/.  However, those scripts are not propagated when people do a clone and they are not version controlled.    Is there a good way to help everyone get the right hook scripts?  Can I just make those hook scripts point to version controlled scripts in my repo?


I'm doing this model where it required me to wrap around and I decided to merge at the end and you can clearly see where it was merged at the bottom left and I'm curious as to how I can fix this so it looks just as smooth as it does going around.  Picture:

was following a tutorial where I stumbled into this weird line in my mirrored mesh (sorry for the feet lol)      You can also download the blender file


The sentence is: Her face was displayed on a five-metre square monitor. I want the area to be five square metres. Which is correct (or are they all wrong):  a five-metre square monitor a five metres square monitor a five-metre squared monitor   I know I could write 'a monitor with an area of five square metres', but people often use one of the above and I would like to know which is correct and why in terms of grammatical rules.

I am a little bit confused about using units in English, sometimes I hear that people use singular units for plural things, sometimes they use plural ones. Which one is correct?   3 meter(s) long? during a 2 week(s) period? 0.5 dollar(s)


Hi! It’s my second day in blender and I have made a vase. But for some reason there is lights that shine when I try to change base colour while in viewport shading. I’d just like to set it to green /blue. Help would be much appreciated !

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?