I have installed a Wordpress site and a phpBB3 forum in the same hosting (site in root and phpBB3 in a folder). Since yesterday, it works very slow. I detected some extrange and new files, and I suppose that somebody hacked my Wp and phpBB. I reinstalled phpBB and now works well. I have pending to reinstall Wordpress.  I can see in /var/logs/httpd/error_log the next message repeated every second: sh: /usr/sbin/sendmail: No such file or directory  How can I know what file is trying to send an email? How can I check for hacked files?  Thank you very much!

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


In mathematical induction,* one first proves the base case, $P(0)$, holds true. In the next step, one assumes the $n$th case** is true, but how is this not assuming what we are trying to prove? Aren't we trying to prove any $n$th case** is true? So how can we assume this without employing circular reasoning?  I am not asking , but how mathematical induction is in accordance with rules of logic that do not admit circular reasoning as valid.*** Specifically, I am asking how, in the second step of induction, one does not assume what one is trying to prove.  In other words, as @ put it below,     how does assuming $P(n)$ differ from assuming $\forall n : P(n)$?   ***=$(P(n))$ or $(\forall n : P(n))$ at this step?***There are some logics that admit circular reasoning, which Aristotle refutes in his , "by showing that circular demonstration is not acceptable".

I have no idea about the underlying theory from which the mathematical induction was derived.  How to prove the mathematical induction is true?


Here is my node, anything wrong? But my authors and addresses do not show. Thanks.   \documentclass[11pt,oneside,english]{amsart}  \usepackage{authblk}  \@ifundefined{showcaptionsetup}{}{%  \PassOptionsToPackage{caption=false}{subfig}} \usepackage{subfig} \makeatother  \usepackage{babel} %\usepackage{csquotes} %\usepackage[style=apa]{biblatex} %\DeclareLanguageMapping{american}{american-apa}  \title{Forming Competitively Balanced Teams}  \author[1]{ABC} \author[2]{DEF}  \affil[1]{School1 \\ Email: abc@school1.edu} \affil[2]{School2\\ Email: def@school2.edu \\ }  \begin{document} \begin{abstract} adfadf \end{abstract}  \section{aaa} \section{bbb}  \end{document}

I am new to the amsart document class. For some reasons \author (etc..) is not showing after I use \maketitle. This is my tex:  \documentclass[12pt,reqno,a4paper]{amsart}  \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsfonts} \usepackage{mathrsfs}  \usepackage{amsthm}  \usepackage{latexsym}  \usepackage{pictexwd} \usepackage{pdftricks} \usepackage{natbib} \usepackage{setspace} \usepackage{color} \usepackage[affil-it]{authblk}  \begin{document}  \title{Temptation, Asymmetric information and Committment}  \author{Mark}  \affil{University of Leicester}  \date{February 2014}  \maketitle  \begin{abstract} To be written \end{abstract}  \section{introduction}  ...  \end{document}   and this is the output:   can anybody help me out?


My daughter is studying abroad over the summer and does not require a Visa. She entered the Schengen area on May 21st and will be leaving it on August 19th, which is 91 days (our bad - her dad and I are meeting her in Italy and traveling to Greece with her and I did not understand the 90-day rule). She is planning to travel to England/Scotland for a few days while in Italy. Can we subtract those days from the original 91 days? Thanks much.

I have searched the web a lot and could not find an answer that fits my situation. Here are two links that are quite contradictory:       My situation:  I've visited Portugal in December 2012 for 29 days on a Schengen visa valid from December 1st, 2012 to February 1st, 2013 for research purposes (I am a Ph.D. student). I want to visit Sweden from February 10th, 2013 to May 10th, 2013 (89 days). I have applied for a Schengen visa again (for research). How will the 90/180 rule work in my situation?


In the Architect scene, on the monitors, when The Architect mentions that Neo loves Trinity and the screens starts showing her, you can see scenes that will be shown within next 2 min - Trinity is fighting Agent.   This can't be previous versions of the Matrix as the previous ones didn't have Trinity (I think?). Hmmm, now that I think about it, Trinity could have been in previous versions and everything could have played out same way on all versions of the matrix. Just in previous ones Neo didn't love Trinity... But then many things would have played out differently in original Matrix movie, and only Neo was engineered... Any thoughts?

At the end of his speech, the Architect explicitly states that Trinity is going to die and there is nothing Neo can do to prevent this.  The door to your right leads to the Source, and the salvation of Zion. The door to the left leads back to the Matrix, to her, and to the end of your species. As you adequately put, the problem is choice. But we already know what you're going to do, don't we? Already I can see the chain reaction, the chemical precursors that signal the onset of emotion, designed specifically to overwhelm logic, and reason. An emotion that is already blinding you from the simple, and obvious truth: she is going to die, and there is nothing that you can do to stop it.  Even though Neo saves Trinity at that instant, she dies only the next day, and Neo returns to the Source and to the salvation of Zion. The only difference is that Neo rejected choosing 16 females and 7 males to construct a new Zion. The Architect has full knowledge of everything that is going to happen within the Matrix. His knowledge includes emotions as well, in spite of his inability to understand them. Thus, there is no way he cannot know Neo is going to save Trinity, yet he still states she is going to die. One assumption might be him bluffing to goad Neo to go to the Source, however, he also states he is incapable of lies and deceptions as well.  I have your word? What do you think I am? Human?  So, my question is, how did the Architect know that Trinity will die outside the Matrix?


How do I prove that $n<2^n$ for any natural number $n$, assuming basic facts about the algebra of exponents?

Show that $2^n>n$ for $n\in \mathbb{N}$   I can solve this by mathematical induction. Is there any other method to solve.


I'm having an issue with if-statements that are encapsulated in while loops, in summary the if-statements are not recognising whether the stated condition is true or not (according to my trouble shooting steps) but the condition should definitely be met.  Here is a list of what works (therefore they should be left out):   The DB Connection.  The initial SQL select statement  The while loop retrieves all database coloumn and row valus as excpected  The Try/Catch block and its exception handling. Executing SQL statements inside the while loop but before any if-statement.   My most recent trouble shooting step is what led me to identify where the issue is occurring. The two variables "ValueInBox" AND "ProductName" always has the expected value which means that any of the first three if-statemnet should be executed as their condition is true! But it doesn't produce an excpected output :(  How do I know you may ask?!?!? if look at my last if statement, this is the only one that executes, and it prints out the value of the variables on the consol window as shown in the screen shot below:    As you see from the screen shot that according to the value of the variables, those first three if-statements should execute, but nooo no matter how much time I try to reason with these if-statements they go on strike and demand a pay rise :(  Im sure i missed out on something realy stupid and small, Thanks!  public void actionPerformed(ActionEvent arg0) {     try {         Connection conn=DriverManager.getConnection("jdbc:ucanaccess://h:/AgentsDataBase.accdb");         Statement s = conn.createStatement();         String stmnt = "SELECT *  FROM WishListProducts WHERE ProductStatus = Yes";         ResultSet rs = s.executeQuery(stmnt);          String ValueInBox = AddRemoveWishlistProductTF.getText();         //stmnt = "DELETE FROM WishListProducts WHERE ProductName ='Penguin'";         //s.executeUpdate(stmnt);          while (rs.next()) {             String ProductName = rs.getString("ProductName");              //stmnt = "DELETE FROM WishListProducts WHERE ProductName ='Penguin'";             //s.executeUpdate(stmnt);             if (ProductName == ValueInBox ) { // if it exists within the DB                              stmnt = "DELETE FROM WishListProducts WHERE ProductName ='Penguin'";                 s.executeUpdate(stmnt);             }             else if(ProductName == "Penguin") {                 stmnt = "DELETE FROM WishListProducts WHERE ProductName ='Penguin'";                 s.executeUpdate(stmnt);             }             else if(ValueInBox == "Penguin") {                 stmnt = "DELETE FROM WishListProducts WHERE ProductName ='Penguin'";                 s.executeUpdate(stmnt);             }             //System.out.println("val in box" + ValueInBox);             //System.out.println("Val in DB" + ProductName );}             else if (ProductName != ValueInBox) { // if it does not exist                 System.out.println("val in box" + ValueInBox);                 System.out.println("Val in DB" + ProductName )              }            }         s.close();     }        catch(Exception e) {         e.printStackTrace();     }  }

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?


The Mobile feat states that:     When you make a melee attack against a creature, you don’t provoke opportunity attacks from that creature for the rest of the turn, whether you hit or not.   Does that include melee spell attacks like green-flame blade or even steel wind strike?  So let's say you are surrounded by enemies and you cast steel wind strike and attack everyone around you. can you then safely walk out without provoking opportunity attacks?

The  spell says:     The spell captures some of the incoming energy, lessening its effect on you and storing it for your next melee attack. You have resistance to the triggering damage type until the start of your next turn. Also, the fist time you hit with a melee attack on your next turn, the target takes an extra 1d6 damage of the triggering type, and the spell ends.   The  cantrip says:     Lightning springs from your hand to deliver a shock to a creature you try to touch. Make a melee spell attack against the target. You have advantage on the attack roll if the target is wearing armor made of metal. On a hit, the target takes 1d8 lightning damage, and it can’t take reactions until the start of its next turn.   If I absorb fire damage with absorb elements, would I be able to add an extra 1d6 fire damage to my next shocking grasp attack?


So my dad boiled ribs this morning, and it was left on the counter for like 14 hours and I said its probably not safe to eat cause they say after 2 hours you shouldn't eat it, but they said cause it was in water and  not exposed outside of the water its still good and I find that to be hard to believe.

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


It really frustrates me and I can't disable it! Automatic Maintenance seems to take forever and reaches 80% in CPU usage or more, if it's ran automatically it stops as soon as I touch the Touchpad but if I run it manually it'll never finishes!  What does it do exactly and is it necessary for it to be enabled to let Windows 8.1 Pro's Optimize Drive feature TRIM my SSD regularly ? I hope Automatic Maintenance does not try to Defragment anyway, because that'd be stupid considering Optimize Drive (previously called : Disk Defrag) is AWARE that I'm using an SSD and uses TRIM instead.  Also, is there a way to disable Automatic Maintenance anyway, it really frustrates me in the night when the fan starts spinning too loud when I leave the computer on. I'm a power user and I run Windows Update and can clean my computer manually.  UPDATE: I'm also asking whether one of Automatic Maintenance tasks is defragmenting directly or it'll execute the "Optimize Drive" application ? this is an important thing.  UPDATE: I am still looking for an answer and solution to this problem! I believe it's not a duplicate because I "Disable “automatic maintenance” in Windows 8" does NOT work, therefore a solution has yet to be found for disabling this "Automatic Maintenance" thing, which is still annoying me everyday when I leave my computer standby for lunch.

I'm running a few VMs, and suddenly I noticed my CPU fan was spinning louder than usual. I tracked it down to Windows 8 doing some "automatic maintenance":      How can I turn this completely off? I found a way to set the time, but not a way to turn it off completely.


Alright I'm trying to display data called by an api on a recyclerview and I get the error. It has nothing to do with butterknife I think. Please help.     Caused by: java.lang.NullPointerException: Attempt to invoke virtual   method 'void   androidx.recyclerview.widget.RecyclerView.setLayoutManager(androidx.recyclerview.widget.RecyclerView$LayoutManager)'   on a null object reference           at com.example.myflickrproject.PhotoDisplayView.onCreate(PhotoDisplayView.java:40)   public class PhotoDisplayView extends AppCompatActivity { //implements AdapterView.OnItemClickListener     @BindView(R.id.recView)     RecyclerView rViewDis;      @BindView(R.id.addToDatabse)     Button download;      @BindView(R.id.backButton)     Button goBack;       @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_photo_display_view);         System.out.println("My photolist is " + DataCollection.photoList);         rViewDis.setLayoutManager(new GridLayoutManager(this, 3));         PhotoAdapter myAdapter = new PhotoAdapter(this, DataCollection.photoList);         rViewDis.setAdapter(myAdapter);         ButterKnife.bind(this);      }        @OnClick({R.id.addToDatabse, R.id.backButton})     public void onClick(View v) {         int btns = v.getId();         switch (btns) {             case R.id.addToDatabse:                 addToDatabse();                 break;             case R.id.backButton:                 backToMenu();                 break;           }     }      public void addToDatabse() {      }      public void backToMenu() {         Intent intent = new Intent(this, MainActivity.class);         startActivity(intent);     } }

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 am using Ubuntu 16.04 on an intel cpu with a gtx1050 gpu.  The GPU option in Kdenlive is grey-out, I have to install the moveit library in order to make the use of a GPU available.   However,  apt-get install moveit   has no effect,  so I googled for a tutorial on how to install it,  there were a few and they had different names after apt-get install and had further commands,  more complicated than a simple apt-get install command.   I tried them all, but with no positive result.

my system:    intel cpu gtx 1050 ti ubuntu suite 16.04 kdenlive 4:15.12.3-0ubuntu1  (got this with dpkg -l, think it is the version)   The GPU option in Kdenlive is greyed out, I read I have to have the movit-library (libmovit4) installed in order to enable the GPU option. Strangely, the movit library is already installed.


I'm wondering if anyone can help me out. I'm trying to carry out a viewshed analysis of wind farms and single turbines on a region of the UK. I have the landform data as well as the coordinates of around 1,600 turbines, I'm looking to create a 3D map, plot these turbines on the map and carry out a viewshed analysis to determine what area is suffering from the highest level of visual impact.   I am using ArcGIS Desktop 10.2.1.

I am trying to understand viewshed analysis in ArcGIS 10.1.  After you add fields such as RADIUS1, AZIMUTH1 to your observer vector attribute table, does it automatically calculate visible/non-visible areas within the specified radius and azimuth? Or do you have to use a different tool?    What I really need to find out is the areas visible from each monument location (including whether the monuments themselves are visible to each other, if they are close), in such a case what would be the best way to approach this?   Also, is it necessary to always convert xy coordinates of sites (already added as File Geodatabase Feature Class) to Observer points using observer points tool? I am only asking because for some areas, I have more than 16 monuments and I think you can only have a max of 16 observation points.


Note:  This is NOT a duplicate of  question.    The Question:  Find all primes $p$ such that $\phi(x)=x^{13}$ is a homomorphism $\Bbb Z/p\Bbb Z \rightarrow \Bbb Z/p\Bbb Z$    My Thoughts:  OK, so now I understand that I am supposed to find all primes $p$ such that  $$(x+y)^{13} \equiv x^{13}+y^{13} \pmod p \quad \forall \; x,y \in \Bbb Z/p\Bbb Z$$  I expanded out the binomial to get  \begin{align} \ & \iff \sum_{k=0}^{13}C_k^{13}x^ky^{13-k} \equiv x^{13}+y^{13}\pmod p \quad \forall \; x,y \in \Bbb Z/p\Bbb Z \\ \ & \iff 13x^{12}y+78x^{11}y^2+\cdots+78x^2y^{11}+13xy^{12} \equiv 0 \pmod p \quad \forall \; x,y \in \Bbb Z/p\Bbb Z \end{align}  Clearly, $p=13$ is a solution. But $p=2$ also works, just by inspection.  How can I prove that there is no other solution?

The Question:  Find all primes $p$ such that $\phi(x)=x^{13}$ is a homomorphism $\Bbb Z/p\Bbb Z \rightarrow \Bbb Z/p\Bbb Z$    My Thoughts:  So from what I understand  \begin{align} \ & \phi:\Bbb Z/p\Bbb Z \rightarrow \Bbb Z/p\Bbb Z \quad\text{is a homomorphism} \\ \ \iff & \phi(xy) \equiv \phi(x)\phi(y) \pmod p \quad \forall \; x,y\\ \ \iff & (xy)^{13}\equiv x^{13}y^{13} \pmod p\quad \forall \; x,y \end{align}  But isn't $(xy)^{13}\equiv x^{13}y^{13} \pmod p\quad \forall \; x,y$ always true, regardless of $p$?  Or is there something I am not understanding?


As you may know, I'm working on designing a "lightbox" that will contain 3 high intensity metal halide bulbs - consuming a total of 1600 - 2200 watt. The purpose of the box is to generate ~40,000 lux of light in an area that's 24 inches by 24 inches.  The box is meant to open/close in 1 minute intervals. This will be accomplished through a series of "microcontrollers" and "servo" motors. The box will open from the front (the "door") and be lifted upward through the servo motor.  While the box is closed, no light will be emitted. While it is open, the goal is to cause as much light as possible to escape from the box. For this purpose, another series of "servo" motors will cause the bulbs to move forward slightly out of the box (closer to the subject).   The box will be built out of wood and the dimensions of the box will be about 18 inches, by 12 inches by 12 inches.  This is all background information. My main concern (and the reason for this post) is about "draining" the heat from the box so that the wood doesn't catch on fire.  Currently (based on several suggestions from SO members), I will be taking the following precautions:   I will be placing a 240 CFM fan UNDER the box to filter out the heat.    My question is about this is: How much can I expect the wood to heat up in 1 minute with such a fan present?  Furthermore, I want to design the box so it can last for 15 and 30 minute open/close phases as well - how much more would   the wood heat up in 15/30 minutes compared to 1 minute?  If this would present a problem, would using a 400 CFM fan eliminate the problem? If not, would using 1 CFM fan on bottom (of 240 CFM) and another on top (of 100 or 240 CFM), help to enhance air flow and reduce heat  in the box?   To protect the wood from heat/fire I plan on spraying . Will this help? Is it enough or are there other "coatings" I should apply? I plan on coating the inside with a  like substance to project as much light as possible. Will this cause the wood to absorb more heat or less? (I assume less..) Is there any other way to "fire proof" the wood (without converting it into metal which would cost $1,000 +) or perhaps my entire design is flawed?   Another question: Part of the plug from the bulb will be inside the box (around 8 inches) - will the heat damage the plug (which will be made from plastic I presume)?  As a side note, someone will be present whenever the bulbs are on so if there is a fire it will be seen. My primary goal is to avoid a fire in the first place but perhaps more importantly I want to avoid significant damage to the wood..

I am creating a custom box that will contain 3 * 400 watt metal halide bulbs (1200 watt total). The box will remain closed for 60 minutes, open for the next 60 minutes, then closed, then open and so on.. for a period of 10 hours. The box will open/close from the the front panel (the "door") using Arduino and Servo motors.   Since the bulbs will be generating a lot of heat I will attach a Duct Fan at 240 CFM on top of the box (is the top the best place to put it?). Something like this:   The box itself will be made out of wood so I will coat it with a heat resistant spray from the inside so it doesn't catch on fire. Something like this:   When the box is open I will need the box to emit as much light as possible. Therefore, I will coat the inside with a reflective substance (something like this: ) so all light rays are dispersed from the box..  What do you think?  Thanks


Solve the equation $28^x = 19^y+87^z$, where $x,y,z$ are integers.   This is related to Beal's conjecture (and it turns out there are no integer solutions to the equation), but I am wondering how to first prove there are no integer solutions when $x,y,z$ are positive integers. For positive integers we can use the following argument:  Taking the equation modulo $19$ gives $28^x-(19^y+87^z) \equiv 9^x-11^z \equiv 0 \pmod{19}$. Thus, since the complete set of residues of $9^x$ modulo $19$ is $\{9,5,7,6,16,11,4,17,1\}$ and the complete set of residues of $11^z$ modulo $19$ is $\{11,7,1\}$. Therefore, $x = 3+9k_1$ and $y = 2+3k_2$, or $x = 6+9k_1$ and $y = 1+3k_2$, or $x = 9+9k_1$ and $y = 3+3k_2$ where $k_1, k_2 \in \mathbb{N}_0$.  How can we complete this argument and also extend it to all integers?

Solve the equation $28^x = 19^y+87^z$, where $x,y,z$ are integers.   I am confused how to find solutions for all integers and not just positive ones. How should we do that?


I want to store 3 properties of 1000 rectangles. I can do that in two different ways. I can use a structure or an array, but I try to find out which solution uses least memory. Here the code:  struct Figure {     unsigned int color;     virtual void foo() {} };  struct Rectangle : public Figure {     unsigned int width,height; };  int main() {     Rectangle r[1000];     unsigned int r2[1000][3]; //This take less memory, The first entry is rectangle number                         // the next is color, width and height std::cout<<"Type name is "<< typeid(r[0]).name() <<sizeof(r2)<<" "<<sizeof(r)<<std::endl; return 0; }   The output is:  Type name is 9Rectangle12000 24000  As you can see an array of objects of a structure uses twice as much memory as a plain array. Why is it so? I expected that an array of structures in my case would use more memory because of the polymorphic structure, but not that much.

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


How can I make ceramic material like this?

How can I make one of the vinyl toy plastic material like this?    Video:


I'd like to edit a JPG texture in an external image editor. To do this accurately, I'd like to export an image showing the outline of my UV map, that I can trace over in the external editor. I'm using Blender 2.73, the mesh is unwrapped, I'm looking at it in the UV editor.

I have a 3D truck model already textured and properly imported into Blender. This is a game model and I need to "re-paint" with design from other transport companies. The problem is that I don't have a UV layout (skin template) to serve as a guide for future paintings.  Is there a way to "extract" an UV Layout to .JPG or .PNG to serve as guide for .DDS texture editing?  Please note that I don't want to remap the model. I still want to use the actual UV Mapping and just need to edit the actual textures.


Let $M$ be an $R$-module, and $N$ be it's submodule.  I need to prove that if both $M/N$ and $N$ are finitely generated, then so is $M$.  How to prove it? Don't have any ideas at the moment.

I know this must be easy. I'm new to modules, so perhaps I must be missing  something important.     Let $M$ be an $R$-module. Show that if there exists a submodule $N$ such that $N$ and $M/N$ are finitely generated, then $M$ is finitely generated.   If the exact sequence $0 \longrightarrow N \longrightarrow M \longrightarrow M/N \longrightarrow 0 $ (where the second and third arrows are inclusion and projection respectively) splits then $M$ would be isomorphic to the direct sum of $M$ and $M/N$ and the conclusion would follow (I think). But I can't show that it splits.  Thank you.


Well, I was studying laws of indices and the following steps came to my mind  $(-1)^{\frac {1}{2}}$  = $(-1)^{\frac {2}{4}}$  = $((-1)^{2})^{\frac {1}{4}}$  = $1^{\frac {1}{4}}$  = $1$  This is very strange, but I cannot find the mistake. In fact, $\frac {1}{2}$ and $\frac {2}{4}$ represent the same rational number and so the first step is alright. My second step is also correct as that is the definition. The remaining steps are also true. I'm confused!

Following from  question, I came up with another interesting question: What is  $(-1)^{\frac{2}{3}}$?  Wolfram alpha  it equals to some weird complex number (-0.5 +0.866... i), but when I try I do this: $(-1)^{\frac{2}{3}}={((-1)^2)}^{\frac{1}{3}}=1^{\frac{1}{3}}=1$.If it has multiple "answers", should we even call it a "number"? Because if we don't, it would be a bit different from what we were taught in elementary school. I actually thought if it doesn't have a variable in it, it should be a number.  I'm a bit confused. Which one is correct and why? I would appreciate any help.


Let $f,g$ be Riemann integrable on $[0,1]$ such that $\int_0^1 f=\int_0^1 g=1$. Show that there exists $0\leq a<b\leq 1$ such that $\int_a^b f=\int_a^b g=\frac{1}{2}$.  If there is only one function $f$, it is easy. What about two functions?

Let $f(x)$ and $g(x)$ be two continuous functions on $[0,1]$ and  $$\int_{0}^{1}f(x) dx= \int_{0}^{1}g(x)dx = 1$$   Show that there exist  $[a,b]\subset [0,1]$, such that  $$\int_{a}^{b}f(x) dx= \int_{a}^{b}g(x)dx = \frac{1}{2} $$  The question can be solved by considering the fundamental group of $S^1$, now I am wondering if we can solve it by real-analysis.  Here is the topological solution:  Assume that for any $[a,b]\subset[0,1]$, we always have  $$(\int_{a}^{b}f(x) dx\neq \frac{1}{2}) \quad \vee \quad(\int_{a}^{b}g(x)dx \neq \frac{1}{2}) $$ Consider mapping $$\phi:D\rightarrow\mathbb{E}^2\backslash\{(\frac{1}{2},\frac{1}{2})\},\,\,(x,y)\mapsto(\int_{y}^{x}f(t) dt,\int_{y}^{x}g(t) dt)$$ where $D=\{(x,y)|0\leq x\leq y\leq 1\}$.  Let $a$ be path from $(0,0)$ to $(0,1) $in $D$ and $b$ be path from $(0,1)$ to $(1,1) $in $D$, then $ab$ is a path from $(0,0)$ to $(1,1) $in $D$ and $$\phi\circ (ab):[0,1]\rightarrow\mathbb{E}^2\backslash\{(\frac{1}{2},\frac{1}{2})\} $$ Notice that $$(\phi\circ (ab))(0)=(\phi\circ (ab))(1)=(0,0)$$  so $\phi\circ (ab)$ is a loop based on $(0,0)$ in $\mathbb{E}^2\backslash\{(\frac{1}{2},\frac{1}{2})\}$.  For any $t\in [0,\frac{1}{2}]$, it's not hard to get that $$(\phi\circ (ab))(t+\frac{1}{2})=(1,1)-(\phi\circ (ab))(t)$$ is equivalent to $$(\phi\circ (ab))(t+\frac{1}{2})-(\frac{1}{2},\frac{1}{2})=-((\phi\circ (ab))(t)-(\frac{1}{2},\frac{1}{2}))$$  Define retraction  $$r:\mathbb{E}^2\backslash\{(\frac{1}{2},\frac{1}{2})\}\rightarrow S^1,\quad (x,y)\rightarrow\ \frac{(x,y)-(\frac{1}{2},\frac{1}{2})}{||(x,y)-(\frac{1}{2},\frac{1}{2})||}$$  Then $r\circ \phi\circ (ab)$ is a loop on $S^1$, such that $$(r\circ \phi\circ (ab))(t+\frac{1}{2})=-(r\circ \phi\circ (ab))(t),\quad\forall t\in [0,\frac{1}{2}]$$  So $<r\circ \phi\circ (ab)>$ is not trivial in $\pi_1(S^1)$.   However, $ab$ is path homotopic to $c$ in $D$, where $c$ is the path between $(0,0)$ and $(1,1)$ in $D$. In this case, $r\circ \phi\circ (ab)$ is a point-path in $S^1$ by $$(\phi\circ c)(t)=\phi(t,t)\equiv (0,0)$$  which leads to contradiction.


I have a group of three adventurers and one member of the party is leaving the group permanently. No worries, it's all on good terms and we're getting someone else to replace them. My concern is that my group can be fairly volatile, meaning that players come and go somewhat frequently, and I'm not sure what the best way would be to handle their magic items. I could just allow the remaining players to pick through the magic items that belonged to the player who is leaving, but that could cause balance issues if my player count dwindles and they are loaded with unnecessary magic items. Not to mention it doesn't really make sense for a character to just give up all of their most valuable possessions just because they are retiring from adventuring. On the other hand, I don't think it would be right for me to rob the party of the hard earned loot that they ALL risk their hides for. Does anyone know if there are guidelines for this scenario, or do you have any advice?

A player left my group recently. It was mutual and not-unexpected, and during the last session, the character left for an unspecified purpose.  The character (lawful-good wizard) who left had a few magic items:   A powerful necromantic artifact. An evil necromancer's spellbook. Miscellaneous scrolls & potions   These items were not an integral part of the story, and I feel OK letting them disappear together with the character. Since the player was a little problematic, I don't want the focus of the next sessions to deal with his character - I would like the spotlight to be on the players who remain.  However, It seems my players feel they are missing out on the monetary value of these items and wish to sell them to the highest bidder.  I would love some advice on how to handle the wizard's inventory and some generic advice on how such cases are usually handled in-game.


I have a list of strings which has got some characters in it.   On viewing it in HTML viewer I get the following    I tried line.Replace() to remove some special characters but it doesn't work.

How can you strip non-ASCII characters from a string? (in C#)


How can I configure the terminal to display the current git branch?  I'd like to see the second line rather than the first:  andy@bob:~/my_projects/project_x$  (master)~/my_projects/project_x$   I don't want to have to run git status to see which branch I am currently on anymore!

I am using  to show the branch name in gnome terminal (Ubuntu 15.10) when working in a git repository. Based on the above I now have the below in my ~/.bashrc file:  # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt #force_color_prompt=yes    ...  # Add git branch if its present to PS1 parse_git_branch() {  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' } if [ "$color_prompt" = yes ]; then  PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ ' else  PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ ' fi unset color_prompt force_color_prompt   As a result I now get:    so it works. But why has the coloring of my user@host been removed? And I would also expect that the branch name should be colored. Before it looked like this:    UPDATE: I have now tried this guide instead:    adding this to .bashrc:  parse_git_branch() {      git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "   and that works:    Notice in .bashrc I also have this (default):  # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt #force_color_prompt=yes   I have yet to find the reason why that snippet gives the correct result and the other version does not. Any input on this?  Here is the version of my .bashrc that has the old snippet enabled that does not work:


Suppose $M$ is a smooth manifold and $U$ is an open neighborhood of $p\in M$, let $\{X_1,\ldots,X_n\}$ be vector fields defined in $U$ such that for every $q\in U$ the set $\{(X_1)_q,\ldots, (X_n)_q \}$ is a basis for $T_qM$. I want to find out under what conditions is it possible to find a chart $(V,\phi)$ around $p$ such that $V\subset U$ and $$(*)\quad (X_i)_q=\frac{\partial}{\partial\phi^i}\Bigr|_q\quad \text{ for } i=1,\ldots,n\quad \text{ and every }q\in V$$ Here is my attempt of the situation. Let $(W,\psi)$ be some chart around $p$, now we can write $X_i$ in componentsas $$X_i=\sum_j X_i^j\frac{\partial}{\partial\psi^j}$$ We want a map $\phi:W\to \mathbb{R}^n$ that satisfies $(*)$ in its coordinates, the coordinates $(X_i'^j)$ are given by the chain rule as $$(X_i'^j)=\sum_k\frac{\partial \phi^j}{\partial \psi^k}X_i^k $$ We thus would need that $$\frac{\partial \phi^j}{\partial \psi^k}=\frac{1}{(X_i^j)}\delta_k^j$$ Hence, the obvious problem is that $X_i^j$ may be zero, how could one circumvent this? Is what I am trying to do even possible?

Every smooth chart $(U,\phi)$ on a smooth manifold $M$ determines a smooth local frame $U \to TM$ on the tangent bundle, namely $(\partial/\partial x^i)$, where $(x_i)$ are the coordinate functions of $\phi : U \to \mathbb{R}^n$. But is the converse true? Namely, given any smooth local coordinate frame $(\sigma_i) : M \supset V \to TM$, can we construct a chart such that the $\sigma_i$ are partial derivatives of the coordinate functions?


When I was using ubuntu 14.04, it's easy to set title. Just press F2 or move mouse to top menu. But there is no menu on ubuntu 16.04 and press F2 can't change the title. What should I do?

I have several instances of terminals running in my working environment, what I would like is to set a specific title for each one, in order to have a clear idea what purpose the specific terminal serves i.e. Apache, editing_ini, postgres etc...  Of course from the command line.


This might be a technical question or maybe there's a better way of approaching the area but what is the best interaction for asking users to select either an unknown or the specific items.

I have noticed that many online forms and surveys these days are starting to use a mixture of radio and checkbox buttons for the same question, that is, for a question that gives the person a number of choices, you can either make a selection from radio buttons or checkbox buttons.         – Wireframes created with   Although it looks a little bit confusing to start with, it is not too difficult for the user to realize that the buttons behave as they should (option A or a combination of option 1-3). However, to me this feels like designs are starting to rely on the interaction to indicate the behaviour to the user rather than going back to good structure and logic used in the question.   Is the argument that because Design A saves the user one extra click that it is a 'more efficient' design? I think the amount of time saved on the extra click is not as much as the time spent on understanding what the options are, so Design B still seems to be a more efficient design overall. It also makes changes easier to implement because the logic is clearer. I hope this is not actually a trend I am noticing here, or if it is then I am looking for the rationale behind it.


I'm currently programming an app which is a bluetooth controller for an Arduino  robotic arm.  When I press the button 'Start' (b7), it is supposed to enable bluetooth. But the app stops and in the logcat, i get:  "Attempt to invoke virtual method 'java.util.Set android.bluetooth.BluetoothAdapter.getBondedDevices()' on a null object reference".  here is the code:  package trombertlabs.essai1;  import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothSocket;  import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ImageButton; import java.util.Set;  import java.io.IOException; import java.io.OutputStream; import java.util.UUID;  public class MainActivity extends ActionBarActivity {      ImageButton b, b0, b1, b2, b3, b4;     Button b5, b6, b7;       BluetoothAdapter bA;      @Override      protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);          b = (ImageButton)findViewById(R.id.upbb);         b0 = (ImageButton)findViewById(R.id.upba);         b1 = (ImageButton) findViewById(R.id.downba);         b2 = (ImageButton)findViewById(R.id.downbb);         b3 = (ImageButton)findViewById(R.id.leftb);         b4 = (ImageButton)findViewById(R.id.rightb);         b5 = (Button)findViewById(R.id.closeb);         b6 = (Button)findViewById(R.id.openb);         b7 = (Button)findViewById(R.id.startb);          b7.setOnClickListener(new View.OnClickListener(){             public void onClick(View v){                  BtInterface();             }         });      }          public void BtInterface () {          if (!bA.isEnabled()) {             bA.enable();         }          else {         }       }        @Override     public boolean onCreateOptionsMenu(Menu menu) {         getMenuInflater().inflate(R.menu.menu_main, menu);         return true;     }      @Override     public boolean onOptionsItemSelected(MenuItem item) {         int id = item.getItemId();          if (id == R.id.action_settings) {             return true;         }         return super.onOptionsItemSelected(item);     }   }   Actually, there are 'imports' and buttons that are unused, but this is for the rest of the project.

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?


Take some subset $S \subset \mathbb{Z}$ where $|S|=n$ and $n \ge 3$. Show $\exists  \ x ,y \in S$ distinct with $x-y \equiv 0 \mod n-1$.  Let $A = \{a_i\}_{i=1}^{n}$ First case (all elements are congruent to $0 \mod n-1$ ) If $a_i \equiv 0 \mod n-1 \quad \forall i \in (1,n)$, then $a_i - a_j \equiv 0 \mod n-1 \quad \forall i \neq j , (i,j) \in (1,n) \times (1,n)$. Second case (one element is congruent to $0 \mod n-1$ ) If $\exists  \ ! \ a_i \ |  \ a_i \equiv 0 \mod n-1 $, then $\exists \ a_j , a_k \ | \  a_j \not\equiv 0 \mod n-1 $ and $a_k \not\equiv 0 \mod n-1$ for $j\neq k$. But here I am stuck because $a_i - (a_j \lor a_k) \not\equiv 0 \mod n-1$ and also, $a_j -a_k \not\equiv 0 \mod n-1$, suggesting that my idea is fundamentally wrong or I am missing some ingredient for this proof. Indeed, for instance let $a_i = 6$, $6 \equiv 0 \mod 3$, let $a_j = 4$, $4 \equiv 1 \mod 3$ and let $a_k = 5$ ,$5 \equiv 2 \mod 3$, then none of $a_i-a_j$ or $a_j-a_k$ or $a_i - a_k$ are congruent to $0 \mod 3$ I feel like I am on the right track by separating in possible cases ,but the inconsistency outlined above suggests that my approach is erroneous and I have no other ideas on how to solve this problem, does anyone have any hint on how to solve this problem ?

Prove that among any 100 integers there are always two whose difference is divisible by 99. How can I prove this?


I rendered a png file which has appeared as with a box where the smoke should be. There's also a screenshot of the materials setting selected which does show the smoke. Whats going wrong here?        I don't think I have any materials for the emitter? The smoke is created from the quick effects menu.

I am trying to render smoke in cycles, but the relevant blender  is designed for Bender Internal. I have everything set up except for the material.  I imagine you would set up the material nodes something like this:    But the problem is that there is no Voxel Data texture node, ans I am not sure what kind of shader should be used.  Is smoke in Cycles simply not supported yet? Or do I need to go about this a different way?   Reference:


I have a dropdown list with a lot of values and I want to give the users the option to filter these values with a search input field, something like this:    So if the user types chicken in the search input field dropdown will only contain meals that contain the word chicken. However I don't think this is good user experience, what do you guys think? any alternative suggestions?

I'm trying to design a widget which is a dropdown single selection containing a very large set of data. Because there could be 2000 records in the dropdown. Loading them at once will make the system very slow. So below is my first path. This widget is used to select an option in the database.  By default, it looks just like a dropdown. When users click in the field, the dropdown list will open and a cursor will appear in the field. The 2000 options are divided into pages and that's why you see the pagination at the bottom.    When people type in the field, it will filter/auto-suggest matching results. The total number will reduce to 1000. If people also use the filter on the search result, it will reduce to 50.   However, I'm not sure if the pagination is really helpful to people who want to pick an option. I don't think they'll ever use pagination when there are 1000 of them. The reason I keep it here is because sometimes people might not know what to type in the field...  Here is another option: Add a "More" button at the bottom and get rid of pagination. Any thoughts, comments or suggestion?


For the function: $f(x)=5x^3-10x$ we find the zeroes to be: $x=0, \sqrt{2}$, and $-\sqrt{2}$ However... If you let $a=\sqrt{2}$ or $-\sqrt{2}$ in $5a^3-10a$ Desmos evaluates and says either of those equal $3.5527136788*10^{-15}$ (NOT $0$)!!! Am I doing something incorrectly or is this Desmos' fault? Image:

Can someone explain to me this error of the Desmos graphic calculator? Why ? For other values of $x$, the exact value of $f(x)$ is obtained.  Or am I wrong when I assure that $f(\sqrt2)=0$?


I've looked everywhere but can't find how to activate wireless networking. WLAN0 appears not to be working or activated.   Thanks  PS:Too Short?  Edit: Already tried that answer. Has not worked. The output of ifconfig is:  enp5s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500     inet 10.0.0.16  netmask 255.255.255.0  broadcast 10.0.0.255     inet6 fe80::223:5aff:fed9:7a72  prefixlen 64  scopeid 0x20<link>     ether 00:23:5a:d9:7a:72  txqueuelen 1000  (Ethernet)     RX packets 118  bytes 9321 (9.3 KB)     RX errors 0  dropped 0  overruns 0  frame 0     TX packets 78  bytes 8089 (8.0 KB)     TX errors 0  dropped 0 overruns 0  carrier 3  collisions 0  lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536     inet 127.0.0.1  netmask 255.0.0.0     inet6 ::1  prefixlen 128  scopeid 0x10<host>     loop  txqueuelen 1000  (Local Loopback)     RX packets 713  bytes 56816 (56.8 KB)     RX errors 0  dropped 0  overruns 0  frame 0     TX packets 713  bytes 56816 (56.8 KB)     TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0  wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500     inet 192.168.1.150  netmask 255.255.255.0  broadcast 192.168.1.255     ether 00:24:2c:67:8a:a0  txqueuelen 1000  (Ethernet)     RX packets 0  bytes 0 (0.0 B)     RX errors 0  dropped 0  overruns 0  frame 0     TX packets 0  bytes 0 (0.0 B)     TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0   EDIT 2 I'm kinda an ubuntu noob. Thanks 4 ur patience. :) Output of sudo lshw -C network is  *-network    description: Wireless interface    product: BCM4312 802.11b/g LP-PHY    vendor: Broadcom Limited    physical id: 0    bus info: pci@0000:02:00.0    logical name: wlan0    version: 01    serial: 00:24:2c:67:8a:a0    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless    configuration: broadcast=yes driver=b43 driverversion=4.10.0-19-generic firmware=666.2 latency=0 link=no multicast=yes wireless=IEEE 802.11    resources: irq:18 memory:f0300000-f0303fff  *-network    description: Ethernet interface    product: AR8132 Fast Ethernet    vendor: Qualcomm Atheros    physical id: 0    bus info: pci@0000:05:00.0    logical name: enp5s0    version: c0    serial: 00:23:5a:d9:7a:72    capacity: 100Mbit/s    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd autonegotiation    configuration: autonegotiation=on broadcast=yes driver=atl1c driverversion=1.0.1.1-NAPI ip=10.0.0.16 latency=0 link=no multicast=yes port=twisted pair    resources: irq:27 memory:f0200000-f023ffff ioport:a000(size=128)   And iwconfig is  wlan0     IEEE 802.11  ESSID:off/any         Mode:Managed  Access Point: Not-Associated   Tx-Power=20 dBm          Retry short limit:7   RTS thr:off   Fragment thr:off       Power Management:off   Edit 3: A start job is running for raise network interfaces (-----/5m 34s)or something like that. Mean anything to you?

I just installed Ubuntu 14.04 Server and cannot get wifi configured correctly to work with WPA2 personal and could use some help.    There was a simple wizard during install where I selected my SSID from a list and entered my passphrase and that worked great.  Now that the install is done I am having trouble configuring wifi.  My Access Point is setup to WPA2 Personal TKIP or AES. Any advice would be greatly appreciated.  I have been messing around with WPA supplicant ant my /etc/network/interfaces file with no luck.  Thanks


I have trouble reading the following simplex heatmap.    Description of the figure: Consider a three-label classification problem. Simplex corners indicate where one label has very high probability, with the opposite edge showing the probability range for the other two classes when that label has very low probability. Simplex centers represent a uniform posterior distribution.  I understand that the three sides are analogous to three axes (one for each label), and that, say, at the bottom-right vertex, the probability of one label is 1 while the probability of others is 0. However, I can't figure out how to interpret a point in the interior or on an edge of the simplex. For example, what are the values of the three probabilities for a point on the mid-point of the left edge, or for the point at the intersection of the dotted line originating at 0.2 on base and that originating at 0.8 on the left edge.  My failure to visualize this representation seems to be stemmed from the fact that 3-dimensional data is represented in 2 dimensions, that too with non-orthogonal axes.  Image taken from   P.S. For now, ignore the actual heatmap (i.e. the intensity of color at some point). Also, I am not sure if this question should be asked here or at Maths-StackExchange

I'm reading from a book that introduces the Dirchilet distribution and then presented figures about it. But I was not really able to understand those figures. I attached the figure here at the bottom. What I don't understand are the meanings of the triangles.  Normally when one wants to plot a function of 2 variables, you take the value of var1 and va2 and then plot the value of the function value of those two variables ... which gives a visualization in a 3D dimension. But here there are 3 dimensions and one other value for the function value so it makes a visualization in 4D space. I can't understand those figures!   I hope someone can clarify them please!  EDIT: here is what I don't understand from figure 2.14a. So we have drawn from K=3 dirichlet a sample theta (which is basically a vector) that is: theta = [theta1, theta2, theta3]. The triangle plots [theta1, theta2, theta3]. The distance from the origin to each theta_i is the value of theta_i. Then for each theta_i it put a vertex and connected all three verteces and made a triangle. I know that if I plug [theta1, theta2, theta3] into dir(theta|a) I will get one number which is the joint probability of the vector theta. I also understand that the probability for continuous random variables is a measure of an area. But here we have 3 dimensions so the joint probability will be the measure of the volume of the space from the pink plane and under ... i.e the pyramid. Now I don't understand what is the role of the triangle here. What is it trying to communicate or visualize?


Is it possible to use a Prepared Statement in MSSQL (not PDO) placeholder in a LIKE statement in combination with a "%"?  I played a little bit with the code and ended up with this:     WHERE column LIKE ?%    and the parameter is "test1_" so I want to get all results for "test1_%"  But it doesn't work

Here's my attempt at it:  $query = $database->prepare('SELECT * FROM table WHERE column LIKE "?%"');  $query->execute(array('value'));  while ($results = $query->fetch())  {     echo $results['column']; }


From my reading, I have understood examples a diatomic molecule to be $\rm N_2$ or $\rm O_2$, however, the below seems to suggest that $\rm N_2O_2$ is also diatomic. Is this correct and can someone please explain?  My answer for the below question was 6 degrees of freedom (3 translational, 3 rotational, not high enough temperature for vibrational).     Q. The main components of air are $\rm N_2$ and $\rm O_2$. Assume that we can approximate air as only made from these two gasses.   At room temperature how many degrees of freedom does air have? State what type of movement (vibrational, rotational and translational) each of these degrees of freedom corresponds to.      Ans. This is a diatomic gas at approximately room temperature. It has 5 degrees  of freedom. 3 of these degrees of freedom correspond to the translational  movement of the particles (one in x, one in y and one in z direction) and 2  correspond to the rotational movement of the molecules (abut the two axes  perpendicular to the line joining the two atoms).

I was reading about the equipartition theorem and I got the following quotations from my books:  A diatomic molecule like oxygen can rotate about two different axes. But rotation about the axis down the length of the molecule doesn't count. - Daniel V. Schröder's Thermal Physics. A diatomic molecule can rotate like a top only about axes perpendicular to the line connecting the atoms but not about that line itself. - Resnick, Halliday, Walker s' Fundamentals of Physics.  Why is it so? Doesn't the rotation take place that way?


Prometheus starts with the finding of the cave paintings of a star map. Shaw and Holloway had interpreted it as an invitation.  In the further action it occurs that the place pointed to by the map was actually a military base with ships full of mass destruction weapons pointed to Earth.  Why would the engineers show humanity the way to their weaponry?

Dr. Shaw (and her boy friend) told the crew of Prometheus in their presentation that Engineers left - as far back as 35,000 years - clues as to the location of their planet in the form of a star pattern in images found all over the globe.     "They want us to find them" - Dr. Elizabeth Shaw     When they researched the pattern, they found LV-223.  Except that:   LV-223 was NOT their home planet, it was their secret military base dedicated to project "Kill 'em all!" The base on LV-223 looked to be a temporary installation from 2000 years ago, NOT a permanent colony from 35,000+ years ago (I don't have canon proof, just the impression I got from the movie).   It seems like the wrong place to leave directions to on both accounts.  Is there some canon explanation (movie detail I missed, interviews/deleted scenes) that explain this seeming contradiction?


Recently I took a test where I was given these two limits to evaluate: $\lim_\limits{h \to 0}\frac{\sin(x+h)-\sin{(x)}}{h}$ and $\lim_\limits{h \to 0}\frac{\cos(x+h)-\cos{(x)}}{h}.$ I used sine and cosine addition formulas and found the value of each limit individually, eventually canceling out $\sin x\cdot \frac1h$ and $\cos x\cdot \frac1h$ because I learned that we can evaluate limits piece by piece. As a result, I got $\cos x $ and $-\sin x$ as my two answers. However, my teacher marked it wrong saying that we cannot cancel $\sin{x}\cdot\frac1h$ or $\cos{x}\cdot\frac1h$ because those limits do not exist. Can someone please explain why this doesn't work? I thought that we can cancel those limits out since we never look at $0,$ just around $0,$ when evaluating these two limits.  Sine: $$\frac{\sin(x+h)-\sin(x)}h=\frac{\sin(x)\cos(h)+\sin(h)\cos(x)}h-\frac{\sin(x)}h$$  $$=\sin(x)\frac1h+\cos(x)-\sin(x)\frac1h=\cos(x)$$  Cosine: $$\frac{\cos(x+h)-\cos(x)}h=\frac{\cos(x)\cos(h)-\sin(x)\sin(h)}h-\cos(x)\frac1h$$  $$=\cos(x)\frac1h-\sin(x)\cdot1-\cos(x)\frac1h=-\sin(x)$$  Note: I am allowed to assume $\lim_\limits{x\to 0} \frac{\sin(h)}h=1,\lim_\limits{x\to 0} \frac{\cos(h)-1}h=0.$

How can one prove the statement $$\lim_{x\to 0}\frac{\sin x}x=1$$ without using the Taylor series of $\sin$, $\cos$ and $\tan$? Best would be a geometrical solution.  This is homework. In my math class, we are about to prove that $\sin$ is continuous. We found out, that proving the above statement is enough for proving the continuity of $\sin$, but I can't find out how. Any help is appreciated.


I'm using 13.10 right now. And I'd like to upgrade to 14.04, but I can't seem to. I've tried update manager, and even the iso, but realized I'd need a CD for that. Is there I can upgrade to 14.04 from 13.10?  Also, I've seen elsewhere that 14.04 will have a final release on the 26th, is that true?

What are the different ways I can use to upgrade Ubuntu from one release to another?


I discovered an interesting bug in the HNQ list just now.    The title of a Money SE question is .  It displays in the HNQ list incorrectly, however; notice how part of it is italicized, and the dollar signs are not displayed:

Related to  and .  This :    looks like this in the 'Hot Network Questions' section of e.g. :    I think Latex formatting of question titles should be disabled if the question comes from a site that don't use Latex formatting.


I am a Serbian national, living in the Netherlands. I traveled to Iran for business once and thus have an Iranian visa in my passport. I will likely need to travel to USA for work as well. Will the Iranian visa/stamp be a problem?

I am a seafarer (marine engineer) and I have to often visit different countries. This time I received my sign-off from Iran and they stamped my passport. Would this cause a problem for getting a US C1D1 visa since my next company wants me to have this visa? I am an indian national.


I have an interface which is implemented by 4 different classes. Now, I want to call a setter method of one of the classes through the reference of this interface. The class is decided at run time, and the interface doesn't contain any methods or variables. So how can I set the value of private variables of one of those classes? I provide you the sample of code.  public interface InterfaceClass { }  public class ClassOne implements InterfaceClass{     private String name;      public void setName(String name) {         this.name = name;     } }  public class ClassTwo implements InterfaceClass {     private String name;      public void setName(String name) {         this.name = name;     } }  class CaalingClass {     String className = "ClassOne";// the value of the string is decide at the run time     InterfaceClass i = (InterfaceClass) Class.forName(className).newInstance();     i.setName("ABC"); //this gives an error     /*      * I know it should be ((ClassOne) i).setName("ABC"); but at runtime i      * don know which class is to be called so is there any other way to      * find or it has to be done in this fashion?      */ }

So lets say I have this interface:  public interface IBox {    public void setSize(int size);    public int getSize();    public int getArea();   //...and so on }   And I have a class that implements it:  public class Rectangle implements IBox {    private int size;    //Methods here }   If I wanted to use the interface IBox, i can't actually create an instance of it, in the way:  public static void main(String args[]) {     Ibox myBox=new Ibox(); }   right? So I'd actually have to do this:  public static void main(String args[]) {     Rectangle myBox=new Rectangle(); }   If that's true, then the only purpose of interfaces is to make sure that the class which implements an interface has got the correct methods in it as described by an interface? Or is there any other use of interfaces?


I have an old GT-S6310N (aka Samsung Galaxy Young). I don't want to buy a new phone, because they are kinda useless for me. I use my computers for everything I do. I use my phone only a few times a year to navigate with GPS or to call somebody, but even navigation seems to be broken now. A friend asked me to develop a project, which involves a small Android service polling from the background, so I need a phone to test it while developing. She has Android 8, so I thought maybe it is possible to upgrade my phone to that version too. Last time I tried to upgrade the OS was many years ago and as far as I remember even Android 5 was not allowed. I am curious about the whys and if there is a solution to this? Rooting and maybe bricking is something I can risk. I just don't understand that how are these new Android versions not compatible with old phones, when Linux is usually backwards compatible and Android is Linux based... It just depends on the drivers and resources right?

I have a Samsung Galaxy Young (S6310), which I'm re-tasking to play with as a secondary, mini-tablet (with no cellular access i.e. no SIM card inside, just wifi for internet access). My issue is space available on the device for applications, data, etc.  I don't want to use an SD Card, because the one which was in this phone has already been moved to a new phone. Plus, I don't want to buy a new SD card, because the point of this exercise, for me, is to see if (without spending any money) I can take this already-four-year-old phone and get several more years out of it.  I've already removed old pictures/videos on it, old messages, rooted it to remove some unnecessary Samsung and Telstra bloatware, etc. But I'm still not having a whole lot of internal memory available, so my next step (unless I'm missing something which would make the next step unnecessary?) is flashing a different ROM onto the phone. I used CyanogenMod in the past on a different phone, so I'm thinking I might try out LineageOS, CyanogenMod's successor. However, herein lies where I got stuck.  Checking out the download page for , after expanding the Samsung models on the left, I can't see the Galaxy Young or its model number in the list of devices at all.  Am I correct, and a ROM for the Samsung Galaxy Young is not available/supported by LineageOS? And if so, could I use a different ROM instead?  For the latter question, I'm assuming "no", but asking anyway in case the answer is actually more along the lines of "not really, but you could, with certain risks".


If we are in a free fall which implies we are accelerating at 9.8 m/sec every sec. And let's say that we are falling into a pit that has enormous depth. So isn't this be possible that we may accelerate and surpass the magnitude of speed of light?

In Newtonian mechanics, if we throw an object in against direction of gravity with speed $v$ and it achieve max height of $h$. Now if we allow object to fall from that height $h$, it will eventually attain speed $v$ when it reach position where we launch it.   Now applying same idea to a black hole in general relativity. Speed require to escape black hole gravity is greater than $c$, so if we throw something into black hole with almost the speed of light, the object speed will exceed speed of light $c$ before hitting black hole surface! How relativity explain this? Can space-time curvature reduce speed of this freely falling object from attaining speed of light?


public class ActivateServiceResources {    list<user> lstuser = [Select id,IsActive from user where IsActive = True];   list<ServiceResource> lstservice = [select id,RelatedRecordid,Isactive from serviceresource where RelatedRecordid IN:lstuser];  list<serviceresource> SRlist = new list<serviceresource>();  for (serviceresource SR:lstservice)     {         if (SR.Isactive != True)             {                 SR.Isactive = True;                 SRlist.add(SR);             }     }  update SRlist;  }

I have the below code:  public class CallOutForGet {      HttpRequest request=new Httprequest(); http http=new http(); request.setEndPoint('https://th-apex-http-callout.herokuapp.com/animals'); request.setmethod('GET');  HttpResponse response=http.send(request);  if(response.getStatusCode()==200){      Map<String,Object> results= (Map<String,Object>)JSON.deserializeUntyped(response.getBody());      List<object> animals=(List<object>)results.get('animals');     System.debug('Received Animals************');     for(object anim:animals){         System.debug(anim);     } }  }   This error at line -  request.setEndPoint('https://th-apex-http-callout.herokuapp.com/animals');  says expecting right parenthesis.


I have an application that uploads a file via SFTP using sftpuser. Once the file is uploaded the owner and group is user1:user1. The owner of the parent directory is apache:apache. I can not figure out how the file is being associated to user1.  Any thoughts on where I should look or how to resolve this issue? I would like the file to inherit the owner/group and permissions from the parent directory.

I am having a problem with permissions on a Linux server. I am used to BSD. When a directory is owned by a group the user who owns it isn't in such as www-data, files created in it will be owned by that group. This is important because I want files to be readable by the webserver (which I will not run as root) but so a user can still put new files in the directory. I can't put the users in www-data because then they can read every other users websites.   I want the webserver to read all websites, I want users to be able to change their own.  The permissions are set like this on the folders at the moment....  drwxr-x--- 3 john www-data 4096 Feb 17 21:27 john   It is standard behavior on BSD for permissions to work this way. How do I get Linux to do this?


Let me start with introducing concepts of what acc pt and lim pt are.  Adherent point of X is the point whose every neighborhood contains some points of X.  And limits point of X is the point whose every neighborhood contains some points of X distinct from the given point.  I already know that X is closed if and only if it contains all its adherent points or  It contains all its limit points.  At the definition of limit, we usually use the concept of limit point.   Then why we need concept of adherent point?  It seems to me that it suffices to define limit or some other concept with limit point.  It looks redundant to have adherent point.  Although I know that they are very different concept from each other, I cannot see the reason why we need adherent point.  Could you help me to explain why we need such concept?  Thank you for your kind reply in advance.

I want to clarify the definition of limit point and accumulation point.   According to many of my text books they are synonymous that is $x$ is a limit/accumulation point of set $A$ if open ball $B(x, r)$ contains an an element of $A$ distinct from $x$.  But from one of the problems in Aksoy: A Problem Book in Real Analysis says:  Show that if $x \in (M,d)$ is an accumulation point of $A$, then $x$ is a limit point of $A$. Is the converse true?  So what is the definition?


When he moves in a circular motion very fast, there are large G-Forces acting on his body, even while he is wearing his suit.  This is similar to being in a G-Force simulator.                                  or like when you are in car that is turning left very fast.  Does his suit have ability to protect him from this G-Force? If it does, how does it work ?

Tony's suit is an engineering marvel, and they explain many facets of the technology to help give legitimacy to the special powers, abilities and weapons it has.  I never read the Iron Man comics, but in the movie they really don't have a technological explanation for how he miraculously seems to be unaffected by crushing G-forces of sudden acceleration, the inertia of sudden stops and hair-pin turns, and especially the blunt force trauma from getting smashed in the face with Thor's hammer.  Certainly it appears the suit takes punishment, but Tony always remains unscatched, never a collapsed lung, broken bone or even a bloody nose.  In my infantile understanding of theoretical physics, the same technology that would be used to counter G-forces and sudden blunt force trauma to the body inside would be the very same technology used for  which in my honest opinion would be a much more stunning technological achievement than his heralded Arc Reactor.  Was their ever an explanation proferred for this and if so was it indeed attributed to Anti-Gravity?


I would like to create a folder in my OPT directory on Ubuntu 14.04. However, it must have the following requirements:   Can not be deleted by ANYONE, even root. ReadOnly access to ALL users (except nobody) Write access ONLY by my user (test-user). Root shouldn't be able to write.


There are lots references to completely changing a specific folder's icon with a custom one (Properties | Customize | Change icon).  What I want is, for a specific folder, embed a custom icon onto the default folder icon so that the end-user still knows that it is a folder.  The desired effect is similar to the system folders, like Documents, Pictures etc. shown here:    Here is a mock-up of what I am after:    This is for Windows 10 but I am hoping that it is possible to do this in Windows 7+.  Update: I am not looking for a programmatic solution or one that affects all folders that meet a certain requirement.  Rather, similar to how it is possible to completely change one specific folder's icon, I want to do that for a specific icon but keep the folder icon too.

Just like Dropbox does, I'd like to show if a file is backed up using the icon overlay. How could this be done, without human intervention and regarding a specific computer so it doesn't have to be distributable.  This question regards only how to add/change this icon small overlay, not how to check if the files are backed up.  I am aiming at Windows 7 at the moment.


The question states... Let $\phi: G \to G$ be a homomorphism with the map $\phi(g)=g^2$. Prove $\phi$ is abelian.  So far I have:  Let $g$ and $h$ be in $G$. Then $\phi(g)=g^2$ and $\phi(h)=h^2$. Since we know it is a homomorphism,  $\phi(gh)=\phi(g)*\phi(h)=g^2*h^2....$  But I don't know how to make a connection that they're abelian. I want to show $\phi(gh)=\phi(hg)$ eventually right?

I'm working on the following problem:     Let $G$ be a group. Prove that $G$ is abelian if and only if   $\varphi(g) = g^2$ is a homomorphism.   My solution: First assume that $G$ is an abelian group and let $g, h \in G$. Observe that $\varphi(gh) = (gh)^2 = (gh)(gh) = g^2h^2 = \varphi(g)\varphi(h)$. Thus, $\varphi$ is a homomorphism.  I'm having trouble completing the proof in the reverse direction. Assume that $\varphi$ is a homomorphism. We then know that $\varphi(gh) = \varphi(g)\varphi(h)$ and $\varphi(hg) = \varphi(h)\varphi(g)$. However, I don't see a way to use this to show that $gh = hg$.  Could anyone lend a helping hand?


I'm trying to install ST-Link v2, but i ran into a error.    this error seams to affect more issues, like the Ubuntu Software center. nor can i install:   sudo apt-get install libusb-1.0-0-dev sudo apt install git   i tried the usual stuff:  sudo apt-get -y update && sudo apt-get -y upgrade && sudo apt-get -y autoremove   aswel the recommended:  apt-get -f install   but nothing seams to work out.      The following packages have unmet dependencies:  libdbus-1-dev: Depends: libdbus-1-3 (= 1.12.2-1ubuntu1.1) but 1.10.6-1ubuntu3.4 is installed libgdk-pixbuf2.0-dev: Depends: libgdk-pixbuf2.0-0 (= 2.36.11-2) but 2.36.11-2 is installed                       Depends: libglib2.0-0 (>= 2.48.0) but 2.48.2-0ubuntu4.4 is installed                       Depends: gir1.2-gdkpixbuf-2.0 (= 2.36.11-2) but 2.32.2-1ubuntu1.6 is installed                       Depends: libglib2.0-dev (>= 2.37.6) but 2.56.4-0ubuntu0.18.04.4 is installed                       Depends: libpng-dev (>= 1.6) but it is not installed                       Depends: libpng-dev (< 1.7) but it is not installed libglib2.0-bin: Depends: libglib2.0-0 (= 2.56.4-0ubuntu0.18.04.4) but 2.48.2-0ubuntu4.4 is installed libglib2.0-dev: Depends: libglib2.0-0 (= 2.56.4-0ubuntu0.18.04.4) but 2.48.2-0ubuntu4.4 is installed                 Depends: libglib2.0-bin (= 2.56.4-0ubuntu0.18.04.4) but 2.56.4-0ubuntu0.18.04.4 is installed                 Depends: libglib2.0-dev-bin (= 2.56.4-0ubuntu0.18.04.4) but 2.56.4-0ubuntu0.18.04.4 is installed                 Depends: libpcre3-dev (>= 1:8.31) but 2:8.39-9 is installed libproxy1-plugin-gsettings: Depends: libc6 (>= 2.15) but 2.27-3ubuntu1 is installed                             Depends: libgcc1 (>= 1:3.0) but 1:8.3.0-6ubuntu1~18.04.1 is installed                             Depends: libglib2.0-0 (>= 2.45.3) but 2.48.2-0ubuntu4.4 is installed                             Depends: libproxy1v5 (= 0.4.15-1) but 0.4.11-5ubuntu1 is installed                             Depends: libstdc++6 (>= 5.2) but 8.3.0-6ubuntu1~18.04.1 is installed python3-distutils: python3-lib2to3: systemd: Depends: libaudit1 (>= 1:2.2.1) but 1:2.8.2-1ubuntu1 is installed          Depends: libcap2 (>= 1:2.10) but 1:2.24-12 is installed          Depends: libcryptsetup4 (>= 2:1.4.3) but 2:1.6.6-5ubuntu2.1 is installed          Depends: libsystemd0 (= 229-4ubuntu21.22) but 237-3ubuntu10.29 is installed udev: Depends: libudev1 (= 229-4ubuntu21.22) but 237-3ubuntu10.29 is installed   thnx in advance

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 want to buy a new MacBook Pro. However, it simply MUST be able to have a different operating system to Yosemite installed, as I need it to work with some hardware which is no longer supported with Yosemite.  Would it be possible to downgrade a new Macbook?  Thanks

Due to battery backups not working properly in Yosemite, I need to downgrade a machine to Mavericks. Unfortunately, this is a brand new Mac Mini and it shipped with OS X 10.10.0 installed.   I read various questions here, as well as some articles from other websites, and created a Mavericks 10.9.5 installer on a USB stick. I can boot from this USB stick on an iMac we have here, but the Mac Mini will not allow me to.   Is it even possible to run Mavericks on this machine--Macmini7,1?


I have a array of Strings "String[]" with certain values. I want to pass that array dynamically to SQL "IN" clause something like:  Select * from Employee where emp_name in (?);   Here "?" has to replaced with String Array. I want to do this in Java Class. I tried with   Array array = conn.createArrayOf("VARCHAR", new Object[]{"1", "2","3"}); pstmt.setArray(1, array);   But it is not working and getting exception "SQLFeatureException".  Thanks!!!

What are the best workarounds for using a SQL IN clause with instances of java.sql.PreparedStatement, which is not supported for multiple values due to SQL injection attack security issues: One ? placeholder represents one value, rather than a list of values.  Consider the following SQL statement:  SELECT my_column FROM my_table where search_column IN (?)   Using preparedStatement.setString( 1, "'A', 'B', 'C'" ); is essentially a non-working attempt at a workaround of the reasons for using ? in the first place.    What workarounds are available?


I have a method      public void splitXmlFile()     {         string[] line = Regex.Split(inputText.Text, "\n+");         progressStt.Maximum = line.Length;         progressStt.Step = 1;         foreach (string q in line)         {             progressStt.performStep();             if (Regex.IsMatch(q, "<[^>]*>"))             {                 if (Regex.IsMatch(Regex.Split(q, "<[^>]*>")[0], @"\s"))                 {                 }                 string[] gettag = Regex.Split(q, "(<.*?>)|(.+?(?=<|$))");                 foreach (var gettag1 in gettag)                 {                     if (Regex.IsMatch(gettag1, "<[^>]*>"))                     {                     }                     else                     {                         if (Regex.IsMatch(gettag1, @"\w"))                             listXml.Add(gettag1);                     }                 }             }             else             {                 if (Regex.IsMatch(q, @"\w"))                     listXml.Add(q);             }         }         progressStt.Value = 0;     }   Create new thread:     Thread t1= new Thread(new ThreadStart(splitXmlFile)); t1.Start();   But when i start i had i exception in line:  string[] line = Regex.Split(inputText.Text, "\n+");   I think it can come in:  progressStt.Maximum = line.Length;             progressStt.Step = 1; progressStt.performStep(); progressStt.Value = 0;   I can't fix it's, What should i do??

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


In attempting to install a mod for Minecraft,I have accidentally deleted the bin folder in .minecraft .If someone could tell me how to fix that,thanks.I've tried deleting/redownloading the game,but that does not work either.

The other day I was trying to download something for Minecraft and it involved my bin folder. So I was looking for it and couldn't find it. I then thought that I might have accidentally deleted it, but didn't find it in the trash. I have no idea how to get the bin folder back with all the Minecraft binary files in them.


i'm trying to simply create a method that returns a 2D array that has all the values entered based off a given pattern. Eclipse says that my code doesn't have any errors, yet when I go to run I get the response "[[I@2a139a55". I googled it and learned what it was about, yet I still don't know how to fix my code.   public class Transpose {  public static int[][] createPatterned2DArray(int row,int column){     int width = column;     int height = row;     int[][] array = new int[height][width];      for (int i = 0; i < height; i++)     {         for (int j = 0; j < width; j++)         {             array[i][j] = i + j + (width * i);         }     }      return array;  }  public static void main(String[] args) {       System.out.print(createPatterned2DArray(3,5));   }  }

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


I heard - (from an official MtG judge) - that Wrath of God ("Destroy all creatures") destroys creatures with the Shroud ability, because it doesn't target a single creature, it targets all creatures.   Is this really true? In my opinion it is very illogical.

Note: this is intended to be a canonical question about whether or not a spell or ability targets so there are multiple sub-questions.   Can Hexproof or Shroud save my creature from ? What about a  that was cast for it's Overload cost? Does shroud prevent me from using the Monstrosity ability of a creature, or from giving it more counters with Proliferate? Can I cast an Aura Enchantment on one of my creatures with Shroud, or an opponent's creature with Hexproof? Or can I use the Equip ability to attach an equipment to one of my creatures with Shroud? Will 's ability trigger when my opponent plays ? And will I have to sacrifice my  if my opponent casts ? Will Shroud or Hexproof prevent an opponent from choosing me with 's ability? Will Hexproof keep one of my creatures from being affected by ? If an Aura or Equipment is attached to a creature with Hexproof, does the Hexproof protect the attached permanent?


I have windows 7 as primary OS. In past year I installed Ubuntu 14.04 from live USB. I don't use Wubi. Now I have to increase the partition /dev/sda6 size of Ubuntu.  user:~$ df -h Filesystem      Size  Used Avail Use% Mounted on /dev/sda6        16G   15G  275M  99% / none            4,0K     0  4,0K   0% /sys/fs/cgroup udev            3,9G  4,0K  3,9G   1% /dev tmpfs           785M  1,2M  784M   1% /run none            5,0M     0  5,0M   0% /run/lock none            3,9G  372K  3,9G   1% /run/shm none            100M   44K  100M   1% /run/user /dev/sdb1       279G  215G   64G  78% /media/user/035F3F68B14AD251   Update.  denis@denis:~$ sudo parted -l Model: ATA Samsung SSD 840 (scsi) Disk /dev/sda: 256GB Sector size (logical/physical): 512B/512B Partition Table: msdos  Number  Start   End    Size    Type      File system     Flags  1      1049kB  230GB  230GB   primary   ntfs            boot  2      230GB   256GB  25,6GB  extended  6      230GB   248GB  17,2GB  logical   ext4  5      248GB   256GB  8445MB  logical   linux-swap(v1)   Model: ATA Hitachi HTS54503 (scsi) Disk /dev/sdb: 320GB Sector size (logical/physical): 512B/512B Partition Table: msdos  Number  Start   End     Size    Type     File system  Flags  2      32,3kB  21,6GB  21,6GB  primary  ntfs  1      21,6GB  320GB   299GB   primary  ntfs         boot   And:  denis@denis:~$ lsblk NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sda      8:0    0 238,5G  0 disk  ├─sda1   8:1    0 214,6G  0 part  ├─sda2   8:2    0     1K  0 part  ├─sda5   8:5    0   7,9G  0 part [SWAP] └─sda6   8:6    0    16G  0 part / sdb      8:16   0 298,1G  0 disk  ├─sdb1   8:17   0   278G  0 part /media/denis/035F3F68B14AD251 └─sdb2   8:18   0  20,1G  0 part

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


My PC won't start after installing the latest version of Ubuntu. I press the button to start the PC and then I see the BIOS start, but after that I get a black screen and nothing is happening. I can't even reinstall Windows 7 or choose between Windows 7 and Ubuntu.   Please help. I don't want to pay for fixing this. I don't remember the hardware, and since I can't access Windows 7, I can't tell you. The only thing that I know is that it is an HP Compaq 500bmt.

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


I am trying to sort an array of objects with Usort. When I run the function it does not fully sort the array. Not quite sure what I am doing wrong. I am trying to sort this based on 'zone_total' But it's not giving the result that I am looking for. I am looking to sort this with 1 value not 2. So I cannot use array_msort.(I believe this sorts it based on 2 values.)  Here is the data that I am working with.   [0] => stdClass Object     (         [class] => 6         [zone_total] => 118     )  [1] => stdClass Object     (         [class] => 1         [zone_total] => 12     )   Here is my code  usort($leaders, array($this, "cmp"));  public function cmp($a, $b) { return strcmp($a->zone_total, $b->zone_total); }

I have CSV data loaded into a multidimensional array. In this way each "row" is a record and each "column" contains the same type of data.  I am using the function below to load my CSV file.  function f_parse_csv($file, $longest, $delimiter) {   $mdarray = array();   $file    = fopen($file, "r");   while ($line = fgetcsv($file, $longest, $delimiter))   {     array_push($mdarray, $line);   }   fclose($file);   return $mdarray; }   I need to be able to specify a column to sort so that it rearranges the rows.  One of the columns contains date information in the format of Y-m-d H:i:s and I would like to be able to sort with the most recent date being the first row.


For $n\geq2$, prove that $A_n$ is the only subgroup of $S_n$ with index two. Where $A_n$ is the alternate group with $n$ elements.

I have what seems to me a very simple proof that $A_{n}$ is the only subgroup of $S_{n}$ of index 2.  Since I've seen other people prove it with what feel like really complicated methods (), I'm wondering if I've overlooked something.  Proof: Let $H$ be any subgroup of index 2 in $S_{n}$.  Then $H\cap A_{n}$ is a normal subgroup of $A_{n}$ and since $A_{n}$ is simple, $H$ is either the trivial or the improper subgroup of $A_{n}$.  If it's the trivial subgroup it doesn't have index 2 in $S_{n}$, and otherwise the theorem is proved.


i have a Intel Pentium is there ANY possible way to use it for GPU compute ? And can some one explain how GPU works and why my Intel is not compatible.

I want to enable GPU rendering, but there is no option in User Preferences > System:    Why is this? How can I get cycles to render using my GPU?


Let $a_1,a_2\dots$ be a sequence of positive reals such that $s_n=a_1+a_2+\dots+a_n$ diverges.  Does it follow that $\sum\limits_{i=1}^\infty \frac{a_i}{s_i^2}$ converges? I am really stumped at this problem. I tried finding counterexamples like $a_n=\frac{1}{n\log n}$ and got some series which I was unsure whether they diverged or not. But at then every example I have tried converges. Thanks in advance.

Let $a_n$ be a sequence of positive reals, such that the partial sums $S_n = \sum_{i = 1} ^ n a_i$ diverge to $\infty$. For given $\epsilon > 0$ do we have $$\sum_{n = 1} ^ \infty \frac{a_n}{S_n^{1 + \epsilon}} < \infty?$$  For $\epsilon \ge 1$ we can resolve this quickly by noting $$\frac{a_n}{S_n ^ 2} \le \frac 1 {S_{n - 1}} - \frac 1 {S_n}$$ so for sufficiently large $n$ we can bound $\frac{a_n}{S_n^{1 + \epsilon}}$ by $\frac 1 {S_{n - 1}} - \frac 1 {S_n}$ as well. I'm wondering if this is true for arbitrary $\epsilon > 0$. I know that the series in question diverges for $ \epsilon = 0$, so all that is missing is what happens in $(0, 1)$.


Is it possible on Windows Server 2000/2003/2008 machines to see which user rebooted the server?  I have found the shutdown event in the System event log, but it does not show which user initiated the reboot.

My server rebooted and I am not sure why.  Is there a way to find out, e.g. perhaps someone did it manually, or as a result of a windows update or a blue screen?  I've looked in the Event Viewer, but I am not sure what to look for - there are million items there.


How did this happen? Just yesterday I had 73 consecutive visits, and now I got one. What time zone are you using?    My participation just dropped by a 98%.

I see there are lots of posts about this in the past, but I wasn't able to find any recent ones (it may be my failure at searching).  I've been visiting every day to work up to the Fanatic badge. I'm not just loading my account page, but I'm also clicking around, viewing some questions, and sometimes answers a few.   I was on Stack Overflow yesterday (the 31st) and saw that my consecutive days had dropped to 1, even though the consecutive days calendar showed that I had been active every day for the last eight days. I even posted answers on the 31st (), but it's not showing that I was active on that day.  What can I do to resolve this?


Currently we have developers writing SQL Queries written in java code, which is placed in over different areas of code.  The queries themselves are not much optimized. The DBA's cannot take ownership of optimizing the query as they are in application level.   Will writing each and every query in a stored procedure help to make this situation better ? What is the best practice to control the quality of SQL in the application ?

Assuming you can't use LINQ for whatever reason, is it a better practice to place your queries in stored procedures, or is it just as good a practice to execute ad hoc queries against the database (say, SQL Server for argument's sake)?


I'm new to this regex part. My functionality is to replace every first character in a word as uppercase and remaining part in lowercase. I can easily loop through an change. But it might be costlier. To simplify it i'm trying Regex. I changed all the first character in a word to uppercase, But stuck on changing the remaining part to lowercase. How can i achieve. Refer the code below    var txt= document.getElementById('txt'); var result = document.getElementById('result'); result.onclick = titleCases; function titleCases(){        txt.innerText = txt.innerText.replace(/\b[a-z]/g,function(f){return f.toUpperCase();}) } <div id="txt">     replace The tExt </div> <button id="result">   Result </button>

Is there a simple way to convert a string to Title Case? E.g. john smith becomes John Smith. I'm not looking for something complicated like , just (hopefully) some kind of one- or two-liner.


Q: A string that contains only 0s, 1s and 2s is called a ternary string.  Find a recurrence relation for the number of ternary strings of length n that contain two consecutive 2s.  I don't really understand the question, can someone help me?

The question is: Find a recurrence relation for number of ternary strings of length n that contain two consecutive zeros.    I know for ternary strings with length one, there are 0. For a length of 2, there is just 1 (00), and for a length of 3, there are 5 (000,001,002,100,200).    I did a similar problem, finding a relation for the number of bit strings of length n with two consecutive zeros: $$a_n = a_{n-1} + a_{n-2} + 2^{n-2}$$    Since you can add "1" to the end of all the $a_{n-1}$ strings, "10" to all the $a_{n-2}$ strings, and "00" any string of size $n-2$.    For the ternary string problem, I'm pretty sure you would replace the $2^{n-2}$ with $3^{n-2}$, but confused about the other terms of the relation. My guess is that it would have the coefficient $2$ in front of the other terms, since you can add either $1$ or $2$ to the end of $a_{n-1}$ and either $01$ or $02$ at the end of $a_{n-1}$.    So I believe the answer for the relation is: $$a_n = 2a_{n-1} + 2a_{n-2} + 3^{n-2}$$    How does that look?


Don't know what version of Ubuntu to download for Windows Vista 32 based desktop computer. I have previously downloaded 16.04.5 version, however, don't see it on list of alternative Ubuntu versions now.

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I am running Ubuntu 12.04 with Gnome 3. All was working well except that graphics were slow and even moving a window on the screen seemed slow.   I installed the fglrx ati driver. Which seems to have improved matters. But on first login I had all gnome items duplicated. That is my task bar has the ubuntu sign, then says Applications, then places then the ubuntu sign then Aplications and then places.   Any application I run produces two icons at the bottom of the screen. This was after a reboot. I rebooted again. Now I have 3!! On the right each set of icons such as printer is also trippled!!   See screenshot at  See Dmesg at   Any suggestions welcome.   Reboot -> now I have 4!! So one set gets added on each reboot. Help!! I am going to be task barred out before long!!   Does no one have any suggestions at all? Or suggestions about where to look ?   This looks very like bug 650154 at bugzilla.gnome.org/show_bug.cgi?id=650164,   But this bug is closed obsolete. And not only that the code referred to in the fix, in file  /usr/share/gnome-shell/js/ui/appDisplay.js line 129 is completely different to that quoted.   So is this a regression?   Still no comment from this board. I am up to 6 instances now, have lost my application menu since its covered by the other stuff.   So, I make a file, then reboot and immediately after reboot, do a find to find all files newer than the file just made.  This comes up with more than 100000 file, wow. Whittling them down a bit, the following seemed suspicious:   ls /home/mark/.gconf/apps/gnome-terminal/profiles  Default  %gconf.xml  Profile0  Profile1  Profile2  Profile3  There were 5 duplicates at the time so this seemed suspicious.   I removed all directories beginning 'P' in the list above, so there was just Default and %gconf.xml which is empty. (Each of these contains a just one file %gconf.xml)   None of this helped at all. I am up to 7 instances.   Update 18 Dec.  Still no solution.   I discovered that the problem utility is gnome-panel.   Running gnome-panel --replace gets me yet another set without even having to logout and in. I have 10 now.   I tried to reinstall gnome-panel and wow, all seemed good. There was an err, that unfortunatly I did not not.   I tried it again and I was back to many versions running.   Now I am unsure if I had one gnome-panels or none.   I can get rid of all of them by hitting control C on the4 (now) terminal that ran gnome-panel. Thats refreshing but not quite what I want.   Let me try this re-install and relaunch again ...   No, it didnt work 2nd time round.   Hmm. Control C out of that (as Now I just have too many gnome-panels visible to even leave the darned thing running.   If I run gnome-panel, no options as sudo, I am back to just 2, thats interesting.  And thats also pretty refreshing after having more than 12.

On Ubuntu 12.04 I use openbox with a single "gnome-panel" started. But after trying to configure my two screen in Xinerama mode I got additional rows of panels each time X restarted.  And despite I completely reverted to my one-screen-X-config    the gnome-panel displayed has 4 rows (4 at top sreen, 4 at bottom) only the outermost row has content, the other 3 are empty there is only one gnome-panel process running some widgets appear 4 times, too, although they run only once when I switch away from openbox using unity I am back to 1 row temporarily   What went wrong here? How do I undo that? Things that did not help:   rm -Rf .gnome2 .gconf/ .compiz-1/ pkill panel, and restarting it