body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
I am attempting to find solutions to $x^y = y^x$. I have been trying to find solutions to this equation for quite some time now, and using all the math (and common sense) I know, I arrived at one possible non trivial solution, $x = 4, \;y =2.$ Are there other solutions to this equation and if there are how do I find them? | We know that $2^4 = 4^2$ and $(-2)^{-4} = (-4)^{-2}$. Is there another pair of integers $x, y$ ($x\neq y$) which satisfies the equality $x^y = y^x$? |
The version of MySQL is 8.0.16. This is installed on an EC2 Linux and is a fresh install. I have run the mysql_secure_installation command after installation and was able to change the root password successfully and was also able to add a second user with basic privileges. To test the connection I made a simple script: $link = mysqli_connect($dbhost, $dbuser, $dbpass); if (mysqli_connect_error() ){ echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL; }else{ echo "Connection successful"; } I have double checked the values of the variables and they are all correct. When I try to visit the URL it says: Debugging errno: 2054 How to resolve this? | I use PHP 5.4.3 and I want to connect to a MySQL database (DB for brevity) remotely (the PHP script resides on a different server than the DB) with normal object-oriented programming (OOP) way: $mysqli = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME); and I get the error: Warning: mysqli::mysqli(): The server requested authentication method unknown to the client [mysql_old_password] Connect Error (2054) The server requested authentication method unknown to the client I found and but they don't seem to help. I used PHP 5.2.9 and everything worked OK, but downgrading the PHP version is not a solution for me. I also have to mention that I don't have full access to DB's settings cause the client doesn't give me that kind of access. I told him to ask Hostgator for a newer password format support, but they answered that they cannot do anything which was not what I was expecting. I did a new effort from another remote server and I get now this: Connect Error (1045) Access denied for user 'user'@'host' (using password: YES) by using PHP 5.3.9. It looks like the DB doesn't "let me in" because of the remote server's PHP script, but with Oracle's Workbench everything works fine. Thanks for your time. |
How does one understand $0!=1$. Is it purely a theoretical value for convenience? as the definition of factorial i.e., $n!=n\times(n-1)\times(n-2)\times...1 $ actually fails here. How can it be logically understood by the definition of factorial. | How can I prove from first principles that $0!$ is equal to $1$? |
I have a US Business/Tourist Visa on my Indian Passport and want to travel to Mexico City for business. Can I travel via Amsterdam? I want to avoid transiting US as it is increasing my travel cost. | I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows: Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland |
I was recently issued a France Schengen Visa (multiple entries); however, I want to travel to Italy next month...will I need to apply for a Spanish Schengen Visa or can I use the France Visa to go to Italy? | My wife was just issued a multiple entry visa by France, which is good for one year. Our first trip will be to France, the issuing country. My question is: after we leave the EU and return, must future trips also start in France? Or may we go directly to (say) Greece from the US on a later visit? |
I am a sophomore in high school. When I approach a math problem or concept, I normally try to determine a formula or systematic method of solving all similar problems. However, since I entered precalculus, I have found that this approach does not work. I really love math and find it interesting and exciting, but I find that I am unable to solve the kinds of conceptual problems that I have been doing more recently. For example, when I try to do a counting problem, it is often unclear how to approach it. How can I improve my problem-solving and critical thinking skills? Also, how can I approach problems logically to solve ones that are not clear at first? | I'm a sophomore in university and seriously feel that I'm bad at solving mathematical and algorithmic problems (be it discrete math, calculus or just puzzles). I noticed that I'm only good at solving questions that are similar to the ones that have been taught to us. Here's how I generally approach it: What is the problem? What do I need to do here? Does it look like I've encountered this before? Can I think of a smaller problem to solve instead? If the answer is no to all the above then I sort of blank out. I stare at it and force my brain to run through a wide variety of stuff, almost like a brute force attempt of solving it. Obviously that leads me to nowhere everytime. I simply can't think "outside the box." What can I do to improve my situation? |
One thing that I observed is that you're not automatically signed up for a Stack Exchange that you haven't sign up. My suggestion is to automatically sign them up to all Stack website (Think like Google. When you have sign up for Gmail, you already signed up too for YouTube. (Well okay, when first time visiting You Tube, you need to configure the channel name, but you got my point)) Example: I have register at Stack Overflow, why cant SE just signed up it all for other Stack website (like Programmers, RPG, Christianity, etc....) Or maybe, the SE will automatically signed you up when you ask a question or answer for the first time on the site Note: I'm not looking for one account for all Stack website, which of course, has been covered by OpenId, but I'm looking forward for a feature that will automatically sign me up for others website. Which is I'm suggesting. Thanks. | I've seen a number of cases when questions have been migrated from one site to another (SO-->SF, SO-->SU etc). If the original asker doesn't have an account on the site to which the question has been migrated, he basically loses track of the question. This is especially true of questions that are migrated to SU which still needs a password having to do with . I suggest that once you have an account on one of the sites, you should also have an account in each of the sister sites so that you can easily keep track of all your questions that have been migrated. Edit: I know you can link the accounts. I just think this should be automatic in order to reduce friction. |
Suppose we have a pdf file of a form that of A4 format. Without saying so, the writer of the pdf form expects us to print it out, fill in the form by hand and post it as a snail mail. Is it possible to import the pdf into a LaTeX document (similar to import of an image file) and fill in the form using say a large tabular environment. | I have a form as a PDF file. I would like to use LaTeX/TeX to overlay my text over the form, and send the output to either a print or another PDF file. Is this possible? How would I go about it? |
I just got Blender and I don't know how to add textures to only one side. I've tried finding an answer but i can't. It adds the texture to all sides of the object. I just want the blue on one side of the square. BTW i don't know where anything is in blender so if you have an answer please include pictures. | How do you add more than one material to a mesh? I have tried adding two materials to the object, and then assigning one of the materials to a vertex-group, but I could not find a place to assign it. I am making a striped bouncy ball that I want to deform, so adding a different material by separating the mesh into different objects would not be ideal. |
My game isn't letting me catch the legionaries Azelf, Uxie, and Terrakion. I've checked, double checked, and triple checked, I'm getting all of the requirements. but it's not letting me battle, I can get to the portal and I have defeated the elite four again but I get the same results | There are a lot of legendaries available in ORAS, however a lot of them will only show up/be available if certain prerequisites are met. I know Groudon/Kyogre are available through the Story, and Rayquaza & Deoxys through the postgame Delta episode, but what about the other available legendaries? What do I need to do to catch them? |
I have this function function validateUsername(str,minL,maxL){// i'm passing validateUsername("asdf_1",2,8) var exp=new RegExp(/^[a-z0-9_-]\w{"+minL+","+maxL+"}$/); switch(exp.test(str)){ case true: return true; case false: return false; } } I want to insert minimum Length and maximum length dynamically, But if above code used,its giving me false whether it should accept the string as true. can anyone tell me, what should i use rather "+variable+" to insert the value dynamically. Thanks in advance. | 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? |
I know that my reasoning is incorrect, I just don't know where I went wrong. I did discuss this with my Maths teacher, and even she could not find what I did wrong. Let us begin by assuming a function, $f(x)$ that is continuous and has an antiderivative in the interval $[0, 2\pi]$. Let $A$ be the area under the curve for $f(x)$ in the interval $[0, 2\pi]$ $A = \displaystyle \int_{0}^{2\pi}{f(x)\space\mathrm{d}x}$ Now there must exist a function, $g(x)$ such that: $f(x) = g(x)\cdot \cos(x)$ Substituting the value of $f(x)$: $A = \displaystyle\int_{0}^{2\pi}{g(x)\cdot \cos(x)\space\mathrm{d}x}$ Using t substitution: Let $t = \sin(x)$ Then: $\mathrm{d}t = \cos(x)\space\mathrm{d}x$ And: $x = \arcsin(t)$ Changing the limits: $t = \sin(x)$ $0$ becomes $\sin(0) = 0$ $2\pi$ becomes $\sin(2\pi) = 0$ Substituting in the definite integral: $A = \displaystyle \int_{0}^{0}{g(\arcsin(t))\space\mathrm{d}t}$ But Definite Integral where the lower and upper bounds are the same is $0$. So: $A = 0$, which is not possible. Thanks for the help. | Quick question, might end up having a simple answer, but I have here a "proof" that any integral from 0 to $2\pi$ is zero, as follows: $$\int^{2\pi}_0f(x)dx$$ Now using u-substitution, let $u = \sin x$, so $dx = \frac{du}{\cos x}$, so: $$\int^{0}_{0}\frac{f(x)du}{\cos x}$$ (The bounds were evaluated to zero due to the u-substituion). However, this is zero, since the integral goes from zero to zero. Any help as to why this is wrong would be appreciated. |
Can someone help me understand the meaning of the p-value of the Whelch's T Test in SciPy? test = stats.ttest_ind(x, y, equal_var=False) gives me Ttest_indResult(statistic=5.4320992218489925, pvalue=7.614106565771353e-08) But with a statistic of 5.43, shouldn't be a 0.00000... p-value according to the T table instead? | I have a problem with the interpretation of a test result in which the p-value is 8.6e-28. How should it be interpreted? What is the e for? Specifically, I used White's Test for the homoscedasticity assumption of a linear regression: White's general test statistic : 150.0535 Chi-sq( 9) P-value = 8.6e-28 |
Recently, I was going around looking for ideas on what I can build using C this summer and I came across this post: Implement a programming language. This doesn't have to be terribly hard - I did the language that must not be named - but it will force you to learn a lot of the important parts of C. If you don't want to write a lexer and/or parser yourself, you can use lex/flex and yacc/bison, but if you plan on that you might want to start with a somewhat smaller project. I was kinda intrigued about the implementing a programming language answer and I'm wondering how do I go about starting this? I've gone through the whole K&R book and I've done some of the exercises as well. I also have a bit of experience in C++ and Java if that matters. Any tips? Thanks! | If I were looking to create my own language are there any tools that would help me along? I have heard of yacc but I'm wondering how I would implement features that I want in the language. |
So I am to prove that every $\mathbb C$-subalgebra of the ring $\mathbb C[x]$ is a finitely generated $\mathbb C$-algebra. So.. what I know is: $\mathbb C$ is Noetherian and thus $\mathbb C[x]$ is too. Every finitely generated $\mathbb C$-algebra is a quotient of $\mathbb C[x_1,...,x_n]$. Well, I am not even sure how to use these two things to begin with. Any help? | Suppose $k$ is a field, $A$ is a $k$-subalgebra of the polynomial ring $k[x]$. Must $A$ be a finitely generated $k$-algebra? Thanks. |
I've heard and read that our solar system lies near to the peripheral region of the Galaxy. Then accordingly we would have a greater probability of sustaining to eventual gulping down by the super-massive black hole. But how long ? | I'm making several assumptions, not sure if any are correct: there is a black hole at the center of a galaxy the black hole is eating the galaxy Eventually the galaxy will be gone, right? Has this been observed? Do we know what happens afterwards? Posting here since astronomy got merged into physics |
I am using Ubuntu 20.04. On Fedora/Red Hat or its derivatives,the installation can be performed using the following command: sudo dnf install make gcc-c++ However, on Ubuntu it gives me sudo: dnf: command not found How can I fix this problem? | /usr/bin/perl install-module.pl --all ERROR: Using install-module.pl requires that you install "make". I need to install make on my ubuntu on AWS EC2. How can I do that ? I could finally install build-essential also successfully. # make make: *** No targets specified and no makefile found. Stop. |
I just upgraded from CS6 2018 to 2020. Now whenever I select a white background and press delete, a fill popup shows up instead of making the image transparent. How do I change this? | The previous version of Photoshop I used was CS4 and whenever I selected a portion of an image with the magic wand and hit Delete, it simply deleted that portion of the image (rendering it transparent). Easy! In CS6, this is not the case. Now when I select a portion of an image and hit Delete, it brings up the Fill dialogue. For example I have this picture (it's a Vauxhall Corsa). I want to use the Magic Wand to render anything that isn't part of the car transparent, so I start by highlighting some clouds with the Magic Wand like so: Click on images to see larger versions Now when I hit Delete, instead of that area of the picture being deleted as I would expect based on my experience with CS4, I get this dialogue: My questions are: Can this dialogue be used to achieve the functionality I want? If so, how? If not, how do I delete the background in CS6? |
There are 400 people in a room. I pick two people at random. What is the probability that they have the same birthday? I know that there must be two people in the room who share the same birthday through pigeonhole principle. But if I pick two people at random I am not sure how to calculate the probability. | Suppose a room contains $n$ people. What is the probability that at least two people share the same birthday? Let $A$ be the probability that at least two people have the same birthday. I know that the way to solve this question is actually to find the complement of A and solve $1 - P(A^c)$. However, I'm confused on why $A^c$ is the probability that no one shares the same birthday (everyone has different birthdays), and not the probability that at most two people share the same birthday. Isn't the opposite or complement of "at least two people share the same birthday" equal to "at most two people share the same birthday?" |
Let us assume that a ship is traveling relative to earth at the speed close to C. My understanding is that according to special relativity it should be impossible to tell whether a ship is moving and earth is stationary or vice verse (all laws of physics should behave exactly the same in both cases). However, if we take the frame of reference of earth the atomic clock on the ship would be ticking slower (due to time dilation) -> clocks on earth would appear to run faster for observer on the ship. Shouldn't it be the reverse if the ship was stationary and earth was moving? Why does it not contradict the principle of relativity? | There is a problem with my logic and I cannot seem to point out where. There's a rocket ship travelling at close-to-c speed v without any acceleration (hypothetically), and there is an observer AA with a clock A on Earth, and there's another observer on the rocket BB with a clock B and these two clocks were initially in sync when the rocket was at rest with a FoR (frame of reference) attached to Earth. Now, this rocket's moving and AA tells us that B is running slower than A by a factor of$$ \gamma = 1 /(1-v^2/c^2)^{1/2} $$ $$ t_A/t_B = \gamma $$ where v is the relative 1d- velocity between the two i.e the earth and the rocket! That would mean the time elapsed on A is greater than that on B but this will happen only in the FoR of AA? So $t_B$ in this equation must be the time on B as observed by AA? Is this correct? What do the terms mean in the equations? If the symmetry holds and BB doesn't accelerate, then BB could say that $$ t_B/t_A = \gamma $$ right? where $t_B$ and $t_A$ are the times on B and A with respect to FoR of BB? But I was solving this problem and I took the earth FoR of A, but the prof took the rocket FoR of B? Like how will I know which FoR to solve the problem from? It'd greatly help if the terms in all the above equations were laid down neatly! DO we even need these FoRs?? Because in all the solved problems the prof is't specifying any and is using random ones! Please help!!!! This is the question where I messed up. The first rocket bound for Alpha Centauri leaves Earth at a velocity (3/5)c. To commemorate the ten year anniversary of the launch, the nations of Earth hold a grand celebration in which they shoot a powerful laser, shaped like a peace sign, toward the ship. According to Earth clocks, how long after the launch (of the rocket) does the rocket crew first see the celebratory laser light? This must be 25 years. My reasoning is: If v = 3c/5 10v + vt = ct where t is time taken by the light to reach the rocket from Earth as calculated from Earth.. and I solved that for t. and added 10 years to that because the time starts at the launch of the rocket! According to clocks on the rocket, how long after the launch does the rocket crew first see the celebratory laser light? This is 20 years. Here, I say: If it takes 25 years as observed by clocks on earth for the laser to reach the rocket, what should be the corresponding time as seen on a clock on the rocket? Using the formula: 25 = $\gamma$t where $\gamma$= 5/4 solved for t! According to the rocket crew, how many years had elapsed on the rocket's clocks when the nations of Earth held the celebration? That is, based on the rocket crews' post-processing to determine when the events responsible for their observations took place, how many years have passed on the rocket's clocks when the nations of Earth hold the celebration? For this, I did the following: 10 years on earth = T years on rocket ship where T must be lesser than 10 as observed from Earth FoR! Therefore, T= 4(10)/5 years = 8 years! But, prof says, 10 years on Earth = T years in rocket ship where T must be GREATER than 10 as observed from the rocket FoR??? Therefore, T = 10(5/4) years = 12.5 years!! What does this question actually want? |
This holds for if $x$ is natural nunbers greater than $1$ so i think it would work for every real nunber $x$ greater than $1$. | For $\alpha\in\mathbb{N}$ we can use the Binomial and get: $$\left(a+b\right)^{n}=\sum_{k=0}^{n}{n \choose k}a^{k}b^{n-k}=\sum_{k=1}^{n-1}{n \choose k}a^{k}b^{n-k}+a^{n}+b^{n}>a^{n}+b^{n} $$ But what about rational and irrational powers? Respectively, can we also say that $\left(a+b\right)^{\alpha}<a^{\alpha}+b^{\alpha}$ for all $\alpha<1$? |
I am trying to get the value of table row using jQuery. When I try the same jQuery code on console and after I try to click, that is selecting that row and give proper value what I expect. But I don't know why it is not running from my JavaScript file. But the other functions are working on the same JavaScript file $(".chequeTable tbody tr").click(function() { alert('Vendor ID =='); $('.selected').removeClass('selected'); $(this).addClass("selected"); alert('Vendor ID ==' + $('.tdVendorID').html()); $(this).css("background-color", "#000000"); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <table class="table table-hover FilterTable chequeTable table-striped" id="queryTable"> <thead> <tr> <th>S.No</th> <th>VendorID</th> <th>VendorName</th> <th>ReqNo</th> <th>ChequeAmount</th> <th>VendorBalance</th> <th>Balance</th> <th>Description</th> <th>StockValue</th> <th>Yes/No</th> </tr> </thead> <tbody> <tr class=""> <td class="tdSno">1</td> <td class="tdVendorID">6000 </td> <td class="tdVendorName">john</td> </tr> </tbody> </table> | I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off. This happens on page ready and works just fine. The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound. I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option. |
I'm coming from windows and still new to Ubuntu. Occasionally everything freezes and I lose my taskbar and launcher. What do I do? What's the Ubuntu equivalent of ctrl+alt+del in Windows? I tried alt+f2 to bring up the "special terminal," but what can I do from there? I tried "sudo shutdown now" but that didn't fully shut down the computer and I needed a hard shutdown. If I do manage to figure out what's wrong and fix it from the alt+f2 terminal, how do I get back to the desktop? | All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when... just one program stops responding? nothing at all responds to mouse clicks or key presses? the mouse stops moving entirely? I have an In what order should I try various solutions before deciding to pull the power plug? What should I do when starting up Ubuntu fails? Is there a diagnostic procedure I can follow? |
Unless I've fundamentally misunderstood the way events and garbage collection work in C#, if an object has subscribed to an event, the event can still be raised on that object, and the event handler executed, even if the object is out of scope and eligible for garbage collection. So my question is this - is there any way for an object's event handler to check whether the object itself is eligible for garbage collection, with a view to ignoring and/or unsubscribing from the event? | If I have the following code: MyClass pClass = new MyClass(); pClass.MyEvent += MyFunction; pClass = null; Will pClass be garbage collected? Or will it hang around still firing its events whenever they occur? Will I need to do the following in order to allow garbage collection? MyClass pClass = new MyClass(); pClass.MyEvent += MyFunction; pClass.MyEvent -= MyFunction; pClass = null; |
I'm having trouble getting the output I want. I want to create a list and have the first element of a new list be that initial list. Then I want to modify the first list, and have the new modified version of that list be the second element of the new list. Right now, this outputs [[2,3,4,5,5],[2,3,4,5,5]]. How would I modify it so that the output is [[1,2,3,4,5], [2,3,4,5,5]]? noChange = [1,2,3,4,5] lotsOfLists = [] lotsOfLists += [noChange] for i in range(4): noChange[i] += 1 lotsOfLists += [noChange] print(lotsOfLists) # current output: [[2, 3, 4, 5, 5], [2, 3, 4, 5, 5]] # WANT: [[1,2,3,4,5], [2,3,4,5,5]] | I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3 The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]] Then I changed one of the innermost values: my_list[0][0] = 5 Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]] which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it? |
/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.anil.mynewapp, PID: 408 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.example.anil.mynewapp.SignupAuthentication.signupAuthentication(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)' on a null object reference at com.example.anil.mynewapp.Second$1.onClick(Second.java:40) at android.view.View.performClick(View.java:6294) | What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely? |
I'm trying to sanitize a date sent from jquery's datepicker before inserting it into a mysql database but I can't seem to get it to work. Can anyone tell me what I'm doing wrong? Thanks. //Pull date from datepicker $date=$_POST['date']; //Convert to date for mysql insertion $mydate = date ("Y-m-d", strtotime($date)); $clean_date = preg_replace("([^0-9/])", "",$mydate); | If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the user can input something like value'); DROP TABLE table;--, and the query becomes: INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--') What can be done to prevent this from happening? |
Should I use '' I had been listening to this concert since it started snowing, at seven.'' or ''I have been listening to this concert since it started snowing, at seven.'' I never know when to use present perfect or past perfect. | Non-native speakers often get confused about what the various tenses and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter. I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be incorporated into the diagram. Nota bene: What this is not is a discussion of whether there are more than two tenses in English. , to which this question is not intended to supply arguments one way or the other. Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better. Breaking News There is now an excellent ELU blog article titled . It is highly recommended reading. |
A student asked me tonight why we say "something caught my eye," and not "something caught my eyes." This is not just limited to eyes but also: "lend me your ear." "Can I give you a hand?" or "an eye for detail." Is this because we are not thinking of the actual body part but it's function? This question was asked before but the answer and comments do not address the question very well. | I am not a native English speaker, I usually hear “something caught my eye” but never “something caught (both) my eyes”. This seems pretty strange to me. Cambridge Dictionaries Online provide these examples but without any explanation (i) to get someone's attention: A sudden movement caught my eye. (ii) to get someone's attention, especially by looking at them: I tried to catch the waiter's eye, so we could order. (iii) to be attractive or different enough to be noticed by someone: It was the unusual colour of his jacket that caught my eye. Why is only one eye ‘caught”? Doesn't something catch our sight? We normally see with both eyes, not with one. |
In a master thesis, I need to refer to a model described elsewhere, from a section title, like \section{Analysis of model X} One way of referring to a model is to create a new counter, and then write \section{Analysis of \cref{grandmodelofeverything}} But now hyperref will complain because of invalid token, and it does not look good in the TOC either, especially since the titles of the sections the describe the models are more descriptive than \section{Model 1} They are currently like \section{Adding the effect from Y processes} Do I need to invent semi-descriptive long names like "The model by Authors with this modification" or can I live with these quirks? | I need to refer to a model described elsewhere, from a section title, like \section{Analysis of model X} One way of referring to a model is to create a new counter, and then write \section{Analysis of \cref{grandmodelofeverything}} But now hyperref will complain because of invalid token, and it does not look good in the TOC either, especially since the titles of the sections the describe the models are more descriptive than \section{Model 1} They are currently like \section{Adding the effect from Y processes} Do I need to invent semi-descriptive long names like "The model by Authors with this modification" or can I live with these quirks? |
I am working on the following assignment in Symplectic geometry: Let $G$ be a Lie group acting on a symplectic manifold $(M,\omega)$, and let $X_M=\dfrac{d}{dt}\bigg|_{t=0}\exp(tX)\cdot x$ for $X\in\mathfrak{g}$ be the fundamental vector field. Then the Association $\mathfrak{g}\ni X\mapsto X_M\in\text{SympVec}(M,\omega)$ is an anti-Lie algebra homomorphism. We have that $$ [X,Y]_M(x)=\frac{d}{dt}\bigg|_{t=0}\exp(t[X,Y])\cdot x=\frac{d}{dt}\bigg|_{t=0}\exp(t\cdot\frac{d}{ds}\bigg|_{s=0}\text{Ad}_{\exp(s X)}Y)\cdot x, $$ How is this equal to $-[X_M,Y_M](x)$? | There are two claims in McDuff-Salamon's Introduction to Symplectic Topology, 3rd edition on p. 202 that I've been trying to figure out but haven't been able to. Let $G$ be a Lie group acting symplectically on symplectic manifold $(M,\omega)$; this means that we have a smooth group morphism $G \to \text{Symp}(M,\omega), g \mapsto \psi_g$. Here, $\psi_g$ is a symplectomorphism. Then, we get a Lie algebra morphism $\mathfrak{g} \to \mathcal{X}(M,\omega)$ on which assigns to each $\xi \in \mathfrak{g}$, a symplectic vector field $X_\xi$. The prominent property of this vector field is that the contraction $\iota_{X_\xi} \omega$ is a closed 1-form. More explicitly, we may define this $X_\xi$. $$X_\xi:= \left.\frac{d}{dt}\right|_{t=0} \psi_{\exp(t\xi)}.$$ The authors claim that it is a straightforward calculation to show the following for $\xi,\eta \in \mathfrak{g}, g \in G$: Letting $g^{-1}\xi g:= \text{Ad}(g^{-1})\xi := \frac{d}{dt}|_{t=0} \;g^{-1}\exp(t\xi)g$, we have that $X_{g^{-1}\xi g} = \psi^*_g X_\xi$. $X_{[\xi,\eta]} = [X_\xi,X_\eta]$. I do not have much fluency with Lie groups so I barely know where to start. Any help is appreciated. |
I tried to click the recently earned hat in Winter Bash popup box, but it is not working and no action to that click. Note it is working in Stack Overflow, but not in . | Clicking a hat in the top bar achieved hats list redirects to the profile page, opening the hats dialog and choose the hat, ready to be confirmed. Superb! While I was still checking on my existing hats I got a new hat. In a reflex I clicked the hat in the top bar notification but... nothing happened. Well, the URL changed to http://meta.stackoverflow.com/users/152859/sha-wiz-dow-ard#winter-bash-[id] but since it didn't trigger page reload the dialog did not open and I had to do that manually. (the horror!) Can this please be fixed? |
If a block is at rest on the incline plane at an angle of 30 degrees, would the maximum frictional force that would allow the block to stay in place be calculated using 30 degrees, OR would we have to find the minimum angle of the incline plane needed for the block to slide before we can determine the maximum frictional force? That is, find that minimum angle using tangent inverse of the coefficient of friction given (between the surfaces) and then substitute it in the formula for fs(max) = UsMgcos (minimum angle needed for block to slide) to get the maximum frictional force that would allow the block to stay in place? | A block of mass 90 kg sits on a slope with an angle of inclination 12° above the horizontal. The coefficients of friction between the block and the slope are µk = 0.03 and µs = 0.2. a. What is the maximum frictional force that will allow the block to stay in place? b. At what angle of inclination will the block start to slide down the slope? My Question: I am not looking for these two questions to be answered, however, the question has caused me to doubt my understanding of static and kinetic friction re: incline planes. When i calculated the the angle at which the block would begin to slide, using the arc tangent of 0.2 i got an angle less than 12 degrees. However, the question is suggesting that the block is at rest with when the incline plane is at 12 degrees. What is my conceptual error in thinking? My next question: Wouldnt the minimum angle of the incline plane (tan inverse of 0.2) be needed in answering the first question? that is, having it placed in the formula for the static friction formula = 0.2 x 90kg x 9.81 x cos of (tan inverse of 0.2)? assuming that tan inverse of 0.2 was found already? Is there something wrong with the question or how am i thinking is conceptual flawed? My Final Question: Is it that the maximum frictional force that allow the block to stay in place is based on whatever angle the incline plane is set at? So, for example, if the incline plane is lowered to an angle of 5 degrees, the max friction force will be adjusted, even though the block would slide at 11.31 degrees? Is it that if lowered to 5 degrees, that the max friction force to overcome would be different? In other words: If a block is at rest on the incline plane at an angle of 30 degrees, would the maximum frictional force that would allow the block to stay in place be calculated using 30 degrees, OR would we have to find the minimum angle of the incline plane needed for the block to slide before we can determine the maximum frictional force? That is, find that minimum angle and then substitute it in the formula for fs(max) = UsMgcos (minimum angle needed for block to slide)? |
Why was the letter 'U' dropped from many words such as colour, odour etc? And also why is the letter 'l' spelt as a singular, when in British English it's used as a double 'll' in most words, cancelled, traveller, modelled etc? | Considering that Webster , is there a recognised tipping point (year, decade, etc.) that marked the move from traditional British spelling to Webster's American? Was this shift a gradual but chaotic process or was it a deliberate and possibly collective decision taken by the educational institutions, the media, or the government of the time? In other words, how did the shift come about? |
I uploaded Ubuntu as an ISO file on a flash drive. I managed to install it on my personal computer flawlessly, but it seems to have an issue and isn't even able to return to her previous Windows 10 OS. I installed the OS from a desktop ISO which I checksum verified and made the live USB following the tutorials.ubuntu.com instructions. Here's what appears on the screen as soon as the computer is powered on. | Installed Ubuntu 13.04 on a Dell laptop I had laying around. Install goes well but when I'm done, I only get a command line, no GUI at all. Tried several versions, tried 32 vs 64 bit all give me the same result. Any ideas on what to do/try? |
I would like to send a http request with METHOD=HEAD using python 2. In mechanize there is a nice function called mechanize.Request. Unfortunately i only can set METHOD to either GET or POST but nothing else. Do you know whether there is a way to do that? | What I'm trying to do here is get the headers of a given URL so I can determine the MIME type. I want to be able to see if http://somedomain/foo/ will return an HTML document or a JPEG image for example. Thus, I need to figure out how to send a HEAD request so that I can read the MIME type without having to download the content. Does anyone know of an easy way of doing this? |
Linux newbie here I've tried to install Ubuntu 17.04 but it crashed and show this message dialog " the 'grub-efi-amd64-signed' package failed to install into /target/. Without the GRUB boot loader, the installed system will not boot. " This is my boot-info link Then i try to repair it using boot-repair and follow the instruction until it finish(im not sure i've done it correctly). next, i can boot ubuntu but crash report show up "sorry, a problem occured while installing software. Package :grub-efi-amd64-signed 1.80.2+2.02~beta3-4ubuntu2.2" Is there any correlation with forcing uefi installation? Thanks for your help | I am installing Ubuntu 16.04 in an Intel NUC computer with UEFI enabled. I am using an SSD from another computer. During the installation I chose Erase the disk and make a new full install At the end of the process I see: grub-efi-amd64-signed failed installation /target/ Ubuntu 16.04 And the system does not boot. I tried to use boot-repair but apparently it does not solve the problem. |
On the 1st of September my Tier 4 student visa application was rejected but I made the mistake of thinking I was still entitled to enter the UK with my US passport. I had already purchased a Eurostar ticket to London so I thought I could put it to use to visit some friends (one of them being my boyfriend) for two weeks before their school years started. On the 9th, I was detained in Paris and refused entry to the UK on the grounds that I recently showed "intention to live and study in the UK" and they weren't convinced I would be leaving when I said I would. Additionally, I didn't carry any documents aside from my passport, my Swiss residence permit and a copy of my passport. I am also unemployed but I am still completely financially dependent on my parents. Staying with my boyfriend was the cherry on top. In hindsight, I acknowledge that I raised every red flag. It was like a twisted skit. However, the last time I traveled outside of Schengen was when I was 15 (I'm 19) and any recent travel I've done was by rail so I didn't anticipate the seriousness of crossing the border. It was my first time traveling alone but I suppose that level of cluelessness warrants learning the hard way. At this point, I'm wondering what my next move should be. How long do I have to wait? I definitely want to visit the UK some time soon because I now have an unexpected gap year lying in front of me. My intentions were strictly for leisure and I wouldn't attempt anything along the lines of volunteer work while I'm there. I just want to visit my friends/boyfriend for 1-2 weeks at most. Should I apply for a visitor visa this time or can I try traveling there again but making sure I have as many documents as possible? I'm worried about getting denied entry again and having an even more "tarnished" record, so that's the main thing I want to avoid. I tried contacting the UKVI by email but they haven't responded. Keep in mind, I'm planning on reapplying for a student visa next summer so I have no idea what I can and can't do - I really don't want to compromise anything. | I'm a writer and theater/film director who has been traveling nearly all my life without incident. In February, I decided to pull up stakes in NYC and move to London. I am a freelancer and I'm working with three different organizations in NYC so I wasn't working illegally in the UK. I was, however, seeing if there might be some opportunities in London, ie. meeting with Artistic Directors of various theatre companies to see if they might be interested in producing my work. In April, I was invited to a conference in San Diego and then a film festival in Switzerland. I didn't think it would be a problem if I went and then bummed around in France for a few days since I hadn't broken any laws and had left the UK well under my six month leave to stay. Well, when I tried to return to London, I was denied entry at Luton. The border control officer said I didn't have enough funds for a two month stay and put a black cross over a stamp in my passport. They put me in a detention room until the next flight back to Lyon, which was the following morning. I don't know anyone in Lyon so I ended up going to a friend's place in Paris. After a few days of not knowing what to do, a friend suggested that perhaps I should try going back to London on the Eurostar since border control is in Paris. I wondered if I ought to go to the British Embassy but was deterred by something on their website that says that a visitors visa could take up to three weeks (I can't sit around here in Paris for three weeks) and anyway, the decision ultimately is with the border control, so I decided to take a chance on the Eurostar. I bought myself a return ticket in two weeks to Paris just so I had something to show. Well, the UK border control denied me entry after giving me a third degree. They accused me of lying and seeking work in the UK. They also insisted that the amount of money I had was not enough to live on for two weeks. So I'm back at my friend's place in Paris, wondering what to do. Is it possible for me to ever get back to the UK? I had to cancel one meeting and I'm wondering if I have to cancel going to the Sheffield DocFest. (Two of my projects were accepted to programs there.) Should I apply for a visa from the British Embassy? Will this really take three weeks? When I started to say something about obtaining a visa, the border control officer cut me off and said, "Why are you going to the Embassy? This has nothing to do with the Embassy. We make the decisions." |
I made this example code: The question is about this click event: var wrapper = $(".select-editable"); // Fields wrapper $(wrapper).on('keypress', '#input1', function () { var cs = $(this).val().length+1; console.log( "total caracters:" + cs); $('#mytext1').html('<option value="dummy01">dummy01</option><option value="dummy02">dummy02</option><option value="dummy03">dummy03</option>') }); I use #input1, #mytext1, and I want the click to be dynamic. For example: if I create four selects in the table, the fourth select should have the click event like the first select (#input4 and #mytext4). Is it possible? | I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off. This happens on page ready and works just fine. The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound. I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option. |
For which primes p is 3 a quadratic residue modulo p? From Quadratic Reciprocity -1/p = 1 if p = 1 mod 4 means that -1 is a quadratic residue mod p iff p = 1 mod 4. Similarly I know that I'm supposed to use 3/p = (p/3)(-1)^((p-1)/2) but how do I convert this to a similar form that gives the desired value of p? | $(\frac 3p)$ is the Legendre symbol here, not a fraction, if that wasn't clear. This is what I have so far: We know by Gauss's Lemma that $(\frac qp) = (-1)^v$ where $$v = \#\left\{1 \le a \le \frac{p-1}{2} \mid aq \equiv k_a \pmod{12}),\space -p/2 < k_a < 0\right\}$$ And we also know that multiples of $(\dfrac{p-1}{2}) \times 3$ must be between $0$ and $p/2$, between $p/2$ and $p$, or between $p$ and $3p/2$. Representing $p$ as $12k + r$ seems like the next step, but I'm not sure where to go from there. |
I'm trying to solve this equation $$ 2^n + 1 = k^2 $$ but I found only one solution where $$ n=k=3 $$ Is there are any other solutions and how to prove if there is no more? | Is there an easy way of showing that $2^n \pm 1$ is never a perfect power, except for $2^3 + 1 = 3^2 $? I know that gives the result directly, but I'm hopefully for a more elementary method. I can show that it is never a square, except for $2^3 + 1$. Proof: Cases $n=1, 2, 3$ are easily dealt with. Henceforth, let $n\geq4$. $2^n -1 \equiv 3 \pmod{4}$ hence is never a square. If $2^n +1 =x^2$, then $2^n = (x-1)(x+1)$ and both of these are powers of 2. Thus we must have $(x-1) = 2, (x+1) = 4$. This gives the solution of $2^3 + 1 = 3^2$. Let's now do an odd prime. Say $2^n +1 = x^p$. Then $2^n = x^p - 1 = (x-1)(x^{p-1}+x^{p-2} + \ldots +1)$, so both terms are powers of 2. We have $ x = 2^m+1$ is odd. But the other term is the sum of $p$ odd numbers, hence is odd. Since this is clearly greater than 1, we get a contradiction. Say $2^n -1 = x^p$. Then $2^n = x^p + 1 = (x+1)(x^{p-1} - x^{p-2} + \ldots -x +1 )$, so both terms are powers of 2. We have $x = 2^m -1$ is odd. But the other term is the sum of $p$ odd numbers, hence is odd. Since $x^p + 1 \neq x+1$ except for $p=1$, this means that the term is greater than 1. Hence we get a contradiction. |
This problem comes from Linear Algebra and its Applications by David C Lay and Steven R Lay. Let $c$ be a unit vector in $\mathbb{R}^3$. Consider the matrix $A = I - 2cc^T$ a ) What are the eigenvalues of $A$? b) Find an easily computable eigenvector of $A$ My attempt: Firstly we can see that $cc^T$ is a symmetric $rank\ 1$ matrix. Let $v_i$ be a eigenvector of $A$ for $i = 1, 2, 3$ $$Av_i = \lambda_iv_i = (I - 2cc^T)v_i \\ = Iv_i - 2cc^Tv_i \\ = v_i - 2cc^Tv_i$$ I'm stumped on where to go next. Is there something I'm missing? Any pointers would be greatly appreciated :) | What would be the eigenvalues for a Householder matrix defined as: $H = I - 2 u u^T$? Can someone explain it to me intuitively or with a simple proof? |
I am using Sketch to create my design. I have created a view that is blurred. So if I put it on any other image, it will make it blurred. Now I want to export this blur, but I seem to be unable to do so. When I try to export the blur, its just gives me a white image or the actually blurred image, but not something that blurs the image that is behind it. How can I export this blur? | How can I create a generic blurred background that can be used on multiple images similar to the example below? I need a white frosted glass looking png that I can set use to layer over regular images to give them all a frosted glass look (like you can almost make out whats behind it; maybe some colors). Examples: Maybe a white background with texture (grainy texture) then Gaussian blur that and then use it as a layer over all my images. I know the link I posted above is probably just an image blurred, but I need a layer that can be reused in an iOS project. This way it can be used a view layer over sections of an image and make the image underneath look blurred. Maybe I shouldn't use blur as the term here. I am looking for frosted glass look. What I am trying to do with this image is import it to my iOS app use it a view background. Then when this view is over other views (a map view, a photo, etc...) they all are frosted. I am trying to create the effect of this image from iOS 7. And no I don't want to use the new iOS 7 design features, because most of my users are on iOS 5 still. And no I don't want to force them to upgrade. |
According to the : Initiative determines the order of turns during combat. When combat starts, every participant makes a Dexterity check to determine their place in the initiative order. The DM makes one roll for an entire group of identical creatures, so each member of the group acts at the same time. Does that mean that the creatures of the same type share a turn, or only have the same initiative? If they go on the same turn, it gives a significant advantage to enemies with pack tactics, and makes "wakeup chains" against sleep/hypnotic pattern stronger. | Imagine a small group of goblins moving on the same initiative that are hit by hypnotic pattern. When one goblin that was not affected uses its action (or an attack) to wake its ally that failed the save, can that awoken ally in turn wake another affected ally, effectively ending the spell with a chain of actions in a single turn? Or, instead, is only one goblin able to be woken up that turn, with the waking goblin having no action to use on the next sleeping ally? |
A bat and a ball cost £1.10 in total. The bat costs £1 more than the ball. How much does the ball cost? The answer to this question is somehow 5p. How?!! Should it not be 10p? | A bat and ball cost \$1.10. The bat costs a dollar more then the ball. How much does the ball cost? If this is not the correct place to ask a question like this please tell me and I will remove it :) The ball costs \$0.05, not \$0.10 |
How can I save one or more specific cookies in Chrome but automatically delete all others (including those from the same domain) upon browser close or open? My original thought was to find a cookie extension which either: Whitelisted a specific cookie and gave me the ability to delete all others at start up or shutdown or Allows me to auto-import a cookie on start up, and use the Chrome cookie settings to remove them all at shutdown. However the problem seems is that I can't find an extension that does what I want. There are extensions like Vanilla Cookie Manager which allow me to whitelist cookies for a specific domain and delete all others but this fails to accomplish what I need. Are the extensions or other options which allow me to accomplish either of the above? | Firefox has the ability to make all cookies session only with exceptions, so you can choose some websites to store cookies and all the other cookies are deleted when you quit Firefox. How can it be done in Google Chrome? |
I have a binary dependent variable, and some numeric, binary, and ordinal independent variables. The whole idea is to create a predictive model based on all these data, which can be reported to others, i.e. an equation. So let's say I clean my data, and use the glm function, I get something like this from coef(summary(my.model)): Estimate Std. Error z value Pr(>|z|) (Intercept) -4.327404e+01 4.900553e+02 -0.088304404 9.296347e-01 var1 6.789180e-02 2.593766e-02 2.617499440 8.857663e-03 var21 1.826271e+00 4.428294e-01 4.124096884 3.721922e-05 var3.L -3.871398e+00 1.179214e+03 -0.003283033 9.973805e-01 var3.Q -1.228205e+01 8.789344e+02 -0.013973801 9.888509e-01 var3.C -5.066052e-01 3.930721e+02 -0.001288835 9.989717e-01 var4.L -7.128841e+00 3.728134e+02 -0.019121740 9.847440e-01 var4.Q -2.954424e+00 2.152443e+02 -0.013725909 9.890487e-01 In this case the first var1 is just numeric values, var21 is binary (hence the 1 at the end?), and then the others are ordinal predictors with 4 and 3 factors respectively. So let's just say this is the final model (it is most definitely not). How would I interpret this, and what should I report ? I'm guessing that I will have some kind of term, which is inputted into the regular logistic regression equation, i.e: prob = 1 / (1 + exp(-P)) where: P = -43.2 + 0.067*var1 + 1.8*var2(1 or 0) + ... And then what ? Do I use/keep both the linear term, quadratic term, and cubic term, or only select the one who has the lowest p-value (although in this case they are pretty similar and very high), or some other metric ? | I have a Java code that performs a linear regression on a set of data using the Gauss-Jordan elimination. It calculates a linear, quadratic and cubic functions using the least squares method. My problem is choosing a function out of the three that best models my data. This is ofcourse, without plotting the curve. So lets say I have a set of data {x:1,2,3,4} {y:3,8,910}, and I get a linear, quadratic and cubic function for it using the least squares method. How do I choose which function is the right model for my data? |
EDIT : I know what a null pointer exception is. My issue is why is it happening because I have everything initialized. I'm having an issue with my android app where I enter some text in a fragment, save the data into an object and pass said object back in a callback. @BindView(R.id.new_post_title_til) TextInputLayout mTitleTil; @BindView(R.id.new_post_body_til) TextInputLayout mBodyTil; @BindView(R.id.new_post_title) TextInputEditText mTitle; @BindView(R.id.new_post_body) TextInputEditText mBody; @BindView(R.id.button) Button send; private Post mPost; @OnClick(R.id.button) public void submit() { UserPost post = new UserPost.Builder() .title(mTitle.getText().toString()) .body(mBody.getText().toString()) .build(); mPost.onUserPost(post); getFragmentManager().popBackStack(); } @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_new_post, container, false); ButterKnife.bind(this, v); return v; } @Override public void onAttach(Context context) { super.onAttach(context); try { mPost = (Post) context; } catch (ClassCastException e) { e.printStackTrace(); } } public interface Post { void onUserPost(@NonNull UserPost post); } Whenever I hit the submit button I get the correct toast my app crashes with the error message. The data is being saved but for some reason, the app is still crashing whenever the submit button is pressed. | What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely? |
I tried to open a link (first one) from to the possibly , it opens a , but I can't scroll it down via swipe. Looks like GUI is stuck, left panel works as expected. If I use "go to next answer" button (right top), page twitches once, but gains the ability to scroll. App Version: 1.6.1.2 Device: iPad Air 2 (Wi-Fi) OS Version: Version 10.1.1 (Build 14B100) | Steps to reproduce: In your feed, tap an item that references a deleted post. In this case, it tapped a comment reply on an answer I deleted. Observe that the question loads, but scrolling on the view is disabled. Tap the down arrow on the right side of the navigation bar. Observe that the screen scrolls down to the first answer, and then scrolls back up to the question. Observe scrolling is enabled again. Expected result: Navigating to a question from a reference to a deleted answer should not break scrolling on the question view controller. App Version: 1.6.1.2 Device: iPhone 6 OS Version: Version 9.3.4 (Build 13G35) |
Once, I've learned that options of Linux commands came in two manners: those of one letter, prefixed by a - those of many letters, prefixed by a -- And this works in 95% of the cases. But not, for example, for the find command. This one fails: find . --name myfilename And this one is working: find . -name myfilename Either I'm wrong with my belief that options start by - or -- depending on their number of letters, Either find command should, I agree, retain for compatibility it's ability to run with the -name option, but it should also accept the --name option. What's the truth ? | On Unix system, options begin with - is short option, while options begin with -- is long option. Is my understanding right? |
I have to prove the following theorem: Prove that the product of $r$ consecutive positive integers in divisible by $r!$ I am having a hard time getting a generalization down for the full set of real numbers, if I start from 1 and work up to r, I have the following: $$r!k=\prod_{i=1}^{r}n_i$$ Can easily prove the base case of this, (n=1), and then go in to prove: $$(r+1)!k=\prod_{i=1}^{r+1}n_i$$ Expand that out and get: $$(r+1)r!k=n(n+1)(n+2).....(n+r)(n+r+1)$$ Can say that the product of the first $r$ elements in equal to $r!k$ by our base case. Leaving using with: $$(r+1)k=(n+r+1)$$ Not sure where I can go from here, n is the integer that we start at, so how can I get it to work out to be equal to our induction hypothesis? | How can we prove that the product of $n$ consecutive integers is divisible by $n$ factorial? Note: In this and the comments here the OP has clarified that he seeks a proof that "does not use the properties of binomial coefficients". Please post answers in said newer thread so that this incorrectly-posed question may be closed as a duplicate. |
I don't need this statement to be true globally - even if it's locally true I'm fine with that. I'm on a noncompact Riemann surface but that doesn't matter because I only want this to hold locally anyway, so we can just look at little subsets of $\mathbb{C}$. Say $h$ is an arbitrary holomorphic function. Say $f,g$ are holomorphic functions with no common zero. Then I want to show that there exist $\phi_1, \phi_2$ holomorphic such that $h = f\phi_1 + g\phi_2$ locally (so on some neighbourhood of some fixed point). I'm happy to just work with Taylor series of all these functions (which is what I was doing) because as I said, I'm fine with this holding just locally. But I can't quite figure out how it works. I'd appreciate some help, please! | Let $\Omega$ be a region in the complex plane and let $f_1$ and $f_2$ be holomorphic functions on $\Omega$ having no common zero. Show that there exist holomorphic functions $g_1$ and $g_2$ on $\Omega$ such that, $f_1g_1+f_2g_2$ is identically equal to one on $\Omega$. |
I have two simple classes. I want with vector show result, but number is not showed. On the other hand, when I try result without vector, result will be show. Can you help me? Thank you. #include <iostream> #include <string> #include <vector> #include <iterator> using namespace std; template<typename T> class One { protected: T word; T word2; public: One() {word = "0"; word2 = "0";} One(T w, T w2) {word = w; word2 = w2;} virtual const void Show() {cout << word << endl; cout << word2 << endl;} }; template<typename T> class Two : public One<T> { private: int number; public: Two() {number = 0;} Two(T w, T w2, int n) : One(w,w2) {number = n;} virtual const void Show () {cout << word << endl; cout << word2 << endl; cout << number << endl; } }; int main () { One<string> *idk; Two<string> *something = new Two<string>("asd","aa",1); idk = something; idk->Show(); // OK - asd, aa, 1 vector<One<string>> arr; arr.push_back(*idk); arr.at(0).Show(); // WRONG - asd,aa return 0; } | Someone mentioned it in the IRC as the slicing problem. |
Is that possible to redirect to page accordingly for example to (where cookies set to 10010); to (where cookies set to 10010) and so on. if ($.cookie('10010')) { window.location.href = 'http://mysite.com/10010'+'what to insert here?'; } Can I do it just with one string or I have to declare every page ? | How can I redirect the user from one page to another using jQuery or pure JavaScript? |
Is there a way to run Linux operating system on a virtual machine which aggregates the resources of physical machines on the local network and acts as a single super-computer? If possible, how? Thanks. | by now I have 10 servers for hpc, power computing oriented. My users need to launch several processes using qmake. The users are used to work with ubuntu 9.10, and the software from the repositories is switable for them. I've deployed ubuntu 9.10 to all 10 servers (pxe rocks). By now we work with parallel-ssh and cluster-ssh, which allows as to launch the same process to all servers. With this tools this tools the servers remain as independent but with the same software and the same launched command. Now we would like to go to next step and see all the servers as a single one with all the resources from the other 9 as if was its resources. The difference would be substantial in time to process and also time to design the command to launch. Any advice on wich software to use will be very useful? Thanks |
I have my function here to clean strings called function clean($str) { $str = htmlspecialchars(strip_tags(trim(mb_convert_encoding($str, 'UTF-8', 'UTF-8'))), ENT_QUOTES, 'UTF-8'); return $str; } Right now, I checked the possible XSS attacks, And this one worked ok on <img src"$str"> but when i swapped the the element to <iframe src"$str"> the JS was executed using the following $attr = clean("javascript:alert(\"RSnake says, 'XSS'\")"); $str = "<iframe src=\"$attr\">"; But for $str = "<img src=\"$attr\">"; it was safe. How to handle this vulnerability? What i did was adding extra part for the function which was like this function clean($str) { $str = htmlspecialchars(strip_tags(trim(mb_convert_encoding($str, 'UTF-8', 'UTF-8'))), ENT_QUOTES, 'UTF-8'); $str = htmlentities($str, ENT_QUOTES); return $str; } | We have a high security application and we want to allow users to enter URLs that other users will see. This introduces a high risk of XSS hacks - a user could potentially enter javascript that another user ends up executing. Since we hold sensitive data it's essential that this never happens. What are the best practices in dealing with this? Is any security whitelist or escape pattern alone good enough? Any advice on dealing with redirections ("this link goes outside our site" message on a warning page before following the link, for instance) Is there an argument for not supporting user entered links at all? Clarification: Basically our users want to input: stackoverflow.com And have it output to another user: <a href="http://stackoverflow.com">stackoverflow.com</a> What I really worry about is them using this in a XSS hack. I.e. they input: alert('hacked!'); So other users get this link: <a href="javascript:alert('hacked!');">stackoverflow.com</a> My example is just to explain the risk - I'm well aware that javascript and URLs are different things, but by letting them input the latter they may be able to execute the former. You'd be amazed how many sites you can break with this trick - HTML is even worse. If they know to deal with links do they also know to sanitise <iframe>, <img> and clever CSS references? I'm working in a high security environment - a single XSS hack could result in very high losses for us. I'm happy that I could produce a Regex (or use one of the excellent suggestions so far) that could exclude everything that I could think of, but would that be enough? |
I am new user and want to use complete features of Ubuntu 12.04 without installing it on my laptop that has Windows 7 OS so that I became acquainted with Ubuntu before switching to it. is it is possible through pen drive i.e. my pen drive will become Ubuntu enabled just like my computer work with windows. | If you are hurrying to reply, System → Administration → StartUp Disk Creator -- no, that's not what I'm talking about. I want to try Ubuntu 11.04's Unity without touching my existing Ubuntu install. To do this, I need to install the nVidia drivers first (sigh). To do this, I need changes to persist a reboot. To do this, I need to really install Ubuntu on a USB key. How do you do that? What I tried I tried to make a USB key from , then boot from it, then choose "Install Ubuntu." The installer refused to install to the installation media itself. I tried, from my installed copy of Ubuntu: sudo kvm /dev/sdb --cdrom .cache/testdrive/iso/ubuntu_natty-desktop-i386.iso ...but the installer didn't detect the disk properly. |
how do i shrink it to the size/shape of the image ? is it possible ? | I was sent an image (.psd) that has transparent background. When I export it the resulting .png preserves the transparent background so the image actually takes more space on a website than necessary. It's a logo image. I'm trying to adjust the transparent canvas site to only take the space by the image itself. Alternatively, how do I export it so that the resulting .png is only the size of actual logo (rectangle) not including the transparent space (bigger rectangle). Thank you. |
I have all of the materials for a sawmill yet it is not on the crafting menu. I also got 22 silver bars and no armor is on the crafting menu for silver. Can someone please help? | According to entry for Sawmill crafting; it requires the following: 10 Wood 2 Iron Bars 1 Iron Chain As shown in the screenshot below, I'm meeting all the requirements(rather I've more objects than required) As can be seen; I have 32 wood, 15 Iron bars and 1 Iron chain(3rd row, 5th column). Still no option to craft a sawmill is displayed either on workbench or on Anvil! Is this a bug? EDIT I should mention that it is a multi-player instance(in case, it has anything to do with the issue). |
Problem Let $f : \mathbb{N}\to\mathbb{N}$ be a strictly increasing function such that $f(2) = 2$ and $f(mn) = f(m) \cdot f(n)$ for every relatively prime pair of positive integers $m$ and $n$. Prove that $f(n) = n$ for every positive integer $n$. My approach I tried to prove this using induction. For the base case, we need to find $f(3)$. We have $$f(3) \cdot f(5)<2f(9)<4f(5)$$ $$\implies f(3)<4$$ And since $f(3)>f(2)=2$, we have $f(3)=3$. Now, we assume that $f(k-1)=k-1$ and $f(k)=k$. Since $k$ and $k-1$ are relatively prime, we have $f(k(k-1))=f(k)f(k-1)=k(k-1)$. But this does not prove. So, how do I complete the proof? | Let $(a_n)$ be a strictly increasing sequence of positive integers such that: $a_2 = 2$ and $a_{mn} = a_m a_n$ for $m, n$ relatively prime. Show that $a_n = n$, for every positive integer $n$. This is a result apparently due to Paul Erdős, and has a proof by induction. I tried like this, $a_{10}=a_2a_5$. After this what we can do? [Editor's comment] Possibly due to the apparent simplicity of the conditions it may be difficult to appreciate the subtleties of this question. If we try and construct a counterexample like $a_3=4$, $a_4=5$, $a_5=6$, then the requirements dictate $a_6=8$, $a_{10}=12$, $a_{15}=24$. At this point we realize that we have been speeding. For monotonicity forces $a_9\le 11$, and therefore $a_{18}\le22<a_{15}$, violating the requirements. It is not obvious why something similar ruins all the modifications to the sequence $a_n=n$. [/comment, JL] |
Using Minecraft PE, can I play on servers from PC like Mineverse or can I only play on Minecraft PE servers? | My kids are playing Minecraft on 2 PCs, creative mode. They are connected by the way of one of them starts a single player game on the other one than joins that game over the LAN. Can I, using Minecraft PE on my iPad, join their game as well? |
This is on meta. On certain questions like I see the question but unable to put my preference or opinion on it as it says I'm logged into unix.stackexchange.com and stackexchange and elsewhere. I'm not even able to get a correct login page for the meta.unix.stackexchange.com site. Going to is also unhelpful. I also tried registering in the hopes that something might be broken or dis-connected and maybe I had to re-register again but nothing. It dumps me right back to the homepage. I don't even get any questions for signing up. Can somebody help. Update - It is a HTTPS-Everywhere issue. After I take out the two HTTPS-Everywhere rules about stackexchange it works. | I can't seem to log in with my Stack Exchange OpenID. When I try, I get the error message: Unable to log in with your OpenID provider: The openid.return_to parameter (.) does not match the actual URL (.) the request was made with. It works if I disable the HTTPS-Everywhere plugin in Firefox, but if I then re-enable the plugin and go to a site on which I am not logged in (in which case login is normally nearly seamless), it fails again with the same error message, or at least something very similar. I'm not aware of having done anything that might have caused this, although I will admit I don't recall seeing https:// in the address bar on Stack Exchange before (I do now, and that's a good thing IMO!). I was using the site and it worked fine then, but not now... |
I am a British citizen with a valid Chinese tourist visa is an expired passport, and I have a new passport. I've heard reports that it's fine to enter China like this, despite the fact that officially on the UK visa for China application website it says you can't (I once phoned and the woman said it was fine, despite what it says on the website). Can anyone comment? (British passport holders only!) Secondly, my embarkation point is Tajikistan (Dushanbe airport) flying to Ürümqi in China, not from the UK. Will this be OK to fly according to Timatic? I will probably be flying with a Chinese airline. | Will my Chinese visa still be valid if I renew my passport? If so how does that work? I have heard that you can travel with your new passport and just show the old passport with the valid visa when entering China. Has anyone done that? Recently? I have also been told that you have to get a new visa, which seems somewhat logical but frustrating, especially when my Chinese visa is only a few months old. My Chinese visa was issued in late Nov 2014 and I heard the rules changed between the US and China. My visa says it's good for 10 years and my US passport expires in 5. |
I just installed Ubuntu 14.04 LTS, and I'm loving it. Only thing is that I'm having problems with my laptop's sound quality. It sounds empty, or hollow. I'm not exactly sure how to put it to words, but it's noticeably worse than it was on Windows 8.1. In fact, it was very much above average on Windows. I like Ubuntu but this sound quality issue is really annoying me, and even giving me a headache at times. It's not as loud as it should. If I put up the volume to 100%, my laptop's speakers start to resonate and distort, just sounds terrible overall. Background info: I have an HP Envy TS-15 /w Altec Lansing, in Windows it had BEATS audio drivers.It has 2 front speakers, 2 subwoofers, and one speaker on the bottom of the laptop. | What I am looking for is to have system wide implementation of sound enhancements like bass boosts, echoes, Fidelity, Stereo enhancement and so on. Audio Video players have their own equalizer but they enhance only the audio / video files they are playing. So to enhance sounds playing such as: YouTube, Spotify, System Sound, etc. I need a enhancer software. Back in Windows, I used to use SRS HD audio lab to do the same. P.S. I have a horrible Speaker set. |
I am planning to make an application to digitize and organize documents that a company, or forum, etc may have. The first thing that came to my mind was: How should I look for possible competitors that already have their product on the market? To see what I am against, so I believe this question would be rather flamed if posted on the SO. Other things I was thinking of: Once I know about the other companies doing this same application I am planning, what should I consider before taking the step to do it or look for something else? Is there a public or a good resource where I should look first about the type of application I am planning to create? Would SO be a good place for this sort of questions or where should I go with those question I have? Just wanted to add here since I stated on the comment answer below, that what concerns me the most is the attitude of the community whenever a post that may not suit it or is subjective or don't suit it at all, people go all out to bang it with negative votes without leaving a comment or giving the moderators a chance to move it, hence why I asked here first. PS: hope I didn't do anything wrong by posting this here as well. If I'm missing a tag please let me know to added to it, I wasn't sure of what other tags I should use here. | I came across the following question: This can be easily flagged for too broad or opinion based, but I wonder on which stack-exchange site can one ask answers for such a question? |
In one-dimensional quantum mechanics, it seems that the only kind of potential able to produce an "equidistant" spectrum, i.e. with $E_{n+1}-E_{n}=\text{constant}$, is the harmonic oscillator. Why is that? And is there a way to prove it? | I was wondering if the good old quadratic potential was the only potential with equally spaced eigenvalues. Obviously you can construct others, such as a potential that is infinite in some places and quadratic in others, but that's only trivially different. I am not referring to equally spaced as a limiting behavior either, I mean truly integer spaced. Any ideas? If not, is there a proof for its uniqueness? If there are other potentials with equally spaced eigenvalues, can one use them as starting points for a free-field QFT? It would be interesting to know if there is a deeper mathematical relation between all of these potentials and whether they could be used to study interacting systems. |
For the 1st code, int i = 1; while (i < 10) if ((i++) % 2 == 0) System.out.println(i); The system outputs: 3 5 7 9 For the 2nd code, int i = 1; while (i < 10) if ((i=i+1) % 2 == 0) System.out.println(i); The system outputs: 2 4 6 8 10 Why are the two outputs different but the formula is the same? | Is there a difference in ++i and i++ in a for loop? Is it simply a syntax thing? |
I made a photo with my Samsung phone and: The orientation is good when displayed on the phone The orientation is good when displayed in Picasa (this means the JPG files contains the right orientation metadata!) The orientation is wrong when displayed in Windows 7 Explorer thumbnail: The orientation is wrong when displayed in Windows 7 Image viewer: One solution could be to "forget about Windows 7's built-in image viewer", and use another better image viewer, but I don't want this. I would like to permanently rewrite the JPG files (and overwrite them) with the new good orientation, in bulk for hundreds of JPG files, i.e. like if I clicked manually hundreds of times on these buttons when viewing the images one after another: but automatically, with a script. How to do this? Note: I know it might not be lossless, but still I would like a permanent rotation so that the default Windows 7 image viewer see them with the good orientation. Note 2: , available for download. | When I make pictures with my camera (Olympus E-520), in the EXIF data the orientation is stored. The standard image viewer on Ubuntu is displaying this images correctly. Windows viewer however not. Is there a way to really rotate this images (if necessary according to EXIF) in a batch on Ubuntu? For example with an ImageMagick tool? |
Ubuntu 16.04 On Choosing an Repository I have 3 choices for this country and all gave this error. Could not download all repository indexes The repository may no longer be available or could not be contacted because of network problems. If available an older version of the failed index will be used. Otherwise the repository will be ignored. Check your network connection and ensure the repository address in the preferences is correct. An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://dl.google.com/linux/earth/deb stable Release: The following signatures were invalid: KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 KEYEXPIRED 1555048520Failed to fetch http://dl.google.com/linux/earth/deb/dists/stable/Release.gpg The following signatures were invalid: KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 KEYEXPIRED 1555048520Some index files failed to download. They have been ignored, or old ones used instead. Can some one help to fix this? | When I run sudo apt-get update on my fully updated Ubuntu 16.04.6 LTS I get the following errors about Google repositories: $ sudo apt update ... Err:20 http://dl.google.com/linux/earth/deb stable Release.gpg The following signatures were invalid: KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 Get:21 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB] Err:13 http://dl.google.com/linux/chrome/deb stable Release.gpg The following signatures were invalid: KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 ... W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://dl.google.com/linux/earth/deb stable Release: The following signatures were invalid: KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://dl.google.com/linux/chrome/deb stable Release: The following signatures were invalid: KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release.gpg The following signatures were invalid: KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 W: Failed to fetch http://dl.google.com/linux/earth/deb/dists/stable/Release.gpg The following signatures were invalid: KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 KEYEXPIRED 1555048520 W: Some index files failed to download. They have been ignored, or old ones used instead. The apt-key list returns: pub 1024D/7FAC5991 2007-03-08 uid Google, Inc. Linux Package Signing Key <[email protected]> sub 2048g/C07CB649 2007-03-08 pub 4096R/D38B4796 2016-04-12 uid Google Inc. (Linux Packages Signing Authority) <[email protected]> sub 4096R/997C215E 2017-01-24 [expires: 2020-01-24] Removing Google keys and packages with sudo apt-key del D38B4796 sudo apt-key del 7FAC5991 sudo apt purge google-chrome-stable sudo apt purge google-earth-pro-stable sudo apt purge google-earth-stable and reinstalling packages with cd ~/Downloads wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb sudo apt-get install --reinstall ./google-chrome-stable_current_amd64.deb wget https://dl.google.com/dl/earth/client/current/google-earth-pro-stable_current_amd64.deb sudo apt-get install --reinstall ./google-earth-pro-stable_current_amd64.deb does not help. Executing command from : wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - does not help. How should I fix it? What else I did: 1. sent feedback from Google Chrome with Help → Report an Issue. 2. sent feedback from Google Earth using Help → Send feedback. 3. created thread on |
I have come across this picture of a car where the background has a light trail effect but the object (which is the car) is still in focus. I know how to create the light trail effect but I'm not sure how to keep the foreground in focus. I'm a beginner. Does anyone know the name of this technique? Was this achieved with just photography or would Photoshop be required? See example below: | In this photo nominated as , the background seems to blur while the rider is sharp. Wouldn't this normally be the other way? How was this done? |
Is it necessary to apply all transforms? Everything in my character breaks the second I apply transforms... My shader for my character's eyes, the hair, even the rotation of the eyelids ceases to function properly. I am making a character for a game, but what does applying transforms do? The scale is like 0.1, I had thought I applied it before making the hair, but turns out I didn't , so I applied it and the hair grew out all over the place. I don't even understand why my eyelids fail to rotate properly after applying rotation. Can anyone tell me how to apply transforms without having everything break, or is this to be expected? And what does applying transforms do? | I've watched several tutorials and very often they applied the location, rotation or scale to the object when they transformed it in Object Mode. They always said it is important, but why? |
Situation: I work for a company that creates geodatabases for a client that are restricted to a specific boilerplate schema (eg domains, subtypes, etc.). During a recent draft review, the client complained that when zooming to full extent during an ArcMap session, the full extent was too far "out." Desired solution: Alter xy domain of empty feature classes (contained in feature datasets) to extent of interest area as they are imported into production geodatabase (I know that a feature dataset destination will ignore the xy domain environment setting). Problem: No geoprocessing tool (eg feature class-to feature class, import to geodatabase, project, define projection, etc.) will accomplish the task (inside or outside feature datasets). The domain environment setting (advanced geodatabase) is ignored for all actions I've tried. | I have a featureclass in an Esri file geodatabase. When I edit the features using the editor in ArcMap, and I delete most of my features and keeping only the ones in the middle, the zoom to layer command doesn't work as expected. Instead of zooming to the extent of the features remaining in the feature class, the extent will be the former one (containing all deleted features). When reviewing the extent values in the properties dialog for the feature class, I can clearly see the old values. So the edit session doesn't seem to alter the full extent values. Is there a way to recalculate these values? I am pretty sure that this problem should occur to everyone editing features in ArcMap... |
If I am given a number, for example 6, what's the mathematical algorithm for finding the smallest positive integer with 6 factors. It will be 12, but I need a formula which can give me the answers for higher number of factors such as 18. I'm confused with this. A clear explanation would be appreciated. | While practicing for a Mathematics competition in the future, I was going through past problems which were used. One of the problems in the category of Arithmetic/Number Theory went as follows: Consider all positive integers having exactly 12 positive integral factors. Determine the sum of all of the three smallest of these integers. The solution was $216$. Initially, I brute-forced the problem, guessing numbers I thought would have 12 factors, and checking them. While this can yield results, it yields them far too slowly for a timed contest. After some thought, I discovered a solution which worked for the numbers I tested, though it doesn't work for prime numbers and is very time consuming for large numbers. The solution goes as follows: Assume you are given a number of factors $n$. To create a number with $n$ factors, we can factor $n$. If we use the example $12$ for $n$, we get $(3)\cdot(4)$ and $(2)\cdot(6)$. We then factor these factors, resulting in $(3)\cdot(2)\cdot(2)$ (We get this twice but we only need to use it once) Using these factors, we can create formulas to generate numbers with $12$ factors. To do this we use the formula $$a^x b^y c^z$$ where x is one of the factors -1, y is another factor -1, and z is the third. (This also works with more than three factors, it just needs to be extended.) For 12, this yields us $$a^1 b^1 c^2 \\ a^3 b^2 \\ a^5 b^1$$ Each of these formulas can generate a number with 12 factors if we input prime numbers into $a$, $b$, and $c$. In this case, we want to create the lowest numbers with 12 factors, so we can use the first prime numbers $2$, $3$, and $5$, and arrange them in such a way that we get the smallest value, ie. put the smallest numbers into the larger exponents. We then simply plug in the values and test. (The lowest possible combination produces $n$ instead of a number with $n$ factors $$2^2 \cdot 3^1 \cdot 5^1 = 12 \\ 2^2 \cdot 3^1 \cdot 7^1 = 84\\ 2^3 \cdot 3^2 = 72 \\ 2^2 \cdot 3^1 \cdot 5^1 = 60$$ This means that $60$, $72$, and $84$ should be the smallest three numbers with $12$ factors. Let's check! $60$ has the factors $(1,2,3,4,5,6,10,12,15,20,30,60)$, 12 of them! $72$ has the factors $(1,2,3,4,6,8,9,12,18,24,36,72)$, again, 12 of them $84$ has the factors $(1,2,3,4,6,7,12,14,21,28,42,84)$ again, 12! What about the sum of these numbers, does it fit the solution? $60+72+84 = 216$! Amazing! While this solution works, it is rather inefficient and time consuming, and requires composite numbers. tl;dr: Is there a solution that exists such that it works on prime numbers or that requires less time? Will this method of calculating numbers by creating prime factors in this way always work? Why does this work? |
How many users can be connected to an iPhone's personal hotspot? Does the limit differ from device to device? I want to know the limit of maximum users. | I'm looking on Apple's site and can't find any published limits on how many clients can connect to one iPhone / iPad with cellular tethering enabled in the US. Setting aside the obvious limit where 1,000 devices would overwhelm the data connection in practice if they all want data at the same time, is there a hardware or software limit of perhaps 5 or 10 devices that can connect to one device over WiFi? |
Why is $\lim\limits_{n\to\infty}(n!)^{1/n}=\infty$ It is more or less clear that the sequence is increasing by ratio test $\frac{((n+1)!)^{1/(n+1)}}{(n!)^{1/n}}=\frac{\sqrt[n+1]{(n+1)!}}{\sqrt[n+1]{(n)!}}\cdot\frac{\sqrt[n+1]{(n)!}}{\sqrt[n]{(n)!}}=\sqrt[n+1]{n+1}\cdot(n!)^{\frac{1}{n(n+1)}}$ but left multiplicand tends to $1$, what about the right one ? Is there convergence/divergence tests for sequences, I only found some for series ? | Find $\lim_{n\to\infty} ((n!)^{1/n})$. The question seemed rather simple at first, and then I realized I was not sure how to properly deal with this at all. My attempt: take the logarithm, $$\lim_{n\to\infty} \ln((n!)^{1/n}) = \lim_{n\to\infty} (1/n)\ln(n!) = \lim_{n\to\infty} (\ln(n!)/n)$$ Applying L'hopital's rule: $$\lim_{n\to\infty} [n! (-\gamma + \sum(1/k))]/n! = \lim_{n\to\infty} (-\gamma + \sum(1/k))= \lim_{n\to\infty} (-(\lim(\sum(1/k) - \ln(n)) + \sum(1/k)) = \lim_{n\to\infty} (\ln(n) + \sum(1/k)-\sum(1/k) = \lim_{n\to\infty} (\ln(n))$$ I proceeded to expand the $\ln(n)$ out into Maclaurin form $$\lim_{n\to\infty} (n + (n^2/2)+...) = \infty$$ Since I $\ln$'ed in the beginning, I proceeded to e the infinity $$= e^\infty = \infty$$ So am I write in how I approached this or am I just not on the right track? I know it diverges, I was just wanted to try my best to explicitly show it. |
I have two arrays called numbers and sounds. My code is below. When I use random generator, I don't want the same value to be assigned to the sounds array. sounds[0], sounds[1], sounds[3] should have different values all the time. Thanks string[] numbers ={ "1", "2", "3", "4", "5", "6", "7","8","9","10","11","12","13","14","15","16","17","18","19","20"}; Random r= new Random(); sounds[0] = numbers[r.Next(0, numbers.Count())]; sounds[1] = numbers[r.Next(0, numbers.Count())]; sounds[2] = numbers[r.Next(0, numbers.Count())]; | 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. |
I have a program that generates a variable number of pictures, ordered like that: 1.jpg, 2.jpg [...] 10.jpg..etc I can't use *.jpg as input because the 10 will be processed before 2, 3, etc. so I want to use: convert page_{1..$N}.jpg out.pdf but does not work. How should the command be? | I want to use $var in a shell brace expansion with a range, in bash. Simply putting {$var1..$var2} doesn't work, so I went "lateral"... The following works, but it's a bit kludgey. # remove the split files echo rm foo.{$ext0..$extN} rm-segments > rm-segments source rm-segments Is there a more "normal" way? |
After exercising vigorously one can sometimes smell ammonia and it feels like it's coming from within the nose actually. There is no indication that others can smell it when I do (i.e. seems to be internal rather than external). I know I'm not the only one experiencing this, but I was wondering what the physiological processes are that are responsible for that? Also: is this merely a perceived smell or is there actually ammonia in/on my body after the exercise. | On extended bicycle trips I sometimes slept under a plastic sheet, which helped with mosquitoes on hot nights. But there was a noticeable build-up of ammonia which made this almost impossible for more than an hour or so at a time. Air is mostly nitrogen $(N_2)$ and there is always water (containing hydrogen) on a humid day. But I wonder about the mechanism for the formation of ammonia under these circumstances? There are (according to Wiki) trace amounts of methane and $H_2$ in the air. But methane and hydrogen (g) are I think pretty stable. I wonder if the presence of exhaled air (containing $CO_2)$ could be a factor? Thanks for any ideas. |
If somebody clicks on up-vote or down-vote accidentaly, what is the way to undo it? or shoudn't it ask for confirmation? | Today I voted up the wrong answer. I noticed that there's no way to undo your votes. When you have voted an answer you are forced to vote it, even if you don't want to. I immediately noticed the error and I could just change my vote to up or down, not delete my vote. It makes no sense at all, imho. Since you are able to change your vote within 5 minutes, you should also be able to remove your vote entirely. I can't believe no one noticed that before... |
Is it always true that $(A_1 \cap A_2) \times (B_1 \cap B_2) = (A_1\times B_1) \cap (A_2 \times B_2)$ and $(A_1 \cup A_2) \times (B_1 \cup B_2) = (A_1 \times B_1) \cup (A_2 \times B_2)$? **I've already showed the first part, just trying to prove true/false for parts a and b, thanks! | Is it always true that $(A_1 \cup A_2) \times (B_1 \cup B_2)=(A_1\times B_1) \cup (A_2 \times B_2)$? I don't believe this is true. I have tried to draw pictures to help me get on the right path, but I think that the union makes this untrue. for example, if $a \in A_1$ and $b \in B_2$, then $(a,b)$ would not be in $(A_1\times B_1) \cup (A_2 \times B_2)$. Is this a correct assumption? |
I'm looking for the name of a sci-fi series, intended for children. Robots have control over the humans. There is a squad of humans who attack them. Every member in this squad has a badge on their suit, and when they touch this badge the suit becomes armed. This series was not cartoon series, it was performed by real people. The main robot character is very similar in style to Darth Vader in Star Wars. The series aired in the 1990s. I am sorry but I can't recall many details. | What is the name of this kids’ show from the late 80s? It was based in space, and I think it was some sort of live-action TV show. Some of the images looked like TV static, and you could buy some toy spaceships shaped like a gun to shoot at the images (and somehow get hit) to gain or lose points. I thought it was called "Captain Skyhawk", but apparently that's an old NES game. Does anyone know what this show was called? |
I basically try to save the current state of mRecyclerView into a static Parcelable variable to keep it safe onPause and restore it to the mRcyclerView onResume. Here is my static variable's class: public class MySavedState { private static MySavedState ourInstance = new MySavedState(); private Parcelable state; static MySavedState getInstance() { if(ourInstance == null){ ourInstance = new MySavedState(); } return ourInstance; } private MySavedState() { } public Parcelable getState() { return state; } public void setState(Parcelable state) { this.state = state; } } And here is the line where I try to set a value: @Override public void onPause() { super.onPause(); Parcelable newState = mRecyclerView.onSaveInstanceState(); state.setState(newState); } And the error message: java.lang.RuntimeException: Unable to pause activity {com.gunaya.tasmaew/com.gunaya.tasmaew.Controller.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.gunaya.tasmaew.Model.MySavedState.setState(android.os.Parcelable)' on a null object reference at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3745) at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3704) at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:3679) at android.app.ActivityThread.access$1100(ActivityThread.java:177) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:5951) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.gunaya.tasmaew.Model.MySavedState.setState(android.os.Parcelable)' on a null object reference at com.gunaya.tasmaew.Controller.mListFragment.onPause(mListFragment.java:117) And as an extra question, i keep having this error message in my debugger: ((Bundle)parce).mClassLoader = Cannot find local variable 'parce' Thank you very much for your time guys. | What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely? |
At this moment, the most recent version of cinelerra is 6.0. I performed apt-cache search cinelerra on my ubuntu with 0 results, so I have to add a ppa which contains cinelerra. There are two types of cinelerra, a less powerfull (so they say) called community version and a more powerfull heroine virtual (though I am noot 100 percent sure about this name) version. I want to install the cinelerra - heroine virtual version. My first step to add a ppa is usually to go to launchpad.net and perform a keywords search, in this case cinelerra ppa. However, I am confused by the many search results and different namings, I am not quiet sure if I can spot the right version there. Please help me by explaining what to pay attention to in the search results of launchpad.net or whether there are other sites to look for it. | Is there a way to search though LaunchPad's PPAs for a certain package name? For instance if I was looking for PPAs with Firefox packages I could search for "firefox" and retrieve a list of all the PPAs which contain a firefox package. |
I want to write a reference with the bullet numbering of the form: [] For example, [] Drucke, D., 1992, Reflection Properties of Curves and Surfaces, Mathematics Magazine, v.65, p.147. is a reference in my paper. I am currently using the following code: \begin{enumerate} \item Drucke, D., 1992, Reflection Properties of Curves and Surfaces, Mathematics Magazine, v.65, p.147. \end{enumerate} As a consequence, I am getting the following output: Drucke, D., 1992, Reflection Properties of Curves and Surfaces, Mathematics Magazine, v.65, p.147. Is it possible to achieve instead of 1. in a list? Update 1 The code snippet seems to works partially: \begin{enumerate} \item [[ 1]] Drucke, D., 1992, Reflection Properties of Curves and Surfaces, Mathematics Magazine, v.65, p.147. \end{document} Output: Any improvements, will be extremely helpful... | I want to make an enumerated list in the following format: [1] foo foo [2] foo foo ... How I can do that using enumerated lists? I have tried the following: \begin{enumerate}[\left[ 1 \right]] but it does not work. |
SELECT BRANCH_ADD, COUNT(TRANS_AMOUNT) AS TRANS FROM (SELECT A.BRANCH_ADD, C.TRANS_AMOUNT FROM BRANCHES A, ACCTS B, TRANSACTION C WHERE a.branch_code = b.branch_code AND b.acct_no = c.acct_no ORDER BY BRANCH_ADD) GROUP BY BRANCH_ADD; Output of the above query : as text : BRANCH_ADD TRANS ------------ ------ TOWN_HALL 2 CHAMRAJPET 4 CITY_MARKET 4 | Is there a way to make an Oracle query behave like it contains a MySQL limit clause? In MySQL, I can do this: select * from sometable order by name limit 20,10 to get the 21st to the 30th rows (skip the first 20, give the next 10). The rows are selected after the order by, so it really starts on the 20th name alphabetically. In Oracle, the only thing people mention is the rownum pseudo-column, but it is evaluated before order by, which means this: select * from sometable where rownum <= 10 order by name will return a random set of ten rows ordered by name, which is not usually what I want. It also doesn't allow for specifying an offset. |
I want to create an PDF Editor. Following is my requirement 1- Create a visual force page which can edit PDF lets call it is as an PDFEditor. 2- I am having another VF page called ContractPage which is rendered as PDF. My functionality is to get all the content of “ContractPage” to PDFEditor where I can change / add or delete the content. And on save this changes should be saved to VF PDF page. I want to edit content of PDF without using any 3 rd party software. Thanks, Swapnil | I want to edit a PDF file in the Salesforce Document folder to add some text or background image to it, and then save the changes in a new PDF document. I tried to include the PDF in a Visualforce page using and render this page as PDF. But that didn't work, because renderAs="PDF" didn't display the iframe in the output PDF. Clearly, PDF generation in Visualforce only works with some components. Do you have any idea how to achieve PDF manipulation in Apex/Visualforce? I thought of using a Heroku service for which I can send the PDF file to do the PDF manipulation (In Java, Ruby on any other language). Is that a viable option? Do you know any ready-to-use Heroku services that can do the job? Thanks in advance for your help. Riadh. |
I am currently working on a journey builder that sends emails and writes back to EmailMessage Object in Sales Cloud. I have the EmailMessage created but I want to write the email html body to that EmailMessage record, is there a way I can access the email contents that was sent out in the journey builder OR in the automation studio? | I want to be able to keep track of point-in-time email send snapshot for every subscriber. So if a subscriber has received multiple version of an email over a period of time, I would like to be able to tell which version (along with the content) was sent on any day. I don't think SFMC maintains version history of emails. How can I accomplish that? |
So, the guys over in have been working on a Smoke Detector that detects potential spam so it can be flagged quicker. One thing that has been noticed is the number of posts that get raised with an all-caps title. Here are some examples of things that have come through so far today - all three of these posts still exist because they're not actually spam, but they do have titles in all caps [ SmokeDetector ] All-caps title: INSTALLING WINDOWS PROGRAMS AND LEXMARK X4650 PRINTER [ SmokeDetector ] All-caps title: CAN NOT MAKE A BOOTABLE UBUNTU ISO IMAGE [ SmokeDetector ] All-caps title: SNORT NOT SHOWING DROPPED/BLOCKED PACKETS Would it be possible to add something into the quality filter that advises users against typing out their titles in all caps? | RECENTLY ON THE ANDROID SITE WE GOT WRITTEN IN ALL CAPS. THIS WAS SURPRISING TO ME, SINCE I ASSUMED IT WOULD HAVE BEEN CAUGHT BY THE QUALITY FILTER — BESIDES BEING INDICATIVE OF OTHER POST QUALITY ISSUES, IT'S AWFUL TO LOOK AT AND REQUIRES A LARGE AMOUNT OF EDITING TO FIX (EVEN IF YOU RUN IT THROUGH TOLOWER() FIRST). WE ALL KNOW THAT CAPS LOCK IS , BUT STILL: CAN WE BLOCK THESE QUESTIONS? RICK RICK OH MAN THAT STUFF JACOB G IS COMEDY GOLD RIIICK Note to editors: This post looks exactly like it is supposed to look, as an example of a question in all-caps. Please do not replace the uppercase letters with lowercase. |
dataframe: data = {"Category":["Resource","Resource","Resource","Resource"], "Item1":["Bandwidth","Bandwidth","Bandwidth","Bandwidth"], "Item2":["DC","OC","DC","OC"], "Amount":[156.415,396.921,-156.415,-396.921]} df = pd.DataFrame(data) df = df.groupby(["Category","Item1"],as_index=False).sum() print df get the result: Category Item1 Amount 0 Resource Bandwidth 5.684342e-14 Why Amount not zero?How can I get the right result? | Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 Why do these inaccuracies happen? |
Is the word "beginning" here a gerund or a present participle, and why? On June 22, 1941, the armies of Nazi Germany crossed the Soviet border, beginning a war that would claim the lives of millions of soldiers and civilians alike. | This is a follow-up to a previous question which I am still trying to understand. I think I'm making progress in my understanding, but I would appreciate feedback to help me refine my thinking. Here is the sentence: Good writing requires hard work. Originally, I thought that "writing" was acting as a gerund in this phrase. After reading through the replies to that question along with back posts related to gerunds, I've since concluded that "writing" in this sentence is a , also termed a deverbal noun. My reasoning? —In the sentence above "writing" is modified by "good" and is thus acting more like a noun than a verb. —It has no direct object. Is my thinking correct here? If not, could someone politely help me to refine it? However, what if I had written the following? Writing well requires hard work. or To write well requires hard work. In these examples, I'm thinking that "writing" would be a different kind of verbal noun—a non-finite verb acting as a gerund or infinitive, which is one piece of a larger complement noun clause. The last bit is muddy for me, but I will leave it at that. Thank you in advance for your patience and insight. |
"allow for a little leeway" or "allow a little leeway", which one is a right expression? Maybe both expression are correct? | I am confused about the usages of "allow", "allow for" and "allow of". Suppose police is examining the evidence related to a bank robbery: The evidence allows the possibility of an inside job. The evidence allows for the possibility of an inside job. The evidence allows of the possibility of an inside job. I checked a number of dictionaries and google. It seems that the usages in my three sentences are understandable English. But what do native speakers on this forum think? |
How to remove that top bar with page name and place tab bar instead of it? How to transform this into this? | I am using Ubuntu 18.04. I realize with GNOME, or its extensions, I can do things like hide the title bar. However, I want to hide the title bar and still see the windows management icons like on Mac OS and Windows. Is this possible? |
My clothier dwarf has gone into a strange mood and has taken over my clothier's shop. He is demanding the following: bars... metal cloth... thread blocks... brick Well, I'm pretty sure I've provided all that, but the dwarf still isn't budging. In this picture you can see my strange mood dwarf in the clothier shop, a row of plant fiber cloth beneath him, some stone blocks to the right of that, some metal bars above, and some yarn cloth to the right. So why isnt the dwarf grabbing the materials and starting on his mysterious craft? | I have a dwarf which has already gathered some materials. He now: sketches pictures of stacked leather sketches pictures of stacked cloth sketches pictures of a quarry but I have tons of stones available, 30 units of cloth and 2 units of tanned hides. Why is the dwarf not collecting the resources and start working on the artifact? |
Is there a backup solution for Ubuntu that allows you to schedule backups, enable encryption of sensitive personal data and stores your backups offsite in the a cloud storage account? Example of this solution is Acronis. Looking to get off of Windows for my personal PC, but I need a backup strategy that is not a file sync like Google Drive, DropBox or OneDrive, also not interested in building a machine to be backup server. Thank you. | I have already set a backup routine that backups all my files to Amazon S3 using duplicity. I would like to create a similar backup routine with Google Cloud Storage. Is it possible to get duplicity to work with GCS? |
Please tell me whether I am correct or not with the following line. int x = ((int)(Math.random() * 100000)) % 1000; This line always give me a 3 digit number 100 to 999 ? Is there an easier way to type this out? Did I over complicate this code? | How do I generate a random int value in a specific range? I have tried the following, but those do not work: Attempt 1: randomNum = minimum + (int)(Math.random() * maximum); Bug: randomNum can be bigger than maximum. Attempt 2: Random rn = new Random(); int n = maximum - minimum + 1; int i = rn.nextInt() % n; randomNum = minimum + i; Bug: randomNum can be smaller than minimum. |
It is required to prove that for positive integers $a$,$b$ if $$1+ab|a^2+b^2$$ then the integer $$\frac{a^2+b^2}{1+ab}$$ is a perfect square. The proof is easily beyond me as I have only recently started studying number theory or maybe I'm not intelligent enough. Help will be highly appreciated. | Let $a,b$ be positive integers. When $$k = \frac{a^2 + b^2}{ab+1}$$ is an integer, it is a square. Proof 1: (Ngô Bảo Châu): Rearrange to get $a^2-akb+b^2-k=0$, as a quadratic in $a$ this has two values: $a$ and $kb - a = (b^2-k)/a$. (The second root is determined in two different ways from the expansion $(x-r_1)(x-r_2) = x^2 - (r_1 + r_2)x + r_1 r_2$.) Now suppose we have $a,b$ such that $k$ is an integer but not a square, by the investigation about roots we have that the second root is a nonzero integer since $k,b,a$ are integers and $k \not = b^2$, futhermore it is positive which is easily seen from its defining equation. WLOG assume $a \ge b$ so that the second root is strictly smaller than $a$. This leads to a decent, replacing $a$ with the second root. Proof 2 (Don Zagier): Apply reduction theory (specifically, Sätze 1 and 2 of Section 13 of my book on quadratic fields) to the quadratic form $x^2 + kxy + y^2$, which is the unique reduced quadratic form in its equivalence class. Note that Proof 2 is pretty much the same as Proof 1 when written out in explicit detail, but I could not read Zagier's book because I cannot read German. I would like to know more approaches to this and other alternative proofs of this result if possible! Thanks in advance. I would also be interested in related problems (especially easier ones of a similar nature) and texts which cover the reduction theory in English. |
I have a .php file saved as UTF-8 and I would like to let it print out a character like € How can I do it? This is the source code of the example: <?php header('Content-Type: text/html; charset=UTF-8'); echo "€"; ?> The file was saved with notepad++ as UTF-8 but when I execute the file it just prints me out "?" Answer While the answer provided here fullfills various aspect of UTF-8, i found the answer to my question inside comment. The .php file was saved as UTF-8 but WITH BOM. Within Notepad++ i choosed Format-> "UTF-8 without BOM" and the script worked. | I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1. Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur? This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2. |
I'm building an application with a react.js front-end (although I'm fairly sure that's not relevant to the issue) and an asp.net back-end (targeting net5.0, not sure if that's relevant). When I call to the back-end API, I get back an object that includes, in part, an ID it generated based on the data passed in, that is of type long in C# (a 64 bit int). The behavior that I'm seeing is that the variable in C# and the variable read from the response on the front end are different. They appear to drift after about 16-17 digits. Is this expected? Is there any way to get around it? Code to reproduce / Pictures of what I see: C# [HttpPost] [Route("test")] public object TestPassingLongInObject() { /* actual logic omitted for brevity */ var rv = new { DataReadIn = new { /* omitted */ }, ValidationResult = new ValidationResult(), GeneratedID = long.Parse($"922337203{new Random().Next(int.MaxValue):0000000000}") // close to long.MaxValue }; Console.WriteLine($"ID in C# controller method: {rv.GeneratedID}"); return rv; } Console output: ID in C# controller method: 9223372030653055062 Chrome Dev Tools: When I try to access the ID on the front-end I get the incorrect ID ending in 000 instead of 062. Edit 1: It's been suggested that this is because JavaScript's Number.MAX_SAFE_INTEGER is less than the value I'm passing. I don't believe that is the reason, but perhaps I'm wrong and someone can enlighten me. On the JS side, I'm using BigInt, precisely because the number I'm passing is too large for Number. The issue is before I'm parsing the result to a JS object though (unless Chrome is doing that automatically, leading to the picture referenced in the issue). Edit 2: Based on the answers below, it looks like perhaps JS is parsing the value to a number before I'm parsing it to a BigInt, so I'm still losing precision. Can someone more familiar with the web confirm this? | Is this defined by the language? Is there a defined maximum? Is it different in different browsers? |
I would like to modify the ubuntu 20.04 installation iso to include (vlc, audacious,mc,rar,unrar, spanish support,etc), remove (totem,rhythmbox,english support, etc) and upgrade packages. Use Cubic but change the permissions of various system directories. Leading to a security risk. For example /etc and /usr have 777 I need customize installer becouse the computers I want installer don't have network acces I need customize installer because I live in Cuba and is very difficult access online repository from anywhere also the connections are too slow for example in this PC (256kbs). | I would like to know how can I customize the Ubuntu installer NOT customize Ubuntu, I just want to modify the installer. We have a large environment here with lots of developers and since we don't use Windows, I want to customize the installer to automatically set the timezone to NYC, the keyboard layout to English USA, put the company logo in the installer etc... |
I'm working on my first redstone structure, so it's extremely simple. It's a secret entrance to my base, and it's just two horizontal stickypistons, one of top of the other, that extend one piece of dirt each when the button is pushed. What I'd like to have it do is the opposite though, to retract a piece of dirt each when a button is pushed. Is there a way to do that? | In Minecraft I need to make a piston door that opens when a plate is stepped on, it is normally the other way around. Does anyone know how? A video would be helpful but not required. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.