If I have a Number of gas molecules in a container each having some velocity $v(i)$, what would be the $K.E$ of the gas? Will it be the sum of kinetic energies of the individual particles or will it be $\frac{1}{2}mv^2$ where $v$ is the velocity of the center of mass? My book says we have to use the center of mass velocity but according to me the center of mass should stay at rest since there are no external forces (inter molecular attraction if exists is an internal force ) $$$$  What if the container is moving too? What will be the kinetic energy of the gas? The sum of K.E's of particles (their velocity somehow calculated by adding the velocity of the container) or by using the velocity of the center of mass. If in the second case both the ways give the same answer please explain me how. And should we include the macroscopic K.E also in the Internal Energy or not $$$$  Please explain which way is the correct and also explain why the other method is wrong.   Edit This is after @sammygerbil last comment Please refer to my last comment in which I quote Feynman Feynman writes

In (non-relativistic) classical physics, if the temperature of an object is proportional to the average kinetic energy ${1 \over 2} m\overline {v^{2}}$of its particles (or molecules), then shouldn't that temperature depend on the frame of reference - since $\overline {v^{2}}$ will be different in different frames?  (I.e. In the lab frame  $K_l = {1 \over 2} m\overline {v^{2}} $, but in a frame moving with velocity $u$ relative to the lab frame, $K_u =  {1 \over 2} m \overline {(v+u)^{2}}$).


So when I try to log into the admin account i go right back to the log-in screen. And I've been searching around all over the internet trying to fix it, but then some other problems always comes along, how may I fix it?

I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution?


Why intersection of two normal subgroups is trivial ?   I know this is simple but I cant get it.  $|G|=11^{2}13^{2}$    $H$ and $K$ are $11$ and $13$ Sylow normal subgroups respectively . Then why must be $H\cap K=e$ ? I am stuck on it for an hour or so.

What can we say about the intersection of the $p$-sylow and $q$-sylow subgroups of group $G\;$?  It's not necessary that $p=q$.  Is there general statements about the intersections of sylows subgroups ?   You can give me restricted conditions, this is also welcome !


I want to uninstall my ubuntu linux from the computer because it's very hard to use and install windows 7. What can i do in this case?(I have an original windows 7 on CD/DVD)

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


I'm trying to check to see if an div called .errormsg exists and if it does then I don't want anything to happen but if it doesn't exist i want my form to redirect to a new URL after it. This is what I've done but I'm not sure it's correct at all, I'm only learning so any help would be much appreciated   thanks

How can I check the existence of an element in jQuery?  The current code that I have is this:  if ($(selector).length > 0) {     // Do something }   Is there a more elegant way to approach this? Perhaps a plugin or a function?


String TypedMaxNumber = MaxValue.getText(); if(TypedMaxNumber == "100")     System.out.println(TypedMaxNumber+" = 100");   I think it is a silly problem, but when I am running to run this program and I type 100 in the text Field it is not going inside the loop. What could be the reason.

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?


Can anyone help me figure out what is wrong in the following step:  $$\begin{align}\int \tan x\ dx &= \int (\sec x \sin x)\ dx\\ &= -\sec x \cos x + \int \sec x\tan x\cos x\ dx\\ &= -1 + \int \tan x dx\end{align}$$  So I got $\displaystyle\int \tan x\ dx = -1 + \int \tan x\ dx$ that is $0 = -1$ ?  Any help will be really appreciated!    Now I understand. So an indefinite integral can be defined only upto a constant. Thanks a lot!

I had a calculus final yesterday, and in a question we had to find a primitive of $\tan(x)$ in order to solve a differential equation.  A friend of mine forgot that such a primitive could easily be found, tried to integrate $\tan(x)$ by parts... and then arrived to the result $0 = -1$.  The kind of thing you're pretty satisfied to "prove", except during an important exam. :-°  So afterwards I tried to do the same :  $$\begin{align*} \int \tan(x)dx &= \int \sin(x) \times \frac{1}{\cos(x)}dx \\[0.1in] &= -\frac{\cos(x)}{\cos(x)} - \int - \frac{\cos(x) \times \sin(x)}{\cos(x)^2}dx \\[0.1in] &= -1 + \int \tan(x)dx \end{align*}$$  And therefore we get :  $$ \int \tan(x)dx = -1 + \int \tan(x)dx \implies 0 = -1$$  What? The reasoning sounds about right to me. Could someone explain where something went wrong?  Thanks,  Christophe.


I am doing postdoc in developmental biology. Recently I started to leave work at the lab, meaning that I don't work at home anymore. Before I spent many hours at night (at home) analyzing my data; now I spent that time on my side project not related to science. I would like to ask if that kind of schedule is sustainable? Can I be a good scientist if I only work in working hours (now and later when I have a long term position)? Other scientists seem to work both at the lab and at home.

I am referring more to young scientists after the PhD than professors, although I am also wondering about people with a stable position.   I see many people overworking themselves, burning-out, being overworked and with pressure to work well, fast, and produce a lot (publications). I am discussing an average person who has completed a PhD that has all the skills for the job. Let's leave the top professors 5-10% of the field that are super-productive for whatever reason, those are exceptions. I also assume that there is passion for research, but that work balance is also important.  Is it possible to survive/remain in academia by working normal hours (8-9 hours per day) without working evenings, weekends, holidays, without feeling guilty about taking a 2-3 weeks vacation? I imagine to become professor would include many of the above sacrifices. Some professors (tenured) have told me they work 50-60-70 hours per week.  Is overworking basically the rule/working culture in academia? Is it unusual to reach/maintain a stable position in academia without regularly overworking?  Consider mentioning the cultural, country, institution type of your answer, as there are variations in different contexts.


An excerpt from the sub-headline of a recent article in the WSJ:     FBI Director James Comey on Tuesday explained why his agency   recommended that Hillary Clinton not face criminal charges for her   email arrangement while serving as Secretary of State.   I'm not a native English speaker but "not face" sounds wrong to me.  Why is it "not face charges" instead of "not faces charges" or "not to face charges"?  Update:  I don't consider this question a duplicate of "When should I use the subjunctive mood?". The question here asks to identify the grammatical rule. The other question asks about the usage of the grammatical rule.

In which cases should I use the subjunctive mood?     I suggest that every applicant fill out the form carefully.        If she were rich, she would live on Long Island.


Can somebody please team me where I can find the Blue topped ADD node it's driving me mad.... I was following a tutorial by Blender guru and he showed a node tree of a glass hack. cannot recreate it as I cannot locate the node  Many thanks

A lot of people recommend to use the maximum node for glass setup, but I can't find that node. Nothing comes up when I search for it.  Where do I find it?


All of a sudden my computer is not finding the built in camera... I use this everyday. No FaceTime, no videorecording... nothing.

System Report>Camera>No video capture devices were found     USB>Device Tree> No FaceTime HD Camera (inbuilt)listed    What can be the cause for "camera hardware failure"? Could faulty iSight cam wifi antenna cable linkage between logic board and camera board (in display)result in Camera hardware not "found"?


1) I don't know if he will do it in the way we agreed before.   This sentence means that don't know if he will treat according to things that we agree on . For example I agree with my partner on offering to low price to my customer. Although we agreed ,he said he found the price very low and would increased the price.     2) You must do it in the way I do    This sentence means that "you must do like I did." We are talking about way of doing something.  I wonder If my opinions are correct or not and "in the way" has two meanings

A customer asked for the posters to be laminated on the front side and he also asked for the posters to be ready by today. But,  I didn't to it as he'd asked us to do. I didn't to it in the way that he'd asked us to do. I didn't to it the way that he'd asked us to do.  PS. here, ask and request are interchangeable without changing any meaning? And which one would you prefer to use between he'd and he had


During the very first session of my current campaign, my character's fist was turned to stone.  Quite a few sessions later, I'm getting a bit irritated with only having one functioning hand. What ways are there to restore my hand?  We're level 8, playing 5th edition, set in the Forgotten Realms. My fist was turned to stone by a dragon. We're playing Storm King's Thunder. What happened to my character was one of the characters provided by the module. At least I assume that. Haven't actually checked that to avoid spoilers for it.

In 5e's version of the flesh to stone spell, if the spell is maintained for the full minute duration, the effect (petrification) lasts until "removed".  How can this petrification be removed?


I have been working on getting a server up and running and I don't want to use anything but NBT data edits and command blocks no plugins, but any who I'm very tired and cant seem to wrap my head around this so I'm asking someone else, I have this snippet of code:  /tellraw @p ["",{"text":"Yes","color":"green","bold":"true","clickEvent":{"action":"run_command","value":"/tellraw @p {\"text\":\"Confirmed!\",\"color\":\"green\"}"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Confirm","color":"green"}]}}},{"text":"/","color":"dark_gray","bold":"false"},{"text":"No","color":"red","bold":"true","clickEvent":{"action":"run_command","value":"/tellraw @p {\"text\":\"Cancelled\",\"color\":\"red\"}"},"hoverEvent":{"action":"show_text","value":{"text":"","extra":[{"text":"Cancel","color":"red"}]}}}]   I believe I found that somewhere on Arqade and I need a book through the /give. I believe the when opened will present you with 3 options 1 for the world spawn 1 for nether(or just another set of /tp cords that I can change the xyz to what I need as I do not think you can travel between dimensions via commands) and 1 for the end if you could help that would be awesome

I am trying to make clickable text in Minecraft in the chat box. It was used in the adventure map, "UP".   The idea is that you are given an option in the text to click, "Yes", or "No". Each word will give an output of a command.  How is this achieved?


I'm making Kolaches (a Czech semi-sweetened dough with a sweet filling), but I'm challenging myself to cook vegan, and therefore can't use an egg.  I've got a bunch of recipes, but all of them are semi-enriched, i.e. have egg, milk, and added fat.  I've got replacements for everything else, except the egg.  What are things people have used for eggs in yeast breads.  It shouldn't need to be a binder or leaven, just enrich.  I've seen suggestions for sweet potato, just add oil, tofu.  Anyone have any experience with enriching yeast doughs without eggs?

I've been reading (most) questions and answers (here) about baking bread (which I love) and how to replace eggs in many recipes (which I wish I didn't need). Turns out, I too have egg allergy (not too severe) and a few of my favorite breads require one or more eggs.  So far I've seen two options, in many threads, that look promising: Ener-G egg replacer and replacing eggs with flax. However, not a single use case I've seen here is about bread. I'm looking for an option to replace 1-3 eggs in a bread dough with: 500 g of white wheat flour, 200 ml of milk, 50-80 g of butter, a variable amount of sugar (5-50 g) and 20-30 g of fresh yeast.  Examples of this dough are the , the  and a similar recipe from Galicia (northwest Spain) with even more eggs. And so many other breads, but these are my favorite ones :)  Has anyone tried flax or ener-g on a similar bread dough?


I am a maintenance tech in an apartment complex.  I have a perplexing issue.  We have 2 or 3 apartments that, when the electric range burners are in use ( sometimes 1 burner - sometimes 2) the 15 Amp AFCI for the living room ceiling light and outlets and kitchen ceiling light will trip.   Not every time the stove is in use only once in a while.   Load on the breaker that trips is usually a TV the two ceiling lights and maybe an oxygen generator.  The AFCI never trips unless the burners on the range are on and not all the time then.     I have changed a couple of AFCI breakers out because they seem a little flaky and it seems to have solved the issue.   What is it about AFCI breakers that would make them do this?

I have a problem that occurs intermittently in several different apartment units.  Kitchen has Frigidaire Electric Range.  Living room (LR) and bedroom (BR) have 15 Amp AFCI circuit breakers that control ceiling lights in the kitchen and LR & outlets in LR.    At times when one or more burners are in use on the range, the AFCI that controls Ceiling Lights in LR & Kitchen and outlets in LR will trip.  I am changing out the 15 Amp AFCI because I don't see anything wrong.  It doesn't do it all the time and it has done it in at least 5 different apartments.    All apartments are wired the same & all have the same range.  What the heck is causing this?


I have always selected my font size by the eye or educated guess/trial and error but at this point I would like to know where I could find a chart or document with guidelines regarding what font size you should use for this print size considering the viewer will see it from this distance.    While the suggested "" might have some nice details, as far as I saw from the question and answers, this only targets Street Signs while taking into account car speed limit. This is only a branch of what my question is about.  I am interested in a more general way, a rule of thumbs of some sort that will help you get an idea on how to design something from A4 posters to outdoor billboards.

To avoid printing single letters at varying sizes and measuring how far away I can see it from a distance is there a formula for determining what size font for a particular read distance? Is it better to take the midpoint between the ascender line and x-height or to go purely off of the x-height (since going purely off the ascender line could leave lowercase letters difficult to read)? How does vertical height play into this? Would I need to then figure the hypotenuse distance instead of a straight distance?  For example if I'm shooting for a 20' read distance but the sign is to be placed about 30' up should I use a distance of  35' instead of 20'?  I'm shooting for a 20' read distance for the headline and then possibly a 10' read distance for additional content depending on how it all fits on the active area.


I have come to assume that.... I have come to believe that...   How would you parse this. Is "come to" a phrasal modal?

Consider the following examples:     I have noticed that a lot of people are switching to Unity.   vs.   I have come to notice that a lot of people are switching to Unity.   or:     The Saddam I have come to know   vs.   The Saddam I have known   or:     "I have come to understand" vs. "I have understood"    "I have come to decide" vs. "I have decided"     My questions are:   How is the meaning different in the above examples? I do not think it's possible to use certain verbs like "run" after "I have come to". So what sort of verbs can be used in this context?


Let's say the CEO of a multinational public company goes to an interview and says "we have hard times coming". Then, the share price drops. Later, the fiscal assets and report of the company is revealed. This reveals that the company is doing great and share price again rises. During this period the CEO manages to buy a large portion of stock at the expense of the trust of shareholders. Is this legal?

I know that insider trading is illegal. However, is it true that the CEO of a listed company can still buy/sell their own stock? If he/she does so, isn't that technically insider trading? Or why is it different?  Even if people directly working for the company did not engage in insider trading, they will surely give "investment advice" to their friends and family.   Imagine that you are good friends with a few Fortune 500 company CEOs, and you own the stock of those companies. Every time you have coffee or dinner with one of your friend-CEOs, they might say something like "you know, I don't think our company is doing too well right now...", or "hey, we have something big coming up in the near future...".   Based on this indirect information, you could adjust your position in the stock and make profit when the news becomes public information and the stock price reacts. This kind of stuff must be going on all the time, right? Isn't this insider trading, and how can you ever prevent this?


In the File Manager (Xubuntu 12.04), I can see some default folders which I don't need (like Videos, Music, ...). Is it safe to remove them or might programs not work properly afterwards (like on Mac OS X where I tried that once)?  I found this thread on Ubuntu Forums . Is this the way one should remove these folders?

I want to remove Videos and Music from the left side panel. But, I can't seem to find the option to do so. How do you do that?


I often meet two constructions which differ, as it seems, only by the choice of article: "there is no such [condition ...]" and "there is no such  a [condition ...]". What actually is the difference between them?

When it comes to losing weight, a quick fix to would be nice, but we   know there’s no such [a] thing. ()   It sounds like there isn’t ‘a’ in the news. So I wonder if it be right when there is no ‘a’ after ‘such.’ Would it be okay?


In the below code I have created one method to print values using Yield and another just a simple list iteration. So here my question is the output obtained from both the methods are same so why do we go for Yield keyword? and also please tell me the exact usage of Yield keyword in application.  Code:  using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace YieldKeyWordEg {     class Program     {         static void Main(string[] args)         {             Animals obj = new Animals();             Console.WriteLine("------ Using Yield ------");             foreach (var item in obj.GetName())             {                 Console.WriteLine(item);             }              Console.WriteLine("------ Using List Iteration ------");             foreach (var items in obj.GetNameinList())             {                 Console.WriteLine(items);             }             Console.ReadLine();         }     }     class Animals     {         public IEnumerable<string> GetName()         {             List<string> objList = new List<string>();             objList.Add("Cow");             objList.Add("Goat");             objList.Add("Deer");             objList.Add("Lion");             foreach (var item in objList)             {                 yield return item;             }         }         public List<string> GetNameinList()         {             List<string> objList = new List<string>();             objList.Add("Cow");             objList.Add("Goat");             objList.Add("Deer");             objList.Add("Lion");             return objList;         }     } }   Output:  ------ Using Yield ------ Cow Goat Deer Lion ------ Using List Iteration ------ Cow Goat Deer Lion

In the  question one of the answers had the following code snippet:  IEnumerable<object> FilteredList() {     foreach(object item in FullList)     {         if(IsItemInPartialList(item))             yield return item;     } }   What does the yield keyword do there?  I've seen it referenced in a couple places, and one other question, but I haven't quite figured out what it actually does.  I'm used to thinking of yield in the sense of one thread yielding to another, but that doesn't seem relevant here.


I will accompany my husband in the Schengen Area for a business trip. I will apply as a tourist. Does my husband need to create a Cover letter? Stating he will accompany me and he will cover all expenses..  Also, one of the requirements is a bank certificate. Can I just provide my husband's bank certificate? Because I am only a housewife and I don't have one. I am just relying on him.

Lots of people would like to visit the EEA area to take holiday or to visit family or even to go for longer term visa arrangements in the Schengen zone.  In order to do this, they need a Schengen (or national) visa.  This appears to be a fairly straightforward process, but hints and tips can always be helpful.  Without focusing on any individual's circumstances, what are some helpful hints that can improve the likelihood of a successful application?


Yeah. I probably just missed it in lecture, but I totally missed why this is like this. Sorry. Thanks. A part of me wants to understand it as $$e^{-i\theta} = \cos (-\theta) + i\sin (-\theta)$$ But idk

Our teacher assigned extra credit for which we are allowed to use any source (including this website) to find the answer. This material has not been covered in class or in the book we are using. We learned Taylor series using series of real numbers but we have not covered anything remotely similar to the problem below so I have no idea how to even begin this problem.   Let i =$\sqrt{−1}$   a) Use the Taylor series centered at x=0 to prove that, for all $\theta$,  $e^{i\theta} = cos(\theta) + isin(\theta)$  b) Use above answer to prove that $[cos(\theta)+ isin(\theta)]^n = cos(n\theta)+ isin(n\theta)]$  c) We may write $[cos(\theta)+ isin(\theta)]^n = cos^n(x)(1+itan(\theta))^n$  Use the 5th order Taylor polynomial for $(1+x)^\frac{1}{3}$ with $x = itan(\theta)$ to find an estimate for $sin\left(\frac{\theta}{3}\right)$.  Use this approximation to estimate the value of $sin\left(\frac{\pi}{18}\right)$.  Hint: Two complex numbers $a+bi$ and $c+di$ are equal if $a=c$ and $b=d$.


In Julia programming language, one can type Unicode character such as    If I want to copy paste a chunk of code in a tex file. What should I do?  Here is an unsuccessfule attempt:  \documentclass[a4paper, 12pt]{book} \usepackage{verbatim} \usepackage{unicode-math} \begin{document} \begin{verbatim}  Hello world μ x \end{verbatim} \end{document}   In the output, the $\mu$ does not appear:    Edit Ok I did some research and found   \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{pmboxdraw}  \begin{document}  \begin{verbatim} verbatim { ├ ─ └ } \end{verbatim}  \end{document}   However, when this is the output I get    Edit 2 I also tried the following code  \documentclass[a4paper, 12pt]{article} \usepackage{fontspec} \setmainfont{Liberation Serif} \setmonofont{Liberation Mono}  \usepackage{verbatim} \begin{document} Hello world  \newline μ  \newline Hello world again  \begin{verbatim} μ x  \end{verbatim}  \end{document}   The font "Liberation Serif" cannot be found / The font "Liberation Mono" cannot be found

I want to do  with the crm10 font. How can I do that? I've tried a few fonts but I don't like them.  \documentclass{scrreprt}  \usepackage{fontspec} \setmainfont{Times New Roman} \setsansfont{Arial} \newfontfamily\greekfont[Script=Greek]{Linux Libertine O} \newfontfamily\greekfontsf[Script=Greek]{Linux Libertine O} \usepackage{polyglossia} \setdefaultlanguage{greek}  \begin{document} \tableofcontents{}  \section{Αυτό είναι ελληνικά.} {\bfseries Welcome to Greek:} Αυτό είναι ελληνικά  Or Russian: Привет  Or Hebrew: מה הבעיה? \end{document}


Should the verb in the following sentences be singular or plural?   Two cups of sugar [was or were] added to the recipe.  Fifty cubic yards of contaminated soil [was or were] excavated.

When writing about specific quantities, should the verb reflect a singular or a plural value?  Do abbreviations vs. spelled-out words make any difference?  I took 2 ml of water, which was/were then added... Six microliters of protein solution was/were placed in a centrifuge...


So, for the sake of argument, let us assume that we have sufficient computational power and brightest scientists. Can we explain/predict every aspect and event of our universe with quantitative model?  Or do you think there are certain aspects within universe such as probabilities and psychology that are naturally beyond quantitative approach?

Here is an idea: As human kind we discovered many laws, formulas, events, etc. in our surrounding environment.here is a way to discover the unknowns :   Now if we simulate a virtual world with our knowledge in computers we expect it to work, because we guess that we know all of it. If a bug occurs in the simulation or something acts differently from the expected in the real world, that may tell us that there is something new; a thing (law, formula, ...) that we didn't know, which causes that bug or that anomaly.  For examples imagine that we created a virtual simulation for motion dynamics and we didn't add the friction to our simulation. Everything in the simulation will work fine but in a different manner. So if we hadn't discovered friction yet, would it help us to think about if there is something we didn't add? Or if there is something we don't know?       But can we simulate the whole universe, everything we know, in one simulation? I know it will require a deadly high computational power. Something like what they did for DNA; two years of computation to analyse their pattern. can we simulate everything we know to create a virtual universe to compare it to our real universe?


This is the code what i have written. but when i am trying to print key and value its getting null pointer.  My main concern is to load the keys and values from the property files and need to store in a map  Map<String, String> prop1 = new HashMap<String, String>(); Map<String, String> prop2 = new HashMap<String, String>();  public static void main(String args[]) {      Sample sample = new Sample();     sample.getLocaleOne(); }  public void getLocaleOne() {     Properties prop = new Properties();     InputStream input = null;      try {         File file = new File("Labels.properties");         System.out.println("file.getAbsolutePath());         input = this.getClass().getClassLoader().getResourceAsStream("C:/workspaceNewI18NChnages/customer/Labels.properties");          prop.load(input);          Enumertion<?> e = prop.propertyNames();         while (e.hasMoreElements()) {             String key = (String) e.nextElement();             String value = prop.getProperty(key);             System.out.println("Key : " + key + ", Value : " + value);         }     } catch (Exception e) {         e.printStackTrace();     } }

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?


My problem is in the photo below:    I tried:  sudo apt install libsmbclient   And this was the output:  libsmbclient : Depends: samba-libs (= 2:4.11.6+dfsg-0ubuntu1.2) but it is not going to be installed   Then I tried:  sudo apt install samba-libs   And this was the output:  The following packages have unmet dependencies:  samba-libs : Depends: libpython3.8 (>= 3.8.2) but it is not going to be installed               Depends: python3-talloc (>= 2.2.0~) but it is not going to be installed   And the cycle seems to be going forever everything seems to be depending on another thing that can't be installed.  Edit: output of apt-cache policy libsmbclient samba-libs libpython3.8 python3-talloc is:  libsmbclient:   Installed: 2:4.7.6+dfsg~ubuntu-0ubuntu2.15   Candidate: 2:4.11.6+dfsg-0ubuntu1.2   Version table:      2:4.11.6+dfsg-0ubuntu1.2 500         500 http://ubuntu.mirror.cambrium.nl/ubuntu focal-updates/main amd64 Packages      2:4.11.6+dfsg-0ubuntu1.1 500         500 http://ubuntu.mirror.cambrium.nl/ubuntu focal-security/main amd64 Packages      2:4.11.6+dfsg-0ubuntu1 500         500 http://ubuntu.mirror.cambrium.nl/ubuntu focal/main amd64 Packages  *** 2:4.7.6+dfsg~ubuntu-0ubuntu2.15 100         100 /var/lib/dpkg/status samba-libs:   Installed: 2:4.7.6+dfsg~ubuntu-0ubuntu2.15   Candidate: 2:4.11.6+dfsg-0ubuntu1.2   Version table:      2:4.11.6+dfsg-0ubuntu1.2 500         500 http://ubuntu.mirror.cambrium.nl/ubuntu focal-updates/main amd64 Packages      2:4.11.6+dfsg-0ubuntu1.1 500         500 http://ubuntu.mirror.cambrium.nl/ubuntu focal-security/main amd64 Packages      2:4.11.6+dfsg-0ubuntu1 500         500 http://ubuntu.mirror.cambrium.nl/ubuntu focal/main amd64 Packages  *** 2:4.7.6+dfsg~ubuntu-0ubuntu2.15 100         100 /var/lib/dpkg/status libpython3.8:   Installed: (none)   Candidate: 3.8.2-1ubuntu1.1   Version table:      3.8.2-1ubuntu1.1 500         500 http://ubuntu.mirror.cambrium.nl/ubuntu focal-updates/main amd64 Packages         500 http://ubuntu.mirror.cambrium.nl/ubuntu focal-security/main amd64 Packages      3.8.2-1ubuntu1 500         500 http://ubuntu.mirror.cambrium.nl/ubuntu focal/main amd64 Packages python3-talloc:   Installed: (none)   Candidate: 2.3.0-3ubuntu1   Version table:      2.3.0-3ubuntu1 500         500 http://ubuntu.mirror.cambrium.nl/ubuntu focal/main amd64 Packages

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


I have a Mac running Fedora with no recovery partition and no access to any computer with Mac OS X. How can I reinstall OS X on this computer?

I erased my Macintosh HD from Disk Utility with a journaled encrypted format and I wanted to install OS X 10.7 Lion. I left it to download and install overnight because it took about 16 hours.  When I checked it again it gave me a weird screen that has a circle with a slash inside it, like a stop sign. What can I do?


I was trying to load a .json file. This file is an English word dictionary that contained a lot of Unicode like \u266f. By using encoding = "utf8" can not solve the error. Then I replaced all of the Unicode with UTF-8; but still, it shows the same error.   My code:   import json data = json.load(open("data.json", encoding="utf8")) print(data)    Result:  Traceback (most recent call last):   File "E:\Python\Dictionary App\test.py", line 4, in <module>     print(data)   File "C:\Users\ahnaf\AppData\Local\Programs\Python\Python38-32\lib\encodings\cp1252.py", line 19, in encode     return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u266f' in position 657370: character maps to <undefined> [Finished in 0.32s]   The json file:

When I try to print a Unicode string in a Windows console, I get an error . UnicodeEncodeError: 'charmap' codec can't encode character .... I assume this is because the Windows console does not accept Unicode-only characters. What's the best way around this? Is there any way I can make Python automatically print a ? instead of failing in this situation? Edit:  I'm using Python 2.5.  Note: @LasseV.Karlsen answer with the checkmark is sort of outdated (from 2008). Please use the solutions/answers/suggestions below with care!!  is more relevant as of today (6 Jan 2016).


I am new to the world of making games and all. Well its been a few months or so. There are many tutorials that I have been watching. On the way, I made a few games that I saw and made. I am not asking about those. In fact I don't want to publish those games in my name ever. But then there are some small games that I made which are modified version from what I learnt of those games. Like I changed the game-play style, made it simpler and ignored some features from a game.  Can I publish them in play store? Or this would be any break of law or something? or Something that I should not do?

Most games build on other games' successes and many are downright clones. Where is the limit of imitation before legal issues come into play? Is it down to literary or graphic work like characters and storyline that cause legal problems, or can someone actually claim to own gameplay mechanics?  There are so many similar clone games out there that the rules are probably very slack or nonexistent, but I'd like to hear the views of more experienced developers / designers.


Is there (-alike) line-by-line mode for OpenSSH?  In the olden days, before SSH, there was telnet.  Telnet had two modes of operation: one like SSH (char-by-char mode, where each key pressed would be immediately sent to other side) and another one called "line mode" (line-by-line), where you would input whole line (and edit it if needed) and only when you pressed enter, whole line would be sent over network (usually in single TCP packet).  While char-by-char mode was generally more convenient, line-mode was extremely useful on high-latency (and/or high packet loss) links.  It however seems to be missing from OpenSSH client. Does anybody knows of other FOSS SSH implementations or openssh patches or other clever tricks which might provide something similar? What I'm not interested in is:   non-free software (closed source ssh client looks like it has it)  telnetd/SSL instead of SSH (server side must remain SSH2 compatible as there are lots of other users)  other packet-loss mitigation techniques (like tcp_westwood etc).   Any ideas?

Can I tell SSH to send the data only after pressing enter or tab, and not after each individual keypress?


I am trying to load wp_editor on demand using jquery/javascript.  Somehow I got success using following code  but it does not save changed data in the  element.  tinyMCE.execCommand('mceAddEditor', false, textarea_id);   I'll really appreicate any contribution.

Does anyone know how o load wp_editor via AJAX in WordPress?  My markup and editor is getting loaded properly but editor controls are not getting loaded properly, it may be because Javascript is not running in AJAX call.  Any help would be appreciated.


I am trying to implement the protocol mentioned in Section 3.4 of “” in Java.  In the Second Step, the Client computes a polynomial of degree $n$ over the finite field.  For $C=\{1,2\}$, will the Polynomial be $x^2-3x+2$?  Can the polynomial have negative coefficients over the finite field? If yes, how do I encrypt the negative coefficients using Additive ElGamal?

I am trying to implement the  using Additive ElGamal.  For this, from the client side, my inputs are $C = \{1, 2\}$. So, the polynomial is $(x-1)(x-2)$ which is $x^2-3x+2$.  The next step is to encrypt the variable coefficients which are $1$, $-3$, $2$.  Can someone tell me how to use ElGamal for encrypting negative numbers. If there is an example which one can run from Client and Server side, it will be really helpful.


Is blender good for compositing? I want to integrate my models in to real life footage and am expecting realistic results. Or can I make a 3D characters-integrated-real-life-scene which will look decent and professional?

Apologies for this possibly too vague question, but are there some general guidelines to follow when rendering artificial 3D meshes together with an imported 2D image as the background?  In the attached Blender file (or rendered image), the cube looks so out-of-the-scene. Some reflection from the green background onto the cube should make the cube more realistic in the scene? I don't know how to put it in professional terms -- any suggestions are welcomed!


On Stack Overflow I asked a specific question about a  diagram. The next day someone changed my question to say it was not about UML diagrams and instead focused on a secondary issue I was having even though I very clearly showed the UML diagram, the code I was working with, and where I was having the primary issue.  They changed not only the question title, but the content of the question and the tags of the question. This is a fundamental change of the question as a whole which would only serve to prevent me from getting a complete answer.  I was of course able to change the question back, but I could not see a way to contact the user who did this or seek help about it and the ability of someone else to do this makes me very uncomfortable especially since I wasn't notified of the change.  How should I ordinarily proceed in such a situation?

First this question is not a dupe of:    Though the upvotes show it's an issue: I'm not seeing things.  My question concerns specifically someone with 20K+ rep being eligible for the "moderator" status (you could vote for him on SO as a moderator, which I didn't).  I've seen post where that person changed the entire question so that it fits an answer "because then it adds value". The logic behind the edit being "so it gets referenced in Google (and is searchable directly in SO) and if someone search for the question that fits the answer, then we have an answer".  I don't disagree that from that standpoint it seems to make some sense.  But the problem is that it makes the original poster very uncomfortable: why would such a poster come back to SO if it's to see his question completely distorted?  Also, why would people answering then getting zero votes or downvoted be motivated to answer more questions when they know the question may get completely modified?  In another case, and this has been the subject of a post here on meta that generated some heat, same 20K+ rep person simply didn't understand the question. So he modified it to a question where he portrayed the user as making something illegal or questionable and the user got downvoted to oblivion. The user left SO and went ballistic on Usenet and on blogs about SO.  This is not good in my opinion because, sure, you completely rewrite questions to make it fit your own view of the world but it's detrimental to existing SO users.  Both to the original poster who asked the question and to people answering the correct question (with the correct meaning, before the crazy edit took place completely changing the question) and to commenters, which often go crazy in comments because they dislike the edit.  That user never edited one of my question, but I was reading a weird series of 20 comments and understood that obviously there was an issue at work and when I saw the name of the editor I thought "oh no, it's him once again".  So my question is simple: what do I do when I think that a user with 20K+ rep is acting in an unacceptable manner, frequently entering into arguments in comments with various SO users and often re-inventing questions?  In other words: what has been put in place in the SO platform to prevent people at the very top (being eligible for meta-moderator status, I don't know how you call this) from subverting the platform?  We could push the logic a bit further: why not write random question, random answers, random upvotes and then after a few days rewrite the question so that it matches the answer with the most vote?  Isn't there really a very serious issue here?  Once again, it's obviously not the first time the subject comes up, the problem is so obvious that it has prompted question here like "mark a user as not being able to edit your question" that I linked to above and it also prompted several blog entries criticizing SO.  I don't dare to flag his comments defending his own crazy edits because I'm thinking "maybe he's meta-moderator now, so he'll see my flag and start editing my own questions to make me look a stupid poster".  It's even worse than that: right now I'm thinking "but why ask question as to how to deal with this and make stackexchange a better platform, because my post may be edited anyway to completely distort my question?".  That is how bad it is. I found it (and it's just an opinion) a bit disgusting.  To make a bad analogy, it's a bit like when you give to much power to someone who turns out to be a bad cop. This is an issue. It has to be dealt with. But it is very difficult to deal with a bad cop once he's near the top of its sphere of influence.


I just rebuild my old desktop, which is now running Lubuntu 15.04, and tried to transfer a 1.3GB file into my 8GB thumb drive. I was immediately reminded of a problem that has plagued me for a long time.  If I use PCManFM the transfer starts at about 68% complete and slowly (and I mean slowly) gets up to 100%. So the progress bar is barely even a suggestion.   I then used rsync (with the progress argument) to see what was going on. A similar thing happened. The data transfer started off at about 4MB per second and then crawled down to 1MB per second. And it took about the same amount of time.  The transfer will eventually complete but I was curious as to why this might be happening? Is there any way to get the progress to be a bit more accurate?

Whenever I try and copy a file to an USB flash disk, the progress bar runs till the end very fast and stops for an indeterminable time before it is complete.  Is there an issue with ubuntu or my flash disk is what I am not able to figure out. All I want is a realistic copy dialogue


Show that, given any set of seven distinct integers, there must be at least one pair in the set whose sum or difference is a multiple of 10. I've been thinking a lot on how to show that this is true, but I've not managed to come up with anything yet. If anyone could offer their viewpoint I'd appreciate it.

Show that any set of 7 distinct integers includes two integers $x$ and $y$, such that either $x-y$ or $x+y$ is divisible by 10. I'm trying to apply the pigeonhole principle, but haven't been able to come up with a convincing argument.   Though similar to , I think the difference between the two is enough to warrant a second post.


I have scraped a website and retrieved the part where the author of a topic is stated. After extracting the authors, I have a list of lists of strings:  authorlist=[] for post in topicsection:      authorlist.append(re.findall(r'(.*?)',  post))  >>>> [['author1'],['author2'],['author3']]   However, I want to turn this into one list of strings. Therefore I looped over the authorlist and appended the first[0] element of every list to the Authorlist. Sometimes an empty lists appears in the text, which causes an error. I therefore want to use the try-except command, in which the empty lists are ignored.   How can I tell Python to extract the first element of every list, but continue the loop if there is an empty list? I tried the following, in which the except-part is not working:  try:     authorlist = [lijst[0] for lijst in authorlist] except IndexError:     pass   Thank you in advance!

Is there a simple way to flatten a list of iterables with a list comprehension, or failing that, what would you all consider to be the best way to flatten a shallow list like this, balancing performance and readability?  I tried to flatten such a list with a nested list comprehension, like this:  [image for image in menuitem for menuitem in list_of_menuitems]   But I get in trouble of the NameError variety there, because the name 'menuitem' is not defined.  After googling and looking around on Stack Overflow, I got the desired results with a reduce statement:  reduce(list.__add__, map(lambda x: list(x), list_of_menuitems))   But this method is fairly unreadable because I need that list(x) call there because x is a Django QuerySet object.  Conclusion:   Thanks to everyone who contributed to this question.  Here is a summary of what I learned.  I'm also making this a community wiki in case others want to add to or correct these observations.  My original reduce statement is redundant and is better written this way:  >>> reduce(list.__add__, (list(mi) for mi in list_of_menuitems))   This is the correct syntax for a nested list comprehension (Brilliant summary !):  >>> [image for mi in list_of_menuitems for image in mi]   But neither of these methods are as efficient as using itertools.chain:  >>> from itertools import chain >>> list(chain(*list_of_menuitems))   And as @cdleary notes, it's probably better style to avoid * operator magic by using chain.from_iterable like so:  >>> chain = itertools.chain.from_iterable([[1,2],[3],[5,89],[],[6]]) >>> print(list(chain)) >>> [1, 2, 3, 5, 89, 6]


I have two Schengen visas, both multiple-entry, both issues by the Netherlands embassy. One expires on the 30th of September and the other start October 1st. I want to be in Paris from 30th Oct-2Oct. Is it OK to travel?

I currently have a valid multiple entry Schengen visa that expires on Feb 10th (issued by the Spanish consulate). I need to visit the Czech Republic from Feb 9th to Feb 15th. For this, I am getting a visa starting Feb 11th from the Czech consulate as I was advised that I cannot have two simultaneous visas.   Is it possible for me to enter Czech republic on the current visa on Feb 9th, and stay past its expiry up to Feb 15th using the new visa without leaving the Czech Republic? Will there be any likely problem either while entering or exiting Schengen zone (I am entering Schengen in Frankfurt)?


Very important question! My friend Félix and I have a group called "Asteflix Novices". We have no idea if the correct way of spelling it would be "Asteflix' Novices" or "Asteflix's Novices".  I heard at school that words ending in S and X would take only an ' while the rest get an 's, but Félix doesn't believe it's correct. Who is right? What is the correct rule?

Many questions already ask about this topic ( , , etc.) and their answers vary, but they always give exceptions to the apostrophe-s rule, for example:      6.24 The general rule for the possessive of nouns covers most proper nouns, including most names ending in sibilants."   Examples they give include Kansas’s, Ross’s land, and Jones’s reputation. Exceptions include Jesus’  and Moses’.  Which names does this apply to?  Is the Aeneas’  form correct, or is it Aeneas’s instead?


The terminal excerpt is pretty much self-explanatory.  I'm logged in as root (for illustration purposes only!), I want to change ownership of a file on a mounted NTFS partition, and it doesn't work.  I admit it is late, but I'm pretty sure this should have. Any idea what's going on here? root@raspberrypi:/mnt/red/backups# ls -l total 2613 -rwxrwxrwx 1 root root 1359921 Nov 20 01:38 db_2020_11_20.zip root@raspberrypi:/mnt/red/backups# chown -v chris:chris db_2020_11_20.zip changed ownership of 'db_2020_11_20.zip' from root:root to chris:chris root@raspberrypi:/mnt/red/backups# ls -l total 2613 -rwxrwxrwx 1 root root 1359921 Nov 20 01:38 db_2020_11_20.zip root@raspberrypi:/mnt/red/backups#  Added: Note that /mnt/red is an NTFS partition.

I need to mount a ntfs partition and be able to use it with unix file system permissions. The problem is that, when I mount the partition using the following fstab entry, I cannot run chown and chmod successfully. It executes without error, but the file access rights are not changed.  PARTUUID=c3e3b171-d451-44e6-9f17-ffbe9e220dc7   /mnt/mounted_drive  ntfs-3g  defaults,umask=0022,uid=1000,gid=1000,errors=remount-ro,permissions 0 2   When I mount the partition without setting umask, uid, and gid I can use previously mentioned commands successfully.  PARTUUID=c3e3b171-d451-44e6-9f17-ffbe9e220dc7   /mnt/mounted_drive  ntfs-3g  defaults,errors=remount-ro,permissions 0 2   What shall I do to mount the partition properly?


Each element of matrix $M(x)$ is a continuous function of $x$. Does this imply that all the eigenvalues are continuous function of $x$ too?

Given a general matrix $A(t), t>0$, with real entries, I would like to know if the eigenvalues of $A(t)$ are continuous functions of $t$. These eigenvalues may be real or complex.   What about the spectral radius?  A classical result from complex analysis states that the roots of a polynomial vary continuously with the coefficients. Can we use the theorem directly to prove the above? or there are other cases where the eigenvalues are actually discontinuous?  What I'm actually doing is trying to prove that there exists a $t$ for which the spectral radius of $A(t)$ is in $(0,1)$, and I'm doing that by proving that the spectral radius is 1 if $t\rightarrow 0$ and 0 if $t\rightarrow \infty$ (which I already know). Then I would invoke the continuity of the spectral radius to say that there must exist a value of $t$ for which the spectral radius is in $(0,1)$  Thank you.


What would be the best way to cut a old clothes line pipe? Believe it is steel not sure It is very sturdy and old.

I need to dispose of an old swing in my yard. Problem is some screws are so rusty they can't be unscrewed and the whole swing wont's pass the door.   Is there any simple way to cut this thing into a few pieces ? I guess the rods are hollow so perhaps it's not too hard. Any suggestion would be welcome.


When I try to download wine from the software center, there is no install button to click on it only more info, then  a there is a line says that it is available from universe and a use this source button, when I click it nothing happens. Please help me.

How do I get to the Universe Repository in supported versions of Ubuntu?


I know this problem can solve by use combine mkdir and touch commands. But I want to know is there any other solution only use one command.

mkdir -p will create a directory; it will also make parent directories as needed.  Does a similar command exist for files, that will create a file and parent directories as needed?


I'm trying to create a regex in ES6,  with a String Literal, but my solution fails :  var prefix = 'Hello';  var re = /`${prefix}\\s(\\w+)\\s(\\w+)`/; //var re = /Hello\s(\w+)\s(\w+)/; // this works  var str = 'Hello John Smith'; var newstr = str.replace(re, '$2, $1'); console.log(newstr);

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


Let me explain our situation:  We have a web application that uses subdomains for each customer instance:   customer1.example.com customer2.example.com   Every instance can have over 500 users, which all have entered their own email address. We send different kinds of emails to these users. If a newsletter is sent for example, an email has to go out to 500+ users (bulk)(contents are slightly different). But on other occasions we send emails to single users (reset password, reminders...). We also have applications that can 'manage' different instances of our application. From their own application they can send notifications to all users in all their associated application instances (for example 5000 users).  Replying to emails that people receive is not necessary, so we could a no-reply@...... (but then that email has to exist? We have over 13k instances, does that mean 13k no-reply addresses?)  The user receiving the email should see that the email comes from their instance name (customer1).  There is not an email for every instance like mail@customer2.example.com  Currently we are having loads of problems with bounced emails. We are classified as spam, even though we send our emails through SendGrid (shared IP). We are positive that none of the emails that are sent are spam.  How should we send our emails? What sender / from / reply-to.... headers should we use? How can we minimize our bounce rates?

This is a  about how to handle email sent from your server being misclassified as spam.  For additional information you may find these similar questions helpful:                    Sometimes I want to send newsletters to my customers. The problem is, that some of the emails get caught as spam messages. Mostly by Outlook at the client (even in my own Outlook 2007).  Now I want to know what should be done to create "good" emails. I know about reverse lookup etc., but (for example), what about a unsubscribe link with an unique ID?  Does that increase a spam rating?


sudo apt update && sudo apt dist-upgrade  Hit:1 http://ports.ubuntu.com/ubuntu-ports xenial InRelease Hit:2 http://ports.ubuntu.com/ubuntu-ports xenial-security InRelease Hit:3 http://ports.ubuntu.com/ubuntu-ports xenial-updates InRelease Reading package lists... Done Building dependency tree        Reading state information... Done 7 packages can be upgraded. Run 'apt list --upgradable' to see them. Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done'  The following packages have been kept back:  xorg xserver-xorg xserver-xorg-core xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-void xserver-xorg-video-dummy  0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded   When i open update-manager the following comes up:  You don't have the required privileges to perform this action.   I press "Ok", this comes up:  the software on this computer is up to date. However, Ubuntu 18.04.2 LTS is now available (you have 16.04)   i press Upgrade. Nothing happenes.  sudo do-release-upgrade  Checking for a new Ubuntu release Please install all available updates for your release before upgrading.   lsb-release -a  No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 16.04.6 LTS Release:    16.04 Codename:   xenial   cat /etc/apt/sources.list  deb http://ports.ubuntu.com/ubuntu-ports/ xenial main universe restricted multiverse deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security multiverse main restricted universe deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates multiverse main restricted universe   sudo nano /etc/apt/sources.list  deb http://ports.ubuntu.com/ubuntu-ports/ xenial main universe restricted multiverse deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security multiverse main restricted universe deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates multiverse main restricted universe

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.


How can I pin an app so that it can't be upgraded? I have one app where version 2 is not as good or stable as version 1, so I want to pin it at version 1 and not upgrade it .

Some applications update frequently, (like Dolphin Browser), but to my needs the current version is clearly enough, barring a major advance of the application. Some applications (like Slacker Radio) remove earlier functionality via updates, in the interest of cleanliness or to strengthen marketing additional features to a subscriber audience. Slacker Radio specifically moved the look-ahead next artist functionality into their pay version.  So, for me, these are 2 cases for specific updates I would prefer never to perform because I am either happy, or just content. Currently I reject selecting Update-All, since they remain in the list, and update my apps one-by-one. Is there a way to tell Market/Google Play to shield them from the update list on a semi to permanent fashion to prevent them, especially to prevent inclusion in an accidental mass-update?


I'm dynamically trying to create a div which has a content and delete button whenever this 'createaction' button is clicked.  I have an onclick function whenever the delete button is clicked. but my code here does not work, and I think it is because the delete button id is the same.  In what way can i make these buttons unique from each other?  $("#createAction").click(function() {   var targetDate = $("#targetDate").val();   var newAction = "

                         <button type='button' id='delete'> delete</button>
                      Target Date:" + targetDate + "
";   $("#actionPlanInfo").append(newAction);    $("#targetDate").val('');    $("#delete").on("click", function() {     var confirmation = confirm('Are you sure you want to delete this action plan/s?');     if (confirmation == true) {       $(this).parent().parent().remove();     }   }); });

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Since $f(z)$ is holomorphic, I used Cauchy-Riemann equations and got $u_x = v_y ,\ u_y = -v_x$  Then I wanted to check if Cauchy-Riemann equations are satisfied for $\overline{f(\bar{z})}$  It does.  But then I realised that Cauchy-Riemann equations say that if differentiable at $z$, then satisfies CREs at $z$. And not the other way around.  So does that mean basically my proof is wrong? How would I prove this then?  Thanks.

I'm doing a bit of self study, but I'm uncomfortable with a certain idea. I want to show that $f(z)$ is analytic if and only if $\overline{f(\bar{z})}$ is analytic, and by analytic I mean differentiable at each point. Here $f$ is a complex valued function.  What I do is write $f(z)=u(x,y)+iv(x,y)$, where $u$ and $v$ are real functions of two variables. Then $\overline{f(\bar{z})}=u(x,-y)-iv(x,-y)$.  These two forms look very similar, in the sense the one function being differentiable should immediately imply the other is differentiable, since the only thing really changing might be a $-$ sign popping out due to the chain rule.   How can I more rigorously express that $f(z)$ is analytic iff $\overline{f(\bar{z})}$ using this? Many thanks.


Is $\dfrac{0}{0}$ indeterminate with respect to limit only like $\lim_{x\to 0}\dfrac{\sin x}{x}$ or it is indeterminate in general like $\log_1 1$?  I asked this because I encountered indeterminates only in limits, we don't talk about in other areas.  Like $\log_1 1$ can be any real number.

Are $\log_1 1$ and $\log_0 0$ indeterminate forms?  Whenever I ask someone about these indeterminate forms, they deny by saying either $\log$ is neither defined at base $0$ nor at base $1$, or they say $\log$ is a function so these must not be included in fundamental indeterminates.  But, we know division by zero is not defined, yet $0/0$ is indeterminate; and many others. And, actually, $\log$ is more a binary-operator that is the inverse operation of power/exponent operator.


While trollin around the review section, I noticed that I only have 38 edits. I'm very sure that I have edited more than 38 questions - so I was wondering if there is a certain criteria that needs to be met in order for it to count towards the badge?

The descriptions for the editing badges are:     Editor:    Strunk & White:    Copy Editor:    Does "posts" include your own questions/answers, or are these badges just for edits to other people's stuff?  Other questions about how editor badge works:   What if I edit only a question's tags, but not its body? What if I edit both a question's tags and its body? Do edits to Community Wiki posts count? Do edits to answers count? Do edits to tag wiki pages count? Do edits to comments count? (Moderators can edit other users' comments, even outside of the usual five minute window.)


I feel like this is probably already answered somewhere, but I couldn't find it or maybe I'm not using the right keywords.  What I want to do is an initialize a value in a Servlet Filter with as little blocking as  possible. I am by no means an expert in threads, so here is what I came up with:  private static Object getObject() {     if(OBJECT == null) {         synchronized (MyClass.class) {             InputStream is = getInputStream("path_to_file");             OBJECT = loadObject(is);         }     }     return OBJECT; }   This method is used within the Servlet Filter, which will be called by multiple threads at once. I want to make sure that I load this when it is needed, and not on the init method.  My question is, is this thread safe? Once it is initialized I think it'll be good, but I want to make sure that it works when it's being initialized.  PS: Please redirect me to any question that already answers this if they exist. Thanks!

What is an efficient way to implement a singleton pattern in Java?


I'm not quite sure this question fits the format of this site but I try to word it the best I can to comply the rules.  The question is simple: How far can we go talking about the origin of the universe before admitting that the initial conditions cannot be explained without postulating some kind of god-like, physics-unexplainable, force/whatever?  I'm interested to know if there's a mainstream physics theory that aims to prove this.

I've heard this saying before I don't know about anyone else. It says, "What ever was before the Big Bang is something physics can't explain..!   Is this saying true (accurate)?


Could you help me solve this: For projective coordinate system on the line $l$ are given points $A (2,1)$, $B (1,1)$, $C (0,1)$, $A_1 (0,1)$, $B_1 (1,5)$ and $C_1 (2,1 )$. Find a linear transformation where the points $A, B$ and $C$ go respectively at  $A_1$, $B_1$, and $C_1$.  I tryed to solve it but I dont know what to do.  Here is what I tryed:  \begin{equation} ρ_1 * \begin{pmatrix}0 \\ 1 \\ \end{pmatrix} = \begin{pmatrix}m & n \\ p & q \\ \end{pmatrix}* \begin{pmatrix} 2 \\ 1 \\ \end{pmatrix} \end{equation} \begin{equation} ρ_2 * \begin{pmatrix}1 \\ 5 \\ \end{pmatrix} = \begin{pmatrix}m & n \\ p & q \\ \end{pmatrix}* \begin{pmatrix} 1 \\ 1 \\ \end{pmatrix} \end{equation} \begin{equation} ρ_3 * \begin{pmatrix}2 \\ 1 \\ \end{pmatrix} = \begin{pmatrix}m & n \\ p & q \\ \end{pmatrix}* \begin{pmatrix} 0 \\ 1 \\ \end{pmatrix} \end{equation}  2m + n = 0 2p + q = $ρ_1$  m + n = $ρ_2$ p + q = 5*$ρ_2$  n = 2*$ρ_3$ q = $ρ_3$  Is that the right way ? I got some equations for m, n, p, q but I dont think they are right. What should I do now ?

I'm working on a project using Chrome - JS and Webkit 3D CSS3 transform matrix. The final goal is to create a tool for artistic projects using projectors and animation - somewhat far away from using maths... I'm using a projector to project several squares over several shapes - as seen in the picture. What I would like to do is for the user to draw 4 points on the screen (2D x and y) and from there extract a matrix object that I could apply to a regular DIV element of a dimension of 100px by 100px. By finding scaleX, scaleY, rotation, rotationX, rotationZ and probably some perspective that I could apply to the div to relatively match the surface. I'm not really familiar with geometry beyond sin and cos, and 3D in general and don't even know if that is something doable. If anyone could help me get started or point me in the right direction, I would greatly appreciate. Here is an animated gif (click to enlarge), hoping it makes it more clear to understand.


In the code below, how would I return the names of the properties (prop1, prop2, prop3) of the object, myObject?  var myObject = {     prop1: "lorem",     prop2: "ipsum",     prop3: "dolor" };  for (var key in myObject) {     console.log(???); }

How do I enumerate the properties of a JavaScript object?  I actually want to list all the defined variables and their values, but I've learned that defining a variable actually creates a property of the window object.


While I cannot vote when reviewing a low quality post, it is possible to accept it (when it is an answer to your own question). I don't think that's meant this way?

For example,  edit was proposed to an answer to my question. The bug is I see the checkmark when I go to this edit (I can't click checkmark however).


I am going to pursue my Ph.D. in Australia or New Zealand, I don't know if my age can affect my application regarding getting a scholarship. I definitely need a scholarship and stipend to help me to cover my expenses. I am a university lecturer and hold a master's degree in the field of industrial engineering. I am working in the field of mathematical modeling and machine learning.

I just finished my masters studies. My question is, will my age (29) affect my chances of getting a funded PhD position? I finished Bachelor of Engineering when I was 24 (took 6 years to graduate, normally my program was 5 years). I worked as a Lab course assistant (teaching the practical part of the course at a local university) for 2 years before I started my MSc a bit late due to financial reasons. I started working in industry a year ago (for same financial reasons) in a computer science field but irrelevant to the research area. I know that most of PhD scholarship positions officially require the applicant's age to be under 35, but do not they prefer someone who is 25 rather than 34?   I have two conference publications, one in IEEE, and about to send the third for journal publication. My field is computer engineering with a focus on the software side and I am trying to apply in Europe mainly.


I looked at many posts about the use of latexmk, but wasn't able to find what to write in order to satisfy my requirements. Yet I'm sure it is possible, but my skills in Perl amounts to about nothing.  What I would like to do with a file, say mymainfile.tex:   make a format file including the static part of the preamble, named  mymainfile-xelatex.fmt if I use xelatex, and store it in the fmt/ subdirectory of the directory that contains mymainfile.tex (I can do that just with mylatexformat) regenerate the format if the (static part of the) preamble has changed (loading new packages, defining new commands or modifying existing commands).  Compiling mymainfile.tex with the customised format file.   The difficulty for me is point 2), and possibly point 1) — that is, not having to write a first macro to make the format, and the launching latexmk, but preferably that everything be done from latexmk.   Moreover I prefer not to write the static part of the preamble in a separate file, but keep it in mymainfile.tex as usual, and use the \endofdump command from the mylatexformat package  I use MiKTeX 2.9 on WinEdt 7.

I'm using latex on a small netbook, and with average-sized files (~150 pages at the moment) compilation is already pretty slow. So I am looking for every way to speed up the compilation.  In this search, I found  explaining how to "precompile a preamble", or, latexically-speaking, how to make a custom format file. That works fine enough.  But my preamble isn't as static as it should be, I keep adding or modifying definitions in there. To mix the two solutions, at the moment, I use a Makefile together with latexmk, the makefile handling the regeneration of the .fmt file if needed, and latexmk taking good care of the rest.  But I have two problems with this :   integration with emacs to compile the whole document when working on a single file (make needs to be called in the proper directory) latexmk doesn't recompile the file every time the preamble is modified, because it doesn't count as a dependency.   So I'd like to find a way to get rid of this Makefile, and get all the stuff done by latexmk.  I edited my .latexmkrc to include this :     pdflatex = 'pdflatex -fmt main %O %S';  add_input_ext('pdflatex','fmt');  add_cus_dep('tex', 'fmt', 1, 'compilepreamble'); sub compilepreamble {     print "Preamble compiling...\n";     $command = '&.pdflatex ./fmt/preamble.tex\dump';     system("pdflatex -ini -jobname='$_[0]' '$command'"); };      But with this, if the file main.fmt is not present or if fmt/preamble.tex is updated, the main.fmt file won't be regenerated. Actually, in the first case, I get an error from pdflatex saying the it can't find main.fmt format file. So I understand latexmk doesn't even try to build main.fmt, it's probably not a problem in my custom dependency. However, I think I've added everything necessary for this to work.  So... Did I forget something? Is there a way round? Or is it a hopeless quest?


i propose a recursive implementation for checking whether binary search tree is valid:  /*   Return true if binary tree is a binary search tree */ bool BinaryTree::isBinarySearchTree(BinaryTree* tree, int& prev) {     if(!isBinarySearchTree(tree->left, tree->data)) // left          return false;      if(tree->value > prev) // here         return false;     else         prev = tree->value;      return isBinaryTree(tree->right); // right }   i have big doubt on the second check,       if(tree->value > prev) // here         return false;   whats your favorite c++ implementation for this problem?  EDIT  how would you extend to find larger BST in given tree?

I read on here of an exercise in interviews known as validating a binary search tree.  How exactly does this work? What would one be looking for in validating a binary search tree? I have written a basic search tree, but never heard of this concept.


This is my first question on Stackoverflow. Somehow to complete my final year project I refer to Youtube videos.   My problem is:  I want to retrieve profile image from Firebase Database and wanted to  display image on the navigation header (i.e to display navigation header    profile image) and also to display that profile image on my setup activity that I have created.   But after running the app, it keep crashing. Here is the error:  java.lang.NullPointerException at    java.util.Objects.requireNonNull Error.   Logs  2019-01-24 17:55:18.199 6533-6533/academy.learnprogramming.subjoin I/Choreographer: Skipped 11 frames!  The application may be doing too much work on its main thread. 2019-01-24 17:55:18.233 6533-6533/academy.learnprogramming.subjoin I/AssistStructure: Flattened final assist data: 2600 bytes, containing 1 windows, 8 views 2019-01-24 17:55:19.620 6533-6533/academy.learnprogramming.subjoin D/AndroidRuntime: Shutting down VM 2019-01-24 17:55:19.621 6533-6533/academy.learnprogramming.subjoin E/AndroidRuntime: FATAL EXCEPTION: main     Process: academy.learnprogramming.subjoin, PID: 6533     **java.lang.NullPointerException         at java.util.Objects.requireNonNull(Objects.java:203)         at academy.learnprogramming.subjoin.MainActivity$1.onDataChange(MainActivity.java:92)**         at com.google.android.gms.internal.firebase_database.zzfc.zza(Unknown Source:13)         at com.google.android.gms.internal.firebase_database.zzgx.zzdr(Unknown Source:2)         at com.google.android.gms.internal.firebase_database.zzhd.run(Unknown Source:71)         at android.os.Handler.handleCallback(Handler.java:790)         at android.os.Handler.dispatchMessage(Handler.java:99)         at android.os.Looper.loop(Looper.java:187)         at android.app.ActivityThread.main(ActivityThread.java:7025)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:514)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:888) 2019-01-24 17:55:19.636 6533-6533/academy.learnprogramming.subjoin I/Process: Sending signal. PID: 6533 SIG: 9   Block Of Error : MainActivity.java:92  UsersRef.child(currentUserID).addValueEventListener(new ValueEventListener()  {             @Override         public void onDataChange(@NonNull DataSnapshot dataSnapshot)  {             if (dataSnapshot.exists())             {                  String fullname = Objects.requireNonNull(dataSnapshot.child("fullname").getValue(String.class));                 String image = Objects.requireNonNull(dataSnapshot.child("profileimage").getValue(String.class));                  NavProfileUserName.setText(fullname);                 Picasso.get().load(image).placeholder(R.drawable.profile).into(NavProfileImage);              }          }          @Override         public void onCancelled(@NonNull DatabaseError databaseError)         {          }     });

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 haven't seen it expressly stated anywhere but as I've spread my presence around more and more of Stack Exchange it's started to seem to me that there are not separate Meta sites for Stack Overflow specifically and the whole of Stack Exchange generally.  So have I assumed correctly that both general and SO-specific questions belong right here on meta.stackoverflow.com?

Historically this site, , has been the place to ask questions about not just Stack Overflow, but the functioning of the entire Stack Exchange (2.0) network, including Area 51 and stackexchange.com and careers.  (Yes, there was a , but that dealt with the old legacy Stack Exchange 1.0 sites. It was deprecated a while ago, and currently redirects here.)  Now that we've gotten many, many months under our belt from the SE 1.0 days, I think it's time that we gave Stack Overflow its own, true per-site meta, and moved the higher level network meta discussions to meta.stackexchange.com.  Over time, it's begun to bug me more and more that requests for Stack Overflow, the site, kind of get buried here on meta.stackoverflow under the avalanche of network issues. Retag requests, synonym requests, things truly specific to Stack Overflow, the site, not the network. This is unfair to our vastly largest and flagship Q&A site, and it's unfair to the Stack Overflow users to mix their requests in with network level concerns.  It's also odd that Stack Overflow is the only network site without a proper, dedicated per-site meta, where its meta has its own reputation system not tied to the parent site in any way.  This is mostly a quirk of history more than anything else, and I believe it is now an appropriate time to split into two sites:   , a proper per-site meta for Stack Overflow with integrated rep , a global network meta with its own reputation system   Yes, this will be painful. But I believe it is a good, necessary, and healthy step both for the future of the network and the future of Stack Overflow.  Some things to discuss:   which questions should be migrated from here to meta.so? Obviously site-specific things like the retag-requests, and perhaps questions with the  tag. Anything that is 100% wholly specific to Stack Overflow and not generalizable to the rest of the network should be moved over. This may be a pretty small, narrow list of questions, and that's OK. Should we do some meta spring cleaning in our transition? Which questions / tags should be blown away as no longer relevant, referring to ancient versions of Stack Overflow or issues that have long since ceased to exist and aren't instructive for any future visitors? Your meta reps will generally be unaffected, except insofar as we delete for spring cleaning, or move site-specific things to meta.so. We still plan to have a distinct reputation system for the new meta.se site, just like here.   I do not have a timeline for this change, that is up to Jarrod and David to decide. It may be months away. However, we feel pretty strongly that this is something that we need to do to clean things up and pave the way for the future -- so I expect it will happen in the next few months, giving us lots of time to decide how we want to do it, per the above.  Update  .


Prove that $\int_{0}^{\pi /2} \sin(\sin(x))\,\mathrm dx \le 1$  If a function $f$ is Riemann integrable on $[a,b]$, $f$ is bounded on $[a,b]$. If I show $x \mapsto \sin(\sin(x))$ is Riemann integrable then I would know that $f$ is bounded. I can not write $\int \sin(\sin(x)) \mathrm dx$ as a function so, what would I do here?

I recently came across this problem:  Prove that $\int_{0}^{\frac{\pi}{2}} \sin(\sin y) dy \leq 1$.  However, from my understanding, the expression $\sin(\sin y)$ does not have an indefinite integral (). So, how will we go about solving the above problem using just the Riemann sums?


I have this icon in my desktop (Sorry, I am not allowed to post images)  And here I transcribe the information about the error in update Manager.  E: Encountered a package with no header  E:Problem with MergeList /var/lib/apt/lists es.archive.ubuntu.com_ubuntu_dists_precise_main_i18n_Translation-en E:Package lists or status file could not be parsed or opened.   How can I solve this issue? Should I do something or take it easy until it gets fixed by itself?  Thank you

The computer gave me this output in a window:  E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages E: The package lists or status file could not be parsed or opened.   How can I fix this?


For easy typing in Tamil I need Google input tools. I don't know how to install it. I found information about downloading the key from Google's website but downloading was unsuccessful. Cab you help me as am new to Linux?

I would like to type a non-Latin script (Tamil) in Ubuntu 10.10.  I have installed iBUS, added all the Tamil packages in synaptic, and installed Tamil in Languages support and I still can't get it to work.  Any suggestions?


I am using Ubuntu 14.04.1 LTS, x64 architecture, and I specifically need to install . Now I know there are some  on the website which I follow but the same website does not . Can any one please help me with some instructions? Thanks!

I want to install Oracle's JRE and to update to the latest version with the Software Updater when they released. Is there a Ubuntu package that is provided by Canonical or Oracle?  Before release Java 7, I followed  to install Java 6.  But it doesn't work for Java 7. There is no package sun-java7-xxx. How can you install Java 7?


What i know about Anonymous class is when you have any class or interface , and only someof your code need to implement or override some class or interface Anonymously ,it increases the readability of program . But i am Little bit confused suppose in future you need to implement same interface for different class , so in that case you have to refactor you previous class , so is there any other advanrage of Anonymous class ?(Is it improves performance ?)

What is the use of anonymous classes in Java? Can we say that usage of anonymous class is one of the advantages of Java?


I'm using ModelBuilder to iterate through ~800 shapefiles to add and calculate a new field (I'll call it Field_A). Field_A needs to be populated by either Field_B or Field_C, whichever exists. Half of my shapefiles contain Field_B and the other half contain Field_C, but none of the shapefiles contain both.  I tried using the expression: Field_A = !Field_B! or !Field_C! ....but it won't work unless both of those fields are in the attribute table.  How can I get the calculator to recognize whichever field is existing and disregard the other field if it doesn't exist?  (I'm working in ArcMap 10.1)

I have a few dozen feature classes, one of which contains the field I am looking for. They are stored in several different file geodatabases.  Is there a quick way of searching each feature class to find the one that has my field? Or do I have to check each one's attribute table in Catalog? Some of the files have the same names but are stored in separate locations.  I would like to be able to do this inside a Calculate Value tool in ModelBuilder, so that each time I needed to, I could run the model on a single file gdb and it would search through all the feature classes within that gdb and look for the field.   So far, I have a feature class iterator which iterates over all the feature classes in the file gdb recursively. Inside the Calculate Value I have the following code:  findField(r"%Feature%", "%Search Field%")     def findField(fc, fi):   lst = arcpy.ListFields(fc)   for f in lst:     if f.name == fi:       return fc     else:       return "not found"   The returned values are collected in Output Values as strings. The output for all the feature classes has been "not found", even though the field exists in at least 4 of them.


It there any way to check if the system console is displayed on (Windowse Os)?  I would make a custom task progress.

Can we know, with python, if the system console of blender is open? I know that we can open or close it with this function:  bpy.ops.wm.console_toggle()   But it doesn't return the 'state' of the system console like open or closed (True,False).  I want to be sure that the console is open when i execute one of my script.


Wanting to delete a symlink in WSL I accidentally included the -rf option, resulting in WSL deleting the underlying folder on my Windows partition.  Is there any way to recover my data?

What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:


I'm a beginner and i'm trying to modelise a body. I start by the base very low poly but then when i applied the subdivision surface modifier it seems to doesn't apply to the vertices in the middle.

I have a simple skull model, to which I applied the subdivision modifier. For the most part everything works as expected, except I keep getting these weird sharp vertices and I can't seem to figure out how to flatten them.    I'm using Blender 2.8. Is this some kind of feature I can disable/enable for particular vertices? The distance between the sharp vertices and the gray outline differ.    Any suggestions please? Thank you!  EDIT: I also tried selecting as both - vertexes and edges and then applied Edge->Clear Sharp, but nothing changed.


I'm curious as to the big differences in the feel and ride of a hardtail vs a full suspension mountain bike. Also, which types of riding/trails are each better suited for?

I'm considering buying a mountain bike and have narrowed it down to two models (make and model aren't important for this question).  One model is a full suspension bike (front and back), the other is front suspension only.    What are the advantages/disadvantages to going with a full suspension vs front suspension? (I'd prefer answers from people with experience riding both types of bikes.)  EDIT  To answer some of the questions looking for more detail...  The 2 bikes are roughly in the same price range, around $1000 USD (the full suspension is slightly more money), and my plans are to ride it primarily in some single track trails that are in the area.  There will be a lot of hills and rocks and such.  I doubt there will be any on-road riding involved.


I am experiencing a strange rendering/viewport issue with Eevee that I can't seem to find any other posts about anywhere. Here's 2 screenshots, the first one is of a cycles viewport of a scene, and the second is of an eevee viewport of the same scene. The Cycles screenshot:  The Eevee screenshot:  Keep in mind these two screenshots are from the exact same blend file and the only difference between the two images is the engine. Thanks for any and all help.

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


Justification for the purpose and conditions of intended stay was not provided. I was been refused on this basis and I was given appeal in French language to CRRV BP 83699 44036 Nantes CEDEX1 France.  How would I go about this? Thanks.

Schengen refusal formulae can be difficult to understand sometimes.    When an applicant receives a refusal with "Justification for the purpose and conditions of the intended stay was not provided", what does it mean?


I am trying to validate input text field in java by creating an exceptional error if user does not type in the word specified i.e. admin          String username;         int phone1;          @Override         public void widgetSelected(SelectionEvent e) {                       try             {             phone1 = Integer.parseInt(phone.getText());             }             catch (Exception exe)             {                            MessageDialog.openError(shell, "Error","Phone number has to be a number");                 return;             }              try             {             username = namefield.getText();                if (username!= "admin") {                     throw (new Exception());                 }                        }             catch (Exception exe)             {                    MessageDialog.openError(shell, "Error","The username must be admin");                 return;             }               labelresult.setText("The name entered is:"+ username );               labelresult2.setText("The phone entered is:"+ phone1 );   The one for phone works perfectly  What about for username. What should i do?

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?


After upgrade I can't log in. Error message:  Could not update ICEauthority file /home/username/.ICEauthority   This is on a system with 2 partitions. This installation is on /dev/sda5 type ext4. Could this partition be read only? Maybe because of an error? If so, how can I repair this partition? BTW, I can login as guest.  Help highly appreciated...  Update  User login works if I use recovery mode.  Also, the partition is shown as read only. I can change this using the recovery console, but it looks like it changes back to read only if I'm returning to normal boot process out of the console.  I tried to repair the partition with  sudo rack.ext4 -v -f /dev/sda5  ( a command I found somewhere, without really knowing what I'm doing) but the results didn't show an error. –

I often get an error saying      unable to update ICE authority.    Is there a way out of this?


Ok so this is the first time I am answering my own question. I am doing this because I have (until recently) really struggled with this and could not - for love nor money - find a solution online.  I like the 'standard' integral signs (given by \int, and more importantly, the 'standard' double integral signs (given by \iint in LaTeX using the amsmath package. A long time ago, I was creating a document and used these signs (no problem so far). However, a few weeks pass and I suddenly realise that, without my knowledge, all of the double integral signs have changed from the standard ones, to the shorter straight ones:    I had no idea how to reverse the effects or how they came about in the first place.  As it turns out (which I found out only recently) the wasysym package is to 'blame'. Unfortunately, this is really quite a useful package as it turns out. So I had no solution and just accepted that my document will not look as nice as it should. Oh well.  More recently I had the same situation with a new document, but this time I knew a little more about LaTeX so I thought: "No! I am going to solve this problem if it takes me all night!". Well it didn't... it actually took me nearly no time at all.  I simply used the \renewcommand command, changing \iint to mean \int\int.  My Question: Is there a more elegant way of doing this? I have not encountered a problem with my solution as of yet, but I am aware it is a bit of a cheat's way out.

This is my premble to a document and I always get the error LaTeX Error: C ommand \iint already defined.  \RequirePackage{fix-cm} % \documentclass{svjour3}                     % onecolumn (standard format) % %\smartqed  % flush right qed marks, e.g. at end of proof % \usepackage{graphicx} \usepackage{hyperref} \usepackage{caption} \usepackage{array} \usepackage{xfrac} \usepackage{enumitem} \usepackage{wasysym} \usepackage{multirow} \usepackage{amsmath}`   What can I do? Where is the conflict?


Let $X_1,...$ be indepedent rv with common distribution $F(x)$ and $N$ geometric random variable with parameter $p$. $N$ is indepedent from all the $X_i$ . let $M = \max(X_1,X_2,...,X_N)$. Find $P(M \leq x \mid N > 1 ) $ solution sketch We have $$ P(M \leq x \mid N > 1 ) = \frac{P( X_1 \leq x, X_2 \leq x, ..., X_N \leq x, N > 1 ) }{P(N > 1) }$$ $$ = \frac{P(X_1 \leq x )P( X_2 \leq x, X_3 \leq x, ..., X_N \leq x, N > 1 ) }{P(N > 1) } $$ $$ = P(X_1 \leq x ) P( \max( X_2,X_3,...,X_N \leq x  \mid N > 1 ) $$ $$ = P(X_1 \leq x ) P( \max( X_1,X_2,...,X_{N-1} \leq x  \mid N > 1 ) $$ $$ = F(x) P( M \leq x ) $$ My question is: Why can we pull out $P(X_1 \leq x)$?? I mean by this reasoning, we can also do the following $$ P(M \leq x \mid N > 1 ) = \frac{ P(X_1 \leq x) P(X_2 \leq x) ... P(X_N \leq x ) P(N > 1) }{P(N>1) } = F^n(x) $$ Also, in the equality before last one, why is it that $$ P( \max(X_2,...,X_N) \leq x \mid N > 1) = P( \max(X_1,...,X_{N-1} ) \leq x \mid N > 1 )$$ Why can we do this ?

We have $X_1,...$ indepdent random variables with common distribution $F$ and $N$ is a geometric random variable independent of $X_i$'s. Let $M = \max(X_1,...X_N)$. Im trying to convince myself that   $$ P( M \leq x \mid N > 1 ) = F(x) P(M \leq x ) $$  I understand that since $X_1$ is independent of all $X_i's$ and from $N$, when we can pull it out of the probability and we have   $$ P(X_1 \leq x) P( \max(X_2,....,X_N ) \leq x \mid N > 1 ) $$  And then we have  $$ F(x)  P( \max( X_1,...,X_{N-1} \leq x \mid N > 1 ) $$  How does    $$ P( \max( X_1,...,X_{N-1} \leq x \mid N > 1 )  = P( M \leq x ) $$   ??


Let $(X,\tau)$ be a topological space. Recall that a subset $A\subseteq X$ is called regular open iff $A=\mathrm{Int}(\overline{A})$. Obviously it follows from the definition that a regular open set is open (being the interior of something). It is also clear that a clopen set is regular open. Now here's my question:   Suppose that $(X,\tau)$ is a topological space with the property that every open set is regular open. That is, $\forall A\in\tau,A=\mathrm{Int}(\overline{A})$. Does this imply that every open set is also closed?    Clopen sets satisfy the definition of being regular open in a sort of trivial way in that both the interior and closure operators act as the identity. So a topology in which every set is clopen is, a fortiori, a topology with only regular open sets. I was wondering if there is any more interesting example. At the extreme end, one might wonder if there exists a connected topological space in which every open set is regular open (besides the indiscrete topology of course).  The problem is making sure that $\tau$ is closed under union and finite intersections. For example, the interval $(0,1)\subseteq \mathbb{R}$ is regular open, but the open set $(0,1)\cup (1,2)\subseteq \mathbb{R}$ is not because $\mathrm{Int}\Big(\overline{(0,1)\cup (1,2)}\Big)=(0,2)$. Any ideas for a proof/counter-example would be greatly appreciated!

An open subset U of a space X is regular if it equals the interior of its closure, as we learn from the Wikipedia . Furthermore, the regular open subsets of a space (any space) form a complete Boolean algebra.  I'm coming to this from logic and algebra, with not much background in topology. I can't figure out which topologies have "interesting" collections of regular open sets. For example, in the trivial topology and the discrete topology, every open set is regular, if I'm not mistaken. Those are not "interesting" topologies. I assume there are other topologies in which the space X and the null set are the only regular open sets. If so, those aren't "interesting" either, at least not with regard to their regular open ets.  I believe what I'm looking for is topologies in which every open set is regular, other than the ones I've just described.  Thanks for any help.


I wonder is there any difference in how many times I eat per day?  Let's say I eat one big meal in the morning at 2000 Cal (at 9am). Is that any different than having 4 meals at 500 Cal throughout the day (at 9am, 1pm, 5pm, 9pm)?  I think I will be hungry by the end of the day if I eat just once in the morning. But I won't be hungry if I eat 4 times a day at smaller portions? How is that possible? It's still 2000 Calories. Did I just cheat science?  Which way is it better to eat? Maybe twice a day at 1000 Cal? (9am and like 4pm?)  Head scratch.

I wonder if there any difference in how many times I eat per day?  Let's say I eat one big meal in the morning at 2000 kcal (at 9am). Is that any different than having 4 meals at 500 kcal throughout the day (at 9am, 1pm, 5pm, 9pm)?  I think I will be hungry by the end of the day if I eat just once in the morning. But I won't be hungry if I eat 4 times a day at smaller portions? How is that possible?  Which way is it better to eat? Maybe twice a day at 1000 kcal? (9am and like 4pm?)


public class bar {    public bar(list<int> id, String x, int size, byte[] bytes)    {      ...    } }  public class Foo: Bar {     public Foo(list<int> id, String x, someEnumType y):      base(id, x, sizeof(someEnumType), y)     {         //some functionality     } }   As you see in the above code I need to convert someEnumType to byte array type before calling base class constructor. Is there a way to do it? Something like:  public class Foo: Bar {     public Foo(list<int> id, String x, someEnumType y)     {         //someEnumType to byte array         base(...)      } }

If I inherit from a base class and want to pass something from the constructor of the inherited class to the constructor of the base class, how do I do that?  For example, if I inherit from the Exception class I want to do something like this:  class MyExceptionClass : Exception {      public MyExceptionClass(string message, string extraInfo)      {          //This is where it's all falling apart          base(message);      } }   Basically what I want is to be able to pass the string message to the base Exception class.