A  is said to exploit MMS loading.     For now, there's not much end users can do to protect themselves other than to install a patch as soon as one becomes available for their specific Android device. People can also prevent MMS messages from automatically loading in Google Hangouts or other text apps. That will prevent malicious code from being automatically loaded [...]   How to disable automatic loading of MMS messages?  If it depends on the app, the procedure for the most popular apps would be appreciated.

There appears to be a giant security vulnerability with Android that seems to basically affect all phones.  wrote:  The vast majority of Android phones can be hacked by sending them a specially crafted multimedia message (MMS), a security researcher [Joshua Drake] has found. ... Drake found multiple vulnerabilities in a core Android component called Stagefright that’s used to process, play and record multimedia files. Some of the flaws allow for remote code execution and can be triggered when receiving an MMS message, downloading a specially crafted video file through the browser or opening a Web page with embedded multimedia content. ... The MMS attack vector is the scariest of all because it doesn’t require any interaction from the user; the phone just needs to receive a malicious message. For example, the attacker could send the malicious MMS when the victim is sleeping and the phone’s ringer is silenced, Drake said. After exploitation the message can be deleted, so the victim will never even know that his phone was hacked, he said.  What can a regular user do to mitigate the issue? Disable Google Hangouts?


I joined a couple of new Stack Exchange sites recently, and noticed the message that appears when voting:     Thanks for the feedback!  Votes cast by those with less than [15/125] reputation are recorded, but do not change the publicly displayed post score.   Hey, that's cool!  I previously thought that you couldn't vote at all if you didn't have enough reputation.  I assume this means that once you get voting privileges, posts that you voted on before the privilege change will now include those old votes in their displayed score.  (Maybe I'm wrong about that, but if so then what's the point of recording them at all?)  Given that, this is my question:  if my votes are actually recorded even before they count toward the public vote total, then why can't I see what I've voted on?  After I click the vote button, both the total and the button return (almost) immediately to their pre-vote appearance.  Even without reloading the page, it's now impossible to tell which way I voted, or even if I've voted at all.  Clicking on the same vote button multiple times shows no visible difference in behavior either, it's as though I'm voting anew with every click.    I only noticed this because I actually did accidentally downvote a question recently, and was distressed to realize that there's no way to undo that action---at least until I have enough reputation to vote publicly, at which point it will almost certainly be too late to change the vote anymore.  All I could do was vote again in the opposite direction, which is really not the same thing.  I can't even see the question under the "votes" tab on my profile.  Surely there's no reason for this?  It's easy enough to show my vote with the button appearance but still leave the total unchanged.  IMO this behavior should be considered a bug.

Users below 15 reputation can't effectively vote. It says:     Votes cast by those with less than 15 reputation are recorded, but do not change the publicly displayed post score   Does it mean that they will take effect after I reach 15 reputation or because they were cast before, they're recorded but ignored?


I am having a problem comprehending with the relation of kernel, weight and linear separation.      I have a case where I am given a kernel $k_1$. that has a corresponding mapping $\phi_1$.  And we know that it's linear separated in that space.      I need to show that given some $a,b > 0$:  $$k=a*k_1+b*k_2$$ to show if we have linear separation in the higher dimension.  How do I approach that?

Suppose we have 2 kernel functions $K_1(x,y)$ and $K_2(x,y)$. We know, that the dataset ($(x_1,y_1),\ldots,(x_l,y_l),$ $y_i \in \{-1,1\}$ ) is separated with the first one (that is, there are $w,$ $w_0$: $$y_i(K_1(w,x_i)-w_0)>0 $$ for all $i=1,\ldots,l$ ), and not separated with the second kernel function. What we can say about kernel function $K_1(x,y)+K_2(x,y)$ ? How I can show that the same dataset is separated with it?


I'm using Caldroid Lib to create a custom calendar inside my Android App, when loading a date value in setBackgroundDrawableForDate i am using the following lines of code.  public class CaldroidSample extends AppCompatActivity {  @Override public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.calendar_main);      CaldroidFragment caldroidFragment = new CaldroidFragment();     Bundle args = new Bundle();     Calendar cal = Calendar.getInstance();     args.putInt(CaldroidFragment.MONTH, cal.get(Calendar.MONTH) + 1);     args.putInt(CaldroidFragment.YEAR, cal.get(Calendar.YEAR));      caldroidFragment.setArguments(args);caldroidFragment.setBackgroundDrawableForDate(new ColorDrawable(Color.GREEN), ParseDate("28/04/2016"));      getSupportFragmentManager().beginTransaction().add(R.id.fragment_container, caldroidFragment).commit();  }  public Date ParseDate(String date_str) {     SimpleDateFormat simpleDateFormat = new SimpleDateFormat(             "yyyy-MM-dd", Locale.getDefault());     Date dateStr = null;     try {         dateStr = simpleDateFormat.parse(date_str);     } catch (ParseException e) {         // TODO Auto-generated catch block         e.printStackTrace();     }     return dateStr;  }  }   I am getting the following error, don't know whats the issue here.  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vv.melioring.calendarapp/com.vv.melioring.calendarapp.CaldroidSample}: java.lang.NullPointerException: Attempt to invoke virtual method 'long java.util.Date.getTime()' on a null object reference  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2339) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413) at android.app.ActivityThread.access$800(ActivityThread.java:155) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5343) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'long java.util.Date.getTime()' on a null object reference at java.util.Calendar.setTime(Calendar.java:1195) at com.roomorama.caldroid.CalendarHelper.convertDateToDateTime(CalendarHelper.java:112) at com.roomorama.caldroid.CaldroidFragment.setBackgroundDrawableForDate(CaldroidFragment.java:433) at com.vv.melioring.calendarapp.CaldroidSample.onCreate(CaldroidSample.java:66) at android.app.Activity.performCreate(Activity.java:6010) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1129) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2292) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2413)  at android.app.ActivityThread.access$800(ActivityThread.java:155)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:135)  at android.app.ActivityThread.main(ActivityThread.java:5343)  at java.lang.reflect.Method.invoke(Native Method)  at java.lang.reflect.Method.invoke(Method.java:372)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)

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 got my projectile facing the right way thanks to @S. Tarık Çetin. But now I want it to move the direction it's facing. I think I need to use RayCastHit2D but I am not sure. If I need to use RayCastHit2D please tell me how.   I want to replace this part with RayCastHit2D or something else -:  MyRB.AddRelativeForce(new Vector2(1,1) * rocketSpeed, ForceMode2D.Impulse);   Another thing - my projectile requires gravity. I think if I use RayCastHit2D the projectile will go in a straight line and not fall down. So if that's the case please tell me a better alternative. (so it acts like a tank projectile)  here is my code -:  Aim class -          void Update(){         if (Input.GetKey(KeyCode.L))         transform.Rotate(0, 0, -3.0f);          if (Input.GetKey(KeyCode.J))             transform.Rotate(0, 0, 3f); }   ProjectileController class -        void Awake()     {         MyRB = GetComponent<Rigidbody2D>();         MyRB.AddRelativeForce(new Vector2(1,1) * rocketSpeed, ForceMode2D.Impulse); }   GunController class -:  void Update() {      //playershooting     if (Input.GetAxisRaw("Fire1") > 0)         fireRocket();  }  void fireRocket() {      if (Time.time > nextFire)     {          nextFire = Time.time + fireRate;          Instantiate(bullet, guntip.position, guntip.rotation);       }

I want to shoot a projectile in the direction the gun is facing.  With my current script it only shoots vertically. (I can also make it go horizontally but that's it).  This is my GunController class:  public Transform guntip; public GameObject bullet;  float fireRate = 0.5f; float nextFire = 0f;  void Update () {     //playershooting     if (Input.GetAxisRaw("Fire1") > 0)     {      fireRocket();     }        }  void fireRocket()  {     if(Time.time > nextFire)     {         nextFire = Time.time + fireRate;          Instantiate(bullet, guntip.position, Quaternion.Euler(new Vector3(0, 0, 0)));      } }   This is my ProjectileController class:  Rigidbody2D MyRB; public float rocketSpeed;   void Awake() {     MyRB = GetComponent<Rigidbody2D>();      MyRB.AddForce(new Vector2(0, 1) * rocketSpeed, ForceMode2D.Impulse); // explosive force, change vector 2 for horizontal shooting  }


I know nothing about the bureaucracy of the academic world when writing papers but I sometimes need or enjoy to read academic papers.  Usually all the papers I've read were written either by professors or by reasearchers (I'm guessing PhDs). Some papers were written by people working at Google and they were PhDs too.   My question is: can anyone write a paper or is some minimum level of education (say a PhD for instance) required? Of course I'm not asking if a persone can wake up tomorrow and write a paper on quantum physics without knowing anything at all of physics.  EDIT: when I said "write", what I meant was having the paper published. Sorry!

Is it possible to submit a paper to a scholarly, peer-reviewed journal without PhD? More specifically, what would be the bare minimum qualifications that would grant one the possibility of the paper being published in a peer-reviewed academic medium?


I've been using 17.10 with the default Desktop (Gnome/Wayland) for about a week and is running very smoothly except for one thing:  I no longer can share my screen with the Slack Linux app or with Hangouts (in Chrome). The other party only sees a black screen and the cursor moving.  However if I only share a window (Hangouts) then it works.  It happens to one of my workmates as well, with a fresh 17.10 install. Used to work perfectly so far with previous Ubuntu versions.  Does anyone know what is the source of the problem and a possible solution/workaround? Or if there's a bug already reported?  UPDATE: It seems to be Wayland related as it works on X, ie. when I login to Ubuntu on Xorg session.

After upgrading to Ubuntu 17.10 I noticed some of my screencasting applications are not working, for example screencasting tools like SimpleScreenRecorder and vokoscreen. ()  Also I noticed features like screenshot from GIMP is not working properly, producing blank screenshots (). Shutter too is producing glitchy screenshots ().  Screen-sharing option on Skype is also not working ().  The issue occurs sometimes on later Ubuntu releases too.  Why is this happening and how do I fix this?


My laptop has a weird issue where the touch pad doesn't work after the device is restarted. It works fine after a normal shut down, though. Is it possible to disable restarts so that the computer will always shut down fully?

This questions has been answered previously, e.g. , but all the answers I've seen require using a dropdown in Settings> Update & Security> Advanced Options.  On my version of Windows 10 Pro, there is no such dropdown:    How can I prevent automatic restarts?


This question is related to the question .  I downloaded caesar_example.tex from  and complied it from TeXShop. The output file caesar_example.pdf does not contain the bibliography.  After examining the console I identified the following as a possible problem.   LaTeX Warning: Empty bibliography on input line 126.  [7] (./caesar_example.aux)  LaTeX Warning: There were undefined references.  Package biblatex Warning: Please (re)run Biber on the file:  (biblatex)                caesar_example  (biblatex)                and rerun LaTeX afterwards.   I was wondering if the biber package is not installed in my TeX Live 2013. So, I included the line \usepackage{biber} and re-compiled the modified caesar_example.tex file. Then there was no compilation and I got the following message on the console.  ! LaTeX Error: File `biber.sty' not found.  Type X to quit or <RETURN> to proceed,  or enter new name. (Default extension: sty)  Enter file name:   Then I used "TeX Live Utility" to see if this is true. I found out that the following biber packages are installed.  universal-da universal darwin files of biber  x86_64-darwin x86_64-darwin files of biber  What do I have to do to get caesar_example.tex properly compiled?   (If this question is too localized then is there a place that I can ask this question?)

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


The question is not about how to use "this, that, it" with material objects, but how to use them with non-material ones? I don't understand (it, that, this) yet. For example:  I go to a gym every day and I like (it, this, that?). You helped me and (it, this, that) is very good.  Is there any rule about (again it, this, that?)? Suggestions? Can I use "this, that, it" interchangeably in most situations?

Learning and using English I'm always confused about what word to use for referring to things that have been described by me a few sentences earlier: "that" or "this".   Confusion comes from the fact that only the equivalent of "this" is always used in my native language for such referring. But I've noticed that in English for such referring "that" is used as often as "this" (or maybe even more often).  Some examples for illustrating (just tried to google something appropriate to convey my idea better):     We assess local... the demographics of the local population. What are the natural traffic drivers in the area. Things like cinemas and pubs and retail and office and all that type of things and we now put together a bit of a matrix and actually give a weighted score to each of the things we know help our business. That helps us decide in a more scientific fashion.   or:     The problem of Cervantes' origin became after that into a tough matter. Some experts believed that the Cervantes from Alcázar, in the times of the Lepanto Battle, was in the age of a child, more concerned about gathering nests and that type of things than about fighting as a soldier.   and for "this":     I believe lot of people who involved fishery industries in Mexico Gulf are suffering now but as for economic issues, U.S government and other countries will support them and give an utmost response to it. Important thing is that we learn from this mistake and make sure this type of things will never happen in the future and protect nature environment thus we have to take this technology to get energy from water very seriously. I really hope this technology will be available and used for everybody as soon as possible.   Is there a rule describing proper usage of these words in cases like this? (or should I have written "..in cases like that"?)


After I use an acronym or abbreviation should I continue using "the" in front of it? I'm assumption is no. Example:  "...at the International Association of Fire Chiefs (IAFC) Headquarters in Chantilly, VA."   Then later:  "For a number of years, IAFC has convened a round-table..."

I'm wondering when to use or not to use the definite article, when using acronyms or initialisms in a sentence. Is there a rule for this, or does it depend on the context?  For example, let's look at some example sentences DDR  = detailed design review.  NASA is planning to launch the final shuttle soon (no article) The FBI shut down this website (article) ESA is a full partner in the ISS (no article, article) The project was cancelled at the DDR. (article)  What confuses me is that if NASA or ESA would be written in full, the article would be necessary.


Why are unions, in particular, infinite unions, of open sets open allowed by the definition of topology? Such a condition allows for interiors of sets to always exist, but why does this matter?

In the context of metric (and in general first-countable) topologies, it's reasonably clear what a closed set is: a set $F$ is closed if and only if every convergent sequence of points in $F$ converges to a point also in $F$. This naturally generalises to the definition of a closed set in an arbitrary topological space using the concept of limit points... but limit points are defined in terms of open sets, which are, to me, somewhat more mysterious than closed sets.  I was once told that ultrafilters axiomatise the concept of (sets of) big sets. I'm hoping here to find a similar conceptual picture of topologies defined by systems of open sets, preferably without reference to closed sets. One such explanation I've seen is that open set axiomatise the concept of nearness, which, I suppose, is fair enough at least for metric topologies. Indeed, if something is "happening" at points near $x \in X$, then it's usually the case that every open neighbourhood $U \subseteq X$ of $x$ contains an open subset $V \subseteq U$, $x \in V$, such that the something "happens" at all points in $V$. But what about non-metrisable topologies, particularly the coarse ones where there are no "small" open sets?  Consider, for example, the Zariski topology on affine $n$-space $\mathbb{A}^n$. $\mathbb{A}^n$ is irreducible, so every non-empty open set is dense. It seems reasonable to interpret this to mean that every non-empty open set is "large". Indeed, if we work over the complex numbers, then in the usual metric geometry, Zariski-open sets are unbounded and have full measure, so are very large indeed, so I don't think it's fair to say that open sets are capturing the notion of nearness here.  I'm also curious about the history of point set topology. When were the axioms first written down? What were the first "non-geometric" examples of topological spaces — "non-geometric" here referring to either non-metrisable topologies or topologies on sets other than sets of points of some intuitively geometric object — and were they part of the motivations for creating point set topology?


Sum of the series $\sum_{1}^{\infty}\frac{n}{2^{n}}$ is   $a.1$  $b.2$  $c.3$  $d.4$  With which known series I have to compare the given series? Please help. Thanks.

A previous problem had us solving $\sum_{n=0}^{\infty} \frac{1}{4^n}$ which I calculated to be $\frac{4}{3}$ using a bit of mathematical manipulation.   Wonderful. Thank you for all the prompt responses.  Could anyone suggest an alternate technique that does not involve differentiation?


I often use custom commands or macro as we all do. But I'm not sure what to do about the space following the command. I've sometimes done \mycommand\ and sometimes I've done \mycommand{}. I'm not sure which is better or more correct. Perhaps there's an even better way to do this. Can someone please describe what is the "best" way to do this?

I have a definition:  \newcommand{\arnold}{Arnold Schwarzenegger}   When I refer to it by:  \arnold is a   it is rendered as:   Arnold Schwarzeneggeris a    In order to have a space in front of "is" I would need to write  \arnold\ is a   Is there some other shorter way?


I am developing Client-Server App using Java Socket. My Application Has Server which will listen on Port    Client will connect to that port Receive Data From Client Send Data To Client   Part of My Code  public void run() {     System.out.println("Got a client !");     try {         // Get Data From Client         int red = -1;         byte[] buffer = new byte[5 * 1024]; // a read buffer of 5KiB         byte[] redData;         StringBuilder clientData = new StringBuilder();         String redDataText;         while ((red = clientSocket.getInputStream().read(buffer)) > -1) {  /* Get Data From Client Here Code Hidden */              System.out.println("Data From Client :"                     + clientData.toString());              OutputStream out = clientSocket.getOutputStream();             DataOutputStream dos = new DataOutputStream(out);              String sDataToClient = "TEST DATA TO SEND IN BYTE ARRAY";              byte[] b = sDataToClient.getBytes("UTF-8");              byte[] bClientSend = new byte[b.length + 2];              bClientSend[0] = (byte) 1;             bClientSend[1] = (byte) 79;              System.arraycopy(b, 0, bClientSend, 2, b.length);              dos.write(bClientSend);             System.out.println(Arrays.toString(bClientSend));          }         clientSocket.close();     } catch (IOException e) {         e.printStackTrace();     } }   I Get java.net.SocketException: Connection reset after Data SENT to Client at following line  while ((red = clientSocket.getInputStream().read(buffer)) > -1) {   I am able to see Array Contents of System.out.println(Arrays.toString(bClientSend)); Then error occurs

I am getting the following error trying to read from a socket. I'm doing a readInt() on that InputStream, and I am getting this error. Perusing the documentation this suggests that the client part of the connection closed the connection. In this scenario, I am the server.  I have access to the client log files and it is not closing the connection, and in fact its log files suggest I am closing the connection. So does anybody have an idea why this is happening? What else to check for? Does this arise when there are local resources that are perhaps reaching thresholds?    I do note that I have the following line:  socket.setSoTimeout(10000);   just prior to the readInt(). There is a reason for this (long story), but just curious, are there circumstances under which this might lead to the indicated error? I have the server running in my IDE, and I happened to leave my IDE stuck on a breakpoint, and I then noticed the exact same errors begin appearing in my own logs in my IDE.  Anyway, just mentioning it, hopefully not a red herring. :-(


From what I know, ST will stop to develop Standard Peripheral Libraries (SPL) for the next generations of STM32. And HAL is not ideal for people who want to understand well about STM32 and microcontrollers. Can you suggest me which one is the best to use (for learning and working in the future)?

So I'm switching from PICs to ARM and I bought an STM32F4 discovery board. So far I understand that to program it you can either access all registers directly in memory (obvious way) and also there are 3 main libraries you can use to make your life easier. Now my question is, which one of those 3 (CMSIS, HAL, Std Peripherals Lib) is the most LOW level one? ie. the one with the less overhead. My goal is to learn the controller's inner workings and not make my life easier (only a little), so I would like to know which of these is closer to the core without resorting to use assembly.


I was trying to commit my code. Then it asked my to first pull the other developer's code. So I stashed my code. Now I successfully pulled the other's code. Now when I tried to stash pop, I got error and only some files got back.  I thought by clicking on Drop Stash, I will get my stashed code back. Now due to drop I am not able to see my code. Is there a way to recover my dropped stash ?  I saw a code to recover dropped stash in Git, but don't know how to make it work for Azure devops.  Reference :

I frequently use git stash and git stash pop to save and restore changes in my working tree. Yesterday I had some changes in my working tree that I had stashed and popped, and then I made more changes to my working tree. I'd like to go back and review yesterday's stashed changes, but git stash pop appears to remove all references to the associated commit.  I know that if I use git stash then .git/refs/stash contains the reference of the commit used to create the stash. And .git/logs/refs/stash contains the whole stash. But those references are gone after git stash pop. I know that the commit is still in my repository somewhere, but I don't know what it was.  Is there an easy way to recover yesterday's stash commit reference?  Note that this isn't critical for me today because I have daily backups and can go back to yesterday's working tree to get my changes. I'm asking because there must be an easier way!


So, I've created a program with Kinect as its input. As you know, Kinect will send the data 30 frame per second.   I have a model that will mimic Kinect's input motion, so on Update() I read the motion from Kinect.  The problem is, on Update(), I've done a heavy computational algorithm. It makes the system lag and freezing. I've tried to do the calculation every 60 frames instead of each frame, but the system still got lag.  void Update(){         ...         //GET DATA FROM KINECT         frame = new SkeletonRecorded();         frame.root.rotation = skeletons[kinect2SensorID, playerID].root.rotation;             ...         frame.rightShoulder.position = skeletons[kinect2SensorID, playerID].rightShoulder.position;         frames.Add(frame);         if (frames.Count >= 60) {             //CALLING THE CALCULATION METHOD (Here is the heavy part begin)             comparatorClass.GetSkeletonData(frames);             frames.Clear();         }  }   The above code is just small parts of the Update() method (I cut it short for convenience). So, how should I call the GetSkeletonData() method without making the interface lag?

I have a level generation algorithm that is computationally heavy. As such, calling it always results in the game screen freezing. How can I place the function on a second thread while the game still continues to render a loading screen to indicate the game is not frozen?


Yesterday I was updating some applications. I come back later and I see a red stop sign on top of my screen that stated there was an error. It said that some of my packages needed some dependencies. I ignored it and shut off my laptop. Now Ubuntu starts up and takes me to my login screen but freezes. I can't move the mouse or type in my password. Does anyone know how I can fix this?   I hope this was clear enough, I'm a newbie with ubuntu. I have a 2012 macbook pro 15inch.

My Ubuntu is stuck in a login loop when trying to enter my desktop. When I login, the screen gets black and soon after that the login screen comes back.   I've read that the problem might be caused by an error depending on the graphics, here's my graphics card: ATI Radeon 7670M


.  Citeable data has fully persistent DOI's that link to recognised data repositories.  This ensures that the data used in scientific publications can be obtained and re-used in the future.  Is there any specific way to cite data using the bibtex file format (using either bibtex or biber), apart from @misc?

I want to output something like this:     Pew Research Center for the People & the Press. (2008). April 2012 Values Survey [Data file]. Available from Pew Research Center for the People & the Press Web site:    How would I enter that into ? I use BibDesk to manage my citations.


I have the below table and now I need to delete the rows which are having duplicate "refIDs" but have atleast one row with that ref, i.e i need to remove row 4 and 5. please help me on this  +----+-------+--------+--+ | ID | refID |  data  |  | +----+-------+--------+--+ |  1 |  1023 | aaaaaa |  | |  2 |  1024 | bbbbbb |  | |  3 |  1025 | cccccc |  | |  4 |  1023 | ffffff |  | |  5 |  1023 | gggggg |  | |  6 |  1022 | rrrrrr |  | +----+-------+--------+--+

What is the best way to remove duplicate rows from a fairly large SQL Server table (i.e. 300,000+ rows)?  The rows, of course, will not be perfect duplicates because of the existence of the RowID identity field.  MyTable  RowID int not null identity(1,1) primary key, Col1 varchar(20) not null, Col2 varchar(2048) not null, Col3 tinyint not null


The dimension of the Hilbert space is determined by the number of independent basis vectors. There is a infinite discrete energy eigenbasis $\{|n\rangle\}$ in the problem of particle in a box which can be used to expand a general state $|\psi\rangle$ as: $$|\psi\rangle=\sum\limits_{n=0}^{\infty} C_n |n\rangle$$ Here, the basis implies that the Hilbert space has countably infinite number of basis vectors. But one could well expand $|\psi\rangle$ in any other basis as well, say the continuous position basis. Then that superposition, $$|\psi\rangle=\int dx \psi(x)|x\rangle$$ is also possible. But this basis $\{|x\rangle\}$ is continuous and uncountably infinite. Such sets cannot be equal because they have different cardinality. Then my questions is how many independent basis vectors are really there in this Hilbert space?

Hm, this just occurred to me while answering another question:   If I write the Hamiltonian for a harmonic oscillator as $$H = \frac{p^2}{2m} + \frac{1}{2} m \omega^2 x^2$$ then wouldn't one set of possible basis states be the set of $\delta$-functions  $\psi_x = \delta(x)$, and that indicates that the size of my Hilbert space is that of $\mathbb{R}$.  On the other hand, we all know that we can diagonalize $H$ by going to the occupation number states, so the Hilbert space would be $|n\rangle, n \in \mathbb{N}_0$, so now the size of my Hilbert space is that of $\mathbb{N}$ instead.  Clearly they can't both be right, so where is the flaw in my logic?


There's an extra  in the flag overlay shown when viewing the full flagged post:    It's escaped in the source:  answered&lt;/a&gt; 5 hours ago by

I awoke this morning to a spam flag on a site I moderate, and noticed this when I went to read the post.    Notice answered, which I imagine isn't meant to have the  there.  I also confirmed that this displays asked for other types of flags (namely, closed without comment).   I looked around for a duplicate of this but can't seem to find it, so maybe it's a recent change?


So, just today I installed Lubuntu 13.10 on my piece-of-crap laptop and I absolutely LOVE how fast it is.  I installed Java 7 successfully, and I downloaded the Minecraft.jar (Minecraft fo Linux/Other) files at .  The first thing I did was drag the Minecraft.jar to my desktop.  I then right-clicked it, went to properties, made sure it was marked as executable, and then selected "open with..." but I didn't find Java 7 Runtime Environment nor anything Java-related.  I then tried running it via terminal (I forgot the command but I believe it went along the lines of "java -jar minecraft.jar").  I also tried using "sudo chmod a+x minecraft.jar" to ensure that it was indeed executable.  Yet none of this worked.    Any help is appreciated.  Thanks!  ^-^  --------------------Devon  -EDIT- Should I just switch to a distribution that I know can run Minecraft?

How to correctly install Minecraft, including setting any needed packages or apps to install it and to troubleshoot the most common problems that Ubuntu users face when trying to use Minecraft.  I am trying to install and run Minecraft without first having to install the Oracle version of Java. I want to use the OpenJDK version that comes with Ubuntu and as a last resort, use the Oracle one.  I also want to know a list of problems related to Minecraft in Ubuntu and the possible solutions to them.  A step by step guide on how to install Minecraft would also help.


Consider $[0,1]$ with addition modulo one is an abelian group. Subgroup generated by $\sqrt2$ is dense in $[0,1]$. I think this generator set is $\{\sqrt2 n|n\in \mathbb Z\}$ I know that any closed subgroup of $[0,1]$ which is infinite is equal to $[0,1]$. But I cannot show for any interval centered at any element in $[0,1]$ intersects with $\{\sqrt2 n|n\in \mathbb Z\}$ I have seen the trick using taking power of $\sqrt2-1$ but this is an additive group and we need to approach it in group way not rings.

I am trying to show that the following space is not Hausdorff. Consider the topological space $S^1$, and let $r$ be an irrational number. Consider the action of $\mathbb{Z}$ on $S^1$ given by $$ S^1\times\mathbb{Z}\to S^1; (e^{ix}, n)\mapsto e^{i(x+2\pi n r)}. $$  Let $S^1/\mathbb{Z}$ denote the orbit space. I want to show that this space is not Hausdorff.   It was suggested to me that I try showing that any orbit under this action is dense in $S^1$, but I am getting stuck on proving that bit. But here is what I was thinking: we know that the topological group $\mathbb{R}/2\pi \mathbb{Z}$ is homeomorphic to $S^1$, as seen by the map $t\mapsto e^{it}$. Denote the following composition of maps $$ \mathbb{R}\to \mathbb{R}/2\pi \mathbb{Z}\simeq S^1\to S^1/\mathbb{Z} $$ by $\phi$. Then if $[e^{ix}]\in S^1/\mathbb{Z}$, it follows that  $$ \phi^{-1}([e^{ix}]) = \{x+2\pi(nr+m)\mid n, m\in\mathbb{Z}\}. $$ If I can show that this subset is dense in $\mathbb{R}$, then it follows that the set $[x]$ as a subset of $S^1$ is dense. This is where I am getting stuck, and it is not even clear to me that this is necessarily true.  Any hints or suggestions are appreciated. Thanks!


I did my first question  abour populating an array to json_encode and pass it to my javascript on client side, but what I figured out is that the problem seems to be related to json_encode and the values that come from my table. The table is filled with varchars, so it's a table with common categorys, like restaurant,shopping,etc.   I'm doing this loop to fill the array ( I had the while loop before but this one got me to understand the error)  $id=array(); for($i=0;$i<$nmr;$i++){   $row = mysql_fetch_assoc($sql);   $id[$i]=$row['Tipo']; } echo json_encode($id);   So, if I do it like this, my PhP page returns nothing. But if a print_r($id) it prints me the array with all the strings. If I echo $id[1]; it outputs one of the categorys, so I guess it's the json_encode no? I already set my DB to utf-8 because I noticed that json works that way, so what would be the prblem now?  Thanks  EDIT:  Forgot to mention that if I do this:    $id[0]="ola";   $id[1]="ccc";   $id[2]="sd";    json_encode($id);    output: ["ola","ccc","sd"]   it gives me the array on the output. So it only happens when I try to encode the array filled with values from my DB.  2nd Edit  I said this above but I guess it's better if I show it. The array is being populated because if I print_r($id) right after the json_encode($id) I get the populated array.  Array ( [0] => Restaurantes [1] => Cafés [2] => Shopping [3] => Eventos [4] => Hoteis [5] => Oficinas [6] => Combustiveis )

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


I have DDL like the below, which returns data like such:  GP17    GP16 0       103 90      0 375     0   I am wanting to pivot the data somehow so that it returns only one row, like such:  Jan 17 ---- Jan 16 ---- Feb 17 ---- Feb 16 ---- Mar 17 ---- Mar 16 0            103         90          0           375         0      Now this is relevant to the date range being passed in below, for example, if the date range being passed in is 20170401  20170630 then I would want the dates to read Apr 17, Apr 16, May 17, May 16, Jun 17, Jun 16  How can this be achieved with SQL Server 2008 R2 and the DDL below?  Declare @Test Table (     dname varchar(100)     ,tr float     ,dc float     ,sdate date )   Insert Into @Test (dname, tr, dc, sdate) Values ('Green', 100.00, 10.00, '20170101'), ('Green', 200.00, 15.00, '20170201'), ('Green', 200.00, 10.00, '20170215') ,('Green', 10.00, 0.00, '20160101'), ('Green', 15.00, 10.00, '20160130'), ('Green', 110.00, 22.00, '20160101')  Declare @startdate date = '20170101', @enddate date = '20170331'  SELECT  ROUND(SUM(ISNULL(tr17,0))-SUM(ISNULL(DC17,0)),0) As GP17, ROUND(SUM(ISNULL(tr16,0))-SUM(ISNULL(DC16,0)),0) As GP16 FROM ( SELECT ZT1.dname, SUM(ISNULL(ZT1.tr,0)) AS tr17, 0 As DC17, 0 As DC16, 0 AS tr16, sdate As activityDate FROM @Test AS ZT1 WHERE ZT1.sdate >= @startdate AND ZT1.sdate <= @enddate GROUP BY ZT1.dname, ZT1.sdate UNION ALL Select t1.dname, 0 As tr17, SUM(ISNULL(t1.dc,0)) As DC17, 0 As DC16, 0 AS tr16, sdate as activityDate FROM @Test t1 WHERE t1.sdate >= @startdate AND t1.sdate <= @enddate Group By t1.dname, t1.sdate UNION ALL SELECT ZT1.dname, 0 As tr17, 0 As DC17, 0 As DC16, SUM(ISNULL(ZT1.tr,0)) AS tr16, sdate As activityDate FROM @Test AS ZT1 WHERE ZT1.sdate >= DateAdd(yy, -1, @startdate) AND ZT1.sdate <= DateAdd(yy, -1, @enddate) GROUP BY ZT1.dname, ZT1.sdate UNION ALL Select t1.dname, 0 As tr17, 0 As DC17, SUM(ISNULL(t1.dc,0)) As DC16, 0 AS tr16, sdate as activityDate FROM @Test t1 WHERE t1.sdate >= DateAdd(yy, -1, @startdate) AND t1.sdate <= DateAdd(yy, -1, @enddate) Group By t1.dname, t1.sdate ) AS A GROUP BY YEAR(activityDate), MONTH(activityDate)

My table is like this:  Sitecode    Month  Amount --------    -----  ------ XX          Jan     1000 XX          Jan     3000 XX          Apr     3000 XX          Apr     1000   What I want is, to show the result something like this:  Sitecode    MonthJAN   MonthAPR --------    --------   -------- XX          4000       4000


\documentclass{scrartcl}  \usepackage{pgfplots} \pgfplotsset{compat=1.15}  \begin{document}  \section*{\texttt{minor y tick num} Works} \begin{tikzpicture}     \begin{axis}[     %     axis x line = bottom,     axis y line = left,      %     grid = both,     minor x tick num = 1,     minor y tick num = 1,     %     xmin = 0,     xmax = 10.2,     xtick = {0,1,...,10},     %     ymin = 0,     ymax = 1.05,         %     ]     \end{axis} \end{tikzpicture}  \section*{\texttt{minor y tick num} Does Not Work} \begin{tikzpicture} \begin{axis}[     %      axis x line = bottom,     axis y line = left,      %        grid = both,     minor x tick num = 1,     minor y tick num = 1,     %                    xmin = 0,     xmax = 10.2,     xtick = {0,1,...,10},     %        ymin = 0,     ymax = 1.05,     ytick = {0,0.2,...,1.2}, % <--- Difference     %            ] \end{axis} \end{tikzpicture}  \end{document}      Problem   As soon as I define ytick = {0,0.2,...,1.2}, the minor y ticks   disappear. Maybe I don't see the obvious :=).

Firstly I would like a minor tick between every major tick in my pgfplots graph (and minor grids). I wrote minor tick num=1 but it doesn't work. I am not using a logarithmic axis so it is unrelated to other questions.  Secondly, why is the tick label "1" missing for each axis? How do I get that to display?     \documentclass{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}  \begin{axis}[% footnotesize, width=4in, height=4in, axis equal, scale only axis, separate axis lines, grid=both, every outer x axis line/.append style={black}, every x tick label/.append style={font=\color{black}}, xmin=0, xmax=1, xlabel={X}, every outer y axis line/.append style={black}, every y tick label/.append style={font=\color{black}}, ymin=0, ymax=1, ylabel={Y}, minor tick num=1, xtick={0,0.1,...,1}, ytick={0,0.1,...,1}, axis background/.style={fill=white}, legend style={at={(0.97,0.03)},anchor=south east,legend cell align=left,align=left,fill=white} ]  \end{axis}  \end{tikzpicture}% \end{document}


I need to create a nice map with contours that represent various thematic data on a scale of a country, for instance, average temperatures in Germany.  I have a list of coordinates with the values, and that's it. I am a bit lost here what's the best approach. The output should be a PDF or raster map (I am not interested in a web service). The base map can be very basic with just country borders and optionally major cities.  My idea was to use matplotlib and somehow overlay the contours over a map, but I don't think that it'd look professionally made and appealing.  What are your recommendations? Can QGIS do the complete job?

I'm using QGIS 2.4.0 and I have a shapefile of points with elevation data and X and Y coordinates. I'm using windows 7 OS.  The idea is to create a contour line SHP using my point data.  My question is: How do I start working on that issue? Is there a function? Is there a step by step process?


My program runs fine under eclipse. If I open it with the textPad and compile it, I get this message:     Note: C:\Users\Aezur\Desktop\Project2\SummerQ1.java uses unchecked or   unsafe operations. Note: Recompile with -Xlint:unchecked for details.   It says that has compiled successfully, but it doesn't run.  Any ideas?

For example:  javac Foo.java Note: Foo.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.


Prove that it is impossible for three consecutive squares to sum to another perfect square. I have tried for the three numbers $x-1$, $x$, and $x+1$.


I started commuting to work and was wondering if it's worth getting some slick road tyres for a 560 rockrider Btwin bike.  It has a 26x2 mitcheline cross trail tyre that came with the bike which is good for off road but it feels sluggish and slow as, pretty much 9/10 cyclist on road or single speed bikes beat me easily.  I tend to have to pedal harder and faster to keep up!  Do I need to purchase exact same dimensions as my current tyre or can I purchase any 26 tyre?

I bought a Repco Warrior 29 mountain bike 3 months ago. The back tyre is now almost bald and needs to be replaced. Because of where I live there are no bike shops, so I can't buy tyres here and will have to order them from overseas.  My problem is that 3 months seems a short time to have to replace tyres (although it does see a lot of miles since I use it a lot). I don't ride offroad, and I'm wondering if that's part of the issue with the rapid wear.  Before I order any tyres, can anyone tell me through experience if it's a good idea (or even possible) to put road tyres on my mountain bike. Are there any pro's and cons to it? Should I replace both tyres or just the back one?  Update:- I now have my new tyres, ordered brake pads as well, and immediately noticed the smoother, easier, quieter ride on the way home (about an hour) Cheers all for the advice.


I am creating a batch program, and you need to pass arguments to it. Though with my current code you have to pass the arguments in a certain way. The way I could fix this is by getting a line of text next to the argument. This is what I want :  batch.bat -arg2 arg -arg1 arg                  ^         ^                  |         |               Need This Need This

I need to pass an ID and a password to a batch file at the time of running rather than hardcoding them into the file.  Here's what the command line looks like:  test.cmd admin P@55w0rd > test-log.txt


I have installed Ubuntu 20.04, but the wifi interface is hard blocked. I tried to install firmware-b43-installer and to insert the brcm80211 module manually but no luck. Is there a known solution for this?  $ rfkill list all 0: phy0: Wireless LAN     Soft blocked: no     Hard blocked: yes  $ sudo lshw -C network *-network DISABLED    description: Wireless interface    product: BCM4313 802.11bgn Wireless Network Adapter    vendor: Broadcom Inc. and subsidiaries    physical id: 0    bus info: pci@0000:04:00.0    logical name: wlp4s0b1    version: 01    serial: 70:f1:a1:ca:27:b5    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless    configuration: broadcast=yes driver=brcmsmac driverversion=5.4.0-31-generic firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11    resources: irq:17 memory:f0300000-f0303fff  $ lspci -knn | grep Net -A3; rfkill list 04:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM4313 802.11bgn Wireless Network Adapter [14e4:4727] (rev 01)     Subsystem: Dell Inspiron M5010 / XPS 8300 [1028:0010]     Kernel modules: bcma, wl 05:00.0 Ethernet controller [0200]: Qualcomm Atheros AR8152 v1.1 Fast Ethernet [1969:2060] (rev c1)

I recently updated my Lenovo Y50 computer to 16.04. Since the update, I have been unable to see or connect to any wireless networks. The output of running sudo lshw -C network is:     *-network UNCLAIMED          description: Network controller          product: BCM4352 802.11ac Wireless Network Adapter          vendor: Broadcom Corporation          physical id: 0          bus info: pci@0000:08:00.0          version: 03          width: 64 bits          clock: 33MHz          capabilities: pm msi pciexpress cap_list          configuration: latency=0          resources: memory:d1600000-d1607fff memory:d1400000-d15fffff   The fact that the wireless network controller is unclaimed leads me to believe that this is a driver related issue. I have checked and made sure that "Use proprietary driver" is checked in System Settings > Software & Updates > Additional Drivers and I have run sudo apt-get install --reinstall bcmwl-kernel-source I have also restarted after every driver change to finish the changes. Is there anything else I should try?  EDIT: Here is the result of running lspci -nnk | grep 0280 -A2:        08:00.0 Network controller [0280]: Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter [14e4:43b1] (rev 03)     Subsystem: Lenovo BCM4352 802.11ac Wireless Network Adapter [17aa:0623]     Kernel modules: bcma, wl   Running sudo modprobe wl && dmesg | grep wl returns an error:      modprobe: ERROR: could not insert 'wl': Required key not available


Take a loot at the bottom in my for loop. It's probably a simple logical error but for some reason 'if' condition is never met. Sorry for asking basic stuff but I've searched and searched and can't seem to find the answer. Thanks for helping a noob.   Scanner scan = new Scanner(System.in);      System.out.println("How large would you like the array to be? (number)");     int arraySize = scan.nextInt();     scan.nextLine();     String [] myArray = new String [arraySize];     int i = 0;      if (arraySize <= 0 ) {         System.out.println("Please enter a positive integer for the array size. Rerun program when ready.");     } else {         while (i < myArray.length) {             System.out.println("Please type a string to be entered in the array");             myArray[i] = scan.nextLine();             i++;         }     System.out.println("Array contents: " + Arrays.toString(myArray));     }     System.out.println("What element would you like would you like to find in the array by performing a linear search?");     String search = scan.nextLine();      for (int j = 0; j < myArray.length; j++) {         if (myArray[j] == search){             int location = j + 1;             System.out.println("The element, " + search + " was found in the array, in which the linear search looped " + location + " times to find it." );             j = myArray.length;         }     }

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?


Find all functions $f:\mathbb R \to \mathbb R$ that satisfy $$ f(x)  + 3 f\left( \frac {x-1}{x} \right) = 7x $$ for all nonzero $x$.    I don't know what's going on today, my brain is not moving!  I'm stuck on this problem.  Solutions are greatly appreciated.

Find all functions $f:\mathbb R \to \mathbb R$ that satisfy $$ f(x)  + 3 f\left( \frac {x-1}{x} \right) = 7x $$ for all nonzero $x$.  My thoughts so far are to plug in $(x - 1)/x$ for $x,$ but it always comes out so complicated, so I don't really know where to go from there.


Is it possible with ssh to allow passwords from a certain user, but deny using passwords for everybody else?  Basically I want to allow password auth for user justin but everybody else must use public keys.  PasswordAuthentication no   Seems to be global though, no way to specify by user.

On Linux (Debian Squeeze) I would like to disable SSH login using password to some users (selected group or all users except root). But I do not want to disable login using certificate for them.  edit: thanks a lot for detailed answer! For some reason this does not work on my server:  Match User !root PasswordAuthentication no   ...but can be easily replaced by  PasswordAuthentication no Match User root PasswordAuthentication yes


When I import object B in my scene, It appears at origin 0, near object A (which is keyframed). I cannot seem to move A away from B without B loosely following... What is the relationship at work here? How can I move object A without B being affected?

I'm facing this frustrating "feature" that I can't seem to remedy; when I duplicate an object (and now, even when I create two completely new objects), their transformations/scaling is synchronized. This is extremely annoying when trying to use any sort of transformation keyboard shortcut.  It should be noted by going to the properties menu (N) and manually setting the properties works just fine.  For instance, here is just the camera selected (trust me, I made sure):   And when I try to transform by clicking+dragging on the X axis OR by hitting G->X, this happens:   They are not grouped (verified by going to the Groups list up in the Scene panel) and they do not have parents (verified by going to Object->Relations).  I have tried the unlink command as well, to no avail.  I have seriously run out of options; what did I change to have my G->X shortcuts transform multiple objects? It seems completely at random, too; certain objects seemed to be "linked" to other random objects, and this "linking" is guaranteed when duplicating even when I do a non-linking duplicate (Shift+D).  What gives?


If r stands for counter-clockwise 90 degree rotation, s stands for horizontal flip. $D_4= \{1, r, r^2, r^3, s, rs, r^2s, r^3s\}$. What rule should I apply to find the subgroups of $D_4$? Should I just put elements with same order in the same subgroup?

I need to determine the subgroups of the dihedral group of order 4, $D_4$.  I know that the elements of $D_4$ are $\{1,r,r^2,r^3, s,rs,r^2s,r^3s\}$  But I don't understand how to get the subgroups..


So I am working on this 8 puzzle game and I need to set an initial state. So lets say I am given the input "1b2 345 678" and I want to do various search methods and move pieces around (in particular the b (blank) piece). So I want to represent that given input in a matrix like:  1 b 2  3 4 5 6 7 8  So I wrote the following code:  public class EightPuzzle {      String[][] gameBoard = new String[3][3];     String bLocation;     String board;       /*public void ReadFromTxt(String file) throws FileNotFoundException, IOException {         String read;          FileReader f = new FileReader(file);         int i = 0;         int j;         BufferedReader b = new BufferedReader(f);         System.out.println("Loading puzzle from file...");         while((read = b.readLine())!=null){             if(read.length()==3){                 for(j=0;j<3;j++){                     board[i][j] = (int)(read.charAt(j)-48);                 }             }             i++;         }         b.close();         System.out.println("Puzzle loaded!");     }*/      public String[][] setState(String board){          gameBoard[0][0] = board.substring(0,1);         gameBoard[0][1] = board.substring(1,2);         gameBoard[0][2] = board.substring(2,3);         gameBoard[1][0] = board.substring(4,5);         gameBoard[1][1] = board.substring(5,6);         gameBoard[1][2] = board.substring(6,7);         gameBoard[2][0] = board.substring(8,9);         gameBoard[2][1] = board.substring(9,10);         gameBoard[2][2] = board.substring(10,11);         System.out.println(gameBoard);          return gameBoard;      }      public static void main (String[]args){          EightPuzzle b1=new EightPuzzle();         b1.setState("b12 345 678");      }  }   But when I run it, it just displays that my gameBoard is stored as:     [[Ljava.lang.String;@15db9742  What am I doing wrong?

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'm new to multithreading so I was trying to create a basic program that creates an array of size 1000 of random integers and create two threads, one that sorts the array ascendingly and the other sorts the array descendingly (without any concurrency control). So my problem is that the two threads does not read the proper size of the array and when I print out the array length it gives 2, so if I add another argument to the function indicating the size of the array(which is the regular fix) I won't be able to pass that extra argument to the thread created as it only takes 1 argument for the function . Here is what the code looks like :   #include<stdio.h> #include<pthread.h> #include<time.h>  void *Function1(int *arr[]){      int i,j,k;     int n = ( sizeof(arr) / sizeof(int)); printf("Size of array = %d\n", sizeof(arr)); printf("Size of int = %d\n", sizeof(int)); printf("no. of elements in array = %d\n", n);      for(i=0;i<n;i++){         for(j=0;j<n-i;j++){             if(arr[j]>arr[j+1]){                int tmp=arr[j];                 arr[j]=arr[j+1];                 arr[j+1]=tmp;             }         }      }     for(k=0; k<n; k++){         printf("a[%d] is %d  Thread#1 \n", k, arr[k]);    } }   void *Function2(int *arr[]){      int i,j,k;     int n = ( sizeof(arr) / sizeof(int)); printf("Size of array = %d\n", (int)sizeof(arr)); printf("Size of int = %d\n", sizeof(int)); printf("no. of elements in array = %d\n", n);     for (i = 0; i < n; i++){         for (j = i + 1; j < n; j++){             if (arr[i] < arr[j])             {                 int tmp = arr[i];                 arr[i] = arr[j];                 arr[j] = tmp;             }         }      }     for(k=0; k<n; k++){         printf("a[%d] is %d  Thread#2\n", k, arr[k]);    } }  int main(){  int i,j; int array[1000];     srand(time(NULL));     for(i=0; i<1000;i++){         array[i] = (rand() % 1000) +1;       }  pthread_t t1,t2; pthread_create(&t1, NULL, Function1, array); pthread_create(&t2, NULL, Function2, array); pthread_join(t1, NULL); pthread_join(t2, NULL); return 0; }   Here is what gets printed :  Size of array = 8 Size of array = 8 Size of int = 4 Size of int = 4 no. of elements in array = 2 no. of elements in array = 2 a[0] is 365  Thread#1  a[0] is 365  Thread#2 a[1] is 72  Thread#1  a[1] is 72  Thread#2

How do I determine the size of my array in C?   That is, the number of elements the array can hold?


I'm currently using dual boot Windows 10 + Ubuntu 17.10. I wanted to upgrade Ubuntu 17.10 to 18.04 stable release. By doing so I don't want to harm anything and end up with nothing. I've created live CD for that. Live CD is the only source to upgrade system.

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


I have been using windows for a long time. And now I have moved on to ubuntu (13.04). I am just 2 to 3 weeks old for ubuntu. I don't understand about the directories like /var , /home, /media etc. . . Can somebody relate all the ubuntu directories to windows directories. That might be so easy for a beginner like me to understand. To be more precise, I don't even know which directory behaves like C: and which one behaves like D: or E: or others. I don't know where to save which kind of docs.

In Windows there’re perhaps only a couple of important folders (by important I mean important in my logical picture of the Windows file system) in the installation drive (in my case C:\). Namely Program Files and Windows. I simply stay away from Windows folder and the “add remove program files” is good enough to handle the program files folder of Windows. Of course there’s a folder named Users where the users (who are not admins) can access only their folders.  Thus there’s a clear picture at some level in my mind of the Windows file system. In Ubuntu, when I reach the location /, there’s a huge list of folders, most of which I have no clue as to what they contain. The /bin folder seems to be the equivalent of the Windows folder in windows. The /usr folder seems like it’s the equivalent of the Users folder in Windows. But even the /home folder looks like it can fit the bill.  Please understand that I do understand, that Ubuntu (Linux) has a different character than that of Windows, i.e., there need not be exact equivalent of Windows functions, in Ubuntu. All I am looking for is a bit more clearer picture of the Ubuntu file system.   This question is a part of a bigger question which I am splitting up to make it more answerable. The original question can be found here:


How does this works? print("string"[1::-1])  According to me: If I consider one part of the slicing, then its print(string[1:]), which in my observation should produce tring. And now the -1 step should reverse the slicing produced to gnirt, but it doesn't happens. Instead the first two items of the string are reversed that is ts. What am I lacking in my understanding?

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


Is it possible to take a particle with no mass and give it mass. For example light? Or increase mass?

I was reading  and these paragraphs got me wondering...     Before I list the replies, here is some background. The Higgs mechanism describes an invisible field that, it is argued, split one   force into two soon after the birth of the universe. Specifically, it   divided an ancient "electroweak" force into the electromagnetic and   weak forces we see at work today. The latter is seen in some   radioactive decay processes, and is involved in creating sunshine.      The Higgs field splits the electroweak force by giving mass to the   particles that carry the weak force (the W & Z bosons) and leaving the   particle that carries the electromagnetic force (the photon) massless.   The Higgs boson is the quantum particle associated with the Higgs   field.   What I'm wondering is... can anyone hazard a guess as to the possibility at some point in the future of humans being able to manipulate the Higgs mechanism so as to give photons some kind of mass? I'm thinking they obviously couldn't go at the speed of light anymore, so could we make 'slow light'?


I need to create a DateTime object with a fixed value on a given TimeZone for today, lets assume it to be 2018-04-23 now I would do DateTime.Today or DateTime.Now.Date to get it on the local timezone, or I could do DateTime.UtcNow.Date to get it on UTC. after that if I want the 9am its something like DateTime.Today.AddHours(9) and that would give me 2018-04-23 09:00 am but that would be, again, on the local timezone, as would new DateTime(.....).   The question then is how could I get 2018-04-23 09:00 am on a given timezone, lets say PST for instance?

I'm trying to create a unit test to test the case for when the timezone changes on a machine because it has been incorrectly set and then corrected.  In the test I need to be able to create DateTime objects in a none local time zone to ensure that people running the test can do so successfully irrespective of where they are located.  From what I can see from the DateTime constructor I can set the TimeZone to be either the local timezone, the UTC timezone or not specified.  How do I create a DateTime with a specific timezone like PST?


i was wondering as to what is the difference between these two definition of structures one having the structure name(Books) and its instantiation(Book) while the other has only the instantiation(complex).

In C++, is there any difference between:  struct Foo { ... };   and:  typedef struct { ... } Foo;


I am facing this while using java.base64 issue ClassnotFoundException:Didn't find class "java.util.Base64" on path: DexPathList in java.util.Base64.I want to decrypt the encrypted text.So I am using this code and JAVA 8.Please help me   String encrptedtext = "QW28YjzFVa70mG/o/itYGGoEaV/0EBFY+jnxClcgw=";//secret key that boy given      byte[] base64decodedBytes = Base64.getDecoder().decode(encrptedtext);     try {  Log.i("EE", "decryptedString---" + new String(base64decodedBytes, "utf-8"));           } catch (UnsupportedEncodingException e) {             e.printStackTrace();         }

I have an image that is Base64 encoded. What is the best way to decode that in Java? Hopefully using only the libraries included with Sun Java 6.


I am using gradle6.8.1 and jdk15 to construct my Spring microservice project.  While running my project test I am getting these errors: Handler dispatch failed; nested exception is    java.lang.NoSuchMethodError: 'void javax.ws.rs.core.MultivaluedMap.addAll(java.lang.Object, java.lang.Object[])'  org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is   java.lang.NoSuchMethodError: 'void javax.ws.rs.core.MultivaluedMap.addAll(java.lang.Object, java.lang.Object[])'  I don't have idea about this error, but it was working in other machines. So, I have checked with various versions of gradle and java sdk but no use. And I also tried after clear gradle cache but its not working.

I'm getting a NoSuchMethodError error when running my Java program.  What's wrong and how do I fix it?


I was supposed to fly from Mumbai to Amsterdam, but because of the denied boarding I couldn’t reach my final destination as planned.  Few days back I did a Europe tour from India. So, I can apply for a visa from the country which is either my first port of entry in this case Netherlands or the longest stay which in this case Poland and therefore, I had applied for my visa from Poland embassy.  Now following is what happened with me.   My flight was from Mumbai, India to Amsterdam, Netherlands via Istanbul with Turkish Airlines I travelled from Mumbai to Istanbul (no problem here). When I was boarding to flight Istanbul to Netherlands, airlines officials (the ones who checks the boarding pass before boarding the flight) told me that I could not board the flight because my visa was issued by Poland and I need to go to Poland first. They were denying the longest stay option of the visa. Moreover NONE of the staff of Istanbul airport were able to understand English so I had to go to a lot of problems before I managed to get tickets to Poland and that too with the help of some official through Poland ticketing office, which is beyond Istanbul passport office. The only direct flight available is through polish airways for that day and not with any other airlines.  I somehow managed to fly to Poland from Istanbul after lot of struggle at Istanbul airport (without food and water). I did not received my luggage at the Poland airport and had to spent whole night at the Warsaw airport and took a flight to Amsterdam from Warsaw airport next morning. I got my luggage after almost three days of my flight from India at the Amsterdam airport.   I emailed airline for compensation and below is the response "The passenger shall be solely responsible for complying with all laws regulations, orders, demands and travel requirements of countries to be flown from, into or over, and with Carrier's Regulations and instructions. Carrier shall not be liable for any aid or information given by any agent or employee of carrier to any passenger in connection with obtaining necessary documents or visas or complying with such laws, regulations, orders, demands, and requirements, whether given in writing or otherwise; or for the consequences to any passenger resulting from his or her failure to obtain such documents or visas or to comply with such laws, regulations, orders, demands, requirements, rules or instructions.  In light of above information, we are sorry to inform you that we are unable to cover additional costs, such as new tickets for Warsaw arrival and transfer payments, considering document check in Istanbul and denied boarding before TK1953 flight departure."  Is suing the airline only option now? Are they fair in denying the boarding as per their mail?

Few days back I did a Europe tour from India. As stated by many (I haven't confirmed official documents), I can apply for a visa from the country which is either my first port of entry in this case Paris or the longest stay which in this case was Italy.  Now following is what happened with me.   My flight was New Delhi to Paris via Istanbul with Turkish Airlines I Traveled from New Delhi to Istanbul (no problem here). When I was boarding to flight Istanbul to Paris, zhe airlines officials (the ones who checks the boarding pass before boarding the flight) told me that I could not board the flight because my visa was issued by Italy and I need to go to Italy First. They were denying the longest stay option of the visa. Moreover NONE of the staff of Istanbul airport were able to understand English so I had to go to a lot of problems before I managed to get tickets to Venice. I somehow managed to fly to Venice from Istanbul after almost 24 hours of struggle at Istanbul airport (without food and water).   So, my question is do the airlines staff have a right to deny flight boarding in this case?


In general, if a set of three hermitian operators $J_i (i=1,2,3)$ satisfy the commutation relation $[J_i, J_j]=i\hbar\epsilon_{ijk}J_k$, then it follows that the eigenvalues of $j(j+1)\hbar^2$ of $J^2\equiv J_1^2+J_2^2+J_3^2$ are given by $j=0,\frac{1}{2},1,\frac{3}{2},2,...$  The set of orbital angular momentum $L_i=\epsilon_{ijk}x_j p_k$ satisfy this commutation relation. Therefore, the eigenvalues of $L^2$ is expected to carry both integral and half-integral eigenvalues in absence of any extra conditions. But to my knowledge, in every problem, $\ell$ takes only integral values $\ell=0,1,2,3...$   What causes $\ell$ not to have half-integral values? Can it be answered using a system-independent argument?

Why do we exclude half-integer values of the orbital angular momentum? It's clear for me that an angular momentum operator can only have integer values or half-integer values. However, it's not clear why the orbital angular momentum only has integer eigenvalues.  Of course, when we do the experiments we confirm that a scalar wavefunction and integer spherical harmonics are enough to describe everything. Some books, however, try to explain the exclusion of half integer values theoretically. Griffiths evokes the "single valuedness" argument, but he writes that the argument is not so good in a footnote. Shankar says that the $L_z$ operator only is Hermitian when the magnetic quantum number is an integer, but his argument isn't so compelling to me. Gasiorowicz argues that the ladder operators don't work properly with half-integer values. There are some low impact papers (most of them are old) that discuss these subjects, although they are a little bit confusing.  So, basically, my question is: Does anyone have a decisive argument on why do we exclude the half-integer values from the orbital operator spectrum?


I am assigned to find solutions to the Pell-type equation $x^2-2y^2=-1$. So far, I only have $(7,5), (41,29)$ and $(239,169)$.  My question is, is there a general formula to find all its solutions? Are there infinitely many solutions? If it's possible to write Mathematica code that would find its solutions, what would the code look like?  Thanks a lot.

How can I find the integer solutions of the generalized Pell equation $x^2-2y^2=49$   I have an algorithm, but this only works if $D\ge r^2+\frac{\left(|r|+1\right)}2$, (where $x^2-Dy^2=r^2$).   The problem is we've covered Pell equation and elementary number theory a couple of weeks ago, since then we're doing some algebraic number theory, but I cannot find any useful theorems there.  One solution by guessing is $(r,s)=(11,6)$ and the minimal solution to $x^2-2y^2=1$ is $(t,u)=(3,2)$ and then a second solution can be found $(x,y)=(rt+Dsu,ru+st)=(57,40)\dots$, but these are not all, am I wrong ?


So here's the homework question:   "Write a program that takes a date as input and outputs the date's season. The input is a string to represent the month and an int to represent the day.  Ex: If the input is:  April 11 the output is:  Spring In addition, check if the string and int are valid (an actual month and day).  Ex: If the input is:  Blue 65 the output is:  Invalid "  My code is as follows:  '''      String inputMonth;     int inputDay;      inputMonth = scnr.next();      inputDay = scnr.nextInt();    if( ((inputMonth == "March") || (inputMonth == "march")) && ((inputDay >= 20) && (inputDay <= 31))){      System.out.println("Spring");     }   else if( ((inputMonth == "April") || (inputMonth == "april")) && ((inputDay >= 1) && (inputDay <= 30))){      System.out.println("Spring");     }     else if( ((inputMonth == "May") || (inputMonth == "may")) && ((inputDay >= 1) && (inputDay <= 31))){      System.out.println("Spring");     }     else if( ((inputMonth == "June") || (inputMonth == "june")) && ((inputDay >= 1) && (inputDay <= 20))){      System.out.println("Spring");     }     else if( ((inputMonth == "June") || (inputMonth == "june")) && ((inputDay >= 21) && (inputDay <= 30))){      System.out.println("Summer");     }     else if( ((inputMonth == "July") || (inputMonth == "july")) && ((inputDay >= 1) && (inputDay <= 31))){      System.out.println("Summer");     }     else if( ((inputMonth == "August") || (inputMonth == "august")) && ((inputDay >= 1) && (inputDay <= 31))){      System.out.println("Summer");     }     else if( ((inputMonth == "September") || (inputMonth == "september")) && ((inputDay >= 1) && (inputDay <= 21))){      System.out.println("Summer");     }     else if( ((inputMonth == "September") || (inputMonth == "september")) && ((inputDay >= 22) && (inputDay <= 30))){      System.out.println("Autumn");     }   else if( ((inputMonth == "October") || (inputMonth == "october")) && ((inputDay >= 1) && (inputDay <= 31))){      System.out.println("Autumn");     }   else if( ((inputMonth == "November") || (inputMonth == "november")) && ((inputDay >= 22) && (inputDay <= 30))){      System.out.println("Autumn");     }   else if( ((inputMonth == "December") || (inputMonth == "december")) && ((inputDay >= 1) && (inputDay <= 20))){      System.out.println("Autumn");     }   else if( ((inputMonth == "December") || (inputMonth == "december")) && ((inputDay >= 21) && (inputDay <= 31))){      System.out.println("Winter");     }    else if( ((inputMonth == "January") || (inputMonth == "january")) && ((inputDay >= 1) && (inputDay <= 31))){      System.out.println("Winter");     }   else if( ((inputMonth == "February") || (inputMonth == "february")) && ((inputDay >= 1) && (inputDay <= 29))){      System.out.println("Winter");     }   else if( ((inputMonth == "March") || (inputMonth == "march")) && ((inputDay >= 1) && (inputDay <= 19))){      System.out.println("Winter");     }   else{    System.out.println("Invalid");     }   '''  I believe the problem is that it wont read both the string and the integer correctly but I'm not exactly sure why.  Also I know there's probably a shorter way to do this but I don't know how yet, if anyone would like to help me with that too it would be infinitely appreciated.  Thank you in advance

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?


\[  \left| \dfrac{(1-\beta e^{i\theta}) \sum_{k=2}^{\infty}(k-1)[1+\gamma(k-1)]  \alpha_k\beta_k z^k}{B(1-\beta e^{i\theta}) \sum_{k=2}^{\infty}(k-1)[1+\gamma(k-1)]   \alpha_k \beta_k z^k -[(A-B)(1-\alpha)][z+\sum_{k=2}^{\infty}[1+\gamma(k-1)]  \alpha_k \beta_k z^k]}\right|<1 \]


It is a subtopic of article about AI  WHY THE RECENT INTEREST IN AI SAFETY  It seems to me there is no verbs here. I would be grateful if you explain what structure is used here

I found  with the title:     Why We Listen to Music   This seem somewhat incomplete to me, because "why we do something" is usually used as the subject of dependent clause like "This is why we listen to music."  I found  titled as follows:     Why Do We Listen to Music?   The second one sounds fine for me. My questions are these:   Is "Why We Listen to Music" grammatically correct? What's the difference between "Why We Listen to Music" and "Why Do We Listen to Music"?   Thanks in advance.


Can we be informed about activity on our meta posts? For example upvotes might have a grey icon in the rep notification menu? Something like this:  And for comments it is the same.  Instead of not knowing anything and only coming back a few days later when you get some badge. And we can also be informed about things like question closes.  Also,  is not what I'm looking for. I'm not a mod!

Child metas don't have rep, so there's no point in tracking a rep stat or reporting changes.  But one of the things rep updates do on main sites is to alert me when there's activity on older posts.  On metas, unless I revisit a question I'll never notice that there's been a bunch of voting (which might be accompanied by new comments that didn't ping me).  I'd like to know about that activity, not because of any ego reasons but because meta is where site policies get discussed and set and it's useful to know about changes in the community will.  A couple days ago I visited a meta post where, a few weeks ago, my answer had been voted down, and this time it was at the top.  Could we have something like the reputation-changes tab on meta?  I suspect that the data already exists, because I once  (and I see I'm not the only one).  If something akin to reputation is already being tracked internally on per-site metas, can we get it exposed?


I was wondering if it is necessary to mean center and set std to 1 to the both my xs and ys in linear regression or doing that to just xs is fine enough.  Lets say I use a different model, say neural networks, is it necessary to standardize. I want to know if it is good to standardize both xs and ys, whatever model I use

In what circumstances would you want to, or not want to scale or standardize a variable prior to model fitting?  And what are the advantages / disadvantages of scaling a variable?


I am posting UTF-8 (Hindi) data via $.POST. I am getting this: à¤®à¤¨à¤®à¥‹à¤¹à¤¨ à¤¸à¤¿à¤‚à¤¹ in my MySQL database.  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">   is added in pages.  $.post("submit_answer_submit.php", {     qid: qidx,       answer: answerx }, function(data, status){   How do I add "Content-Type:"?

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


So I have shown that $a\mathbb{Z}+b\mathbb{Z}=k\mathbb{Z} $ for some k since it’s  a subgroup of $\mathbb{Z} $.  I have shown that $h\mathbb{Z} \subset k\mathbb{Z} $. Here’s $h=\text{hcf}(a,b) \mathbb{Z} $. I just need to show the opposite opposite inclusion using elementary arguments.

For natural numbers $a$ and $b$, show that $a \Bbb Z + b \Bbb Z = \gcd(a, b)\Bbb Z $  I just basically said that the gcd of a and b { written as C } obviously divides aZ and bZ, therefore it can be rewritten as  CdZ + CeZ -> C[dZ + eZ] -> CZ[d+e] where Cd=a and Ce=b.   if a and b and C are natural numbers, then  so are d and e. the sum of d and e is an integer, that when multiplied by an integer produces an integer. therefore  CZ[d+e] = CZ, so aZ + bZ = GCD(a,b)Z  { Where C is the gcd(a,b) }


I know a person that I can say: "The flu is going around again" and next day he has the flu, but two days later he out in the woods hunting. If he comes in contact with someone that has heartburn then the next day he has heartburn! I called him on the phone and told him I had a cold, the next day he had the cold... I can go on and on and on...   This has been a fact for many many  years. Is there a name for a person like this or is it some type of disease?

Is there a single word in English to describe someone who is too worried about their health and even thinks they are sick, thus, taking frequent clinical tests or taking too much predictive medication,etc.


Let $f(x) = \left(\frac{2x^4y-5x^2y^2+y^5}{(x^2+y^2)^2}\right)$ when $x, y\neq0$ and $f(x) = 0, when\space x, y = 0$  find a $\delta > 0$, such that $|f(x,y)-f(0,0)| < 0.01$, whenever $\sqrt{(x^2+y^2)}<\delta$  I tried to solve it by using polar co-ordinates but the problem has higher order terms which is making it difficult to find any pattern or common terms to reduce it. I don't want complete solution please give me a direction and I will try to work from there. Thanks!

Problem that I am facing:  So naturally I decided to shift to the polar co-ordinates, however when I try to simplify the expression remains very complicated and despite using the fact that sin and cos belong to [-1,1] I cannot get any conclusive bound.  Thanks


I have created two meshes as separate objects and I want to create a face joining them. However, since they are two different objects, I can not edit them to add the face.  Is it possible to join them into one mesh?

I'm creating side skirts for a truck and I am duplicating the frames I want. The problem is it's making the duplicated object into another object. How do I put it into the same one?


I have defined two constructors in my code  public SAPRoleImpl() {     dateParser=new SimpleDateFormat(MIDDAY_DATE_FORMAT);     dateParser.setTimeZone(TimeZone.getTimeZone("GMT"));     Calendar c=Calendar.getInstance(TimeZone.getTimeZone("GMT"));     c.set(Calendar.HOUR_OF_DAY,12);     c.set(Calendar.MINUTE,0);     c.set(Calendar.SECOND,0);     c.set(Calendar.MILLISECOND,0);     setStartDate(c.getTime()); }  public SAPRoleImpl(String formattedRole) {     this();     ... }   When I execute the below code:  public static void main(String[] args) {     SAPRoleImpl sapRole = new SAPRoleImpl("abc|abcdesc||");     System.out.println(sapRole); }   It gives this output  :abc|20170127||   This is as expected. But when I want an output of only  abc|||   i.e no start date is to be initialized, I tried this code:  public SAPRoleImpl() { }  public SAPRoleImpl(String formattedRole) {     this();     ... }   This led to a NullPointerException. Probably, It seems that the startdate is null but I am not able to understand the reason behind the same.      Can any one please help me to understand?

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


I'm making a Minecraft map where you have to kill bees and I'm trying to make the command block give you a sweeping edge sword and I just can't figure it out.

I'm making a map where I want players to be able to choose there kits/classes. The problem I'm having with it though is giving players already enchanted Tools/Armour/Weapons.  I'm not sure if you can use the /give [player] [item] [amount] because you'll have to use the whole {} thing and I'm not sure how to make enchanted Tools/Armour/Weapons using that.  Can anyone help?


Let $G$ be an finite abelian group, define $s= \Pi_{g\in G} g$, show that $s = e$ unless $G$ has exactly one involution $u$, in this case $s=u$.   I have the start of a proof, but I get stuck at a point.   Proof  Write $G$ as $G = \{e\} \cup I \cup \{g_1, g_1^{-1}, \ldots, g_n, g_n^{-1}\}$ where $I$ is a set of the all the groups involutions.  Since $G$ is abelian $\Pi_{g\in \{g_1, g_1^{-1}, \ldots\}} g = e$ we just need to examine $\Pi_{u\in I} u$  Now:   If $|I|=0$ then the theorem holds, If $|I| = 1$ then $I=\{u\}$ and $s= u$, the theorem holds If $|I| = 2$, requires closer examination:  Let $I = \{u_1,u_2\}$ be the set of all involutions (not equal to $e$), then $u_1u_2$ is also an involution (since $G$ is abelian).   If $u_1u_2 =e$ then $u_1=u_2$, contradiction, if $u_1u_2 = u_1$ then $u_2=e$, contradiction. $u_1 u_2=u_2$ results in the same contradiction. This means that the case $|I|=2$ is not possible. the case $|I|=3$ is possible, let $I = \{u_1,u_2,u_3\}$ then it's easy to prove $u_3 = u_1u_2$. The theorem holds.   How should I continue? I've tried splitting $I$ as   $$I=\{u_i: u_i \not = u_ju_k (\text{for a certain }j\not = k)\} \cup \{u_i = u_ju_k (\text{for a certain} j \not = k)\}$$ but I still get stuck.  Also the case $|I|= 4$ seems contradictory once again..

Suppose $G=\{a_1,...,a_n\}$ is a finite abelian group, and let $x=a_1a_2\dotsm a_n$.   Prove that if there is more than one element of order $2$ then $x=e$.   What I've done so far: (#1 is just for illustration, There should be at least $3$ such elements)   $G$ has an even number of elements with order $>2$ (They are paired so: $(a,a^{-1})$ ). And then there are $e$ and $\{b|o(b)=2\}$. Also, if $G$ has at least one element of order 2 then $|G|$ is even (Lagrange). Thus $|\{b|o(b)=2\}|$ must be odd. If there is exactly one element $b$ of order $2$ then $x=b$. That's because $G$ is abelian, and we can write: $x=e\cdot b\cdot(a_1 a_{1}^{-1}\dotsm a_n a_{n}^{-1})=b\cdot(e\dotsm e)=b$. If there are exactly $3$ such elements $a,b,c\in G$, then, as shown above, $x=abc$ and thus $x=e$ (That's because $(abc)^2=a^2b^2c^2=e$ which means $abc\in \{a,b,c,e\}$. If $abc=a$ then $b=c^{-1}=c$ which is false, same goes for $abc=b,abc=c$.)   I haven't managed to find a reason why the claim must hold for $5, 7, ...$ (i.e. All other odd integers). Does anyone have an idea?  Thanks in advance. Please excuse my English.  edit: Not a canonical answer but a simple one (if such even exists).


For example, as you can see in the keymap preferences, there are operators that have properties, like this Smooth Vertices:    With this little code row.operator("mesh.vertices_smooth") I can make a button to execute this operator in my UI panel    So how can I do the same with those properties and checkboxes, for them to show up in my custom panel, so then I can set some settings before clicking the button?  This is in blender 2.8 by the way..  Thanks...

I have try to make an UI Panel with my operator, but i can not create a panel with the 2 choices (axis and widht).  I can create a button who launch a menu in the tools pannel, and the operator works fine with this :  layout = self.layout layout.operator(ChooseAxis.bl_idname)   But i want to have exactly this menu in the UI panel, not in tools, so I have try to write this :  layout.prop(obj, "axis") layout.prop(obj, "newdim")   But that doesn't works, values are modifiable but are ignored and do not modify the object.  How can i have the operator directly on the UI Panel ? (Not a button to launch the operator, but the operator himself with its Properties.)  Moreover, how i can keep the object size value when i launch the operator ? Because when i launch it, it the default value of the newdim property is set to 1 (for example), the object is directly resized. Is it possible to have a default="object actual value" ?  here the entire script with the ui panel created :   from bpy import * import bpy from bpy.props import FloatProperty, EnumProperty  class ProportionalDimensions(bpy.types.Panel):     """Creates a Panel in the Object UI window"""     bl_label = "Proportional Dimensions"     bl_idname = "prop_dim"     bl_space_type = "VIEW_3D"     bl_region_type = "UI"     #bl_context = "object"  def draw(self, context):     obj = context.object      #row = layout.row()     #row.label(text="Active object is: " + obj.name)      layout = self.layout     layout.operator(ChooseAxis.bl_idname)      layout.prop(obj, "axis")     layout.prop(obj, "newdim")   class ChooseAxis(bpy.types.Operator):     bl_idname = "object.choose_axis"     bl_label = "Choose_the_Right_Axis"     bl_description = "This is to choose the axis"     bl_options = {'REGISTER', 'UNDO'}  axis  = EnumProperty(         name="Axis",         description="Axis selection",         items= [('x', "X", ""),('y', "Y", ""),('z', "Z","")],         default='x'         )  newdim = FloatProperty(         name="Width",         description="Scale",         min=0.01, max=100.0,         default=1,         ) # your code def scale(self, axis, new_dim):     ob = bpy.context.active_object     d = ob.dimensions      x = d[0]     y = d[1]     z = d[2]      scale =  axis      if( scale == "x"):         indice = 0     elif( scale == "y"):         indice = 1     else:         indice = 2      old_dim = d[indice]      factor = new_dim / old_dim      scale_x = ob.scale[0]     scale_y = ob.scale[1]     scale_z = ob.scale[2]      ob.scale[0] = scale_x * factor     ob.scale[1] = scale_y * factor     ob.scale[2] = scale_z * factor  def execute(self, context):     self.scale(self.axis,self.newdim)     return {'FINISHED'}  def register():     bpy.utils.register_class(ProportionalDimensions)     bpy.utils.register_class(ChooseAxis)   def unregister():     bpy.utils.unregister_class(ProportionalDimensions)     bpy.utils.unregister_class(ChooseAxis)  if __name__ == "__main__":     register()


My daughter is 2 years and 7 months old. Sometimes at night, she starts crying badly during sleep and wakes up, but does not stop crying. She calls me mama mama and when I hold her she never stops crying as if she had severe pain in her body. Then she wants to go to her father, but doesn't stop crying.   We offer many things, but she does not want to take anything at that time. We ask about pain, but she doesn't reply, just cries badly. We ask her if she was scared? But she doesn't respond. After 15 to 30 mins or more she stops by herself and sleeps. It happens almost every month. I am worried about her.   Is this normal or not?

My son is 17 months old with a regular routine in a nuclear family.  0700 awake 0745 in nursery Full day of nursery 1730 pick up from nursery 1800 relaxing time with mum and dad 1830 bath time 1900 story / quiet time 1920 bottle of warm whole milk 1930 bedtime  As a family we have the usual toddler tears you would expect with bedtime and handle them accordingly but the real reason for this question occurs between the hours of 2300 and 0500. Randomly, for 4 to 5 minutes, he will wake up in absolute hysterics screaming for his mother.  His eyes are closed and when picked up to be soothed he will not recognise us and continue the episode.  He is, as far as I can tell, still asleep during these periods but the screams are deafening. I don't know if this qualifies as a night terror? Sometimes the episode will manifest itself with him pushing himself away from us to the floor and running into other rooms (asleep).  Normally he will settle by the stair gate clutching it and shouting as if he has been abandoned and we (parents) are downstairs instead of next to him. The only remedy we have found is to have one or two bottles of milk on hand to give to him which normally soothe his distress until he falls back asleep. Context His mother is a fairly normal sleeper but I am a  sleeper; dreaming/hallucinating as soon as I close my eyes and not waking for any amount of noise or distraction.  Often my dreams are in full colour and my partner can have full, lucid conversations with me whilst I sleep which I cannot remember.  However, in 32 years I have never had a nightmare that I can recall so I don't know how to approach my son to help him deal with this sleeping problem.  I always found Hynagogic sleep a pleasant experience. Do any parents or medical professionals on these forums have experience and/or advice on how to support my son?


Suppose I have a 20 AmpHour battery at 4V (as in, the actual capacity of the battery is 80 Watt hours). And I'm using a 10V 2A charger to charge it (this is a 20 Watt charger). How can the charge time be calculated?  Is it 4 hours?  Note: The charge time is definitely not 20Ah/2A = 20h as a lot of people state, since these numbers are close to the actual values for most fast-charging smartphones today, and the charge time should be of the order of 1 hr).  Note 2: Please explain using the fundamentals of physics, instead of obscure formulae.  Since the charger is at 10V and the battery is at 4V, how does this affect the charging?

How do I calculate the approximated time for the Charging and Discharging of the battery? Is there any equation available for the purpose? If yes, then please provide me.


I have a problem using a variable surrounded with a try : Here's the beginning of my method :  public static word[] countWords(String text) {     try {             text = Preprocesseur.preprocess(text);     }      catch (IOException e) {             System.out.println("Error méthod countWords");             e.printStackTrace();     }       Actually i need to use the String text (preprocessed) several line after, but java doesn't affect the value Preprocesseur.preprocess(text) to the whole method --> it stays in the try/catch block  I was wondering : how to call my method Preprocesseur.preprocess and affect its return String to the whole countWords method ? Because a try/catch block is required (or throws declaration which leads to the same result)

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


In Xubuntu 13.04 there is a Show Desktop panel plugin.  I'd like to make a keyboard shortcut for this functionality.  How can I activate Show Desktop with a terminal command?

I want to be able to lower all windows and show the desktop from the command line, not Ctrl+Alt+D.


I don't understand fully why aluminium foil sparks in a microwave oven?   I think what is happening is the oven sets up an electric field, and the field induces a current in the foil (how?), and current in the foil then produces a very strong electric field which causes dielectric breakdown of the air, which is why we see sparks.  I think I'm confusing some electromagnetism concepts or something.

I heard that electrons accumulate at points on metals, and this clearly explains the arcing phenomenon, but how does a microwave make an electron imbalance on the fork?


Suppose I have a table with several column, among them - columns a and b.  Is there any use case for which having both multi-column index on (a,b) and a single-column index on (a) is beneficial?  AFAIU for simple equality check using first column of multi-column index is equally good as using the single-column index.

Let's say I have a table with fields A and B. I make regular queries on A+B, so I created a composite index on (A,B). Would queries on only A also be fully optimized by the composite index?  Additionally, I created an index on A, but Postgres still uses the composite index for queries on only A. If the previous answer is positive, I guess it doesn't really matter, but why does it select the composite index by default, if the single A index is available?


I have a GTK application in C++ running, and one of the widgets is a dropdown menu. I want to take a screenshot when this menu is open, but nothing happens when I press Print Screen (it works when the menu is closed). I don't think this is a GTK thing: how can I take a screenshot when the menu is open?

I need to take a screenshot that records my Eclipse IDE menu item status. For example, if I clicked the "Project" menu and there comes a list of menu items. I need to record those menu items.  The problem is when the menu item list window (which works like a context menu window) has the focus, the screenshot function is not working. I tried everything on this  and nothing works as long as the menu items window is opened. Any mouse click will close the context menu window, so I cannot use mouse either. However if there is no context menu window opened then screenshots works fine.  How can I record the screen with context menu window displayed?


If people have a problem with conditionals with false antecedents and with true consequents always being true, why not just change it according to what is found to be more intuitive?   Regarding equivalence with some disjunctions, every explanation I hear seems to make sense prima facie, but I think ultimately they make sense merely because it makes the whole system simple and easy to work with. For instance, (p->q)->(~pVq) is not as intuitively necessarily true as maybe (pVq)->(~p->q). Simply changing how implications behave reflects that some of these disjunctions would cease to be equivalent.   So again, why do we stick with the material implication? Is it because in it, they're equivalent to some disjunctions and are therefore translatable by something like DeMorgan's Laws and provide for tidy simplifications?

Can someone provide me with the simplest possible argument for why the material conditional has the truth table it does?   Googling doesn't help at all, providing only flimsy and clumsy arguments. I want the argument to be simple, and yet as convincing as possible.


Here is my situation: I have being asked to deal with a SQL Server 2008 R2 database that has a transaction log that is several times bigger than the database itself. The database is in full recovery mode and the transaction log has never been backed up.   I intend to run the transaction log backup every 15 minutes but I am afraid that the first backup may take a very very long time (hundreds of GBs of data).   What is the right course of action here?   I'm a developer by training and not a DBA so I would appreciate a more detailed answer. Thanks in advance.

This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this:  In SQL Server -  What are some reasons the transaction log grows so large? Why is my log file so big? What are some ways to prevent this problem from occurring? What do I do when I get myself on track with the underlying cause and want to put my transaction log file to a healthy size?


If the laws of physics work the same forward and backward in time, why does entropy grow in one direction?

From what I understand, entropy is a concept defined by the experimentalist due to his ignorance of the exact microstate of a system. To say the number of accessible microstates $W$ of the universe is constantly increasing is nothing more than saying 'ignorance begets ignorance'.  I have often encountered the argument of ever increasing entropy for the presence of an inherent time asymmetry, most prominently in the works of Penrose. It just doesn't seem to make sense.  Let us imagine alien beings who are experiencing time in reverse. For them, increasing ignorance is in the direction of our decreasing ignorance. So how can perpetual increase in entropy indicate an 'arrow of time'?  One possible explanation (I thought of) for this argument was the fact that there may never be a mechanism to reduce ignorance. I will pose this as a question:  An observer determines the number of possible microstates of system+observer to be $W_0$ at time $t_0$. After improving his measurements, can he (at a later time) measure $W'$ (where $W_0>W'$) as the number of possible microstates? Assume that all the microstates are equally probable in this case.  Unless the above in false in general, how else can anyone claim that entropy reveals an arrow of time?  EDIT: I am performing this discussion for isolated systems (the universe or it's parts if relevant). The means I propose to reduce entropy in the present, is by redefinition of macroscopic variables and of microscopic models used to count the number of distinguishable micro-states (that obviously yield the same macro-state). This is essentially an argument against the robustness of entropy via redefinition.