How to import a module with absolute path and pass parameter to that module so that the called module can actually use that variable inside it? By absolute path I mean something like this "/home/example.com/directory/file.py". I get this module name as part of command line argument to my actual script. Inside that script I have to import file.py and pass certain arguments to them. Ex Code:      filename = '/home/example.com/directories/file.py'     path = re.split(filename, script_path, maxsplit=1)[0]     print(path) --> /home/example.py/directories/     module_name = filename.rstrip('.py')     print(module_name) --> file.py     spec = importlib.util.spec_from_file_location(module_name, path)     module = importlib.util.module_from_spec(spec)     print(type(module))     # filepath = re.sub('/','.',script_path)     # print(filepath)     # module = importlib.import_module(script_path)     module.testvars = [r_config, t_config]     # spec.loader.exec_module(module)     alltest = unittest.TestSuite()     alltest.addTest(unittest.findTestCases(module))     runner = unittest.TextTestRunner()   But I get the following error with this code:  Traceback (most recent call last):                                                            module = importlib.util.module_from_spec(spec)   File "<frozen importlib._bootstrap>", line 568, in module_from_spec AttributeError: 'NoneType' object has no attribute 'loader'

How can I load a Python module given its full path? Note that the file can be anywhere in the filesystem, as it is a configuration option.


The story involved a family (single mother) who moves into a new house.  It turns out that this house is special and goblin like creatures are trying to get into it because there is a book inside which they want.  The house is protected with a magical barrier and the only way the kids can see the monsters is by using some sort of seeing device.  At the end they travel to some place where they meet someone they thought was dead (grand father possibly).  They want to take him back but he can't go because if he returns he would age and die.  The movie is not that old since it had CGI monsters and it was shown on Hulu some time ago.  The language of the movie was English.

The kids moved into a house inherited from a family member. There was a journal one kid found in an attack. The journal detailed a bunch of fantasy, fey-type creatures. The kids had a evilish brownie living in their house. The book was presented as something true that was mailed in to the publisher. There were two series.


Why are there two .bashrcs, ~/.bashrc and  /etc/skel/.bashrc?  When I compare them, I find no difference.

For instance, if I were to run the command adduser test, is the .bashrc created automatically upon creation of the home directory for the user test? If it's not created upon user creation, under what conditions is it created?  Also, if I add a .bashrc file to the home directory of a user, will it be overwritten by the OS?  Thanks in advance.


I'm a beginner in Java. From my understanding, when we use any Collections in Java, we declare data type between the tag. However, I'm confused why we would use an Interface as data type for a collection, for example a list as shown below.  List<Type> list3 = new ArrayList<Type>(); List<Interface> list3 = new ArrayList<Interface>();   Appreciate your help. Thank you.

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


Here are my points  $x = 0, y = 10000 \\ x = 1, y = 10421.716 \\ x = 2, y = 10882.302  \\ x = 3, y = 11385.341\\ x = 4, y = 11934.746 \\x = 5, y = 12534.791 \\x = 6, y = 13190.142 \\ x = 7, y = 13905.899\\ x = 8, y = 14687.628$  Here are my values.   The initial value for $y$ is $10000$. As $x$ value increase by $1$, $y$ is multiplied by $1.8^{0.15}$ and subtracted by $500$.  How can I make natural exponential equation with these points? or is it impossible to make natural exponential equation with this?

How do I make exponential equation with points?  Here are my points:  x = 0, y = 0 x = 1, y = 4.75000 x = 2, y = 9.26250 x = 3, y = 13.54937 x = 4, y = 17.62191   this is same as   x = 0, y = 0 x = 1, y = (0 + 5) * 0.95  x = 2, y = ((5 * 0.95) + 5) * 0.95 x = 3, y = (((5 * 0.95) + 5) * 0.95 + 5)) * 0.95 x = 4, y = ((((5 * 0.95) + 5) * 0.95 + 5)) * 0.95 + 5) ) 0.95   as x value increase by 1, y value is added by 5 and multiplied by 0.95 i tried to make an equation for this but i couldn't  also i tried to use natural exponential but the initial value is 0 so it didn't work  please help me


In physics, people very often measure some values which depend on some variable, say the air temperature as a function of time. I think the verb depend is used correctly, since dictionaries define "dependent variables" and "independent variables". The resulting data (mostly shown in graphs) reflect something which mathematicians use to call a function (which would have a rigorous definition), but since the measurement involves often numerous parameters, physicists commonly call the result a dependence. Is this correct? I have not found any dictionary definition of "dependence" which would express this relation between the imposed variable and the result. The plural seems even more problematic. One may measure the air temperature and humidity in parallel. Is it then correct to say that the given graph contains these two dependences? Dictionaries say "dependence" is a mass noun, so there would be no plural. The plural can be found in Wiktionary, but without any explanation. Or should we use the word dependencies? For "dependencies" I can not find a suitable dictionary definition either.

These are two words that have baffled me for long. Dependency is given as 'excessive dependence' in Chambers, but I would love to know how the spoken usage is. My guess is dependency has a political touch to it. In addition, there is an independency as well in the dictionaries, though it does not sound popular.


I want to find out if my mother-in-law's computer has DDR3 memory. She is living quite far away, and she is not completly computer illiterate, but downloading, installing and running a program might be too much for her.   Is there an easy way built into Windows to check this? Something I can guide her through on the phone, without going insane? She might have XP or 7.  If I can find out remotely, I can buy the RAM now, and install it on my next visit. If not, it will take two visits, one to check, one to install.

How to find the RAM type (DDR2/DDR3) of the system using command prompt?  I have tried SYSTEMINFO in command prompt but it did not display the RAM type.


I've installed Ubuntu into a pendrive and now I can't boot into windows without the pen plugged in. It seems that this question () has already the solution, but I need help finding out what partition I should use.  My partitions looks like this:  /dev/sda1: LABEL="System" UUID="F290E90290E8CDE3" TYPE="ntfs"  /dev/sda2: LABEL="TI30925800A" UUID="DE6E0DDF6E0DB0F7" TYPE="ntfs"  /dev/sda4: LABEL="HDDRECOVERY" UUID="0CA84EB2A84E9A5A" TYPE="ntfs"  /dev/sdb1: UUID="605E653B5E650ADC" TYPE="ntfs"  /dev/sdc1: UUID="7cba5674-27f1-474d-9678-896e46d84c5e" TYPE="ext4"  /dev/sdc5: UUID="9500fb35-af38-4272-8475-74a9ee465329" TYPE="swap"    sda1/sda2/sda3 have windows installed, sdb1 it's probably the the 32g SSD disk that helps windows hibernation times, and sdc1 and sdc5 it's probably the ubuntu pen  Should I use the dev/sda1, which is probably the window boot partition?

I installed Ubuntu through USB. Instillation was successful.  But when I restarted my laptop it didn't boot. So planed install it again when started selected install from USB. it booted my previous installed Ubuntu. So after went Ubuntu boots no need of that pen drive, so in short, every time I want to start my pc I need that pen drive to boot.


When I was solving the problem,  "Prove that there are infinity integer solutions for $x^2-2y^2=1$"  I did this kind of thing:  Since x is odd and y is even, let $x=2k+1$ and $y=2m$ then we get $k(k+1)/2=m^2$.  Since there are infinity amount of integers for $x^2-2y^2=1$,  we result that k(k+1)/2=m^2 has infinity amount of integer solutions.  I think we can prove that k(k+1)/2=m^2 has infinity amount of integer solutions in some way.  (Sum of 1~k) = (m^2)   --->  this looks kind of cool  My question is :  "Prove that $k(k+1)/2=m^2$ has infinitely many integer solutions. (without using $x^2-2y^2=1$)"

For the Pell's equation where $d=2$: $$x^2-2y^2=1$$ What are all the integer solutions to the equation. Apparantly there are infinitely many solutions, but how would I represent them in an expression?


I'm currently writing a solutions manual for a textbook, and since the textbook has sections, subsections, and subsubsections, I need to make my book with those as well. But when i use all three, they don't auto-indent, so the levels of hierarchy (which is quite important for this book, trust me) are all jumbled up. How can I make a document so that it looks like the following?    (This example was made from Word '16, but since my manual has a LOT of equations and whatnot, I really need LaTeX)  I have a few ideas as to how I can do this, but currently all have either failed or I was not skilled enough to compile as such.   \newgeometry : I need several different margins on one page, but this command puts ever margin into its own page, which is DEFINITELY NOT WHAT I WANT. \def\changemargin : Since I use \section, this environment was "\renewcommand"-ed into the preamble, but this made my other "\begin~\end"s go haywire. It also puts enumerates, which ought to be in my (sub(sub))sections, back in the original margin geometry. Textboxes : Seems like the best answer to my question, but I don't know how to stick it inside the preamble.

I heavily use org-mode in Emacs to create TODO lists with timekeeping, which has a handy export to LaTeX feature. The problem is that in order to get my exported LaTeX document to look right, I want to indent entire sections, essentially treating sections like lists. It's very easy to create a template to copy and paste into every new file, but not feasible to edit the text directly as this would interfere with org-modes ease of use. Thus:  Is there a way to indent an entire section, using only the preamble?  MWE  \documentclass{article} \usepackage[explicit]{titlesec} \setcounter{secnumdepth}{0} \newcommand{\clock}{CLOCK: number number number \\}  \titleformat{\section}{\bfseries{}}{\roman{section}}{3pt}{#1} \titlespacing*{\section}{0pt}{0pt}{0pt} \titleformat{\subsection}{\bfseries{}}{\roman{subsection}}{3pt}{$\rightarrow$#1} \titlespacing*{\subsection}{2em}{0pt}{0pt} \begin{document}   \section{First section} \clock  \section{Second section} \clock \clock \clock  \subsection{First subsection} \clock \clock  \subsection{Second subsection} \clock  \subsection{Third subsection} \clock  \end{document}   I want the text with the red arrow to be indented to the same level as the section.


I am using ArcGIS 10.1. How do I calculate an accurate area measure for a polygon, where portions of it are falling in two zones, i.e. UTM ZONE 44 & 45 (India)?

I have multiple polygons, all located offshore around the UK. I am trying to calculate the areas of these polygons in square kilometres, without splitting them by UTM zone.  Is it possible to do this accurately? I have been using World Mercator, but there are big distortions at this scale. If the polygons were limited to the east coast, say, I would use UTM31N. However, as they are all over the UK waters, I am unsure what to use.  Is there a coordinate system that covers this area? British National Grid does not extend far enough out to sea to be of use.


Let's say I solved a million dollar problem [for instance P = NP] and wrote a paper describing my proof. Let's assume the conclusion starts like this:  Proposed algorithm, as far as our analysis goes, achieves polynomial time on an NP-Complete problem, showing that P = NP.  Should I add a sentence like this to the conclusion?  All the proofs in this article need to be checked by experts, to make sure that they don’t contain any logical flaws.  Given that no one can be sure about a lengthy proof, and given the importance of the P = NP problem, I feel like it should be added. But it may also weaken the conclusion. What do you think?

I am interested in the situation where you have a very interesting result. For instance, you have solved a very important open problem. However, you are not known in the field and do not have any remarkable publications. Your supervisor thinks the work is good and you submit the work to a high profile journal, but you get rejected.  The thing is that the contribution is very strong. It breaks what most people believe or what they have already proven: e.g., you solve the P vs. NP problem or any other well known open problem.   The reviewers strongly reject your work with no justification and they do not state why the result is wrong. Examples of reviewer comments include:   "The proof must be wrong."  "You cannot achieve such a result."  "You do not understand well the notion of ..."   My question is what to do in this situation? Where to go? If your advisor accepts the work, but the reviewers from the top journal reject the work without even explaining the mistakes,  what should you do?


Is there a way to check whether an integer has exactly two prime factors(can be same) that is , it can be expressed as a product of two prime nos ?  EDIT: I dont want to find the factors i just want a formulae or an algo to check whether a certain no can be expressed as a product of two primes either true or false.

What are techniques to factor numbers that are the product of two prime numbers? For example, how would we factor $262417$ to get $397\cdot 661$? Would we have to guess that factorization or is there an easier way?


has a 19.5 inch frameset (49 cm) and rolls on a pair of 26 x 1.75 BTWIN Trekking tires. I want to go for thinner tires and I came across a  on the Decathlon webpage . I am intrigued to know if these tires would fit on my rim. I'm not planning on changing the tires I have now as they are pretty new (Around 300 km), but I wanted to know to map a future plan. Thanks in advance!

We often get questions on bicycles.stackexchange about fitting wider or narrower tires to bicycles. We have a large number of these with answers suiting the specific bike or style of bicycle in question, but I have been unable to find one that provides a generic answer covering off all things that need to be considered. For most bicycles, the answer is the same regardless of the specific style and sizes of tires in question.   This is intended as a canonical question that we can point closed questions to.


$$\sum_{n \geq 0} \frac{x^{8n}}{(8n)!}$$   Here's my try:  $$\sum_{n \geq 0, \text{even}} \frac{x^{4n}}{(4n)!}$$  $$=\sum_{n \geq 0} \frac{(-1)^n+1^n}{2} \frac{x^{4n}}{(4n)!}$$  By convergence I can split the sums.  $$=\frac{1}{2} \sum_{n \geq 0} \frac{x^{4n}}{(4n)!}+\frac{1}{2} \sum_{n \geq 0} (-1)^n \frac{x^{4n}}{(4n)!}$$  Now consider,  $$\sum_{n \geq 0} \frac{x^{4n}}{(4n)!}$$  $$=\sum_{n \geq 0, \text{even}} \frac{x^{2n}}{(2n)!}$$  $$=\sum_{n \geq 0} \frac{(-1)^n+1^n}{2} \frac{x^{2n}}{(2n)!}$$  $$=\frac{1}{2} \left( \cos(x)+\cosh (x) \right)$$  Now if I find,     $$\sum_{n \geq 0} (-1)^n \frac{x^{4n}}{(4n)!}$$   I'll be done with the problem. How do I do that?     Bonus question:   Compute  $$\sum_{n \geq 0} \frac{x^{3n}}{(3n)!}$$  For this one I'm out of ideas.

Does a closed form exist for      $$\sum \limits_{n=0}^{\infty} \frac{1}{(kn)!}$$   in terms of $k$ and other functions? The best that I have been able to do is solve the case where $k=1$, since the sum is just the infinite series for $e$. I would guess that any closed form must involve the exponential function, but am at a loss to prove it.


If an answer is grey after being downvoted so many times, why is it still allowed up top if it is selected answer.  To me that just speaks volumes of the ability of the OP to select a useful answer. Plus it just makes me scroll down more often.  Can we forgo the special position of a selected answer, if it is greyed?  Example:   My suggested solution is if a selected answer is grey, the top voted answer is placed above selected answer.  Another solution is to introduce a new sort option called standard. Standard is by votes with the selected answer at top. Sort by votes, is sort by votes, selected status has no priority.  Third solution. User option, hide greyed answers.

Similar to  but narrower, I'm suggesting we make a particular exception for downvoted accepted answers (those with score less than zero, or some other threshold like -3), so that they stay in the normal sort order and don't jump to the top.  The accepted answer  on bh.se is -5 at time of writing, above an answer with +8 (which is quite a good score on our little site!). It also doesn't help things that the accepted answer is about a mile long so it takes a lot of scrolling to get past it:


Is it technically correct to use two question marks in the sentence below, i.e. one for the quoted question and the other for the overall question?     Did she say, "Where's the coffee?"?

Suppose there is a sentence in question form, like the one appearing below:     Where do you belong to?   Now, if a speaker refers to that question, he will frame another sentence and will place the question in the quotation marks in that sentence, like what is appearing below:     They said, "Where do you belong to?"   Now, if the speaker wants to convert this sentence too in question form, he will put the original question in another question, like what is appearing below:     What did they mean by saying "Where do you belong to?"   Now, if the speaker wants to rephrase this sentence, it would become as follows:     By saying "Where do you belong to?" what did they mean?    My question is how the 4th sentence is to be punctuated. It has two question marks in it. Does the sentence correctly take two question marks? If so, why will the 3rd sentence not take two question marks − one, just before the closing inverted commas and, the second, just after those commas? The 4th sentence and the 3rd sentence are all same, except being a bit different in placement of the words. Will they take two different sets of punctuation marks?


I regularly receive shipping address labels in pdf format from the post. The pdf document containing the address label is formatted in a very stupid way taking up the entire A4, while just A6 would be enough. One has to cut about 70% of the page and throw the excess paper to trash, to get the address label. Then one has to use a glue stick to glue it on the shipment.  The label contains the recipient's address details, sender's details, and postage & tracking information, both as a barcode.  I would rather use standard self-adhesive sticker labels and a label printer instead. To achieve this, I would need to process each pdf file to crop out the label, shrink parts (the boxed fields) of the label slightly to fit it to the A6 shipping label size.  The cropped label needs to be downscaled to A6 size. But how to prevent the barcode from getting broken? Pdfposter breaks the parcel tracking barcode.

I am looking for an open source command line tool to crop PDF file just like we can do in Adobe Acrobat Pro. I have tried PdfTk, ImageMagick,  PyPDF, and GhostScript—all with no success so far.


I am on Mac Yosemite. Apache 2.4.16. My localhost and local sites stopped working. They've been working fine for months now until I tried to update/fix MySQL. I get the following error:  This site can’t be reached localhost refused to connect. ERR_CONNECTION_REFUSED   Results for ps aux | grep "httpd": 3182   0.0  0.0  2432772    652 s002  S+    8:46AM   0:00.00 grep httpd  The numbers in the line above change each time I run ps aux | grep "httpd". Not sure if this is expected.   When I run killall -9 httpd: No matching processes belonging to you were found  My host file:    ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting.  Do not change this entry. ## 127.0.0.1   localhost 255.255.255.255 broadcasthost ::1             localhost  fe80::1%lo0 localhost  127.0.0.1 test.local   httpd-vhost.conf:  # Virtual Hosts # # Required modules: mod_log_config  # If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn't need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at  # <URL:http://httpd.apache.org/docs/2.4/vhosts/> # for further details before you try to setup virtual hosts. # # You may use the command line option '-S' to verify your virtual host # configuration.  # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for all requests that do not # match a ServerName or ServerAlias in any <VirtualHost> block. #   <VirtualHost *:80>   DocumentRoot "/Users/<myusername>/projects/test"   ServerName test.local   <Directory "/Users/<myusername>/projects/test">     Options FollowSymLinks     AllowOverride All     Order allow,deny     Allow from all     Require all granted   </Directory> </VirtualHost>   I changed my actual username to  for this post only.   apachectl configtest returns: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using <myusername>-iMac.local. Set the 'ServerName' directive globally to suppress this message Syntax OK  Results of sudo launchctl print-disabled system: disabled services = {     "com.apple.AppleFileServer" => true     "com.apple.hdiejectd" => false     "com.apple.screensharing" => true     "com.mysql.mysqld" => false     "com.apple.ManagedClientAgent.enrollagent" => true     "com.barebones.textwrangler" => false     "com.apple.usbmuxd" => false     "com.apple.odproxyd" => false     "com.apple.rpmuxd" => false     "com.apple.ftpd" => true     "com.apple.mrt" => true     "com.apple.smbd" => true     "org.apache.httpd" => false     "com.apple.stackshot" => false     "com.apple.ManagedClient.enrollagent" => true     "org.ntp.ntpd" => false     "org.net-snmp.snmpd" => true     "com.apple.mrt.uiagent" => false     "org.macosforge.xquartz.privileged_startx" => false     "com.apple.pacemaker" => true     "com.apple.flashupdater" => false }

This is a  about Connection Refused    We see a lot of questions to the effect      When I try to connect to a system I get a message      Connection refused      Why is this ?


For hours I've been trying to input an equation as an argument to my function. I want the user to be able to write his own equation which my program then integrates.  The best I have got so far is this (it integrates but does not allow the user to choose the equation):  def integrate(x):     def f(x):         return x**2 + x * 42     n = 10000     a = 0 #lower limit     b = 1 #upper limit     small_element = (b - a) / n     result = 0     for k in range(0, n):         result += f(a + (k +0.5)* small_element)     result *= small_element     return result   As I said, the problem with the code above is that the user does not choose the equation. This program only works on this particular equation of x**2 + x * 42 which I wrote down myself. How do I allow the user to input a mathematical equation himself? For example, I would like him to be able to write in the console:  Integrate(x**3 + x**2 + x + 42)   which would then input the equation into my program and integrate it accordingly.  I was also thinking about putting the equation as a string and somehow making it into an float-kinda thing but that didn't work either.

How can I (easily) take a string such as "sin(x)*x^2" which might be entered by a user at runtime and produce a Python function that could be evaluated for any value of x?


As shown here, I only have 2 languages selected, with one keyboard each:      But in my keyboard menu, I have 4:    How can I get rid of English (US) and French (Legacy) Canadian?

Update: this is a lengthy post, you can     Note: The quick language list refers to the list in the screenshot below, accessible throught the shortcut Win + Space bar  I have two languages for windows spell check in my system, English (United States) and French (Switzerland), but despite both languages being properly configured with "Swiss French" input keyboard, US Keyboard input keeps appearing on this list:    Here's the settings for English (United States) language, you can see the only input is "Swiss French":    Same for Français (Suisse), the only input is "Swiss French":    In the Control Panel, both are also set as Swiss French:    All my settings are set to use "language list":     Here's a few things that I already tried:   I already managed to remove it by some language configuration gymnastics, by adding and removing languages, it always eventually comes back I have already done this:  There's no mention of US Keyboard in my registry settings either:     Please help, I'm desperate, this is my third computer with Windows 10 and they all do the same thing.


I am able to authenticate radius users using radius server+pam+ssh with creating local user with blank password in linux.  Is it possible to authenticate radius users without creating users in local machine with blank password?  /etc/pam.d/ssh file as below  #%PAM-1.0 auth    sufficient      pam_radius_auth.so debug auth    sufficient      pam_unix.so use_first_pass auth    required        pam_auth_status.so                 account sufficient      pam_unix.so  account required        pam_auth_status.so     session required        pam_unix.so

In the last days I have set up some Linux system with LDAP authentication and everything works fine, but there's still something I can't really understand regarding NSS and PAM, also after a lot of research. Citing:  NSS allows administrators to specify a list of sources where authentication files, host names and other information will be stored and searched for  and  PAM is a set of libraries that provide a configurable authentication platform for applications and the underlying operating system  What I don't understand is how PAM and NSS work and interact together. In  the architecture is explained pretty well: I configure PAM to use pam_ldap for LDAP accounts and pam_unix for local accounts, then I configure nsswitch.conf to fetch information from local files and LDAP. If I have understood correctly LDAP is used twice: first by pam_ldap and then by NSS which is itself called from pam_unix. Is that right? Is LDAP really used twice? But why do I need to configure both NSS and PAM? My explanation is that PAM performs different tasks than NSS and it is used by other programs. But, then, it should be possible to use only NSS or only PAM, as I have read in . So I experimented a bit and I have first tried to delete LDAP from the nsswitch.conf (and the authentication stopped to work as if only pam_ldap is not enough to do the job). Then I re-enabled LDAP in NSS and I deleted it from the PAM configuration (this time everything worked fine, as if pam_ldap is useless and NSS is enough to authenticate a user). Is there anyone who can help me to clarify this? Many thanks in advance. UPDATE I've just tried something now. I removed again all the pam_ldap entries in all pam configuration fields and I have also removed shadow: ldap from nsswitch.conf. As now in all the system there are only the lines: passwd: ldap files and group: ldap files in nsswitch.conf. Well... the login with LDAP users works perfectly, those two lines (plus /etc/ldap.conf) are enough to configure LDAP auth. From my knowledge PAM in independent from NSS, but my tests showed it's not. So I ask myself is it possible to completely disable NSS and use only PAM?


If you use 's ability to turn him into a 2/2 and then you use  to add an additional +1/+1 counter. Would both of those +1/+1 counters be removed at the end of turn or only one?

Is a +1/+1 counter I get from, say Unleash or Undying different than +1/+1 from something like  or ?


Could there be a permanent, read-only migration destination for those highly voted, popular "dinosaurs", which are permanent delete candidates or are dangling between on hold and reopen?  Something like museum.stackexchange.com (museum could be called offtopics, cellar, oldies whatever).

Possible Duplicate:          There are two purposes an archive is needed: The closure of beta sites, and the deletion of old yet popular questions on Stackoverflow (and SuperUser and Serverfault if applicable).  One of the main purpose of StackExchange is to improve the web, by allowing great quality questions and answers to be written. One of the worst crimes of a website is to break links, that crime gets worse with the popularity of the content, and there is no denying that StackExchange is popular. The deletion of old questions on SO, and the closing of SE sites is sad, but understandably correct.  So move the questions to a readonly site called something like archive.stackexchange.com.  Pros:   Links remain intact, the old links can be forwarded to the new site Much less loss of data/content All the old and now considered off topic can be removed from SO without any issues/controversy at all.   Cons:   Cost, even though readonly the site would still need to be run (obviously)* Somewhat contrary to the idea of SE sites which is to create communities of experts, although it helps maintainer the great SE community (and the web in general)   *though I believe that deleted questions are still available to 10k users? So they are still being stored and accessed?  To reduce clutter, the questions available from closed sites should only be archived if they have an answer, and with maybe at least one vote on either the question or answer, or if there is more than a certain number of views


Best described with an example, so i'll jump straight into an example model and code below to illustrate my question.  Models:  public class MyModel {     public int Id { get; set; }     public virtual ICollection<MySecondModel> MySecondModels { get; set; } }  public class MySecondModel {     public int Id { get; set; }     public int Counter { get; set; } }   In my Controller, i want to get a sum of the Counter from MySecondModel, who all relates to MyModel.  I currently have   var person = await db.Persons.Select(i =>                 new PersonDTO()                 {                     Id = i.Id,                     Counter = i.MySecondModels.FirstOrDefault().Counter                 }).SingleOrDefaultAsync(i => i.Id == id);   But this obviously only gets me the value from the first, and not all of them.  Any ideas?

Using LINQ to SQL, I have an Order class with a collection of OrderDetails.  The Order Details has a property called LineTotal which gets Qnty x ItemPrice.   I know how to do a new LINQ query of the database to find the order total, but as I already have the collection of OrderDetails from the DB, is there a simple method to return the sum of the LineTotal directly from the collection?  I'd like to add the order total as a property of my Order class. I imagine I could loop through the collection and calculate the sum with a for each Order.OrderDetail, but I'm guessing there is a better way.


I am using Ubuntu 18.4.1 with one built-in and two external monitors. By normal booting (linux 4.15.0.44-generic) Ubuntu can not loaded. But all things ok when I am using  linux 4.15.0.43-generic at booting.

I performed the most recent kernel update on my Dell 5290 2-in-1 earlier today.  But moments after I plug it into its docking station, the screen flickers, blanks and freezes.  The only item left on the screen is the mouse pointer, and it is stuck.   If I leave the tablet not plugged in, it runs just fine.  It seems to be the docking station that triggers the freeze.  That said, I can log into the tablet via ssh even with the screen frozen.  So the system is still running.  But if I try to reboot the tablet via the reboot command, nothing appears to happen. sudo reboot -f will reboot the system, while sudo reboot will not.  Any ideas where I should start looking to identify this problem?


my favorite animal, Tom, moved away 3 years ago, how do I get Him back!

My favourite character from Animal Crossing: New Leaf, Chief, moved out about a month and a half ago. Some people are saying old villagers who moved out can move back in again. Can previous villagers move back in to my town? And if so, can I do anything to make it happen?


Is it possible to use the Windows 8.1 RTM Build from MSDN with an existing Windows 8.0 key?  I updated my laptop using one of our MSDN keys, and thought it would be possible to change back to the 8.0 key in the system control. But when I tried to change the key back to Windows 8.0, Windows rejected the key.  The Windows 8.0 key is an upgrade key, maybe this is relevant.

I purchased Windows 8 online from Microsoft a while ago. Today Windows 8.1 was released as a free update to Windows 8 users over the Windows Store.  I was planning to do a fresh install of Windows 8.1 to have a clean system again and UEFI support because I got new hardware since the Windows 8 installation.  So my questions are:   Where do I get the ISO installation medium for Windows 8.1 64-bit? I tried  where I initially got my Windows 8 ISO from, but when entering my Windows 8 key in the Windows 8.1 installer, it says the key is wrong. Even if I get the ISO, will my old key work? I'm concerned because it didn't work in their installer (see previous point)   Do they seriously want me to reinstall Windows 8 and after that upgrade to Windows 8.1 through their Store?!


How do I show depth in a photograph?  Blurring in the foreground and focusing on an item in the background.

Another question asks,  Rather than the background, I am interested in blurring the foreground. What techniques or advice are different for achieving sharp subjects with strongly blurred foregrounds? Note that I'm not asking how to use an editing program to achieve this effect after in post production or after the image is captured. I am using a Nikon D7200 with an AF-S 18-140 mm VR Lens


1.15 * 100              // 115 correct (int)(1.15 * 100)       // 114 incorrect intval(1.15 * 100)      // 114 incorrect  floor(1.15 * 100)       // 114 incorrect floor(1.1501 * 100)     // 115 correct   I try to cut off the fractional part after the 2nd character and translate it into an integer. It turns out with an error. Tell me how to correctly translate.

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


Let $G(V, E)$ be an undirected final and simple graph. $\bar{G}(V, E')$ a simple graph on the same vertices, while $e \in E'$ iff $e \notin E$ Prove that if G is not a connected graph, then $\bar{G}$ is a connected graph.  This is my idea: Let $v_1, v_2$ $(v_1 \neq v_2)$ be vertices in $V$, assume there isn't such a route $v_1 \overset{e_1}{\rightarrow} ... \overset{e_m}{\rightarrow} v_2$, while $e_i \in E'$. therefore in particular $(v_1, v_2) \notin E'$, therefore $(v_1, v_2) \in E$. this is true for every $(v_1, v_2)$ in contradiction to G not being connected. Is this ok? I feel like there is something wrong here... *I translated it so if anything is not clear please tell me.

I was tasked to prove that when given 2 graphs $G$ and $\bar{G}$ (complement), at least one of them is a always a connected graph.  Well, I always post my attempt at solution, but here I'm totally stuck. I tried to do raw algebraic manipulations with # of components, circuit ranks, etc, but to no avail. So I really hope someone could give me a hint on how to approach this problem.


Looking at  to this question:      Note: Language hint is correctly applied, so syntax highlighter should know it is exactly VB.NET.  Here is how it looks on StackOverflow:    And this is how it looks in Visual Studio 2013 (please ignore vertical bars):    I think VB syntax highlighter should be brought up to date with today's standards.

I noticed that sometimes my code gets highlighted in different colors when rendered.   What is syntax highlighting? How does it work? Why isn't my code being highlighted correctly? How do I report a bug or request a new language? How do I use syntax highlighting? What languages are currently available on Stack Exchange?


There was a book that I read 2 years ago but I can’t remember what it was called!  It starts with a space vessel leaving a sector of space, I think it was a carrier full of scientists? But while they are out the captain knows of a ship that was lost in the sector they are jumping to. As they reach the sector some aliens board the ship, kinda wolf like and they rush around really fast and are twice as strong. As if they were used to a stronger gravity. As they start to take over the ship, making their way to the bridge, the captain quickly orders a ship wide panic, having everyone hide. The unknown creatures take over the ship and order their captain to take them back to the creatures homeland.   They arrive at the homeland and gravity is 2 times as harsher compared to what humans were used to, and they have to fight a lot of the the creatures they don’t even know about as the Wolf like creatures leave them on their planet so they can duel them when they return. I don’t remember anything to much past that in the rest of the series, other than they meet and make peace with a sabertooth like cat on the world, and they start to genetically modify themselves so they can work better on the world, and having children who are used to everything and are twice as fast. The kids learn how to work the alien space ship that was left behind and they all start to rush back to Earth with their new abilities to stop them from attacking the sector before they reach Earth.

Looking for the name of a series of novels I read a two or three years ago. I think the books where relatively new (no older then 10-15 years) as the tech in the books where not outdated scifi.  The series was at least 3 books, but I think there may have been more.  A brutal species of alien determined to be the quickest, strongest, most brutal... individuals possible, takes a group of humans from their colony ship(?) and places them on the aliens "sacred" planet. "Sacred" because of the local fauna being the only threat the aliens have found in the galaxy that surpasses their own prowess.   After a period of time the aliens leave and forget about the weak humans, thinking they will die anyways. The humans do not die, but instead take genes and inspiration from the local fauna (carbon nano tube bones, superhuman reactions, speed, strength and so on).  Think one of the books are named the same as the aliens named the planet.


I'm looking for the solution to the integral $$\int_0^1 \left(\frac{\ln(x)}{1-x}\right)^2dx$$ I solved and know that the solution to $$-\int_0^1 \frac{\ln(x)}{1-x}dx = \frac{\pi^2}{6}$$ through a taylor series argument, and am wondering if a similar approach is the best way to go.

What is the proof of the following: $$\int_{0}^{1} \left(\frac{\ln t}{1-t}\right)^2 \,\mathrm{d}t=\frac{\pi^2}{3} \>?$$


I'm having a hard time proving the following $$\int_0^{\infty} \frac{x^8 - 4x^6 + 9x^4 - 5x^2 + 1}{x^{12} - 10 x^{10} + 37x^8 - 42x^6 + 26x^4 - 8x^2 + 1} \, dx = \frac{\pi}{2}.$$  Mathematica has no problem evaluating it while I haven't the slightest idea how to approach it. Of course, I would like to prove it without the use of a computer. Is this an explicit form of a special function I fail to recognize?


A friend of mine got an earlier appointment date than me at the German embassy for a national visa application. We both have appointment dates already (mine will be in June, while his will be in April), however I need to have an earlier one. I asked him if I can take his slot and he agreed. Is it possible to request for an exchange of appointment dates?

A friend of mine has a visa appointment at German embassy booked at 14th of June. Mine is 20th of June, as there were no earlier dates available. Now, my friend wants to cancel her appointment.    Does anyone know how soon the time she cancelled appears as available if I want to re-schedule mine?    I am aware that it takes 1-2 days to delete my information from embassy's database, which means I have to wait to be able to book an appointment. I can cancel my appointment first, then ask my friend cancel hers. I am afraid I might miss her date, so I need to know whether it appears immediately after she cancels or there is another procedure as well.


i have 32 bit ubuntu 12.04 on an offline computer. I can access the internet using a different windows 7 computer and i have a memory key. How do i install vlc on my offline ubuntu computer?

I have a friend who has got a computer that is not connected to the Internet. Is there any way to install software offline easily?


I've installed a system with Ubuntu Server 16.04 and have KVM installed on it (I selected "virtualization server" during the install, so KVM is likely configured correctly).  the problem: I'm unable to install a KVM guest using virt-install. It acts as if it can't read the install media.  I'm getting this error "Couldn't find hvm kernel ..." when trying to create the VM:  Starting install... ERROR    Couldn't find hvm kernel for Ubuntu tree. Domain installation does not appear to have been successful.   This is the script I'm using to try to create the VM; I run it using sudo.  #! /bin/bash # if [ ! -d /var/www/html/isos/ubus-docker ]; then   mkdir -p /var/www/html/isos/ubus-docker fi umount /var/www/html/isos/ubus-docker/ mount -o loop ~/iso/ubuntu-16.04.1-server-amd64.iso /var/www/html/isos/ubus-docker/ virt-install \   --connect qemu:///system \   --name ubus-docker \   --memory maxmemory=4096,memory=512 \   --vcpus 2 \   --location http://heind-gb0/isos/ubus-docker/ \   --extra-args "console=tty0 console=ttyS0,115200" \   --os-variant ubuntu16.04 \   --disk path=/dev/heind-gb0-vg/vm-ubus-docker \   --network network=default \   --virt-type kvm \   --hvm \         --graphics none   When I visit  in a web browser, I see a nice list of the files and directories in the root of the ISO. (I installed and configured nginx explicitly to serve this ISO.) (note: that's a local server running on the KVM host, so don't bother surfing to it :-))  I don't know how to troubleshoot this. Any help would be welcome.  (Note: I'm running Ubuntu Server, console only, no GUI. And I want to do the guest VM install entirely from the console as well.)  UPDATE: This does seem to be an issue introduced in a recent release of virt-manager. The issues is under discussion on the . And I'm looking through the  history to find working code and perhaps develop a patch to restore support for Ubuntu installation ISOs (and hoping someone more familiar with the code gets there first :-)).  UPDATE 2: It was an issue with the newer releases of virt-manager. Now fixed (see answer in comments below). Not sure when fix will make it into virt-manager packages though.

This command:  virt-install   \    --name bla  \    --ram=1024  \    --disk path=/home/me/libvirt/images/bla.qcow2,bus=virtio,size=10  \    --location /home/me/Downloads/ubuntu-18.10-desktop-amd64.iso   Reports:  ERROR    Couldn't find hvm kernel for Ubuntu tree.   How can I fix this?  (Since there are many duplicate posts and answers with regard to this issue, I am answering it, too.)


I'm currently up to try to improve the performance of some of my queries. As far as I know, statements like "IN" or "NOT IN" are even faster with a large amount of values if a subquery on an indexed field without conditions is used.  SELECT * FROM table1 WHERE field1 NOT IN (SELECT index_field FROM table2)  When it comes to use conditions at table2, the query becomes realy slow on a large amount of data.  SELECT * FROM table1 WHERE     field1 NOT IN (         SELECT             index_field         FROM table2         WHERE             user_id = '2'     )   I was thinking about using LEFT Join but when I need to to the filtering for the user_id, it also becomes slow.  How may I solve this problem? Currently, I've no clue about that.  Kind regards,  Dominik  //--- EDIT -->  The original query looked sth. like this  SELECT     i.* FROM stream_item si LEFT JOIN user__publisher_item ui     ON ui.user_id = 2     && ui.item_id = si.item_id INNER JOIN item i     ON i.id = si.item_id WHERE      si.stream_id IN (5,7,8,9,19,24,29,42,43,44)     && ui.id IS NULL || (         ui.`read` = 0 || ui.saved = 1     ) GROUP BY     si.item_id ORDER BY     si.`found` DESC LIMIT 0,10   I have a table which represents the n:m relationship between stream and items. An unique item can be accessible via multiple streams. Based upon this i have a state-table for user dependent states of an item. Currently, the user-state-entry will only be generated, if the item was read or saved the first tim. Otherwise, there is no entry in the user_item table. In the beginning, this query was fine but now, it takes a lot of time. Even if I leave out the "INNER JOIN" it takes 7 seconds on the current tables with around 500k rows each.  //--- Edit 2 --> The table-structure in the background is as follows:   stream stream_item //n:m relation between stream and items item //unique items stream_group //user-defined groups of multiple streams stream_group_streams //_n:m relation between stream_groups and streams_ user user_item //state-table that holds the user-dependent states of an item - if there is no state, no row exists for an item   btw. sorry for my bad english

Good evening,  I'm currently up to try to improve the performance of some of my queries. As far as I know, statements like "IN" or "NOT IN" are even faster with a large amount of values if a subquery on an indexed field without conditions is used.  SELECT * FROM table1 WHERE field1 NOT IN (SELECT index_field FROM table2)   When it comes to use conditions at table2, the query becomes realy slow on a large amount of data.  SELECT * FROM table1 WHERE     field1 NOT IN (         SELECT             index_field         FROM table2         WHERE             user_id = '2'     )   I was thinking about using LEFT Join but when I need to to the filtering for the user_id, it also becomes slow.  How may I solve this problem? Currently, I've no clue about that.  The original query looked sth. like this  SELECT     i.* FROM stream_item si LEFT JOIN user__publisher_item ui     ON ui.user_id = 2     && ui.item_id = si.item_id INNER JOIN item i     ON i.id = si.item_id WHERE      si.stream_id IN (5,7,8,9,19,24,29,42,43,44)     && ui.id IS NULL || (         ui.`read` = 0 || ui.saved = 1     ) GROUP BY     si.item_id ORDER BY     si.`found` DESC LIMIT 0,10     id      select_type     table   type        possible_keys                                                                           key                 key_len     ref                 rows        Extra 1       SIMPLE          si      index       PRIMARY,stream_2_item,stream_id_found                                                   stream_2_item       4           \N                  663236      Using temporary; Using filesort 1       SIMPLE          ui      eq_ref      user_id_item_id,user_2_item,user_id_read_saved_hidden,user_id_saved,user_id_hidden      user_id_item_id     8           const,si.item_id    1           Using where 1       SIMPLE          i       eq_ref      PRIMARY                                                                                PRIMARY             4           si.item_id          1      I have a table which represents the n:m relationship between stream and items. An unique item can be accessible via multiple streams. Based upon this i have a state-table for user dependent states of an item. Currently, the user-state-entry will only be generated, if the item was read or saved the first tim. Otherwise, there is no entry in the user_item table. In the beginning, this query was fine but now, it takes a lot of time. Even if I leave out the "INNER JOIN" it takes 7 seconds on the current tables with around 500k rows each.  The table-structure in the background is as follows:   stream stream_item //n:m relation between stream and items item //unique items stream_group //user-defined groups of multiple streams stream_group_streams //_n:m relation between stream_groups and streams_ user user_item //state-table that holds the user-dependent states of an item - if there is no state, no row exists for an item   I already asked this question at  but added my 2 Edits with further information to late so that I haven't got an answer anymore.


Im making a function that maps two diferent objects (with equivalent properties and types) using reflection and generic objects (T). My function works well with objects with simple properties like int or string types but now I have to add support for object properties or lists wihtin an object. Can I do this recursively or is it not posible ? I can't post the code for work reasons. The active code is the following:      public static T MapObjects<T>(object sourceObject) where T : new()     {         T destObject = new T();          Type sourceType = sourceObject.GetType();         Type targetType = destObject.GetType();          foreach (PropertyInfo p in sourceType.GetProperties())         {             PropertyInfo targetObj = targetType.GetProperty(p.Name);             if (targetObj == null)                 continue;              targetObj.SetValue(destObject, p.GetValue(sourceObject, null), null);         }         return destObject;     }   Can I modify this function to call itself when the property is an object ?

I want to do something like:  MyObject myObj = GetMyObj(); // Create and fill a new object MyObject newObj = myObj.Clone();   And then make changes to the new object that are not reflected in the original object.  I don't often need this functionality, so when it's been necessary, I've resorted to creating a new object and then copying each property individually, but it always leaves me with the feeling that there is a better or more elegant way of handling the situation.  How can I clone or deep copy an object so that the cloned object can be modified without any changes being reflected in the original object?


I'm trying to install one software but showing this error.

I keep getting this warning whenever I try to run sudo apt-get update.  W: Duplicate sources.list entry http://archive.ubuntu.com/ubuntu/ precise-updates/main i386 Packages (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise-updates_main_binary-i386_Packages) W: You may want to run apt-get update to correct these problems   Below is the output from /etc/apt/sources.list file:  deb http://archive.ubuntu.com/ubuntu precise main restricted deb-src http://archive.ubuntu.com/ubuntu precise main restricted  deb http://archive.ubuntu.com/ubuntu precise-updates main restricted deb-src http://archive.ubuntu.com/ubuntu precise-updates main restricted  deb http://archive.ubuntu.com/ubuntu precise universe deb-src http://archive.ubuntu.com/ubuntu precise universe deb http://archive.ubuntu.com/ubuntu precise-updates universe deb-src http://archive.ubuntu.com/ubuntu precise-updates universe  deb http://archive.ubuntu.com/ubuntu precise multiverse deb-src http://archive.ubuntu.com/ubuntu precise multiverse deb http://archive.ubuntu.com/ubuntu precise-updates multiverse deb-src http://archive.ubuntu.com/ubuntu precise-updates multiverse  deb http://archive.ubuntu.com/ubuntu precise-security main restricted deb-src http://archive.ubuntu.com/ubuntu precise-security main restricted deb http://archive.ubuntu.com/ubuntu precise-security universe deb-src http://archive.ubuntu.com/ubuntu precise-security universe deb http://archive.ubuntu.com/ubuntu precise-security multiverse deb-src http://archive.ubuntu.com/ubuntu precise-security multiverse   How do I fix it?


I am designing gamecards in LaTeX  Everything is going pretty ok so far but when i try to insert the %-sign for a question about percentages my file keeps giving errors.  I tried putting the percentage between dollarsigns because i know just % will make it a 'remark' and that the dollarsign makes it 'mathematical data'.   Whats the reason for the error?   P.s. the error says: file ended while scanning use of \kaart. ...    Codesample:   {\kaart{Bekijk statistiek kaart F:   Schat het percentage mensen dat als lievelingseten spaghetti opgaven, je mag er slechts $ 2% $ langs zitten. } { $ 11% $}}

I need to output the below text but since \ is a special character, I cannot:  [RegularExpression(@"\d+")]   Also sometimes I need use dollar sign $ as well but it seems to be a special char, too.  What is the way to escape those in LaTeX?  UPDATE:  I used \verb as suggested but I am unable to run commands inside it. Also, in the output the font and the opacity of the text is different than the default one:  \verb|[RegularExpression(\newline @"\d+")]|


how to move these red marked ticks to the inside of the box (like on the y axis)?  Thank you    \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{anysize} % Für \marginsize \marginsize{32mm}{32mm}{20mm}{24mm} % Seitenränder \renewcommand{\baselinestretch}{1.5} % Zeilenabstand  \begin{document}  \begin{tikzpicture}   \begin{axis}[     axis x line*=box,     axis y line*=box,     tick align=inside,  %%already tried this one here!!     width=14cm,     height=6.75cm,     xlabel=Platzhalter,     xticklabel style={yshift=-0.1cm},     ylabel=Platzhalter,     yticklabel style={xshift=-0.1cm},     label style={font={\small}},     tick label style={font=\scriptsize},     grid = both,     grid style={line width=0.2pt,},     legend style={         font=\scriptsize,         at={(0.5,1.03)},         anchor=south,         draw=none,     },     legend columns=5,     legend cell align = right,     ,     xmin=0,     xmax=5,     xtick={0, 1, 2, 3, 4, 5},     xticklabels={,2009, 2010, 2011, 2012, },     ymin=0,     ymax=14,     ytick={0,2,...,14},      ybar=8pt, %Abstand Säulen     bar width=12pt, %Breite Säulen   ]     \addplot[blue,fill=blue!30] plot coordinates      {(1, 6) (2, 8) (3, 5) (4, 13)};   \addplot[red,fill=red!30] plot coordinates      {(1, 5) (2, 6) (3, 12) (4, 5)};   \legend{Barplot 1, Barplot 2} \end{axis}    \end{tikzpicture}  \end{document}

I want to have the marks on the x axis at the same position as in the left plotted figure.  \begin{figure}[ht!] \begin{tikzpicture}         \begin{axis}[width=7.5cm,                     ymin=0,                     xmin=0,                     xlabel=Zeit t\,/\,min,                     ytick={0,25,100,160,250},                     ylabel=Temperatur T\,/\,$^{\circ}$C,]             \addplot table[x=Zeit,y=Temperatur] {Daten/V27.csv};         \end{axis} \end{tikzpicture} \begin{tikzpicture} \begin{axis}[ybar,             width=7.5cm,             symbolic x coords={1,2,3,4,5,6,7,8},             xtick=data,             ymin=4.5,             ymax=6,             xlabel=Probennummer,             ylabel near ticks,             %xlabel near ticks,                         ylabel= Scherfestigkeit F\,/\,MPa,]              \addplot[fill=blue] coordinates {                 (1,5.30)                 (2,5.84)                 (3,5.64)                 (4,5.56)                 (5,4.69)                 (6,4.95)             }; \end{axis} \end{tikzpicture} \caption{Aufgezeichnete typische stress--strain Kurve und Mittelwerte der Scherergebnisse} \label{fig:anpress_scher} \end{figure}


$n!\gt 2^{n}$ for $n \geq 4$.  Then there is an inductive proof:  We assume that $n! \gt 2^{n}$ for every random $n \in \mathbb{N}$ with $n\geq4$, and we need to proof that $(n+1)!\gt 2^{n+1}$. Because $(n+1)\gt0$ and $n!\gt2^{n}$, it follows that $(n+1)n!\gt(n+1)2^{n}$. In the left part of the equation we have $(n+1)!$, but in the right part we don't have $2^{n+1}$.  And here comes the part I don't understand:  We want to replace$(n+1)2^{n}$ with $2^{n+1}$, or $n+1$ by $2$. We can do this without any problems, because it is sure that for $n\geq4$ that $n+1\gt2$, and thus that $(n+1)\cdot2^{n}\gt2\cdot2^{n}$  How much I try, I just don't see the connection. So you multiply $n+1\gt2$ by $2^{n+1}$ on both sides, and that makes $(n+1)n!\gt(n+1)2^{n}$ into $(n+1)!\gt2^{n+1}$? I don't see how you can get from $(n+1)2^{n}$ to $2^{n+1}$ with what they're saying. To me, it seems like they're just saying "Hey, because $n+1\gt2$ is greater than $2$, we can just replace it with $2^{n+1}$".

Prove, formally that: $\log_2 n! \ge n$ for all integers $n>3$.   Hint: first prove that $n! ≥2^n$, for all integers $n >3$.  So far what I have:   Base case, $n = 4$,  $4! = 24$  $2^4 = 16$.  Therefore, it is true when $n = 4$.  So how do I proceed from here?  I know I can log the whole equation which will lead to $\log_2 n!$ and $n$. But the linkage seems to be missing. Sorry for the untidiness about the math symbols. I am trying to input them correctly but apparently I am not doing it right.


I know the equation for a polygon when $N$ is a multiple of 4, which in implicit form is $\left|x\right|+\left|y\right|+\sum_{n=1}^{\frac{N}{4}-1}\left(\left|y\cos\frac{2\pi n}{N}+x\sin\frac{2\pi n}{N}\right|+\left|y\cos\frac{2\pi n}{N}-x\sin\frac{2\pi n}{N}\right|\right)=\left(1+2\sum_{n=1}^{\frac{N}{4}-1}\left|\sin\frac{2\pi n}{N}\right|\right)r$ where $r$ is the max radius, but i don't know the equation for every $N$ (where $N$ is any natural number over 2, though, if you have a formula for real or complex $N$ that give them some sense then i'm more than happy to take it). PS: if your formula is in parametric/polar form or can be converted to it is even better. PSS: if you have a formula for only multiple of 2, again, is totally fine. Basically anything that expand the above formula is good.

For example, the square can be described with the equation $|x| + |y| = 1$. So is there a general equation that can describe a regular polygon (in the 2D Cartesian plane?), given the number of sides required?  Using the Wolfram Alpha site, this input gave an almost-square: PolarPlot(0.75 + ArcSin(Sin(2x+Pi/2))/(Sin(2x+Pi/2)*(Pi/4))) (x from 0 to 2Pi)  This input gave an almost-octagon: PolarPlot(0.75 + ArcSin(Sin(4x+Pi/2))/(Sin(4x+Pi/2)*Pi^2)) (x from 0 to 2Pi)  The idea is that as the number of sides in a regular polygon goes to infinity, the regular polygon approaches a circle. Since a circle can be described by an equation, can a regular polygon be described by one too? For our purposes, this is a regular convex polygon (triangle, square, pentagon, hexagon and so on).  It can be assumed that the centre of the regular polygon is at the origin $(0,0)$, and the radius is $1$ unit.  If there's no such equation, can the non-existence be proven? If there are equations, but only for certain polygons (for example, only for $n < 7$ or something), can those equations be provided?


I want to use the command block to set the nearest player's spawn to a specific location, how to I do it? And will the player spawn there if he dies?

I made a server and me and one of my friends want to do a prank on another friend, because he stole all my enchanted diamond armor.  The Prank  I want to set a player's spawn point in a pit of lava, how would I do this without affecting anyone else's spawn point?


We are a small business looking to change server and I am not the most knowledgeable in this field so I was hoping some of you had some suggestions or some knowledge and expertise that can at least help point me in the right direction.   We build WordPress custom themes for websites, Shopify sites, sites using Laravel & Woocommerce sites. We currently have around 20-30 sites sitting on a VPS server with UK Fast. This server is an '' Server and the specs are below:  Total processors: 2  Processor #1 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz Speed 2000.000 MHz Cache 20480 KB  Processor #2 Vendor GenuineIntel Name Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz Speed 2000.000 MHz Cache 20480 KB  HDD: 75GB  HDD: 10GB  Memory: 4GB  CPU: 2  Our Average RAM Usage over past month : 71.5867%  And Average CPU Usage over past month : 19.329%  It is a Linux server.  We are wanting to move from this server and migrate to a new one. We don't mind if it is still with UK fast or not but we are looking for:   As low cost as possible If a site gets infected, it won't affect the other sites on the server (unable to spread) Fast Loading websites (I h=know this isn't all down to the server but our current one is a tad slow) Good security   at the moment it costs £147 / month  Does anyone know if we are using the right package or if some other service would suit us better?  I am just looking for advice as I have little idea when it comes down to servers.  Many thanks.

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


Getting curious about SHA-256 cycles (what happens if you hash a value repeatedly), I came across this question:    The first answer suggests that using a 7-bit hash, it's possible to find a value that hashes to itself. See the red dot which isn't part of a loop but on its own:    I assume from the diagram, this means if I apply the 7-bit hashing function to this value, the output matches the input. So my question is if such values are possible in SHA-256, and if anyone knows what value(s) hash to themselves or has ever found one of those values.

I was wondering if there is a cryptographic hash where the resulting hash is identical to the input for the hash function.  If this is the case, would it be a weakness in the hashing function?


I have two examples. In the first case, debugger catches the unhandled exception:   static void Main(string[] args) {     Exec(); } static void Exec() {     throw new Exception(); }   And the exception has full stacktrace:     at ConsoleApplication28.Program.Exec()     at ConsoleApplication28.Program.Main(String[] args)     at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)    at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()    at System.Threading.ThreadHelper.ThreadStart_Context(Object state)    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)    at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)    at System.Threading.ThreadHelper.ThreadStart()   The second case:  static void Main(string[] args) {     Exec(); } static void Exec() {     try {         throw new Exception();     }     catch (Exception ex) {     } // Breakpoint }   At the breakpoint the exception has short stacktrace:     at ConsoleApplication28.Program.Exec()   Why stacktraces are cut to the containing method in the second case, and how to prevent it? I need full stacktrace for bugreports, otherwise it's not possible sometimes to find there the problem is, without full stacktrace.

What are the best practices to consider when catching exceptions and re-throwing them? I want to make sure that the Exception object's InnerException and stack trace are preserved. Is there a difference between the following code blocks in the way they handle this?  try {     //some code } catch (Exception ex) {     throw ex; }   Vs:  try {     //some code } catch {     throw; }


I have created this program to convert string to float the program run ok but when I try 1995.1995 it output 1995.2 but it works for other strings like 1 can any explain the reason?  #include <iostream> #include <iomanip> using namespace std; bool isValid(char c) {     if (c == '.')         return true;     if (c >= '0' && c <= '9')         return true;     return false; } int main() {     char input = '0';     while (isValid(input)) {          float result = 0;         bool isFraction = false;         float divideBy = 1;         cout << "please enter string to convert : " << endl;         cin >> input;         while (true)         {             if (input == '.') {                  isFraction = true;             }              else {                  int intInput = input - '0';                 if (isFraction) {                     divideBy = divideBy * 10;                     result = result + intInput / divideBy;                 }                 else {                     result = result * 10 + intInput;                 }             }             if (cin.peek() == '\n')                 break;             cin >> input;         }         cout << "Your input is : " << result << endl;     }     return 0; }

In my  I was printing a double using cout that got rounded when I wasn't expecting it.  How can I make cout print a double using full precision?


The integal is  $$\int_{0}^{1} \dfrac{\ln(1-x)}{x}~dx$$  My opnion is use fundamental theorem of calculus, calculate $F(x)$ and then use $F(1^-)-F(0^+)$.  But i cannot find the undetermined integral of $\frac{\ln(1-x)}{x}$.

I have tried to let$f(a)=\int_0^1\frac{\ln(1-ax)}{x} dx$, which means     $f'(x)=-a\int_0^1 \frac{1}{x(1-ax)} dx=a\int_0^1 \left[\frac{a}{ax-1}-\frac{1}{x}\right] dx$.   However, I am stuck at here.


I ran 160 regressions on various combinations of data sets, predictors, and dependent variables. I am now trying to sift through the results and separate good models which are "real" versus those which are due to random chance. My professor sent me this cartoon. It seems to be implying that by using $\alpha = 0.05$, you are highly likely to get significance in 20 data sets.  Questions:   Does random data have a 0.05 probability of being significant at $\alpha = 0.05$? In other words:   $$\Pr(sig>0.05|n=20) = 1 -(1-0.05)^{20} = 0.6415$$  Not exactly a guarantee as suggested by the cartoon.  Is the above calculation true for regressions?   Is there a word for this "random correlation" so I can do further research?

I see that one time out of the twenty total tests they run, $p < 0.05$, so they wrongly assume that during one of the twenty tests, the result is significant ($0.05 = 1/20$).      Title: Significant Hover text: "'So, uh, we did the green study again and got no link. It was probably a--' 'RESEARCH CONFLICTED ON GREEN JELLY BEAN/ACNE LINK; MORE STUDY RECOMMENDED!'"


Since I learnt to use LaTeX 1 month ago, I have never used other software. But every time I begin to write a latex file, I will have to type:   \documentclass{article} \usepackage{geometry} \geometry{left=2.5cm,right=2.5cm,top=1.0cm,bottom=2.0cm} \usepackage{graphicx} \usepackage{subfigure} \usepackage{color} \usepackage{amsmath} ...   So when you are writing C++ code, you just need to include some head files like parameter.h. So is there a way to write those \usepackages in a file and then include it?

What is the best practice for separating the preamble to a dedicated file?  I've seen two variants:   A package: preamble.sty and \usepackage{preamble} A .tex file: preamble.tex and \input{preamble}   Which one is to be preferred?


I am following the equations on , and for torque it is $mgr\sin\theta$, but I am curious about $r$.  I am working on a game and I want to correctly model the top, and am curious if $r$ should be the distance from the tip of the top to the center of mass as an $(x,y,z)$ vector, or should it just be the scalar version?

I am in search of a simplified version of the derivation of  (both translational and rotational) for a rigid body (3D block) that has a body fixed frame and where the center of mass of the body is not at the center of gravity.  I can find elementary derivations for the same system when the center of mass is at the center of gravity, but not for my system in question.    I am using the derivation as background research for a rotordynamics project that I'm working on.  Any help and or references would be greatly appreciated!  :)


I successfully installed Ubuntu but when I rebooted to load up the very first time my PC reached Verifying DMA Pool Data and then stayed there for almost 30m before I gave up on it.  Motherboard is Gigabyte GA-78LMT-USB3 R2

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


For years I've used Comcast and have had port 80 open to a web server at my house, without issue. I switched to CenturyLink fiber last week and port 80 forwarding works and my server is also visible to the outside world.  If I am at home and on the same local network as the web server (everything connected to the same router), I cannot access the sites by using the domain names. If I sign onto a VPN or turn wireless off on my phone, I can see the site by using the domain name.  I'm at a loss. Does anyone have any idea why this would happen?   CenturyLink fiber connection C2100Z modem/router combo

I have an Apache server running on a Raspberry P and it works just fine in the local network. And after forwarding port 80 and trying to connect using the public IP, Chrome says ERR_CONNECTION_REFUSED. But the strange thing is that I CAN reach the server when using VPN and using the same IP. What can I do?     -telnet 80.***.***.78 80      Trying 80.***.***.78...     telnet: connect to address 80.***.***.78: Connection refused     telnet: Unable to connect to remote host     -route -n      Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0     192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0      -sudo netstat -lapute:              Active Internet connections (servers and established)     Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode       PID/Program name     tcp        0      0 *:http                  *:*                     LISTEN      root       6137        2051/apache2     tcp        0      0 *:ssh                   *:*                     LISTEN      root       6367        2249/sshd     tcp        0      0 pi.local:ssh            nmb.local:65535         ESTABLISHED root       8669        2565/sshd: pi [priv     udp        0      0 *:9949                  *:*                                 root       5918        1809/dhclient     udp        0      0 *:mdns                  *:*                                 avahi      6293        2184/avahi-daemon:     udp        0      0 *:54070                 *:*                                 avahi      6295        2184/avahi-daemon:     udp        0      0 *:bootpc                *:*                                 root       5946        1809/dhclient     udp        0      0 pi.local:ntp            *:*                                 root       6310        2200/ntpd     udp        0      0 localhost:ntp           *:*                                 root       6309        2200/ntpd     udp        0      0 *:ntp                   *:*                                 root       6304        2200/ntpd


So, say I have an array of values, set by a user somewhere:  $array = array("test0", "test1", "test2");   From that, I automatically prepare a mysqli statement:  $statement = "SELECT * FROM x_table WHERE x = ? AND y = ? AND z = ?"; $s = "sss";   How, can I bind the parameters?  ... $sql->bind_param($s, $array); // without manually typing $array[0], $array[1].. etc. ...

I'm trying to make a class that will execute any one of a number of stored procedures with any amount of variables  Im using php and mysqli   My class enumerates an array and constructs a string based on the number of elements if any giving something like this CALL spTestLogin(?,?) for example I now need to bind the input from my array using somethin like this:  $stmt->bind_param($this->paramTypes,$this->paramValues);//paramValues is my array   Then if that works I can work on getting my results  Any ideas


In trying to understand the Kullback-Leibler Divergence I conceive it as a metric that if minimized would make the Approximation PDF Q as close as possible to the True PDF P either in the neighborhoods of X where P places the highest probability mass (K(P||Q)) or in the neighborhoods of X where Q places the highest probability mass (K(Q||P)).  So it is like saying to Q "try your best to approximate P where P thinks are the most probable neighborhoods" or inversely "try to approximate P the best in the neighborhoods you believe are the most probable."  On the other hand, trying to arrive to an intuitive understanding of the Kolmogorov-Smirnov statistic, I view it as a decision to underplay local divergences between two probability distributions functions in favor of the 'larger picture' which is reflected in the divergence of their respective Cumulative Distributions.  I wonder if these thoughts make sense, and how you would like to add to them with your own intuitive interpretations of the two Divergence 'metrics'.  In a more practical level when and how do you believe  Kullback-Leibler Divergence and Kolmogorov-Smirnov statistic should be used?  A case in hand might be to compare the predicted probabilities by a classifier --say Logistic Regression-- to the empirical ones using the Validation set.  Consequently compute the divergence between the two distributions --predicted and empirical-- using an appropriate divergence 'metric'.  Finally use this information to select a model that best approximates the conditional probability P(Y|X).  Which metric should we use and why?

Let us consider the following two probability distributions  P       Q 0.01    0.002 0.02    0.004 0.03    0.006 0.04    0.008 0.05    0.01 0.06    0.012 0.07    0.014 0.08    0.016 0.64    0.928   I have have calculated Kullback-Leibler divergence which is equal $0.492820258$, I want to know in general what does this number shows me? Generally, Kullback-Leibler divergence shows me how far is one probability distribution from another, right? It is similar to entropy terminology, but in terms of numbers, what does it mean? If I have a result of result of 0.49, can I say that approximately  one distribution is far from  another by 50%?


I have a matrix $A \in \mathbb{R}^{n\times n}$ whose diagonal elements are all "$1$" and all other elements are of the form $\frac{-1}{n}$ where  $n \in \mathbb{N}$ and $n >1$ is the number of rows or columns of $A$. Since $A$ is symmetric and diagonally dominant with positive diagonal entries, it is positive definite.  Can we get an expression for its eigenvalues using some kind of decomposition or by other standard approach ?   This matrix clearly has a special structure but I am unable to utilize its properties.

This question aims to create an ""  of numerous questions that ask about determinants of specific matrices (I may have missed a few):              The general question of this type is  Let $A$ be a square matrix of rank$~1$, let $I$ the identity matrix of the same size, and $\lambda$ a scalar. What is the determinant of $A+\lambda I$?  A clearly very closely related question is  What is the characteristic polynomial of a matrix $A$ of rank$~1$?


For those saying this is a duplicate it is not.   The linked question is asking about whole unpeeled ginger.  This question is asking about ginger which has already been cut and it’s longevity.  If already cut ginger will not go beyond 2 days then the answer shoulr state that suggesting that unpeeled ginger is the only real way to go. I have been eating small pieces of ginger and leaving it outside and I notice asa I cut it later that day and certainly by the next day it has lost its mouthwatering zingy flavour and become chewy. I’m wanting to preserve cut ginger.  For a start I guess I guess I could buy smaller pieces to begin with so as not to waste a bigger piece. Would buying a bigger piece and cutting affected areas off help I.e does the dehydration travel slowly from the exposed part? If I were to zip tie a cut part and put it in the fridge how long would it last? Would wrapping the cut area in foil paper help(foil doesn’t let air through) then I could slice that part of with next use. What else can I do to preserve cut fresh ginger and how long can I expect it to last? Thanks

I have root ginger which sometimes dries out and goes a bit wrinkly.  Currently I just store it on the side in a bowl.  Is there a better way to store it to maximise its shelf life?


I'm trying to develop simple computational tools to study the dynamics of electric particles. I asked a question about my implementation of particle dynamics using differential equations derived from Coulomb's law.   , but on .  This material is not covered in my physics class and due to the special case (relative to what I have learned) of particles in motion I am hoping someone can explain what the kind answerer on Stackoverflow might have meant?

Can we use  to calculate the force between two charges which are not at rest? If not, what formula should be used to calculate the force? I searched it, but I couldn't find a clear answer.


Is there a way to "reopen" a process that is running? I accidentally closed my terminal window and it was running a openvpn. Is there a way to bring that process back to the focus of the terminal? I've tried fg and jobs but since it is a program I don't believe those commands apply.

I have detached a process from my terminal, like this:  $ process &   That terminal is now long closed, but process is still running, and I want to send some commands to that process's stdin. Is that possible?


Let $A: \mathbb C^4 \to \mathbb C^4$ be a linear operator and let $f(x)$ be a polynomial with complex coefficents. If $c$ is an eigenvalue for $f(A)$, does there exists a eigenvalue $a$ of $A$ such that $f(a) = c$?  Please, explain why this is true or false.

Title looks a little bit twisted. What I want to say is the following:  $A\in\mathbb{R}^{n\times n}$, polynomial of matrix $A$: $P(A)=\displaystyle \sum_{k=0}^{n} c_k A^k$. $\lambda(A)$ is the set of eigenvalues of $A$.   So, we want to prove $\lambda(P(A))=P(\lambda(A))$  So far, I can prove it when $A$ is diagonalisable, but when $A$ is not diagonalisable, it seems we can't just simply use Jordan normal form to prove it. (Or this statement won't hold when it's not diagonalisable?)  Can anyone suggest me something and help me out? Thanks!


I'm just a little confused on this. I'm pretty sure that I need to use indicators for this but I'm not sure how I find the probability. The question goes like this:     A company puts five different types of prizes into their cereal boxes, one in each box and in equal proportions. If a customer decides to collect all five prizes, what is the expected number of boxes of cereals that he or she should buy?   I have seen something like this before and I feel that I'm close, I'm just stuck on the probability. So far I have said that $$X_i=\begin{cases}1 & \text{if the $i^{th}$ box contains a new prize}\\ 0 & \text{if no new prize is obtained} \end{cases}$$ I know that the probability of a new prize after the first box is $\frac45$ (because obviously the person would get a new prize with the first box) and then the probability of a new prize after the second prize is obtained is $\frac35$, and so on and so forth until the fifth prize is obtained. What am I doing wrong?! Or "what am I missing?!" would be the more appropriate question.

What is the average number of times it would it take to roll a fair 6-sided die and get all numbers on the die?  The order in which the numbers appear does not matter.  I had this questions explained to me by a professor (not math professor), but it was not clear in the explanation.  We were given the answer $(1-(\frac56)^n)^6 = .5$ or $n = 12.152$  Can someone please explain this to me, possibly with a link to a general topic?


I'm writing some mail-processing software in Python that is encountering strange bytes in header fields.  I suspect this is just malformed mail; the message itself claims to be us-ascii, so I don't think there is a true encoding, but I'd like to get out a unicode string approximating the original one without throwing a UnicodeDecodeError.  So, I'm looking for a function that takes a str and optionally some hints and does its darndest to give me back a unicode.  I could write one of course, but if such a function exists its author has probably thought a bit deeper about the best way to go about this.  I also know that Python's design prefers explicit to implicit and that the standard library is designed to avoid implicit magic in decoding text. I just want to explicitly say "go ahead and guess".

I received some text that is encoded, but I don't know what charset was used. Is there a way to determine the encoding of a text file using Python?  deals with C#.


I'm literally about 6 hours into Ubuntu.  I've gotten Steam onto the desktop. It seems I can't get it to fully install and update.  When I click the icon, the following comes up:  Steam needs to install these additional packages:      libgl1-mesa-dri:i386, libgl1-mesa-glx:i386, libc6:i386   If I try to install I get  ......................................................................................... Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libgl1-mesa-glx:i386 : Depends: libglapi-mesa:i386 (= 10.1.3-0ubuntu0.6)  unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed                         Depends: libcheese7 (>= 3.0.1) but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages   I am running on a 64-bit version so I know that may be the problem. just a general overview of my PC. It's a 2009 hp pavilion, running off of sandybridge.  If I continue in the terminal:  You are missing the following 32-bit libraries, and Steam may not run: libGL.so.1   If anyone has a step by step guide on how I can get around the 64-bit issue and installing the 32-bit files. please let me know. So far I'm actually enjoying fiddling around with Linux so this is just another thing to learn.

I have tried some of the solutions posted elsewhere in the support forum, one seemed like it worked but after a steam update i found myself back at square one  I am a new Linux user and am already at a learning curve :)  Thanks for any help  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libgl1-mesa-glx:i386 : Depends: libglapi-mesa:i386 (= 10.1.3-0ubuntu0.3)  unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed                         Depends: libcheese7 (>= 3.0.1) but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. Press return to continue:


Basically I'm trying to insert a value in a table from a textarea.  $sql_insert = "INSERT INTO message_admin (message, lastedit_ip, lastedit_date) VALUES ('".$_POST["message"]."', '".$_SERVER['REMOTE_ADDR']."', '".date("d/m/Y")."');";   Thing is if I type either the symbol ' or " in my text area, I will get PHP debug because PHP will take it as if I closed my string (is that the right expression, even?) Hope you did understand me

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?


Is there any official etiquette for placing images in blockquotes? I usually just put them in the post without blockquotes. Also, sometimes edits are just made to add blockquotes to images. This image is out of blockquotes:    This image is inside of the blockquotes:        Which is preferred?

I've seen this popping up a lot lately. Users have been putting images inside blockquotes to add the darker border around the image so it doesn't look like the image "blends into the background" and is easier to tell it's an image.        How would I ever know that this image isn't part of the normal content without the border!? Ok, bad example (if you hate unicorns!!!). This happens a lot more often on meta when posting screenshots of the website.  It doesn't bother me so much, so I don't really care. But being the HTML semantics freak I am, I don't like the idea of putting images inside blockquotes just to create a border effect. So I'm curious how much of a problem people think this is, and if images should have a border applied to them to make them stand out. Where does everyone stand on this?


When I launch Minecraft (modded or unmodded) I get this error:  EXCEPTION_ACCESS_VIOLATION (0xc0000005)   Problematic frame as [ig8icd64.dll+0x16b87]   I have tried every solution on the internet and it is still not working, some people suggest getting new graphic card, but my computer is like 6 months old and I have the latest soft drivers installed. I have got Intel Iris Graphics 6100 with an i3 core processor (I have not found out a code name yet).    I used to have this error and it just randomly fixed itself like 3 months ago. For any other info just ask me.

When I try to launch Minecraft 1.7.4 or newer, the game crashes on startup, and the game output screen says this:  #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=*, pid=*, tid=* # # JRE version: Java™ SE Runtime Environment (7.0_51-b13) (build 1.7.0_51-b13) # Java VM: Java HotSpot™ Client VM (* mixed mode, sharing windows-* ) # Problematic frame: # C  [ig4dev32.dll+0x3e88] OR # C  [ig4dev64.dll+0x55ec] OR # C  [ig4icd32.dll+0x104a77] OR  # C  [ig4icd64.dll+0x84930a]   This happens with both Java 7 and 8.  What causes this error, and what can I do to fix the issue?


If I wrote something in plperlu, and it used a Perl module (e.g. MyModule::Foo), when would that module be reloaded? Does it keep track of them like mod_perl's , so that a touch will cause a reinterpretation?

If I wrote something in plperlu, when would that module be reloaded?  Every time the function ran?  The first time it ran?  Does the Perl DLL get unloaded if it hasn't been used in a while, and then after that it'd be another module reload?


Given $f_n \rightarrow f$ a.e. Does $||f_n||_p \rightarrow ||f||_p$ imply $f_n\rightarrow f$ in $L^p$?   Clearly this does not hold for $p = \infty$, since given functions with same hight, pointwise convergence does not imply uniform convergence.  And when $p=1$, it becomes Scheffe's lemma.  For $ 1< p <\infty$,  we have   $$\int |f_n - f|^p dm \leq 2^{p-1}\bigg(\int  |f_n|^p + |f|^p dm\bigg). $$ Using General Lebesgue Dominated Convergent theorem, we have  $$\lim_n \int |f_n - f|^p dm = \int \lim_n |f_n - f|^p dm,$$ if and only if  $$\lim_n \int |f_n|^p + |f|^p dm = \int \lim_n |f_n|^p + |f|^p dm$$ which holds from the assumption that $||f_n||_p \rightarrow ||f||_p$.   Is my argument correct? Thanks!

Let $1\leq p < \infty$. Suppose that    $\{f_k\} \subset L^p$ (the domain here does not necessarily have to be finite),  $f_k \to f$ almost everywhere, and  $\|f_k\|_{L^p} \to \|f\|_{L^p}$.    Why is it the case that $$\|f_k - f\|_{L^p} \to 0?$$   A statement in the other direction (i.e. $\|f_k - f\|_{L^p} \to 0 \Rightarrow \|f_k\|_{L^p} \to \|f\|_{L^p}$ ) follows pretty easily and is the one that I've seen most of the time. I'm not how to show the result above though.


I designed a microphone preamplifier based on a single op-amp. It works perfectly using two 6-volt batteries.  However, I need to power it directly from AC.  I found a 9 V AC rated wall-wart, but it is not center tapped so I need to find another way of making dual-voltage supply. How do I do that?

I have a function generator IC  from EXAR. It's application circuits uses dual power supply +/-9 volts. How can I make such a 9-0-9 dual supply from a single voltage source like a battery or an adapter?


Update: The summation I came across has the form shown in title, and that exact question appears to be new. I could ask for proofs that take on this summation directly (without reducing it to summations starting at $n = 0$ or $n =1$), and that would be the preferred answer and the only one I will accept. But might as well let this fly as is, collecting all proofs of the identified equivalent variants.    I just stumbled across the fact that  $\tag 1 \sum_{n=2}^{\infty} \, \frac{n-1}{2^n} = 1$  This is equivalent to   $\tag 2 \sum_{n=1}^{\infty} \, \frac{n}{2^n} = 2$  I discovered $\text{(1)}$ using a 'matrix/combinatorial' argument, but it would need work to turn it into a formal proof.  I googled and found this , explaining how to show $\text{(2)}$.  I didn't find the question on this site, prompting this 'collecting proofs post':     Please supply a proof demonstrating either $\text{(1)}$ or   $\text{(2)}$. If you use any theory or technique, mention that at the   start of your answer.

I have put his on wolfram and obtained answer as follows:  $\sum_{n=1}^{\infty}\frac{n}{2^n} = 2$  And the series is convergent too because $\lim_{n\to\infty} \frac {n}{2^n} = 0$  However I am wondering if there is a convenient way to solve this; I don't think you can represent it by a geometric progression either. So how do we have to do it on paper?


If $R$ is a commutative ring and $f(x), g(x) \in R[x]$ two polynomials such that $R[x]/f(x)\cong R[x]/g(x)$ as $R$-algebras, what can we say about $f$ and $g$?   Or given $f(x)\in R[x]$, what can we say about the set $\{g \in R[x]\mid R[x]/f(x) \cong R[x]/g(x)\}$?  Can we conclude that $\mathrm{deg}(f) = \mathrm{deg}(g)$? Is there an automorphism of $R[x]$ taking $f$ to $g$?  I'm most concerned about the cases where $R=k$ is a field, $R=\mathbb{Z}$, or $R=\mathcal{O}_k$ is the ring of integers of a number field, but I'd be interested in the most general results possible.

Let $R$ be a commutative ring (with identity).   Let $f,g\in R\left[x\right]$ both be monic polynomials of degree $d$.   Then the underlying abelian groups of the rings $R\left[x\right]/\left(f\left(x\right)\right)$ and $R\left(x\right)/\left(g\left(x\right)\right)$ are isomorphic. Actually both are isomorphic to the direct sum $R^{\oplus d}$.  Questions:     What sort of relation between $f$ and $g$ will ensure that $R\left[x\right]/\left(f\left(x\right)\right)$   and $R\left(x\right)/\left(g\left(x\right)\right)$ are also isomorphic   as rings (with identities)?      What sort of relation between $f$ and $g$ will ensure that $R\left[x\right]/\left(f\left(x\right)\right)$   and $R\left(x\right)/\left(g\left(x\right)\right)$ are also isomorphic as   $R$-algebras?   Maybe my questions are too broad. Partial answers (e.g. with extra conditions on $R$) or references are also very welcome.


My son loves the weather and he would like to use these commands to alter the weather. However, he's tried but nothing seems to work.  How do we use the weather and wm commands?

Is there a way to change the weather in Minecraft in Creative Mode? All it does is rain all the time. It's rained for three days. Is there a way, mods included, that can change it?


I'm building a time and weather app. I have two functions. showtime() that awaits getWeather(). The constants log fine in getWeather(), but when I try to retrieve the same constant in showtime() I get undefined... .

  const weekday = document.querySelector('.weekday'); const days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thur','Fri', 'Sat', 'Sun'];  setInterval(() => { const d = new Date(); const day = days[d.getDay()];      async function showtime() {     await getWeather();     console.log(sunriseTime); // returns undefined     console.log(day) // logs fine, returns Wednesday.          weekday.innerHTML = day + ', Sunrise at: ' + sunriseTime;     }     showtime(); }, 1000);  //   const openweather_api = "https://api.openweathermap.org/exampleexample";  async function getWeather() {     console.log('run weather function first')     const response = await fetch(openweather_api);       const json = await response.json();      const sunriseTime = `${json.sys.sunrise}` // logs sunrise time in seconds.      }  getWeather(); // runs fine and retrieves values from Open Weather Json.

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


I am travelling to Netherlands and Germany as a tourist. I have invitation letter from a friend in Netherlands. I am applying for a Schengen visa from Netherlands consulate. Should my point of entry and exit be necessarily Netherlands?I plan to enter Netherlands and return back from Germany

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


What is the sum of this infinite series of roots: $$\sqrt{1+\sqrt{2+\sqrt{3+\sqrt{4 + \cdots+\sqrt{\infty}}}}}$$  This is an interesting expression because the increase created by the addition of the next term is offset by the square root introduced with the next term. the key is determining what the relationship between these two is exactly  I know it converges on an irrational number around 1.75 as I have tried computing it for a few small iterations. But I was wondering how to algebraically simplify this expression.  I have tried many things and ways to manipulate the expression but to no avail.

$ \lim_{n\to\infty} {\sqrt{1+{\sqrt{2+{\sqrt{\cdots +\sqrt{n}\ }\ }\ }\ }\ \ }\ } = ? $ Either closed answer or an upper bound would help.


From the logcat I understand that the Activity crashes because of NullPointerException causes by this line of code.   mImageView.setImageBitmap(decodeSampledBitmapFromResource(getResources(),                                     R.id.picture, imageWidth, imageHeight));   I have read articles about similar problem but still getting NullPointerException. I think that mistake right under my nose, but still I can't catch it.  Where should I put this line to avoid NullPointerException?  @Override public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState); ...     ImageView mImageView = (ImageView) findViewById(R.id.picture);      BitmapFactory.Options options = new BitmapFactory.Options();     options.inJustDecodeBounds = true;     BitmapFactory.decodeResource(getResources(), R.id.picture, options);     int imageHeight = options.outHeight;     int imageWidth = options.outWidth;      mImageView.setImageBitmap(decodeSampledBitmapFromResource(getResources(),                                 R.id.picture, imageWidth, imageHeight)); }  public static Bitmap decodeSampledBitmapFromResource(Resources res, int resId,                                                      int reqWidth, int reqHeight) {      // First decode with inJustDecodeBounds=true to check dimensions     final BitmapFactory.Options options = new BitmapFactory.Options();     options.inJustDecodeBounds = true;     BitmapFactory.decodeResource(res, resId, options);      // Calculate inSampleSize     options.inSampleSize = calculateInSampleSize(options, reqWidth, reqHeight);      // Decode bitmap with inSampleSize set     options.inJustDecodeBounds = false;     return BitmapFactory.decodeResource(res, resId, options); } public static int calculateInSampleSize(         BitmapFactory.Options options, int reqWidth, int reqHeight) {     // Raw height and width of image     final int height = options.outHeight;     final int width = options.outWidth;     int inSampleSize = 1;      if (height > reqHeight || width > reqWidth) {          final int halfHeight = height / 2;         final int halfWidth = width / 2;          // Calculate the largest inSampleSize value that is a power of 2 and keeps both         // height and width larger than the requested height and width.         while ((halfHeight / inSampleSize) > reqHeight                 && (halfWidth / inSampleSize) > reqWidth) {             inSampleSize *= 2;         }     }      return inSampleSize; }   and here is ImageView from layout.  <ImageView         android:layout_height="240dp"         android:layout_width="199dp"         android:src="@drawable/galaxy"         android:id="@+id/picture"         android:layout_gravity="center_horizontal"         android:scaleType="fitCenter"         android:layout_weight="0.19" />

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?