My friend gave me a question. The question states:  There a $100$ people named $(1,2,3,.....,100)$ and there are $100$ doors named $(1,2,3,...,100)$ .Assume all doors are closed. The first named $1$ person comes and opens the doors which are multiples of $1$. The only functions that a person can do is open a door which is already closed or closed a door which is already open. Now the person named $2$ comes and does this function(of opening or closing) on all the doors which are multiples of 2. This process similarly takes place for $3,4,.....100$ . At the end when this completed how many doors will be left which will be open and not closed.  My thoughts in this question were that I was thinking the only doors which will be open will be the squares because:  $$\begin{array}{|c|c|}   N&\text{factors}\\   4&1,2,4\text(factors)\\   9&1,3,9\text(factors)\\   16&1,2,8,4,16\text(factors)\\   25&1,5,25\text(factors)\\   36&1,3,6,18,2,12,36,4,9\text(factors)\\   49&1,7,49\text(factors)\\   64&1,2,4,8,16,32,64\text(factors)\\   81&1,3,9,27,81\text(factors)\\   100&1,2,5,4,10,25,20,50,100\text(factors)\\   \end{array}$$  So as we can see when each of these numbered people will go the doors will open and be closed respectively which will end up all of the squares being open. But how do I show that these are the only numbers?  Also this seems to be a tedious way to do it and doesn't seem like this will be this tedious. So is there any way which is better than this.

I have a problem called "The Prison Problem" that I need to explain to my 9-year-old cousin. I would think that he has just started learning about divisors and perfect squares, and as such, I have a proposed solution. Any input from you guys would be welcome, as to what is the best way to go about this.  Problem:  There was a jail with 100 cells in it, all in a long row. The warden was feeling very jolly one night and told his assistant that he wanted to give all the prisoners a wonderful surprise. While they were sleeping, he wanted the assistant to unlock all the cells. This should be done, he told the assistant, by putting the key in each lock, turning it once. The assistant did this, then came back to report that the job was done. Meanwhile, however, the warden has second thoughts. "Maybe I shouldn't let all the prisoners free," he said. "Go back and leave the first cell open, but lock the second one (by putting the key in and turning it once). Then leave the third open, but lock the fourth, and continue in this way for the entire row." The assistant wasn't very surprised at this request as the warden often changed his mind. After finishing this task, the assistant returned, and again the warden had other thoughts. "Here's what I really want you to do," he said. "Go back down the row. Leave the first two cells as they are, and put your key in the third cell and turn it once. Then leave the fourth and fifth cells and turn the key in the sixth. Continue down the row this way." The assistant again did as instructed. Fortunately, the prisoners were still asleep. As a matter of fact, the assistant was getting pretty sleepy, but there was no chance for rest yet. The warden changed his mind again, and the assistant had to go back again and turn the lock in the fourth cell and in every fourth cell down the row. This continued all through the night, next turning the lock in every fifth cell, and then in every sixth, and on and on, until on the last trip, the assistant just had to turn the key in the hundredth cell. When the prisoners finally woke up, which ones could walk out of their cells?  Proposed solution:  Ten cells are left open after this process. Every cell that is a perfect square will remain open (1, 4, 9, 16, 25, 36, 49, 64, 81, and 100). If a number is not a perfect square, then it has an even number of divisors, therefore it will be "toggled" an even number of times and end up where it started (closed). Perfect squares have an odd number of divisors, so they will end up the opposite of where they started (open).


Several times Harry, Ron, and Hermione have had almost nothing to eat:      The fact that Hermione was getting better at identifying edible fungi could not altogether compensate for their continuing isolation, the lack of other people’s company, or their total ignorance of what was going on in the war against Voldemort.    “My mother,” said Ron on night, as they sat in the tent on a riverbank in Wales, “can make good food appear out of thin air.”    He prodded moodily at the lumps of charred gray fish on his plate.   But why couldn't they simply ask Kreacher to bring them some? I know that in the beginning, he would not have cooperated, but once they gave him Regulus' locket, he would be happy to help. Why would they eat edible fungus when Kreacher would bring them a full meal?

On at least two occasions Harry just yells "Kreacher!" and the house-elf has to appear.  This happened once at Privet Drive, at the start of Half-Blood Prince, and once again at Hogwarts.  Why didn't Harry call Kreacher again when they were in trouble? After the Ministry break-in they decided to avoid contacting Kreacher, just because they were not sure how he would react. Still, at Malfoy Manor, they were already in deep trouble, so no more harm would have been caused if Harry had tried to summon Kreacher to help.


How about having desktop notifications enabled for the questions I've asked or participated in? The notifications which set in the header panel will be directly available on my desktop similar to a mail account.  Many times users will not be able to keep coming back on the website; hence, these subtle notifications will help users to stay connected and will serve as a reminder of activities.  However, to avoid user discomfort, this capability should be a preference setting.

Is there any desktop notifier for stackoverflow.com?  I'd like it to notify in the system tray when questions of my interest are posted, answers and comments to my questions are given, etc.


I'm writing a simple Minecraft like game to test out a few world gen algorithms and to learn more about OpenGL. My first render code was glBegin() ... glEnd() style. Very ineficient and slow. I started learning VBOs for a heightmap project but using VBOs will force me to update the whole VBO of the chunk if something is added or removed due to it's size changing. That also sounds ineficient. The most plausable theory so far I can think of is instancing but even this isn't good due to multiple render types.  When I've been modding Minecraft all the render code i've seen there (and written my self) has been glBegin() ... glEnd() style. Is it really that? It just feels so wrong since it can render 64 chunks 20 fps no problem on an Intel intergrated GPU.

I found Minecraft's marvelous large worlds extremely slow to navigate, even with a quad core and meaty graphics card.  I assume Minecraft's slowness comes from:   Java, as spatial partitioning and memory management are faster in native C++. Weak world partitioning.   I could be wrong on both assumptions. However, this got me thinking about the best way to manage large voxel worlds. As it is a true 3D world, where a block can exist in any part of the world, it is basically a big 3D array [x][y][z], where each block in the world has a type (i.e BlockType.Empty = 0, BlockType.Dirt = 1, etc.)  I assume that to make this sort of world perform well, you would need to:   Use a tree of some variety (//) to split all the cubes out; it seems like an oct/kd would be the better option, as you can just partition on a per cube level not a per triangle level. Use some algorithm to work out which blocks can currently be seen, as blocks closer to the user could obfuscate the blocks behind, making it pointless to render them. Keep the block object themselves lightweight, so it is quick to add and remove them from the trees.   I guess there is no right answer to this, but I would be interested to see peoples' opinions on the subject.  How would you improve performance in a large voxel-based world?


can be generalized to,  $$\begin{align} \sqrt{ 2+ \sqrt{ 2 + \sqrt{ 2-x}}}=x&,\quad\quad x = -2\cos\left(\frac{8\pi}{9}\right)=1.8793\dots\quad\quad\quad \\ \\ \sqrt{ 4+ \sqrt{ 4 + \sqrt{ 4-x}}}=x&,\quad\quad x = 2\sum_{n=1}^3\cos\left(\frac{2\pi\, s_1(n)}{19}\right)=2.5070\dots\quad\\ \\ \sqrt{ 8+ \sqrt{ 8 + \sqrt{ 8-x}}}=x&,\quad\quad x = -1-2\sum_{n=1}^6\cos\left(\frac{2\pi\, s_2(n)}{37}\right)=3.3447\dots\\ \\ \sqrt{ 14+ \sqrt{ 14 + \sqrt{14-x}}}=x&,\quad\quad x =\, \color{red}? \pm 2\sum_{n=1}^{\color{red}{7\,?}}\cos\left(\frac{2\pi\, s_3(n)}{\color{red}{63\,?}}\right)=\dots\quad\quad\quad\quad\\ \\ \sqrt{ 22+ \sqrt{ 22 + \sqrt{22-x}}}=x&,\quad\quad x = -1+2\sum_{n=1}^{16}\cos\left(\frac{2\pi\, s_4(n)}{97}\right)=5.2065\dots\\ \\ \sqrt{ 32+ \sqrt{ 32 + \sqrt{ 32-x}}}=x&,\quad\quad x = -2-2\sum_{n=1}^{23}\cos\left(\frac{2\pi\, s_5(n)}{139}\right)=6.1716\dots \end{align}$$  and so on, where the sequences $s_k(n)$ are,  $$\begin{aligned} s_1(n) &= 2, 3, 5.\\ s_2(n) &= 2, 9, 12, 15, 16, 17.\\ s_3(n) &=\, \color{red}?\\ s_4(n) &= 4, 6, 9, 10, 11, 14, 15, 17, 21, 23, 25, 26, 32, 35, 39, 48. \end{aligned}$$  etc. Note that by repeated squaring, we get,  $$((x^2 - a)^2 - a)^2 - a + x = 0$$  which has two cubic factors when $a=k^2+k+2$, with the $x_i$ above as sums of $\cos(z)$, and a root of the same cubic family,  $$x^3 + k x^2 - (k^2 + 2k + 3)x - ((k + 1)^3 - k^2)=0$$  This has a negative discriminant, $D  =-(4k^2+6k+9)^2$, implying all roots are real.  $$\begin{array}{|c|c|c|} k&a&\sqrt{D}\\ 0&2&9\,i\\ 1&4&19\,i\\ 2&8&37\,i\\ 3&14&\color{red}{63}\,i\\ 4&22&97\,i\\ 5&32&139\,i\\ \end{array}$$  Questions:   Can anybody find the sequence $s_3(n)$? (I used Mathematica's PowerMod, but it only works for primes.) Why do the others have a constant (namely $-1,-1,-2$) added to the sum of cosines? Can we predict its value, or can it be found only by trial and error?


[sample.py] a = [1, 2, 3] len(a)  # Why it's not like 'a.length()'?  Why some built-in functions are defined as 'function' oriented where as some others are in 'object/variable' oriented style (like 'a.sort()') in Python..? Is there any particular reason apart from the return types & speed? (e.g a.sort() -> modifies the same variable (execution speed is high, not necessary to create new memory address) where 'sorted(a) returns the variable/values which refers to new memory address and execution speed is low'). What is the advantage & disadvantage between them? Thanks in advance.

I know that python has a len() function that is used to determine the size of a string, but I was wondering why it's not a method of the string object.  Update  Ok, I realized I was embarrassingly mistaken. __len__() is actually a method of a string object. It just seems weird to see object oriented code in Python using the len function on string objects. Furthermore, it's also weird to see __len__ as the name instead of just len.


Similar to this question   But in my case () one of the replies was edited after the bounty was posted.  However it still does not answer the question.  (It was basically edited to clarify that it poses a solution that does not fit the original question.)   Also in my case, the question was not originally mine.  I tried to use a bounty to revive the existing question rather than attempting to post a duplicate. (However, I am disappointed that the bounty resulted in very few additional views of my question, and no additional suggestions.)  No one has posted a new reply or edited an old one to answer the question.  So I would like the bounty to not be awarded.  (I know that I won't get the points back.  I don't care about that.)  I am just wondering if that edited reply, which was also accepted by the original poster, will automatically get the bounty awarded or not.

It's possible to offer and award bounties of reputation on questions.   What is a bounty? How can I find questions that have a bounty attached? How do I start a bounty? When can I start a bounty? Why is the system requiring me to choose a bounty amount that's higher than the minimum? Can I use Markdown formatting in the bounty remarks? Can I edit the remark? How long is the bounty period? How do I award a bounty? Can I award a bounty to my own answer? Can I award a bounty to an old answer? If I offer a bounty on someone else's question, can I award the bounty to their answer? After awarding the bounty, can I remove it or move it to another answer at a later time? What happens if there's no answer after the bounty period? What happens if I feel my question is still unanswered? What is automatic awarding? Are bounty awards exempt from the 200 points/day reputation limit? How does Community Wiki mode affect bounties? How does user deletion or post dissociation affect bounties? Can I award a bounty to an answer from a deleted user or one where the author was dissociated? Can I offer a second bounty after the first one has expired? Can I raise my bounty? What happens if a bounty question is closed or deleted? Why can't I vote to close or migrate a bounty question? What happens if I delete my account while I have an active bounty? Do I keep an awarded bounty when I delete my answer? What happens if a question where I awarded a bounty later gets deleted or migrated? Can I cancel my bounty? Can I affect / divide / share part of my bounty to two (or more) users? How many outstanding bounties can a single user have?      See also:  in the Help Center


The radian is defined as the ratio of the circumference and the radius. Both are measured in meters. So there should not be a unit for that. But we use 'rad' as the unit of the radian value.   The coefficient of static/kinetic friction also the same, it is a ratio of both forces. Therefore it doesn't have a unit.  So, is there a special reason to have a unit for the radian value?

So my friend asked me why angles are dimensionless, to which I replied that it's because they can be expressed as the ratio of two quantities -- lengths.   Ok so far, so good.  Then came the question: "In that sense even length is a ratio. Of length of given thing by length of 1 metre. So are lengths dimensionless?".   This confused me a bit, I didn't really have a good answer to give to that. His argument certainly seems to be valid, although I'm pretty sure I'm missing something crucial here.


I’ve obtained F1 visa to study in DC starting August 2018. Can I make a short visit (10 days) in May to see my school in DC? I already have a B1/B2 visa!

I have a PhD place at a US university starting Aug 21 but want to visit a different university for casual research for 6 weeks from July 1. This is longer than the 30 day grace period for the F1. Can I arrive on the visa waiver program or tourist visa in July and then just stay on for the PhD? I guess I might need to change status. Will this work?  Please don’t suggest exiting and reentering, that’s too expensive.  (British masters student in UK)


I am writing some code that makes connections to a host, and if the host blocks a connection, it sleeps for a predetermined amount of time, before trying again.   Basically I need Ubuntu to allow 10 ftp connections from a specific ip, then block any attempts for 10 minutes then re-allow connections from that IP address again.  How can I do that?

My new server got hacked (sigh).  I have physical access to my machine.  It seems like the only changes made was a new user account created and a broken /etc/sudoers file.  It seems as though the password was discovered by dictionary attack.    After I fix these problems (or do a full re-install?), I want to add a mechanism to ban an IP (for maybe 24 hours or some time limit) after getting the password wrong x number of times, but I'm not a unix sysadmin or anything, so I'm not really sure where to get started.  What software should I use and how can I configure it?  Thanks.


I have a collection of DVDs with audio_ts and video_ts folders that have a menu where you select chapters, etc., and I want to watch these movies on my phone. I move movies to my phone using the VLC app, so they have to be in video format. How do I do this?

I am currently backing up (ripping) my dvd collection onto my server harddrive, to allow streaming throughout my house. I am using Acidrip to do the ripping. My problem is that the quality video of the rip is not as good as I would like, and the file size is a little too big. I downloaded an .avi rip of the blu-ray movie "black hawk down" the other day, and the quality was very good. I believe it was a 720p rip. But the file size was only 700mb. When I rip regular dvd's I choose a high bitrate (around.22) but my file sizes are anywhere from 1000mb to 1200mb, and the quality is nowhere near as good. How can i use acid rip to rip a high quality video at a 700mb file size? Is there better software, or is there something I'm missing in Acidrip?


I do not believe the reference question about  relates to what I experience.  When I open a file, one click either way on the mouse wheel zooms + or - approximately as much as one click on numpad+ or numpad-. After working with the file for a while, zooming with the mouse wheel is no longer useful: one click of the wheel changes the image from microscopic to huge or the reverse. Numpad+ and numpad- continue to respond properly. It is especially bothersome when I depress the mouse wheel to inspect an element in 3D mode. It is hard to depress the scroll wheel without rotating it a little.  Just a little rotation makes the selected element almost disappear or become huge.  I'm using Blender 2.72b.

I often find that I can zoom in to a point, but then cannot zoom any more, even when there is a lot of room to zoom to the meshes on the scene.   This is particularly annoying in the following scenario:  I often land up left clicking on the scene and the 3D cursor shifts there. I use Shift+C to shift the 3D cursor back to the origin. However, this also centers the view on the cursor and shifts the view to show all objects, and sometimes this zooms things way out – at this point, if I try to zoom in, I can zoom in to a point (using the pinch/zoom on trackpad), but then it stops zooming in.   How do I zoom in after that? Is there anything else I am doing wrong in this case?


Wikipedia defines a "definable real number" as one definable by a parameter-free formula in the language of set theory.  The article says, "The set of all definable numbers is countably infinite (because the set of all logical formulas is) while the set of real numbers is uncountably infinite".  This seems fallacious, as truth is undefinable and thus the bijection between $\omega$ and the "set" of definable reals need not exist in the model (and indeed, there not even need be a set of definable reals).  Question 1: Is this claim on wikipedia as fallacious as I think it is?   Question 2: If so, is there a model of ZFC in which every real number is definable?  An obvious candidate for such a model is $L_\alpha$, where $\alpha$ is the least ordinal such that $L_\alpha \models $ ZFC. Note that by Gödel's condensation lemma, this model is countable.  Edit: I edited the wikipedia to delete the false sentences. Hopefully it stays deleted.

Reading  Wikipedia page I found this definition:     A real number $a$ is first-order definable in the language of set   theory, without parameters, if there is a formula $\phi$ in the   language of set theory, with one free variable, such that $a$ is the   unique real number such that $\phi(a)$ holds in the standard model of   set theory.   A few lines later we find the statement:     Assuming they form a set, the definable numbers form a field....   But, since they are a subset of the set of real numbers, why shouldn't they be a set?   Coming back from this question to the definition, I've another doubt: if ZFC is consistent this does not means that every set-theoretic object (and so any real number) is definable in some model?  Reading the whole article does not lessen my confusion .... and the ''talk'' is too difficult for me and it does not help.  More generally, this Wikipedia article is "disputed" ad has many "!" So I doubt that it is not reliable.  A brief surf on the web give me many pages on this subject but I've  found nothing that I can understand and give a response to the question: we can well define what is a definable real number?


I'm just curious to know how to best check if a program exists. I've seen solutions with    test command hash type which [   Which is the best method, is there a right answer? What does the POSIX and LSB specs say about this?

When looking for the path to an executable or checking what would happen if you enter a command name in a Unix shell, there's a plethora of different utilities (which, type, command, whence, where, whereis, whatis, hash, etc).  We often hear that which should be avoided. Why? What should we use instead?


\documentclass[a4paper,12pt]{article}  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[french]{babel} \usepackage{amssymb} \usepackage{amsthm} \newtheorem{montheoreme}{Théorème}[] \newtheorem{monlemme}{Lemme}[] \newtheorem{mondem}{Démonstration}[] \newtheorem{moncorol}{Corollaire}[] \newtheorem{mondefin}{Définition}[] \newtheorem{chapter}{Chapitre} \newtheorem{monremarq}{Remarque} \newtheorem{monpropos}{Proposition} \newtheorem{monexpl}{Exemple} \usepackage{graphics} \begin{document}  \begin{Large}  \textbf{Biographie :} \end{Large} \\  \includegraphics[scale=0.1]{800px-Karl_Weierstrass.jpg} \textbf{Karl Theodor Wilhelm Weierstrass :} habituellement appelé Karl Weierstrass, orthographié Weierstraß en allemand, né le 31 octobre 1815 à Ostenfelde (Westphalie), mort le 19 février 1897 à Berlin, était un mathématicien allemand, lauréat de la médaille Copley en 1895.\\ Il a étudié les mathématiques à l'université de Münster et obtint une chaire à l'Université technique de Berlin. Il fut immobile les trois dernières années de sa vie et s'éteignit à Berlin à la suite d'une pneumonie.\\ Karl Weierstrass est souvent cité comme le « père de l'analyse moderne ». Il consolida des travaux de Cauchy sur les nombres irrationnels et leur amena une nouvelle compréhension. Ses travaux les plus connus portent sur les fonctions elliptiques.

\documentclass{article} \usepackage{chemstyle}  \begin{document}     \begin{scheme}[ht]         \includegraphics[scale=0.8]{schemes/lab1}         \caption{Experiment 1 reactions and mechanism}     \end{scheme} \end{document}   When I don't use scale, this MWE works fine. However, when I use scale, I get the errors:  Runaway argument? scale=0.8]{schemes/lab1} \caption {Experiment 1 reactions and mechanism} \end {scheme}  /Users/Zak/Documents/McGill/CHEM 222/TSWLatexianTemp_001549.tex:16: Paragraph ended before \Gin@iii was complete.   and  \begin{document} ended by \end{scheme}.   What am I missing?


In javascript, the way to declare a var is: var msg = 'hello', and it is simply to call msg will get the value of 'hello' if I am now have a number of var, e.g. msg_1, msg_2 ... msg_n would there be a way to get the value by calling something like   for (var i = 0; i < n; i++) {  var var_name = 'msg_' + i;  alert (var_name)? }

I have a set of global counter variables in Javascript:  var counter_0 = 0; var counter_1 = 0; var counter_2 = 0;   etc  I then have a Javascript function that accepts an 'index' number that maps to those global counters. Inside this function, I need to read and write to those global counters using the 'index' value passed to the function.  Example of how I'd like it to work, but of course doesn't work at all:  function process(index) {     // do some processing      // if 'index' == 0, then this would be incrementing the counter_0 global variable     ++counter_+index;       if (counter_+index == 13)     {         // do other stuff     } }   I hope what I'm trying to accomplish is clear. If not I'll try to clarify. Thanks.  EDIT Clarification:  I'm not trying to increment the name of the counter, but rather the value the counter contains.


What is the Difference between the Maximum CPU time on the Salesforce servers(10 second) and maximum execution time for each apex transaction (10 minute) ?

documentation says that      Maximum execution time for each Apex transaction is 10 minutes for   both Synchronous and Asynchronous   To understand this I executed the below code in anonymous apex window :  Long startTime = System.now().getTime(); Long maxLimit = 9*60*1000; //I am taking max limit as 9 mins. while(System.now().getTime() - startTime <= maxLimit ){   }   I get this error :    What is one use case where we don't run into CPU time limit(or other limits) but reach execution time limit?


I tried the all powerful google to answer this question - but I am not getting the answer I seek. I know we turn darker because the skin produces melanin. The question remains - why darker?   I am a physicist and it would make sense to me that the bodies response would want us to turn whiter- since a higher albedo would reflect more UV radiation. It seems that evolution took the way of absorbing more and more UV radiation by this melanin and then converting it to heat. Which begs the question as well - do black people get hotter than white people given the temperature is constant? Although this a side point to my original question.  What sparked this question was the use of thousand of black balls being dumped into LA's water reservoir in the hopes to reduce evaporation. Again... BLACK balls. This makes no sense to me - why the heck not use white balls to reflect more sunlight?

I have always thought darker colors absorb more heat from the sun, so if you are wearing a white T-shirt you will be cooler under sun than wearing a darker T-shirt, or a black piece of steel will be hotter under the sun than a shiny silvery one.  If this is true, then why is the same not applicable to skin color? It seems to me like the more sun in an area the darker the people's skin has become, isn't that the case?


Every time I enter on Ubuntu, this happens:    Then when I put my mouse in the corner it would give me a black image  I have my unity enabled but it doesn't give me a little box next to it to enable it(but I think I have it enabled because when I click on it in the left it says to enable it and I have it enabled)    Can someone help me with this?

I upgraded from 11.10 to 12.04 and now my launcher is missing. I opened terminal using CTRL+ALT+T and the menu shows but the GUI (bar) window decorations above that is missing.  Things like CTRL+TAB and image previewer don't work. I've tried whats mentioned  but no luck.  Another Screenshot of my GUI looks :


I'm starting to learn how to shoot. Up until now I've only used point-and-shoot cameras mostly on automatic settings. My view is there are basically three classes of cameras sold by the major manufacturers:   Point-and-shoot: for those who want nothing to do with photography Advanced: (Canon's G series, or Panasonic's LX) - some settings, but not complete flexibility SLR: The "real deal"   My question is, if I want to learn how to shoot good photographs, can I start with a camera from the 2nd category, instead of an SLR? There are still options for manually setting the ISO, aperture and shutter speed on those models, I just don't understand how lacking they are and if they would hinder my learning.

I am thinking of buying a camera to learn photography. Most of the time I'll be shooting portraits and landscapes. But I am not sure where I should start. Most of my friends tell me that I should get an entry level DSLR, but I am not sure if I have the persistence and enthusiasm to carry it all day in a backpack. But the camera on my cellphone doesn't seem to be enough to begin with.  So what I want is some expert advice (preferably with professional experience). Can most compact fixed-lens or mirrorless cameras fit the situations I mentioned? Or do I really need to go to a DSLR to get a tool to learn photography?


Sir i want to remove win 10 and install ubuntu 16.04.1 but when i m installing it is showing "force UEFI installation?...this machine's firmware has started the installer in UEFI mode but it looks like there may exist operating systems already installed using "BIOS compatibility mode"...If you wish to install in UEFI mode and don't care about keeping the ability to boot one of the existing systems, you have the option to force that here......".  SIR TELL ANY PROCEDURE TO ITSTALL UBUNTU BUT I CAN INSTALL WINDOWS IN FUTURE AS WELL (SAFE METHOD) ?

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


After noticing a burning smell in the kitchen and then smoke from the back of our GE Range, my wife and I discovered that the terminal block was incredibly hot and melting on one side. We unplugged, no fuses blew. The wires from the terminal block are not discolored but there is discoloration from heat around the oven element connections, the insulation around the leads is slightly charred. Can I safely replace the block and expect normal operation or is the discoloration around the element leads indication of a greater problem?

Turned on our 2 year old stove (Whirlpool Gold) and heard fizzing noises, then smelled electrical burning. Went downstairs and shut off the breaker (40 amp). That was the only way to get it to stop "fizzing". (6 gauge wire by the way). The range is 240 volt electric 3 wire hooked up to a 40 amp breaker (6 gauge wire). When I took the back panel off the stove I saw exactly where the problem occurred. The black wire was burned, the terminal block was melted, and the inside of the back metal panel that I removed was pitch black in the spot that was facing that area before removal. I removed the stove top and inspected all wires and other electronic components. No problems at all.   So my questions are:    Why did the black wire only, at the terminator block, start burning?  Why did the breaker not pop off?  Is it safe to just replace the terminator block or is this an indicator of a much larger problem?  Is 6 gauge the correct gauge for a 40 amp breaker?


Let's say I have a wave, with frequency $\omega$ and phase $\phi$, of the form:  $$y(t)=1+A\sin(\omega t+\phi)$$  where $A<1$.   I have $N$ measures of $(\hat{y}_i, \hat{t}_i)$, that are assumed to be evenly spaced over one period. For practical purposes, $\hat{t}_i=t_i$ is assumed to be accurate, while $\hat{y}_i$ is measured with a normally distributed error : $\hat{y}_i= y_i + \epsilon_i$, with $\epsilon_i \sim \mathcal{N}(0, \sigma_y)$.  How well can I measure the phase of this sine wave? Edit: I'm trying to derive an analytic answer, to predict the results of future measurements. What I presume is the previous version of this question was asking how to fit to observed data, which is a different problem. Also, I figured out the answer and placed it in the comments, for anyone else who needs this.  I've tried constructing a Fisher matrix for the problem, but Mathematica thinks it's singular, and I can't see how to invert it either.

I want to assume that the sea surface temperature of the Baltic Sea is the same year after year, and then describe that with a function / linear model. The idea I had was to just input year as a decimal number (or num_months/12) and get out what the temperature should be about that time. Throwing it into lm() function in R, it doesn't recognize sinusoidal data so it just produces a straight line. So I put the sin() function within a I() bracket and tried a few values to manually fit the function, and that gets close to what I want. But the sea is warming up faster in the summer and then cooling off slower in the fall... So the model is wrong the first year, then gets more correct after a couple of years, and then in the future I guess it becomes more and more wrong again.   How can I get R to estimate the model for me, so I don't have to guess numbers myself? The key here is that I want it to produce the same values year after year, not just be correct for one year. If I knew more about math, maybe I could guesstimate it as something like a Poisson or Gaussian instead of sin(), but I don't know how to do that either. Any help to get closer to a good answer would be greatly appreciated.  Here is the data I use, and the code to show results so far:  # SST from Bradtke et al 2010 ToY <- c(1/12,2/12,3/12,4/12,5/12,6/12,7/12,8/12,9/12,10/12,11/12,12/12,13/12,14/12,15/12,16/12,17/12,18/12,19/12,20/12,21/12,22/12,23/12,24/12,25/12,26/12,27/12,28/12,29/12,30/12,31/12,32/12,33/12,34/12,35/12,36/12,37/12,38/12,39/12,40/12,41/12,42/12,43/12,44/12,45/12,46/12,47/12,48/12) Degrees <- c(3,2,2.2,4,7.6,13,16,16.1,14,10.1,7,4.5,3,2,2.2,4,7.6,13,16,16.1,14,10.1,7,4.5,3,2,2.2,4,7.6,13,16,16.1,14,10.1,7,4.5,3,2,2.2,4,7.6,13,16,16.1,14,10.1,7,4.5) SST <- data.frame(ToY, Degrees) SSTlm <- lm(SST$Degrees ~ I(sin(pi*2.07*SST$ToY))) summary(SSTlm) plot(SST,xlim=c(0,4),ylim=c(0,17)) par(new=T) plot(data.frame(ToY=SST$ToY,Degrees=8.4418-6.9431*sin(2.07*pi*SST$ToY)),type="l",xlim=c(0,4),ylim=c(0,17))


I've got 2 hardware faults located inside Control Panel\System and Security\Security and Maintenance\Problem Reports, and I'm hoping someone here could help shine some light on what's possibly causing them. They are old logs, dating back in the summer (3-4 months ago)  I've hooked an audio system to my laptop that always stays plugged in via USB. (2.0 in a 3.1 type-C connector).  Here are the two dumps in question:  Description A problem with your hardware caused Windows to stop working correctly.  Problem signature Problem Event Name: LiveKernelEvent Code:   1000015e Parameter 1:    25 Parameter 2:    23 Parameter 3:    ffffbf8b0fa24b38 Parameter 4:    e040101 OS version: 10_0_17763 Service Pack:   0_0 Product:    256_1 OS Version: 10.0.17763.2.0.0.256.48 Locale ID:  1033   And the second one:   Description A problem with your hardware caused Windows to stop working correctly.  Problem signature Problem Event Name: LiveKernelEvent Code:   144 Parameter 1:    3003 Parameter 2:    ffff8102100825c0 Parameter 3:    40010002 Parameter 4:    0 OS version: 10_0_17763 Service Pack:   0_0 Product:    256_1 OS Version: 10.0.17763.2.0.0.256.48 Locale ID:  1033   Any help would be greatly appreciated.  PS: I'm not sure what tags I need to use here. If someone could help out. Thank you too!  Operating System: Windows 10 Pro 64-bit (10.0, Build 17763) (17763.rs5_release.180914-1434) taken from dxdiag tool.

Repeated error  I have been repeatedly encountering the following error when my laptop freezes. It may occur multiple times during the day, and should take several minutes to recover.  Source Windows  Summary Hardware error  Date 11/1/2018 10:11 AM  Status Not reported  Description A problem with your hardware caused Windows to stop working correctly.  Problem signature Problem Event Name: LiveKernelEvent Code:   144 Parameter 1:    3003 Parameter 2:    ffffad8c0b1a75c8 Parameter 3:    40010002 Parameter 4:    0 OS version: 10_0_17134 Service Pack:   0_0 Product:    256_1 OS Version: 10.0.17134.2.0.0.256.48 Locale ID:  1033   More details  Per my best reflection, the hardware error occurs when I am using the laptop on its docking station. Here is what I observe:   While using the laptop as normal, the "freeze" will occur and I can hardly operate the laptop: mouse cursor won't move continuously and Alt+Tab won't be able to switch across two windows. Shortly after (usually several minutes), things will go back to normal. Upon inspecting through the Performance tab in Task Manager, there had been no spike in anything, be it CPU, Memory or Disk. When I open the View reliability history tool, I will find another entry of Windows Hardware Error   Machine specification:   Thinkpad T480, i7-8650U (newly replaced module thanks to the manufacture)   With the same pair of docking stations, an older unit of T480 has had exactly the same problem.  Docking station: . Same issue has occurred on two identical docks with  slightly different monitors and accessories. OS specification: OS build 17134.376. Most recent collection of "reliability report":    Possible solutions   First, I would like to learn what exactly went wrong, hardware-wise: the manufacturer's support team did not bother too much with the precise error messages, and have ordered me to reinstall the Windows OS up to 5 times in total. [This is what they called "debugging".]   Please advise if you can decipher the recurrent "Hardware error".   Secondly, I will try to push the manufacturer to replace the docking stations, and see if the same "freezing problem' persists.


The world is or rather the expression is quote,unquote. The sentence that Mulhouse said was "Get a load of that quote-unquote Santa." It was an episode where Homer get the job of Santa for Christmas. And Bart and their friends glimpse The Santa (who is Homer in reality) but Bart didn't knew it and he was going to humiliated his dad...

In spoken English, people often say "quote-unquote" (or "quote-endquote") to indicate that part of what they are saying is a quotation (scare or otherwise). Sometimes the quoted material will go between quote and unquote, and occasionaly it will precede the quote-unquote. Often, though, "quote unquote" introduces the quoted material.  Why does quote unquote precede the quotation?  It would seem that quote opens the quoted text and that unquote closes it, but then why would we close the quotation before actually providing it. It would be the equivalent of writing your quotation marks together, "", rather than around the quoted text.  What are the origins of this construction?  Three years ago ChrisR asked  on whether it is correct to use quote, unquote. The answers did not deal with origins, but one commenter suggested that quote-unquote is a corruption of quote-on-quote, but he provided no evidence, nor any real explanation.


In Python it appears that imports are truly lexically scoped.  Is this true?  For example if you do this:  def some_function:     import sys  print sys.argv[0]   You will get an error:  Traceback (most recent call last):   File "example.py", line 4, in <module>     print sys.argv[0] NameError: name 'sys' is not defined        In Perl, use statements are not lexically scoped, but Perl does not give you a syntax error if you attempt to define them lexically (i.e. within a subroutine).  Doing this causes confusion and is considered very bad practice.     In Python this doesn't appear to be how things work.  I believe I've read somewhere that it is considered good practice to always put your import statements at the top of your code, but if they are truly lexically scoped as the example seems to show (meaning they can't be accessed outside of the scope in which they are defined), I don't see why it would be considered bad practice to just put them where you use them.  Is there any reason lexically scoping imports would be bad practice in Python? If so, please explain why?

states:  Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and constants.  However if the class/method/function that I am importing is only used in rare cases, surely it is more efficient to do the import when it is needed? Isn't this: class SomeClass(object):      def not_often_called(self)         from datetime import datetime         self.datetime = datetime.now()  more efficient than this? from datetime import datetime  class SomeClass(object):      def not_often_called(self)         self.datetime = datetime.now()


What do two up/downvote numbers mean?  Edit: Thank you very much R. Martinho Fernandes for your gracious and simple answer.  I don't know whether other answerer's number of 1000 is correct. I've only just reached 2000 three days ago.  I don't know what "Established users are those who have been participating on the site for a fair amount of time"# really means. But I guess it includes me. Edit: Looking at R's reference , it seems to need 8000, which definitely ***ex***cludes me.)  But why does this simple newbie question from me get -8 votes, while the leading answerer gets +15?   (Maybe I should stay out of the kitchen?) (Or perhaps I`m putting up my hand and asking Teach! Teach!?) (Or should I RTFM?)

Sometimes I felt just total vote count do not represent the whole scenario(liking/disliking) of the community. In case of mine, my  got upvoted 5 times and downvoted 4 times. But the total vote, 1 does not represent so many difference of opinions in the community. So, can the upvote and downvote counts be shown separately? The sorting still will be on the total votes. But the numbers will show more information.


I have a question to ask regarding this quote.  In the formation of a marketing strategy, it is imperative that one considers the marketing mix, also known as the 4Ps – product, price, place, and promotion.  Should there be an 's' after consider? Am I correct in saying that in a sentence like the one below, an 's' should follow the word consider?  It is imperative that the girl considers the marketing mix.  I seem to have seen similar sentences constructed both with and without the 's' after the verb before, e.g.  It is imperative that the girl go to school. It is imperative that the girl goes to school.  Does this have anything to do with plurals and singulars, or with tenses? Wow, this seems to be an awfully basic question but for some reason I just don't quite remember what should be done here. (NOTE: The OP's question involves the mandative construction, one which might involve a subordinate subjunctive clause. -- F.E.)

For instance, take the following sentence (from a real email exchange):  it is entirely possible that one WebEx is not enough   Is it correct? Should it be  it is entirely possible that one WebEx be not enough   ?  My reasoning is as follows:  (1) it is necessary that you be here --> (2) it is necessary that one WebEx be here -->  (3) it is necessary that one WebEx be enough -->  (4) it is necessary that one WebEx be not enough -->  (5) it is entirely possible that one WebEx be not enough -->    Is it true that the grammatical context is preserved throughout the entire transformation, starting with a sentence known to require the subjunctive (1) and ending with my example (5) ?  I have performed a few simple Google searches and the results are quite confusing:   "it is necessary that he be" yields 170,000 results "it is necessary that he is" yields 342,000 results "it is possible that he be" yields 985,000 results "it is possible that he is" yields 4,040,000 results   Of course, no conclusions can be drawn from these results ...


I recently upgraded to Ubuntu 20.04. I tried about 4 different commands to install Tor browser and the first 3 failed. Finally I found step-by-step instructions from HowToGeek.com and they worked perfectly. The problem seems to be that one of my botched installation attempts messed up my list file. The error message I get when I try to install, reinstall or remove ANYTHING, including ubuntu-software (which does not launch at all), is: E: Malformed entry 2 in list file /etc/apt/sources.list.d/tor-project.list (Component) E: The list of sources could not be read.  I read many of these Q&A's and managed to find the actual line that is corrupted. The two lines read: deb [arch=amd64] https://deb.torproject.org/torproject.org focal main deb [arch=amd64] https://deb.torproject.org/torproject.org  main  How do I know what to change line 2 to? I thought maybe the issue was just an extra space between .org and main that I can see in the code but doesn't show up in the HTML above, but I changed it and still could not apt update. Is it possible to just delete both lines since Tor itself is working perfectly already?

I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.


everyone...i have  a problem in my dropdown list. He is working fine but when gets the data from Database, some special characters are not recognized. You can see in the pictures:      <?php include ("conexao.php"); $db = new mysqli('localhost', 'root', '', 'ocorr1'); if (!$db) {   exit('Connect Error (' . mysqli_connect_errno() . ') '        . mysqli_connect_error()); }  ?>
Select Name:
 <select name="nome_turma"> <option value = "">---Select---</option> <?php $queryusers = "SELECT `nome_turma` FROM `turma` "; $db = mysqli_query($db, $queryusers); while ( $d=mysqli_fetch_assoc($db)) { echo "<option value='{".$d['nome_turma']."}'>".$d['nome_turma']."</option>"; } ?> </select>

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I know it has been asked before but I never receive notifications, even after weeks. I suppose setting it in my account settngs should be enough, isn't it?        EDIT  I don't think it's a duplicate because in my case I don't click on inbox for weeks, or even access stackexchange for such periods, nevertheless I don't get notified of messages (that I only see when I get back to stackexchange)

Until about a week ago I was getting daily email from stackexchange.com (for every day on which I had any activity) notifying me of comments, answers to my questions, and chat pings across the network.  I haven't received any of these notices for since June 9, though I continue to see the corresponding activity on profile pages and in the global notifications area in the top left corner of every page.  These messages haven't started going to my spam trap; it appears that they aren't arriving.  Why might that be?


In an ordered field we have $x^2 \ge 0$, hence the equation $-1 = x^2 + y^2$ has no solution. But what about finite fields in general? What is the solutions set $$  -1 = x^2 + y^2 $$ of this equation?

Let $\mathbb{F}$ be a finite field.  Let $a_1,\dots,a_n \in \mathbb{F}$ be given.  I want to know whether there exists $x_1,\dots,x_n \in \mathbb{F}$ such that  $$a_1 x_1^2 + a_2 x_2^2 + \dots + a_n x_n^2 = 1.$$  My question: Can we characterize when this equation has a solution, i.e., by some criterion on $a_1,\dots,a_n$?  Is there a clean characterization, in terms of $a_1,\dots,a_n$ and the properties of $\mathbb{F}$?    Here's what I can see immediately.  First, if $n=1$, there is an easy answer (the equation has a solution iff $a_1$ is a square in $\mathbb{F}$).  Second, if any $a_i$ is a square in $\mathbb{F}$, the equation has a solution (set all other $x_j$'s to $0$), so we can assume that all the $a_i$'s are non-squares and that $n \ge 2$.  Third, if $-1$ is a square in $\mathbb{F}$, then the equation has a solution: we can take $x_2 =  \sqrt{-a_1/a_2} \cdot x_1$.  But what about the case where $-1$ is a non-square in $\mathbb{F}$?  Is it always guaranteed to have a solution in this case?


Suppose I have a bounded open set $\Omega$ in $\mathbb{R}^n$; suppose that I have a map $f:\bar{\Omega}\to \mathbb{R}^m$ which is of smoothness class $C^1$ on $\Omega$ and the derivative $D(f|_{\Omega}):\Omega\to \mathcal{L}(\mathbb{R}^n,\mathbb{R}^m)$ can be extended to a continuous map on $\bar{\Omega}$. Is it true that $f$ is then of class $C^1$ on $\bar{\Omega}$? (Meaning that there is an extension of $f$ to a $C^1$ function defined on an open subset of $\mathbb{R}^n$ containing $\bar{\Omega}$.) I have proven the converse holds, but cannot prove this direction. I would like to avoid using the Whitney Extension Theorem, as I believe this is overkill; my "intuition" tells me that there should be some kind of partition of unity argument. The reason I would like the above to be true is so that I can finish proving $$ C^k(\bar{\Omega};\mathbb{R}^m) = \{ f\in C^k(\Omega;\mathbb{R}^m) : f\text{ can be extended to a }C^1 \text{ map defined on an open set containing }\bar{\Omega}\} $$ is a Banach space with the $C^k$ norm. Edit: This question is answered .

If $U$ is a bounded domain in $\mathbb R^n$ whose boundary is smooth, and $f$ is a smooth function on $U$ whose partial derivatives of all orders have a continuous extensions to $\bar U$. For an arbitrary domain $V \supseteq \bar U$, is there a smooth function $\tilde f$ on $V$ extending $f$?


I hold both a British and Russian dual citizenship, holding two passports. I am soon going on a flight to Russia and am not sure what passport to enter in the Advanced Passenger Information section.  What passport do I enter?

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


If you use a  or a  for a wish (not emulating a spell) do you "suffer stress" - specifically the 33% chance of never casting wish again?

One of my characters recently received the luck blade magic item with 2 wishes in it. The description of the luck blade (DMG, p. 179) states:     Wish. The sword has 1d4–1 charges. While holding it, you can use an action to expend 1 charge and cast the wish spell from it. This property can't be used again until the next dawn. The sword loses this property if it has no charges.   The spell is cast from the item.  Would my character suffer the negative effects of wishing for anything besides duplicating another spell, since it states the spell is cast from the luck blade?


I've seen several times on this site people writing integrals like  $ \int \! dxf(x) $. This seems confusing to me, especially in an iterated integral or next to a long integrand and it's nonstandard compared to my own personal experience. I'm wondering what are the reasons people use this notation swap and if it has broader support than I'm aware of.

From reading answers here, I've noticed that some people write integrals as $\int dx \; f(x)$, while other people write them as $\int f(x)\;dx$.  I realize that there is no mathematical difference between the two notation forms, but was wondering why some people choose the first method over the second.  Is there some place in higher maths that it becomes beneficial to write the differential first?  (I, personally, have always used the second method, just because I was taught that way...)


I'm composting a blender scene into live footage. I have objects interacting with my "ground." what I want to do is set up the ground to render out transparent so that we can't see it in the composite video, but the objects interacting with the ground still need shadows. How can I set this up?

I need to render a model on a transparent background. The models have a light source so they should be casting a shadow on a surface (the XY plane). The purpose for this is to overlay the rendered images (out of blender) on an image of the actual surface, so I want to generate the render including a semi-transparent shadow.  I don´t have any problem rendering the models on transparent background, but I can not make a shadow appear. I tried adding a surface below the model so the shadow can fall on it, but now there's the problem of keeping the surface from rendering.  How can I render the shadow on a transparent background?


In the middle of a shell script, I need to create a file with some specific content. How do I do it? Can it be done using cat?

I'm just trying to review basic terminal commands. Having said that, how do I create a text file using the terminal only?


How do I locate command blocks? I was messing around with some commands and died, and lost the location where I was testing out a lot of stuff.  I do not have access to MCEdit or anything like that.  I accidentally took a screenshot, but didn't have co-ords up, if that helps.

I've placed a command block making it day all the time. I want to turn it off, but I've lost it. What's the quickest way to find it?


Is it true that the free group $F_k$ on $k<\infty$ generators requires at least $k$ elements to generate. I.e. does every set which generates $F_k$ have cardinality at least $k$?

This question is an extension of .  Let $F_X$ denote the free group on the set $X$. For any group $G$ and subset $S\!\subseteq\!G$, $\langle S\rangle$ denotes the subgroup generated by $S$ and $\mathrm{rank}(G) :=\min\{|S|;\:S\!\subseteq\!G, \langle S\rangle\!=\!G\}$.  PROPOSITION: a) $F_X\cong F_Y\:\Leftrightarrow\:|X|=|Y|$ b) $\mathrm{rank}(F_X)=|X|$  Thus for every cardinal number $c$, there is (up to isomorphism) exactly one free group of rank $c$.  Proof:    a) $(\Leftarrow)$: If $f\!:X\rightarrow Y$ is the bijection, then $\varphi(x_1\ldots x_k):=f(x_1)\ldots f(x_k)$ is the isomorphism.  $(\Rightarrow)$: $F_X\!\cong\!F_Y$ $\Rightarrow$ $\mathrm{Ab} F_X\!\cong\!\mathrm{Ab} F_Y$ $\Rightarrow$ $\oplus_{x\in X}\mathbb{Z}\!\cong\!\oplus_{y\in Y}\mathbb{Z}$, so $|X|\!=\!|Y|$, since rank is known to be an invariant of free modules.   Alternatively, $\big(\oplus_{x\in X}\mathbb{Z}\big)\otimes_\mathbb{Z}\mathbb{Q}$ $\cong$ $\oplus_{x\in X}\big(\mathbb{Z}\otimes_\mathbb{Z}\mathbb{Q}\big)$ $\cong$ $\oplus_{x\in X}\mathbb{Q}$, so $\oplus_{x\in X}\mathbb{Q}$ $\cong$ $\oplus_{y\in Y}\mathbb{Q}$, even as $\mathbb{Q}$-modules, but isomorphic vector spaces are known to have equipollent bases.  b) Since $\langle X\rangle\!=\!F_X$, $\mathrm{rank}(F_X)\leq|X|$. Suppose we have $Y\!\subseteq\!F_X$, $\langle Y\rangle\!=\!F_X$, $|Y|\!<\!|X|$.  QUESTION: how can I finish the proof of b), i.e. prove that $F_X$ can't be generated by a subset with smaller cardinality than $|X|$?


I have some complicated object, such as a Cat, which has many properties, such as age, favorite cat food, and so forth.    A bunch of Cats are stored in a Java Collection, and I need to find all the Cats that are aged 3, or those whose favorite cat food is Whiskas.  Surely, I can write a custom method that finds those Cats with a specific property, but this gets cumbersome with many properties; is there some generic way of doing this?

I want to filter a java.util.Collection based on a predicate.


I don't know how to even begin this problem, let alone do anything else with it. I would appreciate any help

Suppose that $E$ is an extension of $F$ of prime degree. Show that $~~\forall~ a \in E : ~ F(a)=F$ or $F(a)=E$   Attempt: Suppose that $E$ is an extension of a field $F$ of prime degree, $p$. Therefore $p = [E :F] = [E : F(a)][F(a) : F]$. Since $p$ is a prime number, we see that either $[E : F(a)] = 1$ or $[F(a) : F] = 1$.   Now, $[E : F(a)] = 1 \implies $ there is only one element $x \in E$ which forms a basis and every element in $E$ is generated by $x$ i.e. $E = \{x~c~|~ c \in F(a)\}$  $[F(a) : F] = 1 \implies $ there is only one element $y \in F(a)$ which forms a basis and every element in $F(a)$ is generated by $y$ i.e. $F(a) = \{y~d~|~ d \in F\}$  Have I inferred it correctly? How do I move ahead?  Thank you for your help.


Was just wondering why my method (outcome) is off. It just outputs all of the syso() regardless of what is played. This is an incomplete program by the way, was just testing it before continuing. I was also concerned of any more efficient way to proceed writing the code. Im fairly new to coding so not looking for something too complicated. But mainly just trying to figure out why this outcome method is not working.  package main; import java.util.Random; import java.util.Scanner;  //Description: Create a program that plays rock, paper, scissors with the  user then states who the winner is in the output  public class RPS {  //Declaring variables char playerMove, R, P, S; int pcMoveNum; String name, pcMove = ""; Scanner scan = new Scanner(System.in); Random random = new Random();  public void input() {     System.out.println("Hello, whats your name?");     name = scan.nextLine();     System.out.println("Okay "+name+" lets play rock, paper scissors!");     System.out.println("(R = rock, P = paper and S = scissors.)");     System.out.println("Type R, P, or S to make your move");     playerMove = scan.nextLine().charAt(0); }   public void computerMove() {     pcMoveNum = random.nextInt(3)+1;      if (pcMoveNum == 1);     {         pcMove = "R";     }     if (pcMoveNum == 2);     {         pcMove = "P";     }      if (pcMoveNum == 3);     {         pcMove = "S";     } }  public void outcome() {     if(playerMove == R); //Player chooses rock     {         if(pcMove == "R"); //If PC also chooses rock - use this output          {             System.out.println("Its a Tie :I The computer choose rock and you choose rock.");             if(pcMove == "P");             {                 System.out.println("You Lose! :( The computer choose paper and you choose rock.");                 if(pcMove == "S");                 {                     System.out.println("You Won :) The computer choose scissors and you choose rock.");                 }             }         }        } }   public static void main(String[] args) {     RPS phill = new RPS();     phill.input();     phill.computerMove();     phill.outcome(); }   }

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


I want to run a program, for example gedit from terminal.  How can I run gedit through terminal by just typing ge on terminal?

I would like to create an alias to rm command in order to have a confirmation message after executing this command. So I am creating an alias like this alias rm='rm -i'. But as far as I know this is a temporary alias and it lives until you close the terminal.  As it is explained  to save alias permanently I need to execute ~/.bash_aliases or ~/.bashrc commands in terminal and add my alias there. But when I execute ~/.bashrc I get following error message :  bash: /home/bakhtiyor/.bashrc: Permission denied   When I run ~/.bash_aliases I get another error message like this:  bash: /home/bakhtiyor/.bash_aliases: File or directory doesn't exist.   What is the actual problem and how can I solve it?


In Photoshop CC 2017 we have the option File -> Automate -> Crop and Straighten Photos. I have scanned multiple photos, so that in an image there are 3 photos. I need to use this feature of photoshop, and automate it on all the scanned images as there are many of them.  I know there is the option to record a script by I didn't succeed to automate it.  The actions should be like follows:   Open each image in the folder Apply Crop and Straighten Photos Save all cropped images in another folder as PNG with the option to have best quality   Could you help me create it ?

So I received approximately 70 or so images from a customer and apparently they were all scanned. They are 4x6 prints but each one has a white background the size of a paper. How can I get rid of them en mass?


I have onSubmit function in react, added some if/else statements to validate my inputs, everything is working fine, but not for email. It keeps saying that i entered wrong email adress.  Also, can you look at my code to check if i can write it shorter?    onSubmit = (e) => {  const { firstName, lastName, email, eventDate, validation, errorMessage} = this.state if (firstName, lastName, eventDate, email) {   this.setState({validation: true}) } else {   this.setState({validation: false});   this.setState({errorMessage: 'Please fill in all fields'})   console.log(errorMessage); }  if (/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/.test(email)) {   this.setState({validation: true}) } else {   this.setState({validation: false});   this.setState({errorMessage: 'Please enter correct email adress'})   console.log(errorMessage); }  if (validation) {   const newEvent = {     firstName: this.state.firstName,     lastName: this.state.lastName,     email: this.state.email,     eventDate: this.state.eventDate   }    this.props.addEvent(newEvent);    this.setState({     firstName: '',     lastName: '',     email: '',     eventDate: ''   }); }  e.preventDefault(); }

Is there a regular expression to validate an email address in JavaScript?


long long temp_number; float input = 0.7f; temp_number = input*100; printf("%lld",temp_number);   Could anybody explain why do i get 69 instead of 70?

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


If $p, q, r, s$ are integers such that $ps - qr = \pm 1$, and $a, b, a', b'$ are integers such that $$ a' = pa + qb $$ $$ b' = ra + sb $$ Prove that $\text{gcd}(a', b') = \text{gcd}(a, b)$.  I understand that posting questions without showing your work is a bad thing, however, I don't know how to even start this proof, as I don't see the connection between the given conditions and what I have to prove. Any help is appreciated. Thanks.

I'm having problems with an exercise from Apostol's Introduction to Analytic Number Theory.     Given $x$ and $y$, let $m=ax+by$, $n=cx+dy$, where $ad-bc= \pm 1$. Prove that $(m,n)=(x,y)$.   I've tried to give a proof, but I suspect it's wrong (or at least not very good). I would be very thankful for any hints/help/advice!  My proof:     We observe that since $ad-bc= \pm 1$, $ad=bc \pm 1$, and $(ad,bc)=1$.   Now, $(a,b) \mid m$ and $(c,d) \mid n$ but      $$(a,b) = ((d,1)a,(c,1)b)=(ad,a,bc,b)=(ad,bc,a,b)=((ad,bc),a,b)=(1,a,b)=1.$$      Similarly, we determine $(c,d)=1$. So, $1=(a,b) \mid m$ and $1=(c,d) > \mid n$. But $(x,y)$ also divide $m$ and $n$. Since $(x,y) \geq (a,b)=(c,d)=1$, this implies that $(x,y)=m,n$. Hence   $(m,n)=((x,y),(x,y))=(x,y)$.


What is the least expensive way for an American tourist in Israel to get cash?  The options seem to be:  Debit card - but there are withdrawal fees, often 5% or more.  Credit card - but interest starts immediately when taking out cash, yet one month fee may be less than the debit card fee  Carry cash - but there is a conversion fee when changing into local currency.  What are the best options to minimize fees?

Recently my wife and I traveled to Italy and before we left we got about 85% of our money in travelers checks and the other 15% we carried on in cash. When we arrived there, no one would take our travelers checks and many places did not accept credit cards. Eventually, we found some currency exchange places that would take the travelers checks and give us Euro's, but at a 7-15% fee, which was not really a very fun surprise.   While I was under the impression that it is safer to use travelers checks, it seems that they were not really accepted (the usual explanation being fraud). So the question is, is it best to just exchange your currency at home and carry all of it with you when you travel or are there other alternatives to carrying cash that are safer and cost effective?


Given is $\max\left\{c^T \cdot x | Ax \leq b, x \geq 0\right\}$ which is a linear programming problem and its solution set $M$. Prove that you can find out in finite steps if $M$ is unbounded.    It will surely work using the Simplex algorithm but I'm not sure how to prove this correctly?  I think the same proof to this is: Prove that the Simplex algorithm will stop (in finite steps). It will stop in finite steps because there are finite number of feasible bases. In addition, every feasible basis determines a basic feasible solution with an objective value. To make sure that a feasible basis is never used more than once, one can strictly increase the objective value in every step. For this reason, the Simplex algorithm will come to an end in finite steps.  But I'm not sure if this is fine like that or if it's really a proof at all? :S

Let $(P) \max\left\{c^T \cdot x \mid A \cdot x \leq b, x \geq 0\right\}$ be an arbitrary linear programming problem and $M$ its   solution set. Is it possible to find out if $M$ is unbounded (in   finite steps)?   I think the answer is yes because we have linear program here and that's why it's possible to tell in polynomial time if it has feasible solution or infeasible. So there must be an algorithm to do this in polynomial time e.g. in finite steps.  But I don't know any algorithm to do this. So far I've read about the simplex method in a book and if I understood correctly, if you run simplex method on the LP above, you will see in the table that the problem is unbounded because there will appear one or more variables where you can pivot these to $\infty$.  But this is only thought is it correct like that? Maybe it's possible with another way too?


To prove : $\sin (x)\;\sin (2x)\;\sin (3x) \lt 9/16$  With some transformations i was able to prove the above result using calculus but I am not getting the way to solve it without the use of calculus  I've tried grouping $\sin(x)\;\sin(3x)$ and then using product to sum transformations.  Also I've tried to find the maximum value of sinxsin3x and then using the fact that sin2x is a fraction. Although I was able to prove that sinxsin3x is less than 9/16 but the minimum value was less than -9/16 and since sin2x can be negative so i could not draw any conclusion.

Prove that   $$ \sin (x) \cdot \sin (2x) \cdot \sin(3x) < \dfrac{9}{16} \quad \forall \ x \in \mathbb{R}$$      I thought about using derivatives, but it would be too lengthy.  Any help will be appreciated. Thanks.


What are the immediate advantages of the Lagrangian formulation compared to the Newtonian formulation to give high school students a little connection to what they'll find in universities? I can't use derivatives, integrals, ODE, ecc... but very few elementary concepts. Are there advantages to solving dynamic or kinematic exercises? What could they be? Often in classical electrodynamics special lagrangian are used to obtain an expected result.

Here, I'm going to pose a very serious list of doubts I have on Lagrangian Mechanics.   Can we learn Lagrangian Mechanics without studying Newtonian Mechanics? Does Lagrangian help in solving problems easily, which generally seem to be complicated with Newtonian laws? Does Lagrangian make problem solving faster?


I cann't get datasource connection from spring.xml.And tried testing with @Repository ,@Service but it didn't work.How do I fix this problem? Please Let me know how to solve this problem. Thanks  spring.xml  <beans xmlns="http://www.springframework.org/schema/beans"     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xmlns:context="http://www.springframework.org/schema/context"     xsi:schemaLocation="         http://www.springframework.org/schema/beans         http://www.springframework.org/schema/beans/spring-beans.xsd         http://www.springframework.org/schema/context         http://www.springframework.org/schema/context/spring-context.xsd">    <context:annotation-config/>     <context:component-scan base-package="org.minthurein.javabrains" />     <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" >      <property name="driverClassName" value="org.postgresql.Driver"></property>      <property name="url" value="jdbc:postgresql://localhost:5432/db"></property>         <property name="username" value="postgres" ></property>      <property name="password" value="123" ></property>    </bean>  </beans>   jdbcDaoImpl.java      import java.sql.Connection;     import java.sql.ResultSet;     import java.sql.SQLException;     import java.sql.Statement;     import javax.sql.DataSource;     import org.minthurein.javabrains.model.Circle;  import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component;     @Component     public class jdbcDaoImpl {         @Autowired         private DataSource dataSource;           public Circle getCricle(int circleId){         Connection conn=null;         Statement stmet=null;     //  System.out.println("ID"+circleId);          try{           conn = dataSource.getConnection();           System.out.println(conn+">>>>>>>");           conn.setAutoCommit(false);           stmet = conn.createStatement();           String sql="SELECT * FROM circle WHERE ID="+circleId;           Circle circle=null;              ResultSet rs=stmet.executeQuery(sql);           if(rs.next())           {              //  System.out.println(rs.getString("name"));              circle=new Circle(circleId,rs.getString("name"));           }       rs.close();       stmet.close();       conn.commit();       return circle;     }   Error Console

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


I'm trying to write a regular expression that will match each individual class on HTML elements in an HTML file and allow me to append a string onto the end of each one. I'm using Atom, which is a basic text editor that lets you search with regular expressions.  My end goal is that I want to append a string onto each of the HTML classes on the page. I'm not sure what exactly should be matched by the regex to make the replacement easier - maybe match the character after each class and replace it with the new text plus the old character somehow? Is this even possible?  Examples:

         I know I need to use look-aheads and possibly look-behinds somehow, and now I've gone through a couple tutorials on how to use them, but am still struggling to write a regular expression to solve this problem.

It seems like every question on stackoverflow where the asker is using regex to grab some information from HTML will inevitably have an "answer" that says not to use regex to parse HTML.  Why not? I'm aware that there are quote-unquote "real" HTML parsers out there like , and I'm sure they're powerful and useful, but if you're just doing something simple, quick, or dirty, then why bother using something so complicated when a few regex statements will work just fine?  Moreover, is there just something fundamental that I don't understand about regex that makes them a bad choice for parsing in general?


So I am sitting at traffic lights, stationary, in my car.  A drunk driver has crossed over and is about to hit me head on at 40 mph.  I only have enough time to do one thing, hit the brakes or leave them off. Which should I do to minimise injury to myself? Are they the same?  The case for hitting the brakes is that I am stationary and by hitting the brakes, I will remain as close as possible to stationary as I can be. Thus less has happened to me?  The case for leaving the car free to roll is that, in an ideal world, I would reverse to 40 mph and simply never be hit. Braking is to apply a force in the opposite direction (i.e. forward) while reversing would be to apply a force in the other direction. So leaving the car free to roll is as close to reversing as possible. Thus as close to optimal as possible.  My guess is that it doesn't matter, the maximum force (acceleration) I will feel is going to be the same but perhaps someone has come across this before and can shed more light.  Any ideas appreciated.

I was waiting on a red light the other day and was wondering.    If I'm in my car, not moving and I see a car that's going to hit me from behind. Would I (my body) be safer if I put on the break or if I put the car in neutral?  I assume there's no car in front of me and there's no posibility to be hit by an other car. Also, the car crashing into me is going at a good speed.


If f is continuous in [0,1] then $$\lim_{n\to \infty}\sum_{j=0}^{[n/2]} \frac{1}{n} f\left( \frac{j}{n}\right)$$(where [y] is the largest integer less than or equal to y)   (A) does not exist  (B) exists and is equal to $\frac{1}{2} \int_0^1 f(x)dx$  (C) exists and is equal to $\int_0^1 f(x)dx$  (D) exists and is equal to $\int_0^{\frac{1}{2}} f(x)dx$  My approach:               Let I =  $\lim_{n\to \infty}\sum_{j=0}^{n} \frac{1}{n} f( \frac{j}{n})$  Then I= $\int_0^1 f(x)dx$ (by integration as the limit of a sum)  The required integral is therefore ans (B) exists and is equal to $\frac{1}{2} \int_0^1 f(x)dx$  This is area under the function $f(x)$ upto $x=\frac{1}{2}$ which is also = $\int_0^{\frac{1}{2}} f(x)dx$  I am confused between the answers (B) and (D)  Please help.Thank you.

If $f$ is continuous in [0,1] then what will be the value of $$\lim_{n\to\infty}\sum_{j=0}^{\left[\frac{n}{2}\right]}\frac{1}{n}f\left(\frac{j}{n}\right)?$$  We know that,$$\lim_{n\to\infty}\sum_{j=0}^{{n}}\frac{1}{n}f\left(\frac{j}{n}\right)=\int_0^1f(x)dx$$But what will be the value if we have $\left[\frac{n}{2}\right]$ instead of $n?$


I need to replace a string in 14th to 20th position in a file with input value  String = A2245 4764ABC0000342  string to be replace = 0000342 with 0000992  I tried using sed but did not work.

How can I find and replace specific words in a text file using command line?


I want to run a simple rsync-based bash script as root when a power-down cycle initiates from either:   a login interactive shell, or  a gui session, or  a machine boot state where no login-user has opened a session (e.g. perhaps a headless server ?)   i.e. irrespectively of whether power down is initiated from a console-like session, from a gui-login session or from an internal mechanism (e.g. cron scheduling or ssh instructions passed remotely, ...).  Note that by power-down I mean either shutdown (rc0) or reboot (rc6).  For the use-case "run script in context of a gui session", @Krytarik offers a  on UF (see #2 in thread), based on lightdm. The solution (repeated elsewhere on AU, viz , ) only addresses running a script at gui session logout via configuration of /etc/lightdm/lightdm.conf, NOT immediately before machine power-down which is what I want...  EDIT: The alternative is a script triggered at certain run-levels, but because in that script rsync will deal with up to 2~3 GB of data, the power-down sequence must pause during script execution and automatically resume after completion. I found:   a  based on placing K##-scriptname.sh script directly in /etc/rcX.d/, where X depends on runlevel and ## conforms to regex [0-9][0-9]. a , where I gather that K##_scriptname.sh ought to be placed in /etc/init.d/ and symbolic links pointing to the script placed in /etc/rc0.d (shutdown) and /etc/rc6.d/ (reboot). Beside the fact that in that post, the most up-voted answer is incorrect and was not accepted, I am left with ensuring that the script (however long in executing) will actually execute to completion.    AFAIK a shutdown/reboot signal sent to the process management daemon, init, translates (among other thing) as "stop all current processes in an orderly fashion". init will do what it can "to honor jobs kill timeout values" [see man 8 init]. But what if jobs take longer in completing than the timeout values admitted by system policy (currently 5 seconds I think) ? I expect that to be the case for my script.  TL&DR: A script /etc/init.d/K00_ramdisk-sync.sh with symlinks in /etc/rc0.d/ and /etc/rc6.d/ executes at the beginning of every shutdown/reboot sequence. Question: How can I ensure that the script runs to completion no matter how long-winded, if need be by having the shutdown/reboot sequence pause and resume as needed ?

I'd like to run a .sh file using bash on logout and shutdown of Ubuntu. I have searched up and down the web and have found only fixes for KDE and GNOME. The script is simple, I just need to know if I can add the line of code to the "logoff/shutdown" file or if I need to reference it in another script.


here is two piece of class code one is for Singleton and other one is for static class. i like to understand in programming when one should use static class and when one should use Singleton class?  both are used to hold the global object as a result we can access those data from any where of the program when it is running. scope is broad for both....the life time of application.  1) i really do not find any article which can guide me when i should use static class and when Singleton class should be good choice. i have seen people manage db connection using Singleton class.  2) what is the main difference between Singleton class & static class ?  public sealed class Singleton {     private static Singleton instance = null;     private static readonly object padlock = new object();      Singleton()     {     }      public static Singleton Instance     {         get         {             lock (padlock)             {                 if (instance == null)                 {                     instance = new Singleton();                 }                 return instance;             }         }     } }   public static class TestStatic //: ITestSingleton     {         public static void doAction(string args)         {             Console.WriteLine("Test Static :: " + args);         }     }

What real (i.e. practical) difference exists between a static class and a singleton pattern?  Both can be invoked without instantiation, both provide only one "Instance" and neither of them is thread-safe. Is there any other difference?


Given:  some.txt dir  |-cat.sh   With cat.sh having the content:  cat ../some.txt   Then running ./cat.sh inside dir works fine while running ./dir/cat.sh on the same level as dir does not. I expect this to be due to the different working directories. Is there an easy way to make the path ../some.txt relative to the location of cat.sh?

How do I get the path of the directory in which a  script is located, inside that script? I want to use a Bash script as a launcher for another application. I want to change the working directory to the one where the Bash script is located, so I can operate on the files in that directory, like so: $ ./application


Sometimes I look a question that interests me, but I don't have the answer or would like to follow up later. Normally I just bookmark it, which then ends up in a big pile.  It would be great if there was a way to put a question in follow up, that I could later check my profile and get updates on the things I follow up.

Right now there isn't a great way to monitor the questions that I am interested in following. What I seem to do now is go to my recent history for questions I have commented on, and then link to the questions from there. The problem is, if I am really interested in a question, I have to monitor it closely. Sometimes I will "favorite" a question so it is easier to access more quickly, because I do not have a lot of favorites. But favoriting is not the right thing to do. I think you should only favorite a question if you really really like it, not to make it easier to follow.  I propose that you can mark questions as "interested" or something like that. What this means, is that you will get notifications for everything associated with a question: any time a new answer is posted, the answer/question is edited, and any comments to any of the answers (or question). This would make it much easier to follow questions. Especially if someone adds a new answer or comment way down the road, after you have long forgotten about the question.  It would also be nice if such a feature allowed you to write a sentence or two to associate with the question to remind you about something. In fact, if this is done, we could just use this feature to implement  to allow an edit to notify downvoters. Instead of that specific feature, you can mark a question as interested after downvoting and add a comment, "remove downvote when fixed".  What do you all think? Do you propose a better way to manage monitoring questions of interest? (The other thing I do is keep a bunch of browser tabs open with questions I am following... and this is messy :-( ).


Here is the context :  The problem started when some file icons didn't diplayed. So I search the web and most answers, if not all, were related to the icon cache database. I tried most solutions and they didn't work. Even the icon cache database is rebuilded each time.   I notice this problem was for all accounts. So it was not related to my account. This problem is for certain applications like all Office apps, Adobe Acrobat, etc. All major softwares.   I tried to change an icon associated to a filetype manually and this is when I noticed that I could not change the default program for the tested filetype. This is true for all filetypes where the icons were missing.  Also when launching some files, the app starts and popups an error message, but only on some files.  TL;DR;   Missing icons "Always use this program greyed out" for what seem "officially" registered apps and for all accounts   Some might find this question related to , but there are not the same.  So this is driving me nut!  Update 1  This seems to affect the softwares that are installed for all users, not the one installed for the current user. Apps such as Chrome is not affected neither is Firefox, because I chose to install them in my session only.

I inadvertently set the Registry Editor to be the default editor for *.txt files. Now when I go to change the default, "Always use this program to open these files" is grayed out. This is the case whether I right click on the file and choose "Open with...", or start with the "Set Default Programs" control panel.    Why? How can I fix this?


What I tried      $sql="select * from project_status where node_id=".$vid." and ".  strtolower($field_progress_flags)."!='' and ".  strtolower($field_progress_flags)." IS NOT NULL";         $query=$sql;     $array = array();     $result = mysql_query($query);     while ($object = mysql_fetch_array($result)) {         $array[] = $object;     }     mysql_freeresult($result);     echo "<pre>";     print_r($array);   the actual sql query is  select * from project_status where node_id=385 and draft!='' and draft IS NOT NULL  here am not getting any data what am doing wrong here?

I'm receiving the following warnings when I use mysql_query() in my modules:  mysql_query(): A link to the server could not be established in ...... on line 6  If I use db_query() instead, it works fine.   The code is a simple SELECT query with no special characters or variables. The actual query is mysql_query("SELECT * FROM custom_nodify WHERE nid = 345");  I should mention that this happens with ANY mysql_query(), not just the one above.  Any suggestions as to why this doesn't work?


Minifigures are sold in packets, where each packet contains one minifigure, and from the outside of the packet it is impossible to tell which minifigure is inside. There are $n$ minigures to collect.   Assuming that each packet that is bought is equally likely to contain any one of the figures, show that the expected number of packets that needs to be bought to collect the whole set is approximately $n \log n$.

To go with the Lego Movie, Lego sell minifigures of the characters from the movie.  They are sold in packets, where each packet contains one minifigure, and from the outside of the packet it is impossible to tell which minifigure is inside. There are $n$ minifigures to collect.  Assuming that each packet that my son buys is equally likely to contain any one of the minifigures, show that the expected number of packets that he needs to buy to collect the whole set is approximately $n \log n$.  [Hint: express the random variable that is the total number of packets as a sum of simpler random variables, and use linearity of expectation.]


I am trying to do sudo apt-get install haskell-platform but get only package not found message. What do I actually need to do?

How to install Haskell Platform for Ubuntu 13.04? I get the following error when I type sudo apt-get install haskell-platform:   E: Unable to locate package haskell-platform error


The fourier series is given by  $$f(x)=\frac12a_0+\sum_{n=1}^\infty(a_n\cos(nx)+b_n\sin(nx))$$ after doing a few examples I noticed that whenever I was evaluating an even function the $a_n$ would disappear because it always turned out to be $0$ after calculating the integral, and when I was evaluating odd functions the $b_n$ would disappear because it would always turn out to be $0$ after calculating the integral. So how come finding the fourier series of an even function causes the $a_n$ to be $0$ and vice versa for an odd function?

So, I am learning Fourier Series and it involves integration. I am not too good at integration. Now, the resource I use is . In the opening video he says that knowing whether the function as even or odd will greatly simplify the integration process.    So, I have two questions: 1. What is even/odd function? 2. How will that simplify integration ?


My bluetooth has been working without any issue for several months and today it just stopped working.   sudo systemctl status bluetooth ● bluetooth.service - Bluetooth service    Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)    Active: active (running) since pon 2019-12-23 20:07:18 CET; 2min 43s ago      Docs: man:bluetoothd(8)  Main PID: 1488 (bluetoothd)    Status: "Running"     Tasks: 1    Memory: 2.7M       CPU: 7ms    CGroup: /system.slice/bluetooth.service            └─1488 /usr/lib/bluetooth/bluetoothd  gru 23 20:07:18 Home bluetoothd[1488]: Error adding Link Loss service gru 23 20:07:18 Home bluetoothd[1488]: Not enough free handles to register service gru 23 20:07:18 Home bluetoothd[1488]: Not enough free handles to register service gru 23 20:07:18 Home bluetoothd[1488]: Not enough free handles to register service gru 23 20:07:18 Home bluetoothd[1488]: Current Time Service could not be registered gru 23 20:07:18 Home bluetoothd[1488]: gatt-time-server: Input/output error (5) gru 23 20:07:18 Home bluetoothd[1488]: Not enough free handles to register service gru 23 20:07:18 Home bluetoothd[1488]: Not enough free handles to register service gru 23 20:07:18 Home bluetoothd[1488]: Sap driver initialization failed. gru 23 20:07:18 Home bluetoothd[1488]: sap-server: Operation not permitted (1)   dmesg  dmesg | grep bluetooth [    5.440959] bluetooth hci0: Direct firmware load for brcm/BCM20702A1-0b05-17cb.hcd failed with error -2   Why has it stopped workign and how do I fix this? What's going on? I cannot pair any device.  I have already tried reinstalling bluetooth and bluez and pulseaudio but it didn;t solve it. Additionally, when I now click on the system settings cog icon to access system settings, nothing happens.

Bluetooth is on but can't find or be found by any other devices.  Output of sudo service bluetooth status:  ● bluetooth.service - Bluetooth service    Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)    Active: active (running) since ხუთ 2015-06-04 22:33:18 GET; 13min ago  Main PID: 26678 (bluetoothd)    CGroup: /system.slice/bluetooth.service            └─26678 /usr/sbin/bluetoothd -n  ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled   Output of lsusb:  Bus 003 Device 005: ID 0a5c:21d7 Broadcom Corp. BCM43142 Bluetooth 4.0   How can I fix it?


Assume that $\lim_{n\to \infty}a_n=a.$  Suppose that the function $f$ is continuous everywhere including at $a$.  Form the sequence $(f(a_n))_{n=1}^{\infty}$. Prove that $\lim_{n\to \infty}f(a_n)=f(\lim_{n\to \infty}a_n).$  So show $\lim_{n\to \infty}f(a_n)=f(a).$  Help me, I am lost on how to even begin.

Let $f:X \rightarrow Y$ be a function. Prove that if $f$ is continuous, then for every convergent sequence $(x_n)$ lim$_{n\rightarrow \infty}\,f(x_n)=f(\text{lim}_{n \rightarrow \infty} \, x_n)$  My attempt: Assume $f$ is continuous. Then $\forall \epsilon >0, \exists \delta > 0$ such that $\forall p \in X$ and $q \in X: d(p,q) < \delta \implies d(f(q),f(q)) < \epsilon.$  And also assume that $(x_n)$ converges. Then $\exists L$ such that $\forall \epsilon >0, \exists N$ such that $n>N \implies d(x_n, L) < \epsilon.$  I need to use these definitions to show lim$_{n\rightarrow \infty}\,f(x_n)=f(\text{lim}_{n \rightarrow \infty} \, x_n)$ . Any hints?  Edit: lim$_{n \rightarrow \infty}(x_n) \in X$


On a user's account summary page, the bounty section seems to have lost it's header styling, and doesn't seem to work very cooperatively; it seems to work on the first instance, but further attempts to change it won't work.        I'm on Chrome 37.0.2062.120. Tried clearing caches etc. with no success.

On both of my active sites the 'Earned Bounties' section header layout is broken:    It affects the header and the sorter.  (Tested on Chrome and IE, confirmed by others on Safari, FireFox)


I have this flash drive that I grabbed from work that has a few files on it I would like to delete.   It is a 32GB flash drive and when trying to delete the data I get this error message:     "This Drive is write protected."   Is there a way to change this on a Mac? I have tried erasing the drive and get this error.     Here is all the information about this Drive. Any ideas?    I have tried changing this on a Windows as well by going into regedit and changing the WriteDefault to 0, I had to actually create that 32-WRD key because there was none initially. I restarted the computer and no luck. I also tried going into Command Prompt and clearing the partitions on it with no luck either.

When I plug in my USB flash drive, it shows up on my computer as write-protected or read-only. I am unable to transfer data to it, nor can I modify or delete any files already stored on it. I also cannot repartition or reformat the drive using Windows Disk Management, DiskPart, GParted, or other tools. The drive does not have a write-protect switch.  Why did this happen and what can I do about it? Is there a way to remove the write protection?  (Note that this can happen with some memory cards, too, as they often use controllers similar to those used in flash drives. In some cases, the system may report that the drive or card was formatted successfully even though it was never actually formatted; the original data reappears when the device is reinserted.)     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.


I have the following code c.description as "CARRIER & SERVICE"  For some reason Oracle thinks Service is a variable even though it is in between strings? Any help would be appreciated.

I have a SQL script that creates a package with a comment containing an ampersand (&). When I run the script from SQL Plus, I am prompted to enter a substitute value for the string starting with &. How do I disable this feature so that SQL Plus ignores the ampersand?


I'm having trouble understanding how python pointers/ references work.  Take for example,  my_list = [1,2,3,4] A = [my_list]*3 print("Before the change", A) my_list[2]=45 print("After the change ", A)   The code will print "After the change [[1, 2, 45, 4], [1, 2, 45, 4], [1, 2, 45, 4]]"  However, if I do my_list = [10,20,30,40], A will not change even though, as I understand it, A points to the reference of my_list. What is actually happening? Is A pointing to the object [1,2,3,4] or to the variable my_list?   Note: I use pointer and reference to mean the same thing(Please tell me if it doesn't...)

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


I have some confusion about the concept of stationary and static.  A metric $g$ is called stationary if there is a time like Killing vector $K$.  $g$ is called static is further HSO (hyper surface orthogonal), i.e. there exists a foliation of hyper surface orthogonal to the integral curve of $K$.  The Schwarzschild solution requires $g$ to be static, and the Kerr solution only require $g$ to be stationary.  Here comes my question. To my understanding, requiring $K$ to be HSO is to enabling us to slice the spacetime into pieces with fixed time. The Kerr solution is for the metric outside a rotating body. In the note I am reading, it says      Do not require $K$ to be HSO, after all we want a rotating body.   Why a rotating body indicates that the metric cannot be HSO? I think I can also slice the spacetime into piece for every time.

I know that a stationary metric is one which possesses a timelike Killing Vector (so I have time invariance).  I read that a static metric is one which has a timelike Killing vector (so it is stationary) AND this Killing vector is orthogonal to a family of hypersurface (of dimension n-1 is n is the dimension of my manifold). I don't understand the "physical" meaning behind this definition ? Is there a way to explain this in some more intuitive way ? Thanks


If the number of functions from $A \to B$ is equal to $A$, then the cardinality of A and B is $1$.   In set theory notation: If $|B|^{|A|}=|A|$ then $|A|=|B|=1$.  Any ideas? I was think of assuming $|A|$ or $|B| \neq 1$ but can't think of anything I can do after/

Show (within ZF Set Theory without choice) that for any sets $A,B,C:$   If $|A|^{|B|} = |B|$, then $|A| = 1 = |B|.$   That is, if there is a bijection from $|A|^{|B|}$ to $|B|$, then  $|A| = 1 = |B|.$  Please help me..


I saw a tutorial where the guy right clicked on any object in the GUI (he chose Transform->Translate) and he got the Python source code for that panel with an indicator for the line where the operator is. That quite a neat trick. Unfortunately it doesn't work for me. I use Blender 2.9 and the video was from 2013.

I want to fully automatize some of my blender processes, an i run into a lot of problems not finding the correct commands, not using the correct args...  Can i just "see" in a log somewhere what were the commands blender ran ?  To be very precise, i want to load a gltf file, and export it to stl.  No problem through the gui, but i'm stuck with that bit of code :   import bpy import sys import os  file = open(r"C:\Users\theo1\Documents\GitHub\Hackathon2020\map&mapdata\mini.gltf")  bpy.ops.import_scene.gltf(file) bpy.ops.export_mesh.stl(filePath=r"C:\Users\theo1\Documents\GitHub\Hackathon2020\map&mapdata\mini.stl")   Which gives me this :   Traceback (most recent call last):   File "<string>", line 1, in <module>   File "C:\Users\theo1\Desktop\impExp.py", line 7, in <module>     bpy.ops.import_scene.gltf(file)   File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\modules\bpy\ops.py", line 198, in __call__     C_dict, C_exec, C_undo = BPyOpsSubModOp._parse_args(args)   File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\modules\bpy\ops.py", line 151, in _parse_args     raise ValueError("1-3 args execution context is supported") ValueError: 1-3 args execution context is supported   thanks.